gdbserver:prepare_access_memory: pick another thread
[external/binutils.git] / gdb / gdbserver / ChangeLog
1 2015-11-30  Pedro Alves  <palves@redhat.com>
2
3         * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4         check.
5         (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
6         to -1.
7         * target.c (struct thread_search): New structure.
8         (thread_search_callback): New function.
9         (prev_general_thread): New global.
10         (prepare_to_access_memory, done_accessing_memory): New functions.
11         * target.h (prepare_to_access_memory, done_accessing_memory):
12         Replace macros with function declarations.
13
14 2015-11-30  Pedro Alves  <palves@redhat.com>
15
16         PR 14618
17         * linux-low.c (linux_wait_1): If the last resumed thread is gone,
18         report TARGET_WAITKIND_NO_RESUMED.
19         * remote-utils.c (prepare_resume_reply): Handle
20         TARGET_WAITKIND_NO_RESUMED.
21         * server.c (report_no_resumed): New global.
22         (handle_query) <qSupported>: Handle "no-resumed+".  Report
23         "no-resumed+" support.
24         (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
25         return error if the client doesn't support no-resumed events.
26         (push_stop_notification): New function.
27         (handle_target_event): Use it.  Report TARGET_WAITKIND_NO_RESUMED
28         events if the client supports them.
29
30 2015-11-30  Pedro Alves  <palves@redhat.com>
31
32         * linux-low.c (thread_still_has_status_pending_p): Don't check
33         vCont;t here.
34         (lwp_resumed): New function.
35         (status_pending_p_callback): Return early if the LWP is not
36         supposed to be resumed.
37
38 2015-11-30  Pedro Alves  <palves@redhat.com>
39
40         * linux-low.c (handle_extended_wait): Assert that the LWP's
41         waitstatus is TARGET_WAITKIND_IGNORE.  If GDB wants to hear about
42         thread create events, leave the new child's status pending.
43         (linux_low_filter_event): If GDB wants to hear about thread exit
44         events, leave the LWP marked dead and don't delete it.
45         (linux_wait_for_event_filtered): Don't check for thread exit.
46         (filter_exit_event): New function.
47         (linux_wait_1): Use it, when returning an exit event.
48         (linux_resume_one_lwp_throw): Assert that the LWP's
49         waitstatus is TARGET_WAITKIND_IGNORE.
50         * remote-utils.c (prepare_resume_reply): Handle
51         TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
52         * server.c (report_thread_events): New global.
53         (handle_general_set): Handle QThreadEvents.
54         (handle_query) <qSupported>: Handle and report QThreadEvents+;
55         (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
56         TARGET_WAITKIND_THREAD_EXITED.
57         * server.h (report_thread_events): Declare.
58
59 2015-11-30  Pedro Alves  <palves@redhat.com>
60
61         * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
62         the thread's last_resume_kind was resume_stop.
63
64 2015-11-30  Pedro Alves  <palves@redhat.com>
65
66         * linux-low.c (linux_attach): In non-stop mode, wait for one stop
67         before returning.
68
69 2015-11-30  Pedro Alves  <palves@redhat.com>
70
71         * server.c (handle_v_requests): Handle vCtrlC.
72
73 2015-11-30  Pedro Alves  <palves@redhat.com>
74
75         * gdbthread.h (find_any_thread_of_pid): Declare.
76         * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
77         functions.
78         * server.c (handle_query): If current_thread is NULL, look for
79         another thread of the selected process.
80
81 2015-11-26  Daniel Colascione  <dancol@dancol.org>
82             Simon Marchi  <simon.marchi@ericsson.com>
83
84         * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
85         * server.c (handle_qxfer_threads_worker): Refactor to include thread
86         name in reply.
87         * target.h (struct target_ops) <thread_name>: New field.
88         (target_thread_name): New macro.
89
90 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
91
92         * regcache.h (regcache_invalidate_pid): Add declaration.
93         * regcache.c (regcache_invalidate_pid): New function, extracted
94         from regcache_invalidate.
95         (regcache_invalidate): Reimplement using regcache_invalidate_pid.
96         Add trivial documentation comment.
97         * lynx-low.c: Use regcache_invalidate_pid instead of
98         regcache_invalidate.
99
100 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
101
102         * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
103         and Elf64_auxv_t if the target is Android.
104
105 2015-11-22  Doug Evans  <xdje42@gmail.com>
106
107         * target.h: #include <sys/types.h>.
108
109 2015-11-19  Pedro Alves  <palves@redhat.com>
110
111         * linux-low.c (linux_process_qsupported): Change prototype.
112         Adjust.
113         * linux-low.h (struct linux_target_ops) <process_qsupported>:
114         Change prototype.
115         * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
116         and adjust to loop over all features.
117         * server.c (handle_query) <qSupported>: Adjust to call
118         target_process_qsupported once, passing it a vector of unprocessed
119         features.
120         * target.h (struct target_ops) <process_qsupported>: Change
121         prototype.
122         (target_process_qsupported): Adjust.
123
124 2015-11-19  Pedro Alves  <palves@redhat.com>
125
126         * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
127         mode.
128         * configure: Regenerate.
129
130 2015-11-19  Pedro Alves  <palves@redhat.com>
131
132         * configure: Regenerate.
133
134 2015-11-19  Yao Qi  <yao.qi@linaro.org>
135
136         * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
137         type to uint32_t.
138
139 2015-11-19  Yao Qi  <yao.qi@linaro.org>
140
141         * linux-aarch64-low.c (enum aarch64_operand_type): New.
142         (struct aarch64_operand): Move enum out.
143
144 2015-11-19  Yao Qi  <yao.qi@linaro.org>
145
146         * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
147         struct user_fpsimd_state *.
148         (aarch64_store_fpregset): Likewise.
149
150 2015-11-19  Yao Qi  <yao.qi@linaro.org>
151
152         * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
153         struct user_pt_regs *.
154         (aarch64_store_gregset): Likewise.
155
156 2015-11-18  Pedro Alves  <palves@redhat.com>
157
158         * Makefile.in (all_object_files): Add $IPA_OBJS.
159
160 2015-11-17  Pedro Alves  <palves@redhat.com>
161
162         * win32-low.c (win32_resume): Use gdb_signal_from_host,
163         GDB_SIGNAL_0 and gdb_signal_to_string.
164
165 2015-11-17  Pedro Alves  <palves@redhat.com>
166
167         * win32-low.c (handle_output_debug_string): Remove parameter.
168         (win32_kill): Remove our_status local and adjust call to
169         handle_output_debug_string.
170         (get_child_debug_event): Adjust call to
171         handle_output_debug_string.
172
173 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
174
175         * linux-mips-low.c (mips_fill_gregset): Add cast.
176         (mips_store_gregset): Likewise.
177         (mips_fill_fpregset): Likewise.
178         (mips_store_fpregset): Likewise.
179
180 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
181
182         * linux-mips-low.c (mips_add_watchpoint): Rename private to
183         priv.
184
185 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
186
187         * linux-mips-low.c (mips_linux_new_thread): Change type of
188         watch_type to enum target_hw_bp_type.
189
190 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
191
192                 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
193                 Change return type to arm_hwbp_type.
194
195 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
196
197         * linux-aarch32-low.c (arm_fill_gregset): Add cast.
198         (arm_store_gregset): Likewise.
199         * linux-arm-low.c (arm_get_hwcap): Likewise.
200         (arm_read_description): Likewise.
201
202 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
203
204         * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
205
206 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
207
208         * linux-ppc-low.c (ppc_get_hwcap): Add cast.
209         (ppc_fill_vsxregset): Likewise.
210         (ppc_store_vsxregset): Likewise.
211         (ppc_fill_vrregset): Likewise.
212         (ppc_store_vrregset): Likewise.
213         (ppc_fill_evrregset): Likewise.
214         (ppc_store_evrregset): Likewise.
215
216 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
217
218         * linux-ppc-low.c (ppc_usrregs_info): Remove
219         forward-declaration.
220         (ppc_arch_setup): Move lower in file.
221
222 2015-10-30  Simon Marchi  <simon.marchi@ericsson.com>
223
224         * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
225         (ps_pdwrite): Likewise.
226
227 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
228
229         * linux-arm-low.c (arm_new_thread): Move pointer dereference
230         to after assert checks.
231
232 2015-10-29  Simon Marchi  <simon.marchi@ericsson.com>
233
234         * proc-service.c (ps_pdread): Add/adjust casts.
235         (ps_pdwrite): Add/adjust casts.
236
237 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
238
239         * server.c (handle_search_memory_1): Cast return value of
240         memmem.
241
242 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
243
244         * server.c (write_qxfer_response): Change type of data to
245         gdb_byte *.
246
247 2015-10-29  Pedro Alves  <palves@redhat.com>
248
249         * mem-break.c (Z_packet_to_bkpt_type): Add cast.
250
251 2015-10-29  Pedro Alves  <palves@redhat.com>
252
253         * tracepoint.c (clear_installed_tracepoints): Add casts.
254
255 2015-10-29  Pedro Alves  <palves@redhat.com>
256
257         * server.c (handle_v_cont, process_serial_event): Add enum
258         gdb_signal casts to signal parsing code.
259
260 2015-10-29  Pedro Alves  <palves@redhat.com>
261
262         * linux-low.h (NULL_REGSET): Define.
263         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
264         * linux-arm-low.c (arm_regsets): Likewise.
265         * linux-crisv32-low.c (cris_regsets): Likewise.
266         * linux-m68k-low.c (m68k_regsets): Likewise.
267         * linux-mips-low.c (mips_regsets): Likewise.
268         * linux-nios2-low.c (nios2_regsets): Likewise.
269         * linux-ppc-low.c (ppc_regsets): Likewise.
270         * linux-s390-low.c (s390_regsets): Likewise.
271         * linux-sh-low.c (sh_regsets): Likewise.
272         * linux-sparc-low.c (sparc_regsets): Likewise.
273         * linux-tic6x-low.c (tic6x_regsets): Likewise.
274         * linux-tile-low.c (tile_regsets): Likewise.
275         * linux-x86-low.c (x86_regsets): Likewise.
276         * linux-xtensa-low.c (xtensa_regsets): Likewise.
277
278 2015-10-29  Pedro Alves  <palves@redhat.com>
279
280         * linux-low.h (NULL_REGSET): Define.
281         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
282         * linux-arm-low.c (arm_regsets): Likewise.
283         * linux-crisv32-low.c (cris_regsets): Likewise.
284         * linux-m68k-low.c (m68k_regsets): Likewise.
285         * linux-mips-low.c (mips_regsets): Likewise.
286         * linux-nios2-low.c (nios2_regsets): Likewise.
287         * linux-ppc-low.c (ppc_regsets): Likewise.
288         * linux-s390-low.c (s390_regsets): Likewise.
289         * linux-sh-low.c (sh_regsets): Likewise.
290         * linux-sparc-low.c (sparc_regsets): Likewise.
291         * linux-tic6x-low.c (tic6x_regsets): Likewise.
292         * linux-tile-low.c (tile_regsets): Likewise.
293         * linux-x86-low.c (x86_regsets): Likewise.
294         * linux-xtensa-low.c (xtensa_regsets): Likewise.
295
296 2015-10-26  Doug Evans  <dje@google.com>
297
298         * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
299
300 2015-10-26  Doug Evans  <dje@google.com>
301
302         * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
303
304 2015-10-26  Doug Evans  <dje@google.com>
305
306         * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
307         for debug_printf.
308         (attach_thread, find_new_threads_callback): Ditto.
309
310 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
311
312         * mem-break.h (set_breakpoint_data): Remove.
313
314 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
315
316         * nto-low.c (nto_sw_breakpoint_from_kind): New function.
317         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
318         (initialize_low): Remove set_breakpoint_data call.
319         * spu-low.c (spu_sw_breakpoint_from_kind): New function.
320         (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
321         (initialize_low): Remove set_breakpoint_data call.
322         * win32-low.c (win32_sw_breakpoint_from_kind): New function.
323         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
324         (initialize_low): Remove set_breakpoint_data call.
325
326 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
327
328         * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
329         * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
330         * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
331         * target.h (target_breakpoint_kind_from_pc): New macro.
332
333 2015-10-22  Antoine Tremblay  <antoine.tremblay@ericsson.com>
334
335         * linux-low.c (default_breakpoint_kind_from_pc): New function.
336         (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
337         the default breakpoint kind.
338
339 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
340
341         * linux-arm-low.c (arm_supports_z_point_type): Add software
342         breakpoint support.
343
344 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
345
346         * linux-arm-low.c: Refactor breakpoint definitions.
347         (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
348         (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
349
350 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
351
352         * Makefile.in: Add arm.c/o.
353         * configure.srv: Likewise.
354         * linux-arm-low.c (arm_breakpoint_kinds): New enum.
355         (arm_breakpoint_kind_from_pc): New function.
356         (arm_sw_breakpoint_from_kind): Return proper kind.
357         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
358
359 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
360
361         * linux-low.c (initialize_low): Ajdust for breakpoint global variables
362         removal.
363         * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
364         (struct raw_breakpoint) <size>: Remove.
365         (struct raw_breakpoint) <kind>: Add.
366         (bp_size): New function.
367         (bp_opcode): Likewise.
368         (find_raw_breakpoint_at): Adjust for kind.
369         (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
370         (remove_memory_breakpoint): Adjust for kind call bp_size.
371         (set_raw_breakpoint_at): Adjust for kind.
372         (set_breakpoint): Likewise.
373         (set_breakpoint_at): Call breakpoint_kind_from_pc.
374         (delete_raw_breakpoint): Adjust for kind.
375         (delete_breakpoint): Likewise.
376         (find_gdb_breakpoint): Likewise.
377         (set_gdb_breakpoint_1): Likewise.
378         (set_gdb_breakpoint): Likewise.
379         (delete_gdb_breakpoint_1): Likewise.
380         (delete_gdb_breakpoint): Likewise.
381         (uninsert_raw_breakpoint): Likewise.
382         (reinsert_raw_breakpoint): Likewise.
383         (set_breakpoint_data): Remove.
384         (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
385         (check_mem_read): Adjust for kind call bp_size.
386         (check_mem_write): Adjust for kind call bp_size,bp_opcode.
387         (clone_one_breakpoint): Adjust for kind.
388         * mem-break.h (set_gdb_breakpoint): Likewise.
389         (delete_gdb_breakpoint): Likewise.
390         * server.c (process_serial_event): Likewise.
391
392 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
393
394         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
395         (struct linux_target_ops) <breakpoint>: Remove.
396         (struct linux_target_ops) <breakpoint_len>: Remove.
397         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
398         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
399         * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
400         (arm_sw_breakpoint_from_kind): New function.
401         * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
402         (struct linux_target_ops) <breakpoint>: Remove.
403         (struct linux_target_ops) <breakpoint_len>: Remove.
404         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
405         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
406         * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
407         (struct linux_target_ops) <breakpoint>: Remove.
408         (struct linux_target_ops) <breakpoint_len>: Remove.
409         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
410         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
411         * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
412         (struct linux_target_ops) <breakpoint>: Remove.
413         (struct linux_target_ops) <breakpoint_len>: Remove.
414         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
415         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
416         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
417         and sw_breakpoint_from_kind to increment the pc.
418         (linux_breakpoint_kind_from_pc): New function.
419         (linux_sw_breakpoint_from_kind): New function.
420         (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
421         (initialize_low): Call breakpoint_kind_from_pc and
422         sw_breakpoint_from_kind to replace breakpoint_data/len.
423         * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
424         New field.
425         (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
426         * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
427         (struct linux_target_ops) <breakpoint>: Remove.
428         (struct linux_target_ops) <breakpoint_len>: Remove.
429         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
430         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
431         * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
432         (struct linux_target_ops) <breakpoint>: Remove.
433         (struct linux_target_ops) <breakpoint_len>: Remove.
434         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
435         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
436         * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
437         (struct linux_target_ops) <breakpoint>: Remove.
438         (struct linux_target_ops) <breakpoint_len>: Remove.
439         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
440         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
441         * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
442         (struct linux_target_ops) <breakpoint>: Remove.
443         (struct linux_target_ops) <breakpoint_len>: Remove.
444         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
445         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
446         * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
447         (struct linux_target_ops) <breakpoint>: Remove.
448         (struct linux_target_ops) <breakpoint_len>: Remove.
449         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
450         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
451         * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
452         (struct linux_target_ops) <breakpoint>: Remove.
453         (struct linux_target_ops) <breakpoint_len>: Remove.
454         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
455         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
456         * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
457         (struct linux_target_ops) <breakpoint>: Remove.
458         (struct linux_target_ops) <breakpoint_len>: Remove.
459         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
460         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
461         * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
462         (struct linux_target_ops) <breakpoint>: Remove.
463         (struct linux_target_ops) <breakpoint_len>: Remove.
464         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
465         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
466         * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
467         (struct linux_target_ops) <breakpoint>: Remove.
468         (struct linux_target_ops) <breakpoint_len>: Remove.
469         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
470         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
471         * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
472         * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
473         (struct linux_target_ops) <breakpoint>: Remove.
474         (struct linux_target_ops) <breakpoint_len>: Remove.
475         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
476         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
477         * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
478         (struct linux_target_ops) <breakpoint>: Remove.
479         (struct linux_target_ops) <breakpoint_len>: Remove.
480         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
481         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
482
483 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
484
485         * linux-cris-low.c (cris_get_pc): Remove void arg.
486
487 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
488
489         * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
490         variable name.
491
492 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
493
494         * inferiors.c (thread_pid_matches_callback): New function.
495         (find_thread_process): New function.
496         (remove_thread): Reset current_thread.
497         (remove_process): Assert threads have been removed first.
498
499 2015-10-15  Yao Qi  <yao.qi@linaro.org>
500
501         * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
502         if it is 3.
503         (aarch64_remove_point): Likewise.
504         * regcache.c (regcache_register_size): New function.
505
506 2015-10-12  Yao Qi  <yao.qi@linaro.org>
507
508         * linux-aarch64-low.c: Update all callers as emit_load_store
509         is renamed to aarch64_emit_load_store.
510
511 2015-10-12  Yao Qi  <yao.qi@linaro.org>
512
513         * linux-aarch64-low.c: Update all callers of function renaming
514         from emit_insn to aarch64_emit_insn.
515
516 2015-10-12  Yao Qi  <yao.qi@linaro.org>
517
518         * linux-aarch64-low.c (enum aarch64_opcodes): Move to
519         arch/aarch64-insn.h.
520         (struct aarch64_memory_operand): Likewise.
521         (ENCODE): Likewise.
522         (emit_insn): Move to arch/aarch64-insn.c.
523         (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
524         (emit_load_store): Move to arch/aarch64-insn.c.
525         (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
526         (can_encode_int32): Remove.
527
528 2015-10-12  Yao Qi  <yao.qi@linaro.org>
529
530         * linux-aarch64-low.c (extract_signed_bitfield): Remove.
531         (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
532         (aarch64_relocate_instruction): Likewise.
533         (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
534         (struct aarch64_insn_visitor): Likewise.
535
536 2015-10-12  Yao Qi  <yao.qi@linaro.org>
537
538         * linux-aarch64-low.c (struct aarch64_insn_data): New.
539         (struct aarch64_insn_visitor): New.
540         (struct aarch64_insn_relocation_data): New.
541         (aarch64_ftrace_insn_reloc_b): New function.
542         (aarch64_ftrace_insn_reloc_b_cond): Likewise.
543         (aarch64_ftrace_insn_reloc_cb): Likewise.
544         (aarch64_ftrace_insn_reloc_tb): Likewise.
545         (aarch64_ftrace_insn_reloc_adr): Likewise.
546         (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
547         (aarch64_ftrace_insn_reloc_others): Likewise.
548         (visitor): New.
549         (aarch64_relocate_instruction): Use visitor.
550
551 2015-10-12  Yao Qi  <yao.qi@linaro.org>
552
553         * linux-aarch64-low.c (aarch64_relocate_instruction): Return
554         int.  Add argument buf.
555         (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
556         aarch64_relocate_instruction.
557
558 2015-10-12  Yao Qi  <yao.qi@linaro.org>
559
560         * linux-aarch64-low.c (aarch64_relocate_instruction): Add
561         argument insn.  Remove local variable insn.  Don't call
562         target_read_uint32.
563         (aarch64_install_fast_tracepoint_jump_pad): Call
564         target_read_uint32.
565
566 2015-09-30  Yao Qi  <yao.qi@linaro.org>
567
568         * linux-aarch64-low.c (emit_movk): Shorten a long line.
569         (emit_load_store_pair): Likewise.
570
571 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
572
573         * dll.c (match_dll): Add cast(s).
574         (unloaded_dll): Likewise.
575         * linux-low.c (second_thread_of_pid_p): Likewise.
576         (delete_lwp_callback): Likewise.
577         (count_events_callback): Likewise.
578         (select_event_lwp_callback): Likewise.
579         (linux_set_resume_request): Likewise.
580         * server.c (accumulate_file_name_length): Likewise.
581         (emit_dll_description): Likewise.
582         (handle_qxfer_threads_worker): Likewise.
583         (visit_actioned_threads): Likewise.
584         * thread-db.c (any_thread_of): Likewise.
585         * tracepoint.c (same_process_p): Likewise.
586         (match_blocktype): Likewise.
587         (build_traceframe_info_xml): Likewise.
588
589 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
590
591         * ax.c (gdb_parse_agent_expr): Add cast to allocation result
592         assignment.
593         (gdb_unparse_agent_expr): Likewise.
594         * hostio.c (require_data): Likewise.
595         (handle_pread): Likewise.
596         * linux-low.c (disable_regset): Likewise.
597         (fetch_register): Likewise.
598         (store_register): Likewise.
599         (get_dynamic): Likewise.
600         (linux_qxfer_libraries_svr4): Likewise.
601         * mem-break.c (delete_fast_tracepoint_jump): Likewise.
602         (set_fast_tracepoint_jump): Likewise.
603         (uninsert_fast_tracepoint_jumps_at): Likewise.
604         (reinsert_fast_tracepoint_jumps_at): Likewise.
605         (validate_inserted_breakpoint): Likewise.
606         (clone_agent_expr): Likewise.
607         * regcache.c (init_register_cache): Likewise.
608         * remote-utils.c (putpkt_binary_1): Likewise.
609         (decode_M_packet): Likewise.
610         (decode_X_packet): Likewise.
611         (look_up_one_symbol): Likewise.
612         (relocate_instruction): Likewise.
613         (monitor_output): Likewise.
614         * server.c (handle_search_memory): Likewise.
615         (handle_qxfer_exec_file): Likewise.
616         (handle_qxfer_libraries): Likewise.
617         (handle_qxfer): Likewise.
618         (handle_query): Likewise.
619         (handle_v_cont): Likewise.
620         (handle_v_run): Likewise.
621         (captured_main): Likewise.
622         * target.c (write_inferior_memory): Likewise.
623         * thread-db.c (try_thread_db_load_from_dir): Likewise.
624         * tracepoint.c (init_trace_buffer): Likewise.
625         (add_tracepoint_action): Likewise.
626         (add_traceframe): Likewise.
627         (add_traceframe_block): Likewise.
628         (cmd_qtdpsrc): Likewise.
629         (cmd_qtdv): Likewise.
630         (cmd_qtstatus): Likewise.
631         (response_source): Likewise.
632         (response_tsv): Likewise.
633         (cmd_qtnotes): Likewise.
634         (gdb_collect): Likewise.
635         (initialize_tracepoint): Likewise.
636
637 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
638
639         * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
640         (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
641         <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
642         <NOP>: New.
643         (enum aarch64_condition_codes): New enum.
644         (w0): New static global.
645         (fp): Likewise.
646         (lr): Likewise.
647         (struct aarch64_memory_operand) <type>: New
648         MEMORY_OPERAND_POSTINDEX type.
649         (postindex_memory_operand): New helper function.
650         (emit_ret): New function.
651         (emit_load_store_pair): New function, factored out of emit_stp
652         with support for MEMORY_OPERAND_POSTINDEX.
653         (emit_stp): Rewrite using emit_load_store_pair.
654         (emit_ldp): New function.
655         (emit_load_store): Likewise.
656         (emit_ldr): Mention post-index instruction in comment.
657         (emit_ldrh): New function.
658         (emit_ldrb): New function.
659         (emit_ldrsw): Mention post-index instruction in comment.
660         (emit_str): Likewise.
661         (emit_subs): New function.
662         (emit_cmp): Likewise.
663         (emit_and): Likewise.
664         (emit_orr): Likewise.
665         (emit_orn): Likewise.
666         (emit_eor): Likewise.
667         (emit_mvn): Likewise.
668         (emit_lslv): Likewise.
669         (emit_lsrv): Likewise.
670         (emit_asrv): Likewise.
671         (emit_mul): Likewise.
672         (emit_sbfm): Likewise.
673         (emit_sbfx): Likewise.
674         (emit_ubfm): Likewise.
675         (emit_ubfx): Likewise.
676         (emit_csinc): Likewise.
677         (emit_cset): Likewise.
678         (emit_nop): Likewise.
679         (emit_ops_insns): New helper function.
680         (emit_pop): Likewise.
681         (emit_push): Likewise.
682         (aarch64_emit_prologue): New function.
683         (aarch64_emit_epilogue): Likewise.
684         (aarch64_emit_add): Likewise.
685         (aarch64_emit_sub): Likewise.
686         (aarch64_emit_mul): Likewise.
687         (aarch64_emit_lsh): Likewise.
688         (aarch64_emit_rsh_signed): Likewise.
689         (aarch64_emit_rsh_unsigned): Likewise.
690         (aarch64_emit_ext): Likewise.
691         (aarch64_emit_log_not): Likewise.
692         (aarch64_emit_bit_and): Likewise.
693         (aarch64_emit_bit_or): Likewise.
694         (aarch64_emit_bit_xor): Likewise.
695         (aarch64_emit_bit_not): Likewise.
696         (aarch64_emit_equal): Likewise.
697         (aarch64_emit_less_signed): Likewise.
698         (aarch64_emit_less_unsigned): Likewise.
699         (aarch64_emit_ref): Likewise.
700         (aarch64_emit_if_goto): Likewise.
701         (aarch64_emit_goto): Likewise.
702         (aarch64_write_goto_address): Likewise.
703         (aarch64_emit_const): Likewise.
704         (aarch64_emit_call): Likewise.
705         (aarch64_emit_reg): Likewise.
706         (aarch64_emit_pop): Likewise.
707         (aarch64_emit_stack_flush): Likewise.
708         (aarch64_emit_zero_ext): Likewise.
709         (aarch64_emit_swap): Likewise.
710         (aarch64_emit_stack_adjust): Likewise.
711         (aarch64_emit_int_call_1): Likewise.
712         (aarch64_emit_void_call_2): Likewise.
713         (aarch64_emit_eq_goto): Likewise.
714         (aarch64_emit_ne_goto): Likewise.
715         (aarch64_emit_lt_goto): Likewise.
716         (aarch64_emit_le_goto): Likewise.
717         (aarch64_emit_gt_goto): Likewise.
718         (aarch64_emit_ge_got): Likewise.
719         (aarch64_emit_ops_impl): New static global variable.
720         (aarch64_emit_ops): New target function, return
721         &aarch64_emit_ops_impl.
722         (struct linux_target_ops): Install it.
723
724 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
725
726         * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
727         * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
728         aarch64-ipa.o.
729         * linux-aarch64-ipa.c: New file.
730         * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
731         and endian.h.
732         (aarch64_get_thread_area): New target method.
733         (extract_signed_bitfield): New helper function.
734         (aarch64_decode_ldr_literal): New function.
735         (enum aarch64_opcodes): New enum.
736         (struct aarch64_register): New struct.
737         (struct aarch64_operand): New struct.
738         (x0): New static global.
739         (x1): Likewise.
740         (x2): Likewise.
741         (x3): Likewise.
742         (x4): Likewise.
743         (w2): Likewise.
744         (ip0): Likewise.
745         (sp): Likewise.
746         (xzr): Likewise.
747         (aarch64_register): New helper function.
748         (register_operand): Likewise.
749         (immediate_operand): Likewise.
750         (struct aarch64_memory_operand): New struct.
751         (offset_memory_operand): New helper function.
752         (preindex_memory_operand): Likewise.
753         (enum aarch64_system_control_registers): New enum.
754         (ENCODE): New macro.
755         (emit_insn): New helper function.
756         (emit_b): New function.
757         (emit_bcond): Likewise.
758         (emit_cb): Likewise.
759         (emit_tb): Likewise.
760         (emit_blr): Likewise.
761         (emit_stp): Likewise.
762         (emit_ldp_q_offset): Likewise.
763         (emit_stp_q_offset): Likewise.
764         (emit_load_store): Likewise.
765         (emit_ldr): Likewise.
766         (emit_ldrsw): Likewise.
767         (emit_str): Likewise.
768         (emit_ldaxr): Likewise.
769         (emit_stxr): Likewise.
770         (emit_stlr): Likewise.
771         (emit_data_processing_reg): Likewise.
772         (emit_data_processing): Likewise.
773         (emit_add): Likewise.
774         (emit_sub): Likewise.
775         (emit_mov): Likewise.
776         (emit_movk): Likewise.
777         (emit_mov_addr): Likewise.
778         (emit_mrs): Likewise.
779         (emit_msr): Likewise.
780         (emit_sevl): Likewise.
781         (emit_wfe): Likewise.
782         (append_insns): Likewise.
783         (can_encode_int32_in): New helper function.
784         (aarch64_relocate_instruction): New function.
785         (aarch64_install_fast_tracepoint_jump_pad): Likewise.
786         (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
787         (struct linux_target_ops): Install aarch64_get_thread_area,
788         aarch64_install_fast_tracepoint_jump_pad and
789         aarch64_get_min_fast_tracepoint_insn_len.
790
791 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
792
793         * Makefile.in (aarch64-insn.o): New rule.
794         * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
795
796 2015-09-21  Yao Qi  <yao.qi@linaro.org>
797
798         * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
799
800 2015-09-21  Yao Qi  <yao.qi@linaro.org>
801
802         * tracepoint.c (max_jump_pad_size): Remove.
803
804 2015-09-18  Yao Qi  <yao.qi@linaro.org>
805
806         * linux-aarch64-low.c: Don't include sys/uio.h.
807         (ps_get_thread_area): Call aarch64_ps_get_thread_area.
808
809 2015-09-16  Wei-cheng Wang  <cole945@gmail.com>
810
811         * tracepoint.c (eval_result_type): Change prototype.
812         (condition_true_at_tracepoint): Fix argument to compiled_cond.
813
814 2015-09-15  Pedro Alves  <palves@redhat.com>
815
816         * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
817         Check whether to report exec events instead of checking whether
818         multiprocess is enabled.
819
820 2015-09-15  Pedro Alves  <palves@redhat.com>
821
822         PR remote/18965
823         * remote-utils.c (prepare_resume_reply): Merge
824         TARGET_WAITKIND_VFORK_DONE switch case with the
825         TARGET_WAITKIND_FORKED case.
826
827 2015-09-15  Yao Qi  <yao.qi@linaro.org>
828
829         * server.c (handle_query): Check string comparison using
830         "else if" instead of "if".
831
832 2015-09-15  Yao Qi  <yao.qi@linaro.org>
833
834         * server.c (vCont_supported): New global variable.
835         (handle_query): Set vCont_supported to 1 if "vContSupported+"
836         matches.  Append ";vContSupported+" to own_buf.
837         (handle_v_requests): Append ";s;S" to own_buf if target supports
838         hardware single step or vCont_supported is false.
839         (capture_main): Set vCont_supported to zero.
840
841 2015-09-15  Yao Qi  <yao.qi@linaro.org>
842
843         * linux-low.c (linux_supports_conditional_breakpoints): Rename
844         it to ...
845         (linux_supports_hardware_single_step): ... New function.
846         (linux_target_ops): Update.
847         * lynx-low.c (lynx_target_ops): Set field
848         supports_hardware_single_step to target_can_do_hardware_single_step.
849         * nto-low.c (nto_target_ops): Likewise.
850         * spu-low.c (spu_target_ops): Likewise.
851         * win32-low.c (win32_target_ops): Likewise.
852         * target.c (target_can_do_hardware_single_step): New function.
853         * target.h (struct target_ops) <supports_conditional_breakpoints>:
854         Remove.  <supports_hardware_single_step>: New field.
855         (target_supports_conditional_breakpoints): Remove.
856         (target_supports_hardware_single_step): New macro.
857         (target_can_do_hardware_single_step): Declare.
858         * server.c (handle_query): Use target_supports_hardware_single_step
859         instead of target_supports_conditional_breakpoints.
860
861 2015-09-15  Yao Qi  <yao.qi@linaro.org>
862
863         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
864         function.
865         (struct linux_target_ops the_low_target): Install
866         aarch64_linux_siginfo_fixup.
867
868 2015-09-11  Don Breazeal  <donb@codesourcery.com>
869             Luis Machado  <lgustavo@codesourcery.com>
870
871         * linux-low.c (linux_mourn): Static declaration.
872         (linux_arch_setup): Move in front of
873         handle_extended_wait.
874         (linux_arch_setup_thread): New function.
875         (handle_extended_wait): Handle exec events.  Call
876         linux_arch_setup_thread.  Make event_lwp argument a
877         pointer-to-a-pointer.
878         (check_zombie_leaders): Do not check stopped threads.
879         (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
880         (linux_low_filter_event): Add lwp and thread for exec'ing
881         non-leader thread if leader thread has been deleted.
882         Refactor code into linux_arch_setup_thread and call it.
883         Pass child lwp pointer by reference to handle_extended_wait.
884         (linux_wait_for_event_filtered): Update comment.
885         (linux_wait_1): Prevent clobbering exec event status.
886         (linux_supports_exec_events): New function.
887         (linux_target_ops) <supports_exec_events>: Initialize new member.
888         * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
889         new member.
890         * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
891         * server.c (report_exec_events): New global variable.
892         (handle_query): Handle qSupported query for exec-events feature.
893         (captured_main): Initialize report_exec_events.
894         * server.h (report_exec_events): Declare new global variable.
895         * target.h (struct target_ops) <supports_exec_events>: New
896         member.
897         (target_supports_exec_events): New macro.
898         * win32-low.c (win32_target_ops) <supports_exec_events>:
899         Initialize new member.
900
901 2015-09-09  Markus Metzger  <markus.t.metzger@intel.com>
902
903         * linux-low.c (linux_low_enable_btrace): Remove.
904         (linux_target_ops): Replace linux_low_enable_btrace with
905         linux_enable_btrace.
906
907 2015-09-03  Yao Qi  <yao.qi@linaro.org>
908
909         * linux-aarch64-low.c (aarch64_insert_point): Call
910         aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
911         returns true.
912
913 2015-08-27  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
914
915         * linux-low.c (check_stopped_by_breakpoint): Use
916         GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
917
918 2015-08-27  Pedro Alves  <palves@redhat.com>
919
920         * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
921
922 2015-08-26  Simon Marchi  <simon.marchi@ericsson.com>
923
924         * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
925         the XNEW-family equivalent.
926         (compile_bytecodes): Likewise.
927         * dll.c (loaded_dll): Likewise.
928         * event-loop.c (append_callback_event): Likewise.
929         (create_file_handler): Likewise.
930         (create_file_event): Likewise.
931         * hostio.c (handle_open): Likewise.
932         * inferiors.c (add_thread): Likewise.
933         (add_process): Likewise.
934         * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
935         * linux-arm-low.c (arm_new_process): Likewise.
936         (arm_new_thread): Likewise.
937         * linux-low.c (add_to_pid_list): Likewise.
938         (linux_add_process): Likewise.
939         (handle_extended_wait): Likewise.
940         (add_lwp): Likewise.
941         (enqueue_one_deferred_signal): Likewise.
942         (enqueue_pending_signal): Likewise.
943         (linux_resume_one_lwp_throw): Likewise.
944         (linux_resume_one_thread): Likewise.
945         (linux_read_memory): Likewise.
946         (linux_write_memory): Likewise.
947         * linux-mips-low.c (mips_linux_new_process): Likewise.
948         (mips_linux_new_thread): Likewise.
949         (mips_add_watchpoint): Likewise.
950         * linux-x86-low.c (initialize_low_arch): Likewise.
951         * lynx-low.c (lynx_add_process): Likewise.
952         * mem-break.c (set_raw_breakpoint_at): Likewise.
953         (set_breakpoint): Likewise.
954         (add_condition_to_breakpoint): Likewise.
955         (add_commands_to_breakpoint): Likewise.
956         (clone_agent_expr): Likewise.
957         (clone_one_breakpoint): Likewise.
958         * regcache.c (new_register_cache): Likewise.
959         * remote-utils.c (look_up_one_symbol): Likewise.
960         * server.c (queue_stop_reply): Likewise.
961         (start_inferior): Likewise.
962         (queue_stop_reply_callback): Likewise.
963         (handle_target_event): Likewise.
964         * spu-low.c (fetch_ppc_memory): Likewise.
965         (store_ppc_memory): Likewise.
966         * target.c (set_target_ops): Likewise.
967         * thread-db.c (thread_db_load_search): Likewise.
968         (try_thread_db_load_1): Likewise.
969         * tracepoint.c (add_tracepoint): Likewise.
970         (add_tracepoint_action): Likewise.
971         (create_trace_state_variable): Likewise.
972         (cmd_qtdpsrc): Likewise.
973         (cmd_qtro): Likewise.
974         (add_while_stepping_state): Likewise.
975         * win32-low.c (child_add_thread): Likewise.
976         (get_image_name): Likewise.
977
978 2015-08-25  Yao Qi  <yao.qi@linaro.org>
979
980         * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
981
982 2015-08-25  Yao Qi  <yao.qi@linaro.org>
983
984         * Makefile.in (aarch64-linux.o): New rule.
985         * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
986         srv_tgtobj.
987         * linux-aarch64-low.c: Include nat/aarch64-linux.h.
988         (aarch64_init_debug_reg_state): Make it extern.
989         (aarch64_linux_prepare_to_resume): Remove.
990
991 2015-08-25  Yao Qi  <yao.qi@linaro.org>
992
993         * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
994         lwp_arch_private_info and ptid_of_lwp.
995
996 2015-08-25  Yao Qi  <yao.qi@linaro.org>
997
998         * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
999         Find proc_info by find_process_pid.  All callers updated.
1000
1001 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1002
1003         * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
1004         Remove.
1005         (debug_reg_change_callback): Remove.
1006         (aarch64_notify_debug_reg_change): Remove.
1007
1008 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1009
1010         * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
1011         Call current_lwp_ptid.
1012
1013 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1014
1015         * linux-aarch64-low.c (debug_reg_change_callback): Use
1016         debug_printf.
1017
1018 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1019
1020         * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
1021
1022 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1023
1024         * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
1025
1026 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1027
1028         * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
1029         the code.
1030
1031 2015-08-25  Yao Qi  <yao.qi@linaro.org>
1032
1033         * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
1034         Remove.
1035         (debug_reg_change_callback): Remove argument entry and add argument
1036         lwp.  Remove local variable thread.  Don't print thread id in the
1037         debugging output.  Don't check whether pid of thread equals to pid.
1038         (aarch64_notify_debug_reg_change): Don't set param.pid.  Call
1039         iterate_over_lwps instead find_inferior.
1040
1041 2015-08-24  Pedro Alves  <palves@redhat.com>
1042
1043         * inferiors.c (get_first_process): New function.
1044         * inferiors.h (get_first_process): New declaration.
1045         * remote-utils.c (read_ptid): Default to the first process in the
1046         list, instead of to the current thread's process.
1047
1048 2015-08-24  Pedro Alves  <palves@redhat.com>
1049
1050         * debug.c: Include gdb_sys_time.h instead of sys/time.h.
1051         * event-loop.c: Likewise.
1052         * remote-utils.c: Likewise.
1053         * tracepoint.c: Likewise.
1054
1055 2015-08-24  Pedro Alves  <palves@redhat.com>
1056
1057         * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
1058         ptid_get_lwp.
1059
1060 2015-08-21  Pedro Alves  <palves@redhat.com>
1061
1062         * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
1063         instead of literal 1.
1064
1065 2015-08-21  Pedro Alves  <palves@redhat.com>
1066
1067         * tdesc.c (default_description): Explicitly zero-initialize.
1068
1069 2015-08-21  Pedro Alves  <palves@redhat.com>
1070
1071         PR gdb/18749
1072         * inferiors.c (remove_thread): Discard any pending stop reply for
1073         this thread.
1074         * server.c (remove_all_on_match_pid): Rename to ...
1075         (remove_all_on_match_ptid): ... this.  Work with a filter ptid
1076         instead of a pid.
1077         (discard_queued_stop_replies): Change parameter to a ptid.  Now
1078         extern.
1079         (handle_v_kill, kill_inferior_callback, captured_main)
1080         (process_serial_event): Adjust.
1081         * server.h (discard_queued_stop_replies): Declare.
1082
1083 2015-08-21  Pedro Alves  <palves@redhat.com>
1084
1085         * linux-low.c (wait_for_sigstop): Always switch to no thread
1086         selected if the previously current thread dies.
1087         * lynx-low.c (lynx_request_interrupt): Use the first thread's
1088         process instead of the current thread's.
1089         * remote-utils.c (input_interrupt): Don't check if there's no
1090         current thread.
1091         * server.c (gdb_read_memory, gdb_write_memory): If setting the
1092         current thread to the general thread fails, error out.
1093         (handle_qxfer_auxv, handle_qxfer_libraries)
1094         (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
1095         (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
1096         (handle_query): Check if there's a thread selected instead of
1097         checking whether there's any thread in the thread list.
1098         (handle_qxfer_threads, handle_qxfer_btrace)
1099         (handle_qxfer_btrace_conf): Don't error out early if there's no
1100         thread in the thread list.
1101         (handle_v_cont, myresume): Don't set the current thread to the
1102         continue thread.
1103         (process_serial_event) <Hg handling>: Also set thread_id if the
1104         previous general thread is still alive.
1105         (process_serial_event) <g/G handling>: If setting the current
1106         thread to the general thread fails, error out.
1107         * spu-low.c (spu_resume, spu_request_interrupt): Use the first
1108         thread's lwp instead of the current thread's.
1109         * target.c (set_desired_thread): If the desired thread was not
1110         found, leave the current thread pointing to NULL.  Return an int
1111         (boolean) indicating success.
1112         * target.h (set_desired_thread): Change return type to int.
1113
1114 2015-08-20  Max Filippov  <jcmvbkbc@gmail.com>
1115
1116         * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
1117         * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
1118         #includes.
1119         (ps_get_thread_area): New function.
1120
1121 2015-08-19  Gary Benson  <gbenson@redhat.com>
1122
1123         * hostio.c (handle_pread): Do not attempt to read more data
1124         than hostio_reply_with_data can fit in a packet.
1125
1126 2015-08-18  Joel Brobecker  <brobecker@adacore.com>
1127
1128         * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1129
1130 2015-08-14  Matthew Fortune  <matthew.fortune@imgtec.com>
1131
1132         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1133
1134 2015-08-06  Pedro Alves  <palves@redhat.com>
1135
1136         * tracepoint.c (expr_eval_result): Now an int.
1137
1138 2015-08-06  Pedro Alves  <palves@redhat.com>
1139
1140         * gdbthread.h (struct regcache): Forward declare.
1141         (struct thread_info) <regcache_data>: Now a struct regcache
1142         pointer.
1143         * inferiors.c (inferior_regcache_data)
1144         (set_inferior_regcache_data): Now work with struct regcache
1145         pointers.
1146         * inferiors.h (struct regcache): Forward declare.
1147         (inferior_regcache_data, set_inferior_regcache_data): Now work
1148         with struct regcache pointers.
1149         * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1150         (free_register_cache_thread): Remove struct regcache pointer
1151         casts.
1152
1153 2015-08-06  Pedro Alves  <palves@redhat.com>
1154
1155         * server.c (captured_main): On error, print the exception message
1156         to stderr, and if run_once is set, throw a quit.
1157
1158 2015-08-06  Pedro Alves  <palves@redhat.com>
1159
1160         * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1161         the current thread.
1162
1163 2015-08-06  Pedro Alves  <palves@redhat.com>
1164
1165         * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1166         reading beyond the passed in buffer length.
1167
1168 2015-08-06  Pierre Langlois  <pierre.langlois@arm.com>
1169
1170         * tracepoint.c (symbol_list) <required>: Remove.
1171
1172 2015-08-06  Pedro Alves  <palves@redhat.com>
1173
1174         * linux-low.c (handle_extended_wait): Set the fork child's suspend
1175         count if stopping and suspending threads.
1176         (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1177         stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1178         (linux_detach): Complete an ongoing step-over.
1179         (lwp_suspended_inc, lwp_suspended_decr): New functions.  Use
1180         throughout.
1181         (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1182         (linux_wait_1): If passing a signal to the inferior after
1183         finishing a step-over, unsuspend and re-resume all lwps.  If we
1184         see a single-step event but the thread should be continuing, don't
1185         pass the trap to gdb.
1186         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1187         internal_error instead of gdb_assert.
1188         (enqueue_pending_signal): New function.
1189         (check_ptrace_stopped_lwp_gone): Add debug output.
1190         (start_step_over): Use internal_error instead of gdb_assert.
1191         (complete_ongoing_step_over): New function.
1192         (linux_resume_one_thread): Don't resume a suspended thread.
1193         (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1194         it stepping.
1195
1196 2015-08-06  Pedro Alves  <palves@redhat.com>
1197
1198         * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1199         (linux_thread_alive): Use lwp_is_marked_dead.
1200         (extended_event_reported): Delete.
1201         (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1202         instead of extended_event_reported.
1203         (mark_lwp_dead): Don't set the 'dead' flag.  Store the waitstatus
1204         as well.
1205         (lwp_is_marked_dead): New function.
1206         (lwp_running): Use lwp_is_marked_dead.
1207         * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1208         comment.
1209
1210 2015-08-06  Pedro Alves  <palves@redhat.com>
1211
1212         * linux-low.c (linux_wait_1): Move fork event output out of the
1213         !report_to_gdb check.  Pass event_child->waitstatus to
1214         target_waitstatus_to_string instead of ourstatus.
1215
1216 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1217
1218         * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1219         if current_thread is 32 bit.
1220
1221 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1222
1223         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1224         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1225         * server.c (extended_protocol): Remove "static".
1226         * server.h (extended_protocol): Declare it.
1227
1228 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1229
1230         * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1231         both aarch64 and aarch32.
1232         (aarch64_set_pc): Likewise.
1233
1234 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1235
1236         * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1237         to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1238         arm-with-neon.xml to srv_xmlfiles.
1239         * linux-aarch64-low.c: Include linux-aarch32-low.h.
1240         (is_64bit_tdesc): New function.
1241         (aarch64_linux_read_description): New function.
1242         (aarch64_arch_setup): Call aarch64_linux_read_description.
1243         (regs_info): Rename to regs_info_aarch64.
1244         (aarch64_regs_info): Return right regs_info.
1245         (initialize_low_arch): Call initialize_low_arch_aarch32.
1246
1247 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1248
1249         * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1250         * linux-aarch32-low.c: New file.
1251         * linux-aarch32-low.h: New file.
1252         * linux-arm-low.c (arm_fill_gregset): Move it to
1253         linux-aarch32-low.c.
1254         (arm_store_gregset): Likewise.
1255         (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1256         (arm_store_vfpregset): Call arm_store_vfpregset_num.
1257         (arm_arch_setup): Check if PTRACE_GETREGSET works.
1258         (regs_info): Rename to regs_info_arm.
1259         (arm_regs_info): Return regs_info_aarch32 if
1260         have_ptrace_getregset is 1 and target description is
1261         arm_with_neon or arm_with_vfpv3.
1262         (initialize_low_arch): Don't call init_registers_arm_with_neon.
1263         Call initialize_low_arch_aarch32 instead.
1264
1265 2015-08-04  Yao Qi  <yao.qi@linaro.org>
1266
1267         * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1268         * linux-low.c: ... here.
1269         * linux-low.h (have_ptrace_getregset): Declare it.
1270
1271 2015-08-04  Pedro Alves  <palves@redhat.com>
1272
1273         * thread-db.c (struct thread_db): Use new typedefs.
1274         (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1275         CHK calls.
1276         (disable_thread_event_reporting): Cast result of dlsym to
1277         destination function pointer type.
1278         (thread_db_mourn): Use td_ta_delete_ftype.
1279
1280 2015-08-03  Sandra Loosemore  <sandra@codesourcery.com>
1281
1282         * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1283         arch variant.
1284         (CDX_BREAKPOINT): Define for R2.
1285         (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1286         (the_low_target): Add comments.
1287
1288 2015-07-30  Yao Qi  <yao.qi@linaro.org>
1289
1290         * linux-arm-low.c (arm_hwcap): Remove it.
1291         (arm_read_description): New local variable arm_hwcap.  Don't
1292         set arm_hwcap to zero.
1293
1294 2015-07-30  Yao Qi  <yao.qi@linaro.org>
1295
1296         * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1297         Use regcache->tdesc instead.
1298         (arm_store_wmmxregset): Likewise.
1299         (arm_fill_vfpregset): Likewise.
1300         (arm_store_vfpregset): Likewise.
1301
1302 2015-07-30  Yao Qi  <yao.qi@linaro.org>
1303
1304         * linux-arm-low.c: Include arch/arm.h.
1305         (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1306         (arm_store_gregset): Likewise.
1307
1308 2015-07-29  Simon Marchi  <simon.marchi@ericsson.com>
1309
1310         * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1311         ptrace's 4th parameter.
1312
1313 2015-07-27  Yao Qi  <yao.qi@linaro.org>
1314
1315         * configure.srv (case aarch64*-*-linux*): Don't set
1316         srv_linux_usrregs.
1317
1318 2015-07-24  Pedro Alves  <palves@redhat.c: Likewise.om>
1319
1320         * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1321         sys/ptrace.h.
1322         * linux-arm-low.c: Likewise.
1323         * linux-cris-low.c: Likewise.
1324         * linux-crisv32-low.c: Likewise.
1325         * linux-low.c: Likewise.
1326         * linux-m68k-low.c: Likewise.
1327         * linux-mips-low.c: Likewise.
1328         * linux-nios2-low.c: Likewise.
1329         * linux-s390-low.c: Likewise.
1330         * linux-sparc-low.c: Likewise.
1331         * linux-tic6x-low.c: Likewise.
1332         * linux-tile-low.c: Likewise.
1333         * linux-x86-low.c: Likewise.
1334
1335 2015-07-24  Pedro Alves  <palves@redhat.com>
1336
1337         * config.in: Regenerate.
1338         * configure: Regenerate.
1339
1340 2015-07-24  Pedro Alves  <palves@redhat.com>
1341
1342         * acinclude.m4: Include ../ptrace.m4.
1343         * configure.ac: Call GDB_AC_PTRACE.
1344         * config.in, configure: Regenerate.
1345
1346 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1347
1348         * linux-low.c (linux_create_inferior): Remove setting to
1349         proc->priv->new_inferior.
1350         (linux_attach): Likewise.
1351         (linux_low_filter_event): Likewise.
1352         * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1353
1354 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1355
1356         * linux-low.c (linux_arch_setup): New function.
1357         (linux_low_filter_event): If proc->tdesc is NULL and
1358         proc->attached is true, call the_low_target.arch_setup.
1359         Otherwise, keep status pending, and return.
1360         (linux_resume_one_lwp_throw): Don't call get_pc if
1361         thread->while_stepping isn't NULL.  Don't call
1362         get_thread_regcache if proc->tdesc is NULL.
1363         (need_step_over_p): Return 0 if proc->tdesc is NULL.
1364         (linux_target_ops): Install arch_setup.
1365         * server.c (start_inferior): Call the_target->arch_setup.
1366         * target.h (struct target_ops) <arch_setup>: New field.
1367         (target_arch_setup): New marco.
1368         * lynx-low.c (lynx_target_ops): Update.
1369         * nto-low.c (nto_target_ops): Update.
1370         * spu-low.c (spu_target_ops): Update.
1371         * win32-low.c (win32_target_ops): Update.
1372
1373 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1374
1375         * linux-low.c (linux_add_process): Don't set
1376         proc->priv->new_inferior.
1377         (linux_create_inferior): Set proc->priv->new_inferior to 1.
1378         (linux_attach): Likewise.
1379
1380 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1381
1382         * server.c (start_inferior): Code refactor.
1383
1384 2015-07-24  Yao Qi  <yao.qi@linaro.org>
1385
1386         * server.c (process_serial_event): Set general_thread.
1387
1388 2015-07-21  Yao Qi  <yao.qi@linaro.org>
1389
1390         * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1391         aarch64_linux_get_debug_reg_capacity.
1392
1393 2015-07-17  Yao Qi  <yao.qi@linaro.org>
1394
1395         * Makefile.in (aarch64-linux-hw-point.o): New rule.
1396         * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1397         * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1398         (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1399         (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1400         (AARCH64_HWP_ALIGNMENT): Likewise.
1401         (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1402         (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1403         (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1404         (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1405         (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1406         (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1407         (struct aarch64_debug_reg_state): Likewise.
1408         (struct arch_lwp_info): Likewise.
1409         (aarch64_align_watchpoint): Likewise.
1410         (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1411         (aarch64_watchpoint_length): Likewise.
1412         (aarch64_point_encode_ctrl_reg): Likewise
1413         (aarch64_point_is_aligned): Likewise.
1414         (aarch64_align_watchpoint): Likewise.
1415         (aarch64_linux_set_debug_regs):
1416         (aarch64_dr_state_insert_one_point): Likewise.
1417         (aarch64_dr_state_remove_one_point): Likewise.
1418         (aarch64_handle_breakpoint): Likewise.
1419         (aarch64_handle_aligned_watchpoint): Likewise.
1420         (aarch64_handle_unaligned_watchpoint): Likewise.
1421         (aarch64_handle_watchpoint): Likewise.
1422
1423 2015-07-17  Yao Qi  <yao.qi@linaro.org>
1424
1425         * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1426         and don't aarch64_get_debug_reg_state.  All callers update.
1427         (aarch64_handle_aligned_watchpoint): Likewise.
1428         (aarch64_handle_unaligned_watchpoint): Likewise.
1429         (aarch64_handle_watchpoint): Likewise.
1430         (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1431         (aarch64_remove_point): Likewise.
1432
1433 2015-07-17  Yao Qi  <yao.qi@linaro.org>
1434
1435         * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1436         debug_printf.
1437         (aarch64_handle_unaligned_watchpoint): Likewise.
1438
1439 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
1440
1441         Revert the previous 3 commits:
1442         Move gdb_regex* to common/
1443         Move linux_find_memory_regions_full & co.
1444         gdbserver build-id attribute generator
1445
1446 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
1447             Jan Kratochvil  <jan.kratochvil@redhat.com>
1448
1449         gdbserver build-id attribute generator.
1450         * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1451         (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1452         (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1453         (find_phdr): New.
1454         (get_dynamic): Use find_pdhr to traverse program headers.
1455         (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1456         (compare_mapping_entry_range, struct find_memory_region_callback_data)
1457         (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1458         (get_hex_build_id): New.
1459         (linux_qxfer_libraries_svr4): Add optional build-id attribute
1460         to reply XML document.
1461
1462 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
1463             Jan Kratochvil  <jan.kratochvil@redhat.com>
1464
1465         * target.c: Include target/target-utils.h and fcntl.h.
1466         (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1467         (target_fileio_read_stralloc): New functions.
1468
1469 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
1470
1471         * Makefile.in (OBS): Add gdb_regex.o.
1472         (gdb_regex.o): New.
1473         * config.in: Rebuilt.
1474         * configure: Rebuilt.
1475
1476 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
1477             Jan Kratochvil  <jan.kratochvil@redhat.com>
1478
1479         Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1480         * Makefile.in (OBS): Add target-utils.o.
1481         (linux-maps.o, target-utils.o): New.
1482         * configure.srv (srv_linux_obj): Add linux-maps.o.
1483
1484 2015-07-15  Pierre Langlois  <pierre.langlois@arm.com>
1485
1486         * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1487         function, return 1.
1488         (the_low_target): Install it.
1489
1490 2015-07-14  Pedro Alves  <palves@redhat.com>
1491
1492         * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1493         Instead, ignore ECHILD, and throw an error for other errnos.
1494
1495 2015-07-10  Pedro Alves  <palves@redhat.com>
1496
1497         * event-loop.c (struct callback_event) <data>: Change type to
1498         gdb_client_data instance instead of gdb_client_data pointer.
1499         (append_callback_event): Adjust.
1500
1501 2015-07-10  Pierre Langlois  <pierre.langlois@arm.com>
1502
1503         * linux-aarch64-low.c: Add comments for each linux_target_ops
1504         method.  Remove comments already covered in target_ops and
1505         linux_target_ops definitions.
1506         (the_low_target): Add comments for each unimplemented method.
1507
1508 2015-07-09  Yao Qi  <yao.qi@linaro.org>
1509
1510         * linux-aarch64-low.c (aarch64_regmap): Remove.
1511         (aarch64_usrregs_info): Remove.
1512         (regs_info): Set field usrregs to NULL.
1513
1514 2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
1515
1516         * linux-low.c: Include "rsp-low.h"
1517         (linux_low_encode_pt_config, linux_low_encode_raw): New.
1518         (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1519         (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1520         (handle_btrace_enable_pt): New.
1521         (handle_btrace_general_set): Support "pt".
1522         (handle_btrace_conf_general_set): Support "pt:size".
1523
1524 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
1525
1526         * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1527         Z_PACKET_SW_BP.
1528
1529 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
1530
1531         * linux-aarch64-low.c: Remove comment about endianness.
1532         (aarch64_breakpoint): Change type to gdb_byte[].  Set to "brk #0".
1533         (aarch64_breakpoint_at): Change type of insn to gdb_byte[].  Use
1534         memcmp.
1535
1536 2015-06-24  Gary Benson  <gbenson@redhat.com>
1537
1538         * linux-i386-ipa.c (stdint.h): Do not include.
1539         * lynx-i386-low.c (stdint.h): Likewise.
1540         * lynx-ppc-low.c (stdint.h): Likewise.
1541         * mem-break.c (stdint.h): Likewise.
1542         * thread-db.c (stdint.h): Likewise.
1543         * tracepoint.c (stdint.h): Likewise.
1544         * win32-low.c (stdint.h): Likewise.
1545
1546 2015-06-18  Simon Marchi  <simon.marchi@ericsson.com>
1547
1548         * server.c (write_qxfer_response): Update call to
1549         remote_escape_output.
1550
1551 2015-06-15  Aleksandar Ristovski  <aristovski@qnx.com
1552             Jan Kratochvil  <jan.kratochvil@redhat.com>
1553
1554         Merge multiple hex conversions.
1555         * gdbreplay.c (tohex): Rename to 'fromhex'.
1556         (logchar): Use fromhex.
1557
1558 2015-06-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
1559
1560         * server.c (handle_qxfer_libraries): Set `version' attribute for
1561         <library-list>.
1562
1563 2015-06-10  Gary Benson  <gbenson@redhat.com>
1564
1565         * target.h (struct target_ops) <multifs_open>: New field.
1566         <multifs_unlink>: Likewise.
1567         <multifs_readlink>: Likewise.
1568         * linux-low.c (nat/linux-namespaces.h): New include.
1569         (linux_target_ops): Initialize the_target->multifs_open,
1570         the_target->multifs_unlink and the_target->multifs_readlink.
1571         * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1572         * hostio.c (hostio_fs_pid): New static variable.
1573         (hostio_handle_new_gdb_connection): New function.
1574         (handle_setfs): Likewise.
1575         (handle_open): Use the_target->multifs_open as appropriate.
1576         (handle_unlink): Use the_target->multifs_unlink as appropriate.
1577         (handle_readlink): Use the_target->multifs_readlink as
1578         appropriate.
1579         (handle_vFile): Handle vFile:setfs packets.
1580         * server.c (handle_query): Call hostio_handle_new_gdb_connection
1581         after target_handle_new_gdb_connection.
1582
1583 2015-06-10  Gary Benson  <gbenson@redhat.com>
1584
1585         * configure.ac (AC_CHECK_FUNCS): Add setns.
1586         * config.in: Regenerate.
1587         * configure: Likewise.
1588         * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1589         (linux-namespaces.o): New rule.
1590         * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1591
1592 2015-06-09  Gary Benson <gbenson@redhat.com>
1593
1594         * hostio.c (handle_open): Process mode argument with
1595         fileio_to_host_mode.
1596
1597 2015-06-01  Yao Qi  <yao.qi@linaro.org>
1598
1599         * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1600         * linux-x86-low.c: Likewise.
1601
1602 2015-05-28  Don Breazeal  <donb@codesourcery.com>
1603
1604         * linux-low.c (handle_extended_wait): Initialize
1605         thread_info.last_resume_kind for new fork children.
1606
1607 2015-05-15  Pedro Alves  <palves@redhat.com>
1608
1609         * target.h (target_handle_new_gdb_connection): Rewrite using if
1610         wrapped in do/while.
1611
1612 2015-05-14  Joel Brobecker  <brobecker@adacore.com>
1613
1614         * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1615         * configure, config.in: Regenerate.
1616         * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1617         Declare typedef.
1618
1619 2015-05-12  Don Breazeal  <donb@codesourcery.com>
1620
1621         * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1622         PTRACE_EVENT_VFORK_DONE.
1623         (linux_low_ptrace_options, extended_event_reported): Add vfork
1624         events.
1625         * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1626         and "vforkdone" for RSP 'T' Stop Reply Packet.
1627         * server.h (report_vfork_events): Declare
1628         global variable.
1629
1630 2015-05-12  Don Breazeal  <donb@codesourcery.com>
1631
1632         * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1633         (the_low_target) <new_fork>: Initialize new member.
1634         * linux-arm-low.c (arm_new_fork): New function.
1635         (the_low_target) <new_fork>: Initialize new member.
1636         * linux-low.c (handle_extended_wait): Call new target function
1637         new_fork.
1638         * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1639         * linux-mips-low.c (mips_add_watchpoint): New function
1640         extracted from mips_insert_point.
1641         (the_low_target) <new_fork>: Initialize new member.
1642         (mips_linux_new_fork): New function.
1643         (mips_insert_point): Call mips_add_watchpoint.
1644         * linux-x86-low.c (x86_linux_new_fork): New function.
1645         (the_low_target) <new_fork>: Initialize new member.
1646
1647 2015-05-12  Don Breazeal  <donb@codesourcery.com>
1648
1649         * linux-low.c (handle_extended_wait): Implement return value,
1650         rename argument 'event_child' to 'event_lwp', handle
1651         PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1652         (linux_low_ptrace_options): New function.
1653         (linux_low_filter_event): Call linux_low_ptrace_options,
1654         use different argument fo linux_enable_event_reporting,
1655         use return value from handle_extended_wait.
1656         (extended_event_reported): New function.
1657         (linux_wait_1): Call extended_event_reported and set
1658         status to report fork events.
1659         (linux_write_memory): Add pid to debug message.
1660         (reset_lwp_ptrace_options_callback): New function.
1661         (linux_handle_new_gdb_connection): New function.
1662         (linux_target_ops): Initialize new structure member.
1663         * linux-low.h (struct lwp_info) <waitstatus>: New member.
1664         * lynx-low.c: Initialize new structure member.
1665         * remote-utils.c (prepare_resume_reply): Implement stop reason
1666         "fork" for "T" stop message.
1667         * server.c (handle_query): Call handle_new_gdb_connection.
1668         * server.h (report_fork_events): Declare global flag.
1669         * target.h (struct target_ops) <handle_new_gdb_connection>:
1670         New member.
1671         (target_handle_new_gdb_connection): New macro.
1672         * win32-low.c: Initialize new structure member.
1673
1674 2015-05-12  Don Breazeal  <donb@codesourcery.com>
1675
1676         * mem-break.c (APPEND_TO_LIST): Define macro.
1677         (clone_agent_expr): New function.
1678         (clone_one_breakpoint): New function.
1679         (clone_all_breakpoints): New function.
1680         * mem-break.h: Declare new functions.
1681
1682 2015-05-12  Don Breazeal  <donb@codesourcery.com>
1683
1684         * linux-low.c (linux_supports_fork_events): New function.
1685         (linux_supports_vfork_events): New function.
1686         (linux_target_ops): Initialize new structure members.
1687         (initialize_low): Call linux_check_ptrace_features.
1688         * lynx-low.c (lynx_target_ops): Initialize new structure
1689         members.
1690         * server.c (report_fork_events, report_vfork_events):
1691         New global flags.
1692         (handle_query): Add new features to qSupported packet and
1693         response.
1694         (captured_main): Initialize new global variables.
1695         * target.h (struct target_ops) <supports_fork_events>:
1696         New member.
1697         <supports_vfork_events>: New member.
1698         (target_supports_fork_events): New macro.
1699         (target_supports_vfork_events): New macro.
1700         * win32-low.c (win32_target_ops): Initialize new structure
1701         members.
1702
1703 2015-05-12  Gary Benson <gbenson@redhat.com>
1704
1705         * server.c (handle_qxfer_exec_file): Use current process
1706         if annex is empty.
1707
1708 2015-05-08  Sandra Loosemore  <sandra@codesourcery.com>
1709
1710         * linux-nios2-low.c: Include elf/common.h.  Adjust comments.
1711         Remove HAVE_PTRACE_GETREGS conditionals.
1712         (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1713         instead of PTRACE_GETREGS and PTRACE_SETREGS.
1714
1715 2015-05-08  Yao Qi  <yao.qi@linaro.org>
1716
1717         * linux-low.c (linux_supports_conditional_breakpoints): New
1718         function.
1719         (linux_target_ops): Install new target method.
1720         * lynx-low.c (lynx_target_ops): Install NULL hook for
1721         supports_conditional_breakpoints.
1722         * nto-low.c (nto_target_ops): Likewise.
1723         * spu-low.c (spu_target_ops): Likewise.
1724         * win32-low.c (win32_target_ops): Likewise.
1725         * server.c (handle_query): Check
1726         target_supports_conditional_breakpoints.
1727         * target.h (struct target_ops) <supports_conditional_breakpoints>:
1728         New field.
1729         (target_supports_conditional_breakpoints): New macro.
1730
1731 2015-05-06  Pedro Alves  <palves@redhat.com>
1732
1733         PR server/18081
1734         * server.c (start_inferior): If the process exits, mourn it.
1735
1736 2015-04-21  Gary Benson <gbenson@redhat.com>
1737
1738         * hostio.c (fileio_open_flags_to_host): Factored out to
1739         fileio_to_host_openflags in common/fileio.c.  Single use
1740         updated.
1741
1742 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
1743
1744         * linux-xtensa-low.c (xtensa_fill_gregset)
1745         (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1746         XCHAL_HAVE_LOOP.
1747
1748 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
1749
1750         * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1751         (regs_info): Replace usrregs pointer with NULL.
1752
1753 2015-04-17  Gary Benson  <gbenson@redhat.com>
1754
1755         * target.h (struct target_ops) <pid_to_exec_file>: New field.
1756         * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1757         * server.c (handle_qxfer_exec_file): New function.
1758         (qxfer_packets): Add exec-file entry.
1759         (handle_query): Report qXfer:exec-file:read as supported packet.
1760
1761 2015-04-14  Romain Naour <romain.naour@openwide.fr>  (tiny change)
1762
1763         * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1764
1765 2015-04-09  Gary Benson <gbenson@redhat.com>
1766
1767         * hostio-errno.c (errno_to_fileio_error): Remove function.
1768         Update caller to use remote_fileio_to_fio_error.
1769
1770 2015-04-09  Yao Qi  <yao.qi@linaro.org>
1771
1772         * linux-low.c (linux_insert_point): Call
1773         insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1774         (linux_remove_point): Call remove_memory_breakpoint if type is
1775         raw_bkpt_type_sw.
1776         * linux-x86-low.c (x86_insert_point): Don't call
1777         insert_memory_breakpoint.
1778         (x86_remove_point): Don't call remove_memory_breakpoint.
1779
1780 2015-04-01  Pedro Alves  <palves@redhat.com>
1781             Cleber Rosa  <crosa@redhat.com>
1782
1783         * server.c (gdbserver_usage): Reorganize and extend the usage
1784         message.
1785
1786 2015-03-24  Pedro Alves  <palves@redhat.com>
1787
1788         * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1789         output.  Also dump TRAP_TRACE.
1790         (linux_low_filter_event): In debug output, distinguish a
1791         resume_stop SIGSTOP from a delayed SIGSTOP.
1792
1793 2015-03-24  Gary Benson  <gbenson@redhat.com>
1794
1795         * linux-x86-low.c (x86_linux_new_thread): Moved to
1796         nat/x86-linux.c.
1797         (x86_linux_prepare_to_resume): Likewise.
1798
1799 2015-03-24  Gary Benson  <gbenson@redhat.com>
1800
1801         * Makefile.in (x86-linux-dregs.o): New rule.
1802         * configure.srv: Add x86-linux-dregs.o to relevant targets.
1803         * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1804         (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1805         (x86_linux_dr_get): Likewise.
1806         (x86_linux_dr_set): Likewise.
1807         (update_debug_registers_callback): Likewise.
1808         (x86_linux_dr_set_addr): Likewise.
1809         (x86_linux_dr_get_addr): Likewise.
1810         (x86_linux_dr_set_control): Likewise.
1811         (x86_linux_dr_get_control): Likewise.
1812         (x86_linux_dr_get_status): Likewise.
1813         (x86_linux_update_debug_registers): Likewise.
1814
1815 2015-03-24  Gary Benson  <gbenson@redhat.com>
1816
1817         * linux-x86-low.c (x86_linux_update_debug_registers):
1818         New function, factored out from...
1819         (x86_linux_prepare_to_resume): ...this.
1820
1821 2015-03-24  Gary Benson  <gbenson@redhat.com>
1822
1823         * linux-x86-low.c (x86_linux_dr_get): Update comments.
1824         (x86_linux_dr_set): Likewise.
1825         (update_debug_registers_callback): Likewise.
1826         (x86_linux_dr_set_addr): Likewise.
1827         (x86_linux_dr_get_addr): Likewise.
1828         (x86_linux_dr_set_control): Likewise.
1829         (x86_linux_dr_get_control): Likewise.
1830         (x86_linux_dr_get_status): Likewise.
1831         (x86_linux_prepare_to_resume): Likewise.
1832
1833 2015-03-24  Gary Benson  <gbenson@redhat.com>
1834
1835         * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1836         Use perror_with_name.  Pass string through gettext.
1837         (x86_linux_dr_set): Likewise.
1838
1839 2015-03-24  Gary Benson  <gbenson@redhat.com>
1840
1841         * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1842         (x86_linux_dr_set_addr): ...this.
1843         (x86_dr_low_get_addr): Rename to...
1844         (x86_linux_dr_get_addr): ...this.
1845         (x86_dr_low_set_control): Rename to...
1846         (x86_linux_dr_set_control): ...this.
1847         (x86_dr_low_get_control): Rename to...
1848         (x86_linux_dr_get_control): ...this.
1849         (x86_dr_low_get_status): Rename to...
1850         (x86_linux_dr_get_status): ...this.
1851         (x86_dr_low): Update with new function names.
1852
1853 2015-03-24  Gary Benson  <gbenson@redhat.com>
1854
1855         * Makefile.in (x86-linux.o): New rule.
1856         * configure.srv: Add x86-linux.o to relevant targets.
1857         * linux-low.c (lwp_set_arch_private_info): New function.
1858         (lwp_arch_private_info): Likewise.
1859         * linux-x86-low.c: Include nat/x86-linux.h.
1860         (arch_lwp_info): Removed structure.
1861         (update_debug_registers_callback):
1862         Use lwp_set_debug_registers_changed.
1863         (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1864         and lwp_set_debug_registers_changed.
1865         (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1866
1867 2015-03-24  Gary Benson  <gbenson@redhat.com>
1868
1869         * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1870         * linux-arm-low.c (arm_new_thread): Likewise.
1871         * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1872         * linux-mips-low.c (mips_linux_new_thread): Likewise.
1873         * linux-x86-low.c (x86_linux_new_thread): Likewise.
1874         * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1875
1876 2015-03-24  Gary Benson  <gbenson@redhat.com>
1877
1878         * linux-low.c (ptid_of_lwp): New function.
1879         (lwp_is_stopped): Likewise.
1880         (lwp_stop_reason): Likewise.
1881         * linux-x86-low.c (update_debug_registers_callback):
1882         Use lwp_is_stopped.
1883         (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1884         lwp_stop_reason.
1885
1886 2015-03-24  Gary Benson  <gbenson@redhat.com>
1887
1888         * linux-low.h (linux_stop_lwp): Remove declaration.
1889
1890 2015-03-24  Gary Benson  <gbenson@redhat.com>
1891
1892         * linux-low.h: Include nat/linux-nat.h.
1893         * linux-low.c (iterate_over_lwps_args): New structure.
1894         (iterate_over_lwps_filter): New function.
1895         (iterate_over_lwps): Likewise.
1896         * linux-x86-low.c (update_debug_registers_callback):
1897         Update signature to what iterate_over_lwps expects.
1898         Remove PID check that iterate_over_lwps now performs.
1899         (x86_dr_low_set_addr): Use iterate_over_lwps.
1900         (x86_dr_low_set_control): Likewise.
1901
1902 2015-03-24  Gary Benson  <gbenson@redhat.com>
1903
1904         * linux-x86-low.c (x86_debug_reg_state): New function.
1905         (x86_linux_prepare_to_resume): Use the above.
1906
1907 2015-03-24  Gary Benson  <gbenson@redhat.com>
1908
1909         * linux-low.c (current_lwp_ptid): New function.
1910         * linux-x86-low.c: Include nat/linux-nat.h.
1911         (x86_dr_low_get_addr): Use current_lwp_ptid.
1912         (x86_dr_low_get_control): Likewise.
1913         (x86_dr_low_get_status): Likewise.
1914
1915 2015-03-20  Pedro Alves  <palves@redhat.com>
1916
1917         * tracepoint.c (cmd_qtstatus): Make "str" const.
1918
1919 2015-03-20  Pedro Alves  <palves@redhat.com>
1920
1921         * server.c (handle_general_set): Make "req_str" const.
1922
1923 2015-03-19  Pedro Alves  <palves@redhat.com>
1924
1925         * linux-low.c (linux_resume_one_lwp): Rename to ...
1926         (linux_resume_one_lwp_throw): ... this.  Don't handle ESRCH here,
1927         instead call perror_with_name.
1928         (check_ptrace_stopped_lwp_gone): New function.
1929         (linux_resume_one_lwp): Reimplement as wrapper around
1930         linux_resume_one_lwp_throw that swallows errors if the LWP is
1931         gone.
1932
1933 2015-03-19  Pedro Alves  <palves@redhat.com>
1934
1935         * linux-low.c (count_events_callback, select_event_lwp_callback):
1936         No longer check whether the thread has resume_stop as last resume
1937         kind.
1938
1939 2015-03-19 Pedro Alves  <palves@redhat.com>
1940
1941         * linux-low.c (count_events_callback, select_event_lwp_callback):
1942         Use the lwp's status_pending_p field, not the thread's.
1943
1944 2015-03-19  Pedro Alves  <palves@redhat.com>
1945
1946         * linux-low.c (select_event_lwp_callback): Update comments to
1947         no longer mention SIGTRAP.
1948
1949 2015-03-18  Gary Benson  <gbenson@redhat.com>
1950
1951         * server.c (handle_query): Do not report vFile:fstat as supported.
1952
1953 2015-03-11  Gary Benson  <gbenson@redhat.com>
1954
1955         * hostio.c (sys/types.h): New include.
1956         (sys/stat.h): Likewise.
1957         (common-remote-fileio.h): Likewise.
1958         (handle_fstat): New function.
1959         (handle_vFile): Handle vFile:fstat packets.
1960
1961 2015-03-11  Gary Benson  <gbenson@redhat.com>
1962
1963         * configure.ac (AC_CHECK_MEMBERS): Add checks for
1964         struct stat.st_blocks and struct stat.st_blksize.
1965         * configure: Regenerate.
1966         * config.in: Likewise.
1967         * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1968         (OBS): Add common-remote-fileio.o.
1969         (common-remote-fileio.o): New rule.
1970
1971 2015-03-09  Pedro Alves  <palves@redhat.com>
1972
1973         * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1974         'struct sockaddr' pointer in 'accept' call.
1975
1976 2015-03-09  Pedro Alves  <palves@redhat.com>
1977
1978         Revert:
1979         2015-03-07  Pedro Alves  <palves@redhat.com>
1980         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1981         or <winsock2.h> here.  Instead include "gdb_socket.h".
1982         (remote_open): Use union gdb_sockaddr_u.
1983         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1984         or <winsock2.h> here.  Instead include "gdb_socket.h".
1985         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1986         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1987         or <sys/un.h>.
1988         (init_named_socket, gdb_agent_helper_thread): Use union
1989         gdb_sockaddr_u.
1990
1991 2015-03-07  Pedro Alves  <palves@redhat.com>
1992
1993         * configure.ac (build_warnings): Move
1994         -Wdeclaration-after-statement to the C-specific set.
1995         * configure: Regenerate.
1996
1997 2015-03-07  Pedro Alves  <palves@redhat.com>
1998
1999         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
2000         or <winsock2.h> here.  Instead include "gdb_socket.h".
2001         (remote_open): Use union gdb_sockaddr_u.
2002         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
2003         or <winsock2.h> here.  Instead include "gdb_socket.h".
2004         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
2005         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
2006         or <sys/un.h>.
2007         (init_named_socket, gdb_agent_helper_thread): Use union
2008         gdb_sockaddr_u.
2009
2010 2015-03-07  Pedro Alves  <palves@redhat.com>
2011
2012         Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
2013         instead.
2014
2015 2015-03-06  Yao Qi  <yao.qi@linaro.org>
2016
2017         * linux-aarch64-low.c (aarch64_insert_point): Use
2018         show_debug_regs as a boolean.
2019         (aarch64_remove_point): Likewise.
2020
2021 2015-03-05  Pedro Alves  <palves@redhat.com>
2022
2023         * lynx-low.c (lynx_target_ops): Install NULL hooks for
2024         stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
2025         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
2026         * nto-low.c (nto_target_ops): Likewise.
2027         * spu-low.c (spu_target_ops): Likewise.
2028         * win32-low.c (win32_target_ops): Likewise.
2029
2030 2015-03-04  Pedro Alves  <palves@redhat.com>
2031
2032         * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
2033         Decide whether a breakpoint triggered based on the SIGTRAP's
2034         siginfo.si_code.
2035         (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
2036         breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
2037         (linux_low_filter_event): Check for breakpoints before checking
2038         watchpoints.
2039         (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
2040         siginfo.si_code.
2041         (linux_stopped_by_sw_breakpoint)
2042         (linux_supports_stopped_by_sw_breakpoint)
2043         (linux_stopped_by_hw_breakpoint)
2044         (linux_supports_stopped_by_hw_breakpoint): New functions.
2045         (linux_target_ops): Install new target methods.
2046
2047 2015-03-04  Pedro Alves  <palves@redhat.com>
2048
2049         * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
2050         * server.c (swbreak_feature, hwbreak_feature): New globals.
2051         (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
2052         (captured_main): Clear swbreak_feature and hwbreak_feature.
2053         * server.h (swbreak_feature, hwbreak_feature): Declare.
2054         * target.h (struct target_ops) <stopped_by_sw_breakpoint,
2055         supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
2056         supports_stopped_by_hw_breakpoint>: New fields.
2057         (target_supports_stopped_by_sw_breakpoint)
2058         (target_stopped_by_sw_breakpoint)
2059         (target_supports_stopped_by_hw_breakpoint)
2060         (target_stopped_by_hw_breakpoint): Declare.
2061
2062 2015-03-04  Pedro Alves  <palves@redhat.com>
2063
2064         enum lwp_stop_reason -> enum target_stop_reason
2065         * linux-low.c (check_stopped_by_breakpoint): Adjust.
2066         (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
2067         (linux_wait_1, stuck_in_jump_pad_callback)
2068         (move_out_of_jump_pad_callback, linux_resume_one_lwp)
2069         (linux_stopped_by_watchpoint):
2070         * linux-low.h (enum lwp_stop_reason): Delete.
2071         (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
2072         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2073
2074 2015-03-04  Yao Qi  <yao.qi@linaro.org>
2075
2076         * Makefile.in (SFILES): Add linux-aarch64-low.c.
2077
2078 2015-03-03  Gary Benson  <gbenson@redhat.com>
2079
2080         * hostio.c (handle_vFile): Fix prefix lengths.
2081
2082 2015-03-03  Markus Metzger  <markus.t.metzger@intel.com>
2083
2084         * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
2085         ptr_bits.
2086
2087 2015-03-02  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2088
2089         * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
2090         (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
2091         (clean): Add "rm -f" for above C files.
2092         * configure.srv (srv_regobj): Add s390-vx-linux64.o,
2093         s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
2094         (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
2095         s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
2096         * linux-s390-low.c (HWCAP_S390_VX): New macro.
2097         (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
2098         (init_registers_s390x_vx_linux64)
2099         (init_registers_s390x_tevx_linux64)
2100         (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
2101         (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
2102         declarations.
2103         (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
2104         (s390_store_vxrs_high): New functions.
2105         (s390_regsets): Add entries for NT_S390_VXRS_LOW and
2106         NT_S390_VXRS_HIGH.
2107         (s390_arch_setup): Add logic for selecting one of the new target
2108         descriptions.  Activate the new vector regsets if applicable.
2109         (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
2110         init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
2111         and init_registers_s390x_tevx_linux64.
2112
2113 2015-03-01  Pedro Alves  <palves@redhat.com>
2114
2115         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
2116         parameter.
2117
2118 2015-02-27  Pedro Alves  <palves@redhat.com>
2119
2120         * linux-x86-low.c (u_debugreg_offset): New function.
2121         (x86_linux_dr_get, x86_linux_dr_set): Use it.
2122
2123 2015-02-27  Pedro Alves  <palves@redhat.com>
2124
2125         * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2126         [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2127         [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2128         ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2129         (ps_lsetfpregs, ps_getpid)
2130         (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2131         (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2132         (ps_lsetxregs, ps_plog): Declare.
2133
2134 2015-02-27  Pedro Alves  <palves@redhat.com>
2135
2136         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2137         IP_AGENT_EXPORT_FUNC.
2138         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2139         IP_AGENT_EXPORT_FUNC.
2140         * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2141         (IP_AGENT_EXPORT): Delete.
2142         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2143         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2144         (gdb_trampoline_buffer_error, collecting, gdb_collect)
2145         (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2146         (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2147         (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2148         (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2149         (traceframe_read_count, traceframe_write_count)
2150         (traceframes_created, trace_state_variables, get_raw_reg)
2151         (get_trace_state_variable_value, set_trace_state_variable_value)
2152         (ust_loaded, helper_thread_id, cmd_buf): Use
2153         IPA_SYM_EXPORTED_NAME.
2154         (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2155         (tracepoints) Use IP_AGENT_EXPORT_VAR.
2156         (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2157         IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2158         (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2159         (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2160         EXTERN_C_PUSH/EXTERN_C_POP.
2161         (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2162         (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2163         wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2164         (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2165         (traceframe_write_count, traceframe_read_count)
2166         (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2167         (about_to_request_buffer_space, get_trace_state_variable_value)
2168         (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2169         (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2170         EXTERN_C_PUSH/EXTERN_C_POP.
2171         (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2172         (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2173         (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2174         and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2175         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2176         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2177         (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2178         * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2179         Define.
2180         (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2181         (IP_AGENT_EXPORT_VAR_DECL): Define.
2182         (tracing): Declare.
2183         (gdb_agent_get_raw_reg): Declare.
2184
2185 2015-02-27  Tom Tromey  <tromey@redhat.com>
2186             Pedro Alves  <palves@redhat.com>
2187
2188         Rename symbols whose names are reserved C++ keywords throughout.
2189
2190 2015-02-27  Pedro Alves  <palves@redhat.com>
2191
2192         * Makefile.in (COMPILER): New, get it from autoconf.
2193         (CXX): Get from autoconf instead.
2194         (COMPILE.pre): Use COMPILER.
2195         (CC-LD): Rename to ...
2196         (CC_LD): ... this.  Use COMPILER.
2197         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2198         (CXX_FOR_TARGET): Default to g++ instead of gcc.
2199         * acinclude.m4: Include build-with-cxx.m4.
2200         * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2201         Disable -Werror by default if building in C++ mode.
2202         (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2203         -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2204         the C++ compiler.  Save/restore CXXFLAGS too.
2205         * configure: Regenerate.
2206
2207 2015-02-27  Pedro Alves  <palves@redhat.com>
2208
2209         * acinclude.m4: Include libiberty.m4.
2210         * configure.ac: Call libiberty_INIT.
2211         * config.in, configure: Regenerate.
2212
2213 2015-02-26  Pedro Alves  <palves@redhat.com>
2214
2215         * linux-low.c (linux_wait_1): When incrementing the PC past a
2216         program breakpoint always use the_low_target.breakpoint_len as
2217         increment, rather than the maximum between that and
2218         the_low_target.decr_pc_after_break.
2219
2220 2015-02-23  Pedro Alves  <palves@redhat.com>
2221
2222         * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2223         thread was doing a step-over; always adjust the PC if
2224         we stepped over a permanent breakpoint.
2225         (linux_wait_1): If we stepped over breakpoint that was on top of a
2226         permanent breakpoint, manually advance the PC past it.
2227
2228 2015-02-23  Pedro Alves  <palves@redhat.com>
2229
2230         * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2231         modes.
2232         (x86_fill_gregset, x86_store_gregset): Use it when handling
2233         $orig_eax.
2234
2235 2015-02-20  Pedro Alves  <palves@redhat.com>
2236
2237         * thread-db.c: Include "nat/linux-procfs.h".
2238         (thread_db_init): Skip listing new threads if the kernel supports
2239         PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2240
2241 2015-02-20  Pedro Alves  <palves@redhat.com>
2242
2243         * linux-low.c (status_pending_p_callback): Use ptid_match.
2244
2245 2015-02-19  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2246
2247         PR breakpoints/16812
2248         * linux-low.c (wstatus_maybe_breakpoint): Remove.
2249         (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2250         (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2251
2252 2015-02-10  Antoine Tremblay <antoine.tremblay@ericsson.com>
2253
2254         PR breakpoints/15956
2255         * tracepoint.c (cmd_qtinit): Add check for current_thread.
2256
2257 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2258
2259         * linux-low.c (linux_low_btrace_conf): Print size.
2260         * server.c (handle_btrace_conf_general_set): New.
2261         (hanle_general_set): Call handle_btrace_conf_general_set.
2262         (handle_query): Report Qbtrace-conf:bts:size as supported.
2263
2264 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2265
2266         * linux-low.c (linux_low_enable_btrace): Update parameters.
2267         (linux_low_btrace_conf): New.
2268         (linux_target_ops)<to_btrace_conf>: Initialize.
2269         * server.c (current_btrace_conf): New.
2270         (handle_btrace_enable): Rename to ...
2271         (handle_btrace_enable_bts): ... this.  Pass &current_btrace_conf
2272         to target_enable_btrace.  Update comment.  Update users.
2273         (handle_qxfer_btrace_conf): New.
2274         (qxfer_packets): Add btrace-conf entry.
2275         (handle_query): Report qXfer:btrace-conf:read as supported packet.
2276         * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2277         (target_ops)<read_btrace_conf>: New.
2278         (target_enable_btrace): Update parameters.
2279         (target_read_btrace_conf): New.
2280
2281 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2282
2283         * server.c (handle_btrace_general_set): Remove call to
2284         target_supports_btrace.
2285         (supported_btrace_packets): New.
2286         (handle_query): Call supported_btrace_packets.
2287         * target.h: include btrace-common.h.
2288         (btrace_target_info): Removed.
2289         (supports_btrace, target_supports_btrace): Update parameters.
2290
2291 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
2292
2293         * Makefile.in (SFILES): Add common/btrace-common.c.
2294         (OBS): Add common/btrace-common.o.
2295         (btrace-common.o): Add build rules.
2296         * linux-low: Include btrace-common.h.
2297         (linux_low_read_btrace): Use struct btrace_data.  Call
2298         btrace_data_init and btrace_data_fini.
2299
2300 2015-02-06  Pedro Alves  <palves@redhat.com>
2301
2302         * thread-db.c (find_new_threads_callback): Add debug output.
2303
2304 2015-02-04  Pedro Alves  <palves@redhat.com>
2305
2306         * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2307         (resume_stopped_resumed_lwps): New function.
2308         (linux_wait_for_event_filtered): Use it.
2309
2310 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
2311
2312         * Makefile.in (SFILES): Add linux-personality.c.
2313         (linux-personality.o): New rule.
2314         * configure.srv (srv_linux_obj): Add linux-personality.o to the
2315         list of objects to be built.
2316         * linux-low.c: Include nat/linux-personality.h.
2317         (linux_create_inferior): Remove code to disable address space
2318         randomization (moved to ../nat/linux-personality.c).  Create
2319         cleanup to disable address space randomization.
2320
2321 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
2322
2323         * Makefile.in (posix-strerror.o): New rule.
2324         (mingw-strerror.o): Likewise.
2325         * configure: Regenerated.
2326         * configure.ac: Source file ../common/common.host.  Initialize new
2327         variable srv_host_obs.  Add srv_host_obs to GDBSERVER_DEPFILES.
2328
2329 2015-01-14  Yao Qi  <yao@codesourcery.com>
2330
2331         * Makefile.in (SFILES): Add nat/ppc-linux.c.
2332         (ppc-linux.o): New rule.
2333         * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2334         * configure.ac: AC_CHECK_FUNCS(getauxval).
2335         * config.in: Re-generated.
2336         * configure: Re-generated.
2337         * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2338         ppc64_64bit_inferior_p
2339
2340 2015-01-14  Yao Qi  <yao@codesourcery.com>
2341
2342         * linux-ppc-low.c: Include "nat/ppc-linux.h".
2343          (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2344         (PPC_FEATURE_HAS_ALTIVEC,  PPC_FEATURE_HAS_SPE): Likewise.
2345         (PT_ORIG_R3, PT_TRAP): Likewise.
2346         (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2347         (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2348         (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2349
2350 2015-01-10  Joel Brobecker  <brobecker@adacore.com>
2351
2352         * i387-fp.c (i387_cache_to_xsave): In look over
2353         num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2354         zmmh_low_space field by use of zmmh_high_space.
2355
2356 2015-01-09  Pedro Alves  <palves@redhat.com>
2357
2358         * linux-low.c (step_over_bkpt): Move higher up in the file.
2359         (handle_extended_wait): Don't store the stop_pc here.
2360         (get_stop_pc): Adjust comments and rename to ...
2361         (check_stopped_by_breakpoint): ... this.  Record whether the LWP
2362         stopped for a software breakpoint or hardware breakpoint.
2363         (thread_still_has_status_pending_p): New function.
2364         (status_pending_p_callback): Use
2365         thread_still_has_status_pending_p.  If the event is no longer
2366         interesting, resume the LWP.
2367         (handle_tracepoints): Add assert.
2368         (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2369         (wstatus_maybe_breakpoint): New function.
2370         (cancel_breakpoint): Delete function.
2371         (check_stopped_by_watchpoint): New function, factored out from
2372         linux_low_filter_event.
2373         (lp_status_maybe_breakpoint): Delete function.
2374         (linux_low_filter_event): Remove filter_ptid argument.
2375         Leave thread group exits pending here.  Store the LWP's stop PC.
2376         Always leave events pending.
2377         (linux_wait_for_event_filtered): Pull all events out of the
2378         kernel, and leave them all pending.
2379         (count_events_callback, select_event_lwp_callback): Consider all
2380         events.
2381         (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2382         (select_event_lwp): Only give preference to the stepping LWP in
2383         all-stop mode.  Adjust comments.
2384         (ignore_event): New function.
2385         (linux_wait_1): Delete 'retry' label.  Use ignore_event.  Remove
2386         references to cancel_breakpoints.  Adjust to renames.  Also give
2387         equal priority to all LWPs that have had events in non-stop mode.
2388         If reporting a software breakpoint event, unadjust the LWP's PC.
2389         (linux_wait): If linux_wait_1 returned an ignored event, retry.
2390         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2391         Adjust.
2392         (linux_resume_one_lwp): Store the LWP's PC.  Adjust.
2393         (resume_status_pending_p): Use thread_still_has_status_pending_p.
2394         (linux_stopped_by_watchpoint): Adjust.
2395         (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2396         * linux-low.h (enum lwp_stop_reason): New.
2397         (struct lwp_info) <stop_pc>: Adjust comment.
2398         <stopped_by_watchpoint>: Delete field.
2399         <stop_reason>: New field.
2400         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2401         * mem-break.c (software_breakpoint_inserted_here)
2402         (hardware_breakpoint_inserted_here): New function.
2403         * mem-break.h (software_breakpoint_inserted_here)
2404         (hardware_breakpoint_inserted_here): Declare.
2405         * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2406         (cancel_breakpoints): Delete.
2407         * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2408         (upload_fast_traceframes): Remove references to
2409         cancel_breakpoints.
2410
2411 2015-01-09  Pedro Alves  <palves@redhat.com>
2412
2413         * thread-db.c (find_new_threads_callback): Ignore thread if the
2414         kernel thread ID is -1.
2415
2416 2015-01-09  Pedro Alves  <palves@redhat.com>
2417
2418         * linux-low.c (linux_attach_fail_reason_string): Move to
2419         nat/linux-ptrace.c, and rename.
2420         (linux_attach_lwp): Update comment.
2421         (attach_proc_task_lwp_callback): New function.
2422         (linux_attach): Adjust to rename and use
2423         linux_proc_attach_tgid_threads.
2424         (linux_attach_fail_reason_string): Delete declaration.
2425
2426 2015-01-01  Joel Brobecker  <brobecker@adacore.com>
2427
2428         * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2429         * server.c (gdbserver_version): Likewise.
2430
2431 2014-12-29  Sergio Durigan Junior  <sergiodj@redhat.com>
2432
2433         * remote-utils.c: Include ctype.h.
2434         (input_interrupt): Explicitly handle the case when the char
2435         received is the NUL byte.  Improve the printing of non-ASCII
2436         characters.
2437
2438 2014-12-16  Joel Brobecker  <brobecker@adacore.com>
2439
2440         * linux-low.c (linux_low_filter_event): Update call to
2441         linux_enable_event_reporting following the addition of
2442         a new parameter to that function.
2443
2444 2014-12-16  Catalin Udma  <catalin.udma@freescale.com>
2445
2446         PR server/17457
2447         * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2448         (AARCH64_FPCR_REGNO): Likewise.
2449         (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2450         (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2451         (aarch64_store_fpregset): Likewise.
2452
2453 2014-12-15  Joel Brobecker  <brobecker@adacore.com>
2454
2455         * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2456         Remove FIXME comment about assumption about N.
2457
2458 2014-12-13  Joel Brobecker  <brobecker@adacore.com>
2459
2460         * configure.ac: If large-file support is disabled in GDBserver,
2461         pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2462         * configure: Regenerate.
2463
2464 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2465
2466         * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2467         warning upon ENODATA from ptrace.
2468         * linux-s390-low.c (s390_store_tdb): New.
2469         (s390_regsets): Add regset for NT_S390_TDB.
2470
2471 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2472
2473         * linux-low.c (regsets_store_inferior_registers): Skip regsets
2474         without a fill_function.
2475         * linux-s390-low.c (s390_fill_last_break): Remove.
2476         (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2477         (s390_arch_setup): Use regset's size instead of fill_function for
2478         loop end condition.
2479
2480 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2481
2482         * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2483         the regset's store function when ptrace returned an error.
2484         * regcache.c (get_thread_regcache): Invalidate register cache
2485         before fetching inferior's registers.
2486
2487 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2488
2489         * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2490         while-loop as for-loop.
2491         (regsets_store_inferior_registers): Likewise.
2492
2493 2014-11-28  Yao Qi  <yao@codesourcery.com>
2494
2495         * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2496         * config.in, configure: Re-generate.
2497         * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2498         is defined.
2499
2500 2014-11-21  Yao Qi  <yao@codesourcery.com>
2501
2502         * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2503         (AC_CHECK_HEADERS): Remove malloc.h.
2504         * configure: Re-generated.
2505         * config.in: Re-generated.
2506         * server.h: Don't include alloca.h and malloc.h.
2507         * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2508         Don't include malloc.h.
2509
2510 2014-11-17  Joel Brobecker  <brobecker@adacore.com>
2511
2512         * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2513         corresponding ERRNO check in same block.
2514
2515 2014-11-12  Pedro Alves  <palves@redhat.com>
2516
2517         * server.c (cont_thread): Update comment.
2518         (start_inferior, attach_inferior): No longer clear cont_thread.
2519         (handle_v_cont): No longer set cont_thread.
2520         (captured_main): Clear cont_thread each time a GDB connects.
2521
2522 2014-11-12  Pedro Alves  <palves@redhat.com>
2523
2524         * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2525         thread, and don't resume all threads if the Hc thread has exited.
2526
2527 2014-11-12  Pedro Alves  <palves@redhat.com>
2528
2529         * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2530         the process group instead of to a specific LWP.
2531
2532 2014-10-15  Pedro Alves  <palves@redhat.com>
2533
2534         PR server/17487
2535         * win32-arm-low.c (arm_set_thread_context): Remove current_event
2536         parameter.
2537         (arm_set_thread_context): Delete.
2538         (the_low_target): Adjust.
2539         * win32-i386-low.c (debug_registers_changed)
2540         (debug_registers_used): Delete.
2541         (update_debug_registers_callback): New function.
2542         (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2543         needing to update their debug registers.
2544         (win32_get_current_dr): New function.
2545         (x86_dr_low_get_addr, x86_dr_low_get_control)
2546         (x86_dr_low_get_status): Fetch the debug register from the thread
2547         record's context.
2548         (i386_initial_stuff): Adjust.
2549         (i386_get_thread_context): Remove current_event parameter.  Don't
2550         clear debug_registers_changed nor copy DR values to
2551         debug_reg_state.
2552         (i386_set_thread_context): Delete.
2553         (i386_prepare_to_resume): New function.
2554         (i386_thread_added): Mark the thread as needing to update irs
2555         debug registers.
2556         (the_low_target): Remove i386_set_thread_context and install
2557         i386_prepare_to_resume.
2558         * win32-low.c (win32_get_thread_context): Adjust.
2559         (win32_set_thread_context): Use SetThreadContext
2560         directly.
2561         (win32_prepare_to_resume): New function.
2562         (win32_require_context): New function, factored out from ...
2563         (thread_rec): ... this.
2564         (continue_one_thread): Call win32_prepare_to_resume on each thread
2565         we're about to continue.
2566         (win32_resume): Call win32_prepare_to_resume on the event thread.
2567         * win32-low.h (struct win32_thread_info)
2568         <debug_registers_changed>: New field.
2569         (struct win32_target_ops): Change prototype of set_thread_context,
2570         delete set_thread_context and add prepare_to_resume.
2571         (win32_require_context): New declaration.
2572
2573 2014-10-08  Gary Benson  <gbenson@redhat.com>
2574
2575         * server.h: Do not include common-exceptions.h.
2576
2577 2014-10-08  Gary Benson  <gbenson@redhat.com>
2578
2579         * server.h: Do not include cleanups.h.
2580
2581 2014-09-30  James Hogan  <james.hogan@imgtec.com>
2582
2583         * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2584         mips64-dsp-linux.c.
2585
2586 2014-09-23  Yao Qi  <yao@codesourcery.com>
2587
2588         * linux-low.c (lp_status_maybe_breakpoint): New function.
2589         (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2590         (count_events_callback): Likewise.
2591         (select_event_lwp_callback): Likewise.
2592         (cancel_breakpoints_callback): Likewise.
2593
2594 2014-09-19  Don Breazeal  <donb@codesourcery.com>
2595
2596         * linux-low.c (handle_extended_wait): Call
2597         linux_ptrace_get_extended_event.
2598         (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2599         linux_is_extended_waitstatus.
2600
2601 2014-09-16  Joel Brobecker  <brobecker@adacore.com>
2602
2603         * Makefile.in (CPPFLAGS): Define.
2604         (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2605         (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2606
2607 2014-09-16  Gary Benson  <gbenson@redhat.com>
2608
2609         * inferiors.h (current_inferior): Renamed as...
2610         (current_thread): New variable.  All uses updated.
2611         * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2612         (maybe_move_out_of_jump_pad): Likewise.
2613         (cancel_breakpoint): Likewise.
2614         (linux_low_filter_event): Likewise.
2615         (wait_for_sigstop): Likewise.
2616         (linux_resume_one_lwp): Likewise.
2617         (need_step_over_p): Likewise.
2618         (start_step_over): Likewise.
2619         (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2620         * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2621         * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2622         and save_inferior as saved_thread.
2623         * regcache.c (get_thread_regcache): Renamed saved_inferior as
2624         saved_thread.
2625         (regcache_invalidate_thread): Likewise.
2626         * remote-utils.c (prepare_resume_reply): Likewise.
2627         * thread-db.c (thread_db_get_tls_address): Likewise.
2628         (disable_thread_event_reporting): Likewise.
2629         (remove_thread_event_breakpoints): Likewise.
2630         * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2631         as saved_thread.
2632         * target.h (set_desired_inferior): Renamed as...
2633         (set_desired_thread): New declaration.  All uses updated.
2634         * server.c (myresume): Updated comment to reference thread instead
2635         of inferior.
2636         (handle_serial_event): Likewise.
2637         (handle_target_event): Likewise.
2638
2639 2014-09-12  Tom Tromey  <tromey@redhat.com>
2640             Gary Benson  <gbenson@redhat.com>
2641
2642         * regcache.h: Include common-regcache.h.
2643         (regcache_read_pc): Don't declare.
2644         * regcache.c (get_thread_regcache_for_ptid): New function.
2645
2646 2014-09-11  Tom Tromey  <tromey@redhat.com>
2647             Gary Benson  <gbenson@redhat.com>
2648
2649         * symbol.c: New file.
2650         * Makefile.in (SFILES): Add symbol.c.
2651         (OBS): Add symbol.o.
2652
2653 2014-09-11  Gary Benson  <gbenson@redhat.com>
2654
2655         * target.c (target_stop_ptid, target_continue_ptid): New
2656         functions.
2657
2658 2014-09-11  Tom Tromey  <tromey@redhat.com>
2659             Gary Benson  <gbenson@redhat.com>
2660
2661         * target.h: Include target/target.h.
2662         * target.c (target_read_memory, target_read_uint32)
2663         (target_write_memory): New functions.
2664
2665 2014-09-11  Gary Benson  <gbenson@redhat.com>
2666
2667         * server.h (debug_hw_points): Don't declare.
2668         * server.c (debug_hw_points): Don't define.  Replace all uses
2669         with show_debug_regs.
2670         * linux-aarch64-low.c (debug_hw_points): Don't define.  Replace
2671         all uses with show_debug_regs.
2672
2673 2014-09-08  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
2674
2675         * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2676         endianness into account.
2677         (ppc_supply_ptrace_register): Likewise.
2678
2679 2014-09-03  James Hogan  <james.hogan@imgtec.com>
2680
2681         * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2682         to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2683
2684 2014-09-03  Gary Benson  <gbenson@redhat.com>
2685
2686         * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2687         ALL_DEBUG_ADDRESS_REGISTERS.
2688
2689 2014-09-02  Gary Benson  <gbenson@redhat.com>
2690
2691         * i386-low.h: Renamed as...
2692         * x86-low.h: New file.  All type, function and variable name
2693         prefixes changed from "i386_" to "x86_".  All references updated.
2694         * i386-low.c: Renamed as...
2695         * x86-low.c: New file.  All type, function and variable name
2696         prefixes changed from "i386_" to "x86_".  All references updated.
2697
2698 2014-09-02  Gary Benson  <gbenson@redhat.com>
2699
2700         * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2701         (x86_linux_new_thread): Likewise.
2702
2703 2014-08-29  Gary Benson  <gbenson@redhat.com>
2704
2705         * server.h (setjmp.h): Do not include.
2706         (toplevel): Do not declare.
2707         (common-exceptions.h): Include.
2708         (cleanups.h): Likewise.
2709         * server.c (toplevel): Do not define.
2710         (exit_code): New static global.
2711         (detach_or_kill_for_exit_cleanup): New function.
2712         (main): New function.  Original main renamed to...
2713         (captured_main): New function.
2714         * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2715
2716 2014-08-29  Gary Benson  <gbenson@redhat.com>
2717
2718         * Makefile.in (SFILES): Add common/common-exceptions.c.
2719         (OBS): Add common-exceptions.o.
2720         (common-exceptions.o): New rule.
2721         * utils.c (prepare_to_throw_exception): New function.
2722
2723 2014-08-29  Gary Benson  <gbenson@redhat.com>
2724
2725         * config.in: Regenerate.
2726         * configure: Likewise.
2727
2728 2014-08-29  Gary Benson  <gbenson@redhat.com>
2729
2730         * Makefile.in (SFILES): Add common/cleanups.c.
2731         (OBS): cleanups.o.
2732         (cleanups.o): New rule.
2733
2734 2014-08-29  Gary Benson  <gbenson@redhat.com>
2735
2736         * utils.c (internal_vwarning): New function.
2737
2738 2014-08-28  Gary Benson  <gbenson@redhat.com>
2739
2740         * utils.h (fatal): Remove declaration.
2741         * utils.c (fatal): Remove function.
2742
2743 2014-08-28  Gary Benson  <gbenson@redhat.com>
2744
2745         * tracepoint.c (gdb_agent_init): Replace fatal with
2746         perror_with_name.
2747         (initialize_tracepoint): Likewise.
2748
2749 2014-08-28  Gary Benson  <gbenson@redhat.com>
2750
2751         * remote-utils.c (remote_prepare): Replace fatal with error.
2752
2753 2014-08-28  Gary Benson  <gbenson@redhat.com>
2754
2755         * linux-low.c (linux_async): Replace fatal with warning.
2756         Tidy up and return.
2757         (linux_start_non_stop): Return -1 if linux_async failed.
2758
2759 2014-08-28  Gary Benson  <gbenson@redhat.com>
2760
2761         * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2762         gdb_assert.
2763         (i386_dr_low_get_addr): Remove vague comment.
2764         * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2765         gdb_assert.
2766
2767 2014-08-28  Gary Benson  <gbenson@redhat.com>
2768
2769         * inferiors.c (get_thread_process): Replace check with gdb_assert.
2770         * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2771         internal_error.
2772         (linux_resume_one_lwp): Likewise.
2773         * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2774         gdb_assert.
2775         * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2776         with internal_error.
2777         * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2778         (init_register_cache): Replace fatal with gdb_assert_not_reached.
2779         (find_register_by_name): Replace fatal with internal_error.
2780         (find_regno): Likewise.
2781         * tdesc.c (init_target_desc): Replace check with gdb_assert.
2782         * thread-db.c (thread_db_create_event): Likewise.
2783         (thread_db_load_search): Likewise.
2784         (try_thread_db_load_1): Likewise.
2785         * tracepoint.c (get_jump_space_head): Replace fatal with
2786         internal_error.
2787         (claim_trampoline_space): Likewise.
2788         (have_fast_tracepoint_trampoline_buffer): Likewise.
2789         (cmd_qtstart): Likewise.
2790         (stop_tracing): Likewise.
2791         (fast_tracepoint_collecting): Likewise.
2792         (target_malloc): Likewise.
2793         (download_tracepoint): Likewise.
2794         (download_trace_state_variables): Replace check with gdb_assert.
2795         (upload_fast_traceframes): Replace fatal with internal_error.
2796
2797 2014-08-19  Tom Tromey  <tromey@redhat.com>
2798             Gary Benson  <gbenson@redhat.com>
2799
2800         * Makefile.in (SFILES): Add common/common-debug.c.
2801         (OBS): Add common-debug.o.
2802         (common-debug.o): New rule.
2803         * debug.h (debug_printf): Don't declare.
2804         * debug.c (debug_printf): Renamed and rewritten as...
2805         (debug_vprintf): New function.
2806
2807 2014-08-19  Gary Benson  <gbenson@redhat.com>
2808
2809         * utils.h: Do not include print-utils.h.
2810
2811 2014-08-19  Tom Tromey  <tromey@redhat.com>
2812             Gary Benson  <gbenson@redhat.com>
2813
2814         * server.h: Add static assertion.
2815         (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2816
2817 2014-08-19  Tom Tromey  <tromey@redhat.com>
2818             Gary Benson  <gbenson@redhat.com>
2819
2820         * Makefile.in (SFILES): Add common/errors.c.
2821         (OBS): Add errors.o.
2822         (IPA_OBS): Add errors-ipa.o.
2823         (errors.o): New rule.
2824         (errors-ipa.o): Likewise.
2825         * utils.h (perror_with_name, error, warning): Don't declare.
2826         * utils.c (warning): Renamed and rewritten as...
2827         (vwarning): New function.
2828         (error): Renamed and rewritten as...
2829         (verror): New function.
2830         (internal_error): Renamed and rewritten as...
2831         (internal_verror): New function.
2832
2833 2014-08-07  Gary Benson  <gbenson@redhat.com>
2834
2835         * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2836         * configure: Regenerate.
2837         * config.in: Likewise.
2838         * server.h: Do not include errno.h.
2839         * event-loop.c: Likewise.
2840         * hostio-errno.c: Likewise.
2841         * linux-low.c: Likewise.
2842         * remote-utils.c: Likewise.
2843         * spu-low.c: Likewise.
2844         * utils.c: Likewise.
2845         * gdbreplay.c: Unconditionally include errno.h.
2846
2847 2014-08-07  Gary Benson  <gbenson@redhat.com>
2848
2849         * server.h: Do not include string.h.
2850         * event-loop.c: Likewise.
2851         * linux-low.c: Likewise.
2852         * regcache.c: Likewise.
2853         * remote-utils.c: Likewise.
2854         * spu-low.c: Likewise.
2855         * utils.c: Likewise.
2856
2857 2014-08-07  Gary Benson  <gbenson@redhat.com>
2858
2859         * server.h: Do not include gdb_assert.h.
2860
2861 2014-08-07  Gary Benson  <gbenson@redhat.com>
2862
2863         * server.h: Do not include common-utils.h.
2864
2865 2014-08-07  Gary Benson  <gbenson@redhat.com>
2866
2867         * server.h: Do not include ptid.h.
2868         * notif.h: Likewise.
2869
2870 2014-08-07  Gary Benson  <gbenson@redhat.com>
2871
2872         * server.h: Do not include gdb_locale.h.
2873
2874 2014-08-07  Gary Benson  <gbenson@redhat.com>
2875
2876         * server.h: Do not include gdb/signals.h.
2877         * win32-low.c: Likewise.
2878
2879 2014-08-07  Gary Benson  <gbenson@redhat.com>
2880
2881         * server.h: Do not include pathmax.h.
2882
2883 2014-08-07  Gary Benson  <gbenson@redhat.com>
2884
2885         * server.h: Do not include libiberty.h.
2886         * linux-bfin-low.c: Likewise.
2887
2888 2014-08-07  Gary Benson  <gbenson@redhat.com>
2889
2890         * server.h: Do not include ansidecl.h.
2891
2892 2014-08-07  Gary Benson  <gbenson@redhat.com>
2893
2894         * linux-x86-low.c: Do not include stddef.h.
2895         * lynx-ppc-low.c: Likewise.
2896         * tracepoint.c: Likewise.
2897
2898 2014-08-07  Gary Benson  <gbenson@redhat.com>
2899
2900         * server.h: Do not include stdarg.h.
2901         * nto-low.c: Likewise.
2902
2903 2014-08-07  Gary Benson  <gbenson@redhat.com>
2904
2905         * server.h: Do not include stdlib.h.
2906         * inferiors.c: Likewise.
2907         * linux-low.c: Likewise.
2908         * regcache.c: Likewise.
2909         * spu-low.c: Likewise.
2910         * tracepoint.c: Likewise.
2911         * utils.c: Likewise.
2912
2913 2014-08-07  Gary Benson  <gbenson@redhat.com>
2914
2915         * server.h: Do not include stdio.h.
2916         * linux-low.c: Likewise.
2917         * remote-utils.c: Likewise.
2918         * spu-low.c: Likewise.
2919         * utils.c: Likewise.
2920         * wincecompat.c: Likewise.
2921
2922 2014-08-06  Gary Benson  <gbenson@redhat.com>
2923
2924         * regcache.c (init_register_cache): Move conditionals inside if.
2925
2926 2014-08-06  Gary Benson  <gbenson@redhat.com>
2927
2928         * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2929
2930 2014-07-31  Gary Benson  <gbenson@redhat.com>
2931
2932         * ax.h: Do not include server.h.
2933         * gdbthread.h: Likewise.
2934         * lynx-low.h: Likewise.
2935         * notif.h: Likewise.
2936
2937 2014-07-30  Gary Benson  <gbenson@redhat.com>
2938
2939         * server.h: Include common-defs.h.
2940         Do not include config.h or build-gnulib-gdbserver/config.h.
2941
2942 2014-07-30  Gary Benson  <gbenson@redhat.com>
2943
2944         * hostio-errno.c: Move server.h to top of includes list.
2945         * inferiors.c: Likewise.
2946         * linux-x86-low.c: Likewise.
2947         * notif.c: Include server.h.
2948
2949 2014-07-24  Tom Tromey  <tromey@redhat.com>
2950             Gary Benson  <gbenson@redhat.com>
2951
2952         * server.h (CORE_ADDR): Now unsigned.
2953
2954 2014-07-16  Pedro Alves  <palves@redhat.com>
2955
2956         * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2957
2958 2014-07-15  Pedro Alves  <palves@redhat.com>
2959
2960         * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2961         copy.
2962
2963 2014-07-11  Pedro Alves  <palves@redhat.com>
2964
2965         * linux-low.c (kill_wait_lwp): New function, based on
2966         kill_one_lwp_callback, but use my_waitpid directly.
2967         (kill_one_lwp_callback, linux_kill): Use it.
2968
2969 2014-06-23  Pedro Alves  <palves@redhat.com>
2970
2971         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2972         before setting DR0..DR3.
2973
2974 2014-06-20  Gary Benson  <gbenson@redhat.com>
2975
2976         * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2977         * configure: Regenerated.
2978         * config.in: Likewise.
2979
2980 2014-06-20  Gary Benson  <gbenson@redhat.com>
2981
2982         * Makefile.in (SFILES): Update locations for files moved
2983         from common to nat.
2984         (object file files): Reordered.
2985
2986 2014-06-20  Gary Benson  <gbenson@redhat.com>
2987
2988         * i386-low.h (i386_dr_low_can_set_addr): Removed.
2989         (i386_dr_low_set_addr): Likewise.
2990         (i386_dr_low_get_addr): Likewise.
2991         (i386_dr_low_can_set_control): Likewise.
2992         (i386_dr_low_set_control): Likewise.
2993         (i386_dr_low_get_control): Likewise.
2994         (i386_dr_low_get_status): Likewise.
2995         (i386_get_debug_register_length): Likewise.
2996         * linux-x86-low.c (i386_dr_low_set_addr):
2997         Changed signature.  Made static.
2998         (i386_dr_low_get_addr): Likewise.
2999         (i386_dr_low_set_control): Likewise.
3000         (i386_dr_low_get_control): Likewise.
3001         (i386_dr_low_get_status): Likewise.
3002         (i386_dr_low): New global variable.
3003         * win32-i386-low.c (i386_dr_low_set_addr):
3004         Changed signature.  Made static.
3005         (i386_dr_low_get_addr): Likewise.
3006         (i386_dr_low_set_control): Likewise.
3007         (i386_dr_low_get_control): Likewise.
3008         (i386_dr_low_get_status): Likewise.
3009         (i386_dr_low): New global variable.
3010
3011 2014-06-20  Marcus Shawcroft  <marcus.shawcroft@arm.com>
3012
3013         * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
3014         * Makefile.in (AR, AR_FLAGS): Define.
3015         * configure: Regenerate.
3016
3017 2014-06-19  Gary Benson  <gbenson@redhat.com>
3018
3019         * Makefile.in (i386-dregs.o): New rule.
3020         * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
3021         * i386-low.c (target.h): Remove include.
3022         (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
3023         (DR_CONTROL_SHIFT): Likewise.
3024         (DR_CONTROL_SIZE): Likewise.
3025         (DR_RW_EXECUTE): Likewise.
3026         (DR_RW_WRITE): Likewise.
3027         (DR_RW_READ): Likewise.
3028         (DR_RW_IORW): Likewise.
3029         (DR_LEN_1): Likewise.
3030         (DR_LEN_2): Likewise.
3031         (DR_LEN_4): Likewise.
3032         (DR_LEN_8): Likewise.
3033         (DR_LOCAL_ENABLE_SHIFT): Likewise.
3034         (DR_GLOBAL_ENABLE_SHIFT): Likewise.
3035         (DR_ENABLE_SIZE): Likewise.
3036         (DR_LOCAL_SLOWDOWN): Likewise.
3037         (DR_GLOBAL_SLOWDOWN): Likewise.
3038         (DR_CONTROL_RESERVED): Likewise.
3039         (I386_DR_CONTROL_MASK): Likewise.
3040         (I386_DR_VACANT): Likewise.
3041         (I386_DR_LOCAL_ENABLE): Likewise.
3042         (I386_DR_GLOBAL_ENABLE): Likewise.
3043         (I386_DR_DISABLE): Likewise.
3044         (I386_DR_SET_RW_LEN): Likewise.
3045         (I386_DR_GET_RW_LEN): Likewise.
3046         (I386_DR_WATCH_HIT): Likewise.
3047         (i386_wp_op_t): Likewise.
3048         (i386_show_dr): Likewise.
3049         (i386_length_and_rw_bits): Likewise.
3050         (i386_insert_aligned_watchpoint): Likewise.
3051         (i386_remove_aligned_watchpoint): Likewise.
3052         (i386_handle_nonaligned_watchpoint): Likewise.
3053         i386_update_inferior_debug_regs(): Likewise.
3054         (i386_dr_insert_watchpoint): Likewise.
3055         (i386_dr_remove_watchpoint): Likewise.
3056         (i386_dr_region_ok_for_watchpoint): Likewise.
3057         (i386_dr_stopped_data_address): Likewise.
3058         (i386_dr_stopped_by_watchpoint): Likewise.
3059
3060 2014-06-19  Gary Benson  <gbenson@redhat.com>
3061
3062         * i386-low.c (i386_dr_show): Renamed to
3063         i386_show_dr and made static.  All uses updated.
3064         (i386_dr_length_and_rw_bits): Renamed to
3065         i386_length_and_rw_bits and made static.
3066         All uses updated.
3067         (i386_dr_insert_aligned_watchpoint): Renamed to
3068         i386_insert_aligned_watchpoint and made static.
3069         All uses updated.
3070         (i386_dr_remove_aligned_watchpoint): Renamed to
3071         i386_remove_aligned_watchpoint and made static.
3072         All uses updated.
3073         (i386_dr_update_inferior_debug_regs): Renamed to
3074         i386_update_inferior_debug_regs and made static.
3075         All uses updated.
3076
3077 2014-06-18  Gary Benson  <gbenson@redhat.com>
3078
3079         * i386-low.h (i386_dr_low_can_set_addr): New macro.
3080         (i386_dr_low_can_set_control): Likewise.
3081         (i386_get_debug_register_length): Likewise.
3082         * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
3083         (i386_dr_low_can_set_control): Likewise.
3084         (i386_get_debug_register_length): Likewise.
3085
3086 2014-06-17  Gary Benson  <gbenson@redhat.com>
3087
3088         * i386-low.h (i386-dregs.h): New include.
3089         (DR_FIRSTADDR): Now in i386-dregs.h.
3090         (DR_LASTADDR): Likewise.
3091         (DR_NADDR): Likewise.
3092         (DR_STATUS): Likewise.
3093         (DR_CONTROL): Likewise.
3094         (i386_debug_reg_state): Likewise.
3095         (i386_dr_insert_watchpoint): Likewise.
3096         (i386_dr_remove_watchpoint): Likewise.
3097         (i386_dr_region_ok_for_watchpoint): Likewise.
3098         (i386_dr_stopped_data_address): Likewise.
3099         (i386_dr_stopped_by_watchpoint): Likewise.
3100         * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
3101
3102 2014-06-18  Gary Benson  <gbenson@redhat.com>
3103
3104         * i386-low.h (i386_low_insert_watchpoint): Renamed to
3105         i386_dr_insert_watchpoint.
3106         (i386_low_remove_watchpoint): Renamed to
3107         i386_dr_remove_watchpoint.
3108         (i386_low_region_ok_for_watchpoint): Renamed to
3109         i386_dr_region_ok_for_watchpoint.
3110         (i386_low_stopped_data_address): Renamed to
3111         i386_dr_stopped_data_address.
3112         (i386_low_stopped_by_watchpoint): Renamed to
3113         i386_dr_stopped_by_watchpoint.
3114         * i386-low.c (i386_show_dr): Renamed to
3115         i386_dr_show and made nonstatic.  All uses updated.
3116         (i386_length_and_rw_bits): Renamed to
3117         i386_dr_length_and_rw_bits and made nonstatic.
3118         All uses updated.
3119         (i386_insert_aligned_watchpoint): Renamed to
3120         i386_dr_insert_aligned_watchpoint and made nonstatic.
3121         All uses updated.
3122         (i386_remove_aligned_watchpoint): Renamed to
3123         i386_dr_remove_aligned_watchpoint and made nonstatic.
3124         All uses updated.
3125         (i386_update_inferior_debug_regs): Renamed to
3126         i386_dr_update_inferior_debug_regs and made nonstatic.
3127         All uses updated.
3128         (i386_low_insert_watchpoint): Renamed to
3129         i386_dr_insert_watchpoint.  All uses updated.
3130         (i386_low_remove_watchpoint): Renamed to
3131         i386_dr_remove_watchpoint.  All uses updated.
3132         (i386_low_region_ok_for_watchpoint): Renamed to
3133         i386_dr_region_ok_for_watchpoint.  All uses updated.
3134         (i386_low_stopped_data_address): Renamed to
3135         i386_dr_stopped_data_address.  All uses updated.
3136         (i386_low_stopped_by_watchpoint): Renamed to
3137         i386_dr_stopped_by_watchpoint.  All uses updated.
3138
3139 2014-06-18  Gary Benson  <gbenson@redhat.com>
3140
3141         * i386-low.c (i386_dr_low_can_set_addr): New macro.
3142         (i386_dr_low_can_set_control): Likewise.
3143         (i386_insert_aligned_watchpoint): New check.
3144
3145 2014-06-18  Gary Benson  <gbenson@redhat.com>
3146
3147         * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3148         Renamed to state.
3149
3150 2014-06-18  Gary Benson  <gbenson@redhat.com>
3151
3152         * i386-low.c (i386_length_and_rw_bits): Use internal_error
3153         instead of fatal and error.
3154         (i386_handle_nonaligned_watchpoint): Likewise.
3155
3156 2014-06-18  Gary Benson  <gbenson@redhat.com>
3157
3158         * i386-low.c (i386_get_debug_register_length): New macro.
3159         (TARGET_HAS_DR_LEN_8): Remove conditional.  Use above macro.
3160         (i386_show_dr): Use debug_printf instead of fprintf.  Use
3161         phex to format values.
3162
3163 2014-06-18  Gary Benson  <gbenson@redhat.com>
3164
3165         * i386-low.h: Comment changes.
3166         * i386-low.c: Likewise.
3167
3168 2014-06-18  Gary Benson  <gbenson@redhat.com>
3169
3170         * i386-low.c: Whitespace changes.
3171
3172 2014-06-12  Tom Tromey  <tromey@redhat.com>
3173
3174         * utils.c (freeargv): Remove.
3175
3176 2014-06-12  Tom Tromey  <tromey@redhat.com>
3177
3178         * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3179         * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3180         (parse_debug_format_options): Likewise.
3181         (gdbserver_usage): Likewise.
3182         * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3183         (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3184         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3185         against libiberty.
3186         ($(LIBGNU)): Depend on libiberty.
3187         (all-lib): Recurse into all subdirs.
3188         (install-only): Invoke "install" target in subdirs.
3189         (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3190         targets.
3191         * configure: Rebuild.
3192         * configure.ac: Add ACX_CONFIGURE_DIR for libiberty.  Don't check
3193         for vasprintf, vsnprintf, or gettimeofday.
3194         * configure.srv: Don't add safe-ctype.o or lbasename.o to
3195         srv_tgtobj.
3196
3197 2014-06-05  Joel Brobecker  <brobecker@adacore.com>
3198
3199         * development.sh: Delete.
3200         * Makefile.in (config.status): Adjust dependency on development.sh.
3201         * configure.ac: Adjust development.sh source call.
3202         * configure: Regenerate.
3203
3204 2014-06-02  Pedro Alves  <palves@redhat.com>
3205
3206         * ax.c (gdb_free_agent_expr): New function.
3207         * ax.h (gdb_free_agent_expr): New declaration.
3208         * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3209         list.
3210         (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3211         static.
3212         (clear_breakpoint_conditions_and_commands): New function.
3213         * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3214         (clear_breakpoint_conditions_and_commands): New declaration.
3215
3216 2014-05-23  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
3217
3218         * linux-aarch64-low.c (asm/ptrace.h): Include.
3219
3220 2014-05-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
3221
3222         Fix TLS access for -static -pthread.
3223         * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3224         (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3225         (thread_db_load_search, try_thread_db_load_1): Initialize it.
3226
3227 2014-05-20  Pedro Alves  <palves@redhat.com>
3228
3229         * linux-aarch64-low.c (aarch64_insert_point)
3230         (aarch64_remove_point): No longer check whether the type is
3231         supported here.  Adjust to new interface.
3232         (the_low_target): Install aarch64_supports_z_point_type as
3233         supports_z_point_type method.
3234         * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3235         (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3236         instead of a Z packet char.  Adjust.
3237         (arm_supports_z_point_type): New function.
3238         (arm_insert_point, arm_remove_point): Adjust to new interface.
3239         (the_low_target): Install arm_supports_z_point_type.
3240         * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3241         (cris_insert_point, cris_remove_point): Adjust to new interface.
3242         Don't check whether the type is supported here.
3243         (the_low_target): Install cris_supports_z_point_type.
3244         * linux-low.c (linux_supports_z_point_type): New function.
3245         (linux_insert_point, linux_remove_point): Adjust to new interface.
3246         * linux-low.h (struct linux_target_ops) <insert_point,
3247         remove_point>: Take an enum raw_bkpt_type instead of a char.  Add
3248         raw_breakpoint pointer parameter.
3249         <supports_z_point_type>: New method.
3250         * linux-mips-low.c (mips_supports_z_point_type): New function.
3251         (mips_insert_point, mips_remove_point): Adjust to new interface.
3252         Use mips_supports_z_point_type.
3253         (the_low_target): Install mips_supports_z_point_type.
3254         * linux-ppc-low.c (the_low_target): Install NULL as
3255         supports_z_point_type method.
3256         * linux-s390-low.c (the_low_target): Install NULL as
3257         supports_z_point_type method.
3258         * linux-sparc-low.c (the_low_target): Install NULL as
3259         supports_z_point_type method.
3260         * linux-x86-low.c (x86_supports_z_point_type): New function.
3261         (x86_insert_point): Adjust to new insert_point interface.  Use
3262         insert_memory_breakpoint.  Adjust to new
3263         i386_low_insert_watchpoint interface.
3264         (x86_remove_point): Adjust to remove_point interface.  Use
3265         remove_memory_breakpoint.  Adjust to new
3266         i386_low_remove_watchpoint interface.
3267         (the_low_target): Install x86_supports_z_point_type.
3268         * lynx-low.c (lynx_target_ops): Install NULL as
3269         supports_z_point_type callback.
3270         * nto-low.c (nto_supports_z_point_type): New.
3271         (nto_insert_point, nto_remove_point): Adjust to new interface.
3272         (nto_target_ops): Install nto_supports_z_point_type.
3273         * mem-break.c: Adjust intro comment.
3274         (struct raw_breakpoint) <raw_type, size>: New fields.
3275         <inserted>: Update comment.
3276         <shlib_disabled>: Delete field.
3277         (enum bkpt_type) <gdb_breakpoint>: Delete value.
3278         <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3279         gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3280         (raw_bkpt_type_to_target_hw_bp_type): New function.
3281         (find_enabled_raw_code_breakpoint_at): New function.
3282         (find_raw_breakpoint_at): New type and size parameters.  Use them.
3283         (insert_memory_breakpoint): New function, based off
3284         set_raw_breakpoint_at.
3285         (remove_memory_breakpoint): New function.
3286         (set_raw_breakpoint_at): Reimplement.
3287         (set_breakpoint): New, based on set_breakpoint_at.
3288         (set_breakpoint_at): Reimplement.
3289         (delete_raw_breakpoint): Go through the_target->remove_point
3290         instead of assuming memory breakpoints.
3291         (find_gdb_breakpoint_at): Delete.
3292         (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3293         (find_gdb_breakpoint): New function.
3294         (set_gdb_breakpoint_at): Delete.
3295         (z_type_supported): New function.
3296         (set_gdb_breakpoint_1): New function, loosely based off
3297         set_gdb_breakpoint_at.
3298         (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3299         (delete_gdb_breakpoint_at): Delete.
3300         (delete_gdb_breakpoint_1): New function, loosely based off
3301         delete_gdb_breakpoint_at.
3302         (delete_gdb_breakpoint): New function.
3303         (clear_gdb_breakpoint_conditions): Rename to ...
3304         (clear_breakpoint_conditions): ... this.  Don't handle a NULL
3305         breakpoint.
3306         (add_condition_to_breakpoint): Make static.
3307         (add_breakpoint_condition): Take a struct breakpoint pointer
3308         instead of an address.  Adjust.
3309         (gdb_condition_true_at_breakpoint): Rename to ...
3310         (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3311         z_type parameter.
3312         (gdb_condition_true_at_breakpoint): Reimplement.
3313         (add_breakpoint_commands): Take a struct breakpoint pointer
3314         instead of an address.  Adjust.
3315         (gdb_no_commands_at_breakpoint): Rename to ...
3316         (gdb_no_commands_at_breakpoint_z_type): ... this.  Add z_type
3317         parameter.  Return true if no breakpoint was found.  Change debug
3318         output.
3319         (gdb_no_commands_at_breakpoint): Reimplement.
3320         (run_breakpoint_commands): Rename to ...
3321         (run_breakpoint_commands_z_type): ... this.  Add z_type parameter,
3322         and change return type to boolean.
3323         (run_breakpoint_commands): New function.
3324         (gdb_breakpoint_here): Also check for Z1 breakpoints.
3325         (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3326         breakpoint.  Go through the_target->remove_point instead of
3327         assuming memory breakpoint.
3328         (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3329         software and hardware breakpoints.
3330         (reinsert_raw_breakpoint): Go through the_target->insert_point
3331         instead of assuming memory breakpoint.
3332         (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3333         software and hardware breakpoints.
3334         (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3335         Check both software and hardware breakpoints.
3336         (validate_inserted_breakpoint): Assert the breakpoint is a
3337         software breakpoint.  Set the inserted flag to -1 instead of
3338         setting shlib_disabled.
3339         (delete_disabled_breakpoints): Adjust.
3340         (validate_breakpoints): Only validate software breakpoints.
3341         Adjust to inserted flag change.
3342         (check_mem_read, check_mem_write): Skip breakpoint types other
3343         than software breakpoints.  Adjust to inserted flag change.
3344         * mem-break.h (enum raw_bkpt_type): New enum.
3345         (raw_breakpoint, struct process_info): Forward declare.
3346         (Z_packet_to_target_hw_bp_type): Delete declaration.
3347         (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3348         (set_gdb_breakpoint, delete_gdb_breakpoint)
3349         (clear_breakpoint_conditions): New declarations.
3350         (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3351         (breakpoint_inserted_here): Update comment.
3352         (add_breakpoint_condition, add_breakpoint_commands): Replace
3353         address parameter with a breakpoint pointer parameter.
3354         (gdb_breakpoint_here): Update comment.
3355         (delete_gdb_breakpoint_at): Delete.
3356         (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3357         * server.c (process_point_options): Take a struct breakpoint
3358         pointer instead of an address.  Adjust.
3359         (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3360         delete_gdb_breakpoint.
3361         * spu-low.c (spu_target_ops): Install NULL as
3362         supports_z_point_type method.
3363         * target.h: Include mem-break.h.
3364         (struct target_ops) <prepare_to_access_memory>: Update comment.
3365         <supports_z_point_type>: New field.
3366         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3367         instead of a char.  Also take a raw breakpoint pointer.
3368         * win32-arm-low.c (the_low_target): Install NULL as
3369         supports_z_point_type.
3370         * win32-i386-low.c (i386_supports_z_point_type): New function.
3371         (i386_insert_point, i386_remove_point): Adjust to new interface.
3372         (the_low_target): Install i386_supports_z_point_type.
3373         * win32-low.c (win32_supports_z_point_type): New function.
3374         (win32_insert_point, win32_remove_point): Adjust to new interface.
3375         (win32_target_ops): Install win32_supports_z_point_type.
3376         * win32-low.h (struct win32_target_ops):
3377         <supports_z_point_type>: New method.
3378         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3379         instead of a char.  Also take a raw breakpoint pointer.
3380
3381 2014-05-20  Pedro Alves  <palves@redhat.com>
3382
3383         * mem-break.h: Include break-common.h.
3384         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3385         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3386         (Z_packet_to_target_hw_bp_type): New declaration.
3387         * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3388         * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3389         (Z_PACKET_ACCESS_WP): Delete macros.
3390         (Z_packet_to_hw_type): Delete function.
3391         * i386-low.h: Don't include break-common.h here.
3392         (Z_packet_to_hw_type): Delete declaration.
3393         * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3394         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3395         * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3396         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3397         * linux-aarch64-low.c: Don't include break-common.h here.
3398         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3399         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3400         (Z_packet_to_target_hw_bp_type): Delete function.
3401         * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3402         function.
3403         (mips_insert_point, mips_remove_point): Use
3404         Z_packet_to_target_hw_bp_type.
3405
3406 2014-05-20  Pedro Alves  <palves@redhat.com>
3407
3408         * linux-aarch64-low.c: Include break-common.h.
3409         (enum target_point_type): Delete.
3410         (Z_packet_to_point_type): Rename to ...
3411         (Z_packet_to_target_hw_bp_type): ... this, and return a
3412         target_hw_bp_type instead.
3413         (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3414         instead of an enum target_point_type.
3415         (aarch64_point_encode_ctrl_reg): Likewise.  Compute type mask from
3416         breakpoint type.
3417         (aarch64_dr_state_insert_one_point)
3418         (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3419         (aarch64_handle_aligned_watchpoint)
3420         (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3421         Take an enum target_hw_bp_type instead of an enum
3422         target_point_type.
3423         (aarch64_supports_z_point_type): New function.
3424         (aarch64_insert_point, aarch64_remove_point): Use it.  Adjust to
3425         use Z_packet_to_target_hw_bp_type.
3426
3427 2014-05-20  Joel Brobecker  <brobecker@adacore.com>
3428
3429         * configure.ac: Only use -Werror by default when DEVELOPMENT
3430         is true.
3431         * configure: Regenerate.
3432
3433 2014-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
3434
3435         Fix gdbserver qGetTLSAddr for x86_64 -m32.
3436         * linux-x86-low.c (X86_64_USER_REGS): New.
3437         (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3438
3439 2014-04-28  Yao Qi  <yao@codesourcery.com>
3440
3441         * Makefile.in (i386-avx512.c): Fix the typo of generated file
3442         name.
3443
3444 2014-04-25  Pedro Alves  <palves@redhat.com>
3445
3446         PR server/16255
3447         * linux-low.c (linux_attach_fail_reason_string): New function.
3448         (linux_attach_lwp): Delete.
3449         (linux_attach_lwp_1): Rename to ...
3450         (linux_attach_lwp): ... this.  Take a ptid instead of a pid as
3451         argument.  Remove "initial" parameter.  Return int instead of
3452         void.  Don't error or warn here.
3453         (linux_attach): Adjust to call linux_attach_lwp.  Call error on
3454         failure to attach to the tgid.  Call warning when failing to
3455         attach to an lwp.
3456         * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3457         argument.  Remove "initial" parameter.  Return int instead of
3458         void.  Don't error or warn here.
3459         (linux_attach_fail_reason_string): New declaration.
3460         * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3461         interface change.  Use linux_attach_fail_reason_string.
3462
3463 2014-04-24  Michael Sturm  <michael.sturm@mintel.com>
3464             Walfred Tedeschi  <walfred.tedeschi@intel.com>
3465
3466         * Makefile.in: Added rules to handle new files
3467         i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3468         amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3469         * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3470         (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3471         (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3472         (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3473         x32-avx512-linux.o.
3474         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3475         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3476         (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3477         i386/x32-avx512.xml.
3478         (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3479         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3480         i386/x32-avx512-linux.xml.
3481         * i387-fp.c (num_avx512_k_registers): New constant for number
3482         of K registers.
3483         (num_avx512_zmmh_low_registers): New constant for number of
3484         lower ZMM registers (0-15).
3485         (num_avx512_zmmh_high_registers): New constant for number of
3486         higher ZMM registers (16-31).
3487         (num_avx512_ymmh_registers): New contant for number of higher
3488         YMM registers (ymm16-31 added by avx521 on x86_64).
3489         (num_avx512_xmm_registers): New constant for number of higher
3490         XMM registers (xmm16-31 added by AVX512 on x86_64).
3491         (struct i387_xsave): Add space for AVX512 registers.
3492         (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3493         Add code to handle AVX512 registers.
3494         (i387_xsave_to_cache): Add code to handle AVX512 registers.
3495         * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3496         prototypei from generated file.
3497         (tdesc_amd64_avx512_linux): Likewise.
3498         (init_registers_x32_avx512_linux): Likewise.
3499         (tdesc_x32_avx512_linux): Likewise.
3500         (init_registers_i386_avx512_linux): Likewise.
3501         (tdesc_i386_avx512_linux): Likewise.
3502         (x86_64_regmap): Add AVX512 registers.
3503         (x86_linux_read_description): Add code to handle AVX512 XSTATE
3504         mask.
3505         (initialize_low_arch): Add code to initialize AVX512 registers.
3506
3507 2014-04-23  Pedro Alves  <palves@redhat.com>
3508
3509         * mem-break.c (find_gdb_breakpoint_at): Make static.
3510         * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3511
3512 2014-04-23  Pedro Alves  <palves@redhat.com>
3513
3514         * i386-low.c: Don't include break-common.h here.
3515         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3516         prototype to take target_hw_bp_type as argument instead of a Z
3517         packet char.
3518         * i386-low.h: Include break-common.h here.
3519         (Z_packet_to_hw_type): Declare.
3520         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3521         prototypes.
3522         * linux-x86-low.c (x86_insert_point): Convert the packet number to
3523         a target_hw_bp_type before calling i386_low_insert_watchpoint.
3524         (x86_remove_point): Convert the packet number to a
3525         target_hw_bp_type before calling i386_low_remove_watchpoint.
3526         * win32-i386-low.c (i386_insert_point): Convert the packet number
3527         to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3528         (i386_remove_point): Convert the packet number to a
3529         target_hw_bp_type before calling i386_low_remove_watchpoint.
3530
3531 2014-04-23  Pedro Alves  <palves@redhat.com>
3532
3533         * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3534
3535 2014-04-10  Pedro Alves  <palves@redhat.com>
3536
3537         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3538         Check if the condition or command is NULL before checking if the
3539         breakpoint is known.  On success, return true.
3540         * mem-break.h (add_breakpoint_condition): Document return.
3541         (add_breakpoint_commands): Add describing comment.
3542         * server.c (skip_to_semicolon): New function.
3543         (process_point_options): Use it.
3544
3545 2014-04-09  Pedro Alves  <palves@redhat.com>
3546
3547         * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3548         to lwpid_of.
3549
3550 2014-02-27  Pedro Alves  <palves@redhat.com>
3551
3552         PR 12702
3553         * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3554         macros.
3555         * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3556         output.
3557         (last_thread_of_process_p): Take a PID argument instead of a
3558         thread pointer.
3559         (linux_wait_for_lwp): Delete.
3560         (num_lwps, check_zombie_leaders, not_stopped_callback): New
3561         functions.
3562         (linux_low_filter_event): New function, party factored out from
3563         linux_wait_for_event.
3564         (linux_wait_for_event): Rename to ...
3565         (linux_wait_for_event_filtered): ... this.  Add new filter ptid
3566         argument.  Partly rewrite.  Always use waitpid(-1, WNOHANG) and
3567         sigsuspend.  Check for zombie leaders.
3568         (linux_wait_for_event): Reimplement as wrapper around
3569         linux_wait_for_event_filtered.
3570         (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED.  Assume that if
3571         a normal or signal exit is seen, it's the whole process exiting.
3572         (wait_for_sigstop): No longer a for_each_inferior callback.
3573         Rewrite on top of linux_wait_for_event_filtered.
3574         (stop_all_lwps): Call wait_for_sigstop directly.
3575         * server.c (resume, handle_target_event): Handle
3576         TARGET_WAITKIND_NO_RESUMED.
3577
3578 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
3579
3580         * win32-low.c (psapi_get_dll_name,
3581         * win32_CreateToolhelp32Snapshot): Delete.
3582         (win32_CreateToolhelp32Snapshot, win32_Module32First)
3583         (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3584         Delete.
3585         (handle_load_dll): Add function description.
3586         Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3587
3588 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
3589
3590         * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3591         Add comment.
3592         (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3593         base address when calling win32_add_one_solib.
3594         (handle_load_dll): Delete local variable load_addr.
3595         Remove 0x1000 offset applied to DLL base address when calling
3596         win32_add_one_solib.
3597         (handle_unload_dll): Add comment.
3598
3599 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
3600
3601         * win32-low.c (win32_add_all_dlls): Renames
3602         win32_ensure_ntdll_loaded.  Rewrite function documentation.
3603         Adjust implementation to always load all DLLs.
3604         Add 0x1000 offset to DLL base address when calling
3605         win32_add_one_solib.
3606         (child_initialization_done): New static global.
3607         (do_initial_child_stuff): Set child_initialization_done to
3608         zero during child initialization, and 1 after.  Replace call
3609         to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3610         Add comment.
3611         (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3612         (handle_unload_dll): Add function documentation.
3613         (get_child_debug_event): Ignore load and unload DLL events
3614         during child initialization.
3615
3616 2014-02-20  Doug Evans  <dje@google.com>
3617
3618         Remove global all_lwps.
3619         * inferiors.h (ptid_of): Move here from linux-low.h.
3620         (pid_of, lwpid_of): Ditto.
3621         * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3622         parameter is a struct thread_info * now.
3623         (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3624         directly.  Pass &all_threads to find_inferior instead of &all_lwps.
3625         (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3626         directly.
3627         (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3628         (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3629         * linux-arm-low.c (update_registers_callback): Update, "entry"
3630         parameter is a struct thread_info * now.
3631         Fetch lwpid from current_inferior directly.
3632         (arm_insert_point): Pass &all_threads to find_inferior instead of
3633         &all_lwps.
3634         (arm_remove_point): Ditto.
3635         (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3636         (arm_prepare_to_resume): Fetch pid from thread.
3637         (arm_read_description): Fetch lwpid from current_inferior directly.
3638         * linux-low.c (all_lwps): Delete.
3639         (delete_lwp): Delete call to remove_inferior.
3640         (handle_extended_wait): Fetch lwpid from thread.
3641         (add_lwp): Don't set lwp->entry.id.  Remove call to
3642         add_inferior_to_list.
3643         (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3644         (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3645         (kill_one_lwp_callback): Ditto.
3646         (linux_kill): Don't dereference NULL pointer.
3647         Fetch ptid,lwpid from thread.
3648         (get_detach_signal): Fetch ptid from thread.
3649         (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3650         Simplify call to regcache_invalidate_thread.
3651         (delete_lwp_callback): Update, "entry" parameter is a
3652         struct thread_info * now.  Fetch pid from thread.
3653         (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3654         (status_pending_p_callback): Update, "entry" parameter is a
3655         struct thread_info * now.  Fetch ptid from thread.
3656         (find_lwp_pid): Update, "entry" parameter is a
3657         struct thread_info * now.
3658         (linux_wait_for_lwp): Fetch pid from thread.
3659         (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3660         (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3661         (enqueue_one_deferred_signal): Fetch lwpid from thread.
3662         (dequeue_one_deferred_signal): Ditto.
3663         (cancel_breakpoint): Fetch ptid from current_inferior.
3664         (linux_wait_for_event): Pass &all_threads to find_inferior,
3665         not &all_lwps.  Fetch ptid, lwpid from thread.
3666         (count_events_callback): Update, "entry" parameter is a
3667         struct thread_info * now.
3668         (select_singlestep_lwp_callback): Ditto.
3669         (select_event_lwp_callback): Ditto.
3670         (cancel_breakpoints_callback): Ditto.
3671         (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3672         not &all_lwps.
3673         (select_event_lwp): Ditto.  Fetch ptid from event_thread.
3674         (unsuspend_one_lwp): Update, "entry" parameter is a
3675         struct thread_info * now.
3676         (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3677         not &all_lwps.
3678         (linux_stabilize_threads): Ditto.  And for for_each_inferior.
3679         Fetch lwpid from thread, not lwp.
3680         (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3681         Pass &all_threads to find_inferior, not &all_lwps.
3682         (send_sigstop): Fetch lwpid from thread, not lwp.
3683         (send_sigstop_callback): Update, "entry" parameter is a
3684         struct thread_info * now.
3685         (suspend_and_send_sigstop_callback): Ditto.
3686         (wait_for_sigstop): Ditto.  Fetch ptid, lwpid from thread, lwp.
3687         (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3688         struct thread_info * now.
3689         (move_out_of_jump_pad_callback): Ditto.  Fetch ptid, lwpid
3690         from thread, lwp.
3691         (lwp_running): Update, "entry" parameter is a
3692         struct thread_info * now.
3693         (stop_all_lwps): Fetch ptid from thread.
3694         Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3695         (linux_resume_one_lwp): Fetch lwpid from thread.
3696         (linux_set_resume_request): Update, "entry" parameter is a
3697         struct thread_info * now.  Fetch pid, lwpid from thread.
3698         (resume_status_pending_p): Update, "entry" parameter is a
3699         struct thread_info * now.
3700         (need_step_over_p): Ditto.  Fetch lwpid from thread.
3701         (start_step_over): Fetch lwpid from thread.
3702         (linux_resume_one_thread): Update, "entry" parameter is a
3703         struct thread_info * now.  Fetch lwpid from thread.
3704         (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3705         (proceed_one_lwp): Update, "entry" parameter is a
3706         struct thread_info * now.  Fetch lwpid from thread.
3707         (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3708         struct thread_info * now.
3709         (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3710         (unstop_all_lwps): Ditto.  Fetch lwpid from thread.
3711         (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3712         directly.
3713         (regsets_store_inferior_registers): Ditto.
3714         (fetch_register, store_register): Ditto.
3715         (linux_read_memory, linux_write_memory): Ditto.
3716         (linux_request_interrupt): Ditto.
3717         (linux_read_auxv): Ditto.
3718         (linux_xfer_siginfo): Ditto.
3719         (linux_qxfer_spu): Ditto.
3720         (linux_qxfer_libraries_svr4): Ditto.
3721         * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3722         moved to inferiors.h.
3723         (get_lwp): Delete.
3724         (get_thread_lwp): Update.
3725         (struct lwp_info): Delete member "entry".  Simplify comment for
3726         member "thread".
3727         (all_lwps): Delete.
3728         * linux-mips-low.c (mips_read_description): Fetch lwpid from
3729         current_inferior directly.
3730         (update_watch_registers_callback): Update, "entry" parameter is a
3731         struct thread_info * now.  Fetch pid from thread.
3732         (mips_linux_prepare_to_resume): Fetch ptid from thread.
3733         (mips_insert_point): Fetch lwpid from current_inferior.
3734         Pass &all_threads to find_inferior, not &all_lwps.
3735         (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3736         (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3737         directly.
3738         (mips_stopped_data_address): Ditto.
3739         * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3740         directly.
3741         * linux-tile-low.c (tile_arch_setup): Ditto.
3742         * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3743         (update_debug_registers_callback): Update, "entry" parameter is a
3744         struct thread_info * now.  Fetch pid from thread.
3745         (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3746         Pass &all_threads to find_inferior, not &all_lwps.
3747         (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3748         (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3749         Pass &all_threads to find_inferior, not &all_lwps.
3750         (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3751         (i386_dr_low_get_status): Ditto.
3752         (x86_linux_prepare_to_resume): Fetch ptid from thread.
3753         (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3754         (x86_linux_read_description): Ditto.
3755         * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3756
3757 2014-02-20  Doug Evans  <dje@google.com>
3758
3759         * inferiors.c (get_first_inferior): Fix buglet.
3760
3761 2014-02-19  Doug Evans  <dje@google.com>
3762
3763         * gdbthread.h (add_thread): Change result type to struct thread_info *.
3764         * inferiors.c (add_thread): Change result type to struct thread_info *.
3765         All callers updated.
3766         (add_lwp): Call add_thread here instead of in callers.
3767         All callers updated.
3768         * linux-low.h (get_lwp_thread): Rewrite.
3769         (struct lwp_info): New member "thread".
3770
3771 2014-02-19  Doug Evans  <dje@google.com>
3772
3773         * linux-low.c (add_lwp): Change result to struct lwp_info *.
3774         All callers updated.
3775
3776 2014-02-19  Doug Evans  <dje@google.com>
3777
3778         * inferiors.c (add_thread): Fix whitespace.
3779
3780 2014-02-19  Doug Evans  <dje@google.com>
3781
3782         * dll.c (clear_dlls): Replace accessing list implemention details
3783         with API function.
3784         * gdbthread.h (get_first_thread): Declare.
3785         * inferiors.c (for_each_inferior_with_data): New function.
3786         (get_first_thread): New function.
3787         (find_thread_ptid): Simplify.
3788         (get_first_inferior): New function.
3789         (clear_list): Delete.
3790         (one_inferior_p): New function.
3791         (clear_inferior_list): New function.
3792         (clear_inferiors): Update.
3793         * inferiors.h (for_each_inferior_with_data): Declare.
3794         (clear_inferior_list): Declare.
3795         (one_inferior_p): Declare.
3796         (get_first_inferior): Declare.
3797         * linux-low.c (linux_wait_for_event): Replace accessing list
3798         implemention details with API function.
3799         * server.c (target_running): Ditto.
3800         (accumulate_file_name_length): New function.
3801         (emit_dll_description): New function.
3802         (handle_qxfer_libraries): Replace accessing list implemention
3803         details with API function.
3804         (handle_qxfer_threads_worker): New function.
3805         (handle_qxfer_threads_proper): Replace accessing list implemention
3806         details with API function.
3807         (handle_query): Ditto.
3808         (visit_actioned_threads_callback_ftype): New typedef.
3809         (visit_actioned_threads_data): New struct.
3810         (visit_actioned_threads): Rewrite to be find_inferior callback.
3811         (resume): Call find_inferior.
3812         (handle_status): Replace accessing list implemention
3813         details with API function.
3814         (process_serial_event): Replace accessing list implemention details
3815         with API function.
3816         * target.c (set_desired_inferior): Replace accessing list implemention
3817         details with API function.
3818         * tracepoint.c (same_process_p): New function.
3819         (gdb_agent_about_to_close): Replace accessing list implemention
3820         details with API function.
3821         * win32-low.c (child_delete_thread): Replace accessing list
3822         implemention details with API function.
3823         (match_dll_by_basename): New function.
3824         (dll_is_loaded_by_basename): New function.
3825         (win32_ensure_ntdll_loaded): Replace accessing list implemention
3826         details call to dll_is_loaded_by_basename.
3827
3828 2014-02-19  Doug Evans  <dje@google.com>
3829
3830         * dll.h (struct dll_info): Add comment.
3831         * gdbthread.h (struct thread_info): Add comment.
3832         (current_ptid): Simplify.
3833         * inferiors.c (add_process): Update.
3834         (remove_process): Update.
3835         * inferiors.h (struct process_info): Rename member "head" to "entry".
3836         * linux-low.c (delete_lwp): Update.
3837         (add_lwp): Update.
3838         (last_thread_of_process_p): Update.
3839         (kill_one_lwp_callback, linux_kill): Update.
3840         (status_pending_p_callback): Update.
3841         (wait_for_sigstop): Update.  Simplify read of ptid.
3842         (start_step_over): Update.
3843         * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3844         (get_lwp_thread): Update.
3845         (struct lwp_info): Rename member "head" to "entry".
3846         * regcache.h (inferior_list_entry): Delete.
3847         * server.c (kill_inferior_callback): Update.
3848         (detach_or_kill_inferior_callback): Update.
3849         (print_started_pid): Update.
3850         (print_attached_pid): Update.
3851         (process_serial_event): Simplify read of ptid.
3852         * thread-db.c (thread_db_create_event): Update.
3853         (thread_db_get_tls_address): Update.
3854         * win32-low.c (current_inferior_ptid): Simplify.
3855
3856 2014-02-19  Tom Tromey  <tromey@redhat.com>
3857
3858         * target.h (struct target_ops) <supports_btrace>: Add target_ops
3859         argument.
3860         (target_supports_btrace): Update.
3861
3862 2014-02-14  Yao Qi  <yao@codesourcery.com>
3863
3864         * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3865         (rsp-low-ipa.o): New target.
3866
3867 2014-02-12  Tom Tromey  <tromey@redhat.com>
3868
3869         * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3870         convert_ascii_to_int.
3871         * regcache.c (registers_to_string): Likewise.
3872         * remote-utils.c (decode_M_packet): Likewise.
3873         * server.c (process_serial_event): Likewise.
3874
3875 2014-02-12  Tom Tromey  <tromey@redhat.com>
3876
3877         * server.c (handle_query, handle_v_run): Use hex2bin, not
3878         unhexify.
3879         * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3880
3881 2014-02-12  Tom Tromey  <tromey@redhat.com>
3882
3883         * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3884         convert_int_to_ascii.
3885         * regcache.c (registers_to_string, collect_register_as_string):
3886         Likewise.
3887         * remote-utils.c (look_up_one_symbol, relocate_instruction):
3888         Likewise.
3889         * server.c (process_serial_event): Likewise.
3890         * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3891         (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3892
3893 2014-02-12  Tom Tromey  <tromey@redhat.com>
3894
3895         * remote-utils.c (look_up_one_symbol, monitor_output): Use
3896         bin2hex, not hexify.
3897         * tracepoint.c (cmd_qtstatus): Likewise.
3898
3899 2014-02-12  Tom Tromey  <tromey@redhat.com>
3900
3901         * remote-utils.c (monitor_output): Pass explicit length to
3902         hexify.
3903
3904 2014-02-12  Tom Tromey  <tromey@redhat.com>
3905
3906         * tracepoint.c: Include rsp-low.h.
3907         * server.c: Include rsp-low.h.
3908         * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3909         (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3910         declare.
3911         * remote-utils.c: Include rsp-low.h.
3912         (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3913         (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3914         (convert_int_to_ascii, convert_ascii_to_int): Move to
3915         common/rsp-low.c.
3916         * regcache.c: Include rsp-low.h.
3917         * ax.c: Include rsp-low.h.
3918         * Makefile.in (SFILES): Add common/rsp-low.c.
3919         (OBS): Add rsp-low.o.
3920         (rsp-low.o): New target.
3921
3922 2014-02-12  Tom Tromey  <tromey@redhat.com>
3923
3924         * utils.h (pulongest, plongest, phex_nz): Don't declare.
3925         Include print-utils.h.
3926         * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3927         (plongest, thirty_two, phex_nz): Remove.
3928         * Makefile.in (SFILES): Add common/print-utils.c.
3929         (OBS): Add print-utils.o.
3930         (print-utils-ipa.o): New target.
3931         (print-utils.o): New target.
3932         (IPA_OBJS): Add print-utils-ipa.o.
3933
3934 2014-02-06  Tom Tromey  <tromey@redhat.com>
3935
3936         * Makefile.in (SFILES): Fix indentation.
3937
3938 2014-02-05  Doug Evans  <dje@google.com>
3939
3940         * linux-low.c (linux_wait_for_event): Improve comment.
3941         (linux_wait_1): Keep current_inferior in sync with event_child.
3942
3943 2014-01-22  Doug Evans  <dje@google.com>
3944
3945         * gdbthread.h (gdb_id_to_thread): Delete, unused.
3946
3947 2014-01-22  Doug Evans  <dje@google.com>
3948
3949         * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3950         * configure: Regenerate.
3951         * config.in: Regenerate.
3952         * Makefile.in (SFILES): Add debug.c.
3953         (OBS): Add debug.o.
3954         * debug.c: New file.
3955         * debug.h: New file.
3956         * linux-aarch64-low.c (*): Update all debugging printfs to use
3957         debug_printf instead of fprintf.
3958         * linux-arm-low.c (*): Ditto.
3959         * linux-cris-low.c (*): Ditto.
3960         * linux-crisv32-low.c (*): Ditto.
3961         * linux-m32r-low.c (*): Ditto.
3962         * linux-sparc-low.c (*): Ditto.
3963         * linux-x86.c (*): Ditto.
3964         * linux-low.c (*): Ditto.
3965         (linux_wait_1): Add calls to debug_enter, debug_exit.
3966         (linux_wait): Remove redundant debugging printf.
3967         (stop_all_lwps): Add calls to debug_enter, debug_exit.
3968         (linux_resume, unstop_all_lwps): Ditto.
3969         * mem-break.c (*): Update all debugging printfs to use
3970         debug_printf instead of fprintf.
3971         * remote-utils.c (*): Ditto.
3972         * thread-db.c (*): Ditto.
3973         * server.c #include <ctype.h>, "gdb_vecs.h".
3974         (debug_threads): Moved to debug.c.
3975         (*): Update all debugging printfs to use debug_printf instead of
3976         fprintf.
3977         (start_inferior): Replace call to fflush with call to debug_flush.
3978         (monitor_show_help): Mention set debug-format.
3979         (parse_debug_format_options): New function.
3980         (handle_monitor_command): Handle "monitor set debug-format".
3981         (gdbserver_usage): Mention --debug-format.
3982         (main): Parse --debug-format.
3983         * server.h (debug_threads): Declaration moved to debug.h.
3984         #include "debug.h".
3985         * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3986         trace_debug_1 that uses debug_printf.
3987         (tracepoint_look_up_symbols): Update all debugging printfs to use
3988         debug_printf instead of fprintf.
3989
3990 2014-01-20  Baruch Siach  <baruch@tkos.co.il>
3991
3992         * linux-xtensa-low.c: Include asm/ptrace.h instead of
3993         sys/ptrace.h.
3994
3995 2014-01-17  Pedro Alves  <palves@redhat.com>
3996
3997         PR build/16445
3998         * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3999         defined after including gdb_proc_service.h.
4000
4001 2014-01-16  Doug Evans  <dje@google.com>
4002
4003         * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
4004         (match_dll): Use it.
4005
4006 2014-01-16  Markus Metzger  <markus.t.metzger@intel.com>
4007
4008         * target.h (target_ops) <read_btrace>: Change parameters and
4009         return type to allow error reporting.
4010         * server.c (handle_qxfer_btrace): Support delta reads.  Pass
4011         trace reading errors on.
4012         * linux-low.c (linux_low_read_btrace): Pass trace reading
4013         errors on.
4014         (linux_low_disable_btrace): New.
4015
4016 2014-01-15  Doug Evans  <dje@google.com>
4017
4018         * inferiors.c (thread_id_to_gdb_id): Delete.
4019         * inferiors.h (thread_id_to_gdb_id): Delete.
4020
4021 2014-01-13  Eli Zaretskii  <eliz@gnu.org>
4022
4023         * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
4024         "-I$(srcdir)/../".  Fixes MinGW compilation errors with old GCC
4025         versions.
4026
4027 2014-01-08  Pedro Alves  <palves@redhat.com>
4028
4029         * server.c (handle_status): Don't discard previous queued stop
4030         replies or thread's pending status here.
4031         (main) <disconnection>: Do it here instead.
4032
4033 2014-01-08  Pedro Alves  <palves@redhat.com>
4034
4035         * gdbthread.h (struct thread_info) <status_pending_p>: New field.
4036         * server.c (visit_actioned_threads, handle_pending_status): New
4037         function.
4038         (handle_v_cont): Factor out parts to ...
4039         (resume): ... this new function.  If in all-stop, and a thread
4040         being resumed has a pending status, report it without actually
4041         resuming.
4042         (myresume): Adjust to use the new 'resume' function.
4043         (clear_pending_status_callback, set_pending_status_callback)
4044         (find_status_pending_thread_callback): New functions.
4045         (handle_status): Handle the case of multiple threads having
4046         interesting statuses to report.  Report threads' real last signal
4047         instead of always reporting GDB_SIGNAL_TRAP.  Look for a thread
4048         with an interesting thread to report the status for, instead of
4049         always reporting the status of the first thread.
4050
4051 2014-01-01  Joel Brobecker  <brobecker@adacore.com>
4052
4053         * gdbserver.c (gdbserver_version): Set copyright year to 2014.
4054         * gdbreplay.c (gdbreplay_version): Likewise.
4055
4056 2013-12-18  Yufeng Zhang  <yufeng.zhang@arm.com>
4057
4058         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
4059         iov.iov_len with the real length in use.
4060
4061 2013-12-13  Joel Brobecker  <brobecker@adacore.com>
4062
4063         * Makefile.in (safe-ctype.o, lbasename.o): New rules.
4064         * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
4065         for all targets that use win32-low.c.
4066         * win32-low.c (win32_ensure_ntdll_loaded): New function.
4067         (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
4068
4069 2013-12-13  Pedro Alves  <palves@redhat.com>
4070
4071         * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
4072         if equal to TARGET_WAITKIND_LOADED.
4073         * win32-low.c (cached_status): New static global.
4074         (win32_wait): Add declaration.
4075         (do_initial_child_stuff): Flush all initial pending debug events
4076         up to the initial breakpoint.
4077         (win32_wait): If CACHED_STATUS was set, return that instead
4078         of doing a real wait.  Remove the code resuming the execution
4079         of the inferior after receiving a TARGET_WAITKIND_LOADED event
4080         during the initial phase.  Also remove the code changing
4081         OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
4082         TARGET_WAITKIND_STOPPED.
4083
4084 2013-12-11  Yao Qi  <yao@codesourcery.com>
4085
4086         * notif.c (handle_notif_ack): Return 0 if no notification
4087         matches.
4088
4089 2013-11-20  Doug Evans  <dje@google.com>
4090
4091         * linux-low.c (linux_set_resume_request): Fix comment.
4092
4093 2013-11-20  Doug Evans  <dje@google.com>
4094
4095         * linux-low.c (resume_status_pending_p): Tweak comment.
4096
4097 2013-11-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4098
4099         * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
4100         amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
4101         * configure.srv (srv_i386_regobj): Add i386-mpx.o.
4102         (srv_i386_linux_regobj): Add i386-mpx-linux.o.
4103         (srv_amd64_regobj): Add amd64-mpx.o.
4104         (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
4105         (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
4106         (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
4107         * i387-fp.c (num_pl_bnd_register) Added constant.
4108         (num_pl_bnd_cfg_registers) Added constant.
4109         (struct i387_xsave) Added reserved area and MPX fields.
4110         (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
4111         * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
4112         function.
4113         (tdesc_i386_mpx_linux): Add MPX amd64 target.
4114         (init_registers_amd64_mpx_linux): Declare new function.
4115         (tdesc_amd64_mpx_linux): Add MPX amd64 target.
4116         (x86_64_regmap): Add MPX registers.
4117         (x86_linux_read_description): Add MPX case.
4118         (initialize_low_arch): Initialize MPX targets.
4119
4120 2013-11-18  Tom Tromey  <tromey@redhat.com>
4121
4122         * configure: Rebuild.
4123         * configure.ac: Don't check for stdlib.h.
4124         * gdbreplay.c: Unconditionally include stdlib.h.
4125
4126 2013-11-18  Tom Tromey  <tromey@redhat.com>
4127
4128         * config.in: Rebuild.
4129         * configure: Rebuild.
4130         * configure.ac: Don't use AC_HEADER_DIRENT.
4131
4132 2013-11-18  Tom Tromey  <tromey@redhat.com>
4133
4134         * server.h: Don't check HAVE_STRING_H.
4135         * gdbreplay.c: Don't check HAVE_STRING_H.
4136         * configure: Rebuild.
4137
4138 2013-11-18  Tom Tromey  <tromey@redhat.com>
4139
4140         * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4141         LIBGNU.
4142
4143 2013-11-08  Tom Tromey  <tromey@redhat.com>
4144
4145         * configure, config.in: Rebuild.
4146         * configure.ac: Remove unused configury.
4147
4148 2013-11-08  Tom Tromey  <tromey@redhat.com>
4149
4150         * acinclude.m4: Include common.m4, codeset.m4.
4151         * configure, config.in: Rebuild.
4152         * configure.ac: Use GDB_AC_COMMON.
4153
4154 2013-11-06  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4155
4156         * linux-s390-low.c (HWCAP_S390_TE): New define.
4157         (s390_arch_setup): Consider the TE field in the HWCAP for
4158         determining 'have_regset_tdb'.
4159
4160 2013-10-16  Sergio Durigan Junior  <sergiodj@redhat.com>
4161
4162         PR gdb/16014
4163         * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4164         call to sizeof.
4165
4166 2013-10-02  Pedro Alves  <palves@redhat.com>
4167
4168         * server.c (process_serial_event): Don't output "GDBserver
4169         exiting" if GDB is connected through stdio.
4170         * target.c (mywait): Likewise, be silent if GDB is connected
4171         through stdio.
4172
4173 2013-10-01  Joel Brobecker  <brobecker@adacore.com>
4174
4175         * lynx-low.c (lynx_add_threads_after_attach): New function.
4176         (lynx_attach): Remove call to add_thread.  Add call to
4177         lynx_add_threads_after_attach instead.
4178
4179 2013-09-28  Mike Frysinger  <vapier@gentoo.org>
4180
4181         * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4182         * config.in, configure: Regenerated.
4183
4184 2013-09-18  Yao Qi  <yao@codesourcery.com>
4185
4186         PR server/15959
4187         * server.c (start_inferior): Clear 'resume_info'.
4188
4189 2013-09-16  Jiong Wang  <jiwang@tilera.com>
4190
4191         * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4192         for each register.
4193
4194 2013-09-16  Jiong Wang  <jiwang@tilera.com>
4195
4196         * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4197         linux-tile-low.o to srv_tgtobj.
4198
4199 2013-09-16  Will Newton  <will.newton@linaro.org>
4200
4201         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4202         out regs.
4203
4204 2013-09-06  Pedro Alves  <palves@redhat.com>
4205
4206         * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4207         (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4208         (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4209         (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4210         (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4211         (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4212
4213 2013-09-06  Pedro Alves  <palves@redhat.com>
4214
4215         * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4216         explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4217
4218 2013-09-06  Pedro Alves  <palves@redhat.com>
4219
4220         * linux-amd64-ipa.c: Include tracepoint.h.
4221         * linux-i386-ipa.c: Include tracepoint.h.
4222
4223 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
4224
4225         * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4226         (ps_get_thread_area): New function.
4227
4228 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
4229
4230         * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4231         (initialize_low_arch): Call init_registers_crisv32 rather than
4232         init_register_crisv32.
4233
4234 2013-09-05  Pedro Alves  <palves@redhat.com>
4235
4236         * server.h (handle_vFile, hostio_last_error_from_errno): Move
4237         to ...
4238         * hostio.h: ... this new file.
4239         * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4240         win32-low.c: Include hostio.h.
4241
4242 2013-09-05  Pedro Alves  <palves@redhat.com>
4243
4244         * server.h (gdb_client_data, handler_func, callback_handler_func)
4245         (delete_file_handler, add_file_handler, append_callback_event)
4246         (delete_callback_event, start_event_loop, initialize_event_loop):
4247         Move to event-loop.h and include it.
4248         * event-loop.h: New file.
4249
4250 2013-09-05  Pedro Alves  <palves@redhat.com>
4251
4252         * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4253         * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4254         (loaded_dll, unloaded_dll): Move to ...
4255         * dll.h: ... this new file.
4256         * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4257
4258 2013-09-05  Pedro Alves  <palves@redhat.com>
4259
4260         * server.h (current_process, get_thread_process, all_processes)
4261         (add_inferior_to_list, for_each_inferior, current_inferior)
4262         (remove_inferior, add_process, remove_process, find_process_pid)
4263         (have_started_inferiors_p, have_attached_inferiors_p)
4264         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4265         (clear_inferiors, find_inferior, find_inferior_id)
4266         (inferior_target_data, set_inferior_target_data)
4267         (inferior_regcache_data, set_inferior_regcache_data): Move to
4268         inferiors.h, and include it.
4269         * inferiors.h: New file.
4270
4271 2013-09-05  Pedro Alves  <palves@redhat.com>
4272
4273         * server.h (struct emit_ops, current_insn_ptr, emit_error):
4274         Move ...
4275         * ax.h: ... here.
4276
4277 2013-09-05  Pedro Alves  <palves@redhat.com>
4278
4279         * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4280         tracepoint.h.
4281         * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4282         (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4283         (handle_tracepoint_general_set, handle_tracepoint_query)
4284         (tracepoint_finished_step, tracepoint_was_hit)
4285         (release_while_stepping_state_list, current_traceframe)
4286         (in_readonly_region, traceframe_read_mem)
4287         (fetch_traceframe_registers, traceframe_read_sdata)
4288         (traceframe_read_info, struct fast_tpoint_collect_status)
4289         (fast_tracepoint_collecting, force_unlock_trace_buffer)
4290         (handle_tracepoit_bkpts, initialize_low_tracepoint)
4291         (supply_fast_tracepoint_registers)
4292         (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4293         (ipa_tdesc, claim_trampoline_space)
4294         (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4295         (agent_mem_read, agent_get_trace_state_variable_value)
4296         (agent_set_trace_state_variable_value, agent_tsv_read)
4297         (agent_mem_read_string, get_raw_reg_func_addr)
4298         (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4299         * tracepoint.h: ... this new file.
4300
4301 2013-09-05  Pedro Alves  <palves@redhat.com>
4302
4303         * server.h (perror_with_name, error, fatal, warning, paddress)
4304         (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4305         include it.
4306         * utils.h: New file.
4307
4308 2013-09-05  Pedro Alves  <palves@redhat.com>
4309
4310         * server.h (remote_debug, noack_mode, transport_is_reliable)
4311         (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4312         (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4313         (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4314         (write_enn, initialize_async_io, enable_async_io)
4315         (disable_async_io, check_remote_input_interrupt_request)
4316         (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4317         (dead_thread_notify, prepare_resume_reply)
4318         (decode_address_to_semicolon, decode_address, decode_m_packet)
4319         (decode_M_packet, decode_X_packet, decode_xfer_write)
4320         (decode_search_memory_packet, unhexify, hexify)
4321         (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4322         (look_up_one_symbol, relocate_instruction)
4323         (monitor_output): Move to remote-utils.h, and include it.
4324         * remote-utils.h: New file.
4325
4326 2013-09-05  Pedro Alves  <palves@redhat.com>
4327
4328         * server.h (_): Delete.
4329
4330 2013-09-02  Pedro Alves  <palves@redhat.com>
4331
4332         * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4333         (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4334         allocated.
4335         (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4336
4337 2013-09-02  Pierre Muller  <muller@sourceware.org>
4338
4339         * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4340         or WriteProcessMemory complete successfully and handle
4341         ERROR_PARTIAL_COPY error.
4342
4343 2013-09-02  Pedro Alves  <palves@redhat.com>
4344
4345         * server.c (gdb_read_memory): Return -1 on traceframe memory read
4346         error instead of EIO.
4347
4348 2013-08-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
4349
4350         PR server/15604
4351         * linux-low.c: Include filestuff.h.
4352         (linux_create_inferior) <pid == 0>: Call close_most_fds.
4353         * lynx-low.c: Include filestuff.h.
4354         (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4355         * server.c: Include filestuff.h.
4356         (main): Call notice_open_fds.
4357         * spu-low.c: Include filestuff.h.
4358         (spu_create_inferior) <pid == 0>: Call close_most_fds.
4359
4360 2013-08-22  Luis Machado  <lgustavo@codesourcery.com>
4361
4362         * Makefile.in: Explain why ../target and ../nat are not
4363         listed as include file search paths.
4364         (linux-waitpid.o): New object file rule.
4365         * configure.srv (srv_native_linux_obj): New variable.
4366         Replace all occurrences of linux native object files with
4367         $srv_native_linux_obj.
4368         * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4369         (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4370         (linux_enable_event_reporting): Remove declaration.
4371         (my_waitpid): Moved to common/linux-waitpid.c.
4372         (linux_wait_for_event): Pass ptid when calling
4373         linux_enable_event_reporting.
4374         (linux_supports_tracefork_flag): Remove.
4375         (linux_enable_event_reporting): Likewise.
4376         (linux_tracefork_grandchild): Remove.
4377         (STACK_SIZE): Moved to common/linux-ptrace.c.
4378         (linux_tracefork_child): Remove.
4379         (linux_test_for_tracefork): Remove.
4380         (linux_look_up_symbols): Call linux_supports_traceclone.
4381         (initialize_low): Remove call to linux_test_for_tracefork.
4382         * linux-low.h (PTRACE_TYPE_ARG3): Move to
4383         common/linux-ptrace.h.
4384         (PTRACE_TYPE_ARG4): Likewise.
4385         Include linux-ptrace.h.
4386
4387 2013-08-21  Pedro Alves  <palves@redhat.com>
4388
4389         * config.in: Renegerate.
4390
4391 2013-08-19  Luis Machado  <lgustavo@codesourcery.com>
4392
4393         * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4394         (SFILES): Remove $(srcdir)/common/target-common.c and
4395         add $(srcdir)/target/waitstatus.c.
4396         (OBS): Remove target-common.o and add waitstatus.o.
4397         (server_h): Remove $(srcdir)/../common/target-common.h and
4398         add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4399         and $(srcdir)/../target/waitstatus.h.
4400         (target-common.o): Remove.
4401         (waitstatus.o): New target object file.
4402         * target.h: Do not include target-common.h and
4403         include target/resume.h, target/wait.h and
4404         target/waitstatus.h.
4405
4406 2013-08-13  Luis Machado  <lgustavo@codesourcery.com>
4407
4408         * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4409         to PTRACE_TYPE_ARG3.
4410         * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4411         to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4412         PTRACE_TYPE_ARG4.
4413         * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4414         (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4415
4416 2013-07-27  Jie Zhang  <jie@codesourcery.com>
4417             Daniel Jacobowitz  <dan@codesourcery.com>
4418             Yao Qi  <yao@codesourcery.com>
4419
4420         * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4421         (mips-linux-watch.o): New rule.
4422         (mips_linux_watch_h): New variable.
4423         * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4424         srv_tgtobj.
4425         * linux-mips-low.c: Include mips-linux-watch.h.
4426         (struct arch_process_info, struct arch_lwp_info): New.
4427         (update_watch_registers_callback): New function.
4428         (mips_linux_new_process, mips_linux_new_thread) New functions.
4429         (mips_linux_prepare_to_resume, mips_insert_point): New
4430         functions.
4431         (mips_remove_point, mips_stopped_by_watchpoint): New
4432         functions.
4433         (rsp_bp_type_to_target_hw_bp_type): New function.
4434         (mips_stopped_data_address): New function.
4435         (the_low_target): Add watchpoint support functions.
4436
4437 2013-07-27  Yao Qi  <yao@codesourcery.com>
4438
4439         * i386-low.c: Include break-common.h.
4440         (enum target_hw_bp_type): Remove.
4441
4442 2013-07-24  Luis Machado  <lgustavo@codesourcery.com>
4443
4444         * Makefile.in (SFILES): /common/target-common.c.
4445         (OBS): Add target-common.o.
4446         (server_h): Add $(srcdir)/../common/target-common.h.
4447         (target-common.o): New target.
4448         * server.c (queue_stop_reply_callback): Free
4449         status string after use.
4450         * target.c (target_waitstatus_to_string): Remove.
4451         * target.h: Include target-common.h.
4452         (resume_kind): Likewise.
4453         (target_waitkind): Likewise.
4454         (target_waitstatus): Likewise.
4455         (TARGET_WNOHANG): Likewise.
4456
4457 2013-07-04  Yao Qi  <yao@codesourcery.com>
4458
4459         * Makefile.in (host_alias): Use @host_noncanonical@.
4460         (target_alias): Use @target_noncanonical@.
4461         * configure.ac: Use ACX_NONCANONICAL_TARGET and
4462         ACX_NONCANONICAL_HOST.
4463         * configure: Regenerated.
4464
4465         Revert:
4466         2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
4467
4468         * configure.ac (version_host, version_target): Set and AC_SUBST them.
4469         * configure: Rebuild.
4470         * Makefile.in (version_host, version_target): Get from configure.
4471         (version.c): Use $(version_host) and $(version_target).
4472
4473 2013-07-03  Pedro Alves  <palves@redhat.com>
4474
4475         * Makefile.in (config.status): Depend on development.sh.
4476         * acinclude.m4: Include libmcheck.m4.
4477         * configure: Regenerate.
4478
4479 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
4480
4481         * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4482         attribute inside the parentheses.
4483         (winapi_DebugSetProcessKillOnExit): Ditto.
4484         (winapi_DebugBreakProcess): Ditto.
4485         (winapi_GenerateConsoleCtrlEvent): Ditto.
4486
4487 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
4488
4489         * notif.h (notif_event): Add a dummy member to avoid compiler
4490         errors.
4491
4492 2013-07-01  Pedro Alves  <palves@redhat.com>
4493
4494         * hostio.c (HOSTIO_PATH_MAX): Define.
4495         (require_filename, handle_open, handle_unlink, handle_readlink):
4496         Use it.
4497
4498 2013-07-01  Pedro Alves  <palves@redhat.com>
4499
4500         * server.h: Include "pathmax.h".
4501         * linux-low.c: Don't include sys/param.h.
4502         (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4503         MAXPATHLEN.
4504         * win32-low.c: Don't include sys/param.h.
4505         (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4506
4507 2013-07-01  Pedro Alves  <palves@redhat.com>
4508
4509         * event-loop.c: Don't check HAVE_UNISTD_H before including
4510         <unistd.h>.
4511         * gdbreplay.c: Likewise.
4512         * remote-utils.c: Likewise.
4513         * server.c: Likewise.
4514         * configure.ac: Don't check for unistd.h.
4515         * configure: Regenerate.
4516
4517 2013-06-28  Tom Tromey  <tromey@redhat.com>
4518
4519         * Makefile.in (version.c): Use version.in, not
4520         common/version.in.
4521
4522 2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
4523
4524         * configure.ac (version_host, version_target): Set and AC_SUBST them.
4525         * configure: Rebuild.
4526         * Makefile.in (version_host, version_target): Get from configure.
4527         (version.c): Use $(version_host) and $(version_target).
4528
4529 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
4530
4531         Fix trace-status to output user name without trailing colon.
4532         * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4533
4534 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
4535
4536         Fix trace-status to output proper start-time and stop-time.
4537         * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4538         output start time and stop time in hex as gdb expects.
4539
4540 2013-06-26  Pedro Alves  <pedro@codesourcery.com>
4541
4542         * tracepoint.c (build_traceframe_info_xml): Output trace state
4543         variables present in the trace buffer.
4544
4545 2013-06-24  Tom Tromey  <tromey@redhat.com>
4546
4547         * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4548         create-version.sh.
4549         (version.o): Remove.
4550         * gdbreplay.c: Include version.h.
4551         (version, host_name): Don't declare.
4552         * server.h: Include version.h.
4553         (version, host_name): Don't declare.
4554
4555 2013-06-12  Pedro Alves  <palves@redhat.com>
4556
4557         * linux-x86-low.c (linux_is_elf64): Delete global.
4558         (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4559         with local linux_pid_exe_is_elf_64_file use.
4560
4561 2013-06-11  Pedro Alves  <palves@redhat.com>
4562
4563         * linux-low.c (regset_disabled, disable_regset): New functions.
4564         (regsets_fetch_inferior_registers)
4565         (regsets_store_inferior_registers): Use them.
4566         (initialize_regsets_info); Don't allocate the disabled_regsets
4567         array here.
4568         * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4569         comment.
4570
4571 2013-06-11  Pedro Alves  <palves@redhat.com>
4572
4573         * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4574         xmalloc.
4575
4576 2013-06-11  Pedro Alves  <palves@redhat.com>
4577
4578         * linux-x86-low.c (initialize_low_arch): Call
4579         init_registers_x32_avx_linux.
4580
4581 2013-06-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
4582
4583         Fix compatibility with Android Bionic.
4584         * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4585         it is not empty.
4586
4587 2013-06-07  Pedro Alves  <palves@redhat.com>
4588
4589         PR server/14823
4590         * Makefile.in (OBS): Add tdesc.o.
4591         (IPA_OBJS): Add tdesc-ipa.o.
4592         (tdesc-ipa.o): New rule.
4593         * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4594         interface.
4595         * linux-low.c (new_inferior): Delete.
4596         (disabled_regsets, num_regsets): Delete.
4597         (linux_add_process): Adjust to set the new per-process
4598         new_inferior flag.
4599         (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4600         (linux_wait_for_lwp): Adjust.  Only call arch_setup if the event
4601         was a stop.  When calling arch_setup, switch the current inferior
4602         to the thread that got an event.
4603         (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4604         (regsets_fetch_inferior_registers)
4605         (regsets_store_inferior_registers): New regsets_info parameter.
4606         Adjust to use it.
4607         (linux_register_in_regsets): New regs_info parameter.  Adjust to
4608         use it.
4609         (register_addr, fetch_register, store_register): New usrregs_info
4610         parameter.  Adjust to use it.
4611         (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4612         parameter regs_info.  Adjust to use it.
4613         (linux_fetch_registers): Get the current inferior's regs_info, and
4614         adjust to use it.
4615         (linux_store_registers): Ditto.
4616         [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4617         (initialize_low): Don't initialize the target_regsets here.  Call
4618         initialize_low_arch.
4619         * linux-low.h (target_regsets): Delete declaration.
4620         (struct regsets_info): New.
4621         (struct usrregs_info): New.
4622         (struct regs_info): New.
4623         (struct process_info_private) <new_inferior>: New field.
4624         (struct linux_target_ops): Delete the num_regs, regmap, and
4625         regset_bitmap fields.  New field regs_info.
4626         [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4627         * i387-fp.c (num_xmm_registers): Delete.
4628         (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4629         calls to new interface.
4630         (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4631         (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4632         Infer the number of xmm registers from the regcache's target
4633         description.
4634         * i387-fp.h (num_xmm_registers): Delete.
4635         * inferiors.c (add_thread): Don't install the thread's regcache
4636         here.
4637         * proc-service.c (gregset_info): Fetch the current inferior's
4638         regs_info.  Adjust to use it.
4639         * regcache.c: Include tdesc.h.
4640         (register_bytes, reg_defs, num_registers)
4641         (gdbserver_expedite_regs): Delete.
4642         (get_thread_regcache): If the thread doesn't have a regcache yet,
4643         create one, instead of aborting gdbserver.
4644         (regcache_invalidate_one): Rename to ...
4645         (regcache_invalidate_thread): ... this.
4646         (regcache_invalidate_one): New.
4647         (regcache_invalidate): Only invalidate registers of the current
4648         process.
4649         (init_register_cache): Add target_desc parameter, and use it.
4650         (new_register_cache): Ditto.  Assert the target description has a
4651         non zero registers_size.
4652         (regcache_cpy): Add assertions.  Adjust.
4653         (realloc_register_cache, set_register_cache): Delete.
4654         (registers_to_string, registers_from_string): Adjust.
4655         (find_register_by_name, find_regno, find_register_by_number)
4656         (register_cache_size): Add target_desc parameter, and use it.
4657         (free_register_cache_thread, free_register_cache_thread_one)
4658         (regcache_release, register_cache_size): New.
4659         (register_size): Add target_desc parameter, and use it.
4660         (register_data, supply_register, supply_register_zeroed)
4661         (supply_regblock, supply_register_by_name, collect_register)
4662         (collect_register_as_string, collect_register_by_name): Adjust.
4663         * regcache.h (struct target_desc): Forward declare.
4664         (struct regcache) <tdesc>: New field.
4665         (init_register_cache, new_register_cache): Add target_desc
4666         parameter.
4667         (regcache_invalidate_thread): Declare.
4668         (regcache_invalidate_one): Delete declaration.
4669         (regcache_release): Declare.
4670         (find_register_by_number, register_cache_size, register_size)
4671         (find_regno): Add target_desc parameter.
4672         (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4673         declarations.
4674         * remote-utils.c: Include tdesc.h.
4675         (outreg, prepare_resume_reply): Adjust.
4676         * server.c: Include tdesc.h.
4677         (gdbserver_xmltarget): Delete declaration.
4678         (get_features_xml, process_serial_event): Adjust.
4679         * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4680         declare.
4681         (struct process_info) <tdesc>: New field.
4682         (ipa_tdesc): Declare.
4683         * tdesc.c: New file.
4684         * tdesc.h: New file.
4685         * tracepoint.c: Include tdesc.h.
4686         [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4687         (get_context_regcache): Adjust to pass ipa_tdesc down.
4688         (do_action_at_tracepoint): Adjust to get the register cache size
4689         from the context regcache's description.
4690         (traceframe_walk_blocks): Adjust to get the register cache size
4691         from the current trace frame's description.
4692         (traceframe_get_pc): Adjust to get current trace frame's
4693         description and pass it down.
4694         (gdb_collect): Adjust to get the register cache size from the
4695         IPA's description.
4696         * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4697         (gdbserver_xmltarget): Delete.
4698         (initialize_low_tracepoint): Set the ipa's target description.
4699         * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4700         (initialize_low_tracepoint): Set the ipa's target description.
4701         * linux-x86-low.c: Include tdesc.h.
4702         [__x86_64__] (is_64bit_tdesc): New.
4703         (ps_get_thread_area, x86_get_thread_area): Use it.
4704         (i386_cannot_store_register): Rename to ...
4705         (x86_cannot_store_register): ... this.  Use is_64bit_tdesc.
4706         (i386_cannot_fetch_register): Rename to ...
4707         (x86_cannot_fetch_register): ... this.  Use is_64bit_tdesc.
4708         (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4709         to new interface.
4710         (target_regsets): Rename to ...
4711         (x86_regsets): ... this.
4712         (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4713         interface.
4714         (x86_siginfo_fixup): Use is_64bit_tdesc.
4715         [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4716         (tdesc_x32_avx_linux, tdesc_x32_linux)
4717         (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4718         Declare.
4719         (x86_linux_update_xmltarget): Delete.
4720         (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4721         (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4722         (AMD64_LINUX_USER64_CS): New.
4723         (x86_linux_read_description): New, based on
4724         x86_linux_update_xmltarget.
4725         (same_process_callback): New.
4726         (x86_arch_setup_process_callback): New.
4727         (x86_linux_update_xmltarget): New.
4728         (x86_regsets_info): New.
4729         (amd64_linux_regs_info): New.
4730         (i386_linux_usrregs_info): New.
4731         (i386_linux_regs_info): New.
4732         (x86_linux_regs_info): New.
4733         (x86_arch_setup): Reimplement.
4734         (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4735         (x86_emit_ops): Ditto.
4736         (the_low_target): Adjust.  Install x86_linux_regs_info,
4737         x86_cannot_fetch_register, and x86_cannot_store_register.
4738         (initialize_low_arch): New.
4739         * linux-ia64-low.c (tdesc_ia64): Declare.
4740         (ia64_fetch_register): Adjust.
4741         (ia64_usrregs_info, regs_info): New globals.
4742         (ia64_regs_info): New function.
4743         (the_low_target): Adjust.
4744         (initialize_low_arch): New function.
4745         * linux-sparc-low.c (tdesc_sparc64): Declare.
4746         (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4747         Adjust.
4748         (sparc_arch_setup): New function.
4749         (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4750         (the_low_target): Adjust.
4751         (initialize_low_arch): New function.
4752         * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4753         (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4754         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4755         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4756         (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4757         (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4758         (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4759         (tdesc_powerpc_isa205_vsx64l): Declare.
4760         (ppc_cannot_store_register, ppc_collect_ptrace_register)
4761         (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4762         (ppc_set_pc, ppc_get_hwcap): Adjust.
4763         (ppc_usrregs_info): Forward declare.
4764         (!__powerpc64__) ppc_regmap_adjusted: New global.
4765         (ppc_arch_setup): Adjust to the current process'es target
4766         description.
4767         (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4768         (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4769         (ppc_store_evrregset): Adjust.
4770         (target_regsets): Rename to ...
4771         (ppc_regsets): ... this, and make static.
4772         (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4773         (ppc_regs_info): New function.
4774         (the_low_target): Adjust.
4775         (initialize_low_arch): New function.
4776         * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4777         (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4778         (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4779         (tdesc_s390x_linux64v2): Declare.
4780         (s390_collect_ptrace_register, s390_supply_ptrace_register)
4781         (s390_fill_gregset, s390_store_last_break): Adjust.
4782         (target_regsets): Rename to ...
4783         (s390_regsets): ... this, and make static.
4784         (s390_get_pc, s390_set_pc): Adjust.
4785         (s390_get_hwcap): New target_desc parameter, and use it.
4786         [__s390x__] (have_hwcap_s390_high_gprs): New global.
4787         (s390_arch_setup): Adjust to set the current process'es target
4788         description.  Don't adjust the regmap.
4789         (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4790         [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4791         (regs_info_3264): New globals.
4792         (s390_regs_info): New function.
4793         (the_low_target): Adjust.
4794         (initialize_low_arch): New function.
4795         * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4796         (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4797         [__mips64] (init_registers_mips_linux)
4798         (init_registers_mips_dsp_linux): Delete defines.
4799         [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4800         (have_dsp): New global.
4801         (mips_read_description): New, based on mips_arch_setup.
4802         (mips_arch_setup): Reimplement.
4803         (get_usrregs_info): New function.
4804         (mips_cannot_fetch_register, mips_cannot_store_register)
4805         (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4806         (mips_fill_fpregset, mips_store_fpregset): Adjust.
4807         (target_regsets): Rename to ...
4808         (mips_regsets): ... this, and make static.
4809         (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4810         (dsp_regs_info, regs_info): New globals.
4811         (mips_regs_info): New function.
4812         (the_low_target): Adjust.
4813         (initialize_low_arch): New function.
4814         * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4815         (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4816         Declare.
4817         (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4818         (arm_read_description): New, with bits factored from
4819         arm_arch_setup.
4820         (arm_arch_setup): Reimplement.
4821         (target_regsets): Rename to ...
4822         (arm_regsets): ... this, and make static.
4823         (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4824         (arm_regs_info): New function.
4825         (the_low_target): Adjust.
4826         (initialize_low_arch): New function.
4827         * linux-m68k-low.c (tdesc_m68k): Declare.
4828         (target_regsets): Rename to ...
4829         (m68k_regsets): ... this, and make static.
4830         (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4831         (m68k_regs_info): New function.
4832         (m68k_arch_setup): New function.
4833         (the_low_target): Adjust.
4834         (initialize_low_arch): New function.
4835         * linux-sh-low.c (tdesc_sharch): Declare.
4836         (target_regsets): Rename to ...
4837         (sh_regsets): ... this, and make static.
4838         (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4839         (sh_regs_info, sh_arch_setup): New functions.
4840         (the_low_target): Adjust.
4841         (initialize_low_arch): New function.
4842         * linux-bfin-low.c (tdesc_bfin): Declare.
4843         (bfin_arch_setup): New function.
4844         (bfin_usrregs_info, regs_info): New globals.
4845         (bfin_regs_info): New function.
4846         (the_low_target): Adjust.
4847         (initialize_low_arch): New function.
4848         * linux-cris-low.c (tdesc_cris): Declare.
4849         (cris_arch_setup): New function.
4850         (cris_usrregs_info, regs_info): New globals.
4851         (cris_regs_info): New function.
4852         (the_low_target): Adjust.
4853         (initialize_low_arch): New function.
4854         * linux-cris-low.c (tdesc_crisv32): Declare.
4855         (cris_arch_setup): New function.
4856         (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4857         (cris_regs_info): New function.
4858         (the_low_target): Adjust.
4859         (initialize_low_arch): New function.
4860         * linux-m32r-low.c (tdesc_m32r): Declare.
4861         (m32r_arch_setup): New function.
4862         (m32r_usrregs_info, regs_info): New globals.
4863         (m32r_regs_info): Adjust.
4864         (initialize_low_arch): New function.
4865         * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4866         (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4867         (tic6x_usrregs_info): Forward declare.
4868         (tic6x_read_description): New function, based on ...
4869         (tic6x_arch_setup): ... this.  Reimplement.
4870         (target_regsets): Rename to ...
4871         (tic6x_regsets): ... this, and make static.
4872         (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4873         (tic6x_regs_info): New function.
4874         (the_low_target): Adjust.
4875         (initialize_low_arch): New function.
4876         * linux-xtensa-low.c (tdesc_xtensa): Declare.
4877         (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4878         (target_regsets): Rename to ...
4879         (xtensa_regsets): ... this, and make static.
4880         (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4881         globals.
4882         (xtensa_arch_setup, xtensa_regs_info): New functions.
4883         (the_low_target): Adjust.
4884         (initialize_low_arch): New function.
4885         * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4886         (nios2_arch_setup): Set the current process'es tdesc.
4887         (target_regsets): Rename to ...
4888         (nios2_regsets): ... this.
4889         (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4890         (nios2_regs_info): New function.
4891         (the_low_target): Adjust.
4892         (initialize_low_arch): New function.
4893         * linux-aarch64-low.c (tdesc_aarch64): Declare.
4894         (aarch64_arch_setup): Set the current process'es tdesc.
4895         (target_regsets): Rename to ...
4896         (aarch64_regsets): ... this.
4897         (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4898         (aarch64_regs_info): New function.
4899         (the_low_target): Adjust.
4900         (initialize_low_arch): New function.
4901         * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4902         globals.
4903         (target_regsets): Rename to ...
4904         (tile_regsets): ... this.
4905         (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4906         (tile_regs_info): New function.
4907         (tile_arch_setup): Set the current process'es tdesc.
4908         (the_low_target): Adjust.
4909         (initialize_low_arch): New function.
4910         * spu-low.c (tdesc_spu): Declare.
4911         (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4912         * win32-arm-low.c (tdesc_arm): Declare.
4913         (arm_arch_setup): New function.
4914         (the_low_target): Install arm_arch_setup instead of
4915         init_registers_arm.
4916         * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4917         (init_windows_x86): Rename to ...
4918         (i386_arch_setup): ... this.  Set `win32_tdesc'.
4919         (the_low_target): Adjust.
4920         * win32-low.c (win32_tdesc): New global.
4921         (child_add_thread): Don't create the thread cache here.
4922         (do_initial_child_stuff): Set the new process'es tdesc.
4923         * win32-low.h (struct target_desc): Forward declare.
4924         (win32_tdesc): Declare.
4925         * lynx-i386-low.c (tdesc_i386): Declare global.
4926         (lynx_i386_arch_setup): Set `lynx_tdesc'.
4927         * lynx-low.c (lynx_tdesc): New global.
4928         (lynx_add_process): Set the new process'es tdesc.
4929         * lynx-low.h (struct target_desc): Forward declare.
4930         (lynx_tdesc): Declare global.
4931         * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4932         (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4933         * nto-low.c (nto_tdesc): New global.
4934         (do_attach): Set the new process'es tdesc.
4935         * nto-low.h (struct target_desc): Forward declare.
4936         (nto_tdesc): Declare.
4937         * nto-x86-low.c (tdesc_i386): Declare.
4938         (nto_x86_arch_setup): Set `nto_tdesc'.
4939
4940 2013-06-04  Gary Benson  <gbenson@redhat.com>
4941
4942         * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4943         to qSupported response when appropriate.
4944         (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4945         with nonzero-length annex.
4946         * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4947         arguments supplied in annex.
4948
4949 2013-05-31  Doug Evans  <dje@google.com>
4950
4951         PR server/15594
4952         * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4953         64 bits in 64-cross-32 environment.
4954
4955 2013-05-28  Pedro Alves  <palves@redhat.com>
4956
4957         * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4958         (aarch64-without-fpu.c): Delete rule.
4959         * configure.srv (aarch64*-*-linux*): Remove references to
4960         aarch64-without-fpu.o and aarch64-without-fpu.xml.
4961         * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4962         declaration.
4963
4964 2013-05-24  Pedro Alves  <palves@redhat.com>
4965
4966         * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4967         instead of strchr/decode_address.  Error if the range isn't split
4968         with a ','.  Don't assume there's be a ':' in the action.
4969
4970 2013-05-23  Yao Qi  <yao@codesourcery.com>
4971             Pedro Alves  <palves@redhat.com>
4972
4973         * linux-low.c (lwp_in_step_range): New function.
4974         (linux_wait_1): If the thread was range stepping and stopped
4975         outside the stepping range, report the stop to GDB.  Otherwise,
4976         continue stepping.  Add range stepping debug output.
4977         (linux_set_resume_request): Copy the step range from the resume
4978         request to the lwp.
4979         (linux_supports_range_stepping): New.
4980         (linux_target_ops) <supports_range_stepping>: Set to
4981         linux_supports_range_stepping.
4982         * linux-low.h (struct linux_target_ops)
4983         <supports_range_stepping>: New field.
4984         (struct lwp_info) <step_range_start, step_range_end>: New fields.
4985         * linux-x86-low.c (x86_supports_range_stepping): New.
4986         (the_low_target) <supports_range_stepping>: Set to
4987         x86_supports_range_stepping.
4988         * server.c (handle_v_cont): Handle 'r' action.
4989         (handle_v_requests): Append ";r" if the target supports range
4990         stepping.
4991         * target.h (struct thread_resume) <step_range_start,
4992         step_range_end>: New fields.
4993         (struct target_ops) <supports_range_stepping>:
4994         New field.
4995         (target_supports_range_stepping): New macro.
4996
4997 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
4998
4999         * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
5000         confusion in comment.
5001
5002 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
5003
5004         * lynx-low.c (struct process_info_private): New type.
5005         (lynx_add_process): New function.
5006         (lynx_create_inferior, lynx_attach): Replace calls to
5007         add_process by calls to lynx_add_process.
5008         (lynx_resume): If PTID is null, then try using
5009         current_process()->private->last_wait_event_ptid.
5010         Add comments.
5011         (lynx_clear_inferiors): Delete.  The contents of that function
5012         has been inlined in lynx_mourn;
5013         (lynx_wait_1): Save the ptid in the process's private data.
5014         (lynx_mourn): Free the process' private data.  Replace call
5015         to lynx_clear_inferiors by call to clear_inferiors.
5016
5017 2013-05-17  Yao Qi  <yao@codesourcery.com>
5018
5019         * i386-low.c (i386_length_and_rw_bits): Move the comment to
5020         the right place.
5021
5022 2013-05-16  Luis Machado  <lgustavo@codesourcery.com>
5023
5024         * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
5025         PT_DATA_ADDR and PT_TEXT_END_ADDR.  Update comments.
5026         (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
5027         PT_TEXT_END_ADDR guards.  Update comments.
5028         (linux_target_op) <read_offsets>: Conditionally define to
5029         linux_read_offsets if the target is UCLIBC and if it defines
5030         PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
5031
5032 2013-05-06  Sandra Loosemore  <sandra@codesourcery.com>
5033             Andrew Jenner  <andrew@codesourcery.com>
5034
5035         * Makefile.in (SFILES): Add linux-nios2-low.c.
5036         (clean): Add action to delete nios2-linux.c.
5037         (nios2-linux.c): New rule.
5038         * configure.srv: Add nios2*-*-linux*.
5039         * linux-nios2-low.c: New.
5040
5041 2013-05-03  Hafiz Abid Qadeer  <abidh@codesourcery.com>
5042
5043         * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
5044
5045 2013-04-25  Hui Zhu  <hui@codesourcery.com>
5046
5047         PR gdb/15186
5048         * ax.c (ax_printf): Add fflush.
5049
5050 2013-04-22  Tom Tromey  <tromey@redhat.com>
5051
5052         * Makefile.in (SFILES): Add filestuff.c.
5053         (OBS): Add filestuff.o.
5054         (filestuff.o): New target.
5055         * config.in, configure: Rebuild.
5056         * configure.ac: Check for fdwalk, pipe2.
5057
5058 2013-04-17  Pedro Alves  <palves@redhat.com>
5059
5060         * configure.ac (USE_THREAD_DB): Delete variable.
5061         (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
5062         Don't AC_SUBST USE_THREAD_DB.
5063         * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
5064         * config.in, configure: Regenerate.
5065
5066 2013-04-16  Pedro Alves  <palves@redhat.com>
5067
5068         * linux-low.h (struct lwp_info) <thread_known>: Move under
5069         the USE_THREAD_DB #ifdef.
5070
5071 2013-04-16  Pedro Alves  <palves@redhat.com>
5072
5073         * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
5074         (linux-low.o): Delete rule.
5075         * linux-low.h: Always include "gdb_thread_db.h" instead of
5076         conditionally including thread_db.h.
5077         (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
5078         HAVE_THREAD_DB_H.
5079
5080 2013-04-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5081
5082         * Makefile.in (install-only): Fix make install regression.
5083
5084 2013-04-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
5085
5086         Convert man pages to texinfo, new gdbinit.5 texinfo page.
5087         * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
5088         installation.
5089         * gdbserver.1: Remove.
5090
5091 2013-03-22  Pedro Alves  <palves@redhat.com>
5092
5093         * linux-low.c (handle_extended_wait): Don't call
5094         linux_enable_event_reporting.
5095
5096 2013-03-15  Tony Theodore  <tonyt@logyst.com>
5097
5098         PR build/9098:
5099         * Makefile.in (SHELL): Use @SHELL@.
5100
5101 2013-03-14  Sergio Durigan Junior  <sergiodj@redhat.com>
5102
5103         * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
5104         compiler warning.
5105
5106 2013-03-13  Joel Brobecker  <brobecker@adacore.com>
5107
5108         * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
5109         Remove extraneous NULL element.
5110
5111 2013-03-13  Yao Qi  <yao@codesourcery.com>
5112
5113         * tracepoint.c (traceframe_read_tsv): Look for the last matched
5114         'V' block in trace frame.
5115
5116 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
5117
5118         * target.h (struct target_ops): Add btrace ops.
5119         (target_supports_btrace): New macro.
5120         (target_enable_btrace): New macro.
5121         (target_disable_btrace): New macro.
5122         (target_read_btrace): New macro.
5123         * gdbthread.h (struct thread_info): Add btrace field.
5124         * server.c: Include btrace-common.h.
5125         (handle_btrace_general_set): New function.
5126         (handle_btrace_enable): New function.
5127         (handle_btrace_disable): New function.
5128         (handle_general_set): Call handle_btrace_general_set.
5129         (handle_qxfer_btrace): New function.
5130         (struct qxfer qxfer_packets[]): Add btrace entry.
5131         * inferiors.c (remove_thread): Disable btrace.
5132         * linux-low: Include linux-btrace.h.
5133         (linux_low_enable_btrace): New function.
5134         (linux_low_read_btrace): New function.
5135         (linux_target_ops): Add btrace ops.
5136         * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5137         Add srv_linux_btrace=yes.
5138         (x86_64-*-linux*): Add linux-btrace.o.
5139         Add srv_linux_btrace=yes.
5140         * configure.ac: Define HAVE_LINUX_BTRACE.
5141         * config.in: Regenerated.
5142         * configure: Regenerated.
5143
5144 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
5145
5146         * server.c (handle_qxfer): Preserve error message if -3 is
5147         returned.
5148         (qxfer): Document the -3 return value.
5149
5150 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
5151
5152         * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5153         (linux_btrace_h): New variable.
5154         (linux-btrace.o): New rule.
5155
5156 2013-03-08  Stan Shebs  <stan@codesourcery.com>
5157             Hafiz Abid Qadeer  <abidh@codesourcery.com>
5158
5159         * tracepoint.c (trace_buffer_size): New global.
5160         (DEFAULT_TRACE_BUFFER_SIZE): New define.
5161         (init_trace_buffer): Change to one-argument function. Allocate
5162         trace buffer memory.
5163         (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5164         handle QTBuffer:size packet.
5165         (cmd_bigqtbuffer_size): New function.
5166         (initialize_tracepoint): Call init_trace_buffer with
5167         DEFAULT_TRACE_BUFFER_SIZE.
5168         * server.c (handle_query): Add QTBuffer:size in the
5169         supported packets.
5170
5171 2013-03-07  Yao Qi  <yao@codesourcery.com>
5172
5173         * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5174         (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5175         of -1.
5176         (cmd_qtsp): Adjust condition.  Do post increment.
5177         Set cur_action and cur_step_action back to 0.
5178
5179 2013-03-07  Jeremy Bennett  <jeremy.bennett@embecosm.com>
5180
5181         PR server/15236
5182         * linux-low.c (linux_write_memory): Return early success if LEN is
5183         zero.
5184
5185 2013-03-05  Corinna Vinschen  <vinschen@redhat.de>
5186
5187         * configure.srv: Add x86_64-*-cygwin* as target.
5188
5189 2013-02-28  Tom Tromey  <tromey@redhat.com>
5190
5191         * configure.ac: Invoke AC_SYS_LARGEFILE.
5192         * configure, config.in: Rebuild.
5193
5194 2013-02-28  Corinna Vinschen  <vinschen@redhat.com>
5195
5196         * win32-low.c: Throughout, fix format strings and casts of
5197         printf-like functions to avoid type related warnings on all
5198         platforms.
5199         (get_child_debug_event): Print dwDebugEventCode as hex since
5200         that's how it's usually documented.
5201
5202 2013-02-28  Yao Qi  <yao@codesourcery.com>
5203
5204         * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5205         pulongest.
5206
5207 2013-02-27  Jiong Wang  <jiwang@tilera.com>
5208
5209         * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5210         (reg-tilegx32.c): New rule.
5211         * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5212         * linux-tile-low.c (tile_arch_setup): New function.  Invoke
5213         different register info initializer according to elf class.
5214         (init_registers_tilgx32): New function.  The tilegx32 register info
5215         initializer.
5216         (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5217         (tile_store_gregset): Likewise.
5218
5219 2013-02-27  Yao Qi  <yao@codesourcery.com>
5220
5221         * server.c (process_point_options): Print debug message when
5222         debug_threads is true.
5223
5224 2013-02-26  Yao Qi  <yao@codesourcery.com>
5225
5226         * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5227
5228 2013-02-19  Pedro Alves  <palves@redhat.com>
5229             Kai Tietz <ktietz@redhat.com>
5230
5231         PR gdb/15161
5232
5233         * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5234         instead of strtoul to extract address from packet.
5235         (process_serial_event) <'z'>: Likewise.
5236
5237 2013-02-18  Yao Qi  <yao@codesourcery.com>
5238
5239         * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5240
5241 2013-02-14  Pedro Alves  <palves@redhat.com>
5242
5243         Plug memory leak.
5244
5245         * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5246         TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5247
5248 2013-02-14  Pedro Alves  <palves@redhat.com>
5249
5250         * tracepoint.c (cmd_qtdpsrc): Use savestring.
5251
5252 2013-02-14  Pedro Alves  <palves@redhat.com>
5253
5254         * tracepoint.c (save_string): Delete.
5255         (add_tracepoint_action): Use savestring instead of save_string.
5256
5257 2013-02-12  Pedro Alves  <palves@redhat.com>
5258
5259         * linux-xtensa-low.c: Ditto.
5260         * xtensa-xtregs.c: Ditto.
5261
5262 2013-02-12  Sanimir Agovic  <sanimir.agovic@intel.com>
5263
5264         * thread-db.c (thread_db_get_tls_address): NULL pointer check
5265         thread_db.
5266
5267 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
5268
5269         * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5270         aarch64_num_wp_regs and aarch64_num_bp_regs to
5271         AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5272
5273 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
5274
5275         * linux-aarch64-low.c (ps_get_thread_area): Replace
5276         PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5277
5278 2013-02-04  Jim MacArthur  <jim.macarthur@arm.com>
5279             Marcus Shawcroft  <marcus.shawcroft@arm.com>
5280             Nigel Stephens  <nigel.stephens@arm.com>
5281             Yufeng Zhang  <yufeng.zhang@arm.com>
5282
5283         * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5284         (aarch64.c, aarch64-without-fpu.c): New targets.
5285         * configure.srv (aarch64*-*-linux*): New.
5286         * linux-aarch64-low.c: New file.
5287
5288 2013-02-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
5289
5290         * linux-low.c (handle_extended_wait, linux_create_inferior)
5291         (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5292         (dequeue_one_deferred_signal, linux_resume_one_thread)
5293         (fetch_register, linux_write_memory, linux_enable_event_reporting)
5294         (linux_tracefork_grandchild, linux_test_for_tracefork)
5295         (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5296         PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5297         where the argument is 0.
5298
5299 2013-01-25  Yao Qi  <yao@codesourcery.com>
5300
5301         * event-loop.c: Include "queue.h".
5302         (gdb_event_p): New typedef.
5303         (struct gdb_event) <next_event>: Remove.
5304         (event_queue): Change to QUEUE(gdb_event_p).
5305         (async_queue_event): Remove.
5306         (gdb_event_xfree): New.
5307         (initialize_event_loop): New.
5308         (process_event): Use API from QUEUE.
5309         (wait_for_event): Likewise.
5310         * server.c (main): Call initialize_event_loop.
5311         * server.h (initialize_event_loop): Declare.
5312
5313 2013-01-18  Yao Qi  <yao@codesourcery.com>
5314
5315         * ax.h (struct eval_agent_expr_context): New.
5316         (gdb_eval_agent_expr): Update declaration.
5317         * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5318         TFRAME.  Add new argument CTX.
5319         * server.h (struct eval_agent_expr_context): Declare.
5320         (agent_mem_read, agent_tsv_read): Update declaration.
5321         (agent_mem_read_string): Likewise.
5322         * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5323         (add_traceframe_block): Add new argument TPOINT.
5324         Increase TPOINT->traceframe_usage.
5325         (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5326         eval_tracepoint_agent_expr.
5327         (condition_true_at_tracepoint): Likewise.
5328         (agent_mem_read): Remove argument TFRAME.  Add argument CTX.
5329         (agent_mem_read_string, agent_tsv_read): Likewise.
5330
5331 2013-01-16  Yao Qi  <yao@codesourcery.com>
5332
5333         * linux-low.c (linux_resume_one_lwp): Don't check
5334         'lwp->bp_reinsert != 0'.
5335
5336 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5337             Pedro Alves  <palves@redhat.com>
5338
5339         * lynx-low.c (ptrace_request_to_str): Define a temporary
5340         macro and use it to simplify this function's implementation.
5341
5342 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5343
5344         * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5345         sets errno.
5346
5347 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5348
5349         * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5350
5351 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5352
5353         * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5354
5355 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5356
5357         * lynx-low.c (lynx_resume): Use the resume_info parameter
5358         to determine the ptid for the lynx_ptrace call, unless
5359         it is equal to minus_one_ptid, in which case we use the
5360         ptid of the current_inferior.
5361         (lynx_wait_1): After having received a thread create/exit
5362         event, resume the inferior's execution using the signaling
5363         thread's ptid, rather than the old ptid.
5364
5365 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
5366
5367         * lynx-low.c (lynx_resume): Delete variable ret.
5368
5369 2013-01-01  Joel Brobecker  <brobecker@adacore.com>
5370
5371         * gdbreplay.c (gdbreplay_version): Update copyright year.
5372         * server.c (gdbserver_version): Likewise.
5373
5374 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5375
5376         * lynx-low.c (lynx_wait_1): Add debug trace before adding
5377         new thread.
5378
5379 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5380
5381         * lynx-low.c (ptrace_request_to_str): Add handling for
5382         PTRACE_GETTRACESIG.
5383
5384 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5385
5386         * lynx-low.c (lynx_attach): Delete variable new_process.
5387
5388 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5389
5390         * lynx-low.c (lynx_create_inferior): Delete variable
5391         new_process.
5392
5393 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
5394
5395         * lynx-low.c (ptrace_request_to_str): Do not handle
5396         PTRACE_GETTHREADLIST if this macro does not exist.
5397
5398 2012-12-15  Yao Qi  <yao@codesourcery.com>
5399
5400         * Makefile.in (OBS): Add notif.o.
5401         * notif.c, notif.h: New.
5402         * server.c: Include "notif.h".
5403         (struct vstop_notif) <next>: Remove.
5404         <base>: New field.
5405         (queue_stop_reply): Update.
5406         (push_event, send_next_stop_reply): Remove.
5407         (discard_queued_stop_replies): Update.
5408         (notif_stop): New variable.
5409         (handle_v_stopped): Remove.
5410         (handle_v_requests): Don't call handle_v_stopped.  Call
5411         handle_ack_notif instead.
5412         (queue_stop_reply_callback): Call notif_event_enque instead
5413         of queue_stop_reply.
5414         (handle_status): Don't call send_next_stop_reply, call
5415         notif_write_event instead.
5416         (kill_inferior_callback): Likewise.
5417         (detach_or_kill_inferior_callback): Likewise.
5418         (main): Call initialize_notif.
5419         (process_serial_event): Call QUEUE_is_empty.
5420         (handle_target_event): Call notif_push instead of push event.
5421         * server.h (push_event): Remove declaration.
5422
5423 2012-12-10  Tom Tromey  <tromey@redhat.com>
5424
5425         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5426         (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5427         macros.
5428         (.c.o): Rewrite.
5429         (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5430         (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5431         (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5432         (amd64-linux-ipa.o, ax.o): Rewrite.
5433         (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5434         (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5435         (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5436         (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5437         (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5438         (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5439         (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5440         (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5441         (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5442         (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5443         (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5444         (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5445         (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5446         (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5447         (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5448         (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5449         (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5450         (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5451         (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5452         (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5453         (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5454         (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5455         (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5456         (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5457         (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5458         (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5459         (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5460         (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5461         (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5462         (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5463         (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5464         (reg-tilegx.o): Remove.
5465         (all_object_files): New macro.
5466         Include .deps files.
5467         * aclocal.m4, configure: Rebuild.
5468         * acinclude.m4: Include depstand.m4, lead-dot.m4.
5469         * configure.ac: Invoke ZW_CREATE_DEPDIR,
5470         ZW_PROG_COMPILER_DEPENDENCIES.  Compute GMAKE condition.
5471
5472 2012-12-05  Tom Tromey  <tromey@redhat.com>
5473
5474         PR gdb/14917:
5475         * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5476
5477 2012-11-28  Markus Metzger  <markus.t.metzger@intel.com>
5478
5479         * configure.ac: Check for linux/perf_event.h.
5480         * config.in: Regenerated.
5481         * configure: Regenerated.
5482
5483 2012-11-26  Maxime Villard  <rustyBSD@gmx.fr>
5484
5485         * hostio.c (handle_readlink): Decrease buffer size
5486         parameter passed to readlink by one byte.
5487
5488 2012-11-26  Yao Qi  <yao@codesourcery.com>
5489
5490         * configure.ac (build_warnings): Append '-Wempty-body'.
5491         * configure: Regenerated.
5492         * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5493         body.
5494
5495 2012-11-15  Pierre Muller  <muller@sourceware.org>
5496
5497         * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5498         * config.in: Regenerate.
5499         * configure: Regenerate.
5500         * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5501         Use "gdb_wait.h" header instead of <sys/wait.h> header.
5502         * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5503         * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5504         header.
5505         * server.c: Remove HAVE_WAIT_H conditional.  Use "gdb_wait.h" header
5506         instead of <sys/wait.h> header.
5507         * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5508
5509 2012-11-13 Markus Metzger  <markus.t.metzger@intel.com>
5510
5511         * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5512         (various make rules): Remove -DGDBSERVER
5513
5514 2012-11-09  Yao Qi  <yao@codesourcery.com>
5515
5516         * spu-low.c (current_ptid): Move it to ..
5517         * gdbthread.h: ... here.  New.
5518         * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5519         * server.c (myresume, process_serial_event): Likewise.
5520         * thread-db.c (thread_db_find_new_threads): Likewise.
5521         * tracepoint.c (run_inferior_command): Likewise.
5522
5523 2012-10-01  Andrew Burgess  <aburgess@broadcom.com>
5524
5525         * server.c (handle_search_memory_1): Include access length in
5526         warning message.
5527
5528 2012-09-05  Michael Brandt  <michael.brandt@axis.com>
5529
5530         * linux-crisv32-low.c: Fix compile errors.
5531
5532 2012-09-04  Yao Qi  <yao@codesourcery.com>
5533
5534         * tracepoint.c (cmd_qtsv): Adjust debug message.
5535         Don't check CUR_TPOINT.
5536
5537 2012-08-28  Yao Qi  <yao@codesourcery.com>
5538
5539         * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5540         * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5541         (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5542         Remove declarations of xmalloc, xreallloc, xstrdup and
5543         freeargv.
5544         * Makefile.in (libiberty_h): New.
5545         (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5546         (linux-bfin-low.o): Append dependency 'libiberty.h'.
5547
5548 2012-08-23  Yao Qi  <yao@codesourcery.com>
5549
5550         * server.h: Remove declaration of 'xsnprintf'.
5551
5552 2012-08-22  Keith Seitz  <keiths@redhat.com>
5553
5554         * server.h: Include build-gnulib-gbserver/config.h.
5555         * gdbreplay.c: Likewise.
5556
5557 2012-08-08  Doug Evans  <dje@google.com>
5558
5559         * Makefile.in (SFILES): Add gdb_vecs.c.
5560         (OBS): Add gdb_vecs.o.
5561         (gdb_vecs_h, host_defs_h): New variables.
5562         (thread-db.o): Add $(gdb_vecs_h) dependency.
5563         (gdb_vecs.o): New rule.
5564         * thread-db.c: #include "gdb_vecs.h".
5565         (thread_db_load_search): Use a vector to iterate over path elements.
5566         Handle text appearing after "$pdir".
5567
5568         * configure.ac: Add check for strstr.
5569         * config.in: Regenerate.
5570         * configure: Regenerate.
5571
5572 2012-08-02  Ulrich Weigand  <ulrich.weigand@linaro.org>
5573
5574         * hostio.c (handle_pread): If pread fails, fall back to attempting
5575         lseek/read.
5576         (handle_pwrite): Likewise for pwrite.
5577
5578 2012-08-01  Ulrich Weigand  <ulrich.weigand@linaro.org>
5579
5580         * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5581         between unsupported TYPE and unimplementable ADDR/LEN combination.
5582         (arm_insert_point): Act on new return value.
5583
5584 2012-07-31  Pedro Alves  <palves@redhat.com>
5585
5586         * server.c (process_point_options): Only skip tokens if we find
5587         one that is unrecognized.  Don't treat 'X' specially while
5588         skipping unrecognized tokens.
5589
5590 2012-07-30  Ulrich Weigand  <ulrich.weigand@linaro.org>
5591
5592         * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5593         to 4-byte-align HW breakpoint addresses for Thumb.
5594
5595 2012-07-27  Yao Qi  <yao@codesourcery.com>
5596
5597         PR remote/14161.
5598
5599         * server.h: Declare gdb_agent_about_to_close.
5600         * target.c (kill_inferior): Include "agent.h".
5601         New.  Send command 'kill'.
5602         * target.h (kill_inferior): Removed macro.
5603         * tracepoint.c (gdb_agent_about_to_close): New.
5604         (gdb_agent_helper_thread): Handle command 'close'.
5605         Wait endlessly until the inferior stops.
5606         Install gdb_agent_remove_socket to atexit hook.
5607         (agent_socket_name): New static variable.
5608         (gdb_agent_socket_init): Replace local variable 'name' with
5609         'agent_socket_name'.
5610         (gdb_agent_remove_socket): New.
5611
5612 2012-07-27  Yao Qi  <yao@codesourcery.com>
5613
5614         * server.c (process_point_options): Stop at 'X' when parsing.
5615
5616 2012-07-19  Michael Eager  <eager@eagercon.com>
5617
5618         * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5619         to hw_execute.
5620         * linux-x86-low.c (x86_insert_point, x86_remove_point):
5621         Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5622         hardware breakpoint.
5623
5624 2012-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
5625
5626         * gdbserver/linux-low.c (initialize_low): Call
5627         linux_ptrace_init_warnings.
5628
5629 2012-07-02  Doug Evans  <dje@google.com>
5630
5631         * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5632         pointer to int.
5633
5634 2012-07-02  Stan Shebs  <stan@codesourcery.com>
5635
5636         * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5637         (ax.o): Add it to build rule.
5638         (ax-ipa.o): Ditto.
5639         (OBS): Add format.o.
5640         (IPA_OBS): Add format.o.
5641         * server.c (handle_query): Claim support for breakpoint commands.
5642         (process_point_options): Add command case.
5643         (process_serial_event): Leave running if there are printfs in
5644         effect.
5645         * mem-break.h (any_persistent_commands): Declare.
5646         (add_breakpoint_commands): Declare.
5647         (gdb_no_commands_at_breakpoint): Declare.
5648         (run_breakpoint_commands): Declare.
5649         * mem-break.c (struct point_command_list): New struct.
5650         (struct breakpoint): New field command_list.
5651         (any_persistent_commands): New function.
5652         (add_commands_to_breakpoint): New function.
5653         (add_breakpoint_commands): New function.
5654         (gdb_no_commands_at_breakpoint): New function.
5655         (run_breakpoint_commands): New function.
5656         * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5657         locally.
5658         * ax.c: Include format.h.
5659         (ax_printf): New function.
5660         (gdb_eval_agent_expr): Add printf opcode.
5661
5662 2012-06-13  Yao Qi  <yao@codesourcery.com>
5663
5664         * server.c (start_inferior): Remove duplicated writes to fields
5665         'last_resume_kind' and 'last_status' of 'current_inferior'.
5666
5667 2012-06-12  Yao Qi  <yao@codesourcery.com>
5668             Pedro Alves  <palves@redhat.com>
5669
5670         * linux-low.c (linux_set_resume_request): Simplify predicate.  Add
5671         comment.
5672         * server.c (handle_v_cont): Extend comment.
5673
5674 2012-06-11  Yao Qi  <yao@codesourcery.com>
5675
5676         * linux-low.c (linux_attach): Add 'static'.
5677
5678 2012-06-06  Yao Qi  <yao@codesourcery.com>
5679
5680         * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5681
5682 2012-06-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
5683
5684         Fix gcc -flto compilation warning.
5685         * server.c (main): Make variable multi_mode and attach volatile.
5686
5687 2012-05-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
5688
5689         * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5690         if the platform doesn't know about it.
5691
5692 2012-05-30  Jeff Kenton  <jkenton@tilera.com>
5693
5694         * Makefile.in (SFILES): Add linux-tile-low.c.
5695         (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5696         * configure.srv: Handle tilegx-*-linux*.
5697         * linux-tile-low.c: New file.
5698
5699 2012-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
5700
5701         * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5702
5703 2012-05-24  Pedro Alves  <palves@redhat.com>
5704
5705         PR gdb/7205
5706
5707         Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
5708
5709 2012-05-24  Pedro Alves  <palves@redhat.com>
5710
5711         PR gdb/7205
5712
5713         Replace target_signal with gdb_signal throughout.
5714
5715 2012-05-22  Maciej W. Rozycki  <macro@codesourcery.com>
5716
5717         * linux-low.c (linux_store_registers): Avoid the copying sequence
5718         when no data has been retrieved by ptrace.
5719
5720 2012-05-22  Will Deacon  <will.deacon@arm.com>
5721
5722         * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5723         Include asm/ptrace.h.
5724         (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5725         already defined.
5726
5727 2012-05-21  Maciej W. Rozycki  <macro@codesourcery.com>
5728
5729         * linux-low.c (linux_store_registers): Don't re-retrieve data
5730         with ptrace that has already been obtained from /proc.  Always
5731         copy any data retrieved with ptrace to the buffer supplied.
5732
5733 2012-05-11  Yao Qi  <yao@codesourcery.com>
5734             Pedro Alves  <palves@redhat.com>
5735
5736         * linux-low.c (enum stopping_threads_kind): New.
5737         (stopping_threads): Change type to `enum stopping_threads_kind'.
5738         (handle_extended_wait): If stopping and suspending threads, leave
5739         the new_lwp suspended too.
5740         (linux_wait_for_event): Adjust.
5741         (stop_all_lwps): Set `stopping_threads' to
5742         STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5743         whether we're suspending threads or just stopping them.  Assert no
5744         recursion happens.
5745
5746 2012-04-29  Yao Qi  <yao@codesourcery.com>
5747
5748         * server.h: Move some code to ...
5749         * gdbthread.h: ... here.  New.
5750         * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5751         (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5752         (nto-low.o, win32-low.o): Likewise.
5753         * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5754         * regcache.c, remote-utils.c, server.c: Likewise.
5755         * target.c, tracepoint.c, win32-low.c: Likewise.
5756
5757 2012-04-24  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
5758
5759         * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5760         (PTRACE_ARG4_TYPE): Likewise.
5761         (PTRACE_XFER_TYPE): Likewise.
5762         * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5763         ptrace to PTRACE_ARG3_TYPE.
5764         * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5765         (PTRACE_ARG4_TYPE): Likewise.
5766         (PTRACE_XFER_TYPE): Likewise.
5767         (linux_detach_one_lwp): Cast fourth argument of
5768         ptrace to long then PTRACE_ARG4_TYPE.
5769         (regsets_fetch_inferior_registers): Cast third argument of
5770         ptrace to long then PTRACE_ARG3_TYPE.
5771         (regsets_store_inferior_registers): Likewise.
5772
5773 2012-04-20  Pedro Alves  <palves@redhat.com>
5774
5775         * configure: Regenerate.
5776
5777 2012-04-19  Pedro Alves  <palves@redhat.com>
5778
5779         * Makefile.in (GNULIB_BUILDDIR): New.
5780         (LIBGNU, INCGNU, GNULIB_H): Adjust.
5781         (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5782         (all, install-only, uninstall, clean-info, all-lib, clean): No
5783         longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
5784         (maintainer-clean realclean distclean): Use subdir_do.
5785         (subdir_do): New.
5786         (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
5787         $(GNULIB_BUILDDIR).  Don't pass argument to config.status.
5788         * acinclude.m4: Include acx_configure_dir.m4.
5789         * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5790         calls.  Call AC_PROG_RANLIB.  Configure gnulib using
5791         ACX_CONFIGURE_DIR.
5792         (GNULIB): New.
5793         (GNULIB_STDINT_H): Adjust.
5794         (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5795         * gdbreplay.c: Include build-gnulib/config.h.
5796         * server.h: Likewise.
5797         * aclocal.m4: Regenerate.
5798         * config.in: Regenerate.
5799         * configure: Regenerate.
5800
5801 2012-04-19  Pedro Alves  <palves@redhat.com>
5802
5803         * Makefile.in (LIBGNU, INCGNU): Adjust.
5804         (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5805         (all, install-only, uninstall, clean-info, all-lib, clean)
5806         (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5807         * configure.ac: Adjust AC_OUTPUT output.
5808         * aclocal.m4: Regenerate.
5809         * configure: Regenerate.
5810
5811 2012-04-19  Pedro Alves  <palves@redhat.com>
5812
5813         * Makefile.in (generated_files): New.
5814         (server_h): Remove the explicit dependency on config.h, and depend
5815         on $generated_files.
5816
5817 2012-04-19  Pedro Alves  <palves@redhat.com>
5818
5819         * Makefile.in (INCGNU): Add -Ignulib.
5820
5821 2012-04-19  Pedro Alves  <palves@redhat.com>
5822
5823         * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5824         (INCGNU): ... this, and spell out -I here.
5825         (GNULIB_LIB): Rename to ...
5826         (LIBGNU): ... this.
5827         (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5828
5829 2012-04-19  Pedro Alves  <palves@redhat.com>
5830
5831         * config.in: Regenerate.
5832
5833 2012-04-19  Pedro Alves  <palves@redhat.com>
5834
5835         * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5836         * server.h (memmem): Remove declaration.
5837         * config.in: Regenerate.
5838         * configure: Regenerate.
5839
5840 2012-04-19  Yao Qi  <yao@codesourcery.com>
5841
5842         * Makefile.in (SFILES): Add common/vec.c.
5843         (OBS): Add vec.o.
5844         (vec.o): New rule.
5845
5846 2012-04-19  Yao Qi  <yao@codesourcery.com>
5847
5848         * remote-utils.c (prepare_resume_reply): Replace with macro
5849         target_core_of_thread.
5850         * server.c (handle_qxfer_threads_proper): Likewise.
5851         * target.h (traget_core_of_thread): New macro.
5852
5853 2012-04-18  Pedro Alves  <palves@redhat.com>
5854
5855         * aclocal.m4: Regenerate.
5856         * configure: Regenerate.
5857
5858 2012-04-16  Yao Qi  <yao@codesourcery.com>
5859
5860         * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5861         duplicated on address.
5862
5863 2012-04-16  Yao Qi  <yao@codesourcery.com>
5864
5865         * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5866         (struct tracepoint_action_ops) <send>: New field.
5867         (m_tracepoint_action_send, r_tracepoint_action_send): New.
5868         (agent_expr_send, x_tracepoint_action_send): New.
5869         (l_tracepoint_action_send): New.
5870         (cmd_qtdp): Download and install tracepoint
5871         according to `use_agent'.
5872         (run_inferior_command): Add one more parameter `len'.
5873         Update callers.
5874         (tracepoint_send_agent): New.
5875         (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5876
5877 2012-04-16  Yao Qi  <yao@codesourcery.com>
5878
5879         * tracepoint.c (download_tracepoints): Moved to ...
5880         (cmd_qtstart): ... here.
5881
5882 2012-04-14  Yao Qi  <yao@codesourcery.com>
5883
5884         * tracepoint.c: Include inttypes.h.
5885         (struct collect_memory_action): Use sized types.
5886         (struct tracepoint): Likewise.
5887         (cmd_qtdp, stop_tracing): Update print specifiers.
5888         (cmd_qtp, response_tracepoint): Likewise.
5889         (collect_data_at_tracepoint): Likewise.
5890         (collect_data_at_step): Likewise.
5891
5892 2012-04-14  Yao Qi  <yao@codesourcery.com>
5893
5894         Import gnulib module inttypes.
5895         * aclocal.m4, config.in, configure: Regenerated.
5896
5897 2012-04-14  Yao Qi  <yao@codesourcery.com>
5898
5899         * Makefile.in (maintainer-clean, realclean, distclean): Remove
5900         Makefile and config.status at last.
5901
5902 2012-04-13  Yao Qi  <yao@codesourcery.com>
5903
5904         * tracepoint.c: Include stdint.h unconditionally.
5905
5906 2012-04-13  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
5907
5908         * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5909         on BFD_HAVE_SYS_PROCFS_TYPE.
5910         * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5911         * configure: Regenerate.
5912         * config.in: Likewise.
5913
5914 2012-04-13  H.J. Lu  <hongjiu.lu@intel.com>
5915
5916         * Makefile.in (clean): Also remove x32.c x32-linux.c
5917         x32-avx.c x32-avx-linux.c.
5918         (x32.o): New target.
5919         (x32.c): Likewise.
5920         (x32-linux.o): Likewise.
5921         (x32-linux.c): Likewise.
5922         (x32-avx.o): Likewise.
5923         (x32-avx.c): Likewise.
5924         (x32-avx-linux.o): Likewise.
5925         (x32-avx-linux.c): Likewise.
5926
5927         * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5928         (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5929         (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5930         (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5931         (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5932         i386/x32-avx-linux.xml.
5933
5934         * linux-x86-low.c (init_registers_x32_linux): New prototype.
5935         (init_registers_x32_avx_linux): Likwise.
5936         (x86_linux_update_xmltarget): Call init_registers_x32_linux
5937         or init_registers_x32_avx_linux if linux_is_elf64 is false.
5938
5939 2012-04-13  Pedro Alves  <palves@redhat.com>
5940
5941         * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5942         (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5943         (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5944         (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5945         the sub-make.
5946
5947 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
5948
5949         * linux-x86-low.c (compat_x32_clock_t): New.
5950         (compat_x32_siginfo_t): Likewise.
5951         (compat_x32_siginfo_from_siginfo): Likewise.
5952         (siginfo_from_compat_x32_siginfo): Likewise.
5953         (linux_is_elf64): Likewise.
5954         (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5955         and siginfo_from_compat_x32_siginfo for x32.
5956         (x86_arch_setup): Set linux_is_elf64.
5957
5958 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
5959
5960         PR gdb/13969
5961         * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5962         e_machine field.
5963         (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5964         * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5965         * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5966         compatible with process.
5967
5968 2012-04-12  Yao Qi  <yao@codesourcery.com>
5969
5970         * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5971         (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5972         (install-only, install-info, clean): Handle sub dir gnulib.
5973         (all-lib, am--refresh): New targets.
5974         (memmem.o): Remove target.
5975         * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5976         Invoke gl_EARLY.  Invoke AC_CHECK_PROGS for make.
5977         (AC_REPLACE_FUNCS): Remove memmem.
5978         Invoke gl_INIT and AM_INIT_AUTOMAKE.
5979         (AC_OUTPUT): Generate Makefile in gnulib/.
5980         * aclocal.m4, config.in, configure: Regenerated.
5981
5982 2012-04-10  Maciej W. Rozycki  <macro@codesourcery.com>
5983
5984         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5985
5986 2012-04-05  Pedro Alves  <palves@redhat.com>
5987
5988         -Werror=strict-aliasing
5989
5990         * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5991         pointer.
5992
5993 2012-04-04  Pedro Alves  <palves@redhat.com>
5994
5995         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5996         (sparc_store_gregset_from_stack, sparc_store_gregset)
5997         (sparc_breakpoint_at): Fix formatting.
5998
5999 2012-03-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
6000
6001         * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
6002         are available.
6003         * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
6004         [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
6005         * config.in: Regenerate.
6006         * configure: Likewise.
6007
6008 2012-03-29  Pedro Alves  <palves@redhat.com>
6009
6010         * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
6011         Correct ptrace arguments.
6012
6013 2012-03-28  Pedro Alves  <palves@redhat.com>
6014
6015         * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
6016         (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
6017         (IA64_FR1_REGNUM): New defines.
6018         (ia64_fetch_register): New.
6019         (the_low_target): Install it.
6020         * linux-low.h (struct linux_target_ops) <fetch_register>: New
6021         field.
6022         * linux-low.c (linux_fetch_registers): Try the
6023         the_low_target.fetch_register hook first.
6024
6025         * linux-arm-low.c (the_low_target): Adjust.
6026         * linux-bfin-low.c (the_low_target): Adjust.
6027         * linux-cris-low.c (the_low_target): Adjust.
6028         * linux-crisv32-low.c (the_low_target): Adjust.
6029         * linux-m32r-low.c (the_low_target): Adjust.
6030         * linux-m68k-low.c (the_low_target): Adjust.
6031         * linux-mips-low.c (the_low_target): Adjust.
6032         * linux-ppc-low.c (the_low_target): Adjust.
6033         * linux-s390-low.c (the_low_target): Adjust.
6034         * linux-sh-low.c (the_low_target): Adjust.
6035         * linux-sparc-low.c (the_low_target): Adjust.
6036         * linux-tic6x-low.c (the_low_target): Adjust.
6037         * linux-x86-low.c (the_low_target): Adjust.
6038         * linux-xtensa-low.c (the_low_target): Adjust.
6039
6040 2012-03-26  Pedro Alves  <palves@redhat.com>
6041
6042         * server.c (handle_qxfer_libraries): Don't bail early if
6043         the_target->qxfer_libraries_svr4 is not NULL.
6044
6045 2012-03-26  Pedro Alves  <palves@redhat.com>
6046
6047         * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
6048
6049 2012-03-23  Pedro Alves  <palves@redhat.com>
6050
6051         * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
6052         "library-list-svr4" element's start tag when the the DSO list is
6053         empty.
6054
6055 2012-03-23  Pedro Alves  <palves@redhat.com>
6056
6057         * linux-low.c (read_one_ptr): Read the inferior's pointer through
6058         a variable whose type size is the same as the inferior's pointer
6059         size.
6060
6061 2012-03-21  Thomas Schwinge  <thomas@codesourcery.com>
6062
6063         * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
6064         struct siginfo.
6065         * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
6066         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
6067         * linux-low.h: Include <signal.h>.
6068         (struct siginfo): Remove forward declaration.
6069         (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
6070         struct siginfo.
6071
6072 2012-03-21  Mike Frysinger  <vapier@gentoo.org>
6073
6074         * .gitignore: Ignore more files.
6075
6076 2012-03-19  Pedro Alves  <palves@redhat.com>
6077             Jan Kratochvil  <jan.kratochvil@redhat.com>
6078
6079         * server.c (cont_thread, general_thread): Add describing comments.
6080         (start_inferior): Clear `cont_thread'.
6081         (handle_v_cont): Don't set `cont_thread' if resuming all threads
6082         of a process.
6083
6084 2012-03-15  Yao Qi  <yao@codesourcery.com>
6085
6086         * tracepoint.c (install_tracepoint): Move duplicated tracepoint
6087         handling to ...
6088         (cmd_qtdp): ... here.
6089
6090 2012-03-15  Yao Qi  <yao@codesourcery.com>
6091
6092         * tracepoint.c (struct tracepoint_action_ops): New.
6093         (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
6094         (m_tracepoint_action_download): New.
6095         (r_tracepoint_action_download): New.
6096         (x_tracepoint_action_download): New.
6097         (l_tracepoint_action_download): New.
6098         (add_tracepoint_action): Install `action->ops' according type.
6099         (download_tracepoint_1): Move code `download' function pointer
6100         of various tracepoint_action_ops.
6101
6102 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
6103
6104         * linux-low.c (linux_attach_lwp_1): New variable buffer.  Call
6105         linux_ptrace_attach_warnings.
6106
6107 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
6108
6109         * Makefile.in (linux-ptrace.o): New.
6110         * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
6111         (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
6112         (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
6113         (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
6114         (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
6115         of these targets.
6116         * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
6117
6118 2012-03-08  Yao Qi  <yao@codesourcery.com>
6119             Pedro Alves  <palves@redhat.com>
6120
6121         Fix PR server/13392.
6122         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6123         offset of JMP insn.
6124         * tracepoint.c (remove_tracepoint): New.
6125         (cmd_qtdp): Call remove_tracepoint when failed to install.
6126
6127 2012-03-07  Pedro Alves  <palves@redhat.com>
6128
6129         * linux-low.c (get_detach_signal): New.
6130         (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6131         Pass on pending signals to PTRACE_DETACH.  Check the result of the
6132         ptrace call.
6133         * server.c (program_signals, program_signals_p): New.
6134         (handle_general_set): Handle QProgramSignals.
6135         * server.h (program_signals, program_signals_p): Declare.
6136
6137 2012-03-05  Pedro Alves  <palves@redhat.com>
6138             Jan Kratochvil  <jan.kratochvil@redhat.com>
6139
6140         * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6141         New comment why.
6142
6143 2012-03-03  Yao Qi  <yao@codesourcery.com>
6144
6145         * tracepoint.c (tracepoint_look_up_symbols): Update call to
6146         agent_look_up_symbols.
6147
6148 2012-03-03  Yao Qi  <yao@codesourcery.com>
6149
6150         * Makefile.in (linux-low.o): Keep dependence on agent.h.
6151         (linux-x86-low.o): Likewise.
6152         * server.h: Remove in_process_agent_loaded.
6153         * tracepoint.c (in_process_agent_loaded): Removed.  Moved it
6154         common/agent.c.
6155         Update callers.
6156
6157 2012-03-03  Yao Qi  <yao@codesourcery.com>
6158
6159         * tracepoint.c (gdb_agent_capability): New global.
6160         (in_process_agent_loaded_ust): Renamed to
6161         `in_process_agent_supports_ust'.
6162         Update callers.
6163         (in_process_agent_supports_ust): Call agent_capability_check.
6164         (clear_installed_tracepoints): Assert that agent supports
6165         agent.
6166
6167 2012-03-03  Yao Qi  <yao@codesourcery.com>
6168
6169         * linux-low.c (linux_supports_agent): New.
6170         (linux_target_ops): Initialize field `supports_agent' with
6171         linux_supports_agent.
6172         * target.h (struct target_ops) <supports_agent>: New.
6173         (target_supports_agent): New macro.
6174         * server.c (handle_general_set): Handle packet 'QAgent'.
6175         (handle_query): Send `QAgent+'.
6176         * Makefile.in (server.o): Depends on agent.h.
6177
6178 2012-03-03  Yao Qi  <yao@codesourcery.com>
6179
6180         * Makefile.in (OBS): Add agent.o.
6181         Add new rule for agent.o.
6182         Track dependence of tracepoint.c on agent.h.
6183         * tracepoint.c (run_inferior_command_1):
6184         (run_inferior_command): Call agent_run_command.
6185         (gdb_ust_connect_sync_socket): Deleted.  Move it to
6186         common/agent.c.
6187         (resume_thread, stop_thread): Likewise.
6188         (gdb_ust_socket_init): Renamed to ...
6189         (gdb_agent_socket_init): ... New.
6190         (gdb_ust_thread): Renamed to ...
6191         (gdb_agent_helper_thread): ... New.
6192         (gdb_ust_init): Move some code to ...
6193         (gdb_agent_init): ... here.  New.
6194         [HAVE_UST]: Call gdb_ust_init.
6195         (initialize_tracepoint_ftlib):  Call gdb_agent_init.
6196         * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6197         * config.in, configure: Regenerated.
6198
6199 2012-03-02  Pedro Alves  <palves@redhat.com>
6200
6201         * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6202         * linux-low.c (struct simple_pid_list): New.
6203         (stopped_pids): New a struct simple_pid_list pointer.
6204         (add_to_pid_list, pull_pid_from_list): New.
6205         (handle_extended_wait): Don't assume the first signal new children
6206         report is SIGSTOP.  Adjust call to pull_pid_from_list.
6207         (linux_wait_for_lwp): Adjust.
6208
6209 2012-03-02  Yao Qi  <yao@codesourcery.com>
6210
6211         * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6212         debug log.
6213
6214 2012-03-02  Yao Qi  <yao@codesourcery.com>
6215
6216         * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6217         `stop_pc' and `tpoint'.  Update caller.
6218
6219 2012-03-01  Maciej W. Rozycki  <macro@codesourcery.com>
6220
6221         * linux-low.h (linux_target_ops): Add regset_bitmap member.
6222         * linux-low.c (use_linux_regsets): New macro.
6223         [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6224         [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6225         (linux_register_in_regsets): New function.
6226         (usr_fetch_inferior_registers): Skip registers covered by
6227         regsets.
6228         (usr_store_inferior_registers): Likewise.
6229         (usr_fetch_inferior_registers): New macro.
6230         (usr_store_inferior_registers): Likewise.
6231         (linux_fetch_registers): Handle mixed regset/non-regset targets.
6232         (linux_store_registers): Likewise.
6233         * linux-mips-low.c (init_registers_mips_dsp_linux): New
6234         prototype.
6235         (init_registers_mips64_dsp_linux): Likewise.
6236         (init_registers_mips_linux): New macro.
6237         (init_registers_mips_dsp_linux): Likewise.
6238         (mips_dsp_num_regs): Likewise.
6239         (DSP_BASE, DSP_CONTROL): New fallback macros.
6240         (mips_base_regs): New macro.
6241         (mips_regmap): Use it.  Fix the size.
6242         (mips_dsp_regmap): New variable.
6243         (mips_dsp_regset_bitmap): Likewise.
6244         (mips_arch_setup): New function.
6245         (mips_cannot_fetch_register): Use the_low_target.regmap rather
6246         than mips_regmap.
6247         (mips_cannot_store_register): Likewise.
6248         (the_low_target): Update .arch_setup, .num_regs and .regmap
6249         initializers.  Add .regset_bitmap initializer.
6250         * linux-arm-low.c (the_low_target): Add .regset_bitmap
6251         initializer.
6252         * linux-bfin-low.c (the_low_target): Likewise.
6253         * linux-cris-low.c (the_low_target): Likewise.
6254         * linux-crisv32-low.c (the_low_target): Likewise.
6255         * linux-ia64-low.c (the_low_target): Likewise.
6256         * linux-m32r-low.c (the_low_target): Likewise.
6257         * linux-m68k-low.c (the_low_target): Likewise.
6258         * linux-ppc-low.c (the_low_target): Likewise.
6259         * linux-s390-low.c (the_low_target): Likewise.
6260         * linux-sh-low.c (the_low_target): Likewise.
6261         * linux-sparc-low.c (the_low_target): Likewise.
6262         * linux-tic6x-low.c (the_low_target): Likewise.
6263         * linux-x86-low.c (the_low_target): Likewise.
6264         * linux-xtensa-low.c (the_low_target): Likewise.
6265         * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6266         mips64-dsp-linux.o to srv_regobj.  Add mips-dsp-linux.xml,
6267         mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6268         srv_xmlfiles.
6269         * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6270         (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6271
6272 2012-02-29  Yao Qi  <yao@codesourcery.com>
6273             Pedro Alves  <palves@redhat.com>
6274
6275         * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6276         `step_over_finished' is true.
6277
6278 2012-02-27  Pedro Alves  <palves@redhat.com>
6279
6280         * linux-low.c (pid_is_stopped): Delete, moved to common/.
6281         (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6282
6283 2012-02-27  Pedro Alves  <palves@redhat.com>
6284
6285         PR server/9684
6286         * linux-low.c (pid_is_stopped): New.
6287         (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6288
6289 2012-02-25  Luis Machado  <lgustavo@codesourcery.com>
6290
6291         * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6292         of conditions.
6293
6294 2012-02-24  Maciej W. Rozycki  <macro@codesourcery.com>
6295
6296         * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6297
6298 2012-02-24  Luis Machado  <lgustavo@codesourcery>
6299
6300         * server.c (handle_query): Advertise support for target-side
6301         breakpoint condition evaluation.
6302         (process_point_options): New function.
6303         (process_serial_event): When inserting a breakpoint, check for
6304         a target-side condition that should be evaluated.
6305
6306         * mem-break.c: Include regcache.h and ax.h.
6307         (point_cond_list_t): New data structure.
6308         (breakpoint) <cond_list>: New field.
6309         (find_gdb_breakpoint_at): Make non-static.
6310         (delete_gdb_breakpoint_at): Clear any target-side
6311         conditions.
6312         (clear_gdb_breakpoint_conditions): New function.
6313         (add_condition_to_breakpoint): Likewise.
6314         (add_breakpoint_condition): Likewise.
6315         (gdb_condition_true_at_breakpoint): Likewise.
6316         (gdb_breakpoint_here): Return result directly instead
6317         of going through a local variable.
6318
6319         * mem-break.h (find_gdb_breakpoint_at): New prototype.
6320         (clear_gdb_breakpoint_conditions): Likewise.
6321         (add_breakpoint_condition): Likewise.
6322         (gdb_condition_true_at_breakpoint): Likewise.
6323
6324         * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6325         (need_step_over_p): Take target-side breakpoint condition into
6326         consideration.
6327
6328 2012-02-24  Luis Machado  <lgustavo@codesourcery>
6329
6330         * server.h: Include tracepoint.h.
6331         (agent_mem_read, agent_get_trace_state_variable_value,
6332         agent_set_trace_state_variable_value,
6333         agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6334         get_set_tsv_func_addr): New prototypes.
6335
6336         * ax.h: New include file.
6337         * ax.c: New source file.
6338
6339         * tracepoint.c: Include ax.h.
6340         (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6341         agent_expr, eval_result_type): Move to ax.h.
6342         (parse_agent_expr): Rename to ...
6343         (gdb_parse_agent_expr): ... this, make it non-static and move
6344         to ax.h.
6345         (unparse_agent_expr) Rename to ...
6346         (gdb_unparse_agent_expr): ... this, make it non-static and move
6347         to ax.h.
6348         (eval_agent_expr): Rename to ...
6349         (eval_tracepoint_agent_expr): ... this.
6350         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6351         forward declarations.
6352         (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6353         (agent_get_trace_state_variable_value): New function.
6354         (agent_set_trace_state_variable_value): New function.
6355         (cmd_qtdp): Call gdb_parse_agent_expr (...).
6356         (response_tracepoint): Call gdb_unparse_agent_expr (...).
6357         (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6358         (condition_true_at_tracepoint): Likewise.
6359         (parse_agent_expr): Rename to ...
6360         (gdb_parse_agent_expr): ... this and move to ax.c.
6361         (unparse_agent_expr): Rename to ...
6362         (gdb_unparse_agent_expr): ... this and move to ax.c.
6363         (gdb_agent_op_name): Move to ax.c.
6364         (eval_agent_expr): Rename to ...
6365         (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6366         and move to ax.c.
6367         (eval_tracepoint_agent_expr): New function.
6368         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6369         non-static.
6370         (current_insn_ptr, emit_error, struct bytecode_address): Move to
6371         ax.c.
6372         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6373         emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6374         emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6375         emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6376         emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6377         emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6378         emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6379         emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6380         (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6381         (compile_bytecodes): Remove forward declaration.
6382         (is_goto_target): Move to ax.c.
6383         (compile_bytecodes): Move to ax.c and call
6384         agent_get_trace_state_variable_value (...) and
6385         agent_set_trace_state_variable_value (...).
6386
6387         * Makefile.in: Update ax.c and IPA dependencies.
6388
6389 2012-02-24  Pedro Alves  <palves@redhat.com>
6390
6391         * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6392         (cmd_bigqtbuffer_circular): ... this.  Only handle
6393         'QTBuffer:circular:'.
6394         (handle_tracepoint_general_set): Adjust.
6395
6396 2012-02-16  Yao Qi  <yao@codesourcery.com>
6397
6398         * inferiors.c: Move code to ...
6399         * dll.c: .... here.  New.
6400         * server.h: Declare clear_dlls.
6401         * Makefile.in (SFILES): Add dll.c.
6402         (OBS): Add dll.o
6403         (dll.o): New rule.
6404
6405 2012-02-11  Yao Qi  <yao@codesourcery.com>
6406
6407         * server.c: (handle_monitor_command): Add a new parameter
6408         `own_buf'.
6409         (handle_query): Update caller.
6410
6411 2012-02-09  Joel Brobecker  <brobecker@adacore.com>
6412
6413         * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6414         * configure, config.in: Regenerate.
6415         * hostio.c: Provide an alternate implementation if HAVE_READLINK
6416         is not defined.
6417
6418 2012-02-02  Pedro Alves  <palves@redhat.com>
6419
6420         Try SIGKILL first, then PTRACE_KILL.
6421         * linux-low.c (linux_kill_one_lwp): New.
6422         (linux_kill_one_lwp): Rename to ...
6423         (kill_one_lwp_callback): ... this.  Use the new
6424         linux_kill_one_lwp.
6425
6426 2012-02-02  Pedro Alves  <palves@redhat.com>
6427
6428         * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6429         inferior.
6430
6431 2012-01-27  Pedro Alves  <palves@redhat.com>
6432
6433         * linux-low.c (linux_child_pid_to_exec_file): Delete.
6434         (elf_64_file_p): Make static.
6435         (linux_pid_exe_is_elf_64_file): New.
6436         * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6437         Delete declarations.
6438         (linux_pid_exe_is_elf_64_file): Declare.
6439         * linux-x86-low.c (x86_arch_setup): Use
6440         linux_pid_exe_is_elf_64_file.
6441
6442 2012-01-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
6443
6444         * linux-low.c (linux_wait_for_event_1): Rename to ...
6445         (linux_wait_for_event): ... here and merge it with former
6446         linux_wait_for_event - new variable wait_ptid, use it.
6447         (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6448
6449 2012-01-23  Pedro Alves  <palves@redhat.com>
6450
6451         * server.c (main): Avoid yet another case of infinite loop while
6452         detaching/killing after a longjmp.
6453
6454 2012-01-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
6455
6456         Code cleanup.
6457         * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6458
6459 2012-01-20  Ulrich Weigand  <ulrich.weigand@linaro.org>
6460
6461         * hostio.c (handle_readlink): New function.
6462         (handle_vFile): Call it to handle "vFile:readlink" packets.
6463
6464 2012-01-20  Pedro Alves  <palves@redhat.com>
6465             Ulrich Weigand  <ulrich.weigand@linaro.org>
6466
6467         * server.c (handle_v_requests): Only support vAttach and vRun to
6468         start multiple processes when in extended protocol mode.
6469
6470 2012-01-17  Pedro Alves  <palves@redhat.com>
6471
6472         * tracepoint.c (initialize_tracepoint): Use mmap instead of
6473         memalign plus mprotect to allocate the scratch buffer.
6474
6475 2012-01-13  Pedro Alves  <palves@redhat.com>
6476
6477         * server.c (attach_inferior): Clear `cont_thread'.
6478
6479 2012-01-13  Pedro Alves  <palves@redhat.com>
6480
6481         * server.c (main): Avoid infinite loop while detaching/killing
6482         after a longjmp.
6483
6484 2012-01-09  Doug Evans  <dje@google.com>
6485
6486         * server.c (start_inferior): Set last_ptid in --wrapper case.
6487
6488 2012-01-06  Yao Qi  <yao@codesourcery.com>
6489
6490         * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6491         defined.
6492         [IN_PROCESS_AGENT] (debug_agent): New global variable.
6493
6494 2012-01-04  Yao Qi  <yao@codesourcery.com>
6495
6496         * tracepoint.c (cmd_qtdp): Print debug message
6497         for static tracepoint.
6498
6499 2012-01-04  Yao Qi  <yao@codesourcery.com>
6500
6501         * tracepoint.c (trace_vdebug): Differentiate debug message
6502         between gdbserver and IPA.
6503
6504 2012-01-03  Yao Qi  <yao@codesourcery.com>
6505
6506         * tracepoint.c (tracepoint_was_hit): Don't collect for
6507         static tracepoint.
6508
6509 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
6510
6511         * terminal.h: Reformat copyright header.
6512
6513 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
6514
6515         * server.c (gdbserver_version): Update copyright year.
6516         * gdbreplay.c (gdbreplay_version): Likewise.
6517
6518 2011-12-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
6519
6520         * linux-low.c (linux_create_inferior): Put empty if clause for write.
6521
6522         Revert:
6523         2011-12-18  Hui Zhu  <teawater@gmail.com>
6524         * linux-low.c (linux_create_inferior): Save return value to ret.
6525
6526 2011-12-18  Hui Zhu  <teawater@gmail.com>
6527
6528         * linux-low.c (linux_create_inferior): Save return value to ret.
6529
6530 2011-12-16  Doug Evans  <dje@google.com>
6531
6532         * linux-low.c (linux_create_inferior): If stdio connection,
6533         redirect stdin from /dev/null, stdout to stderr.
6534         * remote-utils.c (remote_is_stdio): New static global.
6535         (remote_connection_is_stdio): New function.
6536         (remote_prepare): Handle stdio connection.
6537         (remote_open): Ditto.
6538         (remote_close): Don't close stdin for stdio connections.
6539         (read_prim,write_prim): New functions.  Replace all calls to
6540         read/write to these.
6541         * server.c (main): Watch for "-" argument.  Move call to
6542         remote_prepare before start_inferior.
6543         * server.h (STDIO_CONNECTION_NAME): New macro.
6544         (remote_connection_is_stdio): Declare.
6545
6546         * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6547         in debugging output.
6548
6549 2011-12-15  Yao Qi  <yao@codesourcery.com>
6550
6551         * tracepoint.c: Include sys/syscall.h.
6552         (gdb_ust_thread): Remove preprocessor conditional.
6553
6554 2011-12-14  Pedro Alves  <pedro@codesourcery.com>
6555
6556         * linux-low.c (linux_detach_one_lwp): Call
6557         the_low_target.prepare_to_resume before detaching.
6558
6559 2011-12-14  Yao Qi  <yao@codesourcery.com>
6560
6561         * tracepoint.c (gdb_ust_thread): Don't ignore return value
6562         of write.
6563
6564 2011-12-14  Yao Qi  <yao@codesourcery.com>
6565
6566         * i386-low.c (i386_low_stopped_data_address): Initialize local
6567         variable `control'.
6568
6569 2011-12-13  Pedro Alves  <pedro@codesourcery.com>
6570
6571         PR remote/13492
6572
6573         * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6574         DR_CONTROL unless necessary.  Extend comments.
6575         * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6576         DR0-3 if not used.  If any watchpoint was set, clear DR_STATUS.
6577
6578 2011-12-13  Yao Qi  <yao@codesourcery.com>
6579
6580         * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6581         macros.
6582         (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6583
6584 2011-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
6585
6586         * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6587         Print new debug message for such case.
6588
6589 2011-12-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
6590
6591         Fix overlapping memcpy.
6592         * mem-break.c (set_raw_breakpoint_at): New variable buf.  Use it for
6593         the read_inferior_memory transfer.
6594         (delete_fast_tracepoint_jump): New variable buf.  Use it for the
6595         write_inferior_memory transfer.
6596         (set_fast_tracepoint_jump): New variable buf.  Use it for the
6597         read_inferior_memory and write_inferior_memory transfers.
6598         (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6599         (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6600         Use it for the write_inferior_memory transfer.
6601         (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6602         buffers.
6603
6604 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
6605
6606         * linux-low.c (fetch_register, store_register): Make code
6607         consistent, fix formatting.
6608
6609 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
6610
6611         * linux-low.c (usr_store_inferior_registers): Factor out code
6612         to handle individual registers into...
6613         (store_register): ... this new function.
6614
6615 2011-12-06  Ulrich Weigand  <uweigand@de.ibm.com>
6616
6617         * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6618         (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6619         (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6620         (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6621         (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6622         (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6623         * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6624         (srv_xmlfiles): Add new XML files.
6625
6626         * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6627         and <sys/uio.h>.
6628         (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6629         (init_registers_s390_linux32v1): Add prototype.
6630         (init_registers_s390_linux32v2): Likewise.
6631         (init_registers_s390_linux64v1): Likewise.
6632         (init_registers_s390_linux64v2): Likewise.
6633         (init_registers_s390x_linux64v1): Likewise.
6634         (init_registers_s390x_linux64v2): Likewise.
6635         (s390_num_regs): Increment to 52.
6636         (s390_regmap): Add orig_r2 register.
6637         (s390_num_regs_3264): Increment to 68.
6638         (s390_regmap_3264): Add orig_r2 register.
6639         (s390_collect_ptrace_register): Handle orig_r2 register.
6640         (s390_supply_ptrace_register): Likewise.
6641         (s390_fill_last_break): New function.
6642         (s390_store_last_break): Likewise.
6643         (s390_fill_system_call): New function.
6644         (s390_store_system_call): Likewise.
6645         (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6646         register sets.
6647         (s390_check_regset): New function.
6648         (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6649         NT_S390_SYSTEM_CALL regsets and use appropriate description.
6650         Update target_regsets for available register sets.
6651
6652 2011-12-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
6653             Jan Kratochvil  <jan.kratochvil@redhat.com>
6654
6655         * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6656         (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6657         New.
6658         (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6659         * linux-low.h (struct process_info_private): New member r_debug.
6660         * server.c (handle_qxfer_libraries): Call
6661         the_target->qxfer_libraries_svr4.
6662         (handle_qxfer_libraries_svr4): New function.
6663         (qxfer_packets): New entry "libraries-svr4".
6664         (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6665         * target.h (struct target_ops): New member qxfer_libraries_svr4.
6666         * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6667         PACKET_qXfer_libraries_svr4.
6668
6669 2011-11-30  Ulrich Weigand  <uweigand@de.ibm.com>
6670
6671         * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6672         PSW address/mask between 8-byte and 16-byte formats.
6673         (s390_supply_ptrace_register): Likewise.
6674         (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6675         basic addressing mode bit.
6676
6677 2011-11-24  Stan Shebs  <stan@codesourcery.com>
6678
6679         * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6680
6681 2011-11-17  Stan Shebs  <stan@codesourcery.com>
6682
6683         * tracepoint.c (struct tracepoint): New field traceframe_usage.
6684         (tracing_start_time): New global.
6685         (tracing_stop_time): New global.
6686         (tracing_user_name): New global.
6687         (tracing_notes): New global.
6688         (tracing_stop_note): New global.
6689         (cmd_qtstart): Set traceframe_usage, start_time.
6690         (stop_tracing): Set stop_time.
6691         (cmd_qtstatus): Report additional status.
6692         (cmd_qtp): New function.
6693         (handle_tracepoint_query): Call it.
6694         (cmd_qtnotes): New function.
6695         (handle_tracepoint_general_set): Call it.
6696         (get_timestamp): Rename from tsv_get_timestamp.
6697
6698 2011-11-14  Stan Shebs  <stan@codesourcery.com>
6699             Kwok Cheung Yeung  <kcy@codesourcery.com>
6700
6701         * linux-x86-low.c (small_jump_insn): New.
6702         (i386_install_fast_tracepoint_jump_pad): Add arguments for
6703         trampoline and error message, build a trampoline and issue a small
6704         jump instruction to it.
6705         (x86_install_fast_tracepoint_jump_pad): Add arguments for
6706         trampoline and error message.
6707         (x86_get_min_fast_tracepoint_insn_len): New.
6708         (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6709         * linux-low.h (struct linux_target_ops): Add arguments to
6710         install_fast_tracepoint_jump_pad operation, add new operation.
6711         * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6712         arguments.
6713         (linux_get_min_fast_tracepoint_insn_len): New function.
6714         (linux_target_op): Add new operation.
6715         * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6716         (gdb_trampoline_buffer_end): Ditto.
6717         (gdb_trampoline_buffer_error): Ditto.
6718         (struct ipa_sym_addresses): Add fields for new IPA variables.
6719         (symbol_list): Add entries for new IPA variables.
6720         (struct tracepoint): Add fields to hold the address range of the
6721         trampoline used by the tracepoint.
6722         (trampoline_buffer_head): New static variable.
6723         (trampoline_buffer_tail): Ditto.
6724         (claim_trampoline_space): New function.
6725         (have_fast_tracepoint_trampoline_buffer): New function.
6726         (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6727         structure.
6728         (install_fast_tracepoint): Ditto, also add error buffer argument.
6729         (cmd_qtminftpilen): New function.
6730         (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6731         (fast_tracepoint_from_trampoline_address): New function.
6732         (fast_tracepoint_collecting): Handle trampoline as part of jump
6733         pad space.
6734         (set_trampoline_buffer_space): New function.
6735         (initialize_tracepoint): Initialize new IPA variables.
6736         * target.h (struct target_ops): Add arguments to
6737         install_fast_tracepoint_jump_pad operation, add new
6738         get_min_fast_tracepoint_insn_len operation.
6739         (target_get_min_fast_tracepoint_insn_len): New.
6740         (install_fast_tracepoint_jump_pad): Add arguments.
6741         * server.h (IPA_BUFSIZ): Define.
6742         * linux-i386-ipa.c: Include extra header files.
6743         (initialize_fast_tracepoint_trampoline_buffer): New function.
6744         (initialize_low_tracepoint): Call it.
6745         * server.h (set_trampoline_buffer_space): Declare.
6746         (claim_trampoline_space): Ditto.
6747         (have_fast_tracepoint_trampoline_buffer): Ditto.
6748
6749 2011-11-14  Yao Qi  <yao@codesourcery.com>
6750
6751         * server.c (handle_query): Handle InstallInTrace for qSupported.
6752         * tracepoint.c (add_tracepoint): Sort list.
6753         (install_tracepoint, download_tracepoint): New.
6754         (cmd_qtdp): Call them to install and download tracepoints.
6755         (sort_tracepoints): Removed.
6756         (cmd_qtstart): Update.
6757
6758 2011-11-14  Yao Qi  <yao@codesourcery.com>
6759
6760         * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6761         * mem-break.h: Declare.
6762         * tracepoint.c (cmd_qtstart): Move some code to ...
6763         (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6764         New.
6765         (download_tracepoints): Move some code to ...
6766         (download_tracepoint_1): ... here.  New.
6767
6768 2011-11-08  Yao Qi  <yao@codesourcery.com>
6769
6770         * remote-utils.c (relocate_instruction): A comment fix.
6771
6772 2011-11-07  Joel Brobecker  <brobecker@adacore.com>
6773
6774         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6775         (i386_dr_low_get_control, i386_dr_low_get_status): Use
6776         dr_status_mirror and dr_control_mirror from debug_reg_state.
6777         (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6778         (i386_initial_stuff): Remove use of deleted globals.
6779         (i386_get_thread_context, i386_set_thread_context,
6780         i386_thread_added): Use dr_status_mirror and dr_control_mirror
6781         from debug_reg_state.
6782
6783 2011-11-05  Yao Qi  <yao@codesourcery.com>
6784
6785         * tracepoint.c (gdb_collect): Loop over tracepoints of same
6786         address as TPOINT's.
6787
6788 2011-11-02  Stan Shebs  <stan@codesourcery.com>
6789
6790         * tracepoint.c (agent_mem_read_string): New function.
6791         (eval_agent_expr): Call it for tracenz.
6792         * server.c (handle_query): Report support for tracenz.
6793
6794 2011-11-02  Yao Qi  <yao@codesourcery.com>
6795
6796         * tracepoint.c (cmd_qtstart): Remove unused local variables.
6797
6798 2011-11-02  Yao Qi  <yao@codesourcery.com>
6799
6800         * target.h: Fix a typo in comment.
6801
6802 2011-10-31  Pedro Alves  <pedro@codesourcery.com>
6803
6804         * mem-break.c (check_mem_write): Add `myaddr' parameter.  Don't
6805         clobber the breakpoints' shadows with fast tracepoint jumps.
6806         * mem-break.h (check_mem_write): Add `myaddr' parameter.
6807         * target.c (write_inferior_memory): Also pass MYADDR down to
6808         check_mem_write.
6809
6810 2011-10-07  Ulrich Weigand  <ulrich.weigand@linaro.org>
6811
6812         * configure.ac: Check support for personality routine.
6813         * configure: Regenerate.
6814         * config.in: Likewise.
6815         * linux-low.c: Include <sys/personality.h>.
6816         Define ADDR_NO_RANDOMIZE if necessary.
6817         (linux_create_inferior): Disable address space randomization when
6818         forking inferior, if requested.
6819         (linux_supports_disable_randomization): New function.
6820         (linux_target_ops): Install it.
6821         * server.h (disable_randomization): Declare.
6822         * server.c (disable_randomization): New global variable.
6823         (handle_general_set): Handle QDisableRandomization.
6824         (handle_query): Likewise for qSupported.
6825         (main): Support --disable-randomization and --no-disable-randomization
6826         command line arguments.
6827         * target.h (struct target_ops): Add supports_disable_randomization.
6828         (target_supports_disable_randomization): New macro.
6829
6830 2011-09-29  Mike Frysinger  <vapier@gentoo.org>
6831
6832         * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6833         ifdef check.
6834         [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6835         [!PT_GETDSBT] (target_loadmap): New definition.
6836         (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6837         (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6838         LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6839         and PT_GETDSBT to LINUX_LOADMAP.
6840         [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6841         (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6842
6843 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
6844
6845         * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6846         (arm_linux_hwbp_cap): New static variable.
6847         (arm_linux_get_hwbp_cap): Replace by ...
6848         (arm_linux_init_hwbp_cap): ... this new function.
6849         (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6850         (arm_linux_get_hw_watchpoint_count): Likewise.
6851         (arm_linux_get_hw_watchpoint_max_length): Likewise.
6852         (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6853         (arm_prepare_to_resume): Use perror_with_name instead of error.
6854
6855 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
6856
6857         * linux-arm-low.c: Include <signal.h>.
6858         (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6859         (struct arm_linux_hwbp_cap): New data type.
6860         (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6861         (struct arm_linux_hw_breakpoint): New data type.
6862         (MAX_BPTS, MAX_WPTS): Define.
6863         (struct arch_process_info, struct arch_lwp_info): New data types.
6864         (arm_linux_get_hwbp_cap): New function.
6865         (arm_linux_get_hw_breakpoint_count): Likewise.
6866         (arm_linux_get_hw_watchpoint_count): Likewise.
6867         (arm_linux_get_hw_watchpoint_max_length): Likewise.
6868         (arm_hwbp_control_initialize): Likewise.
6869         (arm_hwbp_control_is_enabled): Likewise.
6870         (arm_hwbp_control_is_initialized): Likewise.
6871         (arm_hwbp_control_disable): Likewise.
6872         (arm_linux_hw_breakpoint_equal): Likewise.
6873         (arm_linux_hw_point_initialize): Likewise.
6874         (struct update_registers_data): New data structure.
6875         (update_registers_callback: New function.
6876         (arm_insert_point): Likewise.
6877         (arm_remove_point): Likewise.
6878         (arm_stopped_by_watchpoint): Likewise.
6879         (arm_stopped_data_address): Likewise.
6880         (arm_new_process): Likewise.
6881         (arm_new_thread): Likewise.
6882         (arm_prepare_to_resume): Likewise.
6883         (the_low_target): Register arm_insert_point, arm_remove_point,
6884         arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6885         arm_new_thread, and arm_prepare_to_resume.
6886
6887 2011-09-15  Stan Shebs  <stan@codesourcery.com>
6888
6889         * server.h (struct emit_ops): Add compare-goto fields.
6890         * tracepoint.c (gdb_agent_op_sizes): New table.
6891         (emit_eq_goto): New function.
6892         (emit_ne_goto): New function.
6893         (emit_lt_goto): New function.
6894         (emit_le_goto): New function.
6895         (emit_gt_goto): New function.
6896         (emit_ge_goto): New function.
6897         (is_goto_target): New function.
6898         (compile_bytecodes): Recognize special cases of compare-goto
6899         combinations and call specialized emitters for them.
6900         * linux-x86-low.c (amd64_emit_eq_goto): New function.
6901         (amd64_emit_ne_goto): New function.
6902         (amd64_emit_lt_goto): New function.
6903         (amd64_emit_le_goto): New function.
6904         (amd64_emit_gt_goto): New function.
6905         (amd64_emit_ge_goto): New function.
6906         (amd64_emit_ops): Add the new functions.
6907         (i386_emit_eq_goto): New function.
6908         (i386_emit_ne_goto): New function.
6909         (i386_emit_lt_goto): New function.
6910         (i386_emit_le_goto): New function.
6911         (i386_emit_gt_goto): New function.
6912         (i386_emit_ge_goto): New function.
6913         (i386_emit_ops): Add the new functions.
6914
6915 2011-09-08  Stan Shebs  <stan@codesourcery.com>
6916
6917         * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6918         (i386_emit_epilogue): Restore %ebx.
6919
6920 2011-08-31  Jie Zhang  <jzhang918@gmail.com>
6921
6922         * server.c (step_thread): Remove definition.
6923         (process_serial_event): Don't handle Hs.
6924         * server.h (step_thread): Remove declaration.
6925         * target.c (set_desired_inferior): Remove use of step_thread.
6926
6927 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
6928
6929         * linux-low.c: Include linux-procfs.h.
6930         (linux_attach_lwp_1): Update comments.
6931         (linux_attach): Scan for existing threads when attaching to a
6932         process that is the tgid.
6933         * Makefile.in: Update dependencies.
6934
6935 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
6936
6937         * configure.srv: Add linux-procfs.o dependencies.
6938
6939 2011-08-14  Yao Qi  <yao@codesourcery.com>
6940
6941         * target.h (struct target_ops): Fix indent.
6942         * win32-low.c (win32_target_ops): Fix comment.
6943
6944 2011-08-14  Andrew Jenner  <andrew@codesourcery.com>
6945             Yao Qi  <yao@codesourcery.com>
6946
6947         * Makefile.in (clean): Remove tic6x-*.c files.
6948         (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6949         (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6950         (tic6x-c64xp-linux.c): Likewise.
6951         * configure.srv: Add support for tic6x-*-uclinux.
6952         * linux-tic6x-low.c: New.
6953         * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6954
6955 2011-08-14  Andrew Stubbs <ams@codesourcery.com>
6956             Yao Qi  <yao@codesourcery.com>
6957
6958         * target.h (struct target_ops): Add read_loadmap.
6959         * linux-low.c (struct target_loadseg): New type.
6960         (struct target_loadmap): New type.
6961         (linux_read_loadmap): New function.
6962         (linux_target_ops): Add linux_read_loadmap.
6963         * server.c (handle_query): Support qXfer:fdpic:read packet.
6964         * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6965         to NULL.
6966
6967 2011-08-05  Eli Zaretskii  <eliz@gnu.org>
6968
6969         * win32-low.c: Include <stdint.h>.
6970
6971 2011-07-22  Pedro Alves  <pedro@codesourcery.com>
6972
6973         * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6974         to the inferior here.
6975         (i386_remove_aligned_watchpoint): Ditto.
6976         (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6977         fit part of the watchpoint in the debug registers.
6978         (i386_update_inferior_debug_regs): New.
6979         (i386_low_insert_watchpoint): Work on a local mirror of the debug
6980         registers, and only update the inferior on success.
6981         (i386_low_remove_watchpoint): Ditto.
6982
6983 2011-07-22  Kwok Cheung Yeung  <kcy@codesourcery.com>
6984
6985         * linux-low.c (compare_ints, unique, list_threads, show_process,
6986         linux_core_of_thread): Delete.
6987         (linux_target_ops): Change linux_core_of_thread to
6988         linux_common_core_of_thread.
6989         (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6990         * utils.c (malloc_failure): Change type of argument.
6991         (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6992         * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6993         common/linux-osdata.c, common/ptid.c and common/buffer.c.
6994         (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6995         (IPA_OBJS): Add common-utils-ipa.o.
6996         (ptid_h, linux_osdata_h): New macros.
6997         (server_h): Add common/common-utils.h, common/xml-utils.h,
6998         common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6999         common/ptid.h.
7000         (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
7001         ptid.o, buffer.o): New rules.
7002         (linux-low.o): Add common/linux-osdata.h as a dependency.
7003         * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
7004         * configure.ac: Add AC_HEADER_DIRENT check.
7005         * config.in: Regenerate.
7006         * configure: Regenerate.
7007         * remote-utils.c (xml_escape_text): Delete.
7008         (buffer_grow, buffer_free, buffer_init, buffer_finish,
7009         buffer_xml_printf): Move to common/buffer.c.
7010         * server.c (main): Remove call to initialize_inferiors.
7011         * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
7012         ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
7013         ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
7014         internal_error, gdb_assert, gdb_assert_fail): Delete.
7015         (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
7016         buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
7017         common/buffer.h.
7018         * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
7019         ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
7020         initialize_inferiors): Delete.
7021
7022 2011-07-20  Pedro Alves  <pedro@codesourcery.com>
7023
7024         * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
7025         symbol error.
7026
7027 2011-05-31  Pedro Alves  <pedro@codesourcery.com>
7028
7029         * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
7030         assertion.
7031         * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
7032
7033 2011-05-26  Yao Qi  <yao@codesourcery.com>
7034
7035         * Makefile.in (thread-db.o): Track dependence to
7036         common/gdb_thread_db.h.
7037         * thread-db.c: include gdb_thread_db.h from right place.
7038
7039 2011-05-16  Adrian Cornish  <gnu@bluedreamer.com>
7040
7041         * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
7042         __FILE__ and __LINE__ to internal_error.
7043
7044 2011-05-13  Doug Evans  <dje@google.com>
7045
7046         * thread-db.c (try_thread_db_load_from_sdir): New function.
7047         (try_thread_db_load_from_dir): New function.
7048         (thread_db_load_search): Handle $sdir, ignore $pdir.
7049         Remove trying of system directories if search of
7050         libthread-db-search-path fails, that is now done via $sdir.
7051
7052 2011-05-12  Kwok Cheung Yeung  <kcy@codesourcery.com>
7053
7054         * server.c (handle_query): Add EnableDisableTracepoints to the list
7055         of supported features.
7056         * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
7057         tracepoints.
7058         (cmd_qtenable_disable): New.
7059         (cmd_qtstart): Install tracepoints even if disabled.
7060         (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
7061         receiving a QTEnable or QTDisable packet.
7062         (gdb_collect): Skip data collection if fast tracepoint is disabled.
7063         (ust_marker_to_static_tracepoint): Do not ignore disabled static
7064         tracepoints.
7065         (gdb_probe): Skip data collection if static tracepoint is disabled.
7066
7067 2011-05-10  Doug Evans  <dje@google.com>
7068
7069         * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
7070
7071 2011-05-04  Doug Evans  <dje@google.com>
7072
7073         * linux-low.c (linux_join): Skip process lookup.
7074         * spu-low.c (spu_join): Ditto.
7075         * server.c (join_inferiors_callback): Delete.
7076         (process_serial_event): For 'D' packet (detach) call join_inferior
7077         directly.
7078
7079 2011-05-04  Joseph Myers  <joseph@codesourcery.com>
7080
7081         * README: Don't mention xscale*-*-linux*.
7082         * configure.srv (xscale*-*-linux*): Don't handle target.
7083
7084 2011-04-27  Nathan Froyd  <froydnj@codesourcery.com>
7085
7086         * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
7087         casting pointers.
7088         (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
7089         (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
7090         (i386_emit_void_call_2): Likewise.
7091
7092 2011-04-26  Yao Qi  <yao@codesourcery.com>
7093
7094         * linux-low.c: Move common macros to linux-ptrace.h.
7095         Include linux-ptrace.h.
7096         * Makefile.in (linux_ptrace_h): New.
7097         (linux-low.o): Depends on linux-ptrace.h.
7098
7099 2011-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
7100
7101         * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
7102         RUN_ONCE.  Comment for the LISTEN_DESC delete_file_handler call.
7103         (remote_prepare): New function with most of the TCP code from ...
7104         (remote_open): ... here.  Detect PORT here unconditionally.  Move also
7105         setting transport_is_reliable.
7106         * server.c (run_once): New variable.
7107         (gdbserver_usage): Document it.
7108         (main): Set run_once for `--once'.  Call remote_prepare.  Exit after
7109         the first run if RUN_ONCE.
7110         * server.h (run_once, remote_prepare): New declarations.
7111
7112 2011-04-19  Tom Tromey  <tromey@redhat.com>
7113
7114         * win32-low.c (handle_load_dll): Remove duplicate "the".
7115
7116 2011-04-07  Pierre Muller  <muller@ics.u-strasbg.fr>
7117
7118         Remove support for old Cygwin 1.5 versions.
7119         * win32-low.c (win32_create_inferior): Use new cygwin_path_list
7120         function to avoid warning.
7121         (win32_add_one_solib): Use cygwin_conv_path function to avoid
7122         warning.
7123
7124 2011-03-18  Pierre Muller  <muller@ics.u-strasbg.fr>
7125
7126         * gdbserver/server.h (Macro _): Define it if not available.
7127
7128 2011-03-14  Michael Snyder  <msnyder@vmware.com>
7129
7130         * hostio.c (handle_close): Remove unnecessary null test.
7131
7132 2011-03-10  Joel Brobecker  <brobecker@adacore.com>
7133
7134         * Makefile.in (maintainer-clean realclean distclean): Remove
7135         "make ...  subdir_do" command.
7136
7137 2011-03-10  Michael Snyder  <msnyder@vmware.com>
7138
7139         * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7140
7141         * server.c (handle_v_run): Free alloced buffer on early return.
7142
7143 2011-03-09  Yao Qi  <yao@codesourcery.com>
7144
7145         Revert:
7146         2011-03-04  Yao Qi  <yao@codesourcery.com>
7147
7148         * Makefile.in: Remove GNU make feature --directory.
7149
7150         2011-03-05  Yao Qi  <yao@codesourcery.com>
7151
7152         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7153         (subdir_do): New make target.  Copied from gdb/Makefile.
7154         (maintainer-clean, realclean, distclean, clean): Call corresponding
7155         make targets in common/Makefile.
7156
7157         2011-02-11  Yao Qi  <yao@codesourcery.com>
7158
7159         * configure.ac: Call AC_PROG_RANLIB.
7160         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
7161         * configure: Regenerate.
7162
7163 2011-03-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
7164
7165         * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7166
7167 2011-03-06  Yao Qi  <yao@codesourcery.com>
7168
7169         * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7170
7171 2011-03-05  Yao Qi  <yao@codesourcery.com>
7172
7173         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7174         (subdir_do): New make target.  Copied from gdb/Makefile.
7175         (maintainer-clean, realclean, distclean, clean): Call corresponding
7176         make targets in common/Makefile.
7177
7178 2011-03-04  Yao Qi  <yao@codesourcery.com>
7179
7180         * Makefile.in: Remove GNU make feature --directory.
7181
7182 2011-03-04  Michael Snyder  <msnyder@vmware.com>
7183
7184         * server.c (queue_stop_reply): Call xmalloc not malloc.
7185
7186 2011-03-02  Michael Snyder  <msnyder@vmware.com>
7187
7188         * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7189
7190 2011-02-28  Michael Snyder  <msnyder@vmware.com>
7191
7192         * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7193         (cmd_qtframe): Ditto.
7194         (cmd_qtbuffer): Ditto.
7195         (cmd_bigqtbuffer): Ditto.
7196
7197         * utils.c (decimal2str): Initialize 'width' to nine, then
7198         don't mess with it.
7199
7200 2011-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
7201
7202         * hostio.c (require_data): Free *data, not data.
7203
7204 2011-02-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
7205
7206         * hostio.c (require_data): Use free, not xfree.
7207
7208 2011-02-27  Michael Snyder  <msnyder@vmware.com>
7209
7210         * server.c (handle_query): Discard unused value.
7211
7212         * hostio.c (require_data): Free malloc memory before returning
7213         error.
7214
7215 2011-02-26  Michael Snyder  <msnyder@vmware.com>
7216
7217         * linux-low.c (list_threads): Call closedir for dirent.
7218
7219 2011-02-27  Michael Snyder  <msnyder@vmware.com>
7220
7221         * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7222         a case statement falls through.
7223
7224         * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7225
7226         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7227         in comparison.
7228
7229 2011-02-26  Michael Snyder  <msnyder@vmware.com>
7230
7231         * utils.c (decimal2str): Eliminate dead code and dead param.
7232         (pulongest): Drop dead param from call to decimal2str.
7233         (plongest): Ditto.
7234
7235 2011-02-24  Joel Brobecker  <brobecker@adacore.com>
7236
7237         Revert the following patch (not approved yet):
7238         2011-02-21  Hui Zhu  <teawater@gmail.com>
7239         * tracepoint.c (tp_printf): New function.
7240         (eval_agent_expr): Handle gdb_agent_op_printf.
7241
7242 2011-02-21  Hui Zhu  <teawater@gmail.com>
7243
7244         * tracepoint.c (tp_printf): New function.
7245         (eval_agent_expr): Handle gdb_agent_op_printf.
7246
7247 2011-02-18  Tom Tromey  <tromey@redhat.com>
7248
7249         * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7250         (tracepoint.o): Likewise.
7251         * tracepoint.c (enum gdb_agent_op): Use ax.def.
7252         (gdb_agent_op_names): Likewise.
7253
7254 2011-02-18  Tom Tromey  <tromey@redhat.com>
7255
7256         * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7257         gdb_agent_op_rot>: New constants.
7258         (gdb_agent_op_names): Add pick and roll.
7259         (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7260         cases.
7261
7262 2011-02-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
7263
7264         * aclocal.m4: Regenerated with aclocal-1.11.1.
7265
7266 2011-02-14  Pedro Alves  <pedro@codesourcery.com>
7267
7268         * server.c (handle_qxfer_traceframe_info): New.
7269         (qxfer_packets): Register "traceframe-info".
7270         (handle_query): Report support for qXfer:traceframe-info:read+.
7271         * tracepoint.c (match_blocktype): New.
7272         (traceframe_find_block_type): Rename to ...
7273         (traceframe_walk_blocks): ... this.  Add callback filter argument,
7274         and use it.
7275         (traceframe_find_block_type): New, reimplemented on top of
7276         traceframe_walk_blocks.
7277         (build_traceframe_info_xml): New.
7278         (traceframe_read_info): New.
7279         * server.h (traceframe_read_info): Declare.
7280
7281 2011-02-11  Yao Qi  <yao@codesourcery.com>
7282
7283         * configure.ac: Call AC_PROG_RANLIB.
7284         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
7285         * configure: Regenerate.
7286
7287 2011-02-07  Pedro Alves  <pedro@codesourcery.com>
7288
7289         * server.c (gdb_read_memory): Change return semantics to allow
7290         partial transfers.
7291         (handle_search_memory_1): Adjust.
7292         (process_serial_event) <'m' packet>: Handle partial transfers.
7293         * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7294
7295 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
7296
7297         * regcache.c (init_register_cache): Initialize
7298         regcache->register_status.
7299         (free_register_cache): Release regcache->register_status.
7300         (regcache_cpy): Copy register_status.
7301         (registers_to_string): Print 'x's for unavailable registers.
7302         (supply_register): Mark the register's status valid or
7303         unavailable, depending on whether a buffer was passed in or not.
7304         (supply_register_zeroed): New.
7305         (supply_regblock): Mark the registers' status valid or
7306         unavailable, depending on whether a buffer was passed in or not.
7307         * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7308         (struct regcache): New `register_status' field.
7309         (supply_register_zeroed): Declare.
7310         * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7311         supply_register_zeroed, rather than passing a NULL buffer to
7312         supply_register.
7313         * tracepoint.c (fetch_traceframe_registers): Update comment.
7314
7315 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
7316
7317         * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7318         buffer explicit.
7319
7320 2011-01-25  Pedro Alves  <pedro@codesourcery.com>
7321
7322         * server.h (decode_xfer_write): Change prototype.
7323         * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7324         and don't extract the annex here.
7325         * server.c (decode_xfer_read): Remove `annex' parameter,
7326         and don't extract the annex here.
7327         (decode_xfer): New.
7328         (struct qxfer): New.
7329         (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7330         (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7331         (handle_qxfer_statictrace): New functions, abstracted out from
7332         handle_query, and made to use the struct qxfer interface.
7333         (handle_threads_qxfer_proper): Rename to ...
7334         (handle_qxfer_threads_proper): ... this.
7335         (handle_threads_qxfer): Rename to ...
7336         (handle_qxfer_threads): ... this.  Adjust.
7337         (qxfer_packets): New array.
7338         (handle_qxfer): New function.
7339         (handle_query): Use handle_qxfer.
7340
7341 2011-01-05  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>
7342
7343         * gdbreplay.c: Shorten lines of >= 80 columns.
7344         * linux-low.c: Ditto.
7345         * linux-ppc-low.c: Ditto.
7346         * linux-s390-low.c: Ditto.
7347         * linux-sparc-low.c: Ditto.
7348         * linux-x86-low.c: Ditto.
7349         * linux-xtensa-low.c: Ditto.
7350         * mem-break.c: Ditto.
7351         * nto-low.c: Ditto.
7352         * regcache.h: Ditto.
7353         * remote-utils.c: Ditto.
7354         * server.c: Ditto.
7355         * server.h: Ditto.
7356         * thread-db.c: Ditto.
7357         * tracepoint.c: Ditto.
7358         * utils.c: Ditto.
7359         * win32-low.h: Ditto.
7360
7361 2011-01-05  Joel Brobecker  <brobecker@adacore.com>
7362
7363         * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7364         update.
7365
7366 2011-01-01  Joel Brobecker  <brobecker@adacore.com>
7367
7368         * server.c (gdbserver_version): Update copyright year in version
7369         output.
7370         * gdbreplay.c (gdbreplay_version): Ditto.
7371
7372 2010-12-29  Jie Zhang  <jie.zhang@analog.com>
7373
7374         * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7375         * linux-bfin-low.c: New file.
7376         * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7377         PT_DATA_ADDR for BFIN targets.
7378         * Makefile.in (SFILES): Add linux-bfin-low.c.
7379         (clean): Remove reg-bfin.c.
7380         (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7381         * README: Mention supported Blackfin targets.
7382
7383 2010-12-23  Mike Frysinger  <vapier@gentoo.org>
7384
7385         * .gitignore: New file.
7386
7387 2010-11-16  Mike Frysinger  <vapier@gentoo.org>
7388
7389         * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7390
7391 2010-10-22  Jie Zhang  <jie@codesourcery.com>
7392
7393         * Makefile.in: Add FLAGS_TO_PASS variable.
7394         (install): Remove dependency of install-only and recursively
7395         invoke make for install-only.
7396
7397 2010-10-04  Doug Evans  <dje@google.com>
7398
7399         * Makefile.in (uninstall): Use $(DESTDIR).
7400
7401 2010-09-24  Pedro Alves  <pedro@codesourcery.com>
7402
7403         PR gdb/11842
7404
7405         * linux-x86-low.c (compat_siginfo_from_siginfo)
7406         (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7407         si_code is < 0.  Check for si_code == SI_TIMER before checking for
7408         si_code < 0.
7409
7410 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
7411
7412         * lynx-i386-low.c: New file.
7413         * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7414
7415 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
7416
7417         * lynx-low.c (ptrace_request_to_str): Remove handling for
7418         request values that have been removed in LynxOS 5.x.
7419
7420 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
7421
7422         * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7423         <ptrace.h>
7424
7425 2010-09-09  Nathan Sidwell  <nathan@codesourcery.com>
7426
7427         * configure.ac: Add --enable-inprocess-agent option.
7428         * configure: Rebuilt.
7429
7430 2010-09-06  Yao Qi  <yao@codesourcery.com>
7431
7432         * linux-low.c (linux_kill): Remove unused variable.
7433         (linux_stabilize_threads): Likewise.
7434         * server.c (start_inferior): Likewise.
7435         (queue_stop_reply_callback): Likewise.
7436         * tracepoint.c (do_action_at_tracepoint): Likewise.
7437
7438 2010-09-06  Yao Qi  <yao@codesourcery.com>
7439
7440         * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7441         on return.
7442
7443 2010-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
7444
7445         * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7446
7447 2010-09-06  Pedro Alves  <pedro@codesourcery.com>
7448
7449         * Makefile.in (install-only): Replace $IPA_DEPFILES with
7450         "$(IPA_DEPFILES)".
7451
7452 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7453
7454         * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7455         gdbserver/lynx-ppc-low.c: New files.
7456         * Makefile.in (lynx_low_h): New variable.
7457         (lynx-low.o, lynx-ppc-low.o): New rules.
7458         * configure.ac: On LynxOS, link with -lnetinet.
7459         * configure.srv: Add handling of powerpc-*-lynxos* targets.
7460         * configure: regenerate.
7461
7462 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7463
7464         * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7465         * configure.ac: Add check for vasprintf and vsnprintf.
7466         * configure, config.in: Regenerate.
7467         * server.h (vasprintf, vsnprintf): Add conditional declarations.
7468
7469 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7470
7471         * gdbreplay.c: Move include of alloca.h up, next to include of
7472         malloc.h.
7473         * server.h: Add include of malloc.h.
7474         * mem-break.c: Remove include of malloc.h.
7475         * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7476
7477 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7478
7479         * Makefile.in (memmem.o): Build with -Wno-error.
7480
7481 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7482
7483         * utils.c (xsnprintf): Make non-static.
7484         * server.h: Add xsnprintf declaration.
7485         * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7486         replace calls to snprintf by calls to xsnprintf throughout.
7487
7488 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
7489
7490         * configure.ac: Add configure check for alloca.
7491         * configure, config.in: Regenerate.
7492         * server.h: Include alloca.h if it exists.
7493         * gdbreplay.c: Include alloca.h if it exists.
7494
7495 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
7496
7497         * linux-low.c (__SIGRTMIN): Define if not already defined.
7498         (linux_create_inferior): Check for __ANDROID__ rather than
7499         __SIGRTMIN.
7500         (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7501         are already deferred.
7502         (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7503         (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7504         stopped and already has a pending signal to report.
7505         (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7506         a pending signal to report or is moving out of a jump pad.
7507         (linux_init_signals): Check for __ANDROID__ rather than
7508         __SIGRTMIN.
7509
7510 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
7511
7512         * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7513         debug_threads check.  Avoid a linear search when not doing debug
7514         output.
7515
7516 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
7517
7518         * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7519         (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7520         (struct file_handler) <fd>: Change type to gdb_fildes_t.
7521         (process_event): Change local fd's type to gdb_fildes_t.
7522         (create_file_handler): Adjust prototype.
7523         (delete_file_handler): Adjust prototype.
7524         (handle_file_event): Adjust prototype.  Use pfildes.
7525         (create_file_event): Adjsut prototype.
7526         * remote-utils.c (remote_desc, listen_desc): Change type to
7527         gdb_fildes_t.
7528         * server.h: New gdb_fildes_t typedef.
7529         [USE_WIN32API]: Include winsock2.h.
7530         (delete_file_handler, add_file_handler): Adjust prototypes.
7531         (pfildes): Declare.
7532         * utils.c (pfildes): New.
7533
7534 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
7535
7536         * configure.ac (build_warnings): Add -Wno-char-subscripts.
7537         * configure: Regenerate.
7538
7539 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
7540
7541         * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7542         (linux_done_accessing_memory): ... this.
7543         (linux_target_ops): Adjust.
7544         * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7545         * nto-low.c (nto_target_ops): Adjust comment.
7546         * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7547         * spu-low.c (spu_target_ops): Adjust comment.
7548         * target.h (target_ops): Rename unprepare_to_access_memory field
7549         to done_accessing_memory.
7550         (unprepare_to_access_memory): Rename to ...
7551         (done_accessing_memory): ... this.
7552
7553 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
7554
7555         * linux-low.c (linux_prepare_to_access_memory): New.
7556         (linux_unprepare_to_access_memory): New.
7557         (linux_target_ops): Install them.
7558         * server.c (read_memory): Rename to ...
7559         (gdb_read_memory): ... this.  Use
7560         prepare_to_access_memory/prepare_to_access_memory.
7561         (write_memory): Rename to ...
7562         (gdb_write_memory): ... this.  Use
7563         prepare_to_access_memory/prepare_to_access_memory.
7564         (handle_search_memory_1): Adjust.
7565         (process_serial_event): Adjust.
7566         * target.h (struct target_ops): New fields
7567         prepare_to_access_memory and unprepare_to_access_memory.
7568         (prepare_to_access_memory, unprepare_to_access_memory): New.
7569         * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7570         prepare_to_access_memory/prepare_to_access_memory.
7571         * nto-low.c (nto_target_ops): Adjust.
7572         * spu-low.c (spu_target_ops): Adjust.
7573         * win32-low.c (win32_target_ops): Adjust.
7574
7575 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
7576
7577         * Makefile.in (WARN_CFLAGS): Get it from configure.
7578         (WERROR_CFLAGS): New.
7579         (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7580         * configure.ac: Introduce --enable-werror, which adds -Werror to
7581         the compiler command line.  Enabled by default.  Disable with
7582         --disable-werror.  Add -Wdeclaration-after-statement
7583         Wpointer-arith and -Wformat-nonliteral to warning flags.
7584         * configure: Regenerate.
7585
7586 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
7587
7588         * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7589
7590 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
7591
7592         * gdbreplay.c (remote_error): New.
7593         (gdbchar): New.
7594         (expect): Use gdbchar.  Check for error reading from GDB.
7595         Clarify sync error output.
7596         (play): Check for errors writing to GDB.
7597         * linux-low.c (sigchld_handler): Really ignore `write' errors.
7598         * remote-utils.c (getpkt): Check for errors writing to the remote
7599         descriptor.
7600
7601 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
7602
7603         * linux-low.c (linux_wait_1): Move non-debugging code out of
7604         `debug_threads' control.
7605
7606 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
7607
7608         * linux-low.c (linux_wait_1): Don't set last_status here.
7609         * server.c (push_event, queue_stop_reply_callback): Assert we're
7610         not pushing a TARGET_WAITKIND_IGNORE event.
7611         (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7612         (myresume, handle_target_event): Set the thread's last_resume_kind
7613         and last_status from the target returned status.
7614
7615 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
7616
7617         PR threads/10729
7618
7619         * linux-x86-low.c (update_debug_registers_callback): New.
7620         (i386_dr_low_set_addr): Use it.
7621         (i386_dr_low_get_addr): New.
7622         (i386_dr_low_set_control): Use update_debug_registers_callback.
7623         (i386_dr_low_get_control): New.
7624         (i386_dr_low_get_status): Adjust.
7625         * linux-low.c (linux_stop_lwp): New.
7626         * linux-low.h (linux_stop_lwp): Declare.
7627
7628         * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7629         argument instead of a i386_debug_reg_state.
7630         (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7631         a i386_debug_reg_state.
7632         (i386_insert_aligned_watchpoint): Adjust.
7633         (i386_remove_aligned_watchpoint): Adjust.
7634         (i386_low_stopped_data_address): Read the debug registers from the
7635         inferior instead of from the mirrors.
7636         * i386-low.h (struct i386_debug_reg_state): Extend comment.
7637         (i386_dr_low_get_addr): Declare.
7638         (i386_dr_low_get_control): Declare.
7639         (i386_dr_low_get_status): Change prototype.
7640
7641         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7642         (i386_dr_low_get_addr): New.
7643         (i386_dr_low_get_control): New.
7644         (i386_dr_low_get_status): Adjust prototype.  Return
7645         dr_status_mirror.
7646         (i386_initial_stuff): Clear dr_status_mirror and
7647         dr_control_mirror.
7648         (i386_get_thread_context): Adjust.
7649         (i386_set_thread_context): Adjust.
7650         (i386_thread_added): Adjust.
7651
7652 2010-08-24  Pedro Alves  <pedro@codesourcery.com>
7653
7654         * linux-low.h (linux_thread_area): Delete declaration.
7655
7656 2010-08-11  Thomas Schwinge  <thomas@codesourcery.com>
7657
7658         * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7659         after its termination.
7660
7661 2010-08-09  Pedro Alves  <pedro@codesourcery.com>
7662
7663         * linux-low.c (gdb_wants_lwp_stopped): Delete.
7664         (gdb_wants_all_stopped): Delete.
7665         (linux_wait_1): Don't call them.
7666         * server.c (handle_v_cont): Tag all threads as want-stopped.
7667         (gdb_wants_thread_stopped): Fix comments.  Tag the thread that
7668         stopped as "client-wants-stopped".
7669
7670 2010-07-31  Pedro Alves  <pedro@codesourcery.com>
7671
7672         * Makefile.in (signals_h): New.
7673         (server_h): Depend on it.
7674         (server.o): Don't depend on $(signals_def).
7675         (signals.o): Depend on $(signals_def).
7676
7677 2010-07-31  Jan Kratochvil  <jan.kratochvil@redhat.com>
7678
7679         * Makefile.in (signals_def): New.
7680         (server_h): Append include/gdb/signals.h and signals_def.
7681         (server.o): Append signals_def.
7682
7683 2010-07-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
7684
7685         * server.c (handle_target_event): Use target_signal_to_host for
7686         resume_info.sig initialization.
7687         * target.h (struct thread_resume) <sig>: New comment.
7688
7689 2010-07-20  Ozkan Sezer  <sezeroz@gmail.com>
7690
7691         * server.c (handle_query): strcpy() the returned string from paddress()
7692         instead of sprintf().
7693         * utils.c (paddress): Return phex_nz().
7694
7695 2010-07-07  Joel Brobecker  <brobecker@adacore.com>
7696
7697         * server.c (handle_v_cont): Call mourn_inferior if process
7698         just exited.
7699         (myresume): Likewise.
7700
7701 2010-07-01  Pedro Alves  <pedro@codesourcery.com>
7702
7703         Static tracepoints, and integration with UST.
7704
7705         * configure.ac: Handle --with-ust.  substitute ustlibs and ustinc.
7706         * mem-break.c (uninsert_all_breakpoints)
7707         (reinsert_all_breakpoints): New.
7708         * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7709         * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7710         (gdb_agent_ust_loaded, helper_thread_id)
7711         (gdb_agent_helper_thread_id): New macros.
7712         (struct ipa_sym_addresses): Add addr_ust_loaded,
7713         addr_helper_thread_id, addr_cmd_buf.
7714         (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7715         (in_process_agent_loaded_ust): New.
7716         (write_e_ust_not_loaded): New.
7717         (maybe_write_ipa_ust_not_loaded): New.
7718         (struct collect_static_trace_data_action): New.
7719         (enum tracepoint_type) <static_tracepoint>: New.
7720         (struct tracepoint) <handle>: Mention static tracepoints.
7721         (struct static_tracepoint_ctx): New.
7722         (CMD_BUF_SIZE): New.
7723         (add_tracepoint_action): Handle static tracepoint actions.
7724         (unprobe_marker_at): New.
7725         (clear_installed_tracepoints): Handle static tracepoints.
7726         (cmd_qtdp): Handle static tracepoints.
7727         (probe_marker_at): New.
7728         (cmd_qtstart): Handle static tracepoints.
7729         (response_tracepoint): Handle static tracepoints.
7730         (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7731         (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7732         (get_context_regcache): Handle static tracepoints.
7733         (do_action_at_tracepoint): Handle static tracepoint actions.
7734         (traceframe_find_block_type): Handle static trace data blocks.
7735         (traceframe_read_sdata): New.
7736         (download_tracepoints): Download static tracepoint actions.
7737         [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7738         (GDB_PROBE_NAME): New.
7739         (ust_ops): New.
7740         (GET_UST_SYM): New.
7741         (USTF): New.
7742         (dlsym_ust): New.
7743         (ust_marker_to_static_tracepoint): New.
7744         (gdb_probe): New.
7745         (collect_ust_data_at_tracepoint): New.
7746         (gdb_ust_probe): New.
7747         (UNIX_PATH_MAX, SOCK_DIR): New.
7748         (gdb_ust_connect_sync_socket): New.
7749         (resume_thread, stop_thread): New.
7750         (run_inferior_command): New.
7751         (init_named_socket): New.
7752         (gdb_ust_socket_init): New.
7753         (cstr_to_hexstr): New.
7754         (next_st): New.
7755         (first_marker, next_marker): New.
7756         (response_ust_marker): New.
7757         (cmd_qtfstm, cmd_qtsstm): New.
7758         (unprobe_marker_at, probe_marker_at): New.
7759         (cmd_qtstmat, gdb_ust_thread): New.
7760         (gdb_ust_init): New.
7761         (initialize_tracepoint_ftlib): Call gdb_ust_init.
7762         * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7763         (ST_REGENTRY): New.
7764         (x86_64_st_collect_regmap): New.
7765         (X86_64_NUM_ST_COLLECT_GREGS): New.
7766         (AMD64_RIP_REGNUM): New.
7767         (supply_static_tracepoint_registers): New.
7768         * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7769         (ST_REGENTRY): New.
7770         (i386_st_collect_regmap): New.
7771         (i386_NUM_ST_COLLECT_GREGS): New.
7772         (supply_static_tracepoint_registers): New.
7773         * server.c (handle_query): Handle qXfer:statictrace:read.
7774         <qSupported>: Report support for StaticTracepoints, and
7775         qXfer:statictrace:read features.
7776         * server.h (traceframe_read_sdata)
7777         (supply_static_tracepoint_registers): Declare.
7778         * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7779         (unpack_varlen_hex): Include in IPA build.
7780         * Makefile.in (ustlibs, ustinc): New.
7781         (IPA_OBJS): Add remote-utils-ipa.o.
7782         ($(IPA_LIB)): Link -ldl and -lpthread.
7783         (UST_CFLAGS): New.
7784         (IPAGENT_CFLAGS): Add UST_CFLAGS.
7785         * config.in, configure: Regenerate.
7786
7787 2010-06-20  Ian Lance Taylor  <iant@google.com>
7788             Pedro Alves  <pedro@codesourcery.com>
7789
7790         * linux-x86-low.c (always_true): Delete.
7791         (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7792         trying to fool the compiler with always_true.
7793
7794 2010-06-20  Pedro Alves  <pedro@codesourcery.com>
7795
7796         * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7797         conditions in gdbserver.
7798
7799 2010-06-19  Ulrich Weigand  <uweigand@de.ibm.com>
7800
7801         * spu-low.c (spu_read_memory): Wrap around local store limit.
7802         (spu_write_memory): Likewise.
7803
7804 2010-06-15  Pedro Alves  <pedro@codesourcery.com>
7805
7806         * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7807         (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7808         LONGEST uses.
7809         * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7810         uses.
7811         * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7812         uses with LONGEST uses.
7813
7814 2010-06-14  Stan Shebs  <stan@codesourcery.com>
7815             Pedro Alves  <pedro@codesourcery.com>
7816
7817         Bytecode compiler.
7818
7819         * linux-x86-low.c: Include limits.h.
7820         (add_insns): New.
7821         (always_true): New.
7822         (EMIT_ASM): New.
7823         (EMIT_ASM32): New.
7824         (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7825         (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7826         (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7827         (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7828         (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7829         (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7830         (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7831         (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7832         (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7833         (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7834         (amd64_emit_void_call_2): New.
7835         (amd64_emit_ops): New.
7836         (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7837         (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7838         (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7839         (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7840         (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7841         (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7842         (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7843         (i386_emit_call, i386_emit_reg, i386_emit_pop)
7844         (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7845         (i386_emit_stack_adjust, i386_emit_int_call_1)
7846         (i386_emit_void_call_2): New.
7847         (i386_emit_ops): New.
7848         (x86_emit_ops): New.
7849         (the_low_target): Install x86_emit_ops.
7850         * server.h (struct emit_ops): New.
7851         (get_raw_reg_func_addr): Declare.
7852         (current_insn_ptr, emit_error): Declare.
7853         * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7854         (set_trace_state_variable_value): New defines.
7855         (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7856         addr_get_trace_state_variable_value and
7857         addr_set_trace_state_variable_value.
7858         (symbol_list): New fields for get_raw_reg,
7859         get_trace_state_variable_value and set_trace_state_variable_value.
7860         (condfn): New typedef.
7861         (struct tracepoint): New field `compiled_cond'.
7862         (do_action_at_tracepoint): Clear compiled_cond.
7863         (get_trace_state_variable_value, set_trace_state_variable_value):
7864         Export in the IPA.
7865         (condition_true_at_tracepoint): If there's a compiled condition,
7866         run that.
7867         (current_insn_ptr, emit_error): New globals.
7868         (struct bytecode_address): New.
7869         (get_raw_reg_func_addr): New.
7870         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7871         (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7872         (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7873         (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7874         (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7875         (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7876         (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7877         (compile_tracepoint_condition, compile_bytecodes): New.
7878         * target.h (emit_ops): Forward declare.
7879         (struct target_ops): New field emit_ops.
7880         (target_emit_ops): New.
7881         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7882         * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7883         * linux-low.c (linux_emit_ops): New.
7884         (linux_target_ops): Install it.
7885         * linux-low.h (struct linux_target_ops): New field emit_ops.
7886
7887 2010-06-14  Ulrich Weigand  <uweigand@de.ibm.com>
7888
7889         * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7890         * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7891
7892 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
7893             Stan Shebs  <stan@codesourcery.com>
7894
7895         * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7896         (all): Depend on $(extra_libraries).
7897         (install-only): Install the IPA.
7898         (IPA_OBJS, IPA_LIB): New.
7899         (clean): Remove the IPA lib.
7900         (IPAGENT_CFLAGS): New.
7901         (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7902         (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7903         (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7904         * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7905         * configure.ac: Check for atomic builtins support in the compiler.
7906         (IPA_DEPFILES, extra_libraries): Define.
7907         * configure.srv (ipa_obj): Add description.
7908         (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7909         (i[34567]86-*-linux*): Set ipa_obj.
7910         (x86_64-*-linux*): Set ipa_obj.
7911         * linux-low.c (stabilizing_threads): New.
7912         (supports_fast_tracepoints): New.
7913         (linux_detach): Stabilize threads before detaching.
7914         (handle_tracepoints): Handle internal tracing breakpoints.  Assert
7915         the lwp is either not stabilizing, or is moving out of a jump pad.
7916         (linux_fast_tracepoint_collecting): New.
7917         (maybe_move_out_of_jump_pad): New.
7918         (enqueue_one_deferred_signal): New.
7919         (dequeue_one_deferred_signal): New.
7920         (linux_wait_for_event_1): If moving out of a jump pad, defer
7921         pending signals to later.
7922         (linux_stabilize_threads): New.
7923         (linux_wait_1): Check if threads need moving out of jump pads, and
7924         do it if so.
7925         (stuck_in_jump_pad_callback): New.
7926         (move_out_of_jump_pad_callback): New.
7927         (lwp_running): New.
7928         (linux_resume_one_lwp): Handle moving out of jump pads.
7929         (linux_set_resume_request): Dequeue deferred signals.
7930         (need_step_over_p): Also step over fast tracepoint jumps.
7931         (start_step_over): Also uninsert fast tracepoint jumps.
7932         (finish_step_over): Also reinsert fast tracepoint jumps.
7933         (linux_install_fast_tracepoint_jump): New.
7934         (linux_target_ops): Install linux_stabilize_threads and
7935         linux_install_fast_tracepoint_jump_pad.
7936         * linux-low.h (linux_target_ops) <get_thread_area,
7937         install_fast_tracepoint_jump_pad>: New fields.
7938         (struct lwp_info) <collecting_fast_tracepoint,
7939         pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7940         (linux_get_thread_area): Declare.
7941         * linux-x86-low.c (jump_insn): New.
7942         (x86_get_thread_area): New.
7943         (append_insns): New.
7944         (push_opcode): New.
7945         (amd64_install_fast_tracepoint_jump_pad): New.
7946         (i386_install_fast_tracepoint_jump_pad): New.
7947         (x86_install_fast_tracepoint_jump_pad): New.
7948         (the_low_target): Install x86_get_thread_area and
7949         x86_install_fast_tracepoint_jump_pad.
7950         * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7951         (struct fast_tracepoint_jump): New.
7952         (fast_tracepoint_jump_insn): New.
7953         (fast_tracepoint_jump_shadow): New.
7954         (find_fast_tracepoint_jump_at): New.
7955         (fast_tracepoint_jump_here): New.
7956         (delete_fast_tracepoint_jump): New.
7957         (set_fast_tracepoint_jump): New.
7958         (uninsert_fast_tracepoint_jumps_at): New.
7959         (reinsert_fast_tracepoint_jumps_at): New.
7960         (set_breakpoint_at): Use write_inferior_memory.
7961         (uninsert_raw_breakpoint): Use write_inferior_memory.
7962         (check_mem_read): Mask out fast tracepoint jumps.
7963         (check_mem_write): Mask out fast tracepoint jumps.
7964         * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7965         (set_fast_tracepoint_jump): Declare.
7966         (delete_fast_tracepoint_jump)
7967         (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7968         (reinsert_fast_tracepoint_jumps_at): Declare.
7969         * regcache.c: Don't compile many functions when building the
7970         in-process agent library.
7971         (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7972         the register buffer in the heap.
7973         (free_register_cache): If the register buffer isn't owned by the
7974         regcache, don't free it.
7975         (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7976         pre-existing register caches.
7977         * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7978         type.
7979         (convert_ascii_to_int): : Constify `from' parameter type.
7980         (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7981         a `to_p' pointer to pointer parameter.  If TO_P is NULL, malloc
7982         the needed buffer in-place.
7983         (relocate_instruction): New.
7984         * server.c (handle_query) <qSymbols>: If the target supports
7985         tracepoints, give it a chance of looking up symbols.  Report
7986         support for fast tracepoints.
7987         (handle_status): Stabilize threads.
7988         (process_serial_event): Adjust.
7989         * server.h (struct fast_tracepoint_jump): Forward declare.
7990         (struct process_info) <fast_tracepoint_jumps>: New field.
7991         (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7992         (decode_X_packet, decode_M_packet): Adjust.
7993         (relocate_instruction): Declare.
7994         (in_process_agent_loaded): Declare.
7995         (tracepoint_look_up_symbols): Declare.
7996         (struct fast_tpoint_collect_status): Declare.
7997         (fast_tracepoint_collecting): Declare.
7998         (force_unlock_trace_buffer): Declare.
7999         (handle_tracepoint_bkpts): Declare.
8000         (initialize_low_tracepoint)
8001         (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
8002         * target.h (struct target_ops) <stabilize_threads,
8003         install_fast_tracepoint_jump_pad>: New fields.
8004         (stabilize_threads, install_fast_tracepoint_jump_pad): New.
8005         * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
8006         [HAVE_STDINT_H]: Include stdint.h.
8007         (trace_debug_1): Rename to ...
8008         (trace_vdebug): ... this.
8009         (trace_debug): Rename to ...
8010         (trace_debug_1): ... this.  Add `level' parameter.
8011         (trace_debug): New.
8012         (ATTR_USED, ATTR_NOINLINE): New.
8013         (IP_AGENT_EXPORT): New.
8014         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
8015         (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
8016         (about_to_request_buffer_space, trace_buffer_is_full)
8017         (stopping_tracepoint, expr_eval_result, error_tracepoint)
8018         (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
8019         (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
8020         (traceframe_write_count, traceframes_created)
8021         (trace_state_variables)
8022         New renaming defines.
8023         (struct ipa_sym_addresses): New.
8024         (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
8025         (symbol_list): New.
8026         (ipa_sym_addrs): New.
8027         (all_tracepoint_symbols_looked_up): New.
8028         (in_process_agent_loaded): New.
8029         (write_e_ipa_not_loaded): New.
8030         (maybe_write_ipa_not_loaded): New.
8031         (tracepoint_look_up_symbols): New.
8032         (debug_threads) [IN_PROCESS_AGENT]: New.
8033         (read_inferior_memory) [IN_PROCESS_AGENT]: New.
8034         (UNKNOWN_SIDE_EFFECTS): New.
8035         (stop_tracing): New.
8036         (flush_trace_buffer): New.
8037         (stop_tracing_bkpt): New.
8038         (flush_trace_buffer_bkpt): New.
8039         (read_inferior_integer): New.
8040         (read_inferior_uinteger): New.
8041         (read_inferior_data_pointer): New.
8042         (write_inferior_data_pointer): New.
8043         (write_inferior_integer): New.
8044         (write_inferior_uinteger): New.
8045         (struct collect_static_trace_data_action): Delete.
8046         (enum tracepoint_type): New.
8047         (struct tracepoint) <type>: New field `type'.
8048         <actions_str, step_actions, step_actions_str>: Only include in
8049         GDBserver.
8050         <orig_size, obj_addr_on_target, adjusted_insn_addr>
8051         <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
8052         (tracepoints): Use IP_AGENT_EXPORT.
8053         (last_tracepoint): Don't include in the IPA.
8054         (stopping_tracepoint): Use IP_AGENT_EXPORT.
8055         (trace_buffer_is_full): Use IP_AGENT_EXPORT.
8056         (alloced_trace_state_variables): New.
8057         (trace_state_variables): Use IP_AGENT_EXPORT.
8058         (traceframe_t): Delete unused variable.
8059         (circular_trace_buffer): Don't include in the IPA.
8060         (trace_buffer_start): Delete.
8061         (struct trace_buffer_control): New.
8062         (trace_buffer_free): Delete.
8063         (struct ipa_trace_buffer_control): New.
8064         (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
8065         (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
8066         New.
8067         (trace_buffer_ctrl): New.
8068         (TRACE_BUFFER_CTRL_CURR): New.
8069         (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
8070         Reimplement as macros.
8071         (trace_buffer_wrap): Delete.
8072         (traceframe_write_count, traceframe_read_count)
8073         (traceframes_created, tracing): Use IP_AGENT_EXPORT.
8074         (struct tracepoint_hit_ctx) <type>: New field.
8075         (struct fast_tracepoint_ctx): New.
8076         (memory_barrier): New.
8077         (cmpxchg): New.
8078         (record_tracepoint_error): Update atomically in the IPA.
8079         (clear_inferior_trace_buffer): New.
8080         (about_to_request_buffer_space): New.
8081         (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
8082         updating the same buffer.
8083         (add_tracepoint): Default the tracepoint's type to trap
8084         tracepoint, and orig_size to -1.
8085         (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
8086         internal variables.
8087         (create_trace_state_variable): New parameter `gdb'.  Handle it.
8088         (clear_installed_tracepoints): Clear fast tracepoint jumps.
8089         (cmd_qtdp): Handle fast tracepoints.
8090         (cmd_qtdv): Adjust.
8091         (max_jump_pad_size): New.
8092         (gdb_jump_pad_head): New.
8093         (get_jump_space_head): New.
8094         (claim_jump_space): New.
8095         (sort_tracepoints): New.
8096         (MAX_JUMP_SIZE): New.
8097         (cmd_qtstart): Handle fast tracepoints.  Sync tracepoints with the
8098         IPA.
8099         (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
8100         support.  Upload fast traceframes, and delete internal IPA
8101         breakpoints.
8102         (stop_tracing_handler): New.
8103         (flush_trace_buffer_handler): New.
8104         (cmd_qtstop): Upload fast tracepoints.
8105         (response_tracepoint): Handle fast tracepoints.
8106         (tracepoint_finished_step): Upload fast traceframes.  Set the
8107         tracepoint hit context's tracepoint type.
8108         (handle_tracepoint_bkpts): New.
8109         (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
8110         type.  Add comment about fast tracepoints.
8111         (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
8112         non-existing action_str field.
8113         (get_context_regcache): Handle fast tracepoints.
8114         (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
8115         to the regcache.
8116         (fast_tracepoint_from_jump_pad_address): New.
8117         (fast_tracepoint_from_ipa_tpoint_address): New.
8118         (collecting_t): New.
8119         (force_unlock_trace_buffer): New.
8120         (fast_tracepoint_collecting): New.
8121         (collecting): New.
8122         (gdb_collect): New.
8123         (write_inferior_data_ptr): New.
8124         (target_tp_heap): New.
8125         (target_malloc): New.
8126         (download_agent_expr): New.
8127         (UALIGN): New.
8128         (download_tracepoints): New.
8129         (download_trace_state_variables): New.
8130         (upload_fast_traceframes): New.
8131         (IPA_FIRST_TRACEFRAME): New.
8132         (IPA_NEXT_TRACEFRAME_1): New.
8133         (IPA_NEXT_TRACEFRAME): New.
8134         [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8135         [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8136         (gdb_jump_pad_buffer_end): New.
8137         [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8138         (initialize_tracepoint): Adjust.
8139         [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8140         buffer.  Initialize the low module.
8141         * utils.c (PREFIX, TOOLNAME): New.
8142         (malloc_failure): Use PREFIX.
8143         (error): In the IPA, an error causes an exit.
8144         (fatal, warning): Use PREFIX.
8145         (internal_error): Use TOOLNAME.
8146         (NUMCELLS): Increase to 10.
8147         * configure, config.in: Regenerate.
8148
8149 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
8150
8151         * server.c (handle_query) <qSupported>: Do two passes over the
8152         qSupported string to avoid nesting strtok.
8153
8154 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
8155
8156         * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8157         (CDEPS): New.
8158         * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping.  Test also
8159         -Wl,--dynamic-list.
8160         * configure: Regenerate.
8161         * proc-service.list: New.
8162
8163 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
8164
8165         * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8166         New comment.
8167
8168 2010-05-26  Ozkan Sezer  <sezeroz@gmail.com>
8169
8170         * gdbreplay.c (remote_open): Check error return from socket() call by
8171         its equality to -1 not by it being negative.
8172         * remote-utils.c (remote_open): Likewise.
8173
8174 2010-05-23  Pedro Alves  <pedro@codesourcery.com>
8175
8176         * config.h: Regenerate.
8177
8178 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
8179
8180         * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8181         doesn't provide PTRACE_GET_THREAD_AREA.
8182
8183 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
8184
8185         * linux-m68k-low.c: Include <asm/ptrace.h>
8186         (ps_get_thread_area): Implement.
8187
8188 2010-05-03  Doug Evans  <dje@google.com>
8189
8190         * event-loop.c (struct callback_event): New struct.
8191         (callback_list): New global.
8192         (append_callback_event, delete_callback_event): New functions.
8193         (process_callback): New function.
8194         (start_event_loop): Call it.
8195         * remote-utils.c (NOT_SCHEDULED): Define.
8196         (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8197         moved out of readchar.
8198         (readchar): Rewrite.  Call reschedule before returning.
8199         (reset_readchar): New function.
8200         (remote_close): Call it.
8201         (process_remaining, reschedule): New functions.
8202         * server.h (callback_handler_func): New typedef.
8203         (append_callback_event, delete_callback_event): Declare.
8204
8205 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
8206
8207         * proc-service.c (ps_pglobal_lookup): Use
8208         thread_db_look_up_one_symbol.
8209         * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8210         parameter.  Use it instead of all_symbols_looked_up.
8211         * server.h (struct process_info) <all_symbols_looked_up>: Delete
8212         field.
8213         (all_symbols_looked_up): Don't declare.
8214         (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8215         * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8216         field.
8217         (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8218         Set all_symbols_looked_up here.
8219         (thread_db_look_up_one_symbol): New.
8220         (thread_db_get_tls_address): Adjust.
8221         (thread_db_load_search, try_thread_db_load_1): Always allocate the
8222         thread_db object on the heap, and tentatively set it in the
8223         process structure.
8224         (thread_db_init): Don't set all_symbols_looked_up here.
8225         * linux-low.h (thread_db_look_up_one_symbol): Declare.
8226
8227 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
8228
8229         * linux-low.c (linux_kill, linux_detach): Adjust.
8230         (status_pending_p_callback): Remove redundant statement.  Check
8231         for !TARGET_WAITIKIND_IGNORE, instead of
8232         TARGET_WAITKIND_STOPPED.
8233         (handle_tracepoints): Make sure LWP is locked.  Adjust.
8234         (linux_wait_for_event_1): Adjust.
8235         (linux_cancel_breakpoints): New.
8236         (unsuspend_one_lwp): New.
8237         (unsuspend_all_lwps): New.
8238         (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8239         (send_sigstop_callback): Change return type to int, add new
8240         `except' parameter and handle it.
8241         (suspend_and_send_sigstop_callback): New.
8242         (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8243         pass them down.  If SUSPEND, also increment the lwp's suspend
8244         count.
8245         (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8246         (need_step_over_p): Don't consider suspended LWPs.
8247         (start_step_over): Adjust.
8248         (proceed_one_lwp): Change return type to int, add new `except'
8249         parameter and handle it.
8250         (unsuspend_and_proceed_one_lwp): New.
8251         (proceed_all_lwps): Use find_inferior instead of
8252         for_each_inferior.
8253         (unstop_all_lwps): Add `unsuspend' parameter.  If UNSUSPEND, them
8254         also decrement the suspend count of LWPs.  Pass `except' down,
8255         instead of hacking its suspend count.
8256         (linux_pause_all): Add `freeze' parameter.  Adjust.
8257         (linux_unpause_all): New.
8258         (linux_target_ops): Install linux_unpause_all.
8259         * server.c (handle_status): Adjust.
8260         * target.h (struct target_ops): New fields `unpause_all' and
8261         `cancel_breakpoints'.  Add new parameter to `pause_all'.
8262         (pause_all): Add new `freeze' parameter.
8263         (unpause_all): New.
8264         (cancel_breakpoints): New.
8265         * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8266         cancel breakpoints.
8267         (cmd_qtstart): Pause threads.
8268         (stop_tracing): Pause threads, and cancel breakpoints.
8269         * win32-low.c (win32_target_ops): Adjust.
8270
8271 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
8272
8273         * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8274         the inferior right away from here...
8275         (linux_wait_1): ... to here, and adjust to check the thread's
8276         last_resume_kind instead of the lwp's step or stop_expected flags.
8277
8278 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
8279
8280         * README: Use consistent `GDB' and `GDBserver' spellings.
8281
8282 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
8283
8284         * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8285         (linux_kill): Stop all lwps here.  Don't delete the main lwp here.
8286         (linux_detach_one_lwp): Assume the lwp is stopped.
8287         (any_thread_of): Delete.
8288         (linux_detach): Stop all lwps here.  Don't blindly delete all
8289         breakpoints.
8290         (delete_lwp_callback): New.
8291         (linux_mourn): Delete all lwps of the process that is gone.
8292         (linux_wait_1): Don't delete the last lwp of the process here.
8293         * mem-break.h (mark_breakpoints_out): Declare.
8294         * mem-break.c (mark_breakpoints_out): New.
8295         (free_all_breakpoints): Use it.
8296         * server.c (handle_target_event): If the process is gone, mark
8297         breakpoints out.
8298         * thread-db.c (struct thread_db) <create_bp>: New field.
8299         (thread_db_enable_reporting): Fix prototype.  Store a thread event
8300         breakpoint reference in the thread_db struct.
8301         (thread_db_load_search): Clear the thread_db object.
8302         (try_thread_db_load_1): Ditto.
8303         (switch_to_process): New.
8304         (disable_thread_event_reporting): Use it.
8305         (remove_thread_event_breakpoints): New.
8306         (thread_db_detach, thread_db_mourn): Use it.
8307
8308 2010-05-01  Pedro Alves  <pedro@codesourcery.com>
8309
8310         * linux-low.c (linux_enable_event_reporting): New.
8311         (linux_wait_for_event_1, handle_extended_wait): Use it.
8312
8313 2010-04-30  Pedro Alves  <pedro@codesourcery.com>
8314
8315         * linux-low.c (linux_kill_one_lwp, linux_kill)
8316         (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8317         (send_sigstop): Take an lwp_info as parameter instead.  Queue a
8318         SIGSTOP even if the LWP is stopped.
8319         (send_sigstop_callback): New.
8320         (stop_all_lwps): Use send_sigstop_callback instead.
8321         (linux_resume_one_thread): Adjust.
8322         (proceed_one_lwp): Still proceed an LWP that the client has
8323         requested to stop, if we haven't reported it as stopped yet.  Make
8324         sure that LWPs the client want stopped, have a pending SIGSTOP.
8325
8326 2010-04-26  Doug Evans  <dje@google.com>
8327
8328         * server.c (handle_general_set): Make static.
8329
8330         * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8331         Print received char after testing for error/eof instead of before.
8332         (input_interrupt): Tweak comment.
8333
8334 2010-04-23  Doug Evans  <dje@google.com>
8335
8336         * server.c (start_inferior): Print inferior argv if --debug.
8337
8338 2010-04-21  Aleksandar Ristovski  <aristovski@qnx.com>
8339
8340         * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8341         * nto-x86-low.c: Include server.h
8342
8343 2010-04-20  Pierre Muller  <muller@ics.u-strasbg.fr>
8344
8345         * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8346         be consistent with other sources of this directory.
8347         (init_registers_amd64): Correct name of source file of this function
8348         in the comment.
8349
8350 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
8351
8352         * configure.srv (x86_64-*-mingw*): New configuration for Windows
8353         64-bit executables.
8354
8355 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
8356
8357         * win32-i386-low.c: Add 64-bit support.
8358         (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8359         (init_registers_amd64): Declare.
8360         (mappings): Add 64-bit version of array.
8361         (init_windows_x86): New function.
8362         (the_low_target): Change init_arch field to init_windows_x86.
8363
8364 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
8365
8366         * win32-low.c: Adapt to support also 64-bit architecture.
8367         (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8368         (get_image_name): Use SIZE_T type for local variable `done'.
8369         (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8370         (toolhelp_get_dll_name): Idem.
8371         (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8372         Use uintptr_t typecast to avoid warning.
8373         (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8374         (handle_exception): Use phex_nz to avoid warning.
8375         (win32_wait): Remove unused local variable `process'.
8376
8377 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
8378
8379         * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8380         `amd64-avx.o'.
8381
8382 2010-04-17  Pierre Muller  <muller@ics.u-strasbg.fr>
8383
8384         * configure.ac: Use `ws2_32' library for srv_mingw.
8385         * configure: Regenerate.
8386         * gdbreplay.c: Include winsock2.h instead of winsock.h.
8387         * remote-utils.c: Likewise.
8388
8389 2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>
8390
8391         * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8392         if __x86_64__ is defined.
8393
8394 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
8395
8396         * configure: Regenerate.
8397
8398 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
8399
8400         * server.c (handle_query): Handle 'qGetTIBAddr' query.
8401         * target.h (target_ops): New get_tib_address field.
8402         * win32-low.h (win32_thread_info): Add thread_local_base field.
8403         * win32-low.c (child_add_thread): Add tlb argument.
8404         Set thread_local_base field to TLB.
8405         (get_child_debug_event): Adapt to child_add_thread change.
8406         (win32_get_tib_address): New function.
8407         (win32_target_ops): Set get_tib_address field to
8408         win32_get_tib_address.
8409         * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8410
8411 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
8412
8413         * linux-low.c (linux_mourn): Also remove the process.
8414         * server.c (handle_target_event): Don't remove the process here.
8415         * nto-low.c (nto_mourn): New.
8416         (nto_target_ops): Install it.
8417         * spu-low.c (spu_mourn): New.
8418         (spu_target_ops): Install it.
8419         * win32-low.c (win32_mourn): New.
8420         (win32_target_ops): Install it.
8421
8422 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
8423
8424         * server.h (buffer_xml_printf): Remove redundant `;'.
8425
8426 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
8427
8428         * regcache.c (set_register_cache): Invalidate regcaches before
8429         changing the register cache layout.
8430         (regcache_invalidate_one): Allow a NULL regcache.
8431         * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8432         regcaches before changing the register cache layout or the target
8433         regsets.
8434
8435 2010-04-12  H.J. Lu  <hongjiu.lu@intel.com>
8436
8437         * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8438         variable warning on Linux/x86-64.
8439
8440 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
8441
8442         GDBserver disconnected tracing support.
8443
8444         * linux-low.c (linux_remove_process): Delete.
8445         (add_lwp): Don't set last_resume_kind here.
8446         (linux_kill): Use `mourn'.
8447         (linux_detach): Use `thread_db_detach', and `mourn'.
8448         (linux_mourn): New.
8449         (linux_attach_lwp_1): Adjust comment.
8450         (linux_attach): last_resume_kind moved the thread_info; adjust.
8451         (status_pending_p_callback): Adjust.
8452         (linux_wait_for_event_1): Adjust.
8453         (count_events_callback, select_singlestep_lwp_callback)
8454         (select_event_lwp_callback, cancel_breakpoints_callback)
8455         (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8456         (proceed_one_lwp): Adjust.
8457         (linux_async): Add debug output.
8458         (linux_thread_stopped): New.
8459         (linux_pause_all): New.
8460         (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8461         linux_pause_all.
8462         * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8463         (thread_db_free): Delete declaration.
8464         (thread_db_detach, thread_db_mourn): Declare.
8465         * thread-db.c (thread_db_init): Use thread_db_mourn.
8466         (thread_db_free): Delete, split in two.
8467         (disable_thread_event_reporting): New.
8468         (thread_db_detach): New.
8469         (thread_db_mourn): New.
8470
8471         * server.h (struct thread_info) <last_resume_kind>: New field.
8472         <attached>: Add comment.
8473         <gdb_detached>: New field.
8474         (handler_func): Change return type to int.
8475         (handle_serial_event, handle_target_event): Ditto.
8476         (gdb_connected): Declare.
8477         (tracing): Delete.
8478         (disconnected_tracing): Declare.
8479         (stop_tracing): Declare.
8480
8481         * server.c (handle_query) <qSupported>: Report support for
8482         disconnected tracing.
8483         (queue_stop_reply_callback): Account for running threads.
8484         (gdb_wants_thread_stopped): New.
8485         (gdb_wants_all_threads_stopped): New.
8486         (gdb_reattached_process): New.
8487         (handle_status): Clear the `gdb_detached' flag of all processes.
8488         In all-stop, stop all threads.
8489         (main): Be sure to leave tfind mode.  Handle disconnected tracing.
8490         (process_serial_event): If the remote connection breaks, or if an
8491         exit was forced with "monitor exit", force an event loop exit.
8492         Handle disconnected tracing on detach.
8493         (handle_serial_event): Adjust.
8494         (handle_target_event): If GDB isn't connected, forward events back
8495         to the inferior, unless the last process exited, in which case,
8496         exit gdbserver.  Adjust interface.
8497
8498         * remote-utils.c (remote_open): Don't block in accept.  Instead
8499         register an event loop source on the listen socket file
8500         descriptor.  Refactor bits into ...
8501         (listen_desc): ... this new global.
8502         (gdb_connected): ... this new function.
8503         (enable_async_notification): ... this new function.
8504         (handle_accept_event): ... this new function.
8505         (remote_close): Clear remote_desc.
8506
8507         * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8508
8509         * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8510         New fields.
8511         (mourn_inferior): Define.
8512         (target_process_qsupported): Avoid the dangling else problem.
8513         (thread_stopped): Define.
8514         (pause_all): Define.
8515         (target_waitstatus_to_string): Declare.
8516         * target.c (target_waitstatus_to_string): New.
8517
8518         * tracepoint.c (tracing): Make extern.
8519         (disconnected_tracing): New.
8520         (stop_tracing): Make extern.  Handle tracing stops due to GDB
8521         disconnecting.
8522         (cmd_qtdisconnected): New.
8523         (cmd_qtstatus): Report disconnected tracing status in trace reply.
8524         (handle_tracepoint_general_set): Handle QTDisconnected.
8525
8526         * event-loop.c (event_handler_func): Change return type to int.
8527         (process_event): Bail out if the event handler wants the event
8528         loop to stop.
8529         (handle_file_event): Ditto.
8530         (start_event_loop): Bail out if the event handler wants the event
8531         loop to stop.
8532
8533         * nto-low.c (nto_target_ops): Adjust.
8534         * spu-low.c (spu_wait): Don't remove the process here.
8535         (spu_target_ops): Adjust.
8536         * win32-low.c (win32_wait): Don't remove the process here.
8537         (win32_target_ops): Adjust.
8538
8539 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
8540
8541         * regcache.c (realloc_register_cache): Invalidate inferior's
8542         regcache before recreating it.
8543
8544 2010-04-09  Pedro Alves  <pedro@codesourcery.com>
8545
8546         * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8547
8548 2010-04-09  Stan Shebs  <stan@codesourcery.com>
8549             Pedro Alves  <pedro@codesourcery.com>
8550
8551         * server.h (LONGEST): New.
8552         (struct thread_info) <while_stepping>: New field.
8553         (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8554         Declare.
8555         (initialize_tracepoint, handle_tracepoint_general_set)
8556         (handle_tracepoint_query, tracepoint_finished_step)
8557         (tracepoint_was_hit, release_while_stepping_state_list):
8558         (current_traceframe): Declare.
8559         * server.c (handle_general_set): Handle tracepoint packets.
8560         (read_memory): New.
8561         (write_memory): New.
8562         (handle_search_memory_1): Use read_memory.
8563         (handle_query): Report support for conditional tracepoints, trace
8564         state variables, and tracepoint sources.  Handle tracepoint
8565         queries.
8566         (main): Initialize the tracepoints module.
8567         (process_serial_event): Handle traceframe reads/writes.
8568
8569         * linux-low.c (handle_tracepoints): New.
8570         (linux_wait_1): Call it.
8571         (linux_resume_one_lwp): Handle while-stepping.
8572         (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8573         (linux_target_ops): Install them.
8574         * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8575         New field.
8576         * linux-x86-low.c (x86_supports_tracepoints): New.
8577         (the_low_target). Install it.
8578
8579         * mem-break.h (delete_breakpoint): Declare.
8580         * mem-break.c (delete_breakpoint): Make external.
8581
8582         * target.h (struct target_ops): Add `supports_tracepoints',
8583         `read_pc', and `write_pc' fields.
8584         (target_supports_tracepoints): Define.
8585         * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8586         (phex_nz): New.
8587
8588         * regcache.h (struct regcache) <registers_owned>: New field.
8589         (init_register_cache, regcache_cpy): Declare.
8590         (regcache_read_pc, regcache_write_pc): Declare.
8591         (register_cache_size): Declare.
8592         (supply_regblock): Declare.
8593         * regcache.c (init_register_cache): New.
8594         (new_register_cache): Use it.
8595         (regcache_cpy): New.
8596         (register_cache_size): New.
8597         (supply_regblock): New.
8598         (regcache_read_pc, regcache_write_pc): New.
8599
8600         * tracepoint.c: New.
8601
8602         * Makefile.in (OBS): Add tracepoint.o.
8603         (tracepoint.o): New rule.
8604
8605 2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>
8606
8607         * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8608         (i386-mmx.o): New.
8609         (i386-mmx.c): Likewise.
8610         (i386-mmx-linux.o): Likewise.
8611         (i386-mmx-linux.c): Likewise.
8612
8613         * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8614         (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8615         (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8616         (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8617
8618         * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8619         (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8620         and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8621
8622 2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>
8623
8624         * Makefile.in (clean): Updated.
8625         (i386-avx.o): New.
8626         (i386-avx.c): Likewise.
8627         (i386-avx-linux.o): Likewise.
8628         (i386-avx-linux.c): Likewise.
8629         (amd64-avx.o): Likewise.
8630         (amd64-avx.c): Likewise.
8631         (amd64-avx-linux.o): Likewise.
8632         (amd64-avx-linux.c): Likewise.
8633
8634         * configure.srv (srv_i386_regobj): Add i386-avx.o.
8635         (srv_i386_linux_regobj): Add i386-avx-linux.o.
8636         (srv_amd64_regobj): Add amd64-avx.o.
8637         (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8638         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8639         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8640         (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8641         (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8642         (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8643         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8644
8645         * i387-fp.c: Include "i386-xstate.h".
8646         (i387_xsave): New.
8647         (i387_cache_to_xsave): Likewise.
8648         (i387_xsave_to_cache): Likewise.
8649         (x86_xcr0): Likewise.
8650
8651         * i387-fp.h (i387_cache_to_xsave): Likewise.
8652         (i387_xsave_to_cache): Likewise.
8653         (x86_xcr0): Likewise.
8654
8655         * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8656         * linux-crisv32-low.c (target_regsets): Likewise.
8657         * linux-m68k-low.c (target_regsets): Likewise.
8658         * linux-mips-low.c (target_regsets): Likewise.
8659         * linux-ppc-low.c (target_regsets): Likewise.
8660         * linux-s390-low.c (target_regsets): Likewise.
8661         * linux-sh-low.c (target_regsets): Likewise.
8662         * linux-sparc-low.c (target_regsets): Likewise.
8663         * linux-xtensa-low.c (target_regsets): Likewise.
8664
8665         * linux-low.c: Include <sys/uio.h>.
8666         (regsets_fetch_inferior_registers): Support nt_type.
8667         (regsets_store_inferior_registers): Likewise.
8668         (linux_process_qsupported): New.
8669         (linux_target_ops): Add linux_process_qsupported.
8670
8671         * linux-low.h (regset_info): Add nt_type.
8672         (linux_target_ops): Add process_qsupported.
8673
8674         * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8675         and <sys/uio.h>.
8676         (init_registers_i386_avx_linux): New.
8677         (init_registers_amd64_avx_linux): Likewise.
8678         (xmltarget_i386_linux_no_xml): Likewise.
8679         (xmltarget_amd64_linux_no_xml): Likewise.
8680         (PTRACE_GETREGSET): Likewise.
8681         (PTRACE_SETREGSET): Likewise.
8682         (x86_fill_xstateregset): Likewise.
8683         (x86_store_xstateregset): Likewise.
8684         (use_xml): Likewise.
8685         (x86_linux_update_xmltarget): Likewise.
8686         (x86_linux_process_qsupported): Likewise.
8687         (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8688         (x86_arch_setup): Don't call init_registers_amd64_linux nor
8689         init_registers_i386_linux here.  Call
8690         x86_linux_update_xmltarget.
8691         (the_low_target): Add x86_linux_process_qsupported.
8692
8693         * server.c (handle_query): Call target_process_qsupported.
8694
8695         * target.h (target_ops): Add process_qsupported.
8696         (target_process_qsupported): New.
8697
8698 2010-04-03  Pedro Alves  <pedro@codesourcery.com>
8699
8700         * inferiors.c (add_thread): Set last_status kind to
8701         TARGET_WAITKIND_IGNORE.
8702         * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8703         fetch.  Use ptid_of.  Avoid unnecessary get_lwp_thread calls.
8704         (linux_wait_1): Move `thread' local definition to block that uses
8705         it.  Don't NULL initialize `event_child'.
8706         (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8707         Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8708         * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8709
8710 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
8711
8712         * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8713         an extended waitstatus, or by a watchpoint.
8714         (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8715         thread was stepping or has been stopped by a watchpoint.
8716
8717 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
8718
8719         * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8720         (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8721         of another, then delete the previous, and validate all
8722         breakpoints.
8723         (validate_inserted_breakpoint): New.
8724         (delete_disabled_breakpoints): New.
8725         (validate_breakpoints): New.
8726         (check_mem_read): Validate breakpoints before trusting their
8727         shadow.  Delete disabled breakpoints.
8728         (check_mem_write): Validate breakpoints before trusting they
8729         should be inserted.  Delete disabled breakpoints.
8730         * mem-break.h (validate_breakpoints):
8731         * server.c (handle_query): Validate breakpoints when we see a
8732         qSymbol query.
8733
8734 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
8735
8736         * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8737         there's a GDB breakpoint at stop_pc.  Always report a trap to GDB
8738         if we could tell there's a GDB breakpoint at stop_pc.
8739         (need_step_over_p): Don't do a step over if we find a GDB
8740         breakpoint at the resume PC.
8741
8742         * mem-break.c (struct raw_breakpoint): New.
8743         (enum bkpt_type): New type `gdb_breakpoint'.
8744         (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8745         fields.  New field `raw'.
8746         (find_raw_breakpoint_at): New.
8747         (set_raw_breakpoint_at): Handle refcounting.  Create a raw
8748         breakpoint instead.
8749         (set_breakpoint_at): Adjust.
8750         (delete_raw_breakpoint): New.
8751         (release_breakpoint): New.
8752         (delete_breakpoint): Rename to...
8753         (delete_breakpoint_1): ... this.  Add proc parameter.  Use
8754         release_breakpoint.  Return ENOENT.
8755         (delete_breakpoint): Reimplement.
8756         (find_breakpoint_at): Delete.
8757         (find_gdb_breakpoint_at): New.
8758         (delete_breakpoint_at): Delete.
8759         (set_gdb_breakpoint_at): New.
8760         (delete_gdb_breakpoint_at): New.
8761         (gdb_breakpoint_here): New.
8762         (set_reinsert_breakpoint): Use release_breakpoint.
8763         (uninsert_breakpoint): Rename to ...
8764         (uninsert_raw_breakpoint): ... this.
8765         (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8766         (reinsert_raw_breakpoint): Change parameter type to
8767         raw_breakpoint.
8768         (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8769         instead.
8770         (check_breakpoints): Adjust.  Use release_breakpoint.
8771         (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8772         (breakpoint_inserted_here): Ditto.
8773         (check_mem_read): Adjust to iterate over raw breakpoints instead.
8774         Don't trust the breakpoint's shadow if it is not inserted.
8775         (check_mem_write): Adjust to iterate over raw breakpoints instead.
8776         (delete_all_breakpoints): Adjust.
8777         (free_all_breakpoints): Mark all breakpoints as uninserted, and
8778         use delete_breakpoint_1.
8779
8780         * mem-break.h (breakpoints_supported): Delete declaration.
8781         (set_gdb_breakpoint_at): Declare.
8782         (gdb_breakpoint_here): Declare.
8783         (delete_breakpoint_at): Delete.
8784         (delete_gdb_breakpoint_at): Declare.
8785
8786         * server.h (struct raw_breakpoint): Forward declare.
8787         (struct process_info): New field `raw_breakpoints'.
8788
8789         * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8790         breakpoints.
8791
8792 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
8793
8794         * linux-low.c (status_pending_p_callback): Fix comment.
8795         (linux_wait_for_event_1): Move most of the internal breakpoint
8796         handling from here...
8797         (linux_wait_1): ... to here.
8798         (count_events_callback): New.
8799         (select_singlestep_lwp_callback): New.
8800         (select_event_lwp_callback): New.
8801         (cancel_breakpoints_callback): New.
8802         (select_event_lwp): New.
8803         (linux_wait_1): Simplify internal breakpoint handling.  Give equal
8804         priority to all LWPs that have had events that should be reported
8805         to the client.  Cancel breakpoints when about to reporting the
8806         event to the client, not while stopping lwps.  No longer cancel
8807         finished single-steps here.
8808         (cancel_finished_single_step): Delete.
8809         (cancel_finished_single_steps): Delete.
8810
8811 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
8812
8813         * mem-break.c (enum bkpt_type): New.
8814         (struct breakpoint): New field `type'.
8815         (set_breakpoint_at): Change return type to struct breakpoint
8816         pointer.  Set type to `other_breakpoint' by default.
8817         (delete_breakpoint): Rewrite, supporting more than one breakpoint
8818         in the breakpoint list.
8819         (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8820         (reinsert_breakpoint): Rename to ...
8821         (reinsert_raw_breakpoint): ... this.
8822         (reinsert_breakpoints_at): Adjust.
8823         * mem-break.h (struct breakpoint): Declare.
8824         (set_breakpoint_at): Change return type to struct breakpoint
8825         pointer.
8826
8827 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
8828
8829         * server.c (handle_query): Assign, not compare.
8830
8831 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
8832
8833         Teach linux gdbserver to step-over-breakpoints.
8834
8835         * linux-low.c (can_hardware_single_step): New.
8836         (supports_breakpoints): New.
8837         (handle_extended_wait): If stopping threads, read the stop pc of
8838         the new cloned LWP.
8839         (get_pc): New.
8840         (get_stop_pc): Add `lwp' parameter.  Handle it.  Bail out if the
8841         low target doesn't support retrieving the PC.
8842         (add_lwp): Set last_resume_kind to resume_continue.
8843         (linux_attach_lwp_1): Adjust comments.  Always set stop_expected.
8844         (linux_attach): Don't clear stop_expected.  Set the lwp's
8845         last_resume_kind to resume_stop.
8846         (linux_detach_one_lwp): Don't check for removed breakpoints.
8847         (check_removed_breakpoint): Delete.
8848         (status_pending_p): Rename to ...
8849         (status_pending_p_callback): ... this.  Don't check for removed
8850         breakpoints.  Don't consider threads that are stopped from GDB's
8851         perspective.
8852         (linux_wait_for_lwp): Always read the stop_pc here.
8853         (cancel_breakpoint): New.
8854         (step_over_bkpt): New global.
8855         (linux_wait_for_event_1): Implement stepping over breakpoints.
8856         (gdb_wants_lwp_stopped): New.
8857         (gdb_wants_all_stopped): New.
8858         (linux_wait_1): Tag threads as gdb-wants-stopped.  Cancel finished
8859         single-step traps here.  Store the thread's last reported target
8860         wait status.
8861         (send_sigstop): Don't clear stop_expected.  Always set it,
8862         instead.
8863         (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8864         (cancel_finished_single_step): New.
8865         (cancel_finished_single_steps): New.
8866         (wait_for_sigstop): Don't cancel finished single-step traps here.
8867         (linux_resume_one_lwp): Don't check for removed breakpoints.
8868         Don't set `step' on non-hardware step archs.
8869         (linux_set_resume_request): Ignore resume_stop requests if already
8870         stopping or stopped.  Set the lwp's last_resume_kind.
8871         (resume_status_pending_p): Don't check for removed breakpoints.
8872         (need_step_over_p): New.
8873         (start_step_over): New.
8874         (finish_step_over): New.
8875         (linux_resume_one_thread): Always queue a sigstop for resume_stop
8876         requests.  Clear the thread's last reported target waitstatus.
8877         Don't use the `suspended' flag.  Don't consider pending breakpoints.
8878         (linux_resume): Start a step-over if necessary.
8879         (proceed_one_lwp): New.
8880         (proceed_all_lwps): New.
8881         (unstop_all_lwps): New.
8882         * linux-low.h (struct lwp_info): Rewrite comment for the
8883         `suspended' flag.  Add the `stop_pc' field.  Delete the
8884         `pending_stop_pc' field.  Tweak the `stepping' flag's comment.
8885         Add `'last_resume_kind' and `need_step_over' fields.
8886         * inferiors.c (struct thread_info): Delete, moved elsewhere.
8887         * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8888         Delete `breakpoint_to_reinsert' field.  New flag `inserted'.
8889         (set_raw_breakpoint_at): New.
8890         (set_breakpoint_at): Rewrite to use it.
8891         (reinsert_breakpoint_handler): Delete.
8892         (set_reinsert_breakpoint): New.
8893         (reinsert_breakpoint_by_bp): Delete.
8894         (delete_reinsert_breakpoints): New.
8895         (uninsert_breakpoint): Rewrite.
8896         (uninsert_breakpoints_at): New.
8897         (reinsert_breakpoint): Rewrite.
8898         (reinsert_breakpoints_at): New.
8899         (check_breakpoints): Rewrite.
8900         (breakpoint_here): New.
8901         (breakpoint_inserted_here): New.
8902         (check_mem_read): Adjust.
8903         * mem-break.h (breakpoints_supported, breakpoint_here)
8904         (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8905         (reinsert_breakpoint_by_bp): Delete declaration.
8906         (delete_reinsert_breakpoints): Declare.
8907         (reinsert_breakpoint): Delete declaration.
8908         (reinsert_breakpoints_at): Declare.
8909         (uninsert_breakpoint): Delete declaration.
8910         (uninsert_breakpoints_at): Declare.
8911         (check_breakpoints): Adjust prototype.
8912         * server.h: Adjust include order.
8913         (struct thread_info): Declare here.  Add a `last_status' field.
8914
8915 2010-03-23  Michael Snyder  <msnyder@vmware.com>
8916
8917         * server.c (crc32): New function.
8918         (handle_query): Add handling for 'qCRC:' request.
8919
8920 2010-03-23  Pedro Alves  <pedro@codesourcery.com>
8921
8922         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8923         lwp had been stopped by a watchpoint.
8924
8925 2010-03-16  Pedro Alves  <pedro@codesourcery.com>
8926
8927         * server.h (internal_error): Declare.
8928         (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8929         * utils.c (internal_error): New function.
8930
8931 2010-03-15  Andreas Schwab  <schwab@redhat.com>
8932
8933         * configure.srv: Fix typo setting srv_regobj.
8934
8935 2010-03-15  Pedro Alves  <pedro@codesourcery.com>
8936
8937         * linux-low.c (fetch_register): Avoid passing a non string literal
8938         format to `error'.
8939         (usr_store_inferior_registers): Ditto.
8940
8941 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
8942
8943         * linux-low.c (linux_write_memory): Bail out early if peeking
8944         memory failed.
8945
8946 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
8947
8948         * linux-low.h (struct lwp_info): New fields
8949         `stopped_by_watchpoint' and `stopped_data_address'.
8950         * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8951         here, and cache them in the lwp object.
8952         (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8953         directly.
8954         (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8955         field.
8956         (linux_stopped_by_watchpoint): Rewrite.
8957         (linux_stopped_data_address): Rewrite.
8958
8959 2010-03-06  Simo Melenius  <simo.melenius@iki.fi>
8960
8961         * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8962         switching the current inferior, not before.
8963
8964 2010-03-01  H.J. Lu  <hongjiu.lu@intel.com>
8965
8966         * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8967         reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8968         i386-linux.c and amd64-linux.c.
8969         (reg-i386.o): Removed.
8970         (reg-i386.c): Likewise.
8971         (reg-i386-linux.o): Likewise.
8972         (reg-i386-linux.c): Likewise.
8973         (reg-x86-64.o): Likewise.
8974         (reg-x86-64.c): Likewise.
8975         (reg-x86-64-linux.o): Likewise.
8976         (reg-x86-64-linux.c): Likewise.
8977         (i386.o): New.
8978         (i386.c): Likewise.
8979         (i386-linux.o): Likewise.
8980         (i386-linux.c): Likewise.
8981         (amd64.o): Likewise.
8982         (amd64.c): Likewise.
8983         (amd64-linux.o): Likewise.
8984         (amd64-linux.c): Likewise.
8985
8986         * configure.srv (srv_i386_regobj): New.
8987         (srv_i386_linux_regobj): Likewise.
8988         (srv_amd64_regobj): Likewise.
8989         (srv_amd64_linux_regobj): Likewise.
8990         (srv_i386_32bit_xmlfiles): Likewise.
8991         (srv_i386_64bit_xmlfiles): Likewise.
8992         (srv_i386_xmlfiles): Likewise.
8993         (srv_amd64_xmlfiles): Likewise.
8994         (srv_i386_linux_xmlfiles): Likewise.
8995         (srv_amd64_linux_xmlfiles): Likewise.
8996         (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj.  Set
8997         srv_xmlfiles to $srv_i386_xmlfiles.
8998         (i[34567]86-*-mingw32ce*): Likewise.
8999         (i[34567]86-*-mingw*): Likewise.
9000         (i[34567]86-*-nto*): Likewise.
9001         (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
9002         and $srv_amd64_linux_regobj.  Set srv_xmlfiles to
9003         $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
9004         (x86_64-*-linux*): Likewise.
9005
9006         * linux-x86-low.c (init_registers_x86_64_linux): Removed.
9007         (init_registers_amd64_linux): New.
9008         (x86_arch_setup): Replace init_registers_x86_64_linux with
9009         init_registers_amd64_linux.
9010
9011 2010-02-23  Maxim Kuvyrkov  <maxim@codesourcery.com>
9012
9013         * configure.ac: Check for libdl.  If it is not available link against
9014         static libthread_db.
9015         * configure: Regenerate.
9016
9017 2010-02-22  Pedro Alves  <pedro@codesourcery.com>
9018
9019         PR9605
9020
9021         * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
9022         handing a read watchpoint.
9023         (i386_low_insert_watchpoint): Read watchpoints aren't supported.
9024
9025 2010-02-12  Doug Evans  <dje@google.com>
9026
9027         * linux-low.c (linux_supports_tracefork_flag): Document.
9028         (linux_look_up_symbols): Add comment.
9029
9030 2010-02-03  H.J. Lu  <hongjiu.lu@intel.com>
9031
9032         * regcache.c (supply_register): Clear regcache if buf is NULL.
9033
9034 2010-02-02  Nicolas Roche  <roche@sourceware.org>
9035             Joel Brobecker  <brobecker@adacore.com>
9036
9037         * inferiors.c (find_inferior): Add function documentation.
9038         (unloaded_dll): Handle the case where the unloaded dll has not
9039         been previously registered in the dll list.
9040
9041 2010-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
9042
9043         * linux-arm-low.c (thumb_breakpoint_len): Delete.
9044         (thumb2_breakpoint): New.
9045         (arm_breakpoint_at): Check for Thumb-2 breakpoints.
9046
9047 2010-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
9048
9049         * linux-low.c (get_stop_pc): Check for SIGTRAP.
9050         (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
9051         breakpoints.
9052
9053 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
9054
9055         * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
9056
9057 2010-01-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
9058
9059         * linux-s390-low.c (s390_collect_ptrace_register)
9060         (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
9061
9062 2010-01-21  Doug Evans  <dje@google.com>
9063
9064         * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
9065         (PTRACE_ARG4_TYPE): New macro.
9066         (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
9067         (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
9068         (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
9069         (usr_store_inferior_registers): Ditto.
9070         (linux_read_memory, linux_write_memory): Ditto.
9071         (linux_test_for_tracefork): Ditto.
9072
9073         * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
9074         Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
9075
9076 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
9077
9078         * proc-service.c (ps_lgetregs): Don't refetch registers from the
9079         target.
9080
9081 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
9082
9083         * spu-low.c (spu_fetch_registers, spu_store_registers): Change
9084         prototype to take a regcache.  Adjust.
9085
9086 2010-01-20  Pedro Alves  <pedro@codesourcery.com>
9087
9088         * regcache.h (struct thread_info): Forward declare.
9089         (struct regcache): New.
9090         (new_register_cache): Adjust prototype.
9091         (get_thread_regcache): Declare.
9092         (free_register_cache): Adjust prototype.
9093         (registers_to_string, registers_from_string): Ditto.
9094         (supply_register, supply_register_by_name, collect_register)
9095         (collect_register_as_string, collect_register_by_name): Ditto.
9096         * regcache.c (struct inferior_regcache_data): Delete.
9097         (get_regcache): Rename to ...
9098         (get_thread_regcache): ... this.  Adjust.  Switch inferior before
9099         fetching registers.
9100         (regcache_invalidate_one): Adjust.
9101         (regcache_invalidate): Fix prototype.
9102         (new_register_cache): Return the new register cache.
9103         (free_register_cache): Change prototype.
9104         (realloc_register_cache): Adjust.
9105         (registers_to_string): Change prototype to take a regcache.  Adjust.
9106         (registers_from_string): Ditto.
9107         (register_data): Ditto.
9108         (supply_register): Ditto.
9109         (supply_register_by_name): Ditto.
9110         (collect_register): Ditto.
9111         (collect_register_as_string): Ditto.
9112         (collect_register_by_name): Ditto.
9113         * server.c (process_serial_event): Adjust.
9114         * linux-low.h (regset_fill_func, regset_store_func): Change
9115         prototype.
9116         (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
9117         Change prototype.
9118         * linux-low.c (get_stop_pc): Adjust.
9119         (check_removed_breakpoint): Adjust.
9120         (linux_wait_for_event): Adjust.
9121         (linux_resume_one_lwp): Adjust.
9122         (fetch_register): Add regcache parameter.  Adjust.
9123         (usr_store_inferior_registers): Ditto.
9124         (regsets_fetch_inferior_registers): Ditto.
9125         (regsets_store_inferior_registers): Ditto.
9126         (linux_fetch_registers, linux_store_registers): Ditto.
9127         * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9128         regcache.  Adjust.
9129         (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9130         Ditto.
9131         * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9132         prototype to take a regcache.
9133         (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9134         * remote-utils.c (convert_ascii_to_int, outreg)
9135         (prepare_resume_reply): Change prototype to take a regcache.
9136         Adjust.
9137         * target.h (struct target_ops) <fetch_registers, store_registers>:
9138         Change prototype to take a regcache.
9139         (fetch_inferior_registers, store_inferior_registers): Change
9140         prototype to take a regcache.  Adjust.
9141         * proc-service.c (ps_lgetregs): Adjust.
9142         * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9143         (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9144         (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9145         take a regcache.  Adjust.
9146         * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9147         (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9148         (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9149         (arm_breakpoint_at): Change prototype to take a regcache.  Adjust.
9150         * linux-cris-low.c (cris_get_pc, cris_set_pc)
9151         (cris_cannot_fetch_register):
9152         (cris_breakpoint_at): Change prototype to take a regcache.
9153         Adjust.
9154         * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9155         cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9156         to take a regcache.  Adjust.
9157         (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9158         Adjust.
9159         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9160         take a regcache.  Adjust.
9161         * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9162         (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9163         (m68k_set_pc): Change prototype to take a regcache.  Adjust.
9164         * linux-mips-low.c (mips_get_pc):
9165         (mips_set_pc): Change prototype to take a regcache.  Adjust.
9166         (mips_reinsert_addr): Adjust.
9167         (mips_collect_register): Change prototype to take a regcache.
9168         Adjust.
9169         (mips_supply_register):
9170         (mips_collect_register_32bit, mips_supply_register_32bit)
9171         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9172         (mips_store_fpregset): Ditto.
9173         * linux-ppc-low.c (ppc_supply_ptrace_register)
9174         (ppc_supply_ptrace_register): Ditto.
9175         (parse_spufs_run): Adjust.
9176         (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9177         (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9178         (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9179         take a regcache.  Adjust.
9180         * linux-s390-low.c (s390_collect_ptrace_register)
9181         (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9182         (s390_set_pc): Change prototype to take a regcache.  Adjust.
9183         (s390_arch_setup): Adjust.
9184         * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9185         (sh_fill_gregset): Change prototype to take a regcache.  Adjust.
9186         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9187         (sparc_fill_gregset, sparc_store_gregset_from_stack)
9188         (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9189         regcache.  Adjust.
9190         (sparc_breakpoint_at): Adjust.
9191         * linux-xtensa-low.c (xtensa_fill_gregset):
9192         (xtensa_store_gregset):
9193         (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9194         (xtensa_set_pc): Change prototype to take a regcache.  Adjust.
9195         * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9196         prototype to take a regcache.  Adjust.
9197         * win32-arm-low.c (arm_fetch_inferior_register)
9198         (arm_store_inferior_register): Change prototype to take a
9199         regcache.  Adjust.
9200         * win32-i386-low.c (i386_fetch_inferior_register)
9201         (i386_store_inferior_register): Change prototype to take a
9202         regcache.  Adjust.
9203         * win32-low.c (child_fetch_inferior_registers)
9204         (child_store_inferior_registers): Change prototype to take a
9205         regcache.  Adjust.
9206         (win32_wait): Adjust.
9207         (win32_fetch_inferior_registers): Change prototype to take a
9208         regcache.  Adjust.
9209         (win32_store_inferior_registers): Adjust.
9210         * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9211         store_inferior_register>: Change prototype to take a regcache.
9212
9213 2010-01-20  Doug Evans  <dje@google.com>
9214
9215         * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9216         #ifdef.
9217         (linux_wait_for_event1, linux_init_signals): Ditto.
9218         (W_STOPCODE): Provide definition if missing.
9219
9220 2010-01-13  Vladimir Prus  <vladimir@codesourcery.com>
9221
9222         * linux-low.c (linux_core_of_thread): New.
9223         (compare_ints, show_process, list_threads): New.
9224         (linux_qxfer_osdata): Report threads and cores.
9225         (linux_target_op): Register linux_core_of_thread.
9226         * remote-utils.c (prepare_resume_reply): Report the core.
9227         (buffer_xml_printf): Support %d specifier.
9228         * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9229         New.
9230         (handle_query): Handle qXfer:threads.  Announce availability
9231         thereof.
9232         * target.h (struct target_ops): New field core_of_thread.
9233
9234 2010-01-04  Ulrich Weigand  <uweigand@de.ibm.com>
9235
9236         * Makefile.in (clean): Remove new generated files.
9237         (reg-s390.o, reg-s390.c): Remove rules.
9238         (reg-s390x.o, reg-s390x.c): Likewise.
9239         (s390-linux32.o, s390-linux32.c): Add rules.
9240         (s390-linux64.o, s390-linux64.c): Likewise.
9241         (s390x-linux64.o, s390x-linux64.c): Likewise.
9242         * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9243         * linux-s390-low.c: Include <elf.h>.
9244         (HWCAP_S390_HIGH_GPRS): Define if undefined.
9245         (init_registers_s390): Remove prototype.
9246         (init_registers_s390x): Likewise.
9247         (init_registers_s390_linux32): Add prototype.
9248         (init_registers_s390_linux64): Likewise.
9249         (init_registers_s390x_linux64): Likewise.
9250         (s390_num_regs_3264): New define.
9251         (s390_regmap_3264): New global variable.
9252         (s390_cannot_fetch_register): Remove obsolete check.
9253         (s390_cannot_store_register): Likewise.
9254         (s390_collect_ptrace_register): Handle upper/lower register halves.
9255         (s390_supply_ptrace_register): Likewise.
9256         (s390_fill_gregset): Update to register number changes.
9257         (s390_get_hwcap): New routine.
9258         (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9259         Install appropriate regmap and register set.
9260
9261 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
9262
9263         * server.c (gdbserver_version): Update copyright year to 2010.
9264         * gdbreplay.c (gdbreplay_version): Likewise.
9265
9266 2009-12-28  Doug Evans  <dje@google.com>
9267
9268         * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9269         elf/external.h.  Include <elf.h> instead but only if necessary.
9270
9271 2009-12-28  Pedro Alves  <pedro@codesourcery.com>
9272
9273         * linux-low.c (linux_remove_process): Remove `detaching'
9274         parameter.  Don't release/detach from thread_db here.
9275         (linux_kill): Release/detach from thread_db here, ...
9276         (linux_detach): ... and here, before actually detaching.
9277         (linux_wait_1): ... and here, when a process exits.
9278         * thread-db.c (any_thread_of): New.
9279         (thread_db_free): Switch the current inferior to a thread of the
9280         passed in process.
9281
9282 2009-12-21  Doug Evans  <dje@google.com>
9283
9284         * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9285
9286         * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9287         Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9288         warning ifndef __NR_tkill.  Move setting of errno there too.
9289         Delete unnecessary resetting of errno after syscall.
9290         Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9291
9292         * configure.ac: Check for dladdr.
9293         * config.in: Regenerate.
9294         * configure: Regenerate.
9295         * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9296         (try_thread_db_load): Update.
9297
9298         * linux-low.c (my_waitpid): Delete unnecessary prototype.
9299
9300 2009-12-18  Doug Evans  <dje@google.com>
9301
9302         * event-loop.c: Include unistd.h if it exists.
9303
9304         * linux-low.c (my_waitpid): Move definition away from being in
9305         between linux_tracefork_child/linux_test_for_tracefork.
9306
9307         * gdb_proc_service.h (psaddr_t): Fix type.
9308         * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9309         signature to match glibc.
9310
9311 2009-12-16  Doug Evans  <dje@google.com>
9312
9313         * linux-low.c (linux_read_memory): Fix argument to read.
9314
9315 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
9316
9317         * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9318         events, don't leave current_inferior pointing at null.
9319
9320 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
9321
9322         * win32-low.c (LOG): Delete.
9323         (OUTMSG): Output to stderr.
9324         (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9325         on compile time LOG macro.
9326         (win32_wait): Fix debug output.
9327
9328 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
9329
9330         * win32-low.c (win32_add_one_solib): If the dll name is
9331         "ntdll.dll", prepend the system directory to the dll path.
9332
9333 2009-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
9334
9335         * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9336
9337 2009-11-17  Nathan Sidwell  <nathan@codesourcery.com>
9338             Vladimir Prus  <vladimir@codesourcery.com>
9339
9340         * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9341         * configure.ac: Check for __mcoldfire__ and set
9342         gdb_cv_m68k_is_coldfire.
9343         * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9344         reg-cf.o and reg-m68k.o.
9345         * configure: Regenerated.
9346
9347 2009-11-16  Pedro Alves  <pedro@codesourcery.com>
9348
9349         * linux-low.c (linux_remove_process): Add `detaching' parameter.
9350         Pass it to thread_db_free.
9351         (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9352         proper `detaching' argument to linux_remove_process.
9353         * linux-low.h (thread_db_free): Add `detaching' parameter.
9354         * thread-db.c (thread_db_init): Pass false as `detaching' argument
9355         to thread_db_free.
9356         (thread_db_free): Add `detaching' parameter.  Only
9357         call td_ta_clear_event if detaching from process.
9358
9359 2009-11-12  Maxim Kuvyrkov  <maxim@codesourcery.com>
9360
9361         * thread-db.c (thread_db_free): Fix typo.
9362
9363 2009-11-11  Paul Pluzhnikov  <ppluzhnikov@google.com>
9364
9365         PR gdb/10838
9366         * thread-db.c (thread_db_free): Call td_ta_clear_event.
9367
9368 2009-11-03  Nathan Sidwell  <nathan@codesourcery.com>
9369
9370         * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9371         with an i686 compiler.
9372         * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9373         needed.
9374         * configure: Rebuilt.
9375
9376 2009-10-29  Sandra Loosemore  <sandra@codesourcery.com>
9377
9378         PR gdb/10783
9379
9380         * server.c (handle_search_memory_1): Correct read_addr initialization
9381         in loop for searching subsequent chunks.
9382
9383 2009-10-29  Paul Pluzhnikov  <ppluzhnikov@google.com>
9384
9385         * configure.ac: New --with-libthread-db option.
9386         * thread-db.c: Allow direct dependence on libthread_db.
9387         (thread_db_free): Adjust.
9388         * config.in: Regenerate.
9389         * configure: Likewise.
9390
9391 2009-10-28  Paul Pluzhnikov  <ppluzhnikov@google.com>
9392
9393         PR gdb/10757
9394         * thread-db.c (attach_thread): New function.
9395         (maybe_attach_thread): Return success/failure.
9396         (find_new_threads_callback): Adjust.
9397         (thread_db_find_new_threads): Loop until no new threads.
9398
9399 2009-10-13  Pedro Alves  <pedro@codesourcery.com>
9400
9401         * proc-service.c (ps_lgetregs): Formatting.
9402
9403 2009-10-08  Paul Pluzhnikov  <ppluzhnikov@google.com>
9404
9405         * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9406         * configure.ac: Adjust.
9407         * linux-low.h (struct process_info_private): Move members to struct
9408         thread_db.
9409         (thread_db_free, thread_db_handle_monitor_command): New prototype.
9410         * linux-low.c (linux_remove_process): Adjust.
9411         (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9412         * server.c (handle_query): Move code ...
9413         (handle_monitor_command): ... here. New function.
9414         * target.h (struct target_ops): New member.
9415         * thread-db.c (struct thread_db): New.
9416         (libthread_db_search_path): New variable.
9417         (thread_db_create_event, thread_db_enable_reporting)
9418         (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9419         (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9420         (try_thread_db_load_1, dladdr_to_soname): New functions.
9421         (try_thread_db_load, thread_db_load_search): New functions.
9422         (thread_db_init): Search for libthread_db.
9423         (thread_db_free): New function.
9424         (thread_db_handle_monitor_command): Likewise.
9425         * config.in: Regenerate.
9426         * configure: Regenerate.
9427
9428 2009-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
9429
9430         * spu-low.c (spu_kill): Wait for inferior to terminate.
9431         Call clear_inferiors.
9432         (spu_detach): Call clear_inferiors.
9433
9434 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9435
9436         * aclocal.m4: Regenerate.
9437         * config.in: Likewise.
9438         * configure: Likewise.
9439
9440 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
9441
9442         * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9443         (parse_spufs_run): New function.
9444         (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9445         (ppc_breakpoint_at): Handle SPU breakpoints.
9446
9447 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
9448
9449         * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9450         (SPUFS_MAGIC): Define.
9451         (spu_enumerate_spu_ids): New function.
9452         (linux_qxfer_spu): New function.
9453         (linux_target_ops): Install linux_qxfer_spu.
9454
9455 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
9456
9457         * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9458         and powerpc-cell64l.o to srv_regobj.  Add rs6000/powerpc-cell32l.xml
9459         and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9460         * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9461         (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9462         (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9463         * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9464         (init_registers_powerpc_cell32l): Add prototype.
9465         (init_registers_powerpc_cell64l): Likewise.
9466         (ppc_arch_setup): Detect Cell/B.E. architecture.
9467
9468 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9469
9470         * Makefile.in (datarootdir): New variable.
9471
9472 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
9473
9474         * linux-low.c (linux_write_memory): Update debugging output.
9475         * Makefile.in (clean): Add new descriptions.
9476         (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9477         (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9478         * configure.srv: Add new files for arm*-*-linux*.
9479         * linux-arm-low.c: Add new declarations.
9480         (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9481         (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9482         (HWCAP_VFPv3D16): New.
9483         (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9484         instead of __IWMMXT__.
9485         (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9486         (arm_arch_setup): New.
9487         (target_regsets): Remove #ifdef.  Add VFP regset.
9488         (the_low_target): Use arm_arch_setup.
9489
9490 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
9491
9492         * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9493         the main thread again.
9494
9495 2009-07-06  Aleksandar Ristovski  <aristovski@qnx.com>
9496
9497         Adding Neutrino gdbserver.
9498         * configure: Regenerated.
9499         * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9500         * configure.srv (i[34567]86-*-nto*): New target.
9501         * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9502         * remote-utils.c [__QNX__]: Include sys/iomgr.h
9503         (nto_comctrl) [__QNX__]: New function.
9504         (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9505
9506 2009-07-05  Danny Backx  <dannybackx@users.sourceforge.net>
9507
9508         * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9509         srv_tgtobj.
9510
9511 2009-07-04  Danny Backx  <dannybackx@users.sourceforge.net>
9512             Pedro Alves  <pedro@codesourcery.com>
9513
9514         * win32-i386-low.c (i386_get_thread_context): Handle systems that
9515         don't support CONTEXT_EXTENDED_REGISTERS.
9516         (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9517         (the_low_target): Install them.
9518         * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9519         failing with ERROR_PIPE_NOT_CONNECTED.
9520
9521 2009-06-30  Doug Evans  <dje@google.com>
9522             Pierre Muller  <muller@ics.u-strasbg.fr>
9523
9524         Add h/w watchpoint support to x86-linux, win32-i386.
9525         * Makefile.in (SFILES): Add i386-low.c
9526         (i386_low_h): Define.
9527         (i386-low.o): Add dependencies.
9528         (linux-x86-low.o): Add i386-low.h dependency.
9529         (win32-i386-low.o): Ditto.
9530         * i386-low.c: New file.
9531         * i386-low.h: New file.
9532         * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9533         (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9534         * linux-low.c (linux_add_process): Initialize arch_private.
9535         (linux_remove_process): Free arch_private.
9536         (add_lwp): Initialize arch_private.
9537         (delete_lwp): Free arch_private.
9538         (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9539         provided.
9540         * linux-low.h (process_info_private): New member arch_private.
9541         (lwp_info): New member arch_private.
9542         (linux_target_ops): New members new_process, new_thread,
9543         prepare_to_resume.
9544         (ptid_of): New macro.
9545         * linux-x86-low.c: Include stddef.h, i386-low.h.
9546         (arch_process_info): New struct.
9547         (arch_lwp_info): New struct.
9548         (x86_linux_dr_get, x86_linux_dr_set): New functions.
9549         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9550         (i386_dr_low_get_status): New function.
9551         (x86_insert_point, x86_remove_point): New functions.
9552         (x86_stopped_by_watchpoint): New function.
9553         (x86_stopped_data_address): New function.
9554         (x86_linux_new_process, x86_linux_new_thread): New functions.
9555         (x86_linux_prepare_to_resume): New function.
9556         (the_low_target): Add entries for insert_point, remove_point,
9557         stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9558         prepare_to_resume.
9559         * server.c (debug_hw_points): New global.
9560         (monitor_show_help): Document set debug-hw-points.
9561         (handle_query): Process "set debug-hw-points".
9562         * server.h (debug_hw_points): Declare.
9563         (paddress): Declare.
9564         * utils.c (NUMCELLS, CELLSIZE): New macros.
9565         (get_sell, xsnprintf, paddress): New functions.
9566         * win32-arm-low.c (the_low_target): Add entries for insert_point,
9567         remove_point, stopped_by_watchpoint, stopped_data_address.
9568         * win32-i386-low.c: Include i386-low.h.
9569         (debug_reg_state): Replaces dr.
9570         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9571         (i386_dr_low_get_status): New function.
9572         (i386_insert_point, i386_remove_point): New functions.
9573         (i386_stopped_by_watchpoint): New function.
9574         (i386_stopped_data_address): New function.
9575         (i386_initial_stuff): Update.
9576         (get_thread_context,set_thread_context,i386_thread_added): Update.
9577         (the_low_target): Add entries for insert_point,
9578         remove_point, stopped_by_watchpoint, stopped_data_address.
9579         * win32-low.c (win32_insert_watchpoint): New function.
9580         (win32_remove_watchpoint): New function.
9581         (win32_stopped_by_watchpoint): New function.
9582         (win32_stopped_data_address): New function.
9583         (win32_target_ops): Add entries for insert_watchpoint,
9584         remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9585         * win32-low.h (win32_target_ops): New members insert_point,
9586         remove_point, stopped_by_watchpoint, stopped_data_address.
9587
9588 2009-06-25  Pedro Alves  <pedro@codesourcery.com>
9589
9590         * server.c (process_serial_event): Re-return unsupported, not
9591         error, if the type isn't recognized.  Re-allow supporting only
9592         insert or remove packets.  Also call require_running for
9593         breakpoints.  Add missing break statement to default case.  Tidy.
9594         * target.h (struct target_ops): Rename insert_watchpoint to
9595         insert_point, and remove_watchpoint to remove_point.
9596
9597         * linux-low.h (struct linux_target_ops): Likewise.
9598         * linux-low.c (linux_insert_watchpoint): Rename to ...
9599         (linux_insert_point): ... this.  Adjust.
9600         (linux_remove_watchpoint): Rename to ...
9601         (linux_remove_point): ... this.  Adjust.
9602         (linux_target_ops): Adjust.
9603         * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9604         (cris_insert_point): ... this.
9605         (cris_remove_watchpoint): Rename to ...
9606         (cris_remove_point): ... this.
9607         (the_low_target): Adjust.
9608
9609 2009-06-24  Pierre Muller  <muller@ics.u-strasbg.fr>
9610
9611         * server.c (handle_v_kill): Pass signal_pid to
9612         kill_inferior if multi_process is zero.
9613
9614 2009-06-23  Aleksandar Ristovski  <aristovski@qnx.com>
9615
9616         * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9617         * target.h (target_ops): Comment for *_watchpoint to make it clear
9618         the functions can get types '0' and '1'.
9619
9620 2009-06-22  Aleksandar Ristovski  <aristovski@qnx.com>
9621
9622         * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9623         * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9624         * regcache.c (get_regcache): Likewise.
9625         * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9626         * win32-low.c (child_fetch_inferior_registers): Remove check for
9627         regno 0.
9628
9629 2009-06-19  Aleksandar Ristovski  <aristovski@qnx.com>
9630             Pedro Alves <pedro@codesourcery.com>
9631
9632         * target.h (struct target_ops) <supports_multi_process>: New
9633         callback.
9634         (target_supports_multi_process): New.
9635         * server.c (handle_query): Even if GDB reports support, only
9636         enable multi-process if the target also supports it.  Report
9637         multi-process support only if the target backend supports it.
9638         * linux-low.c (linux_supports_multi_process): New function.
9639         (linux_target_ops): Install it as target_supports_multi_process
9640         callback.
9641
9642 2009-05-24  Doug Evans  <dje@google.com>
9643
9644         Global renaming of find_thread_pid to find_thread_ptid.
9645         * server.h (find_thread_ptid): Renamed from find_thread_pid.
9646         * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9647         All callers updated.
9648
9649         * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9650         to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9651         directly.
9652
9653         * linux-low.c (get_stop_pc): Print pc if debug_threads.
9654         (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9655         (linux_resume_one_lwp): Ditto.
9656
9657 2009-05-23  Doug Evans  <dje@google.com>
9658
9659         * linux-low.c (linux_resume_one_lwp): Change type of first arg
9660         from struct inferior_list_entry * to struct lwp_info *.
9661         All callers updated.
9662
9663 2009-05-13  Doug Evans  <dje@google.com>
9664
9665         * linux-x86-low.c: Don't include assert.h.
9666         (x86_siginfo_fixup): Use fatal, not assert.
9667         (x86_arch_setup): Fix comment.
9668
9669 2009-05-12  Doug Evans  <dje@google.com>
9670
9671         Biarch support for i386/amd64 gdbserver.
9672         * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9673         Add linux-x86-low.c.
9674         (linux-i386-low.o, linux-x86-64-low.o): Delete.
9675         (linux-x86-low.o): Add.
9676         * linux-x86-64-low.c: Delete.
9677         * linux-i386-low.c: Delete.
9678         * linux-x86-low.c: New file.
9679         * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9680         linux-x86-low.o.
9681         (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9682         linux-x86-low.o.
9683         (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9684         * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9685         (linux_child_pid_to_exec_file): New function.
9686         (elf_64_header_p, elf_64_file_p): New functions.
9687         (siginfo_fixup): New function.
9688         (linux_xfer_siginfo): New local inf_siginfo.  Call siginfo_fixup to
9689         give target a chance to convert layout.
9690         * linux-low.h (linux_target_ops): New member siginfo_fixup.
9691         (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9692
9693 2009-05-07  Doug Evans  <dje@google.com>
9694
9695         * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9696         (regsets_store_inferior_registers): Ditto.
9697
9698 2009-05-06  Pedro Alves  <pedro@codesourcery.com>
9699
9700         PR server/10048
9701
9702         * linux-low.c (must_set_ptrace_flags): Delete.
9703         (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9704         of the global.
9705         (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here.  Set
9706         `lwp->must_set_ptrace_flags' instead.
9707         (linux_wait_for_event_1): Set ptrace options here.
9708         (linux_wait_1): ... not here.
9709
9710 2009-04-30  Doug Evans  <dje@google.com>
9711
9712         * inferiors.c (started_inferior_callback): New function.
9713         (attached_inferior_callback): New function.
9714         (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9715         * server.c (print_started_pid, print_attached_pid): New functions.
9716         (detach_or_kill_for_exit): New function.
9717         (main): Call it instead of for_each_inferior (kill_inferior_callback).
9718         * server.h (have_started_inferiors_p): Declare.
9719         (have_attached_inferiors_p): Declare.
9720
9721         * inferiors.c (remove_process): Fix memory leak, free process.
9722         * linux-low.c (linux_remove_process): New function.
9723         (linux_kill): Call it instead of remove_process.
9724         (linux_detach, linux_wait_1): Ditto.
9725
9726 2009-04-19  Danny Backx  <dannybackx@users.sourceforge.net>
9727
9728         * configure.srv: Add x86 Windows CE target.
9729
9730 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
9731
9732         * inferiors.c (get_thread_process): Make global.
9733         * server.h (get_thread_process): Add prototype.
9734         * thread-db.c (find_one_thread): Use get_thread_process
9735         instead of current_process.
9736         (thread_db_get_tls_address): Do not crash if called when
9737         thread layer is not yet initialized.
9738
9739 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
9740
9741         * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9742         * spu-low.c (current_tid): Rename to ...
9743         (current_ptid): ... this.
9744         (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9745         spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9746         ptid_get_lwp (current_ptid) instead of current_tid.
9747         (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9748         instead of current_tid.  Use find_process_pid to verify pid
9749         argument is valid.  Pass proper argument to remove_process.
9750         (spu_thread_alive): Compare current_ptid instead of current_tid.
9751         (spu_resume): Likewise.
9752
9753 2009-04-02  Pedro Alves  <pedro@codesourcery.com>
9754
9755         * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9756         variable.
9757
9758 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
9759
9760         Implement the multiprocess extensions, and add linux multiprocess
9761         support.
9762
9763         * server.h (ULONGEST): Declare.
9764         (struct ptid, ptid_t): New.
9765         (minus_one_ptid, null_ptid): Declare.
9766         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9767         (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9768         (struct inferior_list_entry): Change `id' type from unsigned from
9769         to ptid_t.
9770         (struct sym_cache, struct breakpoint, struct
9771         process_info_private): Forward declare.
9772         (struct process_info): Declare.
9773         (current_process): Declare.
9774         (all_processes): Declare.
9775         (initialize_inferiors): Declare.
9776         (add_thread): Adjust to use ptid_t.
9777         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9778         (add_process, remove_process, find_thread_pid): Declare.
9779         (find_inferior_id): Adjust to use ptid_t.
9780         (cont_thread, general_thread, step_thread): Change type to ptid_t.
9781         (multi_process): Declare.
9782         (push_event): Adjust to use ptid_t.
9783         (read_ptid, write_ptid): Declare.
9784         (prepare_resume_reply): Adjust to use ptid_t.
9785         (clear_symbol_cache): Declare.
9786         * inferiors.c (all_processes): New.
9787         (null_ptid, minus_one_ptid): New.
9788         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9789         (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9790         (add_thread): Change unsigned long to ptid.  Remove gdb_id
9791         parameter.  Adjust.
9792         (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9793         (gdb_id_to_thread): Rename to ...
9794         (find_thread_pid): ... this.  Change unsigned long to ptid.
9795         (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9796         (loaded_dll, pull_pid_from_list): Adjust.
9797         (add_process, remove_process, find_process_pid)
9798         (get_thread_process, current_process, initialize_inferiors): New.
9799         * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9800         (struct target_waitstatus) <related_pid>: Ditto.
9801         (struct target_ops) <kill, detach>: Add `pid' argument.  Change
9802         return type to int.
9803         (struct target_ops) <join>: Add `pid' argument.
9804         (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9805         (struct target_ops) <wait>: Add `ptid' field.  Change return type
9806         to ptid.
9807         (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9808         (mywait): Add `ptid' argument.  Change return type to ptid_t.
9809         (target_pid_to_str): Declare.
9810         * target.c (set_desired_inferior): Adjust to use ptids.
9811         (mywait): Add new `ptid' argument.  Adjust.
9812         (target_pid_to_str): New.
9813         * mem-break.h (free_all_breakpoints): Declare.
9814         * mem-break.c (breakpoints): Delelete.
9815         (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9816         (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9817         to use per-process breakpoint list.
9818         (free_all_breakpoints): New.
9819         * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9820         (symbol_cache, all_symbols_looked_up): Delete.
9821         (hexchars): New.
9822         (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9823         read_ptid): New.
9824         (prepare_resume_reply): Change ptid argument's type from unsigned
9825         long to ptid_t.  Adjust.  Implement W;process and X;process.
9826         (free_sym_cache, clear_symbol_cache): New.
9827         (look_up_one_symbol): Adjust to per-process symbol cache.  *
9828         * server.c (cont_thread, general_thread, step_thread): Change type
9829         to ptid_t.
9830         (attached): Delete.
9831         (multi_process): New.
9832         (last_ptid): Change type to ptid_t.
9833         (struct vstop_notif) <ptid>: Change type to ptid_t.
9834         (queue_stop_reply, push_event): Change `ptid' argument's type to
9835         ptid_t.
9836         (discard_queued_stop_replies): Add `pid' argument.
9837         (start_inferior): Adjust to use ptids.  Adjust to mywait interface
9838         changes.  Don't reference the `attached' global.
9839         (attach_inferior): Adjust to mywait interface changes.
9840         (handle_query): Adjust to use ptids.  Parse GDB's qSupported
9841         features.  Handle and report "multiprocess+".  Handle
9842         "qAttached:PID".
9843         (handle_v_cont): Adjust to use ptids.  Adjust to mywait interface
9844         changes.
9845         (handle_v_kill): New.
9846         (handle_v_stopped): Adjust to use target_pid_to_str.
9847         (handle_v_requests): Allow multiple attaches and runs when
9848         multiprocess extensions are in effect.  Handle "vKill".
9849         (myresume): Adjust to use ptids.
9850         (queue_stop_reply_callback): Add `arg' parameter.  Handle it.
9851         (handle_status): Adjust to discard_queued_stop_replies interface
9852         change.
9853         (first_thread_of, kill_inferior_callback)
9854         (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9855         (main): Call initialize_inferiors.  Adjust to use ptids, killing
9856         and detaching from all inferiors.  Handle multiprocess packet
9857         variants.
9858         * linux-low.h: Include gdb_proc_service.h.
9859         (struct process_info_private): New.
9860         (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9861         <lwpid_of>: Use ptid_get_lwp.
9862         (get_lwp_thread): Adjust.
9863         (struct lwp_info): Add `dead' member.
9864         (find_lwp_pid): Declare.
9865         * linux-low.c (thread_db_active): Delete.
9866         (new_inferior): Adjust comment.
9867         (inferior_pid): Delete.
9868         (linux_add_process): New.
9869         (handle_extended_wait): Adjust.
9870         (add_lwp): Change unsigned long to ptid.
9871         (linux_create_inferior): Add process to processes table.  Adjust
9872         to use ptids.  Don't set new_inferior here.
9873         (linux_attach_lwp): Rename to ...
9874         (linux_attach_lwp_1): ... this.  Add `initial' argument.  Handle
9875         it.  Adjust to use ptids.
9876         (linux_attach_lwp): New.
9877         (linux_attach): Add process to processes table.  Don't set
9878         new_inferior here.
9879         (struct counter): New.
9880         (second_thread_of_pid_p, last_thread_of_process_p): New.
9881         (linux_kill_one_lwp): Add `args' parameter.  Handle it.  Adjust to
9882         multiple processes.
9883         (linux_kill): Add `pid' argument.  Handle it.  Adjust to multiple
9884         processes.  Remove process from process table.
9885         (linux_detach_one_lwp): Add `args' parameter.  Handle it.  Adjust
9886         to multiple processes.
9887         (any_thread_of): New.
9888         (linux_detach): Add `pid' argument, and handle it.  Remove process
9889         from processes table.
9890         (linux_join): Add `pid' argument.  Handle it.
9891         (linux_thread_alive): Change unsighed long argument to ptid_t.
9892         Consider dead lwps as not being alive.
9893         (status_pending_p): Rename `dummy' argument to `arg'.  Filter out
9894         threads we're not interested in.
9895         (same_lwp, find_lwp_pid): New.
9896         (linux_wait_for_lwp): Change `pid' argument's type from int to
9897         ptid_t.  Adjust.
9898         (linux_wait_for_event): Rename to ...
9899         (linux_wait_for_event_1): ... this.  Change `pid' argument's type
9900         from int to ptid_t.  Adjust.
9901         (linux_wait_for_event): New.
9902         (linux_wait_1): Add `ptid' argument.  Change return type to
9903         ptid_t.  Adjust.  Use last_thread_of_process_p.  Remove processes
9904         that exit from the process table.
9905         (linux_wait): Add `ptid' argument.  Change return type to ptid_t.
9906         Adjust.
9907         (mark_lwp_dead): New.
9908         (wait_for_sigstop): Adjust to use ptids.  If a process exits while
9909         stopping all threads, mark its main lwp as dead.
9910         (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9911         ptids.
9912         (fetch_register, usr_store_inferior_registers)
9913         (regsets_fetch_inferior_registers)
9914         (regsets_store_inferior_registers, linux_read_memory)
9915         (linux_write_memory): Inline `inferior_pid'.
9916         (linux_look_up_symbols): Adjust to use per-process
9917         `thread_db_active'.
9918         (linux_request_interrupt): Adjust to use ptids.
9919         (linux_read_auxv): Inline `inferior_pid'.
9920         (initialize_low): Don't reference thread_db_active.
9921         * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9922         * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9923         (ps_getpid): Return the pid of the current inferior.
9924         * thread-db.c (proc_handle, thread_agent): Delete.
9925         (thread_db_create_event, thread_db_enable_reporting): Adjust to
9926         per-process data.
9927         (find_one_thread): Change argument type to ptid_t.  Adjust to
9928         per-process data.
9929         (maybe_attach_thread): Adjust to per-process data and ptids.
9930         (thread_db_find_new_threads): Ditto.
9931         (thread_db_init): Ditto.
9932         * spu-low.c (spu_create_inferior, spu_attach): Add process to
9933         processes table.  Adjust to use ptids.
9934         (spu_kill, spu_detach): Adjust interface.  Remove process from
9935         processes table.
9936         (spu_join, spu_thread_alive): Adjust interface.
9937         (spu_wait): Adjust interface.  Remove process from processes
9938         table.  Adjust to use ptids.
9939         * win32-low.c (current_inferior_tid): Delete.
9940         (current_inferior_ptid): New.
9941         (debug_event_ptid): New.
9942         (thread_rec): Take a ptid.  Adjust.
9943         (child_add_thread): Add `pid' argument.  Adjust to use ptids.
9944         (child_delete_thread): Ditto.
9945         (do_initial_child_stuff): Add `attached' argument.  Add process to
9946         processes table.
9947         (child_fetch_inferior_registers, child_store_inferior_registers):
9948         Adjust.
9949         (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9950         (win32_attach): Pass 1 to do_initial_child_stuff.
9951         (win32_kill): Adjust interface.  Remove process from processes
9952         table.
9953         (win32_detach): Ditto.
9954         (win32_join): Adjust interface.
9955         (win32_thread_alive): Take a ptid.
9956         (win32_resume): Adjust to use ptids.
9957         (get_child_debug_event): Ditto.
9958         (win32_wait): Adjust interface.  Remove exiting process from
9959         processes table.
9960
9961 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
9962
9963         Non-stop mode support.
9964
9965         * server.h (non_stop): Declare.
9966         (gdb_client_data, handler_func): Declare.
9967         (delete_file_handler, add_file_handler, start_event_loop):
9968         Declare.
9969         (handle_serial_event, handle_target_event, push_event)
9970         (putpkt_notif): Declare.
9971         * target.h (enum resume_kind): New.
9972         (struct thread_resume): Replace `step' field by `kind' field.
9973         (TARGET_WNOHANG): Define.
9974         (struct target_ops) <wait>: Add `options' argument.
9975         <supports_non_stop, async, start_non_stop>: New fields.
9976         (target_supports_non_stop, target_async): New.
9977         (start_non_stop): Declare.
9978         (mywait): Add `options' argument.
9979         * target.c (mywait): Add `options' argument.  Print child exit
9980         notifications here.
9981         (start_non_stop): New.
9982         * server.c (non_stop, own_buf, mem_buf): New globals.
9983         (struct vstop_notif): New.
9984         (notif_queue): New global.
9985         (queue_stop_reply, push_event, discard_queued_stop_replies)
9986         (send_next_stop_reply): New.
9987         (start_inferior): Adjust to use resume_kind.  Adjust to mywait
9988         interface changes.
9989         (attach_inferior): In non-stop mode, don't wait for the target
9990         here.
9991         (handle_general_set): Handle QNonStop.
9992         (handle_query): When handling qC, return the current general
9993         thread, instead of the first thread of the list.
9994         (handle_query): If the backend supports non-stop mode, include
9995         QNonStop+ in the qSupported query response.
9996         (handle_v_cont): Adjust to use resume_kind.  Handle resume_stop
9997         and non-stop mode.
9998         (handle_v_attach, handle_v_run): Handle non-stop mode.
9999         (handle_v_stopped): New.
10000         (handle_v_requests): Report support for vCont;t.  Handle vStopped.
10001         (myresume): Adjust to use resume_kind.  Handle non-stop.
10002         (queue_stop_reply_callback): New.
10003         (handle_status): Handle non-stop mode.
10004         (main): Clear non_stop flag on reconnection.  Use the event-loop.
10005         Refactor serial protocol handling from here ...
10006         (process_serial_event): ... to this new function.  When GDB
10007         selects any thread, select one here.  In non-stop mode, wait until
10008         GDB acks all pending events before exiting.
10009         (handle_serial_event, handle_target_event): New.
10010         * remote-utils.c (remote_open): Install remote_desc in the event
10011         loop.
10012         (remote_close): Remove remote_desc from the event loop.
10013         (putpkt_binary): Rename to...
10014         (putpkt_binary_1): ... this.  Add `is_notic' argument.  Handle it.
10015         (putpkt_binary): New as wrapper around putpkt_binary_1.
10016         (putpkt_notif): New.
10017         (prepare_resume_reply): In non-stop mode, don't change the
10018         general_thread.
10019         * event-loop.c: New.
10020         * Makefile.in (OBJ): Add event-loop.o.
10021         (event-loop.o): New rule.
10022
10023         * linux-low.h (pid_of): Moved here.
10024         (lwpid_of): New.
10025         (get_lwp_thread): Use lwpid_of.
10026         (struct lwp_info): Delete `lwpid' field.  Add `suspended' field.
10027         * linux-low.c (pid_of): Delete.
10028         (inferior_pid): Use lwpid_of.
10029         (linux_event_pipe): New.
10030         (target_is_async_p): New.
10031         (delete_lwp): New.
10032         (handle_extended_wait): Use lwpid_of.
10033         (add_lwp): Don't set lwpid field.
10034         (linux_attach_lwp): Adjust debug output.  Use lwpid_of.
10035         (linux_kill_one_lwp): If killing a running lwp, stop it first.
10036         Use lwpid_of.  Adjust to linux_wait_for_event interface changes.
10037         (linux_detach_one_lwp): If detaching from a running lwp, stop it
10038         first.  Adjust to linux_wait_for_event interface changes.  Use
10039         lwpid_of.
10040         (linux_detach): Don't delete the main lwp here.
10041         (linux_join): Use my_waitpid.  Avoid signal_pid.  Use lwpid_of.
10042         (status_pending_p): Don't consider explicitly suspended lwps.
10043         (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
10044         pointer.  Add OPTIONS argument.  Change return type to int.  Use
10045         my_waitpid instead of sleeping.  Handle WNOHANG.  Use lwpid_of.
10046         (linux_wait_for_event): Take an integer pid instead of a lwp_info
10047         pointer.  Add status pointer argument.  Return a pid instead of a
10048         status.  Use lwpid_of.  Adjust to linux_wait_for_lwp interface
10049         changes.  In non-stop mode, don't switch to a random thread.
10050         (linux_wait): Rename to...
10051         (linux_wait_1): ... this.  Add target_options argument, and handle
10052         it.  Adjust to use resume_kind.  Use lwpid_of.  In non-stop mode,
10053         don't handle the continue thread.  Handle TARGET_WNOHANG.  Merge
10054         clean exit and signal exit code.  Don't stop all threads in
10055         non-stop mode.  In all-stop mode, only stop all threads when
10056         reporting a stop to GDB.  Handle explicit thread stop requests.
10057         (async_file_flush, async_file_mark): New.
10058         (linux_wait): New.
10059         (send_sigstop): Use lwpid_of.
10060         (wait_for_sigstop): Use lwpid_of.  Adjust to linux_wait_for_event
10061         interface changes.  In non-stop mode, don't switch to a random
10062         thread.
10063         (linux_resume_one_lwp): Use lwpid_of.
10064         (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
10065         (linux_resume_one_thread): ... this.  Handle resume_stop.  In
10066         non-stop mode, don't look for pending flag in all threads.
10067         (resume_status_pending_p): Don't consider explicitly suspended
10068         threads.
10069         (my_waitpid): Reimplement.  Emulate __WALL.
10070         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10071         Use lwpid_of.
10072         (sigchld_handler, linux_supports_non_stop, linux_async)
10073         (linux_start_non_stop): New.
10074         (linux_target_ops): Register linux_supports_non_stop, linux_async
10075         and linux_start_non_stop.
10076         (initialize_low): Install SIGCHLD handler.
10077         * thread-db.c (thread_db_create_event, find_one_thread)
10078         (thread_db_get_tls_address): Use lwpid_of.
10079         * win32-low.c (win32_detach): Adjust to use resume_kind.
10080         (win32_wait): Add `options' argument.
10081         * spu-low.c (spu_resume): Adjust to use resume_kind.
10082         (spu_wait): Add `options' argument.
10083
10084 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10085
10086         Decouple target code from remote protocol.
10087
10088         * target.h (enum target_waitkind): New.
10089         (struct target_waitstatus): New.
10090         (struct target_ops) <wait>: Return an unsigned long.  Take a
10091         target_waitstatus pointer instead of a char pointer.
10092         (mywait): Likewise.
10093         * target.c (mywait): Change prototype to return an unsigned long.
10094         Take a target_waitstatus pointer instead of a char pointer.  Adjust.
10095         * server.h (thread_from_wait, old_thread_from_wait): Delete
10096         declarations.
10097         (prepare_resume_reply): Change prototype to take a
10098         target_waitstatus.
10099         * server.c (thread_from_wait, old_thread_from_wait): Delete.
10100         (last_status, last_ptid): New.
10101         (start_inferior): Remove "statusptr" argument.  Adjust.  Return a
10102         pid instead of a signal.
10103         (attach_inferior): Remove "status" and "signal" parameters.
10104         Adjust.
10105         (handle_query): For qGetTLSAddr, parse the thread id with strtol,
10106         not as an address.
10107         (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
10108         (handle_v_requests, myresume): Remove "status" and "signal"
10109         parameters.  Adjust.
10110         (handle_status): New.
10111         (main): Delete local `status'.  Adjust.
10112         * remote-utils.c: Include target.h.
10113         (prepare_resume_reply): Change prototype to take a
10114         target_waitstatus.  Adjust.
10115
10116         * linux-low.c (linux_wait): Adjust to new target_ops->wait
10117         interface.
10118         * spu-low.c (spu_wait): Adjust.
10119         * win32-low.c (enum target_waitkind, struct target_waitstatus):
10120         Delete.
10121         (win32_wait): Adjust.
10122
10123 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10124
10125         * target.h (struct thread_resume): Delete leave_stopped member.
10126         (struct target_ops): Add a `n' argument to the `resume' callback.
10127         * server.c (start_inferior): Adjust.
10128         (handle_v_cont, myresume): Adjust.
10129         * linux-low.c (check_removed_breakpoint): Adjust to resume
10130         interface change, and to removed leave_stopped field.
10131         (resume_ptr): Delete.
10132         (struct thread_resume_array): New.
10133         (linux_set_resume_request): Add new `arg' parameter.  Adjust to
10134         resume interface change.
10135         (linux_continue_one_thread, linux_queue_one_thread)
10136         (resume_status_pending_p): Check if the resume field is NULL
10137         instead of checking the leave_stopped member.
10138         (linux_resume): Adjust to the target resume interface change.
10139         * spu-low.c (spu_resume): Adjust to the target resume interface
10140         change.
10141         * win32-low.c (win32_detach, win32_resume): Ditto.
10142
10143 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
10144
10145         * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10146         flag.
10147         (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10148         pending.
10149         (linux_continue_one_thread): Only preserve the stepping flag if
10150         there's a pending breakpoint.
10151
10152 2009-03-31  Pedro Alves  <pedro@codesourcery.com>
10153
10154         * server.c (main): After the inferior having exited, call
10155         remote_close before exiting gdbserver.
10156
10157 2009-03-25  Thiago Jung Bauermann  <bauerman@br.ibm.com>
10158
10159         Fix size of FPSCR in Power 7 processors.
10160         * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10161         (PPC_FEATURE_HAS_DFP): New #define.
10162         (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10163         size of the FPSCR.
10164
10165 2009-03-23  Pedro Alves  <pedro@codesourcery.com>
10166
10167         * server.c (handle_query) Whitespace and formatting.
10168
10169 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
10170
10171         * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10172         linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10173         linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10174         linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10175         regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10176         thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10177         Makefile.in, configure.ac: Fix whitespace throughout.
10178         * configure: Regenerate.
10179
10180 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
10181
10182         * inferiors.c (find_inferior): Make it safe for the callback
10183         function to delete the currently iterated inferior.
10184
10185 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
10186
10187         * Makefile.in (linuw_low_h): Move higher.
10188         (thread-db.o): Depend on $(linux_low_h).
10189
10190 2009-03-17  Pedro Alves  <pedro@codesourcery.com>
10191
10192         Rename "process" to "lwp" throughout.
10193
10194         * linux-low.c (all_processes): Rename to...
10195         (all_lwps): ... this.
10196         (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10197         (add_process): Rename to ...
10198         (add_lwp): ... this.  Adjust.
10199         (linux_create_inferior): Adjust.
10200         (linux_attach_lwp): Adjust.
10201         (linux_attach): Adjust.
10202         (linux_kill_one_process): Rename to ...
10203         (linux_kill_one_lwp): ... this.  Adjust.
10204         (linux_kill): Adjust.
10205         (linux_detach_one_process): Rename to ...
10206         (linux_detach_one_lwp): ... this.  Adjust.
10207         (linux_detach): Adjust.
10208         (check_removed_breakpoint): Adjust.
10209         (status_pending_p): Adjust.
10210         (linux_wait_for_process): Rename to ...
10211         (linux_wait_for_lwp): ... this.  Adjust.
10212         (linux_wait_for_event): Adjust.
10213         (send_sigstop): Adjust.
10214         (wait_for_sigstop): Adjust.
10215         (stop_all_processes): Rename to ...
10216         (stop_all_lwps): ... this.
10217         (linux_resume_one_process): Rename to ...
10218         (linux_resume_one_lwp): ... this.  Adjust.
10219         (linux_set_resume_request, linux_continue_one_thread)
10220         (linux_queue_one_thread, resume_status_pending_p)
10221         (usr_store_inferior_registers, regsets_store_inferior_registers)
10222         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10223         Adjust.
10224         * linux-low.h (get_process): Rename to ...
10225         (get_lwp): ... this.  Adjust.
10226         (get_thread_process): Rename to ...
10227         (get_thread_lwp): ... this.  Adjust.
10228         (get_process_thread): Rename to ...
10229         (get_lwp_thread): ... this.  Adjust.
10230         (struct process_info): Rename to ...
10231         (struct lwp_info): ... this.
10232         (all_processes): Rename to ...
10233         (all_lwps): ... this.
10234         * proc-service.c (ps_lgetregs): Adjust.
10235         * thread-db.c (thread_db_create_event, find_one_thread)
10236         (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10237
10238 2009-03-14  Pedro Alves  <pedro@codesourcery.com>
10239
10240         * server.c (handle_query): Handle "qAttached".
10241
10242 2009-03-13  Nathan Sidwell  <nathan@codesourcery.com>
10243
10244         * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10245         GPLv3, update license URL.
10246
10247 2009-03-01  Doug Evans  <dje@google.com>
10248
10249         * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10250         (server_h): Add gdb_signals.h.
10251         (signals.o): Update.
10252         * server.h (target_signal_from_host,target_signal_to_host_p)
10253         (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10254
10255 2009-02-14  Pierre Muller  <muller@ics.u-strasbg.fr>
10256
10257         * remote-utils.c (getpkt): Also generate remote-debug
10258         information if noack_mode is set.
10259
10260 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
10261
10262         * server.c (handle_query): Report qXfer:siginfo:read and
10263         qXfer:siginfo:write as supported and handle them.
10264         * target.h (struct target_ops) <qxfer_siginfo>: New field.
10265         * linux-low.c (linux_xfer_siginfo): New.
10266         (linux_target_ops): Set it.
10267
10268 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
10269
10270         * server.c (gdbserver_usage): Mention --remote-debug.
10271         (main): Accept '--remote-debug' switch.
10272
10273 2009-01-18  Doug Evans  <dje@google.com>
10274
10275         * regcache.c (new_register_cache): No need to check result of xcalloc.
10276         * server.c (handle_search_memory): Back out calls to xmalloc,
10277         result is checked and error is returned to user upon failure.
10278         (handle_query): Ditto.  Add more checks for result of malloc.
10279         (handle_v_cont): Check result of malloc, report error back to
10280         user upon failure.
10281         (handle_v_run): Ditto.  Call freeargv.
10282         * server.h (freeargv): Declare.
10283         * utils.c (freeargv): New fn.
10284
10285 2009-01-15  Doug Evans  <dje@google.com>
10286
10287         * gdbreplay.c (perror_with_name): Make arg const char *.
10288         * server.h (target_signal_to_name): Make return type const char *.
10289         * thread-db.c (thread_db_err_str): Make return type const char *.
10290         * utils.c (perror_with_name): Make arg const char *.
10291
10292 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
10293
10294         * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10295         when handling a EXIT_PROCESS_DEBUG_EVENT.
10296
10297 2009-01-06  Joel Brobecker  <brobecker@adacore.com>
10298
10299         * gdbreplay.c (gdbreplay_version): Update copyright year.
10300         * server.c (gdbserver_version): Likewise.
10301
10302 2009-01-05  Doug Evans  <dje@google.com>
10303
10304         * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10305         (handle_extended_wait): Improve comment.
10306
10307 2008-12-13  Doug Evans  <dje@google.com>
10308
10309         * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10310         * server.h (ATTR_MALLOC): New macro.
10311         (xmalloc,xcalloc,xstrdup): Declare.
10312         * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10313         * inferiors.c: Ditto.
10314         * linux-low.c: Ditto.
10315         * mem-break.c: Ditto.
10316         * regcache.c: Ditto.
10317         * remote-utils.c: Ditto.
10318         * server.c: Ditto.
10319         * target.c: Ditto.
10320         * win32-low.c: Ditto.
10321
10322 2008-12-12  Doug Evans  <dje@google.com>
10323
10324         * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10325         in debugging printf.
10326
10327         * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10328
10329 2008-12-09  Doug Evans  <dje@google.com>
10330
10331         * linux-low.h (struct process_info): Delete member tid, unused.
10332         * thread-db.c (find_one_thread): Update.
10333         (maybe_attach_thread): Update.
10334
10335 2008-12-02  Pedro Alves  <pedro@codesourcery.com>
10336
10337         * target.h (struct target_ops): Add qxfer_osdata member.
10338         * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10339         and dirent.h.
10340         (linux_qxfer_osdata): New functions.
10341         (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10342         callback.
10343         * server.c (handle_query): Handle "qXfer:osdata:read:".
10344         * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10345         (buffer_xml_printf): New functions.
10346         * server.h (struct buffer): New.
10347         (buffer_grow_str, buffer_grow_str0): New macros.
10348         (buffer_grow, buffer_free, buffer_init, buffer_finish)
10349         (buffer_xml_printf): Declare.
10350
10351 2008-11-24  Doug Evans  <dje@google.com>
10352
10353         * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10354
10355 2008-11-24  Daniel Jacobowitz  <dan@codesourcery.com>
10356
10357         * server.c (handle_v_run): Always use the supplied argument list.
10358
10359 2008-11-19  Bob Wilson  <bob.wilson@acm.org>
10360
10361         * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10362         (xtensa_regmap_table): Add entry for scompare1.
10363
10364 2008-11-18  Thiago Jung Bauermann  <bauerman@br.ibm.com>
10365
10366         * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10367         powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10368         powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10369         powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10370         powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10371         powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10372         * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10373         XML target descriptions.
10374         * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10375         when inferior is running on an ISA 2.05 or later processor.  Add
10376         special case to return offset for full 64-bit slot of FPSCR when
10377         in 32-bits.
10378
10379 2008-11-14  Daniel Gutson  <dgutson@codesourcery.com>
10380
10381         * Makefile.in (SFILES, clean): Added sparc64 files.
10382         (reg-sparc64.o, reg-sparc64.c): New.
10383         * configure.srv (sparc*-*-linux*): New configuration.
10384         * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10385         syscall arguments for SPARC.
10386         (regsets_store_inferior_registers): Likewise.
10387         * linux-sparc-low.c: New file.
10388
10389 2008-10-21  Doug Evans  <dje@google.com>
10390
10391         * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10392         (READLINE_DIR,READLINE_DEP): Delete.
10393         (INTERNAL_CFLAGS): Update.
10394         (LINTFLAGS): Update.
10395
10396 2008-10-10  Pedro Alves  <pedro@codesourcery.com>
10397
10398         * server.c (handle_v_run): If GDB didn't specify an argv, use the
10399         whole argv from the last run, not just argv[0].
10400
10401 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
10402
10403         * regcache.c (new_register_cache): Return NULL if the register
10404         cache size isn't known yet.
10405         (free_register_cache): Avoid dereferencing a NULL regcache.
10406
10407 2008-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
10408
10409         * configure.srv: Merge MIPS and MIPS64.
10410
10411 2008-08-24  Maciej W. Rozycki  <macro@linux-mips.org>
10412
10413         * Makefile.in (uninstall): Apply $(EXEEXT) too.
10414
10415 2008-08-18  Luis Machado  <luisgpm@br.ibm.com>
10416
10417         * Makefile.in: Add required vsx dependencies.
10418
10419         * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10420         Declare init_registers_powerpc_vsx32l.
10421         Declare init_registers_powerpc_vsx64l.
10422         Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10423         (ppc_arch_setup): Check for VSX in hwcap.
10424         (ppc_fill_vsxregset): New function.
10425         (ppc_store_vsxregset): New function.
10426         Add new VSX entry in regset_info target_regsets.
10427
10428         * configure.srv: Add new VSX dependencies.
10429
10430 2008-08-12  Pedro Alves  <pedro@codesourcery.com>
10431
10432         * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10433         (remote_open): Set or clear transport_is_reliable.
10434         (putpkt_binary): Don't expect acks in noack mode.
10435         (getpkt): Don't send ack/nac in noack mode.
10436         * server.c (handle_general_set): Handle QStartNoAckMode.
10437         (handle_query): If connected by tcp pass QStartNoAckMode+ in
10438         qSupported.
10439         (main): Reset noack_mode on every connection.
10440         * server.h (noack_mode): Declare.
10441
10442 2008-08-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10443
10444         * Makefile.in (GDBREPLAY_OBS): New variable.
10445         (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10446
10447 2008-08-05  Ulrich Weigand  <uweigand@de.ibm.com>
10448             Daniel Jacobowitz  <dan@codesourcery.com>
10449
10450         * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10451         (usr_store_inferior_registers): Likewise.
10452         (regsets_store_inferior_registers): Likewise.
10453
10454 2008-07-31  Rolf Jansen  <rj@surtec.com>
10455             Pedro Alves  <pedro@codesourcery.com>
10456
10457         * configure.ac: Check for memmem declaration.
10458         * server.c [HAVE_MALLOC_H]: Include malloc.h.
10459         (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10460         (disable_packet_qfThreadInfo): Unconditionally compile.
10461         * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10462         * configure, config.in: Regenerate.
10463
10464 2008-07-28  Doug Kwan  <dougkwan@google.com>
10465
10466         * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10467         (linux_write_memory): Remove declaration of errno.
10468
10469 2008-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
10470
10471         * linux-low.c (handle_extended_wait): Do not use "status"
10472         variable uninitialized.
10473
10474 2008-07-07  Pedro Alves  <pedro@codesourcery.com>
10475
10476         * server.c (handle_v_attach): Inhibit reporting dll changes.
10477
10478 2008-06-27  Pedro Alves  <pedro@codesourcery.com>
10479
10480         * remote-utils.c (prepare_resume_reply): If requested, don't
10481         output "thread:TID" in the T stop reply.
10482
10483         * server.c (disable_packet_vCont, disable_packet_Tthread)
10484         (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10485         (handle_query): If requested, disable support for qC, qfThreadInfo
10486         and qsThreadInfo.
10487         (handle_v_requests): If requested, disable support for vCont.
10488         (gdbserver_show_disableable): New.
10489         (main): Handle --disable-packet and --disable-packet=LIST.
10490
10491         * server.h (disable_packet_vCont, disable_packet_Tthread)
10492         (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10493
10494 2008-06-20  Carlos O'Donell  <carlos@codesourcery.com>
10495
10496         * server.c (gdbserver_usage): Mention --version.
10497
10498 2008-06-06  Daniel Jacobowitz  <dan@codesourcery.com>
10499
10500         * Makefile.in (gdbreplay.o): New rule.
10501
10502 2008-06-06  Joseph Myers  <joseph@codesourcery.com>
10503
10504         * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10505         message, not gdbserver.
10506
10507 2008-06-05  Vladimir Prus  <vladimir@codesourcery.com>
10508             Nathan Sidwell  <nathan@codesourcery.com>
10509             Joseph Myers  <joseph@codesourcery.com>
10510
10511         * acinclude.m4: Include ../../config/acx.m4.
10512         * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10513         * configure, config.in: Regenerate.
10514         * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10515         * server.c (gdbserver_version): Print PKGVERSION.
10516         (gdbsrever_usage): Add stream parameter.  Print REPORT_BUGS_TO.
10517         (main): Adjust gdbserver_usage calls.
10518         * gdbreplay.c (version, host_name): Add declarations.
10519         (gdbreplay_version, gdbreplay_usage): New.
10520         (main): Accept --version and --help options.
10521
10522 2008-06-04  Daniel Jacobowitz  <dan@codesourcery.com>
10523
10524         * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10525         (arm_breakpoint_at): Handle Thumb.
10526         (the_low_target): Add comment.
10527
10528 2008-05-29  Ulrich Weigand  <uweigand@de.ibm.com>
10529
10530         * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10531
10532 2008-05-09  Doug Evans  <dje@google.com>
10533
10534         * server.h (decode_search_memory_packet): Declare.
10535         * remote-utils.c (decode_search_memory_packet): New fn.
10536         * server.c (handle_search_memory_1): New fn.
10537         (handle_search_memory): New fn.
10538         (handle_query): Process qSearch:memory packets.
10539
10540 2008-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
10541
10542         * regcache.c (registers_length): Remove.
10543         (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10544         full register packet.
10545         * regcache.h (registers_length): Remove prototype.
10546         * server.h (PBUFSIZ): Define to 16384.
10547
10548 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
10549
10550         * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10551         powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10552         powerpc-64l.o, and powerpc-altivec64l.o.
10553         Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10554         rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10555         rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10556         rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10557         rs6000/power-linux.xml, and rs6000/power64-linux.xml
10558         to srv_xmlfiles.
10559
10560         * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10561         (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10562         (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10563         (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10564         (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10565         (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10566         (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10567         (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10568         (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10569         (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10570         (clean): Update.
10571
10572         * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10573         (init_registers_powerpc_32l): ... this new prototype.
10574         (init_registers_powerpc_32): Remove, replace by ...
10575         (init_registers_powerpc_altivec32l): ... this new prototype.
10576         (init_registers_powerpc_e500): Remove, replace by ...
10577         (init_registers_powerpc_e500l): ... this new prototype.
10578         (init_registers_ppc64): Remove, replace by ...
10579         (init_registers_powerpc_64l): ... this new prototype.
10580         (init_registers_powerpc_64): Remove, replace by ...
10581         (init_registers_powerpc_altivec64l): ... this new prototype.
10582         (ppc_num_regs): Set to 73.
10583         (PT_ORIG_R3, PT_TRAP): Define if necessary.
10584         (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10585         (ppc_cannot_store_register): Handle orig_r3 and trap.
10586         (ppc_arch_setup): Update init_registers_... calls.
10587         (ppc_fill_gregset): Handle orig_r3 and trap.
10588
10589         * inferiors.c (clear_inferiors): Reset current_inferior.
10590
10591 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
10592
10593         * acinclude.m4: Add override.m4.
10594         * configure: Regenerate.
10595
10596 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
10597
10598         * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10599         initial call to init_register_ppc64.
10600
10601 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
10602
10603         * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10604         single powerpc*-*-linux* case.
10605         (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10606
10607 2008-04-17  Ulrich Weigand  <uweigand@de.ibm.com>
10608
10609         * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10610         srv_regobj.  Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10611         from reg_xmlfiles.
10612         * linux-ppc-low.c: Include <elf.h>.
10613         (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10614         (ppc_hwcap): New global variable.
10615         (ppc_regmap): Remove __SPE__ #ifdef sections.
10616         (ppc_regmap_e500): New global variable.
10617         (ppc_cannot_store_register): Update __SPE__ special case.
10618         (ppc_get_hwcap): New function.
10619         (ppc_arch_setup): Use it to determine whether inferior supports
10620         AltiVec or SPE registers.  Set the_low_target.regmap if appropriate.
10621         (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10622         Do not access registers if target does not support AltiVec.
10623         (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10624         Do not access registers if target does not support SPE.
10625         (target_regsets): Unconditionally include AltiVec and SPE regsets.
10626
10627 2008-04-17  Daniel Jacobowitz  <dan@codesourcery.com>
10628
10629         * linux-low.c (disabled_regsets, num_regsets): New.
10630         (use_regsets_p): Delete.
10631         (linux_wait_for_process): Clear disabled_regsets.
10632         (regsets_fetch_inferior_registers): Check and set it.
10633         (regsets_store_inferior_registers): Likewise.
10634         (linux_fetch_registers, linux_store_registers): Do not use
10635         use_regsets_p.
10636         (initialize_low): Allocate disabled_regsets.
10637
10638 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
10639
10640         * Makefile.in (LIBOBJS): New.
10641         (OBS): Use LIBOBJS.
10642         (memmem.o): New rule.
10643         * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10644         * configure: Regenerated.
10645
10646 2008-04-04  Ulrich Weigand  <uweigand@de.ibm.com>
10647
10648         * server.c (handle_query): Never return "unsupported" for
10649         qXfer:features:read queries.
10650
10651 2008-03-27  Ulrich Weigand  <uweigand@de.ibm.com>
10652
10653         * server.c (get_features_xml): Fix inverted condition.
10654         (handle_query): Always support qXfer:feature:read.
10655
10656 2008-03-10  Daniel Jacobowitz  <dan@codesourcery.com>
10657
10658         * server.c (wrapper_argv): New.
10659         (start_inferior): Handle wrapper_argv.  If set, expect an extra
10660         trap.
10661         (gdbserver_usage): Document --wrapper.
10662         (main): Parse --wrapper.
10663
10664 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
10665
10666         * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10667         powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10668         * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10669         (ppc_set_pc): Likewise.
10670         (ppc_arch_setup): New function.
10671         (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10672         of collect_register.
10673         (the_low_target): Use ppc_arch_setup as arch_setup initializer.
10674
10675 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
10676
10677         * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10678         instead of linux-ppc64-low.o.
10679         * linux-ppc64-low.c: Remove file.
10680         * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10681         (linux-ppc64-low.o): Remove rule.
10682
10683         * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10684         (init_registers_powerpc_64): Likewise.
10685         (ppc_regmap): Conditionally define depending on __powerpc64__.
10686         (ppc_cannot_store_register): Do not special-case "fpscr" when
10687         compiled on __powerpc64__.
10688         (ppc_collect_ptrace_register): New function.
10689         (ppc_supply_ptrace_register): New function.
10690         (ppc_breakpoint): Change type to "unsigned int".
10691         (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10692         (the_low_target): Conditionally provide initializers for the
10693         arch_setup member depending on __powerpc64__.  Install
10694         collect_ptrace_register and supply_ptrace_register members.
10695
10696 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
10697
10698         * regcache.h (gdbserver_xmltarget): Add extern declaration.
10699         * server.c (gdbserver_xmltarget): Define.
10700         (get_features_xml): Use it to replace "target.xml" and arch_string.
10701
10702         * configure.srv: Remove srv_xmltarget.  Add XML files that were
10703         mentioned there to srv_xmlfiles instead.  Remove conditional tests
10704         on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10705         srv_xmlfiles and srv_regobj to include all possible choices.
10706         * configure.ac (srv_xmltarget): Remove.
10707         (srv_xmlfiles): Do not add "target.xml".
10708         (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10709         checks for supplementary target information.
10710         * configure: Regenerate.
10711         * Makefile.in (XML_TARGET): Remove.
10712         (target.xml): Remove rule.
10713         (clean): Do not clean up target.xml.
10714         (.PRECIOUS): Do not mention target.xml.
10715
10716         * target.h (struct target_ops): Remove arch_string member.
10717         * linux-low.c (linux_arch_string): Remove.
10718         (linux_target_ops): Remove arch_string initializer.
10719         * linux-low.h (struct linux_target_ops): Remove arch_string member.
10720         * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10721         * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10722         * spu-low.c (spu_arch_string): Remove.
10723         (spu_target_ops): Remove arch_string initializer.
10724         * win32-low.c (win32_arch_string): Remove.
10725         (win32_target_ops): Remove arch_string initializer.
10726         * win32-low.h (struct win32_target_ops): Remove arch_string member.
10727         * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10728         * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10729
10730 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
10731
10732         * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10733         by collect_ptrace_register and supply_ptrace_register hooks.
10734         * linux-low.c (fetch_register): Use supply_ptrace_register callback
10735         instead of checking for the_low_target.left_pad_xfer.
10736         (usr_store_inferior_registers): Use collect_ptrace_register callback
10737         instead of checking for the_low_target.left_pad_xfer.
10738
10739         * linux-s390-low.c (s390_collect_ptrace_register): New function.
10740         (s390_supply_ptrace_register): Likewise.
10741         (s390_fill_gregset): Call s390_collect_ptrace_register.
10742         (the_low_target): Update.
10743
10744         * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10745         (ppc_supply_ptrace_register): Likewise.
10746         (the_low_target): Update.
10747
10748         * linux-i386-low.c (the_low_target): Update.
10749         * linux-x86-64-low.c (the_low_target): Update.
10750
10751 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
10752
10753         * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10754         reg-s390.o and reg-s390x.o.
10755
10756         * linux-low.c (new_inferior): New global variable.
10757         (linux_create_inferior, linux_attach): Set it.
10758         (linux_wait_for_process): Call the_low_target.arch_setup after the
10759         target has stopped for the first time.
10760         (initialize_low): Do not call the_low_target.arch_setup.
10761
10762         * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10763         (s390_set_pc): Likewise.
10764         (s390_arch_setup): New function.
10765         (the_low_target): Use s390_arch_setup as arch_setup routine.
10766
10767         * regcache.c (realloc_register_cache): New function.
10768         (set_register_cache): Call it for each existing regcache.
10769
10770 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
10771
10772         * server.h (init_registers): Remove prototype.
10773
10774         * linux-low.h (struct linux_target_ops): Add arch_setup field.
10775         * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10776         instead of init_registers ().
10777         * linux-arm-low.c (init_registers_arm): Add prototype.
10778         (init_registers_arm_with_iwmmxt): Likewise.
10779         (the_low_target): Add initializer for arch_setup field.
10780         * linux-cris-low.c (init_registers_cris): Add prototype.
10781         (the_low_target): Add initializer for arch_setup field.
10782         * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10783         (the_low_target): Add initializer for arch_setup field.
10784         * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10785         (the_low_target): Add initializer for arch_setup field.
10786         * linux-ia64-low.c (init_registers_ia64): Add prototype.
10787         (the_low_target): Add initializer for arch_setup field.
10788         * linux-m32r-low.c (init_registers_m32r): Add prototype.
10789         (the_low_target): Add initializer for arch_setup field.
10790         * linux-m68k-low.c (init_registers_m68k): Add prototype.
10791         (the_low_target): Add initializer for arch_setup field.
10792         * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10793         (init_registers_mips64_linux): Likewise.
10794         (the_low_target): Add initializer for arch_setup field.
10795         * linux-ppc-low.c (init_registers_ppc): Add prototype.
10796         (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10797         (the_low_target): Add initializer for arch_setup field.
10798         * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10799         (init_registers_powerpc_64): Likewise.
10800         (the_low_target): Add initializer for arch_setup field.
10801         * linux-s390-low.c (init_registers_s390): Add prototype.
10802         (init_registers_s390x): Likewise.
10803         (the_low_target): Add initializer for arch_setup field.
10804         * linux-sh-low.c (init_registers_sh): Add prototype.
10805         (the_low_target): Add initializer for arch_setup field.
10806         * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10807         (the_low_target): Add initializer for arch_setup field.
10808         * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10809         (the_low_target): Add initializer for arch_setup field.
10810
10811         * win32-low.h (struct win32_target_ops): Add arch_setup field.
10812         * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10813         instead of init_registers ().
10814         * win32-arm-low.c (init_registers_arm): Add prototype.
10815         (the_low_target): Add initializer for arch_setup field.
10816         * win32-i386-low.c (init_registers_i386): Add prototype.
10817         (the_low_target): Add initializer for arch_setup field.
10818
10819         * spu-low.c (init_registers_spu): Add prototype.
10820         (initialize_low): Call initialie_registers_spu () instead of
10821         initialize_registers ().
10822
10823 2008-02-19  Pedro Alves  <pedro@codesourcery.com>
10824
10825         * server.c (handle_v_requests): When handling the vRun and vAttach
10826         packets, if already debugging a process, don't kill it.  Return an
10827         error instead.
10828
10829 2008-02-17  Daniel Jacobowitz  <dan@codesourcery.com>
10830
10831         * server.c (handle_query): Correct length check.
10832
10833 2008-02-14  Pedro Alves  <pedro_alves@portugalmail.pt>
10834
10835         * win32-low.c (do_initial_child_stuff): Add process handle
10836         parameter.  Set current_process_handle and current_process_id from the
10837         parameters. Clear globals.
10838         (win32_create_inferior): Don't set current_process_handle and
10839         current_process_id here.  Instead pass them on the call to
10840         do_initial_child_stuff.
10841         (win32_attach): Likewise.
10842         (win32_clear_inferiors): New.
10843         (win32_kill): Don't close the current process handle or the
10844         current thread handle here.  Instead call win32_clear_inferiors.
10845         (win32_detach): Don't open a new handle to the process.  Call
10846         win32_clear_inferiors.
10847         (win32_join): Don't rely on current_process_handle; open a new
10848         handle using the process id.
10849         (win32_wait): Call win32_clear_inferiors when the inferior process
10850         has exited.
10851
10852 2008-02-14  Daniel Jacobowitz  <dan@codesourcery.com>
10853
10854         * server.c (monitor_show_help): Add "exit".
10855
10856 2008-02-11  Maxim Grigoriev  <maxim2405@gmail.com>
10857
10858         * Makefile.in (SFILES): Add linux-xtensa-low.c.
10859         (clean): Add reg-xtensa.c.
10860         (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10861         * configure.srv (xtensa*-*-linux*) New target.
10862         * linux-xtensa-low.c: New.
10863         * xtensa-xtregs.c: New.
10864
10865 2008-02-01  Pedro Alves  <pedro_alves@portugalmail.pt>
10866
10867         * hostio.c: Don't include errno.h.
10868         (errno_to_fileio_errno): Move to hostio-errno.
10869         * hostio.c: (hostio_error): Remove the error parameter.  Defer the
10870         error number outputting to the target->hostio_last_error callback.
10871         (hostio_packet_error): Use FILEIO_EINVAL directly.
10872         (handle_open, handle_pread, hostio_error, handle_unlink): Update
10873         calls to hostio_error.
10874         * hostio-errno.c: New.
10875         * server.h (hostio_last_error_from_errno): Declare.
10876         * target.h (target_ops): Add hostio_last_error member.
10877         * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10878         as hostio_last_error handler.
10879         * spu-low.c (spu_target_ops): Likewise.
10880         * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10881         (wince_hostio_last_error): New functions.
10882         (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10883         as hostio_last_error handler.
10884         (win32_target_ops) [!_WIN32_WCE]: Register
10885         hostio_last_error_from_errno as hostio_last_error handler.
10886         * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10887         (hostio-errno.o): New rule.
10888         * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10889         * configure.srv (srv_hostio_err_objs): New variable.  Default to
10890         hostio-errno.o.
10891         (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10892         * configure: Regenerate.
10893
10894 2008-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
10895
10896         * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10897         (linux_kill, linux_detach): Clean up the process list.
10898         * remote-utils.c (remote_open): Improve port number parsing.
10899         (putpkt_binary, input_interrupt): Only send interrupts if the target
10900         is running.
10901         * server.c (extended_protocol): Make static.
10902         (attached): Define earlier.
10903         (exit_requested, response_needed, program_argv): New variables.
10904         (target_running): New.
10905         (start_inferior): Clear attached here.
10906         (attach_inferior): Set attached here.
10907         (require_running): Define.
10908         (handle_query): Use require_running and target_running.  Implement
10909         "monitor exit".
10910         (handle_v_attach, handle_v_run): New.
10911         (handle_v_requests): Use require_running.  Handle vAttach and vRun.
10912         (gdbserver_usage): Update.
10913         (main): Redo argument parsing.  Handle --debug and --multi.  Handle
10914         --attach along with other options or after the port.  Save
10915         program_argv.  Support no initial program.  Resynchronize
10916         communication with GDB after an error.  Handle "monitor exit".
10917         Use require_running and target_running.  Always allow the extended
10918         protocol.  Do not error out for Hc0 or Hc-1.  Do not automatically
10919         restart in extended mode.
10920         * README: Refer to the GDB manual.  Update --attach usage.
10921
10922 2007-12-20  Andreas Schwab  <schwab@suse.de>
10923
10924         * linux-low.c (STACK_SIZE): Define.
10925         (linux_tracefork_child): Use it.  Use __clone2 on ia64.
10926         (linux_test_for_tracefork): Likewise.
10927
10928 2007-12-18  Daniel Jacobowitz  <dan@codesourcery.com>
10929
10930         * linux-low.c (linux_wait_for_event): Update messages.  Do not
10931         reinsert auto-delete breakpoints.
10932         * mem-break.c (struct breakpoint): Change return type of handler to
10933         int.
10934         (set_breakpoint_at): Update handler type.
10935         (reinsert_breakpoint_handler): Return 1 instead of calling
10936         delete_breakpoint.
10937         (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10938         setting a new one.
10939         (check_breakpoints): Delete auto-delete breakpoints and return 2.
10940         * mem-break.h (set_breakpoint_at): Update handler type.
10941         * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10942         * win32-low.c (auto_delete_breakpoint): New.
10943         (get_child_debug_event): Use it.
10944
10945 2007-12-16  Daniel Jacobowitz  <dan@codesourcery.com>
10946
10947         * configure.ac: Check for pread and pwrite.
10948         * hostio.c (handle_pread): Fall back to lseek and read.
10949         (handle_pwrite): Fall back to lseek and write.
10950         * config.in, configure: Regenerated.
10951
10952 2007-12-07  Daniel Jacobowitz  <dan@codesourcery.com>
10953
10954         * server.c (myresume): Add own_buf argument.
10955         (main): Update calls.
10956
10957 2007-12-06  Daniel Jacobowitz  <dan@codesourcery.com>
10958
10959         * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10960         * remote-utils.c (remote_open): Do not call disable_async_io.
10961         (block_async_io): Delete.
10962         (unblock_async_io): Make static.
10963         (initialize_async_io): New.
10964         * server.c (handle_v_cont): Handle async I/O here.
10965         (myresume): Likewise.  Move other common resume tasks here...
10966         (main): ... from here.  Call initialize_async_io.  Disable async
10967         I/O before the main loop.
10968         * server.h (initialize_async_io): Declare.
10969         (block_async_io, unblock_async_io): Delete prototypes.
10970         * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10971
10972 2007-12-06  Mick Davis  <mickd@goanna.iinet.net.au>
10973
10974         * remote-utils.c (readchar): Allow binary data in received messages.
10975
10976 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
10977
10978         * win32-low.c (attaching): New global.
10979         (win32_create_inferior): Clear the `attaching' global.
10980         (win32_attach): Set the `attaching' global.
10981         (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10982         attaching.  Only set a breakpoint at the entry point if not
10983         attaching.
10984
10985 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
10986
10987         * server.c (main): Don't report dll events on the initial
10988         connection on attaches.
10989
10990 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
10991
10992         * server.c (main): Relax numerical bases supported for the pid of
10993         the --attach command line argument.
10994
10995 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
10996
10997         * win32-low.c (win32_attach): Call OpenProcess before
10998         DebugActiveProcess, not after.  Add last error output to error
10999         call.
11000
11001 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11002
11003         * win32-low.c (win32_get_thread_context)
11004         (win32_set_thread_context): New functions.
11005         (thread_rec): Use win32_get_thread_context.
11006         (continue_one_thread, win32_resume): Use win32_set_thread_context.
11007         * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
11008         field.
11009
11010 2007-12-03  Leo Zayas
11011             Pedro Alves  <pedro_alves@portugalmail.pt>
11012
11013         * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
11014         global variables.
11015         (child_add_thread): Minor cleanup.
11016         (child_continue): Resume artificially suspended threads before
11017         calling ContinueDebugEvent.
11018         (suspend_one_thread): New.
11019         (fake_breakpoint_event): New.
11020         (get_child_debug_event): Change return type to int.  Check here if
11021         gdb sent an interrupt request.  If a soft interrupt was requested,
11022         fake a breakpoint event.  Return 0 if there is no event to handle,
11023         and 1 otherwise.
11024         (win32_wait): Don't check here if gdb sent an interrupt request.
11025         Ensure there is a valid event to handle.
11026         (win32_request_interrupt): Add soft interruption method as last
11027         resort.
11028
11029 2007-12-03  Leo Zayas
11030             Pedro Alves  <pedro_alves@portugalmail.pt>
11031
11032         * win32-low.h (win32_thread_info): Add descriptions to the
11033         structure members.  Replace `suspend_count' counter by a
11034         `suspended' flag.
11035         * win32-low.c (thread_rec): Update condition of when to get the
11036         context from the inferior.  Rely on ContextFlags being set if it
11037         has already been retrieved.  Only suspend the inferior thread if
11038         we haven't already.  Warn if that fails.
11039         (continue_one_thread): s/suspend_count/suspended/.  Only call
11040         ResumeThread once.  Warn if that fails.
11041
11042 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
11043
11044         * win32-low.c (win32_wait): Don't read from the inferior when it
11045         has already exited.
11046
11047 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
11048
11049         * Makefile.in (win32_low_h): New variable.
11050         (win32-low.o): Add dependency on $(win32_low_h).
11051         (win32-arm-low.o, win32-i386-low.o): New rules.
11052
11053 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
11054
11055         * hostio.c: Correct copyright year.
11056
11057 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
11058
11059         * Makefile.in (OBS): Add hostio.o.
11060         (hostio.o): New rule.
11061         * server.h (handle_vFile): Declare.
11062         * hostio.c: New file.
11063         * server.c (handle_v_requests): Take packet_len and new_packet_len
11064         for binary packets.  Call handle_vFile.
11065         (main): Update call to handle_v_requests.
11066
11067 2007-11-05  Daniel Jacobowitz  <dan@codesourcery.com>
11068
11069         * linux-low.c: Include <sched.h>.
11070
11071 2007-11-01  Daniel Jacobowitz  <dan@codesourcery.com>
11072
11073         * linux-low.c (linux_tracefork_grandchild): New.
11074         (linux_tracefork_child): Use clone.
11075         (linux_test_for_tracefork): Use clone; allocate and free a stack.
11076
11077 2007-10-31  Joel Brobecker  <brobecker@adacore.com>
11078
11079         * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
11080
11081 2007-10-24  Daniel Jacobowitz  <dan@codesourcery.com>
11082
11083         * linux-low.c (handle_extended_wait): Handle unexpected signals.
11084
11085 2007-10-23  Daniel Jacobowitz  <dan@codesourcery.com>
11086
11087         * inferiors.c (change_inferior_id): Delete.
11088         (add_pid_to_list, pull_pid_from_list): New.
11089         * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
11090         (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
11091         (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
11092         (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
11093         (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
11094         (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
11095         (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
11096         (using_threads): Always set to 1.
11097         (handle_extended_wait): New.
11098         (add_process): Do not set TID.
11099         (linux_create_inferior): Set must_set_ptrace_flags.
11100         (linux_attach_lwp): Remove TID argument.  Do not check using_threads.
11101         Use PTRACE_SETOPTIONS.  Call new_thread_notify.  Update all callers.
11102         (linux_thread_alive): Rename TID argument to LWPID.
11103         (linux_wait_for_process): Handle unknown processes.  Do not use TID.
11104         (linux_wait_for_event): Do not use TID or check using_threads.  Update
11105         call to dead_thread_notify.  Call handle_extended_wait.
11106         (linux_create_inferior): Use PTRACE_SETOPTIONS.
11107         (send_sigstop): Delete sigstop_sent.
11108         (wait_for_sigstop): Avoid TID.
11109         (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
11110         (linux_test_for_tracefork): New.
11111         (linux_lookup_signals): Use thread_db_active and
11112         linux_supports_tracefork_flag.
11113         (initialize_low): Use thread_db_active and linux_test_for_tracefork.
11114         * linux-low.h (get_process_thread): Avoid TID.
11115         (struct process_ifo): Move thread_known and tid to the end.  Remove
11116         sigstop_sent.
11117         (linux_attach_lwp, thread_db_init): Update prototypes.
11118         * server.h (change_inferior_id): Delete prototype.
11119         (add_pid_to_list, pull_pid_from_list): New prototypes.
11120         * thread-db.c (thread_db_use_events): New.
11121         (find_first_thread): Rename to...
11122         (find_one_thread): ...this.  Update callers and messages.  Do not
11123         call fatal.  Check thread_db_use_events.  Do not call
11124         change_inferior_id or new_thread_notify.
11125         (maybe_attach_thread): Update.  Do not call new_thread_notify.
11126         (thread_db_init): Set thread_db_use_events.  Check use_events.
11127         * utils.c (fatal, warning): Correct message prefix.
11128
11129 2007-10-15  Daniel Jacobowitz  <dan@codesourcery.com>
11130
11131         * Makefile.in (clean): Remove new files.
11132         (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11133         (powerpc-64.o, powerpc-64.c): New rules.
11134         * configure.srv: Use alternate register sets for powerpc64-*-linux*
11135         with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11136         with SPE.
11137         * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11138         SPE targets.
11139         (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11140         (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11141         (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11142         (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11143         (target_regsets): Add AltiVec and SPE register sets.
11144         * configure.ac: Check for AltiVec and SPE.
11145         * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11146         (ppc_fill_vrregset, ppc_store_vrregset): New.
11147         (target_regsets): Add AltiVec register set.
11148         * configure: Regenerated.
11149
11150 2007-09-19  Daniel Jacobowitz  <dan@codesourcery.com>
11151
11152         * linux-low.c (O_LARGEFILE): Define.
11153         (linux_read_memory): Use /proc/PID/mem.
11154         * configure.ac: Use AC_GNU_SOURCE.  Check for pread64.
11155         * configure, config.in: Regenerated.
11156
11157 2007-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
11158
11159         * linux-low.c (linux_wait_for_event): Do not pass signals while
11160         single-stepping.
11161
11162 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11163
11164         * win32-low.c (create_process): New.
11165         (win32_create_inferior): Use create_process instead of
11166         CreateProcess.  If create_process failed retry appending an ".exe"
11167         suffix.  Store the GetLastError result immediatelly after
11168         create_process calls and use it on the call to error.
11169
11170 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
11171
11172         * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11173
11174 2007-08-23  Joel Brobecker  <brobecker@adacore.com>
11175
11176         * configure.ac: Switch license to GPLv3.
11177
11178 2007-08-01  Michael Snyder  <msnyder@access-company.com>
11179
11180         * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11181
11182 2007-07-31  Pedro Alves  <pedro_alves@portugalmail.pt>
11183
11184         * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11185         typedef.
11186         (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11187         (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL.  Get
11188         CloseToolhelp32Snapshot.
11189         (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11190         CloseToolhelp32Snapshot.
11191
11192 2007-07-27  Michael Snyder  <michael.snyder@access-company.com>
11193
11194         * server.c (main): Check for inferior exit before main loop.
11195
11196 2007-07-18  Pedro Alves  <pedro_alves@portugalmail.pt>
11197
11198         * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11199         instead of on tmp_desc.
11200
11201 2007-07-17  Pedro Alves  <pedro_alves@portugalmail.pt>
11202             Daniel Jacobowitz  <dan@codesourcery.com>
11203
11204         * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11205         (add_thread): Minor cleanups.
11206         (clear_inferiors): Move lower in the file.  Clear the DLL
11207         list.
11208         (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11209         * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11210         (xml_escape_text): New.
11211         * server.c (handle_query): Handle qXfer:libraries:read.  Report it
11212         for qSupported.
11213         (handle_v_cont): Report errors.
11214         (gdbserver_version): Update.
11215         (main): Correct size of own_buf.  Do not report initial DLL events.
11216         * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11217         (unloaded_dll, xml_escape_text): New.
11218         * win32-low.c (enum target_waitkind): Update comments.
11219         (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11220         (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11221         (win32_EnumProcessModules, win32_GetModuleInformation)
11222         (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11223         (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11224         (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11225         (win32_Module32First, win32_Module32Next, load_toolhelp)
11226         (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11227         (get_child_debug_event): Handle DLL events.
11228         (win32_wait): Likewise.
11229
11230 2007-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
11231
11232         * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11233         * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11234
11235 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
11236
11237         * win32-low.c (handle_output_debug_string): Ignore event if not
11238         waiting.
11239
11240 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
11241
11242         * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11243
11244 2007-07-03  Daniel Jacobowitz  <dan@codesourcery.com>
11245
11246         * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11247
11248 2007-07-02  Daniel Jacobowitz  <dan@codesourcery.com>
11249
11250         * inferiors.c (change_inferior_id): Add comment.
11251         * linux-low.c (check_removed_breakpoint): Add an early
11252         prototype.  Improve debug output.
11253         (linux_attach): Doc update.
11254         (linux_detach_one_process, linux_detach): Clean up before releasing
11255         each process.
11256         (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11257         * linux-low.h (struct process_info): Doc improvement.
11258         * mem-break.c (delete_all_breakpoints): New.
11259         * mem-break.h (delete_all_breakpoints): New prototype.
11260         * thread-db.c (find_first_thread): New.
11261         (thread_db_create_event): Call it instead of
11262         thread_db_find_new_threads.  Clean up unused variables.
11263         (maybe_attach_thread): Remove first thread handling.
11264         (thread_db_find_new_threads): Use find_first_thread.
11265         (thread_db_get_tls_address): Likewise.
11266
11267 2007-06-27  Daniel Jacobowitz  <dan@codesourcery.com>
11268
11269         * thread-db.c (thread_db_find_new_threads): Add prototype.
11270         (thread_db_create_event): Check for the main thread before adding
11271         a new thread.
11272         (maybe_attach_thread): Only enable event reporting if TID == 0.
11273         (thread_db_get_tls_address): Check for new threads.
11274
11275 2007-06-20  Daniel Jacobowitz  <dan@codesourcery.com>
11276
11277         * linux-low.c (linux_create_inferior): Try execv before execvp.
11278         * spu-low.c (spu_create_inferior): Likewise.
11279
11280 2007-06-13  Mike Frysinger  <vapier@gentoo.org>
11281
11282         * linux-low.c (linux_create_inferior): Change execv to execvp.
11283         * spu-low.c (spu_create_inferior): Likewies.
11284
11285 2007-06-13  Daniel Jacobowitz  <dan@codesourcery.com>
11286
11287         * Makefile.in (clean): Clean new files instead of deleted ones.
11288         (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11289         (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11290         rules.
11291         * configure.srv: Specify XML files and new regformats for MIPS and
11292         MIPS64 GNU/Linux.
11293         * linux-mips-low.c (mips_num_regs): Set to only used registers.
11294         (mips_regmap): Do not fetch $0.  Remove unused registers.  Add
11295         an entry for the restart register.
11296         (mips_cannot_fetch_register, mips_cannot_store_register)
11297         (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11298         register names to match the XML descriptions.
11299         (mips_fill_gregset, mips_store_gregset): Likewise.  Handle the
11300         restart register instead of $0.
11301
11302 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
11303             Markus Deuling  <deuling@de.ibm.com>
11304
11305         * remote-utils.c (decode_xfer_write): New function.
11306         * server.h (decode_xfer_write): Add prototype.
11307         * server.c (handle_query): Add PACKET_LEN argument.  Support
11308         qXfer:spu:read and qXfer:spu:write packets.
11309         (main): Pass packet_len to handle_query.
11310         * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11311         * target.h (target_ops): Add qxfer_spu.
11312
11313 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
11314
11315         * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11316         accessing non-seekable spufs files.
11317
11318 2007-05-16  Markus Deuling  <deuling@de.ibm.com>
11319
11320         * server.c (handle_query): Add reply for qC packet.
11321
11322 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11323             Leo Zayas  <lerele@champenstudios@com>
11324
11325         * server.h (check_remote_input_interrupt_request): New function.
11326         * remote_utils.c (INVALID_DESCRIPTOR): New define.
11327         (remote_desc): Initialize with INVALID_DESCRIPTOR.
11328         (input_interrupt): Expose on USE_WIN32API too.  Fix whitespace.
11329         (check_remote_input_interrupt_request): New function.
11330         * server.h (check_remote_input_interrupt_request): Declare.
11331         * win32-low.c (winapi_DebugBreakProcess,
11332         winapi_GenerateConsoleCtrlEvent): New typedefs.
11333         (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11334         to 250 ms.
11335         (win32_wait): Check for remote interrupt request
11336         with check_remote_input_interrupt_request.
11337         (win32_request_interrupt): New function.
11338         (win32_target_op): Set request_interrupt to win32_request_interrupt.
11339
11340 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11341
11342         * win32-low.c (debug_registers_changed,
11343         debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11344         CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11345         CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11346         (thread_rec): Get context using the low target.
11347         (child_add_thread): Call thread_added on the low target,
11348         which does the same thing.
11349         (regptr): Delete.
11350         (do_initial_child_stuff): Remove debug registers references.
11351         Set context using the low target.  Resume threads after
11352         setting the contexts.
11353         (child_continue): Remove dead variable.  Remove debug
11354         registers references.
11355         (child_fetch_inferior_registers): Go through the low target.
11356         (do_child_store_inferior_registers): Remove.
11357         (child_store_inferior_registers): Go through the low target.
11358         (win32_resume): Remove debug registers references.
11359         Set context using the low target.
11360         (handle_exception): Change return type to void.  Don't record
11361         context here.  Set status to TARGET_WAITKIND_SPURIOUS on a
11362         first chance exception.
11363         (get_child_debug_event): Change return type to void.  Remove
11364         goto loop.  Always return after waiting for debug event.
11365         (win32_wait): Convert to switch statement.  Handle spurious
11366         events.
11367
11368         * win32-i386-low.c (debug_registers_changed,
11369         debug_registers_used): New.
11370         (initial_stuff): Rename to ...
11371         (i386_initial_stuff): ... this.  Clear debug registers
11372         state variables.
11373         (store_debug_registers): Delete.
11374         (i386_get_thread_context): New.
11375         (load_debug_registers): Delete.
11376         (i386_set_thread_context): New.
11377         (i386_thread_added): New.
11378         (single_step): Rename to ...
11379         (i386_single_step): ... this.
11380         (do_fetch_inferior_registers): Rename to ...
11381         (i386_fetch_inferior_register): ... this.
11382         (i386_store_inferior_register): New.
11383         (the_low_target): Adapt to new interface.
11384
11385         * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11386         (arm_get_thread_context): New.
11387         (arm_set_thread_context): New.
11388         (regptr): New.
11389         (do_fetch_inferior_registers): Rename to ...
11390         (arm_fetch_inferior_register): ... this.
11391         (arm_store_inferior_register): New.
11392         (arm_wince_breakpoint): Reimplement as unsigned long.
11393         (arm_wince_breakpoint_len): Define.
11394         (the_low_target): Adapt to new interface.
11395
11396         * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11397         load_debug_registers.  Add get_thread_context, set_thread_context,
11398         thread_added and store_inferior_register.  Rename
11399         fetch_inferior_registers to fetch_inferior_register.
11400         (regptr): Remove declaration.
11401
11402 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11403
11404         * linux-low.c (linux_detach): Change return type to int.  Return 0.
11405         * spu-low.c (spu_detach): Likewise.
11406
11407 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11408
11409         * target.h (target_ops): Change return type of detach to int.
11410         Add join.
11411         (join_inferior): New.
11412         * server.c (main): Don't skip detach support on mingw32.
11413         If the inferior doesn't support detaching return error.
11414         Call join_inferior instead of using waitpid.
11415         * linux-low.c (linux_join): New.
11416         (linux_target_op): Add linux_join.
11417         * spu-low.c (spu_join): New.
11418         (spu_target_ops): Add spu_join.
11419         * win32-low.c (win32_detach): Adapt to new interface.
11420         Reopen current_process_handle before detaching.  Issue a child
11421         resume before detaching.
11422         (win32_join): New.
11423         (win32_target_op): Add win32_join.
11424
11425 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11426
11427         * win32-low.c (win32-attach): Fix return value.
11428         * target.h (target_ops): Describe ATTACH return values.
11429
11430 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11431
11432         * win32-low.c (GETPROCADDRESS): Define.
11433         (winapi_DebugActiveProcessStop): Add WINAPI.  typedef as pointer.
11434         (winapi_DebugSetProcessKillOnExit): Likewise.
11435         (win32_create_inferior): Force usage of ansi CreateProcessA.
11436         (win32_attach): Use GETPROCADDRESS.
11437         (win32_detach): Likewise.
11438
11439 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
11440
11441         * win32-low.c (win32_wait): Don't use WSTOPSIG.
11442
11443 2007-03-30  Pedro Alves  <pedro_alves@portugalmail.pt>
11444
11445         * win32-low.c: Commit leftover changes from 2007-03-29.
11446
11447 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
11448
11449         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11450         fields short instead of int.  Add explicit padding.
11451         (i387_cache_to_fsave): Remove unnecessary casts.
11452         (i387_fsave_to_cache): Doc fix.
11453         (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11454
11455 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
11456
11457         * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11458         (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11459
11460 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
11461
11462         * configure.srv (arm*-*-mingw32ce*): Move near the other
11463         arm targets.
11464
11465 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
11466
11467         * configure.ac: Add errno checking.
11468         (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11469         sys/file.h and malloc.h.
11470         (AC_CHECK_DECLS): Add perror.
11471         (srv_mingwce): Handle.
11472         * configure.srv (i[34567]86-*-cygwin*): Add
11473         win32-i386-low.o to srv_tgtobj.
11474         (i[34567]86-*-mingw*): Likewise.
11475         (arm*-*-mingw32ce*): Add case.
11476         * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11477         HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11478         [__MINGW32CE__] (strerror): New function.
11479         [__MINGW32CE__] (errno): Define to GetLastError.
11480         [__MINGW32CE__] (COUNTOF): New macro.
11481         (remote_open): Remove extra close call.
11482         * mem-break.c (delete_breakpoint_at): New function.
11483         * mem-break.h (delete_breakpoint_at): Declare.
11484         * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11485         HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11486         [USE_WIN32API] (read, write): Add char* casts.
11487         * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11488         * server.h: Include wincecompat.h on Windows CE.
11489         [HAVE_ERRNO_H]: Check.
11490         (perror): Declare if not declared.
11491         * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11492         (perror_with_name): Remove errno declaration.
11493         * wincecompat.h: New.
11494         * wincecompat.c: New.
11495         * win32-low.h: New.
11496         * win32-arm-low.c: New.
11497         * win32-i386-low.c: New.
11498         (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11499         (OUTMSG2): Make it safe.
11500         (_T): New macro.
11501         (COUNTOF): New macro.
11502         (NUM_REGS): Get it from the low target.
11503         (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11504         CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11505         (thread_rec): Let low target handle debug registers.
11506         (child_add_thread): Likewise.
11507         (child_init_thread_list): Likewise.
11508         (continue_one_thread): Likewise.
11509         (regptr): New.
11510         (do_child_fetch_inferior_registers): Move to ...
11511         * win32-i386-low.c: ... here, and rename to ...
11512         (do_fetch_inferior_registers): ... this.
11513         * win32-low.c (child_fetch_inferior_registers):
11514         Go through the low target.
11515         (do_child_store_inferior_registers): Use regptr.
11516         (strwinerror): New function.
11517         (win32_create_inferior): Handle Windows CE.
11518         Use strwinerror instead of strerror on Windows error
11519         codes.  Add program to the error output.
11520         Don't close the main thread handle on Windows CE.
11521         (win32_attach): Use coredll.dll on Windows CE.
11522         (win32_kill): Close current process and current
11523         thread handles.
11524         (win32_detach): Use coredll.dll on Windows CE.
11525         (win32_resume): Let low target handle debug registers, and
11526         step request.
11527         (handle_exception): Add/Remove initial breakpoint.  Avoid
11528         non-existant WSTOPSIG on Windows CE.
11529         (win32_read_inferior_memory): Cast to remove warning.
11530         (win32_arch_string): Go through the low target.
11531         (initialize_low): Call set_breakpoint_data with the low
11532         target's breakpoint.
11533         * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11534         FOP_REGNUM, mappings): Move to ...
11535         * win32-i386-low.c: ... here.
11536         * win32-low.c (win32_thread_info): Move to ...
11537         * win32-low.h: ... here.
11538         * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11539         win32-arm-low.c and wincecompat.c.
11540         (all:): Add $EXEEXT.
11541         (install-only:): Likewise.
11542         (gdbserver:): Likewise.
11543         (gdbreplay:): Likewise.
11544         * config.in: Regenerate.
11545         * configure: Regenerate.
11546
11547 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
11548
11549         * win32-low.c: Rename typedef thread_info to
11550         win32_thread_info throughout.
11551
11552 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
11553
11554         * win32-i386-low.c: Rename to ...
11555         * win32-low.c: ... this.
11556         * configure.srv: Replace win32-i386-low.o with win32-low.o.
11557         * Makefile.in: Likewise.
11558
11559 2007-03-27  Pedro Alves  <pedro_alves@portugalmail.pt>
11560
11561         * remote-utils.c (monitor_output): Constify msg parameter.
11562         * server.h (monitor_output): Likewise.
11563         * win32-i386-low.c (handle_output_debug_string): New.
11564         (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11565         handle_output_debug_string.
11566         (get_child_debug_event): Likewise.
11567
11568 2007-03-27  Mat Hostetter  <mat@lcs.mit.edu>
11569
11570         * server.c (main): Correct strtoul check.
11571
11572 2007-03-27  Jon Ringle  <jon@ringle.org>
11573
11574         * linux-low.c: Check __ARCH_HAS_MMU__ also.
11575
11576 2007-03-27  Brooks Moses  <brooks.moses@codesourcery.com>
11577
11578         * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11579
11580 2007-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
11581
11582         * terminal.h: Check HAVE_SGTTY_H.
11583
11584 2007-02-27  Mat Hostetter  <mat@lcs.mit.edu>
11585
11586         * remote-utils.c (remote_open): Print out the assigned port number.
11587
11588 2007-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
11589
11590         * remote-utils.c (monitor_output): New function.
11591         * server.c (debug_threads): Define here.
11592         (monitor_show_help): New function.
11593         (handle_query): Handle qRcmd.
11594         (main): Do not handle 'd' packet.
11595         * server.h (debug_threads, remote_debug, monitor_output): Declare.
11596         * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11597         of debug_threads.
11598
11599 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
11600
11601         * Makefile.in (EXEEXT): New.
11602         (clean): Use $(EXEEXT).
11603
11604 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
11605
11606         * target.h (target_ops): Rename send_signal to request_interrupt,
11607         and remove enum target_signal parameter.
11608         * linux-low.c (linux_request_interrupt): Rename from
11609         linux_send_signal, and always send SIGINT.
11610         * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11611         and always send SIGINT.
11612         * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11613         of send_signal.
11614         (input_interrupt): Likewise.
11615
11616 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
11617
11618         * server.c (get_features_xml): Check if target implemented
11619         arch_string.
11620         * win32-i386-low.c (win32_arch_string): New.
11621         (win32_target_ops): Add win32_arch_string as arch_string member.
11622
11623 2007-02-22  Markus Deuling  <deuling@de.ibm.com>
11624
11625         * spu-low.c (spu_arch_string): New.
11626         (spu_target_ops): Add spu_arch_string.
11627
11628 2007-02-16  Daniel Jacobowitz  <dan@codesourcery.com>
11629
11630         * remote-utils.c: Remove HAVE_TERMINAL_H check.
11631         * configure.ac: Do not check for terminal.h.
11632         * configure, config.in: Regenerated.
11633
11634 2007-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
11635
11636         * Makefile.in (OBS): Add $(XML_BUILTIN).
11637         (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11638         (clean): Update.
11639         (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11640         (arm-with-iwmmxt.c): New.
11641         * config.in, configure: Regenerate.
11642         * configure.ac: Check for iWMMXt.  Handle srv_xmltarget,
11643         srv_xmlbuiltin, and srv_xmlfiles.  Define USE_XML.
11644         * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11645         (arm*-*-linux*): Add iWMMXt and regset support.
11646         * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11647         (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11648         (arm_store_wmmxregset, target_regsets): New.
11649         * server.c (get_features_xml): Take annex argument.  Check builtin
11650         XML documents.
11651         (handle_query): Handle multiple annexes.
11652
11653 2007-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
11654
11655         * remote-utils.c [USE_WIN32API] (read, write): Define.
11656         (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11657         write.
11658
11659 2007-01-09  Daniel Jacobowitz  <dan@codesourcery.com>
11660
11661         * linux-i386-low.c (the_low_target): Set arch_string.
11662         * linux-x86-64-low.c (the_low_target): Likewise.
11663         * linux-low.c (linux_arch_string): New.
11664         (linux_target_ops): Add it.
11665         * linux-low.h (struct linux_target_ops): Add arch_string.
11666         * server.c (write_qxfer_response): Use const void * for DATA.
11667         (get_features_xml): New.
11668         (handle_query): Handle qXfer:features:read.  Report it for qSupported.
11669         * target.h (struct target_ops): Add arch_string method.
11670
11671 2007-01-03  Denis Pilat  <denis.pilat@st.com>
11672             Daniel Jacobowitz  <dan@codesourcery.com>
11673
11674         * linux-low.c (linux_kill): Handle being called with no threads.
11675         * win32-i386-low.c (win32_kill): Likewise.
11676         (get_child_debug_event): Clear current_process_handle.
11677
11678 2006-12-30  Denis PILAT  <denis.pilat@st.com>
11679             Daniel Jacobowitz  <dan@codesourcery.com>
11680
11681         * remote-utils.c (remote_open): Check the type of specified
11682         serial port devices before opening them.
11683         * server.c (main): Kill the inferior if an error occurs during
11684         the first remote_open.
11685
11686 2006-12-05  Markus Deuling  <deuling@de.ibm.com>
11687
11688         * README: Update supported targets.
11689
11690 2006-11-28  Daniel Jacobowitz  <dan@codesourcery.com>
11691
11692         * Makefile.in (clean): Remove reg-mips64.c.
11693         (reg-mips64.c, reg-mips64.o): New rules.
11694         * configure.srv: Handle mips64.  Include regset support for mips.
11695         * linux-mips-low.c (union mips_register): New.
11696         (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11697         (mips_breakpoint, mips_breakpoint_at): Use int.
11698         (mips_collect_register, mips_supply_register)
11699         (mips_collect_register_32bit, mips_supply_register_32bit)
11700         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11701         (mips_store_fpregset, target_regsets): New.
11702         * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11703
11704 2006-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
11705
11706         * configure.srv: Add target "spu*-*-*".
11707         * Makefile.in (clean): Remove reg-spu.c.
11708         (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11709         * spu-low.c: New file.
11710
11711 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
11712
11713         * configure.ac: Correct td_thr_tls_get_addr test.
11714         * configure: Regenerated.
11715
11716 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
11717
11718         * linux-low.c (linux_wait_for_event): Reformat.  Use the
11719         pass_signals array.
11720         * remote-utils.c (decode_address_to_semicolon): New.
11721         * server.c (pass_signals, handle_general_set): New.
11722         (handle_query): Mention QPassSignals for qSupported.
11723         (main): Call handle_general_set.
11724         * server.h (pass_signals, decode_address_to_semicolon): New.
11725
11726 2006-11-06  Daniel Jacobowitz  <dan@codesourcery.com>
11727
11728         * server.c (handle_query): Correct error handling for read_auxv.
11729
11730 2005-10-19  Ulrich Weigand  <uweigand@de.ibm.com>
11731
11732         * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11733         and srv_linux_thread_db to yes.
11734         * linux-s390-low.c (s390_fill_gregset): New function.
11735         (target_regsets): Define data structure.
11736
11737 2006-10-17  Daniel Jacobowitz  <dan@codesourcery.com>
11738
11739         * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11740         * configure.ac: Use it.  Define HAVE_TD_THR_TLS_GET_ADDR.
11741         * config.in, configure: Regenerated.
11742         * inferiors.c (gdb_id_to_thread): New function.
11743         (gdb_id_to_thread_id): Use it.
11744         * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11745         * linux-low.h (struct process_info): Add th member.
11746         (thread_db_get_tls_address): New prototype.
11747         * remote-utils.c (decode_address): Make non-static.
11748         * server.c (handle_query): Handle qGetTLSAddr.
11749         * server.h (gdb_id_to_thread, decode_address): New prototypes.
11750         * target.h (struct target_ops): Add get_tls_address.
11751         * thread-db.c (maybe_attach_thread): Save the thread handle.
11752         (thread_db_get_tls_address): New.
11753
11754 2006-09-28  Daniel Jacobowitz  <dan@codesourcery.com>
11755
11756         * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11757         (linux_resume_one_process): Take a siginfo_t *.  Update all
11758         callers.  Queue it if necessary.  Use PTRACE_SETSIGINFO.
11759         (struct pending_signals): Add a siginfo_t.
11760         (linux_wait_for_process): Always set last_status.
11761         (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11762         (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11763         * linux-low.h (struct process_info): Add last_status.
11764
11765 2006-09-21  Daniel Jacobowitz  <dan@codesourcery.com>
11766
11767         * remote-utils.c (try_rle): New function.
11768         (putpkt_binary): Use it.
11769
11770 2006-08-19  Daniel Jacobowitz  <dan@codesourcery.com>
11771
11772         * Makefile.in (clean): Clean reg-x86-64-linux.c.
11773         (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11774         * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11775         * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11776         (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11777         point registers.
11778
11779 2006-08-08  Richard Sandiford  <richard@codesourcery.com>
11780
11781         * server.c (terminal_fd): New variable.
11782         (old_foreground_pgrp): Likewise.
11783         (restore_old_foreground_pgrp): New function.
11784         (start_inferior): Record the terminal file descriptor in terminal_fd
11785         and its original foreground group in old_foreground_pgrp.  Register
11786         restore_old_foreground_pgrp with atexit().
11787
11788 2006-07-26  Daniel Jacobowitz  <dan@codesourcery.com>
11789
11790         * server.c (handle_query): Correct qPart to qXfer.
11791
11792 2006-07-22  Daniel Jacobowitz  <dan@codesourcery.com>
11793
11794         * configure.ac: Check for more headers which are missing on
11795         Windows.  Automatically supply -lwsock32 and USE_WIN32API.
11796         * configure.srv: Add Cygwin and mingw32.
11797         * remote-utils.c: Don't include headers unconditionally which
11798         are missing on mingw32.  Include <winsock.h> for mingw32.
11799         (remote_open): Adjust for mingw32 support.  Flush
11800         standard error after writing to it.
11801         (remote_close, putpkt_binary, input_interrupt, block_async_io)
11802         (unblock_async_io, enable_async_io, disable_async_io)
11803         (readchar, getpkt): Update for Winsock support.
11804         (prepare_resume_reply): Expect a protocol signal number.
11805         * server.c: Disable <sys/wait.h> on mingw32.
11806         (start_inferior): Adjust for mingw32 support.  Flush
11807         standard error after writing to it.
11808         (attach_inferior): Likewise.  Use protocol signal
11809         numbers.
11810         (main): Skip 'D' packet on mingw32.  Use protocol signal numbers
11811         and names.
11812         * win32-i386-low.c: New file.
11813         * Makefile.in (XM_CLIBS): Set.
11814         (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11815         (win32-i386-low.o): New dependency rule.
11816         * linux-low.c (linux_wait): Use target signal numbers.
11817         * target.h (struct target_ops): Doc fix.
11818         * server.h (target_signal_to_name): New prototype.
11819         * gdbreplay.c: Don't include headers unconditionally which
11820         are missing on mingw32.  Include <winsock.h> for mingw32.
11821         (remote_close, remote_open): Adjust for Winsock support.
11822         * configure, config.in: Regenerated.
11823
11824 2006-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
11825
11826         * server.c (decode_xfer_read, write_qxfer_response): New.
11827         (handle_query): Take a packet length argument.  Handle
11828         qXfer:auxv:read instead of qPart:auxv:read.  Mention it in
11829         the qSupported response.
11830         (main): Update call to handle_query.
11831
11832 2006-06-22  Daniel Jacobowitz  <dan@codesourcery.com>
11833
11834         * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11835         (putpkt_binary): Renamed from putpkt and adjusted for binary
11836         data.
11837         (putpkt): New wrapper for putpkt_binary.
11838         (readchar): Don't mask off the high bit.
11839         (decode_X_packet): New function.
11840         * server.c (main): Call putpkt_binary if a handler sets the packet
11841         length.  Save the length of the incoming packet.  Handle 'X'.
11842         * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11843
11844 2006-06-21  Daniel Jacobowitz  <dan@codesourcery.com>
11845
11846         * server.c (handle_query): Handle qSupported.
11847
11848 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
11849
11850         * remote-utils.c (all_symbols_looked_up): New variable.
11851         (look_up_one_symbol): Check it.
11852         * server.h (look_up_one_symbol): New declaration.
11853         * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11854
11855 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
11856
11857         * Makefile.in (linux-arm-low.o): Update dependencies.
11858         * linux-arm-low.c: Include "gdb_proc_service.h".
11859         (PTRACE_GET_THREAD_AREA): Define.
11860         (ps_get_thread_area): New function.
11861
11862 2006-05-09  Nathan Sidwell  <nathan@codesourcery.com>
11863
11864         * configure.srv (m68k*-*-uclinux*): New target.
11865         * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11866         (linux_resume_one_process): Remove extraneous cast.
11867         (linux_read_offsets): New.
11868         (linux_target_op): Add linux_read_offsets on mmuless systems.
11869         * server.c (handle_query): Add qOffsets logic.
11870         * target.h (struct target_ops): Add read_offsets.
11871
11872 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
11873
11874         * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11875         (PTRACE_GET_THREAD_AREA): Define.
11876         (ps_get_thread_area): New function.
11877         * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11878         (linux-x86-64-low.o): Update.
11879
11880 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
11881
11882         * configure.ac: Remove checks for prfpregset_t.
11883         * gdb_proc_service.h: New file.
11884         * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11885         new "gdb_proc_service.h".
11886         * proc-service.c: Likewise.
11887         (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11888         (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11889         * Makefile.in (gdb_proc_service_h): Updated.
11890         * configure, config.in: Regenerated.
11891
11892 2006-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
11893
11894         * remote-utils.c (prepare_resume_reply): Move declaration
11895         of gdb_id_from_wait to the top of the block.
11896
11897 2006-02-15  Daniel Jacobowitz  <dan@codesourcery.com>
11898
11899         * linux-low.c (regsets_store_inferior_registers): Read the regset
11900         from the target before filling it.
11901
11902 2006-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
11903
11904         * server.c (attach_inferior): Return SIGTRAP for a successful
11905         attach.
11906
11907 2006-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
11908
11909         * Makefile.in (OBS): Add version.o.
11910         (STAGESTUFF): Delete.
11911         (version.o): Add dependencies.
11912         (version.c): Replace rule.
11913         (clean): Remove version.c.
11914         * server.c (gdbserver_version): New.
11915         (gdbserver_usage): Use printf.
11916         (main): Handle --version and --help.
11917         * server.h (version, host_name): Add declarations.
11918
11919 2005-12-23  Eli Zaretskii  <eliz@gnu.org>
11920
11921         * linux-arm-low.c:
11922         * linux-arm-low.c:
11923         * inferiors.c:
11924         * i387-fp.h:
11925         * i387-fp.c:
11926         * gdbreplay.c:
11927         * regcache.c:
11928         * proc-service.c:
11929         * mem-break.h:
11930         * mem-break.c:
11931         * linux-x86-64-low.c:
11932         * linux-sh-low.c:
11933         * linux-s390-low.c:
11934         * linux-ppc64-low.c:
11935         * linux-ppc-low.c:
11936         * linux-mips-low.c:
11937         * linux-m68k-low.c:
11938         * linux-m32r-low.c:
11939         * linux-low.h:
11940         * linux-low.c:
11941         * linux-ia64-low.c:
11942         * linux-i386-low.c:
11943         * linux-crisv32-low.c:
11944         * thread-db.c:
11945         * terminal.h:
11946         * target.h:
11947         * target.c:
11948         * server.h:
11949         * server.c:
11950         * remote-utils.c:
11951         * regcache.h:
11952         * utils.c:
11953         * Makefile.in:
11954         * configure.ac:
11955         * gdbserver.1: Add (C) after Copyright.  Update the FSF
11956         address.
11957
11958 2005-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
11959
11960         * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11961         (arm_breakpoint_at): Recognize both breakpoints.
11962         (the_low_target): Use the correct breakpoint instruction.
11963
11964 2005-11-02  Daniel Jacobowitz  <dan@codesourcery.com>
11965
11966         * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11967         * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11968         (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11969         (the_low_target): Update.
11970
11971 2005-10-25  Andreas Schwab  <schwab@suse.de>
11972
11973         * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11974
11975         * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11976         (ia64_num_regs): Reduce to 462.
11977
11978 2005-09-17  Daniel Jacobowitz  <dan@codesourcery.com>
11979
11980         * acinclude.m4: Correct quoting.
11981         * aclocal.m4: Regenerated.
11982
11983         Suggested by SZOKOVACS Robert <szo@ies.hu>:
11984         * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11985         (thread_db_init): Call thread_db_err_str.
11986         * configure.ac: Check for TD_VERSION.
11987         * config.in, configure: Regenerated.
11988
11989 2005-07-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
11990
11991         * server.h (error, fatal, warning): Add ATTR_FORMAT.
11992
11993 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
11994
11995         * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11996         is not available.  Define HAVE_PTRACE_GETREGS if it is.
11997         * config.in, configure: Regenerated.
11998         * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11999         * linux-i386-low.c, linux-m68k-low.c: Update to use
12000         HAVE_PTRACE_GETREGS.
12001         * linux-low.c (regsets_fetch_inferior_registers)
12002         (regsets_store_inferior_registers): Only return 0 if we processed
12003         GENERAL_REGS.
12004         * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
12005         * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
12006
12007 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
12008
12009         * inferiors.c (struct thread_info): Add gdb_id.
12010         (add_thread): Add gdb_id argument.
12011         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
12012         * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
12013         calls to add_thread.
12014         * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
12015         * server.c (handle_query): Use thread_to_gdb_id.
12016         (handle_v_cont, main): Use gdb_id_to_thread_id.
12017         * server.h (add_thread): Update prototype.
12018         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
12019         prototypes.
12020
12021 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
12022
12023         * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
12024         left-padded registers.
12025         * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
12026         * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
12027
12028 2005-07-01  Steve Ellcey  <sje@cup.hp.com>
12029
12030         * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
12031         * configure: Regenerate.
12032         * config.in: Regenerate.
12033         * server.h (NEED_DECLARATION_STRERROR):
12034         Replace with !HAVE_DECL_STRERROR.
12035
12036 2005-06-16  Daniel Jacobowitz  <dan@codesourcery.com>
12037
12038         * linux-low.c (linux_wait, linux_send_signal): Don't test
12039         an unsigned long variable for > 0 if it could be MAX_ULONG.
12040         * server.c (myresume): Likewise.
12041         * target.c (set_desired_inferior): Likewise.
12042
12043 2005-06-13  Mark Kettenis  <kettenis@gnu.org>
12044
12045         * configure.ac: Simplify and improve check for socklen_t.
12046         * configure, config.in: Regenerate.
12047
12048 2005-06-12  Daniel Jacobowitz  <dan@codesourcery.com>
12049
12050         * acconfig.h: Remove.
12051         * configure.ac: Add a test for socklen_t.  Use three-argument
12052         AC_DEFINE throughout.
12053         * config.in: Regenerated using autoheader 2.59.
12054         * configure: Regenerated.
12055
12056         * gdbreplay.c (socklen_t): Provide a default.
12057         (remote_open): Use socklen_t.
12058         * remote-utils.c (socklen_t): Provide a default.
12059         (remote_open): Use socklen_t.
12060         (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
12061         unsigned char.
12062
12063         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
12064         char for buffers.
12065         * linux-low.c (linux_read_memory, linux_write_memory)
12066         (linux_read_auxv): Likewise.
12067         * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
12068         (check_mem_write): Likewise.
12069         * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
12070         Likewise.
12071         * regcache.c (struct inferior_rgcache_data, registers_to_string)
12072         (registers_from_string, register_data): Likewise.
12073         * server.c (handle_query, main): Likewise.
12074         * server.h (convert_ascii_to_int, convert_int_to_ascii)
12075         (decode_M_packet): Likewise.
12076         * target.c (read_inferior_memory, write_inferior_memory): Likewise.
12077         * target.h (struct target_ops): Update read_memory, write_memory,
12078         and read_auxv.
12079         (read_inferior_memory, write_inferior_memory): Update.
12080         * linux-low.h (struct linux_target_ops): Change type of breakpoint
12081         to unsigned char *.
12082         * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
12083         linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
12084         linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
12085         linux-s390-low.c, linux-sh-low.c: Update for changes in
12086         read_inferior_memory and the_low_target->breakpoint.
12087
12088 2005-05-28  Daniel Jacobowitz  <dan@codesourcery.com>
12089
12090         * Makefile.in (SFILES): Add linux-ppc64-low.c.
12091         (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
12092         * configure.srv: Add powerpc64-*-linux*.
12093         * linux-ppc64-low.c: New file.
12094
12095 2005-05-23  Orjan Friberg  <orjanf@axis.com>
12096
12097         * linux-cris-low.c: New file with support for CRIS.
12098         * linux-crisv32-low.c: Ditto for CRISv32.
12099         * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
12100         (clean): Add reg-cris.c and reg-crisv32.c.
12101         Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
12102         reg-crisv32.o, and reg-crisv32.c to make rules.
12103         * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
12104         recognized targets.
12105
12106 2005-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
12107
12108         * linux-low.c (fetch_register): Ensure buffer size is a multiple
12109         of sizeof (PTRACE_XFER_TYPE).
12110         (usr_store_inferior_registers): Likewise.  Zero out excess bytes.
12111
12112 2005-05-12  Orjan Friberg  <orjanf@axis.com>
12113
12114         * target.h (struct target_ops): Add insert_watchpoint,
12115         remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
12116         pointers for hardware watchpoint support.
12117         * linux-low.h (struct linux_target_ops): Ditto.
12118         * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
12119         (linux_stopped_by_watchpoint, linux_stopped_data_address): New.  Add
12120         to linux_target_ops.
12121         * remote-utils.c (prepare_resume_reply): Add watchpoint information to
12122         reply packet.
12123         * server.c (main): Recognize 'Z' and 'z' packets.
12124
12125 2005-05-10  Ulrich Weigand  <uweigand@de.ibm.com>
12126
12127         * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12128         (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12129         (the_low_target): Add new members.
12130
12131 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
12132
12133         * proc-service.c (ps_lgetregs): Search all_processes instead of
12134         all_threads.
12135
12136 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
12137
12138         * server.c (start_inferior): Change return type to int.
12139         (attach_inferior): Change sigptr to int *.
12140         (handle_v_cont, handle_v_requests): Change signal to int *.
12141         (main): Change signal to int.
12142
12143 2005-04-15  Kei Sakamoto  <sakamoto.kei@renesas.com>
12144
12145         * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12146         * configure.srv: Add m32r*-*-linux*.
12147         * linux-m32r-low.c: New file.
12148
12149 2005-03-04  Daniel Jacobowitz  <dan@codesourcery.com>
12150
12151         * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12152
12153 2005-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
12154
12155         * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12156         Take unsigned long arguments for PIDs.
12157         * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12158         (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12159         (wait_for_sigstop, linux_resume_one_process)
12160         (regsets_fetch_inferior_registers, linux_send_signal)
12161         (linux_read_auxv): Likewise.  Update the types of variables holding
12162         PIDs.  Update format string specifiers.
12163         * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12164         * remote-utils.c (prepare_resume_reply): Likewise.
12165         * server.c (cont_thread, general_thread, step_thread)
12166         (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12167         unsigned long.
12168         (handle_query): Update format specifiers.
12169         (handle_v_cont, main): Use strtoul for thread IDs.
12170         * server.h (struct inferior_list_entry): Use unsigned long for ID.
12171         (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12172         (general_thread, step_thread, thread_from_wait)
12173         (old_thread_from_wait): Update.
12174         * target.h (struct thread_resume): Use unsigned long for THREAD.
12175         (struct target_ops): Use unsigned long for arguments to attach and
12176         thread_alive.
12177
12178 2005-02-24  Daniel Jacobowitz  <dan@codesourcery.com>
12179
12180         * acinclude.m4: Include bfd/bfd.m4 directly.
12181         * configure.ac: Use AC_ARG_PROGRAM.  Suggested by Aron Griffis
12182         <agriffis@toolchain.org>.
12183         * aclocal.m4, configure: Regenerated.
12184
12185 2005-01-07  Andrew Cagney  <cagney@gnu.org>
12186
12187         * configure.ac: Rename configure.in, require autoconf 2.59.
12188         * configure: Re-generate.
12189
12190 2004-12-08  Daniel Jacobowitz  <dan@debian.org>
12191
12192         * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area.  Reset
12193         LIBS when finished.
12194         * aclocal.m4: Regenerated.
12195         * configure: Regenerated.
12196
12197 2004-11-21  Andreas Schwab  <schwab@suse.de>
12198
12199         * linux-m68k-low.c (m68k_num_gregs): Define.
12200         (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12201         (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12202         (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12203         (m68k_breakpoint_at): New.  Add to the_low_target.
12204
12205         * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12206         srv_linux_thread_db to yes.
12207
12208 2004-10-20  Joel Brobecker  <brobecker@gnat.com>
12209
12210         * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12211         (ARCH_SET_FS): Likewise.
12212         (ARCH_GET_FS): Likewise.
12213         (ARCH_GET_GS): Likewise.
12214
12215 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
12216
12217         * linux-i386-low.c (ps_get_thread_area): New.
12218         * linux-x86-64-low.c (ps_get_thread_area): New.
12219         * linux-low.c: Include <sys/syscall.h>.
12220         (linux_kill_one_process): Don't kill the first thread here.
12221         (linux_kill): Kill the first thread here.
12222         (kill_lwp): New function.
12223         (send_sigstop, linux_send_signal): Use it.
12224         * proc-service.c: Clean up #ifdefs.
12225         (fpregset_info): Delete.
12226         (ps_lgetregs): Update and enable implementation.
12227         (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12228         implementations.
12229         * remote-utils.c (struct sym_cache, symbol_cache): New.
12230         (input_interrupt): Print a clearer message.
12231         (async_io_enabled): New variable.
12232         (enable_async_io, disable_async_io): Use it.  Update comments.
12233         (look_up_one_symbol): Use the symbol cache.
12234         * thread-db.c (thread_db_look_up_symbols): New function.
12235         (thread_db_init): Update comments.  Call thread_db_look_up_symbols.
12236
12237 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
12238
12239         * configure.in: Test for -rdynamic.
12240         * configure: Regenerated.
12241         * Makefile (INTERNAL_LDFLAGS): New.
12242         (gdbserver, gdbreplay): Use it.
12243
12244 2004-09-02  Andrew Cagney  <cagney@gnu.org>
12245
12246         * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12247
12248 2004-03-23  Daniel Jacobowitz  <drow@mvista.com>
12249
12250         * linux-low.c (linux_wait): Clear all_processes list also.
12251
12252 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
12253
12254         * linux-low.c: Include <errno.h>.  Remove extern declaration of
12255         errno.
12256
12257 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
12258
12259         * gdbreplay.c, server.h, utils.c: Update copyright years.
12260
12261 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
12262
12263         * server.c (main): Print child status or termination signal from
12264         variable 'signal', not 'sig'.
12265
12266 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
12267
12268         * linux-low.c (linux_read_memory): Change return type to
12269         int.  Check for and return error from ptrace().
12270         * target.c (read_inferior_memory): Change return type to int.  Pass
12271         back return status from the_target->read_memory().
12272         * target.h (struct target_ops): Adapt *read_memory() prototype.
12273         Update comment.
12274         (read_inferior_memory): Adapt prototype.
12275         * server.c (main): Return an error packet if
12276         read_inferior_memory() returns an error.
12277
12278 2004-03-04  Daniel Jacobowitz  <drow@mvista.com>
12279
12280         * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12281         Unify with other clean targets.
12282
12283 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12284
12285         * server.c (handle_v_cont): Call set_desired_inferior.
12286
12287 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12288
12289         * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12290
12291 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12292
12293         * linux-low.c (linux_wait): Unblock async I/O.
12294         (linux_resume): Block and enable async I/O.
12295         * remote-utils.c (block_async_io, unblock_async_io): New functions.
12296         * server.h (block_async_io, unblock_async_io): Add prototypes.
12297
12298 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12299
12300         * remote-utils.c (remote_open): Print a status notice after
12301         opening a TCP port.
12302         * server.c (attach_inferior): Print a status notice after
12303         attaching.
12304
12305 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
12306
12307         * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12308
12309 2004-02-26  Daniel Jacobowitz  <drow@mvista.com>
12310
12311         * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12312         error packet.
12313         * server.c, target.h: Update copyright years.
12314
12315 2004-02-25  Roland McGrath  <roland@redhat.com>
12316
12317         * target.h (struct target_ops): New member `read_auxv'.
12318         * server.c (handle_query): Handle qPart:auxv:read: query using that.
12319         * linux-low.c (linux_read_auxv): New function.
12320         (linux_target_ops): Initialize `read_auxv' member to that.
12321
12322 2004-02-17  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12323
12324         Committed by Jim Blandy  <jimb@redhat.com>.
12325
12326         * linux-s390-low.c (s390_num_regs): Update.
12327         (s390_regmap): Remove control registers.  Use __s390x__ predefine
12328         instead of GPR_SIZE to distiguish s390 and s390x targets.
12329
12330 2004-01-31  Daniel Jacobowitz  <drow@mvista.com>
12331
12332         * linux-low.c: Update copyright year.
12333         (check_removed_breakpoint): Clear pending_is_breakpoint.
12334         (linux_set_resume_request, linux_queue_one_thread)
12335         (resume_status_pending_p): New functions.
12336         (linux_continue_one_thread): Use process->resume.
12337         (linux_resume): Only resume threads if there are no pending events.
12338         * linux-low.h (struct process_info): Add resume request
12339         pointer.
12340
12341 2004-01-30  Daniel Jacobowitz  <drow@mvista.com>
12342
12343         * regcache.c (new_register_cache): Clear the allocated register
12344         buffer.  Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12345
12346 2003-10-13  Daniel Jacobowitz  <drow@mvista.com>
12347
12348         * linux-low.c (linux_resume): Take a struct thread_resume *
12349         argument.
12350         (linux_wait): Update call.
12351         (resume_ptr): New static variable.
12352         (linux_continue_one_thread): Renamed from
12353         linux_continue_one_process.  Use resume_ptr.
12354         (linux_resume): Use linux_continue_one_thread.
12355         * server.c (handle_v_cont, handle_v_requests): New functions.
12356         (myresume): New function.
12357         (main): Handle 'v' case.
12358         * target.h (struct thread_resume): New type.
12359         (struct target_ops): Change argument of "resume" to struct
12360         thread_resume *.
12361         (myresume): Delete macro.
12362
12363 2003-08-08  H.J. Lu  <hongjiu.lu@intel.com>
12364
12365         * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12366         (uninstall): Support DESTDIR.
12367
12368 Mon Jul 21 20:09:34 UTC 2003  Brendan Conoboy  <blc@redhat.com>
12369
12370         * configure.srv: Add xscale*linux copy of arm*linux entry.
12371
12372 2003-07-24  Daniel Jacobowitz  <drow@mvista.com>
12373
12374         * linux-arm-low.c (arm_reinsert_addr): New function.
12375         (the_low_target): Add arm_reinsert_addr.
12376
12377 2003-07-08  Mark Kettenis  <kettenis@gnu.org>
12378
12379         * mem-break.c: Remove whitespace at end of file.
12380
12381 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
12382
12383         * configure.in: Check whether we need to prototype strerror.
12384         * server.h: Optionally prototype strerror.
12385         * gdbreplay.c (perror_with_name): Use strerror.
12386         * linux-low.c (linux_attach_lwp): Use strerror.
12387         * utils.c (perror_with_name): Use strerror.
12388         * config.in, configure: Regenerated.
12389
12390 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
12391
12392         * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12393         SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12394
12395 2003-06-20  Daniel Jacobowitz  <drow@mvista.com>
12396
12397         * Makefile.in (SFILES): Update.
12398         * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12399         low-sun3.c: Remove files.
12400
12401 2003-06-17  Daniel Jacobowitz  <drow@mvista.com>
12402
12403         * linux-low.c: Move comment to linux_thread_alive where it belonged.
12404         (linux_detach_one_process, linux_detach): New functions.
12405         (linux_target_ops): Add linux_detach.
12406         * server.c (main): Handle 'D' packet.
12407         * target.h (struct target_ops): Add "detach" member.
12408         (detach_inferior): Define.
12409
12410 2003-06-13  Mark Kettenis  <kettenis@gnu.org>
12411
12412         From Kelley Cook  <kelleycook@wideopenwest.com>:
12413         * configure.srv: Accept i[34567]86 variants.
12414
12415 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
12416
12417         * linux-low.c (linux_wait_for_event): Correct comment typos.
12418         (linux_resume_one_process): Call check_removed_breakpoint.
12419         (linux_send_signal): New function.
12420         (linux_target_ops): Add linux_send_signal.
12421         * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12422         of kill.
12423         * target.h (struct target_ops): Add send_signal.
12424
12425 2003-05-29  Jim Blandy  <jimb@redhat.com>
12426
12427         * linux-low.c (usr_store_inferior_registers): Transfer buf in
12428         PTRACE_XFER_TYPE-sized chunks, not int-sized chunks.  Otherwise,
12429         if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12430         away part of the register's value.
12431
12432 2003-03-26  Daniel Jacobowitz  <drow@mvista.com>
12433
12434         * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12435         (linux_wait_for_event, linux_init_signals): Likewise.
12436
12437 2003-03-17  Daniel Jacobowitz  <drow@mvista.com>
12438
12439         * configure.in: Check for stdlib.h.
12440         * configure: Regenerated.
12441         * config.in: Regenerated.
12442
12443 2003-01-04  Andreas Schwab  <schwab@suse.de>
12444
12445         * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12446
12447 2003-01-02  Andrew Cagney  <ac131313@redhat.com>
12448
12449         * Makefile.in: Remove obsolete code.
12450
12451 2002-11-20  Daniel Jacobowitz  <drow@mvista.com>
12452
12453         * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12454         defined(PT_FPR0_HI).
12455
12456 2002-11-17  Stuart Hughes  <seh@zee2.com>
12457
12458         * linux-arm-low.c (arm_num_regs): Increase.
12459         (arm_regmap): Include status register.
12460
12461 2002-11-17  Daniel Jacobowitz  <drow@mvista.com>
12462
12463         * linux-low.c (register_addr): Remove incorrect -1 check.
12464
12465 2002-08-29  Daniel Jacobowitz  <drow@mvista.com>
12466
12467         * linux-low.c (linux_create_inferior): Call setpgid.  Return
12468         the new PID.
12469         (unstopped_p, linux_signal_pid): Remove.
12470         (linux_target_ops): Remove linux_signal_pid.
12471         * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12472         global instead of target method.
12473         * target.h (struct target_ops): Remove signal_pid.  Update comment
12474         for create_inferior.
12475         * server.c (signal_pid): New variable.
12476         (create_inferior): Set signal_pid.  Block SIGTTOU and SIGTTIN in
12477         gdbserver.  Set the child to be the foreground process group.
12478         (attach_inferior): Set signal_pid.
12479
12480 2002-08-23  Daniel Jacobowitz  <drow@mvista.com>
12481
12482         * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12483
12484 2002-08-20  Jim Blandy  <jimb@redhat.com>
12485
12486         * Makefile.in (LDFLAGS): Allow the configure script to establish a
12487         default for this.
12488
12489 2002-08-01  Andrew Cagney  <cagney@redhat.com>
12490
12491         * Makefile.in: Make chill references obsolete.
12492
12493 2002-07-24  Kevin Buettner  <kevinb@redhat.com>
12494
12495         * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12496         * configure: Regenerate.
12497         * config.in: Regenerate.
12498
12499 2002-07-09  David O'Brien  <obrien@FreeBSD.org>
12500
12501         * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12502         (perror_with_name, remote_close, remote_open, expect, play): Static.
12503
12504 2002-07-04  Michal Ludvig  <mludvig@suse.cz>
12505
12506         * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12507         byte offsets instead of an array of indexes.
12508         (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12509
12510 2002-06-13  Daniel Jacobowitz  <drow@mvista.com>
12511
12512         * regcache.c: Add comment.
12513
12514 2002-06-11  Daniel Jacobowitz  <drow@mvista.com>
12515
12516         * thread-db.c: New file.
12517         * proc-service.c: New file.
12518         * acinclude.m4: New file.
12519         * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12520         proc-service.o, and thread-db.o.
12521         (linux-low.o): Add USE_THREAD_DB.
12522         * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12523         HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12524         * aclocal.m4: Regenerated.
12525         * config.in: Regenerated.
12526         * configure: Regenerated.
12527         * configure.in: Check for proc_service.h, sys/procfs.h,
12528         thread_db.h, and linux/elf.h headrs.
12529         Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12530         PRFPREGSET_T_BROKEN.  Introduce srv_thread_depfiles and USE_THREAD_DB.
12531         Check for -lthread_db and thread support.
12532         * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12533         PowerPC, and SuperH.
12534         * i387-fp.c: Constify arguments.
12535         * i387-fp.h: Likewise.
12536         * inferiors.c: (struct thread_info): Renamed from
12537         `struct inferior_info'.  Remove PID member.  Use generic inferior
12538         list header.  All uses updated.
12539         (inferiors, signal_pid): Removed.
12540         (all_threads): New variable.
12541         (get_thread): Define.
12542         (add_inferior_to_list): New function.
12543         (for_each_inferior): New function.
12544         (change_inferior_id): New function.
12545         (add_inferior): Removed.
12546         (remove_inferior): New function.
12547         (add_thread): New function.
12548         (free_one_thread): New function.
12549         (remove_thread): New function.
12550         (clear_inferiors): Use for_each_inferior and free_one_thread.
12551         (find_inferior): New function.
12552         (find_inferior_id): New function.
12553         (inferior_target_data): Update argument type.
12554         (set_inferior_target_data): Likewise.
12555         (inferior_regcache_data): Likewise.
12556         (set_inferior_regcache_data): Likewise.
12557         * linux-low.c (linux_bp_reinsert): Remove.
12558         (all_processes, stopping_threads, using_thrads)
12559         (struct pending_signals, debug_threads, pid_of): New.
12560         (inferior_pid): Replace with macro.
12561         (struct inferior_linux_data): Remove.
12562         (get_stop_pc, add_process): New functions.
12563         (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12564         Use add_process and add_thread.
12565         (linux_attach_lwp): New function, based on old linux_attach.  Use
12566         add_process and add_thread.  Set stop_expected for new threads.
12567         (linux_attach): New function.
12568         (linux_kill_one_process): New function.
12569         (linux_kill): Kill all LWPs.
12570         (linux_thread_alive): Use find_inferior_id.
12571         (check_removed_breakpoints, status_pending_p): New functions.
12572         (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12573         Update.  Use WNOHANG.  Wait for cloned processes also.  Update process
12574         struct for the found process.
12575         (linux_wait_for_event): New function.
12576         (linux_wait): Use it.  Support LWPs.
12577         (send_sigstop, wait_for_sigstop, stop_all_processes)
12578         (linux_resume_one_process, linux_continue_one_process): New functions.
12579         (linux_resume): Support LWPs.
12580         (REGISTER_RAW_SIZE): Remove.
12581         (fetch_register): Use register_size instead.  Call supply_register.
12582         (usr_store_inferior_registers): Likewise.  Call collect_register.
12583         Fix recursive case.
12584         (regsets_fetch_inferior_registers): Improve error message.
12585         (regsets_store_inferior_registers): Add debugging.
12586         (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12587         (unstopped_p, linux_signal_pid): New functions.
12588         (linux_target_ops): Add linux_signal_pid.
12589         (linux_init_signals): New function.
12590         (initialize_low): Call it.  Initialize using_threads.
12591         * regcache.c (inferior_regcache_data): Add valid
12592         flag.
12593         (get_regcache): Fetch registers lazily.  Add fetch argument
12594         and update all callers.
12595         (regcache_invalidate_one, regcache_invalidate): New
12596         functions.
12597         (new_register_cache): Renamed from create_register_cache.
12598         Return the new regcache.
12599         (free_register_cache): Change argument to a void *.
12600         (registers_to_string, registers_from_string): Call get_regcache
12601         with fetch flag set.
12602         (register_data): Make static.  Pass fetch flag to get_regcache.
12603         (supply_register): Call get_regcache with fetch flag clear.
12604         (collect_register): Call get_regcache with fetch flag set.
12605         (collect_register_as_string): New function.
12606         * regcache.h: Update.
12607         * remote-utils.c (putpkt): Flush after debug output and use
12608         stderr.
12609         Handle input interrupts while waiting for an ACK.
12610         (input_interrupt): Use signal_pid method.
12611         (getpkt): Flush after debug output and use stderr.
12612         (outreg): Use collect_register_as_string.
12613         (new_thread_notify, dead_thread_notify): New functions.
12614         (prepare_resume_reply): Check using_threads.  Set thread_from_wait
12615         and general_thread.
12616         (look_up_one_symbol): Flush after debug output.
12617         * server.c (step_thread, server_waiting): New variables.
12618         (start_inferior): Don't use signal_pid.  Update call to mywait.
12619         (attach_inferior): Update call to mywait.
12620         (handle_query): Handle qfThreadInfo and qsThreadInfo.
12621         (main): Don't fetch/store registers explicitly.  Use
12622         set_desired_inferior.  Support proposed ``Hs'' packet.  Update
12623         calls to mywait.
12624         * server.h: Update.
12625         (struct inferior_list, struct_inferior_list_entry): New.
12626         * target.c (set_desired_inferior): New.
12627         (write_inferior_memory): Constify.
12628         (mywait): New function.
12629         * target.h: Update.
12630         (struct target_ops): New signal_pid method.
12631         (mywait): Removed macro, added prototype.
12632
12633         * linux-low.h (regset_func): Removed.
12634         (regset_fill_func, regset_store_func): New.
12635         (enum regset_type): New.
12636         (struct regset_info): Add type field.  Use new operation types.
12637         (struct linux_target_ops): stop_pc renamed to get_pc.
12638         Add decr_pc_after_break and breakpoint_at.
12639         (get_process, get_thread_proess, get_process_thread)
12640         (strut process_info, all_processes, linux_attach_lwp)
12641         (thread_db_init): New.
12642
12643         * linux-arm-low.c (arm_get_pc, arm_set_pc,
12644         arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12645         (the_low_target): Add new members.
12646         * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12647         (i386_store_fpxregset): Constify.
12648         (target_regsets): Add new kind identifier.
12649         (i386_get_pc): Renamed from i386_stop_pc.  Simplify.
12650         (i386_set_pc): Add debugging.
12651         (i386_breakpoint_at): New function.
12652         (the_low_target): Add new members.
12653         * linux-mips-low.c (mips_get_pc, mips_set_pc)
12654         (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12655         (mips_breakpoint_at): New.
12656         (the_low_target): Add new members.
12657         * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12658         (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12659         (the_low_target): Add new members.
12660         * linux-sh-low.c (sh_get_pc, sh_set_pc)
12661         (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12662         (the_low_target): Add new members.
12663         * linux-x86-64-low.c (target_regsets): Add new kind
12664         identifier.
12665
12666 2002-05-15  Daniel Jacobowitz  <drow@mvista.com>
12667
12668         From Martin Pool <mbp@samba.org>:
12669         * server.c (gdbserver_usage): New function.
12670         (main): Call it.
12671
12672 2002-05-14  Daniel Jacobowitz  <drow@mvista.com>
12673
12674         * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12675         stop_at -> stop_pc.
12676
12677 2002-05-04  Andrew Cagney  <ac131313@redhat.com>
12678
12679         * Makefile.in: Remove obsolete code.
12680
12681 2002-04-24  Michal Ludvig  <mludvig@suse.cz>
12682
12683         * linux-low.c (regsets_fetch_inferior_registers),
12684         (regsets_store_inferior_registers): Removed cast to int from
12685         ptrace() calls.
12686         * regcache.h: Added declaration of struct inferior_info.
12687
12688 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
12689
12690         * inferiors.c (struct inferior_info): Add regcache_data.
12691         (add_inferior): Call create_register_cache.
12692         (clear_inferiors): Call free_register_cache.
12693         (inferior_regcache_data, set_inferior_regcache_data): New functions.
12694         * regcache.c (struct inferior_regcache_data): New.
12695         (registers): Remove.
12696         (get_regcache): New function.
12697         (create_register_cache, free_register_cache): New functions.
12698         (set_register_cache): Don't initialize the register cache here.
12699         (registers_to_string, registers_from_string, register_data): Call
12700         get_regcache.
12701         * regcache.h: Add prototypes.
12702         * server.h: Likewise.
12703
12704 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
12705
12706         * mem-break.c: New file.
12707         * mem-break.h: New file.
12708         * Makefile.in: Add mem-break.o rule; update server.h
12709         dependencies.
12710         * inferiors.c (struct inferior_info): Add target_data
12711         member.
12712         (clear_inferiors): Free target_data member if set.
12713         (inferior_target_data, set_inferior_target_data): New functions.
12714         * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12715         (i386_stop_pc, i386_set_pc): New.  Add to the_low_target.
12716         * linux-low.c (linux_bp_reinsert): New variable.
12717         (struct inferior_linux_data): New.
12718         (linux_create_inferior): Use set_inferior_target_data.
12719         (linux_attach): Likewise.  Call add_inferior.
12720         (linux_wait_for_one_inferior): New function.
12721         (linux_wait): Call it.
12722         (linux_write_memory): Add const.
12723         (initialize_low): Call set_breakpoint_data.
12724         * linux-low.h (struct linux_target_ops): Add breakpoint
12725         handling members.
12726         * server.c (attach_inferior): Remove extra add_inferior
12727         call.
12728         * server.h: Include mem-break.h.  Update inferior.c
12729         prototypes.
12730         * target.c (read_inferior_memory)
12731         (write_inferior_memory): New functions.
12732         * target.h (read_inferior_memory)
12733         (write_inferior_memory): Change macros to prototypes.
12734         (struct target_ops): Update comments.  Add const to write_memory
12735         definition.
12736
12737 2002-04-11  Daniel Jacobowitz  <drow@mvista.com>
12738
12739         * linux-low.c (usr_store_inferior_registers): Support
12740         registers which are allowed to fail to store.
12741         * linux-low.h (linux_target_ops): Likewise.
12742         * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12743         (ppc_cannot_store_register): FPSCR may not be storable.
12744
12745 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
12746
12747         * server.h: Include <string.h> if HAVE_STRING_H.
12748         * ChangeLog: Correct paths in last ChangeLog entry.
12749
12750 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
12751
12752         * linux-low.h: Remove obsolete prototypes.
12753         (struct linux_target_ops): New.
12754         (extern the_low_target): New.
12755         * linux-low.c (num_regs, regmap): Remove declarations.
12756         (register_addr): Use the_low_target explicitly.
12757         (fetch_register): Likewise.
12758         (usr_fetch_inferior_registers): Likewise.
12759         (usr_store_inferior_registers): Likewise.
12760         * linux-arm-low.c (num_regs): Remove.
12761         (arm_num_regs): Define.
12762         (arm_regmap): Renamed from regmap, made static.
12763         (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12764         made static.
12765         (arm_cannot_store_register): Renamed from cannot_store_register,
12766         made static.
12767         (the_low_target): New.
12768         * linux-i386-low.c (num_regs): Remove.
12769         (i386_num_regs): Define.
12770         (i386_regmap): Renamed from regmap, made static.
12771         (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12772         made static.
12773         (i386_cannot_store_register): Renamed from cannot_store_register,
12774         made static.
12775         (the_low_target): New.
12776         * linux-ia64-low.c (num_regs): Remove.
12777         (ia64_num_regs): Define.
12778         (ia64_regmap): Renamed from regmap, made static.
12779         (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12780         made static.
12781         (ia64_cannot_store_register): Renamed from cannot_store_register,
12782         made static.
12783         (the_low_target): New.
12784         * linux-m68k-low.c (num_regs): Remove.
12785         (m68k_num_regs): Define.
12786         (m68k_regmap): Renamed from regmap, made static.
12787         (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12788         made static.
12789         (m68k_cannot_store_register): Renamed from cannot_store_register,
12790         made static.
12791         (the_low_target): New.
12792         * linux-mips-low.c (num_regs): Remove.
12793         (mips_num_regs): Define.
12794         (mips_regmap): Renamed from regmap, made static.
12795         (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12796         made static.
12797         (mips_cannot_store_register): Renamed from cannot_store_register,
12798         made static.
12799         (the_low_target): New.
12800         * linux-ppc-low.c (num_regs): Remove.
12801         (ppc_num_regs): Define.
12802         (ppc_regmap): Renamed from regmap, made static.
12803         (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12804         made static.
12805         (ppc_cannot_store_register): Renamed from cannot_store_register,
12806         made static.
12807         (the_low_target): New.
12808         * linux-s390-low.c (num_regs): Remove.
12809         (s390_num_regs): Define.
12810         (s390_regmap): Renamed from regmap, made static.
12811         (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12812         made static.
12813         (s390_cannot_store_register): Renamed from cannot_store_register,
12814         made static.
12815         (the_low_target): New.
12816         * linux-sh-low.c (num_regs): Remove.
12817         (sh_num_regs): Define.
12818         (sh_regmap): Renamed from regmap, made static.
12819         (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12820         made static.
12821         (sh_cannot_store_register): Renamed from cannot_store_register,
12822         made static.
12823         (the_low_target): New.
12824         * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12825         (the_low_target): New.
12826
12827 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
12828
12829         * Makefile.in: Add stamp-h target.
12830         * configure.in: Create stamp-h.
12831         * configure: Regenerated.
12832
12833 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
12834
12835         * inferiors.c: New file.
12836         * target.c: New file.
12837         * target.h: New file.
12838         * Makefile.in:  Add target.o and inferiors.o.  Update
12839         dependencies.
12840         * linux-low.c (inferior_pid): New static variable,
12841         moved from server.c.
12842         (linux_create_inferior): Renamed from create_inferior.
12843         Call add_inferior.  Return 0 on success instead of a PID.
12844         (linux_attach): Renamed from myattach.
12845         (linux_kill): Renamed from kill_inferior.  Call clear_inferiors ().
12846         (linux_thread_alive): Renamed from mythread_alive.
12847         (linux_wait): Renamed from mywait.  Call clear_inferiors () if the
12848         child dies.
12849         (linux_resume): Renamed from myresume.  Add missing ``return 0''.
12850         (regsets_store_inferior_registers): Correct error message.
12851         Add missing ``return 0''.
12852         (linux_fetch_registers): Renamed from fetch_inferior_registers.
12853         (linux_store_registers): Renamed from store_inferior_registers.
12854         (linux_read_memory): Renamed from read_inferior_memory.
12855         (linux_write_memory): Renamed from write_inferior_memory.
12856         (linux_target_ops): New structure.
12857         (initialize_low): Call set_target_ops ().
12858         * remote-utils.c (unhexify): New function.
12859         (hexify): New function.
12860         (input_interrupt): Send signals to ``signal_pid''.
12861         * server.c (inferior_pid): Remove.
12862         (start_inferior): Update create_inferior call.
12863         (attach_inferior): Call add_inferior.
12864         (handle_query): New function.
12865         (main): Call handle_query for `q' packets.
12866         * server.h: Include "target.h".  Remove obsolete prototypes.
12867         Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12868
12869 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
12870
12871         * Makefile.in: Add WARN_CFLAGS.  Update configury
12872         dependencies.
12873         * configure.in: Check for <string.h>
12874         * configure: Regenerate.
12875         * config.in: Regenerate.
12876         * gdbreplay.c: Include needed system headers.
12877         (remote_open): Remove strchr prototype.
12878         * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12879         * regcache.c (supply_register): Change buf argument to const void *.
12880         (supply_register_by_name): Likewise.
12881         (collect_register): Change buf argument to void *.
12882         (collect_register_by_name): Likewise.
12883         * regcache.h: Add missing prototypes.
12884         * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12885         * server.c (handle_query): New function.
12886         (attached): New static variable, moved out of main.
12887         (main): Quiet longjmp clobber warnings.
12888         * server.h: Add ATTR_NORETURN and ATTR_FORMAT.  Update prototypes.
12889         * utils.c (error): Remove NORETURN.
12890         (fatal): Likewise.