Create gdb_termios.h (and cleanup gdb/{,gdbserver/}terminal.h)
[external/binutils.git] / gdb / gdbserver / ChangeLog
1 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2
3         * remote-utils.c: Include "gdb_termios.h" instead of
4         "terminal.h".
5         * terminal.h: Delete file.
6
7 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
8
9         * server.c: Include <vector>.
10         <program_argv, wrapper_argv>: Convert to std::vector.
11         (start_inferior): Rewrite function to use C++.
12         (handle_v_run): Likewise.  Update code that calculates the argv
13         based on the vRun packet; use C++.
14         (captured_main): Likewise.
15
16 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
17
18         * server.c (handle_v_cont): Initialize thread_resume::thread
19         with null_ptid.
20
21 2017-04-05  Pedro Alves  <palves@redhat.com>
22
23         * configure: Regenerate.
24
25 2017-04-05  Pedro Alves  <palves@redhat.com>
26
27         * gdbreplay.c (sync_error): Constify.
28         * linux-x86-low.c (push_opcode): Constify.
29
30 2017-04-05  Pedro Alves  <palves@redhat.com>
31
32         * win32-low.c (get_child_debug_event)
33         <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
34         Report TARGET_WAITKIND_SPURIOUS instead.
35
36 2017-04-05  Pedro Alves  <palves@redhat.com>
37
38         * remote-utils.c (remote_prepare, remote_open): Constify.
39         * remote-utils.h (remote_prepare, remote_open): Constify.
40         * server.c (captured_main): Constify 'port' handling.
41
42 2017-04-04  Simon Marchi  <simon.marchi@ericsson.com>
43
44         * Makefile.in (clean): Clear .deps.
45
46 2017-03-31  Simon Marchi  <simon.marchi@polymtl.ca>
47
48         * .gitignore: Remove generated files, replace with wildcard.
49         * (clean): Replace removal of generated files with wildcard.
50         (version.c): Replace with...
51         (version-generated.c): ...this.
52         (xml-builtin.c): Replace with...
53         (xml-builtin-generated.c): ...this.
54         (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
55         (%.c: *regformats*): Replace with...
56         (%-generated.c: *regformats*): ...this.
57
58 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
59
60         * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
61         (xtensa_fill_gregset): Call collect_register_by_name for
62         threadptr register.
63         (xtensa_store_gregset): Call supply_register_by_name for
64         threadptr register.
65
66 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
67
68         * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
69         for all registers in a0_regnum..a0_regnum + C0_NREGS range.
70         (xtensa_store_gregset): Call supply_register for all registers in
71         a0_regnum..a0_regnum + C0_NREGS range.
72
73 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
74
75         * Makefile.in (%-ipa.o: %-ipa.c): New rule.
76         (ax-ipa.o: ax.c): Remove.
77         (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
78         (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
79         (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
80         (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
81         (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
82
83 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
84
85         * Makefile.in (%-ipa.o: ../common/%.c): New rule.
86         (print-utils-ipa.o: ../common/print-utils.c): Remove.
87         (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
88         (errors-ipa.o: ../common/errors.c): Remove.
89         (format-ipa.o: ../common/format.c): Remove.
90         (common-utils-ipa.o: ../common/common-utils.c): Remove.
91
92 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
93
94         * Makefile.in (%-ipa.o: %.c): New rule.
95         (tracepoint-ipa.o: tracepoint.c): Remove.
96         (utils-ipa.o: utils.c): Remove.
97         (remote-utils-ipa.o: remote-utils.c): Remove.
98         (regcache-ipa.o: regcache.c): Remove.
99         (i386-linux-ipa.o: i386-linux.c): Remove.
100         (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
101         (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
102         (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
103         (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
104         (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
105         (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
106         (amd64-linux-ipa.o: amd64-linux.c): Remove.
107         (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
108         (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
109         (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
110         (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
111         (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
112         (aarch64-ipa.o: aarch64.c): Remove.
113         (s390-linux32-ipa.o: s390-linux32.c): Remove.
114         (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
115         (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
116         (s390-linux64-ipa.o: s390-linux64.c): Remove.
117         (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
118         (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
119         (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
120         (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
121         (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
122         (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
123         (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
124         (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
125         (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
126         (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
127         (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
128         (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
129         (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
130         (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
131         (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
132         (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
133         (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
134         (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
135         (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
136         (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
137         (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
138         (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
139         (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
140         (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
141         (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
142         (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
143         (tdesc-ipa.o: tdesc.c): Remove.
144         (x32-linux-ipa.o: x32-linux.c): Remove.
145         (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
146         (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
147
148 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
149
150         * Makefile.in (%.o: ../arch/%.c): New rule.
151         (arm.o: ../arch/arm.c): Remove.
152         (arm-linux.o: ../arch/arm-linux.c): Remove.
153         (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
154         (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
155
156 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
157
158         * Makefile.in (%.o: ../nat/%.c): New rule.
159         (x86-dregs.o: ../nat/x86-dregs.c): Remove.
160         (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
161         (linux-btrace.o: ../nat/linux-btrace.c): Remove.
162         (linux-osdata.o: ../nat/linux-osdata.c): Remove.
163         (linux-procfs.o: ../nat/linux-procfs.c): Remove.
164         (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
165         (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
166         (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
167         (ppc-linux.o: ../nat/ppc-linux.c): Remove.
168         (linux-personality.o: ../nat/linux-personality.c): Remove.
169         (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
170         (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
171         (x86-linux.o: ../nat/x86-linux.c): Remove.
172         (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
173         (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
174
175 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
176
177         * Makefile.in (%.o: ../common/%.c): New rule.
178         (signals.o: ../common/signals.c): Remove.
179         (print-utils.o: ../common/print-utils.c): Remove.
180         (rsp-low.o: ../common/rsp-low.c): Remove.
181         (common-utils.o: ../common/common-utils.c): Remove.
182         (posix-strerror.o: ../common/posix-strerror.c): Remove.
183         (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
184         (vec.o: ../common/vec.c): Remove.
185         (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
186         (xml-utils.o: ../common/xml-utils.c): Remove.
187         (ptid.o: ../common/ptid.c): Remove.
188         (buffer.o: ../common/buffer.c): Remove.
189         (format.o: ../common/format.c): Remove.
190         (filestuff.o: ../common/filestuff.c): Remove.
191         (agent.o: ../common/agent.c): Remove.
192         (errors.o: ../common/errors.c): Remove.
193         (environ.o: ../common/environ.c): Remove.
194         (common-debug.o: ../common/common-debug.c): Remove.
195         (cleanups.o: ../common/cleanups.c): Remove.
196         (common-exceptions.o: ../common/common-exceptions.c): Remove.
197         (fileio.o: ../common/fileio.c): Remove.
198         (common-regcache.o: ../common/common-regcache.c): Remove.
199         (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
200         (new-op.o: ../common/new-op.c): Remove.
201         (btrace-common.o: ../common/btrace-common.c): Remove.
202
203 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
204
205         * Makefile.in (%.o: ../target/%.c): New rule.
206         (waitstatus.o: ../target/waitstatus.c): Remove.
207
208 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
209
210         * Makefile.in
211         (%.c: ../regformats/%.dat,
212         (%.c: ../regformats/arm/%.dat,
213         (%.c: ../regformats/i386/%.dat,
214         (%.c: ../regformats/rs6000/%.dat): New rules.
215         (aarch64.c): Remove.
216         (reg-arm.c): Remove.
217         (arm-with-iwmmxt.c): Remove.
218         (arm-with-vfpv2.c): Remove.
219         (arm-with-vfpv3.c): Remove.
220         (arm-with-neon.c): Remove.
221         (reg-bfin.c): Remove.
222         (reg-cris.c): Remove.
223         (reg-crisv32.c): Remove.
224         (i386.c): Remove.
225         (i386-linux.c): Remove.
226         (i386-avx.c): Remove.
227         (i386-avx-linux.c): Remove.
228         (i386-avx-avx512.c): Remove.
229         (i386-avx-avx512-linux.c): Remove.
230         (i386-mpx.c): Remove.
231         (i386-mpx-linux.c): Remove.
232         (i386-avx-mpx-avx512-pku.c): Remove.
233         (i386-avx-mpx-avx512-pku-linux.c): Remove.
234         (i386-avx-mpx.c): Remove.
235         (i386-avx-mpx-linux.c): Remove.
236         (i386-mmx.c): Remove.
237         (i386-mmx-linux.c): Remove.
238         (reg-ia64.c): Remove.
239         (reg-m32r.c): Remove.
240         (reg-m68k.c): Remove.
241         (reg-cf.c): Remove.
242         (mips-linux.c): Remove.
243         (mips-dsp-linux.c): Remove.
244         (mips64-linux.c): Remove.
245         (mips64-dsp-linux.c): Remove.
246         (nios2-linux.c): Remove.
247         (powerpc-32.c): Remove.
248         (powerpc-32l.c): Remove.
249         (powerpc-altivec32l.c): Remove.
250         (powerpc-cell32l.c): Remove.
251         (powerpc-vsx32l.c): Remove.
252         (powerpc-isa205-32l.c): Remove.
253         (powerpc-isa205-altivec32l.c): Remove.
254         (powerpc-isa205-vsx32l.c): Remove.
255         (powerpc-e500l.c): Remove.
256         (powerpc-64l.c): Remove.
257         (powerpc-altivec64l.c): Remove.
258         (powerpc-cell64l.c): Remove.
259         (powerpc-vsx64l.c): Remove.
260         (powerpc-isa205-64l.c): Remove.
261         (powerpc-isa205-altivec64l.c): Remove.
262         (powerpc-isa205-vsx64l.c): Remove.
263         (s390-linux32.c): Remove.
264         (s390-linux32v1.c): Remove.
265         (s390-linux32v2.c): Remove.
266         (s390-linux64.c): Remove.
267         (s390-linux64v1.c): Remove.
268         (s390-linux64v2.c): Remove.
269         (s390-te-linux64.c): Remove.
270         (s390-vx-linux64.c): Remove.
271         (s390-tevx-linux64.c): Remove.
272         (s390x-linux64.c): Remove.
273         (s390x-linux64v1.c): Remove.
274         (s390x-linux64v2.c): Remove.
275         (s390x-te-linux64.c): Remove.
276         (s390x-vx-linux64.c): Remove.
277         (s390x-tevx-linux64.c): Remove.
278         (tic6x-c64xp-linux.c): Remove.
279         (tic6x-c64x-linux.c): Remove.
280         (tic6x-c62x-linux.c): Remove.
281         (reg-sh.c): Remove.
282         (reg-sparc64.c): Remove.
283         (reg-spu.c): Remove.
284         (amd64.c): Remove.
285         (amd64-linux.c): Remove.
286         (amd64-avx.c): Remove.
287         (amd64-avx-linux.c): Remove.
288         (amd64-avx-avx512.c): Remove.
289         (amd64-avx-avx512-linux.c): Remove.
290         (amd64-mpx.c): Remove.
291         (amd64-mpx-linux.c): Remove.
292         (amd64-avx-mpx-avx512-pku.c): Remove.
293         (amd64-avx-mpx-avx512-pku-linux.c): Remove.
294         (amd64-avx-mpx.c): Remove.
295         (amd64-avx-mpx-linux.c): Remove.
296         (x32.c): Remove.
297         (x32-linux.c): Remove.
298         (x32-avx.c): Remove.
299         (x32-avx-linux.c): Remove.
300         (x32-avx-avx512.c): Remove.
301         (x32-avx-avx512-linux.c): Remove.
302         (reg-xtensa.c): Remove.
303         (reg-tilegx.c): Remove.
304         (reg-tilegx32.c): Remove.
305
306 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
307
308         * Makefile.in (SFILES): Add "common/environ.c".
309         (OBJS): Add "common/environ.h".
310
311 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
312
313         * configure.ac: Check if the fs_base and gs_base members of
314         `struct user_regs_struct' exist.
315         * config.in: Regenerated.
316         * configure: Likewise.
317
318 2017-01-09  Antoine Tremblay  <antoine.tremblay@ericsson.com>
319
320         * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
321         target_read_memory.
322         * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
323         (get_next_pcs_syscall_next_pc): Likewise.
324
325 2016-12-23  Luis Machado  <lgustavo@codesourcery.com>
326
327         * win32-i386-low.c: Fix incorrect reference to a couple source files.
328         * nto-x86-low.c: Likewise.
329
330 2016-11-30  Simon Marchi  <simon.marchi@polymtl.ca>
331
332         * Makefile.in: Include disable-implicit-rules.mk.
333
334 2016-11-23  Pedro Alves  <palves@redhat.com>
335
336         * debug.c: Include <chrono> instead of "gdb_sys_time.h".
337         (debug_vprintf): Use std::chrono::steady_clock instead of
338         gettimeofday.  Use '.' instead of ':'.
339         * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
340         (get_timestamp): Use std::chrono::steady_clock instead of
341         gettimeofday.
342
343 2016-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
344
345         * Makefile.in: Fix whitespace formatting.
346
347 2016-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
348
349         * Makefile.in (SFILES, OBS): Flatten list and order
350         alphabetically.
351
352 2016-11-23  Pedro Alves  <palves@redhat.com>
353
354         * event-loop.c (handle_file_event): Use warning.
355         * linux-low.c (linux_resume_one_lwp_throw): Use warning.
356         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
357         Use warning.
358
359 2016-11-23  Pedro Alves  <palves@redhat.com>
360
361         * linux-low.c (check_zombie_leaders): Use debug_printf for debug
362         output.
363         * notif.c (handle_notif_ack, notif_event_enque): Likewise.
364         * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
365         debug_printf and debug_flush for debug output.
366         * server.c (handle_general_set): Likewise.
367         * thread-db.c (try_thread_db_load): Use debug_printf for debug
368         output.
369
370 2016-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
371
372         * Makefile.in (.c.o): Replace rule with ...
373         (%.o: %.c): ... this one.
374
375 2016-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
376
377         * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
378         prefixed with @GMAKE_FALSE@.  Update comment related to non-GNU
379         make.
380         * configure.ac: Remove checks for the make program.
381         * configure: Re-generate.
382
383 2016-10-28  Pedro Alves  <palves@redhat.com>
384
385         * Makefile.in (CXX_DIALECT): Get from configure.
386         (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
387         * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
388         * configure.ac: Call AX_CXX_COMPILE_STDCXX.
389         * config.in: Regenerate.
390         * configure: Regenerate.
391
392 2016-10-27  Yao Qi  <yao.qi@linaro.org>
393
394         * linux-low.c (linux_supports_range_stepping): Return true if
395         can_software_single_step return true.
396
397 2016-10-27  Yao Qi  <yao.qi@linaro.org>
398
399         * inferiors.c (find_inferior_in_random): New function.
400         * inferiors.h (find_inferior_in_random): Declare.
401         * linux-low.c (linux_wait_for_event_filtered): Call
402         find_inferior_in_random instead of find_inferior.
403
404 2016-10-27  Yao Qi  <yao.qi@linaro.org>
405
406         * linux-low.c (linux_wait_1): If single-step breakpoints are
407         inserted, remove them.
408
409 2016-10-26  Pedro Alves  <palves@redhat.com>
410
411         * linux-low.c (handle_extended_wait): Link parent/child fork
412         threads.
413         (linux_wait_1): Unlink them.
414         (linux_set_resume_request): Ignore resume requests for
415         already-resumed and unhandled fork child threads.
416         * linux-low.h (struct lwp_info) <fork_relative>: New field.
417         * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
418         New functions.
419         (handle_v_requests) <vCont>: Don't call require_running.
420         * server.h (in_queued_stop_replies): New declaration.
421
422 2016-10-24  Yao Qi  <yao.qi@linaro.org>
423
424         PR server/20733
425         * linux-aarch64-low.c (append_insns): Cast the return value to
426         'uint32_t *'.
427
428 2016-10-10  Yao Qi  <yao.qi@linaro.org>
429
430         * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
431
432 2016-10-06  Sergio Durigan Junior  <sergiodj@redhat.com>
433
434         * target.c (target_supports_multi_process): New function, moved
435         from...
436         * target.h (target_supports_multi_process): ... here.  Remove
437         macro.
438
439 2016-10-05  Tom Tromey  <tom@tromey.com>
440
441         PR remote/20655:
442         * tracepoint.c (handle_tracepoint_bkpts): Check
443         ipa_error_tracepoint, not ipa_stopping_tracepoint.
444
445 2016-10-05  Yao Qi  <yao.qi@linaro.org>
446
447         * configure.srv: Update the path of arm-*.xml files.
448
449 2016-10-05  Terry Guo  <terry.guo@arm.com>
450             Yao Qi  <yao.qi@linaro.org>
451
452         * Makefile.in: Adjust the path of rules.
453         * configure.srv: Update the path of xml files.
454         * regformats/arm-with-iwmmxt.dat: Regenerated.
455         * regformats/arm-with-neon.dat: Likewise.
456         * regformats/arm-with-vfpv2.dat: Likewise.
457         * regformats/arm-with-vfpv3.dat Likewise.
458
459 2016-09-30  Yao Qi  <yao.qi@linaro.org>
460
461         PR gdbserver/20627
462         * target.c (target_stop_and_wait): Don't call
463         target_continue_no_signal, use resume_stop instead.
464
465 2016-09-26  Yao Qi  <yao.qi@linaro.org>
466
467         * linux-low.c (linux_wait_1): Call debug_exit.
468
469 2016-09-23  Pedro Alves  <palves@redhat.com>
470
471         * Makefile.in (SFILES): Add common/new-op.c.
472         (OBS): Add common/new-op.o.
473         (new-op.o): New rule.
474
475 2016-09-21  Simon Marchi  <simon.marchi@ericsson.com>
476
477         * .gitinore: Ignore more files.
478
479 2016-09-21  Yao Qi  <yao.qi@linaro.org>
480
481         * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
482         23.
483
484 2016-09-19  Sergio Durigan Junior  <sergiodj@redhat.com>
485
486         * server.c (start_inferior): Call target_mourn_inferior instead of
487         mourn_inferior; pass ptid_t argument to it.
488         (resume): Likewise.
489         (handle_target_event): Likewise.
490         * target.c (target_mourn_inferior): New function.
491         * target.h (mourn_inferior): Delete macro.
492
493 2016-09-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
494
495         * linux-low.c (lwp_is_stepping): New function.
496
497 2016-09-06  Carl Love  <cel@us.ibm.com>
498
499         * server.c (start_inferior):  Fixed comment, requested comment change
500         didn't get updated correctly.  Removed reference to ptrace () call as
501         it is only true on Linux systems.
502
503 2016-09-06  Carl Love  <cel@us.ibm.com>
504
505         * server.c (start_inferior):  Do not call
506         function target_post_create_inferior () if the
507         inferior process has already exited.
508
509 2016-09-05  Pedro Alves  <palves@redhat.com>
510
511         * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
512         (COMPILE.pre, CC_LD): Use CXX directly.
513         (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
514         * acinclude.m4: Don't include build-with-cxx.m4.
515         * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
516         * configure: Regenerate.
517
518 2016-09-02  Akash Trehan  <akash.trehan123@gmail.com>
519
520         PR gdb/19495
521         * remote-utils.c (relocate_instruction): Remove redundant strcpy()
522         call writing data to own_buf.
523
524 2016-09-01  Sergio Durigan Junior  <sergiodj@redhat.com>
525
526         * target.c (mywait): Call target_wait instead of
527         the_target->wait.
528         (target_wait): New function.
529
530 2016-09-01  Sergio Durigan Junior  <sergiodj@redhat.com>
531
532         * server.c (start_inferior): New variable 'ptid'.  Replace calls
533         to the_target->resume by target_continue{,_no_signal}, depending
534         on the case.
535         * target.c (target_stop_and_wait): Call target_continue_no_signal
536         instead of the_target->resume.
537         (target_continue): New function.
538
539 2016-08-31  Antoine Tremblay  <antoine.tremblay@ericsson.com>
540
541         * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
542
543 2016-08-25  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
544
545         PR server/20491
546         * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
547         ps_prochandle.
548         * linux-aarch64-low.c (ps_get_thread_area): Likewise.
549         * linux-arm-low.c (ps_get_thread_area): Likewise.
550         * linux-crisv32-low.c (ps_get_thread_area): Likewise.
551         * linux-m68k-low.c (ps_get_thread_area): Likewise.
552         * linux-mips-low.c (ps_get_thread_area): Likewise.
553         * linux-nios2-low.c (ps_get_thread_area): Likewise.
554         * linux-tic6x-low.c (ps_get_thread_area): Likewise.
555         * linux-x86-low.c (ps_get_thread_area): Likewise.
556         * linux-xtensa-low.c (ps_get_thread_area): Likewise.
557
558 2016-08-19  Pedro Alves  <palves@redhat.com>
559
560         * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
561
562 2016-08-19  Pedro Alves  <palves@redhat.com>
563
564         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
565         comment.  Use memcpy instead of casting through unsigned long.
566
567 2016-08-19  Pedro Alves  <palves@redhat.com>
568
569         * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
570         allocating around 0x80000000.
571
572 2016-08-19  Pedro Alves  <palves@redhat.com>
573
574         PR gdb/20415
575         * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
576         (x32-avx512-linux-ipa.o): New rules.
577         * configure.ac (x86_64-*-linux*): New x32 check.
578         * configure.srv (ipa_x32_linux_regobj): New.
579         (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
580         * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
581         descriptions.
582         (initialize_low_tracepoint) [__ILP32__]: Initialize x32
583         descriptions.
584         * configure: Regenerate.
585
586 2016-08-09  Pedro Alves  <palves@redhat.com>
587
588         PR gdb/18653
589         * Makefile.in (OBS): Add signals-state-save-restore.o.
590         (signals-state-save-restore.o): New rule.
591         * config.in: Regenerate.
592         * configure: Regenerate.
593         * linux-low.c: Include "signals-state-save-restore.h".
594         (linux_create_inferior): Call
595         restore_original_signals_state.
596         * server.c: Include "dispositions-save-restore.h".
597         (captured_main): Call save_original_signals_state.
598
599 2016-08-05  Pedro Alves  <palves@redhat.com>
600
601         * configure: Regenerate.
602
603 2016-08-04  Yao Qi  <yao.qi@linaro.org>
604
605         * linux-low.c (regsets_fetch_inferior_registers): Check
606         errno is ESRCH or not.
607
608 2016-08-02  Yao Qi  <yao.qi@linaro.org>
609
610         * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
611         <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
612         (thread_db_load_search): Update.
613         (try_thread_db_load_1): Don't look for td_ta_event_addr,
614         td_ta_set_event and td_ta_event_getmsg.
615
616 2016-07-26  Pedro Alves  <palves@redhat.com>
617
618         PR server/20414
619         * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
620         of unsigned long for 64-bit registers and use uint32_t instead of
621         unsigned int for 32-bit registers.
622
623 2016-07-26  Pedro Alves  <palves@redhat.com>
624
625         * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
626         to 'ptrace'.
627
628 2016-07-21  Tom Tromey  <tom@tromey.com>
629
630         * configure: Rebuild.
631
632 2016-07-21  Yao Qi  <yao.qi@linaro.org>
633
634         * mem-break.c (find_gdb_breakpoint): Cast bp to
635         'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
636
637 2016-07-21  Yao Qi  <yao.qi@linaro.org>
638
639         * server.c (handle_v_requests): Support s and S actions
640         if target_supports_software_single_step return true.
641
642 2016-07-21  Yao Qi  <yao.qi@linaro.org>
643
644         * linux-low.c (resume_stopped_resumed_lwps): If resume request
645         is resume_step, call maybe_hw_step.
646         (linux_wait_1): Stop all threads, remove reinsert breakpoints,
647         and unstop them.
648         (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
649         breakpoints or not.
650         (proceed_one_lwp): If resume request is resume_step, install
651         reinsert breakpoints and call maybe_hw_step.
652
653 2016-07-21  Yao Qi  <yao.qi@linaro.org>
654
655         * linux-low.c (proceed_one_lwp): Declare.
656         (linux_resume_one_thread): Remove local variable 'step'.
657         Lift code enqueue signal.  Call proceed_one_lwp instead of
658         linux_resume_one_lwp.
659
660 2016-07-21  Yao Qi  <yao.qi@linaro.org>
661
662         * linux-low.c (linux_resume_one_thread): Call
663         enqueue_pending_signal.
664
665 2016-07-21  Yao Qi  <yao.qi@linaro.org>
666
667         * gdbthread.h (make_cleanup_restore_current_thread): Declare.
668         * inferiors.c (do_restore_current_thread_cleanup): New function.
669         (make_cleanup_restore_current_thread): Likewise.
670         * linux-low.c (install_software_single_step_breakpoints): Call
671         make_cleanup_restore_current_thread.  Switch current_thread to
672         thread.
673
674 2016-07-21  Yao Qi  <yao.qi@linaro.org>
675
676         * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
677         (set_reinsert_breakpoint): New parameter ptid.  Callers updated.
678         (clone_one_breakpoint): Likewise.
679         (delete_reinsert_breakpoints): Change parameter to thread.
680         Callers updated.
681         (has_reinsert_breakpoints): Likewise.
682         (uninsert_reinsert_breakpoints): Likewise.
683         (reinsert_reinsert_breakpoints): Likewise.
684         * mem-break.h (set_reinsert_breakpoint): Update declaration.
685         (delete_reinsert_breakpoints): Likewise.
686         (reinsert_reinsert_breakpoints): Likewise.
687         (uninsert_reinsert_breakpoints): Likewise.
688         (has_reinsert_breakpoints): Likewise.
689
690 2016-07-21  Yao Qi  <yao.qi@linaro.org>
691
692         * inferiors.c (get_thread_process): Make parameter const.
693         * inferiors.h (get_thread_process): Update declaration.
694         * mem-break.c (clone_all_breakpoints): Remove all parameters.
695         Add new parameters child_thread and parent_thread.  Callers
696         updated.
697         * mem-break.h (clone_all_breakpoints): Update declaration.
698
699 2016-07-21  Yao Qi  <yao.qi@linaro.org>
700
701         * mem-break.c (struct breakpoint) <cond_list>: Remove.
702         <command_list, handler>: Remove.
703         (struct gdb_breakpoint): New.
704         (struct other_breakpoint): New.
705         (struct reinsert_breakpoint): New.
706         (is_gdb_breakpoint): New function.
707         (any_persistent_commands): Update command_list if
708         is_gdb_breakpoint returns true.
709         (set_breakpoint): Create breakpoints according to their types.
710         (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
711         (set_gdb_breakpoint_1): Likewise.
712         (set_gdb_breakpoint): Likewise.
713         (clear_breakpoint_conditions): Change parameter type to
714         'struct gdb_breakpoint *'.
715         (clear_breakpoint_commands): Likewise.
716         (clear_breakpoint_conditions_and_commands): Likewise.
717         (add_condition_to_breakpoint): Likewise.
718         (add_breakpoint_condition): Likewise.
719         (add_commands_to_breakpoint): Likewise.
720         (check_breakpoints): Check other_breakpoint.
721         (clone_one_breakpoint): Clone breakpopint according to its type.
722         * mem-break.h (struct gdb_breakpoint): Declare.
723         (set_gdb_breakpoint): Update declaration.
724         (clear_breakpoint_conditions_and_commands): Likewise.
725         (add_breakpoint_condition): Likewise.
726         (add_breakpoint_commands): Likewise.
727         * server.c (process_point_options): Change parameter type to
728         'struct gdb_breakpoint *'.
729
730 2016-07-21  Yao Qi  <yao.qi@linaro.org>
731
732         * mem-break.c (set_breakpoint_at): Rename it to ...
733         (set_breakpoint_type_at): ... it.
734         (set_breakpoint_at): Call set_breakpoint_type_at.
735         (set_reinsert_breakpoint): Call set_breakpoint_type_at.
736         * mem-break.h (set_breakpoint_at): Update comments.
737
738 2016-07-12  Chung-Lin Tang  <cltang@codesourcery.com>
739
740         * linux-nios2-low.c (nios2_fill_gregset): Add type cast
741         to buf parameter.
742         (nios2_store_gregset): Likewise.
743
744 2016-07-01  Pedro Alves  <palves@redhat.com>
745             Antoine Tremblay  <antoine.tremblay@ericsson.com>
746
747         * linux-low.c: Change interface to take the target lwp_info
748         pointer directly and return void.  Handle detaching from a zombie
749         thread.
750         (linux_detach_lwp_callback): New function.
751         (linux_detach): Detach from the leader thread after detaching from
752         the clone threads.
753
754 2016-06-28  Yao Qi  <yao.qi@linaro.org>
755
756         * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
757         for variable new_offset.
758         (aarch64_ftrace_insn_reloc_b_cond): Likewise.
759         (aarch64_ftrace_insn_reloc_cb): Likewise.
760         (aarch64_ftrace_insn_reloc_tb): Likewise.
761         (aarch64_install_fast_tracepoint_jump_pad): Likewise.  Use
762         PRIx64 instead of PRIx32.
763
764 2016-06-28  Yao Qi  <yao.qi@linaro.org>
765
766         * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
767         (the_low_target): Install arm_get_syscall_trapinfo.
768
769 2016-06-28  Yao Qi  <yao.qi@linaro.org>
770
771         * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
772         function.
773         (the_low_target): Install aarch64_get_syscall_trapinfo.
774
775 2016-06-28  Yao Qi  <yao.qi@linaro.org>
776
777         * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
778         Callers updated.
779         * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
780         Remove parameter sysno.
781         * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
782         sysret.
783
784 2016-06-21  Andreas Arnez  <arnez@linux.vnet.ibm.com>
785
786         * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
787         (s390_emit_ne_goto): Likewise.
788         (s390_emit_lt_goto): Likewise.
789         (s390_emit_le_goto): Likewise.
790         (s390_emit_gt_goto): Likewise.
791         (s390_emit_ge_goto): Likewise.
792         (s390x_emit_eq_goto): Likewise.
793         (s390x_emit_ne_goto): Likewise.
794         (s390x_emit_lt_goto): Likewise.
795         (s390x_emit_le_goto): Likewise.
796         (s390x_emit_gt_goto): Likewise.
797         (s390x_emit_ge_goto): Likewise.
798         (s390_emit_ops_impl): Mark variable static.
799         (s390x_emit_ops): Likewise.
800
801 2016-06-17  Yao Qi  <yao.qi@linaro.org>
802
803         * linux-low.c (handle_extended_wait): Call
804         uninsert_reinsert_breakpoints for the parent process.  Remove
805         reinsert breakpoints from the child process.  Reinsert them to
806         the parent process when vfork is done.
807         * mem-break.c (uninsert_reinsert_breakpoints): New function.
808         (reinsert_reinsert_breakpoints): New function.
809         * mem-break.h (uninsert_reinsert_breakpoints): Declare
810         (reinsert_reinsert_breakpoints): Declare.
811
812 2016-06-17  Yao Qi  <yao.qi@linaro.org>
813
814         * linux-low.c (handle_extended_wait): If the parent is doing
815         step-over, remove the reinsert breakpoints from the forked child.
816
817 2016-06-17  Yao Qi  <yao.qi@linaro.org>
818
819         * linux-low.c (unsuspend_all_lwps): Declare.
820         (linux_low_filter_event): If thread exited, call finish_step_over.
821         If step-over is finished, unsuspend other threads.
822
823 2016-06-17  Yao Qi  <yao.qi@linaro.org>
824
825         * linux-low.c (linux_resume_one_lwp_throw): Assert
826         has_reinsert_breakpoints returns false.
827         * mem-break.c (delete_disabled_breakpoints): Assert
828         bp type isn't reinsert_breakpoint.
829
830 2016-06-17  Yao Qi  <yao.qi@linaro.org>
831
832         * linux-low.c (maybe_hw_step): New function.
833         (linux_resume_one_lwp_throw): Call maybe_hw_step.
834         (finish_step_over): Switch current_thread to lwp temporarily,
835         and assert has_reinsert_breakpoints returns true.
836         (proceed_one_lwp): Call maybe_hw_step.
837         * mem-break.c (has_reinsert_breakpoints): New function.
838         * mem-break.h (has_reinsert_breakpoints): Declare.
839
840 2016-06-02  Jon Turney  <jon.turney@dronecode.org.uk>
841
842         * win32-low.c (win32_create_inferior): Add pointer casts for C++.
843
844 2016-05-17  Yao Qi  <yao.qi@linaro.org>
845
846         * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
847         instead of find_inferior.
848
849 2016-05-05  Yao Qi  <yao.qi@linaro.org>
850
851         * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
852         Initialize res to zero.
853
854 2016-05-05  Yao Qi  <yao.qi@linaro.org>
855
856         * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
857         to uint32_t.
858
859 2016-05-04  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
860
861         * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
862         used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
863         (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
864
865 2016-04-28  Par Olsson  <par.olsson@windriver.com>
866             Simon Marchi  <simon.marchi@ericsson.com>
867
868         * tracepoint.c (write_inferior_int8): New function.
869         (cmd_qtenable_disable): Write enable flag using
870         write_inferior_int8.
871
872 2016-04-25  Yao Qi  <yao.qi@linaro.org>
873
874         * linux-low.c (lwp_signal_can_be_delivered): Adjust.
875         (need_step_over_p): Return zero if the LWP has pending signals
876         can be delivered on software single step target.
877
878 2016-04-25  Yao Qi  <yao.qi@linaro.org>
879
880         * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
881         return instead of error.
882
883 2016-04-22  Yao Qi  <yao.qi@linaro.org>
884
885         * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
886         to 23.
887
888 2016-04-22  Yao Qi  <yao.qi@linaro.org>
889
890         * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
891         signal when stepping over breakpoint with software single
892         step.
893
894 2016-04-21  Pedro Alves  <palves@redhat.com>
895
896         * linux-s390-low.c (s390_collect_ptrace_register)
897         (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
898         add casts.
899         (s390_check_regset): Use void * instead of gdb_byte *.
900
901 2016-04-20  Pedro Alves  <palves@redhat.com>
902
903         * configure: Renegerate.
904
905 2016-04-20  Yao Qi  <yao.qi@linaro.org>
906
907         * linux-aarch32-low.c: Include "arch/arm-linux.h".
908         (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
909         number 16.
910         (arm_store_gregset): Likewise.
911
912 2016-04-16  Walfred Tedeschi  <walfred.tedeschi@intel.com>
913
914         * Makefile.in (clean): Add removal for i386-avx-mpx.c,
915         i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
916         (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
917         (amd64-avx-mpx-linux.c): New rules.
918         (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
919         * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
920         (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
921         (srv_amd64_regobj): Add amd64-avx-mpx.o.
922         (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
923         (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
924         (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
925         (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
926         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
927         (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
928         (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
929         * linux-x86-low.c (x86_linux_read_description): Add case for
930         X86_XSTATE_AVX_MPX_MASK.
931         (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
932         (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
933         init_registers_i386_avx_mpx_linux.
934         * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
935         (initialize_low_tracepoint): Call
936         init_registers_i386_avx_mpx_linux.
937         * linux-amd64-ipa.c (get_ipa_tdesc):  Add case for avx_mpx.
938         (initialize_low_tracepoint): Call
939         init_registers_amd64_avx_mpx_linux.
940         * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
941         (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
942         (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
943         declarations.
944
945 2016-04-18  Pedro Alves  <palves@redhat.com>
946
947         * configure: Regenerate.
948
949 2016-04-13  Antoine Tremblay  <antoine.tremblay@ericsson.com>
950
951         * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
952         (aarch64_emit_sub): Likewise.
953
954 2016-04-12  Pedro Alves  <palves@redhat.com>
955
956         * utils.c (prepare_to_throw_exception): Delete.
957
958 2016-04-05  Simon Marchi  <simon.marchi@ericsson.com>
959
960         * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
961
962 2016-04-05  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
963
964         * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
965
966 2016-04-03  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
967
968         * linux-aarch64-ipa.c: Add <elf.h> include.
969         * linux-ppc-ipa.c: Add <elf.h> include.
970         * linux-s390-ipa.c: Add <elf.h> include.
971
972 2016-03-31  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
973
974         * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
975         (get_raw_reg_ptr): Likewise.
976         (get_trace_state_variable_value_ptr): Likewise.
977         (set_trace_state_variable_value_ptr): Likewise.
978         (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
979         char *.
980
981 2016-03-31  Wei-cheng Wang  <cole945@gmail.com>
982             Marcin KoÅ›cielnicki  <koriakin@0x04.net>
983
984         PR/17221
985         * linux-ppc-low.c (emit_insns): New function.
986         (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
987         (ppc_emit_prologue): New function.
988         (ppc_emit_epilogue): New function.
989         (ppc_emit_add): New function.
990         (ppc_emit_sub): New function.
991         (ppc_emit_mul): New function.
992         (ppc_emit_lsh): New function.
993         (ppc_emit_rsh_signed): New function.
994         (ppc_emit_rsh_unsigned): New function.
995         (ppc_emit_ext): New function.
996         (ppc_emit_zero_ext): New function.
997         (ppc_emit_log_not): New function.
998         (ppc_emit_bit_and): New function.
999         (ppc_emit_bit_or): New function.
1000         (ppc_emit_bit_xor): New function.
1001         (ppc_emit_bit_not): New function.
1002         (ppc_emit_equal): New function.
1003         (ppc_emit_less_signed): New function.
1004         (ppc_emit_less_unsigned): New function.
1005         (ppc_emit_ref): New function.
1006         (ppc_emit_const): New function.
1007         (ppc_emit_reg): New function.
1008         (ppc_emit_pop): New function.
1009         (ppc_emit_stack_flush): New function.
1010         (ppc_emit_swap): New function.
1011         (ppc_emit_stack_adjust): New function.
1012         (ppc_emit_call): New function.
1013         (ppc_emit_int_call_1): New function.
1014         (ppc_emit_void_call_2): New function.
1015         (ppc_emit_if_goto): New function.
1016         (ppc_emit_goto): New function.
1017         (ppc_emit_eq_goto): New function.
1018         (ppc_emit_ne_goto): New function.
1019         (ppc_emit_lt_goto): New function.
1020         (ppc_emit_le_goto): New function.
1021         (ppc_emit_gt_goto): New function.
1022         (ppc_emit_ge_goto): New function.
1023         (ppc_write_goto_address): New function.
1024         (ppc_emit_ops_impl): New static variable.
1025         (ppc64v1_emit_prologue): New function.
1026         (ppc64v2_emit_prologue): New function.
1027         (ppc64_emit_epilogue): New function.
1028         (ppc64_emit_add): New function.
1029         (ppc64_emit_sub): New function.
1030         (ppc64_emit_mul): New function.
1031         (ppc64_emit_lsh): New function.
1032         (ppc64_emit_rsh_signed): New function.
1033         (ppc64_emit_rsh_unsigned): New function.
1034         (ppc64_emit_ext): New function.
1035         (ppc64_emit_zero_ext): New function.
1036         (ppc64_emit_log_not): New function.
1037         (ppc64_emit_bit_and): New function.
1038         (ppc64_emit_bit_or): New function.
1039         (ppc64_emit_bit_xor): New function.
1040         (ppc64_emit_bit_not): New function.
1041         (ppc64_emit_equal): New function.
1042         (ppc64_emit_less_signed): New function.
1043         (ppc64_emit_less_unsigned): New function.
1044         (ppc64_emit_ref): New function.
1045         (ppc64_emit_const): New function.
1046         (ppc64v1_emit_reg): New function.
1047         (ppc64v2_emit_reg): New function.
1048         (ppc64_emit_pop): New function.
1049         (ppc64_emit_stack_flush): New function.
1050         (ppc64_emit_swap): New function.
1051         (ppc64v1_emit_call): New function.
1052         (ppc64v2_emit_call): New function.
1053         (ppc64v1_emit_int_call_1): New function.
1054         (ppc64v2_emit_int_call_1): New function.
1055         (ppc64v1_emit_void_call_2): New function.
1056         (ppc64v2_emit_void_call_2): New function.
1057         (ppc64_emit_if_goto): New function.
1058         (ppc64_emit_eq_goto): New function.
1059         (ppc64_emit_ne_goto): New function.
1060         (ppc64_emit_lt_goto): New function.
1061         (ppc64_emit_le_goto): New function.
1062         (ppc64_emit_gt_goto): New function.
1063         (ppc64_emit_ge_goto): New function.
1064         (ppc64v1_emit_ops_impl): New static variable.
1065         (ppc64v2_emit_ops_impl): New static variable.
1066         (ppc_emit_ops): New function.
1067         (linux_low_target): Wire in ppc_emit_ops.
1068
1069 2016-03-31  Wei-cheng Wang  <cole945@gmail.com>
1070             Marcin KoÅ›cielnicki  <koriakin@0x04.net>
1071
1072         PR/17221
1073         * Makefile.in: Add powerpc-*-ipa.o
1074         * configure.srv: Add ipa_obj for powerpc*-linux.
1075         * linux-ppc-ipa.c: New file.
1076         * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
1077         includes.
1078         (PPC_FIELD): New macro.
1079         (PPC_SEXT): New macro.
1080         (PPC_OP6): New macro.
1081         (PPC_BO): New macro.
1082         (PPC_LI): New macro.
1083         (PPC_BD): New macro.
1084         (init_registers_*): Move prototype to linux-ppc-tdesc.h.
1085         (tdesc_*): Move declaration to linux-ppc-tdesc.h.
1086         (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
1087         (ppc_get_thread_area): New function.
1088         (is_elfv2_inferior): New function.
1089         (gen_ds_form): New function.
1090         (GEN_STD): New macro.
1091         (GEN_STDU): New macro.
1092         (GEN_LD): New macro.
1093         (GEN_LDU): New macro.
1094         (gen_d_form): New function.
1095         (GEN_ADDI): New macro.
1096         (GEN_ADDIS): New macro.
1097         (GEN_LI): New macro.
1098         (GEN_LIS): New macro.
1099         (GEN_ORI): New macro.
1100         (GEN_ORIS): New macro.
1101         (GEN_LWZ): New macro.
1102         (GEN_STW): New macro.
1103         (GEN_STWU): New macro.
1104         (gen_xfx_form): New function.
1105         (GEN_MFSPR): New macro.
1106         (GEN_MTSPR): New macro.
1107         (GEN_MFCR): New macro.
1108         (GEN_MTCR): New macro.
1109         (GEN_SYNC): New macro.
1110         (GEN_LWSYNC): New macro.
1111         (gen_x_form): New function.
1112         (GEN_OR): New macro.
1113         (GEN_MR): New macro.
1114         (GEN_LWARX): New macro.
1115         (GEN_STWCX): New macro.
1116         (GEN_CMPW): New macro.
1117         (gen_md_form): New function.
1118         (GEN_RLDICL): New macro.
1119         (GEN_RLDICR): New macro.
1120         (gen_i_form): New function.
1121         (GEN_B): New macro.
1122         (GEN_BL): New macro.
1123         (gen_b_form): New function.
1124         (GEN_BNE): New macro.
1125         (GEN_LOAD): New macro.
1126         (GEN_STORE): New macro.
1127         (gen_limm): New function.
1128         (gen_atomic_xchg): New function.
1129         (gen_call): New function.
1130         (ppc_relocate_instruction): New function.
1131         (ppc_install_fast_tracepoint_jump_pad): New function.
1132         (ppc_get_min_fast_tracepoint_insn_len): New function.
1133         (ppc_get_ipa_tdesc_idx): New function.
1134         (the_low_target): Wire in the new functions.
1135         (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
1136         tdescs.
1137         * linux-ppc-tdesc.h: New file.
1138
1139 2016-03-31  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
1140
1141         * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1142         (alloc_jump_pad_buffer): New function.
1143         * linux-amd64-ipa.c: Add <sys/mman.h> include.
1144         (alloc_jump_pad_buffer): New function.
1145         * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
1146         * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
1147         (alloc_jump_pad_buffer): New function.
1148         * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
1149         (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
1150         * tracepoint.h (alloc_jump_pad_buffer): New prototype.
1151         (getauxval) [!HAVE_GETAUXVAL]: New prototype.
1152
1153 2016-03-30  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
1154
1155         * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
1156         * linux-amd64-ipa.c: Likewise.
1157         * linux-i386-ipa.c: Likewise.
1158         * linux-s390-ipa.c: Likewise.
1159         * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
1160         ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
1161         set_trace_state_variable_value_ptr.
1162         (struct ipa_sym_addresses): Likewise.
1163         (symbol_list): Likewise.
1164         (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
1165         accessing gdb_collect directly.
1166         (gdb_collect_ptr_type): New typedef.
1167         (get_raw_reg_ptr_type): New typedef.
1168         (get_trace_state_variable_value_ptr_type): New typedef.
1169         (set_trace_state_variable_value_ptr_type): New typedef.
1170         (gdb_collect_ptr): New global.
1171         (get_raw_reg_ptr): New global.
1172         (get_trace_state_variable_value_ptr): New global.
1173         (set_trace_state_variable_value_ptr): New global.
1174         (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
1175         accessing get_raw_reg directly.
1176         (get_get_tsv_func_addr): Likewise for
1177         get_trace_state_variable_value_ptr.
1178         (get_set_tsv_func_addr): Likewise for
1179         set_trace_state_variable_value_ptr.
1180         * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
1181
1182 2016-03-30  Simon Marchi  <simon.marchi@ericsson.com>
1183
1184         * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
1185
1186 2016-03-30  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
1187
1188         * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
1189         packets.
1190         (relocate_instruction): Remove own_buf.
1191         * server.c (own_buf): Make global.
1192         (handle_v_requests): Make global.
1193         * server.h (own_buf): New declaration.
1194         (handle_v_requests): New prototype.
1195
1196 2016-03-29  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
1197
1198         PR 18377
1199         * linux-s390-low.c (add_insns): New function.
1200         (s390_emit_prologue): New function.
1201         (s390_emit_epilogue): New function.
1202         (s390_emit_add): New function.
1203         (s390_emit_sub): New function.
1204         (s390_emit_mul): New function.
1205         (s390_emit_lsh): New function.
1206         (s390_emit_rsh_signed): New function.
1207         (s390_emit_rsh_unsigned): New function.
1208         (s390_emit_ext): New function.
1209         (s390_emit_log_not): New function.
1210         (s390_emit_bit_and): New function.
1211         (s390_emit_bit_or): New function.
1212         (s390_emit_bit_xor): New function.
1213         (s390_emit_bit_not): New function.
1214         (s390_emit_equal): New function.
1215         (s390_emit_less_signed): New function.
1216         (s390_emit_less_unsigned): New function.
1217         (s390_emit_ref): New function.
1218         (s390_emit_if_goto): New function.
1219         (s390_emit_goto): New function.
1220         (s390_write_goto_address): New function.
1221         (s390_emit_litpool): New function.
1222         (s390_emit_const): New function.
1223         (s390_emit_call): New function.
1224         (s390_emit_reg): New function.
1225         (s390_emit_pop): New function.
1226         (s390_emit_stack_flush): New function.
1227         (s390_emit_zero_ext): New function.
1228         (s390_emit_swap): New function.
1229         (s390_emit_stack_adjust): New function.
1230         (s390_emit_set_r2): New function.
1231         (s390_emit_int_call_1): New function.
1232         (s390_emit_void_call_2): New function.
1233         (s390_emit_eq_goto): New function.
1234         (s390_emit_ne_goto): New function.
1235         (s390_emit_lt_goto): New function.
1236         (s390_emit_le_goto): New function.
1237         (s390_emit_gt_goto): New function.
1238         (s390_emit_ge_goto): New function.
1239         (s390x_emit_prologue): New function.
1240         (s390x_emit_epilogue): New function.
1241         (s390x_emit_add): New function.
1242         (s390x_emit_sub): New function.
1243         (s390x_emit_mul): New function.
1244         (s390x_emit_lsh): New function.
1245         (s390x_emit_rsh_signed): New function.
1246         (s390x_emit_rsh_unsigned): New function.
1247         (s390x_emit_ext): New function.
1248         (s390x_emit_log_not): New function.
1249         (s390x_emit_bit_and): New function.
1250         (s390x_emit_bit_or): New function.
1251         (s390x_emit_bit_xor): New function.
1252         (s390x_emit_bit_not): New function.
1253         (s390x_emit_equal): New function.
1254         (s390x_emit_less_signed): New function.
1255         (s390x_emit_less_unsigned): New function.
1256         (s390x_emit_ref): New function.
1257         (s390x_emit_if_goto): New function.
1258         (s390x_emit_const): New function.
1259         (s390x_emit_call): New function.
1260         (s390x_emit_reg): New function.
1261         (s390x_emit_pop): New function.
1262         (s390x_emit_stack_flush): New function.
1263         (s390x_emit_zero_ext): New function.
1264         (s390x_emit_swap): New function.
1265         (s390x_emit_stack_adjust): New function.
1266         (s390x_emit_int_call_1): New function.
1267         (s390x_emit_void_call_2): New function.
1268         (s390x_emit_eq_goto): New function.
1269         (s390x_emit_ne_goto): New function.
1270         (s390x_emit_lt_goto): New function.
1271         (s390x_emit_le_goto): New function.
1272         (s390x_emit_gt_goto): New function.
1273         (s390x_emit_ge_goto): New function.
1274         (s390_emit_ops): New function.
1275         (struct linux_target_ops): Fill in emit_ops hook.
1276
1277 2016-03-29  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
1278
1279         PR 18377
1280         * Makefile.in: Add s390 IPA files.
1281         * configure.srv: Build IPA for s390.
1282         * linux-s390-ipa.c: New file.
1283         * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
1284         (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
1285         (tdesc_s390_linux32): Likewise.
1286         (init_registers_s390_linux32v1): Likewise.
1287         (tdesc_s390_linux32v1): Likewise.
1288         (init_registers_s390_linux32v2): Likewise.
1289         (tdesc_s390_linux32v2): Likewise.
1290         (init_registers_s390_linux64): Likewise.
1291         (tdesc_s390_linux64): Likewise.
1292         (init_registers_s390_linux64v1): Likewise.
1293         (tdesc_s390_linux64v1): Likewise.
1294         (init_registers_s390_linux64v2): Likewise.
1295         (tdesc_s390_linux64v2): Likewise.
1296         (init_registers_s390_te_linux64): Likewise.
1297         (tdesc_s390_te_linux64): Likewise.
1298         (init_registers_s390_vx_linux64): Likewise.
1299         (tdesc_s390_vx_linux64): Likewise.
1300         (init_registers_s390_tevx_linux64): Likewise.
1301         (tdesc_s390_tevx_linux64): Likewise.
1302         (init_registers_s390x_linux64): Likewise.
1303         (tdesc_s390x_linux64): Likewise.
1304         (init_registers_s390x_linux64v1): Likewise.
1305         (tdesc_s390x_linux64v1): Likewise.
1306         (init_registers_s390x_linux64v2): Likewise.
1307         (tdesc_s390x_linux64v2): Likewise.
1308         (init_registers_s390x_te_linux64): Likewise.
1309         (tdesc_s390x_te_linux64): Likewise.
1310         (init_registers_s390x_vx_linux64): Likewise.
1311         (tdesc_s390x_vx_linux64): Likewise.
1312         (init_registers_s390x_tevx_linux64): Likewise.
1313         (tdesc_s390x_tevx_linux64): Likewise.
1314         (have_hwcap_s390_vx): New static variable.
1315         (s390_arch_setup): Fill have_hwcap_s390_vx.
1316         (s390_get_thread_area): New function.
1317         (s390_ft_entry_gpr_esa): New const.
1318         (s390_ft_entry_gpr_zarch): New const.
1319         (s390_ft_entry_misc): New const.
1320         (s390_ft_entry_fr): New const.
1321         (s390_ft_entry_vr): New const.
1322         (s390_ft_main_31): New const.
1323         (s390_ft_main_64): New const.
1324         (s390_ft_exit_fr): New const.
1325         (s390_ft_exit_vr): New const.
1326         (s390_ft_exit_misc): New const.
1327         (s390_ft_exit_gpr_esa): New const.
1328         (s390_ft_exit_gpr_zarch): New const.
1329         (append_insns): New function.
1330         (s390_relocate_instruction): New function.
1331         (s390_install_fast_tracepoint_jump_pad): New function.
1332         (s390_get_min_fast_tracepoint_insn_len): New function.
1333         (s390_get_ipa_tdesc_idx): New function.
1334         (struct linux_target_ops): Wire in the above functions.
1335         (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
1336         * linux-s390-tdesc.h: New file.
1337
1338 2016-03-29  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
1339
1340         * linux-s390-low.c (s390_supports_tracepoints): New function.
1341         (struct linux_target_ops): Fill supports_tracepoints hook.
1342
1343 2016-03-18  Yao Qi  <yao.qi@linaro.org>
1344
1345         * linux-low.c (lwp_signal_can_be_delivered): New function.
1346         (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
1347
1348 2016-03-18  Yao Qi  <yao.qi@linaro.org>
1349
1350         * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
1351         0 if signal is enqueued.  Remove 'signal' from one debugging
1352         message.  Move one debugging message to some lines below.
1353         Remove code setting 'signal' to 0.
1354
1355 2016-03-18  Yao Qi  <yao.qi@linaro.org>
1356
1357         * linux-low.c (linux_low_filter_event): Remove redundant
1358         WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
1359
1360 2016-03-09  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
1361
1362         * linux-ppc-low.c (ppc_supports_tracepoints): New function.
1363         (struct linux_target_ops): Wire in the above.
1364
1365 2016-03-03  Yao Qi  <yao.qi@linaro.org>
1366
1367         * linux-low.c: Update comments to start_step_over.
1368
1369 2016-03-03  Yao Qi  <yao.qi@linaro.org>
1370
1371         PR server/19736
1372         * linux-low.c (handle_extended_wait): Set child suspended
1373         if event_lwp->bp_reinsert isn't zero.
1374
1375 2016-03-02  Yao Qi  <yao.qi@linaro.org>
1376
1377         * linux-low.c (linux_resume_one_lwp_throw): Replace code with
1378         enqueue_pending_signal.
1379
1380 2016-03-02  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
1381
1382         * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
1383         is actually loaded.
1384
1385 2016-02-25  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
1386
1387         * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
1388         (s390_regmap_3264) [!__s390x__]: New global.
1389         (s390_collect_ptrace_register): Skip map entries containing -1.
1390         (s390_supply_ptrace_register): Ditto.
1391         (s390_fill_gprs_high): New function.
1392         (s390_store_gprs_high): New function.
1393         (s390_regsets): Add NT_S390_HIGH_GPRS.
1394         (s390_get_hwcap): Enable on 31-bit.
1395         (have_hwcap_s390_high_gprs): Enable on 31-bit.
1396         (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
1397         Detect NT_S390_HIGH_GPRS.
1398         (s390_usrregs_info_3264): Enable on 31-bit.
1399         (s390_regs_info): Enable regs_info_3264 on 31-bit.
1400         (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
1401
1402 2016-02-25  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
1403
1404         PR gdb/13808
1405         * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
1406         * configure.srv: Ditto.
1407         * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
1408         (initialize_low_tracepoint): Remove ipa_tdesc assignment.
1409         * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
1410         (init_registers_amd64_linux): Remove prototype.
1411         (tdesc_amd64_linux): Remove declaration.
1412         (get_ipa_tdesc): New function.
1413         (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1414         initialize remaining tdescs.
1415         * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
1416         (init_registers_i386_linux): Remove prototype.
1417         (tdesc_i386_linux): Remove declaration.
1418         (get_ipa_tdesc): New function.
1419         (initialize_low_tracepoint): Remove ipa_tdesc assignment,
1420         initialize remaining tdescs.
1421         * linux-low.c (linux_get_ipa_tdesc_idx): New function.
1422         (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
1423         * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
1424         * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
1425         (x86_get_ipa_tdesc_idx): New function.
1426         (the_low_target): Wire in x86_get_ipa_tdesc_idx.
1427         * linux-x86-tdesc.h: New file.
1428         * target.h (struct target_ops): Add get_ipa_tdesc_idx.
1429         (target_get_ipa_tdesc_idx): New macro.
1430         * tracepoint.c (ipa_tdesc_idx): New macro.
1431         (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
1432         (symbol_list): Add ipa_tdesc_idx.
1433         (cmd_qtstart): Write ipa_tdesc_idx in the target.
1434         (ipa_tdesc): Remove.
1435         (ipa_tdesc_idx): New variable.
1436         (get_context_regcache): Use get_ipa_tdesc.
1437         (gdb_collect): Ditto.
1438         (gdb_probe): Ditto.
1439         * tracepoint.h (get_ipa_tdesc): New prototype.
1440         (ipa_tdesc): Remove.
1441
1442 2016-02-24  Pedro Alves  <palves@redhat.com>
1443
1444         * linux-low.c (check_stopped_by_breakpoint): Rename to ...
1445         (save_stop_reason): ... this.  Use GDB_ARCH_IS_TRAP_HWBKPT and
1446         handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
1447         Factor out common code between the USE_SIGTRAP_SIGINFO and
1448         !USE_SIGTRAP_SIGINFO blocks.
1449         (linux_low_filter_event): Call save_stop_reason instead of
1450         check_stopped_by_breakpoint and check_stopped_by_watchpoint.
1451         Update comments.
1452         (linux_wait_1): Update comments.
1453
1454 2016-02-24  Wei-cheng Wang  <cole945@gmail.com>
1455
1456         * linux-ppc-low.c (ppc_supports_z_point_type): New function:
1457         (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
1458         (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
1459         ppc_insert_point, ppc_remove_point.
1460
1461 2016-02-17  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
1462
1463         * linux-s390-low.c (s390_supports_z_point_type): New function.
1464         (struct linux_target_ops): Wire s390_supports_z_point_type in.
1465
1466 2016-02-16  Yao Qi  <yao.qi@linaro.org>
1467
1468         * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
1469         PC.  Get pc from regcache_read_pc.
1470
1471 2016-02-12  Yao Qi  <yao.qi@linaro.org>
1472
1473         * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
1474         or linux_get_pc_32bit.
1475         (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
1476
1477 2016-02-12  Yao Qi  <yao.qi@linaro.org>
1478
1479         * linux-arm-low.c (get_next_pcs_ops): Initialize it with
1480         arm_linux_get_next_pcs_fixup.
1481
1482 2016-02-12  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
1483
1484         * tracepoint.c (x_tracepoint_action_download): Change
1485         write_inferior_data_ptr to write_inferior_data_pointer.
1486         (cmd_qtstart): Likewise.
1487         (write_inferior_data_ptr): Remove.
1488         (download_agent_expr): Change write_inferior_data_ptr to
1489         write_inferior_data_pointer.
1490         (download_tracepoint_1): Likewise.
1491         (download_tracepoint): Likewise.
1492         (download_trace_state_variables): Likewise.
1493
1494 2016-02-11  Wei-cheng Wang  <cole945@gmail.com>
1495             Marcin KoÅ›cielnicki  <koriakin@0x04.net>
1496
1497         * tracepoint.c (struct tracepoint_action_ops): Remove.
1498         (struct tracepoint_action): Remove ops.
1499         (m_tracepoint_action_download, r_tracepoint_action_download)
1500         (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
1501         size and offset accordingly.
1502         (m_tracepoint_action_ops, r_tracepoint_action_ops)
1503         (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
1504         (tracepoint_action_send, tracepoint_action_download): New functions.
1505         Helpers for trace action handlers.
1506         (add_tracepoint_action): Remove setup actions ops.
1507         (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
1508
1509 2016-02-10  Yao Qi  <yao.qi@linaro.org>
1510
1511         * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
1512
1513 2016-02-09  Simon Marchi  <simon.marchi@ericsson.com>
1514
1515         * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
1516         to AC_OUTPUT.
1517         * configure: Regenerate.
1518
1519 2016-02-09  Simon Marchi  <simon.marchi@ericsson.com>
1520
1521         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
1522         void * to gdb_byte *.
1523         * linux-low.c (siginfo_fixup): Likewise.
1524         (linux_xfer_siginfo): Likewise.
1525         * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
1526         Likewise.
1527         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
1528
1529 2016-02-02  Walfred Tedeschi  <walfred.tedeschi@intel.com>
1530
1531         * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
1532         to srv_tgtobj.
1533         (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
1534         to srv_tgtobj.
1535         * linux-x86-low.c [__x86_64__]: Include
1536         "nat/amd64-linux-siginfo.h".
1537         (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
1538         (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
1539         (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
1540         (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
1541         (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
1542         (cpt_si_fd, si_timerid, si_overrun): Move from
1543         nat/amd64-linux-siginfo.c.
1544         * Makefile.in (amd64-linux-siginfo.o:): New rule.
1545
1546 2016-01-28  Simon Marchi  <simon.marchi@ericsson.com>
1547
1548         * server.c (skip_to_semicolon):  Remove.
1549         (process_point_options): Use strchrnul instead of
1550         skip_to_semicolon.
1551
1552 2016-01-26  Yao Qi  <yao.qi@linaro.org>
1553
1554         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
1555         * linux-low.c (install_software_single_step_breakpoints): Don't
1556         call regcache_read_pc.
1557         * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
1558         argument pc.
1559
1560 2016-01-26  Yao Qi  <yao.qi@linaro.org>
1561
1562         * linux-low.c (install_software_single_step_breakpoints): Call
1563         regcache_read_pc instead of get_pc.
1564
1565 2016-01-26  Yao Qi  <yao.qi@linaro.org>
1566
1567         * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
1568         (unblock_async_io): Rename to ...
1569         (block_unblock_async_io): ... it.  New function.
1570         (enable_async_io): Don't install SIGIO handler.  Unblock it
1571         instead.
1572         (disable_async_io): Don't ignore SIGIO.  Block it instead.
1573         (initialize_async_io): Install SIGIO handler.  Don't call
1574         unblock_async_io.
1575
1576 2016-01-26  Yao Qi  <yao.qi@linaro.org>
1577
1578         * remote-utils.c (getpkt): If the buffer isn't empty, and the
1579         first character is '\003', call *the_target->request_interrupt.
1580
1581 2016-01-25  Yao Qi  <yao.qi@linaro.org>
1582
1583         * remote-utils.c (new_thread_notify): Remove.
1584         (dead_thread_notify): Likewise.
1585         * remote-utils.h (new_thread_notify): Remove declaration.
1586         (dead_thread_notify): Likewise.
1587
1588 2016-01-23  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
1589
1590         * gdb.trace/pending.exp: Fix expected message on continue.
1591
1592 2016-01-22  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
1593
1594         * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
1595         it works properly on big-endian machines where sizeof (CORE_ADDR)
1596         != sizeof (void *).
1597
1598 2016-01-21  Pedro Alves  <palves@redhat.com>
1599
1600         * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
1601         (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
1602         * configure: Regenerate.
1603
1604 2016-01-21  Yao Qi  <yao.qi@linaro.org>
1605
1606         * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
1607         is_thumb and set it according to CPSR saved on the stack.
1608         (get_next_pcs_syscall_next_pc): Pass is_thumb to
1609         arm_sigreturn_next_pc.
1610
1611 2016-01-18  Yao Qi  <yao.qi@linaro.org>
1612
1613         * linux-low.c (linux_set_pc_64bit): New function.
1614         (linux_get_pc_64bit): New function.
1615         * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
1616         Declare.
1617         * linux-sparc-low.c (debug_threads): Remove declaration.
1618         (sparc_get_pc): Remove.
1619         (the_low_target): Use linux_get_pc_64bit instead of
1620         sparc_get_pc.
1621         * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
1622         (the_low_target): Use linux_get_pc_64bit and
1623         linux_set_pc_64bit.
1624
1625 2016-01-18  Yao Qi  <yao.qi@linaro.org>
1626
1627         * linux-arm-low.c (debug_threads): Remove declaration.
1628         (arm_get_pc, arm_set_pc): Remove.
1629         (the_low_target): Use linux_get_pc_32bit and
1630         linux_set_pc_32bit.
1631         * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
1632         (the_low_target): Use linux_get_pc_32bit and
1633         linux_set_pc_32bit.
1634         * linux-cris-low.c (debug_threads): Remove declaration.
1635         (cris_get_pc, cris_set_pc,): Remove.
1636         (the_low_target): Use linux_get_pc_32bit and
1637         linux_set_pc_32bit.
1638         * linux-crisv32-low.c (debug_threads): Remove declaration.
1639         (cris_get_pc, cris_set_pc): Remove.
1640         (the_low_target): Use linux_get_pc_32bit and
1641         linux_set_pc_32bit.
1642         * linux-low.c: Include inttypes.h.
1643         (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
1644         * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
1645         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
1646         (the_low_target): Use linux_get_pc_32bit and
1647         linux_set_pc_32bit.
1648         * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
1649         (the_low_target): Use linux_get_pc_32bit and
1650         linux_set_pc_32bit.
1651         * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
1652         (the_low_target): Use linux_get_pc_32bit and
1653         linux_set_pc_32bit.
1654         * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
1655         (the_low_target): Use linux_get_pc_32bit and
1656         linux_set_pc_32bit.
1657         * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
1658         (the_low_target): Use linux_get_pc_32bit and
1659         linux_set_pc_32bit.
1660
1661 2016-01-18  Gary Benson  <gbenson@redhat.com>
1662
1663         * configure.ac (AC_FUNC_FORK): New check.
1664         * config.in: Regenerate.
1665         * configure: Likewise.
1666
1667 2016-01-14  Yao Qi  <yao.qi@linaro.org>
1668
1669         * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
1670         * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
1671         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
1672         arm_get_next_pcs_ctor.
1673
1674 2016-01-12  Josh Stone  <jistone@redhat.com>
1675             Philippe Waroquiers  <philippe.waroquiers@skynet.be>
1676
1677         * inferiors.h: Include "gdb_vecs.h".
1678         (struct process_info): Add syscalls_to_catch.
1679         * inferiors.c (remove_process): Free syscalls_to_catch.
1680         * remote-utils.c (prepare_resume_reply): Report syscall_entry and
1681         syscall_return stops.
1682         * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
1683         * server.c (handle_general_set): Handle QCatchSyscalls.
1684         (handle_query): Report support for QCatchSyscalls.
1685         * target.h (struct target_ops): Add supports_catch_syscall.
1686         (target_supports_catch_syscall): New macro.
1687         * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
1688         (struct lwp_info): Add syscall_state.
1689         * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
1690         Maintain syscall_state and syscalls_to_catch across exec.
1691         (get_syscall_trapinfo): New function, proxy to the_low_target.
1692         (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
1693         (linux_low_filter_event): Toggle syscall_state entry/return for
1694         syscall traps, and set it ignored for all others.
1695         (gdb_catching_syscalls_p): New function.
1696         (gdb_catch_this_syscall_p): New function.
1697         (linux_wait_1): Handle SYSCALL_SIGTRAP.
1698         (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
1699         (linux_supports_catch_syscall): New function.
1700         (linux_target_ops): Install it.
1701         * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
1702         (the_low_target): Install it.
1703
1704 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
1705
1706         * acinclude.m4: Include new ../warning.m4 file.
1707         * configure: Regenerated.
1708         * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
1709
1710 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
1711
1712         * ax.c (is_goto_target): Mark static.
1713         * linux-low.c (register_addr): Likewise.
1714         (linux_fetch_registers, linux_store_registers): Likewise.
1715         * mem-break.c (any_persistent_commands): Fix old prototype.
1716         (add_commands_to_breakpoint): Mark static.
1717         * regcache.c (find_register_by_name): Delete unused func.
1718         * remote-utils.c (hex_or_minus_one): Mark static.
1719         * server.c (monitor_show_help): Mark static.
1720         (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
1721         handle_v_requests): Likewise.
1722
1723 2016-01-12  Pedro Alves  <palves@redhat.com>
1724
1725         Remove use of the registered trademark symbol throughout.
1726
1727 2016-01-08  Yao Qi  <yao.qi@linaro.org>
1728
1729         * remote-utils.c (getpkt): If c is '\003', call target hook
1730         request_interrupt.
1731
1732 2016-01-06  Yao Qi  <yao.qi@linaro.org>
1733
1734         * linux-aarch32-low.h (arm_abi_breakpoint): Move to
1735         linux-aarch32-low.c.
1736         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1737         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1738         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1739         (thumb2_breakpoint): Declare.
1740         * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
1741         linux-aarch32-low.h.
1742         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1743         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
1744         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1745
1746 2016-01-01  Joel Brobecker  <brobecker@adacore.com>
1747
1748         * gdbreplay.c (gdbreplay_version): Change copyright year in
1749         version message.
1750         * server.c (gdbserver_version): Likewise.
1751
1752 2015-12-28  Patrick Palka  <patrick@parcs.ath.cx>
1753
1754         * server.c (crc32_table): Delete.
1755         (crc32): Use libiberty's xcrc32 function.
1756
1757 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
1758
1759         * lynx-low.c (lynx_delete_thread_callback): New function.
1760         (lynx_mourn): Properly delete our process and all of its
1761         threads.  Remove call to clear_inferiors.
1762
1763 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
1764
1765         * target.c (thread_search_callback): Add check that
1766         the thread_stopped target callback is not NULL before
1767         calling it.
1768
1769 2015-12-21  Yao Qi  <yao.qi@linaro.org>
1770
1771         * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
1772         arm breakpoint.
1773
1774 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1775
1776         * server.c (handle_query): Call target_supports_software_single_step.
1777
1778 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1779
1780         * linux-low.c (single_step): New function.
1781         (linux_resume_one_lwp_throw): Call single_step.
1782         (start_step_over): Likewise.
1783
1784 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1785
1786         * Makefile.in (SFILES): Append arch/arm-linux.c,
1787         arch/arm-get-next-pcs.c.
1788         (arm-linux.o): New rule.
1789         (arm-get-next-pcs.o): New rule.
1790         * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
1791         arm-linux.o.
1792         * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro.  Moved
1793         to linux-aarch32-low.c.
1794         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1795         (arm_breakpoint_len, thumb_breakpoint): Likewise.
1796         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1797         (thumb2_breakpoint_len): Likewise.
1798         (arm_is_thumb_mode): Make non-static.
1799         * linux-aarch32-low.h (arm_abi_breakpoint): New macro.  Moved
1800         from linux-aarch32-low.c.
1801         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1802         (arm_breakpoint_len, thumb_breakpoint): Likewise.
1803         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1804         (thumb2_breakpoint_len): Likewise.
1805         (arm_is_thumb_mode): New declaration.
1806         * linux-arm-low.c: Include arch/arm-linux.h
1807         aarch/arm-get-next-pcs.h, sys/syscall.h.
1808         (get_next_pcs_ops): New struct.
1809         (get_next_pcs_addr_bits_remove): New function.
1810         (get_next_pcs_is_thumb): New function.
1811         (get_next_pcs_read_memory_unsigned_integer): Likewise.
1812         (arm_sigreturn_next_pc): Likewise.
1813         (get_next_pcs_syscall_next_pc): Likewise.
1814         (arm_gdbserver_get_next_pcs): Likewise.
1815         (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
1816         Initialize.
1817         * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
1818         * server.h: Include gdb_vecs.h.
1819
1820 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1821
1822         * Makefile.in (SFILES): Append common/common-regcache.c.
1823         (OBS): Append common-regcache.o.
1824         (common-regcache.o): New rule.
1825         * regcache.c (init_register_cache): Initialize cache to
1826         REG_UNAVAILABLE.
1827         (regcache_raw_read_unsigned): New function.
1828         * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
1829         register_status enum.
1830
1831 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1832
1833         * linux-aarch64-low.c (the_low_targets): Rename
1834         breakpoint_reinsert_addr to get_next_pcs.
1835         * linux-arm-low.c (the_low_targets): Likewise.
1836         * linux-bfin-low.c (the_low_targets): Likewise.
1837         * linux-cris-low.c (the_low_targets): Likewise.
1838         * linux-crisv32-low.c (the_low_targets): Likewise.
1839         * linux-low.c (can_software_single_step): Likewise.
1840         (install_software_single_step_breakpoints): New function.
1841         (start_step_over): Use install_software_single_step_breakpoints.
1842         * linux-low.h: New CORE_ADDR vector.
1843         (struct linux_target_ops) Rename breakpoint_reinsert_addr to
1844         get_next_pcs.
1845         * linux-mips-low.c (the_low_targets): Likewise.
1846         * linux-nios2-low.c (the_low_targets): Likewise.
1847         * linux-sparc-low.c (the_low_targets): Likewise.
1848
1849 2015-12-17  Pedro Alves  <palves@redhat.com>
1850
1851         * linux-low.c (linux_kill_one_lwp): Remove references to
1852         LinuxThreads.
1853         (kill_lwp): Remove HAVE_TKILL_SYSCALL check.  No longer fall back
1854         to 'kill'.
1855         (linux_init_signals): Delete.
1856         (initialize_low): Adjust.
1857         * thread-db.c (thread_db_init): Remove LinuxThreads reference.
1858
1859 2015-12-16  Pedro Alves  <palves@redhat.com>
1860
1861         * configure.ac (compiler warning flags): When testing a
1862         -Wno-foo option, check whether -Wfoo works instead.
1863         * configure: Regenerate.
1864
1865 2015-12-11  Don Breazeal  <donb@codesourcery.com>
1866
1867         * server.c (process_serial_event): Don't exit from gdbserver
1868         in remote mode if there are still active inferiors.
1869
1870 2015-12-11  Yao Qi  <yao.qi@linaro.org>
1871
1872         * linux-aarch64-low.c (aarch64_breakpoint_at): Call
1873         arm_breakpoint_at if the process is 32-bit.
1874
1875 2015-12-11  Yao Qi  <yao.qi@linaro.org>
1876
1877         * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
1878         arm breakpoint.
1879
1880 2015-12-07  Yao Qi  <yao.qi@linaro.org>
1881
1882         * configure.srv: Append arm.o to srv_tgtobj for
1883         aarch64*-*-linux* target.
1884         * linux-aarch32-low.c (arm_abi_breakpoint): New macro.  Moved
1885         from linux-arm-low.c.
1886         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
1887         (arm_breakpoint_len, thumb_breakpoint): Likewise.
1888         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
1889         (thumb2_breakpoint_len): Likewise.
1890         (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
1891         (arm_breakpoint_kinds): Likewise.
1892         (arm_breakpoint_kind_from_pc): Likewise.
1893         (arm_sw_breakpoint_from_kind): Likewise.
1894         (arm_breakpoint_kind_from_current_state): Likewise.
1895         * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
1896         (arm_sw_breakpoint_from_kind): Declare.
1897         (arm_breakpoint_kind_from_current_state): Declare.
1898         (arm_breakpoint_at): Declare.
1899         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
1900         arm_sw_breakpoint_from_kind if process is 32-bit.
1901         (aarch64_breakpoint_kind_from_pc): New function.
1902         (aarch64_breakpoint_kind_from_current_state): New function.
1903         (the_low_target): Initialize fields breakpoint_kind_from_pc
1904         and breakpoint_kind_from_current_state.
1905         * linux-arm-low.c (arm_breakpoint_kinds): Move to
1906         linux-aarch32-low.c.
1907         (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
1908         (arm_breakpoint, arm_breakpoint_len): Likewise.
1909         (thumb_breakpoint, thumb_breakpoint_len): Likewise.
1910         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
1911         (arm_is_thumb_mode): Likewise.
1912         (arm_breakpoint_at): Likewise.
1913         (arm_breakpoint_kind_from_pc): Likewise.
1914         (arm_sw_breakpoint_from_kind): Likewise.
1915         (arm_breakpoint_kind_from_current_state): Likewise.
1916
1917         Revert:
1918         2015-08-04  Yao Qi  <yao.qi@linaro.org>
1919
1920         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1921         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1922         * server.c (extended_protocol): Remove "static".
1923         * server.h (extended_protocol): Declare it.
1924
1925 2015-12-04  Josh Stone  <jistone@redhat.com>
1926
1927         * target.h (struct target_ops) <arch_setup>: Rename to ...
1928         (struct target_ops) <post_create_inferior>: ... this.
1929         (target_arch_setup): Rename to ...
1930         (target_post_create_inferior): ... this, calling post_create_inferior.
1931         * server.c (start_inferior): Update target_arch_setup calls to
1932         target_post_create_inferior.
1933         * linux-low.c (linux_low_ptrace_options): Forward declare.
1934         (linux_arch_setup): Update its comment for general use.
1935         (linux_post_create_inferior): New, run arch_setup and setup ptrace.
1936         (struct linux_target_ops): Use linux_post_create_inferior.
1937         * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
1938         to post_create_inferior.
1939         * nto-low.c (struct nto_target_ops): Likewise.
1940         * spu-low.c (struct spu_target_ops): Likewise.
1941         * win32-low.c (struct win32_target_ops): Likewise.
1942
1943 2015-12-03  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1944
1945         * linux-arm-low.c: Remove duplicate arch/arm.h include.
1946
1947 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1948
1949         * linux-arm-low.c (arm_reinsert_addr): Remove function.
1950         (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1951         * linux-cris-low.c (cris_reinsert_addr> Remove function.
1952         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1953         * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1954         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1955         * linux-mips-low.c (mips_reinsert_addr): Remove function.
1956         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1957         * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1958         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1959         * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1960         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1961
1962 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1963
1964         * linux-low.c (linux_look_up_symbols): Don't call
1965         linux_supports_traceclone.
1966         * linux-low.h (thread_db_init): Remove use_events argument.
1967         * thread-db.c (thread_db_use_event): Remove global variable.
1968         (struct thread_db) <td_thr_event_enable_p>: Remove field.
1969         (struct thread_db) <td_create_bp>: Remove field.
1970         (thread_db_create_event): Remove function.
1971         (thread_db_enable_reporting): Likewise.
1972         (find_one_thread): Don't check for thread_db_use_events.
1973         (attach_thread): Likewise.
1974         (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1975         (try_thread_db_load_1): Don't check for thread_db_use_events.
1976         (thread_db_init): Remove use_events argument and thread events
1977         handling.
1978         (remove_thread_event_breakpoints): Remove function.
1979         (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1980
1981 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
1982
1983         * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1984         New function.
1985         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1986         * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1987         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1988         * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1989         (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1990         Initialize.
1991         * linux-crisv32-low.c (cris_supports_hardware_single_step):
1992         New function.
1993         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1994         * linux-low.c (can_hardware_single_step): Use
1995         supports_hardware_single_step.
1996         (can_software_single_step): New function.
1997         (start_step_over): Call can_software_single_step.
1998         (linux_supports_hardware_single_step): New function.
1999         (struct target_ops) <supports_software_single_step>: Initialize.
2000         * linux-low.h (struct linux_target_ops)
2001         <supports_hardware_single_step>: Initialize.
2002         * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
2003         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2004         * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
2005         (struct linux_target_ops) <supports_hardware_single_step> Initialize.
2006         * linux-s390-low.c (s390_supports_hardware_single_step): New function.
2007         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2008         * linux-sh-low.c (sh_supports_hardware_single_step): New function.
2009         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2010         * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
2011         (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
2012         Initialize.
2013         * linux-tile-low.c (tile_supports_hardware_single_step): New function.
2014         (struct linux_target_ops) <tile_supports_hardware_single_step>:
2015         Initialize.
2016         * linux-x86-low.c (x86_supports_hardware_single_step) New function.
2017         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2018         * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
2019         New function.
2020         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
2021         * target.h (struct target_ops): <supports_software_single_step>:
2022         New field.
2023         (target_supports_software_single_step): New macro.
2024
2025 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2026
2027         * linux-low.c (linux_wait_1): Fix pc advance condition.
2028         * mem-break.c (reinsert_breakpoint_inserted_here): New function.
2029         * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
2030
2031 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2032
2033         * linux-arm-low.c (arm_is_thumb_mode): New function.
2034         (arm_breakpoint_at): Use arm_is_thumb_mode.
2035         (arm_breakpoint_kind_from_current_state): New function.
2036         (struct linux_target_ops) <breakpoint_kind_from_current_state>:
2037         Initialize.
2038         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
2039         (linux_breakpoint_kind_from_current_state): New function.
2040         (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
2041         * linux-low.h (struct linux_target_ops)
2042         <breakpoint_kind_from_current_state>: New field.
2043         * target.h (struct target_ops): Likewise.
2044         (target_breakpoint_kind_from_current_state): New macro.
2045
2046 2015-11-30  Pedro Alves  <palves@redhat.com>
2047
2048         * linux-low.c (linux_resume): Wake up the event loop before
2049         returning.
2050
2051 2015-11-30  Pedro Alves  <palves@redhat.com>
2052
2053         * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
2054         check.
2055         (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
2056         to -1.
2057         * target.c (struct thread_search): New structure.
2058         (thread_search_callback): New function.
2059         (prev_general_thread): New global.
2060         (prepare_to_access_memory, done_accessing_memory): New functions.
2061         * target.h (prepare_to_access_memory, done_accessing_memory):
2062         Replace macros with function declarations.
2063
2064 2015-11-30  Pedro Alves  <palves@redhat.com>
2065
2066         PR 14618
2067         * linux-low.c (linux_wait_1): If the last resumed thread is gone,
2068         report TARGET_WAITKIND_NO_RESUMED.
2069         * remote-utils.c (prepare_resume_reply): Handle
2070         TARGET_WAITKIND_NO_RESUMED.
2071         * server.c (report_no_resumed): New global.
2072         (handle_query) <qSupported>: Handle "no-resumed+".  Report
2073         "no-resumed+" support.
2074         (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
2075         return error if the client doesn't support no-resumed events.
2076         (push_stop_notification): New function.
2077         (handle_target_event): Use it.  Report TARGET_WAITKIND_NO_RESUMED
2078         events if the client supports them.
2079
2080 2015-11-30  Pedro Alves  <palves@redhat.com>
2081
2082         * linux-low.c (thread_still_has_status_pending_p): Don't check
2083         vCont;t here.
2084         (lwp_resumed): New function.
2085         (status_pending_p_callback): Return early if the LWP is not
2086         supposed to be resumed.
2087
2088 2015-11-30  Pedro Alves  <palves@redhat.com>
2089
2090         * linux-low.c (handle_extended_wait): Assert that the LWP's
2091         waitstatus is TARGET_WAITKIND_IGNORE.  If GDB wants to hear about
2092         thread create events, leave the new child's status pending.
2093         (linux_low_filter_event): If GDB wants to hear about thread exit
2094         events, leave the LWP marked dead and don't delete it.
2095         (linux_wait_for_event_filtered): Don't check for thread exit.
2096         (filter_exit_event): New function.
2097         (linux_wait_1): Use it, when returning an exit event.
2098         (linux_resume_one_lwp_throw): Assert that the LWP's
2099         waitstatus is TARGET_WAITKIND_IGNORE.
2100         * remote-utils.c (prepare_resume_reply): Handle
2101         TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
2102         * server.c (report_thread_events): New global.
2103         (handle_general_set): Handle QThreadEvents.
2104         (handle_query) <qSupported>: Handle and report QThreadEvents+;
2105         (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
2106         TARGET_WAITKIND_THREAD_EXITED.
2107         * server.h (report_thread_events): Declare.
2108
2109 2015-11-30  Pedro Alves  <palves@redhat.com>
2110
2111         * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
2112         the thread's last_resume_kind was resume_stop.
2113
2114 2015-11-30  Pedro Alves  <palves@redhat.com>
2115
2116         * linux-low.c (linux_attach): In non-stop mode, wait for one stop
2117         before returning.
2118
2119 2015-11-30  Pedro Alves  <palves@redhat.com>
2120
2121         * server.c (handle_v_requests): Handle vCtrlC.
2122
2123 2015-11-30  Pedro Alves  <palves@redhat.com>
2124
2125         * gdbthread.h (find_any_thread_of_pid): Declare.
2126         * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
2127         functions.
2128         * server.c (handle_query): If current_thread is NULL, look for
2129         another thread of the selected process.
2130
2131 2015-11-26  Daniel Colascione  <dancol@dancol.org>
2132             Simon Marchi  <simon.marchi@ericsson.com>
2133
2134         * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
2135         * server.c (handle_qxfer_threads_worker): Refactor to include thread
2136         name in reply.
2137         * target.h (struct target_ops) <thread_name>: New field.
2138         (target_thread_name): New macro.
2139
2140 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
2141
2142         * regcache.h (regcache_invalidate_pid): Add declaration.
2143         * regcache.c (regcache_invalidate_pid): New function, extracted
2144         from regcache_invalidate.
2145         (regcache_invalidate): Reimplement using regcache_invalidate_pid.
2146         Add trivial documentation comment.
2147         * lynx-low.c: Use regcache_invalidate_pid instead of
2148         regcache_invalidate.
2149
2150 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
2151
2152         * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
2153         and Elf64_auxv_t if the target is Android.
2154
2155 2015-11-22  Doug Evans  <xdje42@gmail.com>
2156
2157         * target.h: #include <sys/types.h>.
2158
2159 2015-11-19  Pedro Alves  <palves@redhat.com>
2160
2161         * linux-low.c (linux_process_qsupported): Change prototype.
2162         Adjust.
2163         * linux-low.h (struct linux_target_ops) <process_qsupported>:
2164         Change prototype.
2165         * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
2166         and adjust to loop over all features.
2167         * server.c (handle_query) <qSupported>: Adjust to call
2168         target_process_qsupported once, passing it a vector of unprocessed
2169         features.
2170         * target.h (struct target_ops) <process_qsupported>: Change
2171         prototype.
2172         (target_process_qsupported): Adjust.
2173
2174 2015-11-19  Pedro Alves  <palves@redhat.com>
2175
2176         * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
2177         mode.
2178         * configure: Regenerate.
2179
2180 2015-11-19  Pedro Alves  <palves@redhat.com>
2181
2182         * configure: Regenerate.
2183
2184 2015-11-19  Yao Qi  <yao.qi@linaro.org>
2185
2186         * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
2187         type to uint32_t.
2188
2189 2015-11-19  Yao Qi  <yao.qi@linaro.org>
2190
2191         * linux-aarch64-low.c (enum aarch64_operand_type): New.
2192         (struct aarch64_operand): Move enum out.
2193
2194 2015-11-19  Yao Qi  <yao.qi@linaro.org>
2195
2196         * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
2197         struct user_fpsimd_state *.
2198         (aarch64_store_fpregset): Likewise.
2199
2200 2015-11-19  Yao Qi  <yao.qi@linaro.org>
2201
2202         * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
2203         struct user_pt_regs *.
2204         (aarch64_store_gregset): Likewise.
2205
2206 2015-11-18  Pedro Alves  <palves@redhat.com>
2207
2208         * Makefile.in (all_object_files): Add $IPA_OBJS.
2209
2210 2015-11-17  Pedro Alves  <palves@redhat.com>
2211
2212         * win32-low.c (win32_resume): Use gdb_signal_from_host,
2213         GDB_SIGNAL_0 and gdb_signal_to_string.
2214
2215 2015-11-17  Pedro Alves  <palves@redhat.com>
2216
2217         * win32-low.c (handle_output_debug_string): Remove parameter.
2218         (win32_kill): Remove our_status local and adjust call to
2219         handle_output_debug_string.
2220         (get_child_debug_event): Adjust call to
2221         handle_output_debug_string.
2222
2223 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
2224
2225         * linux-mips-low.c (mips_fill_gregset): Add cast.
2226         (mips_store_gregset): Likewise.
2227         (mips_fill_fpregset): Likewise.
2228         (mips_store_fpregset): Likewise.
2229
2230 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
2231
2232         * linux-mips-low.c (mips_add_watchpoint): Rename private to
2233         priv.
2234
2235 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
2236
2237         * linux-mips-low.c (mips_linux_new_thread): Change type of
2238         watch_type to enum target_hw_bp_type.
2239
2240 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
2241
2242                 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
2243                 Change return type to arm_hwbp_type.
2244
2245 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
2246
2247         * linux-aarch32-low.c (arm_fill_gregset): Add cast.
2248         (arm_store_gregset): Likewise.
2249         * linux-arm-low.c (arm_get_hwcap): Likewise.
2250         (arm_read_description): Likewise.
2251
2252 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
2253
2254         * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
2255
2256 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
2257
2258         * linux-ppc-low.c (ppc_get_hwcap): Add cast.
2259         (ppc_fill_vsxregset): Likewise.
2260         (ppc_store_vsxregset): Likewise.
2261         (ppc_fill_vrregset): Likewise.
2262         (ppc_store_vrregset): Likewise.
2263         (ppc_fill_evrregset): Likewise.
2264         (ppc_store_evrregset): Likewise.
2265
2266 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
2267
2268         * linux-ppc-low.c (ppc_usrregs_info): Remove
2269         forward-declaration.
2270         (ppc_arch_setup): Move lower in file.
2271
2272 2015-10-30  Simon Marchi  <simon.marchi@ericsson.com>
2273
2274         * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
2275         (ps_pdwrite): Likewise.
2276
2277 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
2278
2279         * linux-arm-low.c (arm_new_thread): Move pointer dereference
2280         to after assert checks.
2281
2282 2015-10-29  Simon Marchi  <simon.marchi@ericsson.com>
2283
2284         * proc-service.c (ps_pdread): Add/adjust casts.
2285         (ps_pdwrite): Add/adjust casts.
2286
2287 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
2288
2289         * server.c (handle_search_memory_1): Cast return value of
2290         memmem.
2291
2292 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
2293
2294         * server.c (write_qxfer_response): Change type of data to
2295         gdb_byte *.
2296
2297 2015-10-29  Pedro Alves  <palves@redhat.com>
2298
2299         * mem-break.c (Z_packet_to_bkpt_type): Add cast.
2300
2301 2015-10-29  Pedro Alves  <palves@redhat.com>
2302
2303         * tracepoint.c (clear_installed_tracepoints): Add casts.
2304
2305 2015-10-29  Pedro Alves  <palves@redhat.com>
2306
2307         * server.c (handle_v_cont, process_serial_event): Add enum
2308         gdb_signal casts to signal parsing code.
2309
2310 2015-10-29  Pedro Alves  <palves@redhat.com>
2311
2312         * linux-low.h (NULL_REGSET): Define.
2313         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2314         * linux-arm-low.c (arm_regsets): Likewise.
2315         * linux-crisv32-low.c (cris_regsets): Likewise.
2316         * linux-m68k-low.c (m68k_regsets): Likewise.
2317         * linux-mips-low.c (mips_regsets): Likewise.
2318         * linux-nios2-low.c (nios2_regsets): Likewise.
2319         * linux-ppc-low.c (ppc_regsets): Likewise.
2320         * linux-s390-low.c (s390_regsets): Likewise.
2321         * linux-sh-low.c (sh_regsets): Likewise.
2322         * linux-sparc-low.c (sparc_regsets): Likewise.
2323         * linux-tic6x-low.c (tic6x_regsets): Likewise.
2324         * linux-tile-low.c (tile_regsets): Likewise.
2325         * linux-x86-low.c (x86_regsets): Likewise.
2326         * linux-xtensa-low.c (xtensa_regsets): Likewise.
2327
2328 2015-10-29  Pedro Alves  <palves@redhat.com>
2329
2330         * linux-low.h (NULL_REGSET): Define.
2331         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
2332         * linux-arm-low.c (arm_regsets): Likewise.
2333         * linux-crisv32-low.c (cris_regsets): Likewise.
2334         * linux-m68k-low.c (m68k_regsets): Likewise.
2335         * linux-mips-low.c (mips_regsets): Likewise.
2336         * linux-nios2-low.c (nios2_regsets): Likewise.
2337         * linux-ppc-low.c (ppc_regsets): Likewise.
2338         * linux-s390-low.c (s390_regsets): Likewise.
2339         * linux-sh-low.c (sh_regsets): Likewise.
2340         * linux-sparc-low.c (sparc_regsets): Likewise.
2341         * linux-tic6x-low.c (tic6x_regsets): Likewise.
2342         * linux-tile-low.c (tile_regsets): Likewise.
2343         * linux-x86-low.c (x86_regsets): Likewise.
2344         * linux-xtensa-low.c (xtensa_regsets): Likewise.
2345
2346 2015-10-26  Doug Evans  <dje@google.com>
2347
2348         * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
2349
2350 2015-10-26  Doug Evans  <dje@google.com>
2351
2352         * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
2353
2354 2015-10-26  Doug Evans  <dje@google.com>
2355
2356         * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
2357         for debug_printf.
2358         (attach_thread, find_new_threads_callback): Ditto.
2359
2360 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2361
2362         * mem-break.h (set_breakpoint_data): Remove.
2363
2364 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2365
2366         * nto-low.c (nto_sw_breakpoint_from_kind): New function.
2367         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2368         (initialize_low): Remove set_breakpoint_data call.
2369         * spu-low.c (spu_sw_breakpoint_from_kind): New function.
2370         (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
2371         (initialize_low): Remove set_breakpoint_data call.
2372         * win32-low.c (win32_sw_breakpoint_from_kind): New function.
2373         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
2374         (initialize_low): Remove set_breakpoint_data call.
2375
2376 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2377
2378         * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
2379         * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
2380         * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
2381         * target.h (target_breakpoint_kind_from_pc): New macro.
2382
2383 2015-10-22  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2384
2385         * linux-low.c (default_breakpoint_kind_from_pc): New function.
2386         (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
2387         the default breakpoint kind.
2388
2389 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2390
2391         * linux-arm-low.c (arm_supports_z_point_type): Add software
2392         breakpoint support.
2393
2394 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2395
2396         * linux-arm-low.c: Refactor breakpoint definitions.
2397         (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
2398         (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
2399
2400 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2401
2402         * Makefile.in: Add arm.c/o.
2403         * configure.srv: Likewise.
2404         * linux-arm-low.c (arm_breakpoint_kinds): New enum.
2405         (arm_breakpoint_kind_from_pc): New function.
2406         (arm_sw_breakpoint_from_kind): Return proper kind.
2407         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
2408
2409 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2410
2411         * linux-low.c (initialize_low): Ajdust for breakpoint global variables
2412         removal.
2413         * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
2414         (struct raw_breakpoint) <size>: Remove.
2415         (struct raw_breakpoint) <kind>: Add.
2416         (bp_size): New function.
2417         (bp_opcode): Likewise.
2418         (find_raw_breakpoint_at): Adjust for kind.
2419         (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
2420         (remove_memory_breakpoint): Adjust for kind call bp_size.
2421         (set_raw_breakpoint_at): Adjust for kind.
2422         (set_breakpoint): Likewise.
2423         (set_breakpoint_at): Call breakpoint_kind_from_pc.
2424         (delete_raw_breakpoint): Adjust for kind.
2425         (delete_breakpoint): Likewise.
2426         (find_gdb_breakpoint): Likewise.
2427         (set_gdb_breakpoint_1): Likewise.
2428         (set_gdb_breakpoint): Likewise.
2429         (delete_gdb_breakpoint_1): Likewise.
2430         (delete_gdb_breakpoint): Likewise.
2431         (uninsert_raw_breakpoint): Likewise.
2432         (reinsert_raw_breakpoint): Likewise.
2433         (set_breakpoint_data): Remove.
2434         (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
2435         (check_mem_read): Adjust for kind call bp_size.
2436         (check_mem_write): Adjust for kind call bp_size,bp_opcode.
2437         (clone_one_breakpoint): Adjust for kind.
2438         * mem-break.h (set_gdb_breakpoint): Likewise.
2439         (delete_gdb_breakpoint): Likewise.
2440         * server.c (process_serial_event): Likewise.
2441
2442 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2443
2444         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
2445         (struct linux_target_ops) <breakpoint>: Remove.
2446         (struct linux_target_ops) <breakpoint_len>: Remove.
2447         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2448         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2449         * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
2450         (arm_sw_breakpoint_from_kind): New function.
2451         * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
2452         (struct linux_target_ops) <breakpoint>: Remove.
2453         (struct linux_target_ops) <breakpoint_len>: Remove.
2454         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2455         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2456         * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
2457         (struct linux_target_ops) <breakpoint>: Remove.
2458         (struct linux_target_ops) <breakpoint_len>: Remove.
2459         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2460         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2461         * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
2462         (struct linux_target_ops) <breakpoint>: Remove.
2463         (struct linux_target_ops) <breakpoint_len>: Remove.
2464         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2465         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2466         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
2467         and sw_breakpoint_from_kind to increment the pc.
2468         (linux_breakpoint_kind_from_pc): New function.
2469         (linux_sw_breakpoint_from_kind): New function.
2470         (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
2471         (initialize_low): Call breakpoint_kind_from_pc and
2472         sw_breakpoint_from_kind to replace breakpoint_data/len.
2473         * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
2474         New field.
2475         (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
2476         * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
2477         (struct linux_target_ops) <breakpoint>: Remove.
2478         (struct linux_target_ops) <breakpoint_len>: Remove.
2479         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2480         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2481         * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
2482         (struct linux_target_ops) <breakpoint>: Remove.
2483         (struct linux_target_ops) <breakpoint_len>: Remove.
2484         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2485         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2486         * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
2487         (struct linux_target_ops) <breakpoint>: Remove.
2488         (struct linux_target_ops) <breakpoint_len>: Remove.
2489         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2490         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2491         * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
2492         (struct linux_target_ops) <breakpoint>: Remove.
2493         (struct linux_target_ops) <breakpoint_len>: Remove.
2494         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2495         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2496         * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
2497         (struct linux_target_ops) <breakpoint>: Remove.
2498         (struct linux_target_ops) <breakpoint_len>: Remove.
2499         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2500         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2501         * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
2502         (struct linux_target_ops) <breakpoint>: Remove.
2503         (struct linux_target_ops) <breakpoint_len>: Remove.
2504         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2505         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2506         * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
2507         (struct linux_target_ops) <breakpoint>: Remove.
2508         (struct linux_target_ops) <breakpoint_len>: Remove.
2509         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2510         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2511         * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
2512         (struct linux_target_ops) <breakpoint>: Remove.
2513         (struct linux_target_ops) <breakpoint_len>: Remove.
2514         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2515         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2516         * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
2517         (struct linux_target_ops) <breakpoint>: Remove.
2518         (struct linux_target_ops) <breakpoint_len>: Remove.
2519         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2520         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2521         * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
2522         * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
2523         (struct linux_target_ops) <breakpoint>: Remove.
2524         (struct linux_target_ops) <breakpoint_len>: Remove.
2525         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2526         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2527         * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
2528         (struct linux_target_ops) <breakpoint>: Remove.
2529         (struct linux_target_ops) <breakpoint_len>: Remove.
2530         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
2531         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
2532
2533 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2534
2535         * linux-cris-low.c (cris_get_pc): Remove void arg.
2536
2537 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
2538
2539         * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
2540         variable name.
2541
2542 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
2543
2544         * inferiors.c (thread_pid_matches_callback): New function.
2545         (find_thread_process): New function.
2546         (remove_thread): Reset current_thread.
2547         (remove_process): Assert threads have been removed first.
2548
2549 2015-10-15  Yao Qi  <yao.qi@linaro.org>
2550
2551         * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
2552         if it is 3.
2553         (aarch64_remove_point): Likewise.
2554         * regcache.c (regcache_register_size): New function.
2555
2556 2015-10-12  Yao Qi  <yao.qi@linaro.org>
2557
2558         * linux-aarch64-low.c: Update all callers as emit_load_store
2559         is renamed to aarch64_emit_load_store.
2560
2561 2015-10-12  Yao Qi  <yao.qi@linaro.org>
2562
2563         * linux-aarch64-low.c: Update all callers of function renaming
2564         from emit_insn to aarch64_emit_insn.
2565
2566 2015-10-12  Yao Qi  <yao.qi@linaro.org>
2567
2568         * linux-aarch64-low.c (enum aarch64_opcodes): Move to
2569         arch/aarch64-insn.h.
2570         (struct aarch64_memory_operand): Likewise.
2571         (ENCODE): Likewise.
2572         (emit_insn): Move to arch/aarch64-insn.c.
2573         (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
2574         (emit_load_store): Move to arch/aarch64-insn.c.
2575         (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
2576         (can_encode_int32): Remove.
2577
2578 2015-10-12  Yao Qi  <yao.qi@linaro.org>
2579
2580         * linux-aarch64-low.c (extract_signed_bitfield): Remove.
2581         (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
2582         (aarch64_relocate_instruction): Likewise.
2583         (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
2584         (struct aarch64_insn_visitor): Likewise.
2585
2586 2015-10-12  Yao Qi  <yao.qi@linaro.org>
2587
2588         * linux-aarch64-low.c (struct aarch64_insn_data): New.
2589         (struct aarch64_insn_visitor): New.
2590         (struct aarch64_insn_relocation_data): New.
2591         (aarch64_ftrace_insn_reloc_b): New function.
2592         (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2593         (aarch64_ftrace_insn_reloc_cb): Likewise.
2594         (aarch64_ftrace_insn_reloc_tb): Likewise.
2595         (aarch64_ftrace_insn_reloc_adr): Likewise.
2596         (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
2597         (aarch64_ftrace_insn_reloc_others): Likewise.
2598         (visitor): New.
2599         (aarch64_relocate_instruction): Use visitor.
2600
2601 2015-10-12  Yao Qi  <yao.qi@linaro.org>
2602
2603         * linux-aarch64-low.c (aarch64_relocate_instruction): Return
2604         int.  Add argument buf.
2605         (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
2606         aarch64_relocate_instruction.
2607
2608 2015-10-12  Yao Qi  <yao.qi@linaro.org>
2609
2610         * linux-aarch64-low.c (aarch64_relocate_instruction): Add
2611         argument insn.  Remove local variable insn.  Don't call
2612         target_read_uint32.
2613         (aarch64_install_fast_tracepoint_jump_pad): Call
2614         target_read_uint32.
2615
2616 2015-09-30  Yao Qi  <yao.qi@linaro.org>
2617
2618         * linux-aarch64-low.c (emit_movk): Shorten a long line.
2619         (emit_load_store_pair): Likewise.
2620
2621 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
2622
2623         * dll.c (match_dll): Add cast(s).
2624         (unloaded_dll): Likewise.
2625         * linux-low.c (second_thread_of_pid_p): Likewise.
2626         (delete_lwp_callback): Likewise.
2627         (count_events_callback): Likewise.
2628         (select_event_lwp_callback): Likewise.
2629         (linux_set_resume_request): Likewise.
2630         * server.c (accumulate_file_name_length): Likewise.
2631         (emit_dll_description): Likewise.
2632         (handle_qxfer_threads_worker): Likewise.
2633         (visit_actioned_threads): Likewise.
2634         * thread-db.c (any_thread_of): Likewise.
2635         * tracepoint.c (same_process_p): Likewise.
2636         (match_blocktype): Likewise.
2637         (build_traceframe_info_xml): Likewise.
2638
2639 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
2640
2641         * ax.c (gdb_parse_agent_expr): Add cast to allocation result
2642         assignment.
2643         (gdb_unparse_agent_expr): Likewise.
2644         * hostio.c (require_data): Likewise.
2645         (handle_pread): Likewise.
2646         * linux-low.c (disable_regset): Likewise.
2647         (fetch_register): Likewise.
2648         (store_register): Likewise.
2649         (get_dynamic): Likewise.
2650         (linux_qxfer_libraries_svr4): Likewise.
2651         * mem-break.c (delete_fast_tracepoint_jump): Likewise.
2652         (set_fast_tracepoint_jump): Likewise.
2653         (uninsert_fast_tracepoint_jumps_at): Likewise.
2654         (reinsert_fast_tracepoint_jumps_at): Likewise.
2655         (validate_inserted_breakpoint): Likewise.
2656         (clone_agent_expr): Likewise.
2657         * regcache.c (init_register_cache): Likewise.
2658         * remote-utils.c (putpkt_binary_1): Likewise.
2659         (decode_M_packet): Likewise.
2660         (decode_X_packet): Likewise.
2661         (look_up_one_symbol): Likewise.
2662         (relocate_instruction): Likewise.
2663         (monitor_output): Likewise.
2664         * server.c (handle_search_memory): Likewise.
2665         (handle_qxfer_exec_file): Likewise.
2666         (handle_qxfer_libraries): Likewise.
2667         (handle_qxfer): Likewise.
2668         (handle_query): Likewise.
2669         (handle_v_cont): Likewise.
2670         (handle_v_run): Likewise.
2671         (captured_main): Likewise.
2672         * target.c (write_inferior_memory): Likewise.
2673         * thread-db.c (try_thread_db_load_from_dir): Likewise.
2674         * tracepoint.c (init_trace_buffer): Likewise.
2675         (add_tracepoint_action): Likewise.
2676         (add_traceframe): Likewise.
2677         (add_traceframe_block): Likewise.
2678         (cmd_qtdpsrc): Likewise.
2679         (cmd_qtdv): Likewise.
2680         (cmd_qtstatus): Likewise.
2681         (response_source): Likewise.
2682         (response_tsv): Likewise.
2683         (cmd_qtnotes): Likewise.
2684         (gdb_collect): Likewise.
2685         (initialize_tracepoint): Likewise.
2686
2687 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
2688
2689         * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
2690         (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
2691         <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
2692         <NOP>: New.
2693         (enum aarch64_condition_codes): New enum.
2694         (w0): New static global.
2695         (fp): Likewise.
2696         (lr): Likewise.
2697         (struct aarch64_memory_operand) <type>: New
2698         MEMORY_OPERAND_POSTINDEX type.
2699         (postindex_memory_operand): New helper function.
2700         (emit_ret): New function.
2701         (emit_load_store_pair): New function, factored out of emit_stp
2702         with support for MEMORY_OPERAND_POSTINDEX.
2703         (emit_stp): Rewrite using emit_load_store_pair.
2704         (emit_ldp): New function.
2705         (emit_load_store): Likewise.
2706         (emit_ldr): Mention post-index instruction in comment.
2707         (emit_ldrh): New function.
2708         (emit_ldrb): New function.
2709         (emit_ldrsw): Mention post-index instruction in comment.
2710         (emit_str): Likewise.
2711         (emit_subs): New function.
2712         (emit_cmp): Likewise.
2713         (emit_and): Likewise.
2714         (emit_orr): Likewise.
2715         (emit_orn): Likewise.
2716         (emit_eor): Likewise.
2717         (emit_mvn): Likewise.
2718         (emit_lslv): Likewise.
2719         (emit_lsrv): Likewise.
2720         (emit_asrv): Likewise.
2721         (emit_mul): Likewise.
2722         (emit_sbfm): Likewise.
2723         (emit_sbfx): Likewise.
2724         (emit_ubfm): Likewise.
2725         (emit_ubfx): Likewise.
2726         (emit_csinc): Likewise.
2727         (emit_cset): Likewise.
2728         (emit_nop): Likewise.
2729         (emit_ops_insns): New helper function.
2730         (emit_pop): Likewise.
2731         (emit_push): Likewise.
2732         (aarch64_emit_prologue): New function.
2733         (aarch64_emit_epilogue): Likewise.
2734         (aarch64_emit_add): Likewise.
2735         (aarch64_emit_sub): Likewise.
2736         (aarch64_emit_mul): Likewise.
2737         (aarch64_emit_lsh): Likewise.
2738         (aarch64_emit_rsh_signed): Likewise.
2739         (aarch64_emit_rsh_unsigned): Likewise.
2740         (aarch64_emit_ext): Likewise.
2741         (aarch64_emit_log_not): Likewise.
2742         (aarch64_emit_bit_and): Likewise.
2743         (aarch64_emit_bit_or): Likewise.
2744         (aarch64_emit_bit_xor): Likewise.
2745         (aarch64_emit_bit_not): Likewise.
2746         (aarch64_emit_equal): Likewise.
2747         (aarch64_emit_less_signed): Likewise.
2748         (aarch64_emit_less_unsigned): Likewise.
2749         (aarch64_emit_ref): Likewise.
2750         (aarch64_emit_if_goto): Likewise.
2751         (aarch64_emit_goto): Likewise.
2752         (aarch64_write_goto_address): Likewise.
2753         (aarch64_emit_const): Likewise.
2754         (aarch64_emit_call): Likewise.
2755         (aarch64_emit_reg): Likewise.
2756         (aarch64_emit_pop): Likewise.
2757         (aarch64_emit_stack_flush): Likewise.
2758         (aarch64_emit_zero_ext): Likewise.
2759         (aarch64_emit_swap): Likewise.
2760         (aarch64_emit_stack_adjust): Likewise.
2761         (aarch64_emit_int_call_1): Likewise.
2762         (aarch64_emit_void_call_2): Likewise.
2763         (aarch64_emit_eq_goto): Likewise.
2764         (aarch64_emit_ne_goto): Likewise.
2765         (aarch64_emit_lt_goto): Likewise.
2766         (aarch64_emit_le_goto): Likewise.
2767         (aarch64_emit_gt_goto): Likewise.
2768         (aarch64_emit_ge_got): Likewise.
2769         (aarch64_emit_ops_impl): New static global variable.
2770         (aarch64_emit_ops): New target function, return
2771         &aarch64_emit_ops_impl.
2772         (struct linux_target_ops): Install it.
2773
2774 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
2775
2776         * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
2777         * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
2778         aarch64-ipa.o.
2779         * linux-aarch64-ipa.c: New file.
2780         * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
2781         and endian.h.
2782         (aarch64_get_thread_area): New target method.
2783         (extract_signed_bitfield): New helper function.
2784         (aarch64_decode_ldr_literal): New function.
2785         (enum aarch64_opcodes): New enum.
2786         (struct aarch64_register): New struct.
2787         (struct aarch64_operand): New struct.
2788         (x0): New static global.
2789         (x1): Likewise.
2790         (x2): Likewise.
2791         (x3): Likewise.
2792         (x4): Likewise.
2793         (w2): Likewise.
2794         (ip0): Likewise.
2795         (sp): Likewise.
2796         (xzr): Likewise.
2797         (aarch64_register): New helper function.
2798         (register_operand): Likewise.
2799         (immediate_operand): Likewise.
2800         (struct aarch64_memory_operand): New struct.
2801         (offset_memory_operand): New helper function.
2802         (preindex_memory_operand): Likewise.
2803         (enum aarch64_system_control_registers): New enum.
2804         (ENCODE): New macro.
2805         (emit_insn): New helper function.
2806         (emit_b): New function.
2807         (emit_bcond): Likewise.
2808         (emit_cb): Likewise.
2809         (emit_tb): Likewise.
2810         (emit_blr): Likewise.
2811         (emit_stp): Likewise.
2812         (emit_ldp_q_offset): Likewise.
2813         (emit_stp_q_offset): Likewise.
2814         (emit_load_store): Likewise.
2815         (emit_ldr): Likewise.
2816         (emit_ldrsw): Likewise.
2817         (emit_str): Likewise.
2818         (emit_ldaxr): Likewise.
2819         (emit_stxr): Likewise.
2820         (emit_stlr): Likewise.
2821         (emit_data_processing_reg): Likewise.
2822         (emit_data_processing): Likewise.
2823         (emit_add): Likewise.
2824         (emit_sub): Likewise.
2825         (emit_mov): Likewise.
2826         (emit_movk): Likewise.
2827         (emit_mov_addr): Likewise.
2828         (emit_mrs): Likewise.
2829         (emit_msr): Likewise.
2830         (emit_sevl): Likewise.
2831         (emit_wfe): Likewise.
2832         (append_insns): Likewise.
2833         (can_encode_int32_in): New helper function.
2834         (aarch64_relocate_instruction): New function.
2835         (aarch64_install_fast_tracepoint_jump_pad): Likewise.
2836         (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
2837         (struct linux_target_ops): Install aarch64_get_thread_area,
2838         aarch64_install_fast_tracepoint_jump_pad and
2839         aarch64_get_min_fast_tracepoint_insn_len.
2840
2841 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
2842
2843         * Makefile.in (aarch64-insn.o): New rule.
2844         * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
2845
2846 2015-09-21  Yao Qi  <yao.qi@linaro.org>
2847
2848         * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
2849
2850 2015-09-21  Yao Qi  <yao.qi@linaro.org>
2851
2852         * tracepoint.c (max_jump_pad_size): Remove.
2853
2854 2015-09-18  Yao Qi  <yao.qi@linaro.org>
2855
2856         * linux-aarch64-low.c: Don't include sys/uio.h.
2857         (ps_get_thread_area): Call aarch64_ps_get_thread_area.
2858
2859 2015-09-16  Wei-cheng Wang  <cole945@gmail.com>
2860
2861         * tracepoint.c (eval_result_type): Change prototype.
2862         (condition_true_at_tracepoint): Fix argument to compiled_cond.
2863
2864 2015-09-15  Pedro Alves  <palves@redhat.com>
2865
2866         * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
2867         Check whether to report exec events instead of checking whether
2868         multiprocess is enabled.
2869
2870 2015-09-15  Pedro Alves  <palves@redhat.com>
2871
2872         PR remote/18965
2873         * remote-utils.c (prepare_resume_reply): Merge
2874         TARGET_WAITKIND_VFORK_DONE switch case with the
2875         TARGET_WAITKIND_FORKED case.
2876
2877 2015-09-15  Yao Qi  <yao.qi@linaro.org>
2878
2879         * server.c (handle_query): Check string comparison using
2880         "else if" instead of "if".
2881
2882 2015-09-15  Yao Qi  <yao.qi@linaro.org>
2883
2884         * server.c (vCont_supported): New global variable.
2885         (handle_query): Set vCont_supported to 1 if "vContSupported+"
2886         matches.  Append ";vContSupported+" to own_buf.
2887         (handle_v_requests): Append ";s;S" to own_buf if target supports
2888         hardware single step or vCont_supported is false.
2889         (capture_main): Set vCont_supported to zero.
2890
2891 2015-09-15  Yao Qi  <yao.qi@linaro.org>
2892
2893         * linux-low.c (linux_supports_conditional_breakpoints): Rename
2894         it to ...
2895         (linux_supports_hardware_single_step): ... New function.
2896         (linux_target_ops): Update.
2897         * lynx-low.c (lynx_target_ops): Set field
2898         supports_hardware_single_step to target_can_do_hardware_single_step.
2899         * nto-low.c (nto_target_ops): Likewise.
2900         * spu-low.c (spu_target_ops): Likewise.
2901         * win32-low.c (win32_target_ops): Likewise.
2902         * target.c (target_can_do_hardware_single_step): New function.
2903         * target.h (struct target_ops) <supports_conditional_breakpoints>:
2904         Remove.  <supports_hardware_single_step>: New field.
2905         (target_supports_conditional_breakpoints): Remove.
2906         (target_supports_hardware_single_step): New macro.
2907         (target_can_do_hardware_single_step): Declare.
2908         * server.c (handle_query): Use target_supports_hardware_single_step
2909         instead of target_supports_conditional_breakpoints.
2910
2911 2015-09-15  Yao Qi  <yao.qi@linaro.org>
2912
2913         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
2914         function.
2915         (struct linux_target_ops the_low_target): Install
2916         aarch64_linux_siginfo_fixup.
2917
2918 2015-09-11  Don Breazeal  <donb@codesourcery.com>
2919             Luis Machado  <lgustavo@codesourcery.com>
2920
2921         * linux-low.c (linux_mourn): Static declaration.
2922         (linux_arch_setup): Move in front of
2923         handle_extended_wait.
2924         (linux_arch_setup_thread): New function.
2925         (handle_extended_wait): Handle exec events.  Call
2926         linux_arch_setup_thread.  Make event_lwp argument a
2927         pointer-to-a-pointer.
2928         (check_zombie_leaders): Do not check stopped threads.
2929         (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
2930         (linux_low_filter_event): Add lwp and thread for exec'ing
2931         non-leader thread if leader thread has been deleted.
2932         Refactor code into linux_arch_setup_thread and call it.
2933         Pass child lwp pointer by reference to handle_extended_wait.
2934         (linux_wait_for_event_filtered): Update comment.
2935         (linux_wait_1): Prevent clobbering exec event status.
2936         (linux_supports_exec_events): New function.
2937         (linux_target_ops) <supports_exec_events>: Initialize new member.
2938         * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
2939         new member.
2940         * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
2941         * server.c (report_exec_events): New global variable.
2942         (handle_query): Handle qSupported query for exec-events feature.
2943         (captured_main): Initialize report_exec_events.
2944         * server.h (report_exec_events): Declare new global variable.
2945         * target.h (struct target_ops) <supports_exec_events>: New
2946         member.
2947         (target_supports_exec_events): New macro.
2948         * win32-low.c (win32_target_ops) <supports_exec_events>:
2949         Initialize new member.
2950
2951 2015-09-09  Markus Metzger  <markus.t.metzger@intel.com>
2952
2953         * linux-low.c (linux_low_enable_btrace): Remove.
2954         (linux_target_ops): Replace linux_low_enable_btrace with
2955         linux_enable_btrace.
2956
2957 2015-09-03  Yao Qi  <yao.qi@linaro.org>
2958
2959         * linux-aarch64-low.c (aarch64_insert_point): Call
2960         aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2961         returns true.
2962
2963 2015-08-27  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2964
2965         * linux-low.c (check_stopped_by_breakpoint): Use
2966         GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2967
2968 2015-08-27  Pedro Alves  <palves@redhat.com>
2969
2970         * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2971
2972 2015-08-26  Simon Marchi  <simon.marchi@ericsson.com>
2973
2974         * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2975         the XNEW-family equivalent.
2976         (compile_bytecodes): Likewise.
2977         * dll.c (loaded_dll): Likewise.
2978         * event-loop.c (append_callback_event): Likewise.
2979         (create_file_handler): Likewise.
2980         (create_file_event): Likewise.
2981         * hostio.c (handle_open): Likewise.
2982         * inferiors.c (add_thread): Likewise.
2983         (add_process): Likewise.
2984         * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2985         * linux-arm-low.c (arm_new_process): Likewise.
2986         (arm_new_thread): Likewise.
2987         * linux-low.c (add_to_pid_list): Likewise.
2988         (linux_add_process): Likewise.
2989         (handle_extended_wait): Likewise.
2990         (add_lwp): Likewise.
2991         (enqueue_one_deferred_signal): Likewise.
2992         (enqueue_pending_signal): Likewise.
2993         (linux_resume_one_lwp_throw): Likewise.
2994         (linux_resume_one_thread): Likewise.
2995         (linux_read_memory): Likewise.
2996         (linux_write_memory): Likewise.
2997         * linux-mips-low.c (mips_linux_new_process): Likewise.
2998         (mips_linux_new_thread): Likewise.
2999         (mips_add_watchpoint): Likewise.
3000         * linux-x86-low.c (initialize_low_arch): Likewise.
3001         * lynx-low.c (lynx_add_process): Likewise.
3002         * mem-break.c (set_raw_breakpoint_at): Likewise.
3003         (set_breakpoint): Likewise.
3004         (add_condition_to_breakpoint): Likewise.
3005         (add_commands_to_breakpoint): Likewise.
3006         (clone_agent_expr): Likewise.
3007         (clone_one_breakpoint): Likewise.
3008         * regcache.c (new_register_cache): Likewise.
3009         * remote-utils.c (look_up_one_symbol): Likewise.
3010         * server.c (queue_stop_reply): Likewise.
3011         (start_inferior): Likewise.
3012         (queue_stop_reply_callback): Likewise.
3013         (handle_target_event): Likewise.
3014         * spu-low.c (fetch_ppc_memory): Likewise.
3015         (store_ppc_memory): Likewise.
3016         * target.c (set_target_ops): Likewise.
3017         * thread-db.c (thread_db_load_search): Likewise.
3018         (try_thread_db_load_1): Likewise.
3019         * tracepoint.c (add_tracepoint): Likewise.
3020         (add_tracepoint_action): Likewise.
3021         (create_trace_state_variable): Likewise.
3022         (cmd_qtdpsrc): Likewise.
3023         (cmd_qtro): Likewise.
3024         (add_while_stepping_state): Likewise.
3025         * win32-low.c (child_add_thread): Likewise.
3026         (get_image_name): Likewise.
3027
3028 2015-08-25  Yao Qi  <yao.qi@linaro.org>
3029
3030         * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
3031
3032 2015-08-25  Yao Qi  <yao.qi@linaro.org>
3033
3034         * Makefile.in (aarch64-linux.o): New rule.
3035         * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
3036         srv_tgtobj.
3037         * linux-aarch64-low.c: Include nat/aarch64-linux.h.
3038         (aarch64_init_debug_reg_state): Make it extern.
3039         (aarch64_linux_prepare_to_resume): Remove.
3040
3041 2015-08-25  Yao Qi  <yao.qi@linaro.org>
3042
3043         * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
3044         lwp_arch_private_info and ptid_of_lwp.
3045
3046 2015-08-25  Yao Qi  <yao.qi@linaro.org>
3047
3048         * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
3049         Find proc_info by find_process_pid.  All callers updated.
3050
3051 2015-08-25  Yao Qi  <yao.qi@linaro.org>
3052
3053         * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
3054         Remove.
3055         (debug_reg_change_callback): Remove.
3056         (aarch64_notify_debug_reg_change): Remove.
3057
3058 2015-08-25  Yao Qi  <yao.qi@linaro.org>
3059
3060         * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
3061         Call current_lwp_ptid.
3062
3063 2015-08-25  Yao Qi  <yao.qi@linaro.org>
3064
3065         * linux-aarch64-low.c (debug_reg_change_callback): Use
3066         debug_printf.
3067
3068 2015-08-25  Yao Qi  <yao.qi@linaro.org>
3069
3070         * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
3071
3072 2015-08-25  Yao Qi  <yao.qi@linaro.org>
3073
3074         * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
3075
3076 2015-08-25  Yao Qi  <yao.qi@linaro.org>
3077
3078         * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
3079         the code.
3080
3081 2015-08-25  Yao Qi  <yao.qi@linaro.org>
3082
3083         * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
3084         Remove.
3085         (debug_reg_change_callback): Remove argument entry and add argument
3086         lwp.  Remove local variable thread.  Don't print thread id in the
3087         debugging output.  Don't check whether pid of thread equals to pid.
3088         (aarch64_notify_debug_reg_change): Don't set param.pid.  Call
3089         iterate_over_lwps instead find_inferior.
3090
3091 2015-08-24  Pedro Alves  <palves@redhat.com>
3092
3093         * inferiors.c (get_first_process): New function.
3094         * inferiors.h (get_first_process): New declaration.
3095         * remote-utils.c (read_ptid): Default to the first process in the
3096         list, instead of to the current thread's process.
3097
3098 2015-08-24  Pedro Alves  <palves@redhat.com>
3099
3100         * debug.c: Include gdb_sys_time.h instead of sys/time.h.
3101         * event-loop.c: Likewise.
3102         * remote-utils.c: Likewise.
3103         * tracepoint.c: Likewise.
3104
3105 2015-08-24  Pedro Alves  <palves@redhat.com>
3106
3107         * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
3108         ptid_get_lwp.
3109
3110 2015-08-21  Pedro Alves  <palves@redhat.com>
3111
3112         * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
3113         instead of literal 1.
3114
3115 2015-08-21  Pedro Alves  <palves@redhat.com>
3116
3117         * tdesc.c (default_description): Explicitly zero-initialize.
3118
3119 2015-08-21  Pedro Alves  <palves@redhat.com>
3120
3121         PR gdb/18749
3122         * inferiors.c (remove_thread): Discard any pending stop reply for
3123         this thread.
3124         * server.c (remove_all_on_match_pid): Rename to ...
3125         (remove_all_on_match_ptid): ... this.  Work with a filter ptid
3126         instead of a pid.
3127         (discard_queued_stop_replies): Change parameter to a ptid.  Now
3128         extern.
3129         (handle_v_kill, kill_inferior_callback, captured_main)
3130         (process_serial_event): Adjust.
3131         * server.h (discard_queued_stop_replies): Declare.
3132
3133 2015-08-21  Pedro Alves  <palves@redhat.com>
3134
3135         * linux-low.c (wait_for_sigstop): Always switch to no thread
3136         selected if the previously current thread dies.
3137         * lynx-low.c (lynx_request_interrupt): Use the first thread's
3138         process instead of the current thread's.
3139         * remote-utils.c (input_interrupt): Don't check if there's no
3140         current thread.
3141         * server.c (gdb_read_memory, gdb_write_memory): If setting the
3142         current thread to the general thread fails, error out.
3143         (handle_qxfer_auxv, handle_qxfer_libraries)
3144         (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
3145         (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
3146         (handle_query): Check if there's a thread selected instead of
3147         checking whether there's any thread in the thread list.
3148         (handle_qxfer_threads, handle_qxfer_btrace)
3149         (handle_qxfer_btrace_conf): Don't error out early if there's no
3150         thread in the thread list.
3151         (handle_v_cont, myresume): Don't set the current thread to the
3152         continue thread.
3153         (process_serial_event) <Hg handling>: Also set thread_id if the
3154         previous general thread is still alive.
3155         (process_serial_event) <g/G handling>: If setting the current
3156         thread to the general thread fails, error out.
3157         * spu-low.c (spu_resume, spu_request_interrupt): Use the first
3158         thread's lwp instead of the current thread's.
3159         * target.c (set_desired_thread): If the desired thread was not
3160         found, leave the current thread pointing to NULL.  Return an int
3161         (boolean) indicating success.
3162         * target.h (set_desired_thread): Change return type to int.
3163
3164 2015-08-20  Max Filippov  <jcmvbkbc@gmail.com>
3165
3166         * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
3167         * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
3168         #includes.
3169         (ps_get_thread_area): New function.
3170
3171 2015-08-19  Gary Benson  <gbenson@redhat.com>
3172
3173         * hostio.c (handle_pread): Do not attempt to read more data
3174         than hostio_reply_with_data can fit in a packet.
3175
3176 2015-08-18  Joel Brobecker  <brobecker@adacore.com>
3177
3178         * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
3179
3180 2015-08-14  Matthew Fortune  <matthew.fortune@imgtec.com>
3181
3182         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
3183
3184 2015-08-06  Pedro Alves  <palves@redhat.com>
3185
3186         * tracepoint.c (expr_eval_result): Now an int.
3187
3188 2015-08-06  Pedro Alves  <palves@redhat.com>
3189
3190         * gdbthread.h (struct regcache): Forward declare.
3191         (struct thread_info) <regcache_data>: Now a struct regcache
3192         pointer.
3193         * inferiors.c (inferior_regcache_data)
3194         (set_inferior_regcache_data): Now work with struct regcache
3195         pointers.
3196         * inferiors.h (struct regcache): Forward declare.
3197         (inferior_regcache_data, set_inferior_regcache_data): Now work
3198         with struct regcache pointers.
3199         * regcache.c (get_thread_regcache, regcache_invalidate_thread)
3200         (free_register_cache_thread): Remove struct regcache pointer
3201         casts.
3202
3203 2015-08-06  Pedro Alves  <palves@redhat.com>
3204
3205         * server.c (captured_main): On error, print the exception message
3206         to stderr, and if run_once is set, throw a quit.
3207
3208 2015-08-06  Pedro Alves  <palves@redhat.com>
3209
3210         * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
3211         the current thread.
3212
3213 2015-08-06  Pedro Alves  <palves@redhat.com>
3214
3215         * linux-low.c (linux_write_memory): Rewrite debug output to avoid
3216         reading beyond the passed in buffer length.
3217
3218 2015-08-06  Pierre Langlois  <pierre.langlois@arm.com>
3219
3220         * tracepoint.c (symbol_list) <required>: Remove.
3221
3222 2015-08-06  Pedro Alves  <palves@redhat.com>
3223
3224         * linux-low.c (handle_extended_wait): Set the fork child's suspend
3225         count if stopping and suspending threads.
3226         (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
3227         stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
3228         (linux_detach): Complete an ongoing step-over.
3229         (lwp_suspended_inc, lwp_suspended_decr): New functions.  Use
3230         throughout.
3231         (resume_stopped_resumed_lwps): Don't resume a suspended thread.
3232         (linux_wait_1): If passing a signal to the inferior after
3233         finishing a step-over, unsuspend and re-resume all lwps.  If we
3234         see a single-step event but the thread should be continuing, don't
3235         pass the trap to gdb.
3236         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
3237         internal_error instead of gdb_assert.
3238         (enqueue_pending_signal): New function.
3239         (check_ptrace_stopped_lwp_gone): Add debug output.
3240         (start_step_over): Use internal_error instead of gdb_assert.
3241         (complete_ongoing_step_over): New function.
3242         (linux_resume_one_thread): Don't resume a suspended thread.
3243         (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
3244         it stepping.
3245
3246 2015-08-06  Pedro Alves  <palves@redhat.com>
3247
3248         * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
3249         (linux_thread_alive): Use lwp_is_marked_dead.
3250         (extended_event_reported): Delete.
3251         (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
3252         instead of extended_event_reported.
3253         (mark_lwp_dead): Don't set the 'dead' flag.  Store the waitstatus
3254         as well.
3255         (lwp_is_marked_dead): New function.
3256         (lwp_running): Use lwp_is_marked_dead.
3257         * linux-low.h: Delete 'dead' field, and update 'waitstatus's
3258         comment.
3259
3260 2015-08-06  Pedro Alves  <palves@redhat.com>
3261
3262         * linux-low.c (linux_wait_1): Move fork event output out of the
3263         !report_to_gdb check.  Pass event_child->waitstatus to
3264         target_waitstatus_to_string instead of ourstatus.
3265
3266 2015-08-04  Yao Qi  <yao.qi@linaro.org>
3267
3268         * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
3269         if current_thread is 32 bit.
3270
3271 2015-08-04  Yao Qi  <yao.qi@linaro.org>
3272
3273         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3274         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3275         * server.c (extended_protocol): Remove "static".
3276         * server.h (extended_protocol): Declare it.
3277
3278 2015-08-04  Yao Qi  <yao.qi@linaro.org>
3279
3280         * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
3281         both aarch64 and aarch32.
3282         (aarch64_set_pc): Likewise.
3283
3284 2015-08-04  Yao Qi  <yao.qi@linaro.org>
3285
3286         * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
3287         to srv_regobj and append arm-core.xml arm-vfpv3.xml and
3288         arm-with-neon.xml to srv_xmlfiles.
3289         * linux-aarch64-low.c: Include linux-aarch32-low.h.
3290         (is_64bit_tdesc): New function.
3291         (aarch64_linux_read_description): New function.
3292         (aarch64_arch_setup): Call aarch64_linux_read_description.
3293         (regs_info): Rename to regs_info_aarch64.
3294         (aarch64_regs_info): Return right regs_info.
3295         (initialize_low_arch): Call initialize_low_arch_aarch32.
3296
3297 2015-08-04  Yao Qi  <yao.qi@linaro.org>
3298
3299         * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
3300         * linux-aarch32-low.c: New file.
3301         * linux-aarch32-low.h: New file.
3302         * linux-arm-low.c (arm_fill_gregset): Move it to
3303         linux-aarch32-low.c.
3304         (arm_store_gregset): Likewise.
3305         (arm_fill_vfpregset): Call arm_fill_vfpregset_num
3306         (arm_store_vfpregset): Call arm_store_vfpregset_num.
3307         (arm_arch_setup): Check if PTRACE_GETREGSET works.
3308         (regs_info): Rename to regs_info_arm.
3309         (arm_regs_info): Return regs_info_aarch32 if
3310         have_ptrace_getregset is 1 and target description is
3311         arm_with_neon or arm_with_vfpv3.
3312         (initialize_low_arch): Don't call init_registers_arm_with_neon.
3313         Call initialize_low_arch_aarch32 instead.
3314
3315 2015-08-04  Yao Qi  <yao.qi@linaro.org>
3316
3317         * linux-x86-low.c (have_ptrace_getregset): Move it to ...
3318         * linux-low.c: ... here.
3319         * linux-low.h (have_ptrace_getregset): Declare it.
3320
3321 2015-08-04  Pedro Alves  <palves@redhat.com>
3322
3323         * thread-db.c (struct thread_db): Use new typedefs.
3324         (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
3325         CHK calls.
3326         (disable_thread_event_reporting): Cast result of dlsym to
3327         destination function pointer type.
3328         (thread_db_mourn): Use td_ta_delete_ftype.
3329
3330 2015-08-03  Sandra Loosemore  <sandra@codesourcery.com>
3331
3332         * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
3333         arch variant.
3334         (CDX_BREAKPOINT): Define for R2.
3335         (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
3336         (the_low_target): Add comments.
3337
3338 2015-07-30  Yao Qi  <yao.qi@linaro.org>
3339
3340         * linux-arm-low.c (arm_hwcap): Remove it.
3341         (arm_read_description): New local variable arm_hwcap.  Don't
3342         set arm_hwcap to zero.
3343
3344 2015-07-30  Yao Qi  <yao.qi@linaro.org>
3345
3346         * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
3347         Use regcache->tdesc instead.
3348         (arm_store_wmmxregset): Likewise.
3349         (arm_fill_vfpregset): Likewise.
3350         (arm_store_vfpregset): Likewise.
3351
3352 2015-07-30  Yao Qi  <yao.qi@linaro.org>
3353
3354         * linux-arm-low.c: Include arch/arm.h.
3355         (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
3356         (arm_store_gregset): Likewise.
3357
3358 2015-07-29  Simon Marchi  <simon.marchi@ericsson.com>
3359
3360         * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
3361         ptrace's 4th parameter.
3362
3363 2015-07-27  Yao Qi  <yao.qi@linaro.org>
3364
3365         * configure.srv (case aarch64*-*-linux*): Don't set
3366         srv_linux_usrregs.
3367
3368 2015-07-24  Pedro Alves  <palves@redhat.c: Likewise.om>
3369
3370         * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
3371         sys/ptrace.h.
3372         * linux-arm-low.c: Likewise.
3373         * linux-cris-low.c: Likewise.
3374         * linux-crisv32-low.c: Likewise.
3375         * linux-low.c: Likewise.
3376         * linux-m68k-low.c: Likewise.
3377         * linux-mips-low.c: Likewise.
3378         * linux-nios2-low.c: Likewise.
3379         * linux-s390-low.c: Likewise.
3380         * linux-sparc-low.c: Likewise.
3381         * linux-tic6x-low.c: Likewise.
3382         * linux-tile-low.c: Likewise.
3383         * linux-x86-low.c: Likewise.
3384
3385 2015-07-24  Pedro Alves  <palves@redhat.com>
3386
3387         * config.in: Regenerate.
3388         * configure: Regenerate.
3389
3390 2015-07-24  Pedro Alves  <palves@redhat.com>
3391
3392         * acinclude.m4: Include ../ptrace.m4.
3393         * configure.ac: Call GDB_AC_PTRACE.
3394         * config.in, configure: Regenerate.
3395
3396 2015-07-24  Yao Qi  <yao.qi@linaro.org>
3397
3398         * linux-low.c (linux_create_inferior): Remove setting to
3399         proc->priv->new_inferior.
3400         (linux_attach): Likewise.
3401         (linux_low_filter_event): Likewise.
3402         * linux-low.h (struct process_info_private) <new_inferior>: Remove.
3403
3404 2015-07-24  Yao Qi  <yao.qi@linaro.org>
3405
3406         * linux-low.c (linux_arch_setup): New function.
3407         (linux_low_filter_event): If proc->tdesc is NULL and
3408         proc->attached is true, call the_low_target.arch_setup.
3409         Otherwise, keep status pending, and return.
3410         (linux_resume_one_lwp_throw): Don't call get_pc if
3411         thread->while_stepping isn't NULL.  Don't call
3412         get_thread_regcache if proc->tdesc is NULL.
3413         (need_step_over_p): Return 0 if proc->tdesc is NULL.
3414         (linux_target_ops): Install arch_setup.
3415         * server.c (start_inferior): Call the_target->arch_setup.
3416         * target.h (struct target_ops) <arch_setup>: New field.
3417         (target_arch_setup): New marco.
3418         * lynx-low.c (lynx_target_ops): Update.
3419         * nto-low.c (nto_target_ops): Update.
3420         * spu-low.c (spu_target_ops): Update.
3421         * win32-low.c (win32_target_ops): Update.
3422
3423 2015-07-24  Yao Qi  <yao.qi@linaro.org>
3424
3425         * linux-low.c (linux_add_process): Don't set
3426         proc->priv->new_inferior.
3427         (linux_create_inferior): Set proc->priv->new_inferior to 1.
3428         (linux_attach): Likewise.
3429
3430 2015-07-24  Yao Qi  <yao.qi@linaro.org>
3431
3432         * server.c (start_inferior): Code refactor.
3433
3434 2015-07-24  Yao Qi  <yao.qi@linaro.org>
3435
3436         * server.c (process_serial_event): Set general_thread.
3437
3438 2015-07-21  Yao Qi  <yao.qi@linaro.org>
3439
3440         * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
3441         aarch64_linux_get_debug_reg_capacity.
3442
3443 2015-07-17  Yao Qi  <yao.qi@linaro.org>
3444
3445         * Makefile.in (aarch64-linux-hw-point.o): New rule.
3446         * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
3447         * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
3448         (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
3449         (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
3450         (AARCH64_HWP_ALIGNMENT): Likewise.
3451         (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
3452         (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
3453         (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
3454         (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
3455         (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
3456         (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
3457         (struct aarch64_debug_reg_state): Likewise.
3458         (struct arch_lwp_info): Likewise.
3459         (aarch64_align_watchpoint): Likewise.
3460         (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
3461         (aarch64_watchpoint_length): Likewise.
3462         (aarch64_point_encode_ctrl_reg): Likewise
3463         (aarch64_point_is_aligned): Likewise.
3464         (aarch64_align_watchpoint): Likewise.
3465         (aarch64_linux_set_debug_regs):
3466         (aarch64_dr_state_insert_one_point): Likewise.
3467         (aarch64_dr_state_remove_one_point): Likewise.
3468         (aarch64_handle_breakpoint): Likewise.
3469         (aarch64_handle_aligned_watchpoint): Likewise.
3470         (aarch64_handle_unaligned_watchpoint): Likewise.
3471         (aarch64_handle_watchpoint): Likewise.
3472
3473 2015-07-17  Yao Qi  <yao.qi@linaro.org>
3474
3475         * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
3476         and don't aarch64_get_debug_reg_state.  All callers update.
3477         (aarch64_handle_aligned_watchpoint): Likewise.
3478         (aarch64_handle_unaligned_watchpoint): Likewise.
3479         (aarch64_handle_watchpoint): Likewise.
3480         (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
3481         (aarch64_remove_point): Likewise.
3482
3483 2015-07-17  Yao Qi  <yao.qi@linaro.org>
3484
3485         * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
3486         debug_printf.
3487         (aarch64_handle_unaligned_watchpoint): Likewise.
3488
3489 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
3490
3491         Revert the previous 3 commits:
3492         Move gdb_regex* to common/
3493         Move linux_find_memory_regions_full & co.
3494         gdbserver build-id attribute generator
3495
3496 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
3497             Jan Kratochvil  <jan.kratochvil@redhat.com>
3498
3499         gdbserver build-id attribute generator.
3500         * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
3501         (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
3502         (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
3503         (find_phdr): New.
3504         (get_dynamic): Use find_pdhr to traverse program headers.
3505         (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
3506         (compare_mapping_entry_range, struct find_memory_region_callback_data)
3507         (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
3508         (get_hex_build_id): New.
3509         (linux_qxfer_libraries_svr4): Add optional build-id attribute
3510         to reply XML document.
3511
3512 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
3513             Jan Kratochvil  <jan.kratochvil@redhat.com>
3514
3515         * target.c: Include target/target-utils.h and fcntl.h.
3516         (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
3517         (target_fileio_read_stralloc): New functions.
3518
3519 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
3520
3521         * Makefile.in (OBS): Add gdb_regex.o.
3522         (gdb_regex.o): New.
3523         * config.in: Rebuilt.
3524         * configure: Rebuilt.
3525
3526 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
3527             Jan Kratochvil  <jan.kratochvil@redhat.com>
3528
3529         Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
3530         * Makefile.in (OBS): Add target-utils.o.
3531         (linux-maps.o, target-utils.o): New.
3532         * configure.srv (srv_linux_obj): Add linux-maps.o.
3533
3534 2015-07-15  Pierre Langlois  <pierre.langlois@arm.com>
3535
3536         * linux-aarch64-low.c (aarch64_supports_range_stepping): New
3537         function, return 1.
3538         (the_low_target): Install it.
3539
3540 2015-07-14  Pedro Alves  <palves@redhat.com>
3541
3542         * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
3543         Instead, ignore ECHILD, and throw an error for other errnos.
3544
3545 2015-07-10  Pedro Alves  <palves@redhat.com>
3546
3547         * event-loop.c (struct callback_event) <data>: Change type to
3548         gdb_client_data instance instead of gdb_client_data pointer.
3549         (append_callback_event): Adjust.
3550
3551 2015-07-10  Pierre Langlois  <pierre.langlois@arm.com>
3552
3553         * linux-aarch64-low.c: Add comments for each linux_target_ops
3554         method.  Remove comments already covered in target_ops and
3555         linux_target_ops definitions.
3556         (the_low_target): Add comments for each unimplemented method.
3557
3558 2015-07-09  Yao Qi  <yao.qi@linaro.org>
3559
3560         * linux-aarch64-low.c (aarch64_regmap): Remove.
3561         (aarch64_usrregs_info): Remove.
3562         (regs_info): Set field usrregs to NULL.
3563
3564 2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
3565
3566         * linux-low.c: Include "rsp-low.h"
3567         (linux_low_encode_pt_config, linux_low_encode_raw): New.
3568         (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
3569         (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
3570         (handle_btrace_enable_pt): New.
3571         (handle_btrace_general_set): Support "pt".
3572         (handle_btrace_conf_general_set): Support "pt:size".
3573
3574 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
3575
3576         * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
3577         Z_PACKET_SW_BP.
3578
3579 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
3580
3581         * linux-aarch64-low.c: Remove comment about endianness.
3582         (aarch64_breakpoint): Change type to gdb_byte[].  Set to "brk #0".
3583         (aarch64_breakpoint_at): Change type of insn to gdb_byte[].  Use
3584         memcmp.
3585
3586 2015-06-24  Gary Benson  <gbenson@redhat.com>
3587
3588         * linux-i386-ipa.c (stdint.h): Do not include.
3589         * lynx-i386-low.c (stdint.h): Likewise.
3590         * lynx-ppc-low.c (stdint.h): Likewise.
3591         * mem-break.c (stdint.h): Likewise.
3592         * thread-db.c (stdint.h): Likewise.
3593         * tracepoint.c (stdint.h): Likewise.
3594         * win32-low.c (stdint.h): Likewise.
3595
3596 2015-06-18  Simon Marchi  <simon.marchi@ericsson.com>
3597
3598         * server.c (write_qxfer_response): Update call to
3599         remote_escape_output.
3600
3601 2015-06-15  Aleksandar Ristovski  <aristovski@qnx.com
3602             Jan Kratochvil  <jan.kratochvil@redhat.com>
3603
3604         Merge multiple hex conversions.
3605         * gdbreplay.c (tohex): Rename to 'fromhex'.
3606         (logchar): Use fromhex.
3607
3608 2015-06-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
3609
3610         * server.c (handle_qxfer_libraries): Set `version' attribute for
3611         <library-list>.
3612
3613 2015-06-10  Gary Benson  <gbenson@redhat.com>
3614
3615         * target.h (struct target_ops) <multifs_open>: New field.
3616         <multifs_unlink>: Likewise.
3617         <multifs_readlink>: Likewise.
3618         * linux-low.c (nat/linux-namespaces.h): New include.
3619         (linux_target_ops): Initialize the_target->multifs_open,
3620         the_target->multifs_unlink and the_target->multifs_readlink.
3621         * hostio.h (hostio_handle_new_gdb_connection): New declaration.
3622         * hostio.c (hostio_fs_pid): New static variable.
3623         (hostio_handle_new_gdb_connection): New function.
3624         (handle_setfs): Likewise.
3625         (handle_open): Use the_target->multifs_open as appropriate.
3626         (handle_unlink): Use the_target->multifs_unlink as appropriate.
3627         (handle_readlink): Use the_target->multifs_readlink as
3628         appropriate.
3629         (handle_vFile): Handle vFile:setfs packets.
3630         * server.c (handle_query): Call hostio_handle_new_gdb_connection
3631         after target_handle_new_gdb_connection.
3632
3633 2015-06-10  Gary Benson  <gbenson@redhat.com>
3634
3635         * configure.ac (AC_CHECK_FUNCS): Add setns.
3636         * config.in: Regenerate.
3637         * configure: Likewise.
3638         * Makefile.in (SFILES): Add nat/linux-namespaces.c.
3639         (linux-namespaces.o): New rule.
3640         * configure.srv (srv_linux_obj): Add linux-namespaces.o.
3641
3642 2015-06-09  Gary Benson <gbenson@redhat.com>
3643
3644         * hostio.c (handle_open): Process mode argument with
3645         fileio_to_host_mode.
3646
3647 2015-06-01  Yao Qi  <yao.qi@linaro.org>
3648
3649         * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
3650         * linux-x86-low.c: Likewise.
3651
3652 2015-05-28  Don Breazeal  <donb@codesourcery.com>
3653
3654         * linux-low.c (handle_extended_wait): Initialize
3655         thread_info.last_resume_kind for new fork children.
3656
3657 2015-05-15  Pedro Alves  <palves@redhat.com>
3658
3659         * target.h (target_handle_new_gdb_connection): Rewrite using if
3660         wrapped in do/while.
3661
3662 2015-05-14  Joel Brobecker  <brobecker@adacore.com>
3663
3664         * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
3665         * configure, config.in: Regenerate.
3666         * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
3667         Declare typedef.
3668
3669 2015-05-12  Don Breazeal  <donb@codesourcery.com>
3670
3671         * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
3672         PTRACE_EVENT_VFORK_DONE.
3673         (linux_low_ptrace_options, extended_event_reported): Add vfork
3674         events.
3675         * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
3676         and "vforkdone" for RSP 'T' Stop Reply Packet.
3677         * server.h (report_vfork_events): Declare
3678         global variable.
3679
3680 2015-05-12  Don Breazeal  <donb@codesourcery.com>
3681
3682         * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
3683         (the_low_target) <new_fork>: Initialize new member.
3684         * linux-arm-low.c (arm_new_fork): New function.
3685         (the_low_target) <new_fork>: Initialize new member.
3686         * linux-low.c (handle_extended_wait): Call new target function
3687         new_fork.
3688         * linux-low.h (struct linux_target_ops) <new_fork>: New member.
3689         * linux-mips-low.c (mips_add_watchpoint): New function
3690         extracted from mips_insert_point.
3691         (the_low_target) <new_fork>: Initialize new member.
3692         (mips_linux_new_fork): New function.
3693         (mips_insert_point): Call mips_add_watchpoint.
3694         * linux-x86-low.c (x86_linux_new_fork): New function.
3695         (the_low_target) <new_fork>: Initialize new member.
3696
3697 2015-05-12  Don Breazeal  <donb@codesourcery.com>
3698
3699         * linux-low.c (handle_extended_wait): Implement return value,
3700         rename argument 'event_child' to 'event_lwp', handle
3701         PTRACE_EVENT_FORK, call internal_error for unrecognized event.
3702         (linux_low_ptrace_options): New function.
3703         (linux_low_filter_event): Call linux_low_ptrace_options,
3704         use different argument fo linux_enable_event_reporting,
3705         use return value from handle_extended_wait.
3706         (extended_event_reported): New function.
3707         (linux_wait_1): Call extended_event_reported and set
3708         status to report fork events.
3709         (linux_write_memory): Add pid to debug message.
3710         (reset_lwp_ptrace_options_callback): New function.
3711         (linux_handle_new_gdb_connection): New function.
3712         (linux_target_ops): Initialize new structure member.
3713         * linux-low.h (struct lwp_info) <waitstatus>: New member.
3714         * lynx-low.c: Initialize new structure member.
3715         * remote-utils.c (prepare_resume_reply): Implement stop reason
3716         "fork" for "T" stop message.
3717         * server.c (handle_query): Call handle_new_gdb_connection.
3718         * server.h (report_fork_events): Declare global flag.
3719         * target.h (struct target_ops) <handle_new_gdb_connection>:
3720         New member.
3721         (target_handle_new_gdb_connection): New macro.
3722         * win32-low.c: Initialize new structure member.
3723
3724 2015-05-12  Don Breazeal  <donb@codesourcery.com>
3725
3726         * mem-break.c (APPEND_TO_LIST): Define macro.
3727         (clone_agent_expr): New function.
3728         (clone_one_breakpoint): New function.
3729         (clone_all_breakpoints): New function.
3730         * mem-break.h: Declare new functions.
3731
3732 2015-05-12  Don Breazeal  <donb@codesourcery.com>
3733
3734         * linux-low.c (linux_supports_fork_events): New function.
3735         (linux_supports_vfork_events): New function.
3736         (linux_target_ops): Initialize new structure members.
3737         (initialize_low): Call linux_check_ptrace_features.
3738         * lynx-low.c (lynx_target_ops): Initialize new structure
3739         members.
3740         * server.c (report_fork_events, report_vfork_events):
3741         New global flags.
3742         (handle_query): Add new features to qSupported packet and
3743         response.
3744         (captured_main): Initialize new global variables.
3745         * target.h (struct target_ops) <supports_fork_events>:
3746         New member.
3747         <supports_vfork_events>: New member.
3748         (target_supports_fork_events): New macro.
3749         (target_supports_vfork_events): New macro.
3750         * win32-low.c (win32_target_ops): Initialize new structure
3751         members.
3752
3753 2015-05-12  Gary Benson <gbenson@redhat.com>
3754
3755         * server.c (handle_qxfer_exec_file): Use current process
3756         if annex is empty.
3757
3758 2015-05-08  Sandra Loosemore  <sandra@codesourcery.com>
3759
3760         * linux-nios2-low.c: Include elf/common.h.  Adjust comments.
3761         Remove HAVE_PTRACE_GETREGS conditionals.
3762         (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
3763         instead of PTRACE_GETREGS and PTRACE_SETREGS.
3764
3765 2015-05-08  Yao Qi  <yao.qi@linaro.org>
3766
3767         * linux-low.c (linux_supports_conditional_breakpoints): New
3768         function.
3769         (linux_target_ops): Install new target method.
3770         * lynx-low.c (lynx_target_ops): Install NULL hook for
3771         supports_conditional_breakpoints.
3772         * nto-low.c (nto_target_ops): Likewise.
3773         * spu-low.c (spu_target_ops): Likewise.
3774         * win32-low.c (win32_target_ops): Likewise.
3775         * server.c (handle_query): Check
3776         target_supports_conditional_breakpoints.
3777         * target.h (struct target_ops) <supports_conditional_breakpoints>:
3778         New field.
3779         (target_supports_conditional_breakpoints): New macro.
3780
3781 2015-05-06  Pedro Alves  <palves@redhat.com>
3782
3783         PR server/18081
3784         * server.c (start_inferior): If the process exits, mourn it.
3785
3786 2015-04-21  Gary Benson <gbenson@redhat.com>
3787
3788         * hostio.c (fileio_open_flags_to_host): Factored out to
3789         fileio_to_host_openflags in common/fileio.c.  Single use
3790         updated.
3791
3792 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
3793
3794         * linux-xtensa-low.c (xtensa_fill_gregset)
3795         (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
3796         XCHAL_HAVE_LOOP.
3797
3798 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
3799
3800         * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
3801         (regs_info): Replace usrregs pointer with NULL.
3802
3803 2015-04-17  Gary Benson  <gbenson@redhat.com>
3804
3805         * target.h (struct target_ops) <pid_to_exec_file>: New field.
3806         * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
3807         * server.c (handle_qxfer_exec_file): New function.
3808         (qxfer_packets): Add exec-file entry.
3809         (handle_query): Report qXfer:exec-file:read as supported packet.
3810
3811 2015-04-14  Romain Naour <romain.naour@openwide.fr>  (tiny change)
3812
3813         * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
3814
3815 2015-04-09  Gary Benson <gbenson@redhat.com>
3816
3817         * hostio-errno.c (errno_to_fileio_error): Remove function.
3818         Update caller to use remote_fileio_to_fio_error.
3819
3820 2015-04-09  Yao Qi  <yao.qi@linaro.org>
3821
3822         * linux-low.c (linux_insert_point): Call
3823         insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
3824         (linux_remove_point): Call remove_memory_breakpoint if type is
3825         raw_bkpt_type_sw.
3826         * linux-x86-low.c (x86_insert_point): Don't call
3827         insert_memory_breakpoint.
3828         (x86_remove_point): Don't call remove_memory_breakpoint.
3829
3830 2015-04-01  Pedro Alves  <palves@redhat.com>
3831             Cleber Rosa  <crosa@redhat.com>
3832
3833         * server.c (gdbserver_usage): Reorganize and extend the usage
3834         message.
3835
3836 2015-03-24  Pedro Alves  <palves@redhat.com>
3837
3838         * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
3839         output.  Also dump TRAP_TRACE.
3840         (linux_low_filter_event): In debug output, distinguish a
3841         resume_stop SIGSTOP from a delayed SIGSTOP.
3842
3843 2015-03-24  Gary Benson  <gbenson@redhat.com>
3844
3845         * linux-x86-low.c (x86_linux_new_thread): Moved to
3846         nat/x86-linux.c.
3847         (x86_linux_prepare_to_resume): Likewise.
3848
3849 2015-03-24  Gary Benson  <gbenson@redhat.com>
3850
3851         * Makefile.in (x86-linux-dregs.o): New rule.
3852         * configure.srv: Add x86-linux-dregs.o to relevant targets.
3853         * linux-x86-low.c: Include nat/x86-linux-dregs.h.
3854         (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
3855         (x86_linux_dr_get): Likewise.
3856         (x86_linux_dr_set): Likewise.
3857         (update_debug_registers_callback): Likewise.
3858         (x86_linux_dr_set_addr): Likewise.
3859         (x86_linux_dr_get_addr): Likewise.
3860         (x86_linux_dr_set_control): Likewise.
3861         (x86_linux_dr_get_control): Likewise.
3862         (x86_linux_dr_get_status): Likewise.
3863         (x86_linux_update_debug_registers): Likewise.
3864
3865 2015-03-24  Gary Benson  <gbenson@redhat.com>
3866
3867         * linux-x86-low.c (x86_linux_update_debug_registers):
3868         New function, factored out from...
3869         (x86_linux_prepare_to_resume): ...this.
3870
3871 2015-03-24  Gary Benson  <gbenson@redhat.com>
3872
3873         * linux-x86-low.c (x86_linux_dr_get): Update comments.
3874         (x86_linux_dr_set): Likewise.
3875         (update_debug_registers_callback): Likewise.
3876         (x86_linux_dr_set_addr): Likewise.
3877         (x86_linux_dr_get_addr): Likewise.
3878         (x86_linux_dr_set_control): Likewise.
3879         (x86_linux_dr_get_control): Likewise.
3880         (x86_linux_dr_get_status): Likewise.
3881         (x86_linux_prepare_to_resume): Likewise.
3882
3883 2015-03-24  Gary Benson  <gbenson@redhat.com>
3884
3885         * linux-x86-low.c (x86_linux_dr_get): Add assertion.
3886         Use perror_with_name.  Pass string through gettext.
3887         (x86_linux_dr_set): Likewise.
3888
3889 2015-03-24  Gary Benson  <gbenson@redhat.com>
3890
3891         * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
3892         (x86_linux_dr_set_addr): ...this.
3893         (x86_dr_low_get_addr): Rename to...
3894         (x86_linux_dr_get_addr): ...this.
3895         (x86_dr_low_set_control): Rename to...
3896         (x86_linux_dr_set_control): ...this.
3897         (x86_dr_low_get_control): Rename to...
3898         (x86_linux_dr_get_control): ...this.
3899         (x86_dr_low_get_status): Rename to...
3900         (x86_linux_dr_get_status): ...this.
3901         (x86_dr_low): Update with new function names.
3902
3903 2015-03-24  Gary Benson  <gbenson@redhat.com>
3904
3905         * Makefile.in (x86-linux.o): New rule.
3906         * configure.srv: Add x86-linux.o to relevant targets.
3907         * linux-low.c (lwp_set_arch_private_info): New function.
3908         (lwp_arch_private_info): Likewise.
3909         * linux-x86-low.c: Include nat/x86-linux.h.
3910         (arch_lwp_info): Removed structure.
3911         (update_debug_registers_callback):
3912         Use lwp_set_debug_registers_changed.
3913         (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
3914         and lwp_set_debug_registers_changed.
3915         (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
3916
3917 2015-03-24  Gary Benson  <gbenson@redhat.com>
3918
3919         * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
3920         * linux-arm-low.c (arm_new_thread): Likewise.
3921         * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
3922         * linux-mips-low.c (mips_linux_new_thread): Likewise.
3923         * linux-x86-low.c (x86_linux_new_thread): Likewise.
3924         * linux-low.c (add_lwp): Update the_low_target.new_thread call.
3925
3926 2015-03-24  Gary Benson  <gbenson@redhat.com>
3927
3928         * linux-low.c (ptid_of_lwp): New function.
3929         (lwp_is_stopped): Likewise.
3930         (lwp_stop_reason): Likewise.
3931         * linux-x86-low.c (update_debug_registers_callback):
3932         Use lwp_is_stopped.
3933         (x86_linux_prepare_to_resume): Use ptid_of_lwp and
3934         lwp_stop_reason.
3935
3936 2015-03-24  Gary Benson  <gbenson@redhat.com>
3937
3938         * linux-low.h (linux_stop_lwp): Remove declaration.
3939
3940 2015-03-24  Gary Benson  <gbenson@redhat.com>
3941
3942         * linux-low.h: Include nat/linux-nat.h.
3943         * linux-low.c (iterate_over_lwps_args): New structure.
3944         (iterate_over_lwps_filter): New function.
3945         (iterate_over_lwps): Likewise.
3946         * linux-x86-low.c (update_debug_registers_callback):
3947         Update signature to what iterate_over_lwps expects.
3948         Remove PID check that iterate_over_lwps now performs.
3949         (x86_dr_low_set_addr): Use iterate_over_lwps.
3950         (x86_dr_low_set_control): Likewise.
3951
3952 2015-03-24  Gary Benson  <gbenson@redhat.com>
3953
3954         * linux-x86-low.c (x86_debug_reg_state): New function.
3955         (x86_linux_prepare_to_resume): Use the above.
3956
3957 2015-03-24  Gary Benson  <gbenson@redhat.com>
3958
3959         * linux-low.c (current_lwp_ptid): New function.
3960         * linux-x86-low.c: Include nat/linux-nat.h.
3961         (x86_dr_low_get_addr): Use current_lwp_ptid.
3962         (x86_dr_low_get_control): Likewise.
3963         (x86_dr_low_get_status): Likewise.
3964
3965 2015-03-20  Pedro Alves  <palves@redhat.com>
3966
3967         * tracepoint.c (cmd_qtstatus): Make "str" const.
3968
3969 2015-03-20  Pedro Alves  <palves@redhat.com>
3970
3971         * server.c (handle_general_set): Make "req_str" const.
3972
3973 2015-03-19  Pedro Alves  <palves@redhat.com>
3974
3975         * linux-low.c (linux_resume_one_lwp): Rename to ...
3976         (linux_resume_one_lwp_throw): ... this.  Don't handle ESRCH here,
3977         instead call perror_with_name.
3978         (check_ptrace_stopped_lwp_gone): New function.
3979         (linux_resume_one_lwp): Reimplement as wrapper around
3980         linux_resume_one_lwp_throw that swallows errors if the LWP is
3981         gone.
3982
3983 2015-03-19  Pedro Alves  <palves@redhat.com>
3984
3985         * linux-low.c (count_events_callback, select_event_lwp_callback):
3986         No longer check whether the thread has resume_stop as last resume
3987         kind.
3988
3989 2015-03-19 Pedro Alves  <palves@redhat.com>
3990
3991         * linux-low.c (count_events_callback, select_event_lwp_callback):
3992         Use the lwp's status_pending_p field, not the thread's.
3993
3994 2015-03-19  Pedro Alves  <palves@redhat.com>
3995
3996         * linux-low.c (select_event_lwp_callback): Update comments to
3997         no longer mention SIGTRAP.
3998
3999 2015-03-18  Gary Benson  <gbenson@redhat.com>
4000
4001         * server.c (handle_query): Do not report vFile:fstat as supported.
4002
4003 2015-03-11  Gary Benson  <gbenson@redhat.com>
4004
4005         * hostio.c (sys/types.h): New include.
4006         (sys/stat.h): Likewise.
4007         (common-remote-fileio.h): Likewise.
4008         (handle_fstat): New function.
4009         (handle_vFile): Handle vFile:fstat packets.
4010
4011 2015-03-11  Gary Benson  <gbenson@redhat.com>
4012
4013         * configure.ac (AC_CHECK_MEMBERS): Add checks for
4014         struct stat.st_blocks and struct stat.st_blksize.
4015         * configure: Regenerate.
4016         * config.in: Likewise.
4017         * Makefile.in (SFILES): Add common/common-remote-fileio.c.
4018         (OBS): Add common-remote-fileio.o.
4019         (common-remote-fileio.o): New rule.
4020
4021 2015-03-09  Pedro Alves  <palves@redhat.com>
4022
4023         * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
4024         'struct sockaddr' pointer in 'accept' call.
4025
4026 2015-03-09  Pedro Alves  <palves@redhat.com>
4027
4028         Revert:
4029         2015-03-07  Pedro Alves  <palves@redhat.com>
4030         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4031         or <winsock2.h> here.  Instead include "gdb_socket.h".
4032         (remote_open): Use union gdb_sockaddr_u.
4033         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4034         or <winsock2.h> here.  Instead include "gdb_socket.h".
4035         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4036         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4037         or <sys/un.h>.
4038         (init_named_socket, gdb_agent_helper_thread): Use union
4039         gdb_sockaddr_u.
4040
4041 2015-03-07  Pedro Alves  <palves@redhat.com>
4042
4043         * configure.ac (build_warnings): Move
4044         -Wdeclaration-after-statement to the C-specific set.
4045         * configure: Regenerate.
4046
4047 2015-03-07  Pedro Alves  <palves@redhat.com>
4048
4049         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
4050         or <winsock2.h> here.  Instead include "gdb_socket.h".
4051         (remote_open): Use union gdb_sockaddr_u.
4052         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
4053         or <winsock2.h> here.  Instead include "gdb_socket.h".
4054         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
4055         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
4056         or <sys/un.h>.
4057         (init_named_socket, gdb_agent_helper_thread): Use union
4058         gdb_sockaddr_u.
4059
4060 2015-03-07  Pedro Alves  <palves@redhat.com>
4061
4062         Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
4063         instead.
4064
4065 2015-03-06  Yao Qi  <yao.qi@linaro.org>
4066
4067         * linux-aarch64-low.c (aarch64_insert_point): Use
4068         show_debug_regs as a boolean.
4069         (aarch64_remove_point): Likewise.
4070
4071 2015-03-05  Pedro Alves  <palves@redhat.com>
4072
4073         * lynx-low.c (lynx_target_ops): Install NULL hooks for
4074         stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
4075         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
4076         * nto-low.c (nto_target_ops): Likewise.
4077         * spu-low.c (spu_target_ops): Likewise.
4078         * win32-low.c (win32_target_ops): Likewise.
4079
4080 2015-03-04  Pedro Alves  <palves@redhat.com>
4081
4082         * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
4083         Decide whether a breakpoint triggered based on the SIGTRAP's
4084         siginfo.si_code.
4085         (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
4086         breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
4087         (linux_low_filter_event): Check for breakpoints before checking
4088         watchpoints.
4089         (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
4090         siginfo.si_code.
4091         (linux_stopped_by_sw_breakpoint)
4092         (linux_supports_stopped_by_sw_breakpoint)
4093         (linux_stopped_by_hw_breakpoint)
4094         (linux_supports_stopped_by_hw_breakpoint): New functions.
4095         (linux_target_ops): Install new target methods.
4096
4097 2015-03-04  Pedro Alves  <palves@redhat.com>
4098
4099         * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
4100         * server.c (swbreak_feature, hwbreak_feature): New globals.
4101         (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
4102         (captured_main): Clear swbreak_feature and hwbreak_feature.
4103         * server.h (swbreak_feature, hwbreak_feature): Declare.
4104         * target.h (struct target_ops) <stopped_by_sw_breakpoint,
4105         supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
4106         supports_stopped_by_hw_breakpoint>: New fields.
4107         (target_supports_stopped_by_sw_breakpoint)
4108         (target_stopped_by_sw_breakpoint)
4109         (target_supports_stopped_by_hw_breakpoint)
4110         (target_stopped_by_hw_breakpoint): Declare.
4111
4112 2015-03-04  Pedro Alves  <palves@redhat.com>
4113
4114         enum lwp_stop_reason -> enum target_stop_reason
4115         * linux-low.c (check_stopped_by_breakpoint): Adjust.
4116         (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
4117         (linux_wait_1, stuck_in_jump_pad_callback)
4118         (move_out_of_jump_pad_callback, linux_resume_one_lwp)
4119         (linux_stopped_by_watchpoint):
4120         * linux-low.h (enum lwp_stop_reason): Delete.
4121         (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
4122         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4123
4124 2015-03-04  Yao Qi  <yao.qi@linaro.org>
4125
4126         * Makefile.in (SFILES): Add linux-aarch64-low.c.
4127
4128 2015-03-03  Gary Benson  <gbenson@redhat.com>
4129
4130         * hostio.c (handle_vFile): Fix prefix lengths.
4131
4132 2015-03-03  Markus Metzger  <markus.t.metzger@intel.com>
4133
4134         * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
4135         ptr_bits.
4136
4137 2015-03-02  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4138
4139         * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
4140         (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
4141         (clean): Add "rm -f" for above C files.
4142         * configure.srv (srv_regobj): Add s390-vx-linux64.o,
4143         s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
4144         (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
4145         s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
4146         * linux-s390-low.c (HWCAP_S390_VX): New macro.
4147         (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
4148         (init_registers_s390x_vx_linux64)
4149         (init_registers_s390x_tevx_linux64)
4150         (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
4151         (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
4152         declarations.
4153         (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
4154         (s390_store_vxrs_high): New functions.
4155         (s390_regsets): Add entries for NT_S390_VXRS_LOW and
4156         NT_S390_VXRS_HIGH.
4157         (s390_arch_setup): Add logic for selecting one of the new target
4158         descriptions.  Activate the new vector regsets if applicable.
4159         (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
4160         init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
4161         and init_registers_s390x_tevx_linux64.
4162
4163 2015-03-01  Pedro Alves  <palves@redhat.com>
4164
4165         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
4166         parameter.
4167
4168 2015-02-27  Pedro Alves  <palves@redhat.com>
4169
4170         * linux-x86-low.c (u_debugreg_offset): New function.
4171         (x86_linux_dr_get, x86_linux_dr_set): Use it.
4172
4173 2015-02-27  Pedro Alves  <palves@redhat.com>
4174
4175         * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
4176         [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
4177         [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
4178         ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
4179         (ps_lsetfpregs, ps_getpid)
4180         (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
4181         (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
4182         (ps_lsetxregs, ps_plog): Declare.
4183
4184 2015-02-27  Pedro Alves  <palves@redhat.com>
4185
4186         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
4187         IP_AGENT_EXPORT_FUNC.
4188         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
4189         IP_AGENT_EXPORT_FUNC.
4190         * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
4191         (IP_AGENT_EXPORT): Delete.
4192         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4193         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4194         (gdb_trampoline_buffer_error, collecting, gdb_collect)
4195         (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
4196         (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
4197         (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
4198         (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
4199         (traceframe_read_count, traceframe_write_count)
4200         (traceframes_created, trace_state_variables, get_raw_reg)
4201         (get_trace_state_variable_value, set_trace_state_variable_value)
4202         (ust_loaded, helper_thread_id, cmd_buf): Use
4203         IPA_SYM_EXPORTED_NAME.
4204         (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
4205         (tracepoints) Use IP_AGENT_EXPORT_VAR.
4206         (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
4207         IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4208         (last_tracepoint): Move into !IN_PROCESS_AGENT block.
4209         (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
4210         EXTERN_C_PUSH/EXTERN_C_POP.
4211         (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
4212         (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
4213         wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4214         (trace_buffer_ctrl, trace_buffer_ctrl_curr)
4215         (traceframe_write_count, traceframe_read_count)
4216         (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
4217         (about_to_request_buffer_space, get_trace_state_variable_value)
4218         (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
4219         (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
4220         EXTERN_C_PUSH/EXTERN_C_POP.
4221         (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
4222         (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
4223         (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
4224         and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
4225         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
4226         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
4227         (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
4228         * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
4229         Define.
4230         (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
4231         (IP_AGENT_EXPORT_VAR_DECL): Define.
4232         (tracing): Declare.
4233         (gdb_agent_get_raw_reg): Declare.
4234
4235 2015-02-27  Tom Tromey  <tromey@redhat.com>
4236             Pedro Alves  <palves@redhat.com>
4237
4238         Rename symbols whose names are reserved C++ keywords throughout.
4239
4240 2015-02-27  Pedro Alves  <palves@redhat.com>
4241
4242         * Makefile.in (COMPILER): New, get it from autoconf.
4243         (CXX): Get from autoconf instead.
4244         (COMPILE.pre): Use COMPILER.
4245         (CC-LD): Rename to ...
4246         (CC_LD): ... this.  Use COMPILER.
4247         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
4248         (CXX_FOR_TARGET): Default to g++ instead of gcc.
4249         * acinclude.m4: Include build-with-cxx.m4.
4250         * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
4251         Disable -Werror by default if building in C++ mode.
4252         (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
4253         -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
4254         the C++ compiler.  Save/restore CXXFLAGS too.
4255         * configure: Regenerate.
4256
4257 2015-02-27  Pedro Alves  <palves@redhat.com>
4258
4259         * acinclude.m4: Include libiberty.m4.
4260         * configure.ac: Call libiberty_INIT.
4261         * config.in, configure: Regenerate.
4262
4263 2015-02-26  Pedro Alves  <palves@redhat.com>
4264
4265         * linux-low.c (linux_wait_1): When incrementing the PC past a
4266         program breakpoint always use the_low_target.breakpoint_len as
4267         increment, rather than the maximum between that and
4268         the_low_target.decr_pc_after_break.
4269
4270 2015-02-23  Pedro Alves  <palves@redhat.com>
4271
4272         * linux-low.c (check_stopped_by_breakpoint): Don't check if the
4273         thread was doing a step-over; always adjust the PC if
4274         we stepped over a permanent breakpoint.
4275         (linux_wait_1): If we stepped over breakpoint that was on top of a
4276         permanent breakpoint, manually advance the PC past it.
4277
4278 2015-02-23  Pedro Alves  <palves@redhat.com>
4279
4280         * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
4281         modes.
4282         (x86_fill_gregset, x86_store_gregset): Use it when handling
4283         $orig_eax.
4284
4285 2015-02-20  Pedro Alves  <palves@redhat.com>
4286
4287         * thread-db.c: Include "nat/linux-procfs.h".
4288         (thread_db_init): Skip listing new threads if the kernel supports
4289         PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
4290
4291 2015-02-20  Pedro Alves  <palves@redhat.com>
4292
4293         * linux-low.c (status_pending_p_callback): Use ptid_match.
4294
4295 2015-02-19  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4296
4297         PR breakpoints/16812
4298         * linux-low.c (wstatus_maybe_breakpoint): Remove.
4299         (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
4300         (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
4301
4302 2015-02-10  Antoine Tremblay <antoine.tremblay@ericsson.com>
4303
4304         PR breakpoints/15956
4305         * tracepoint.c (cmd_qtinit): Add check for current_thread.
4306
4307 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
4308
4309         * linux-low.c (linux_low_btrace_conf): Print size.
4310         * server.c (handle_btrace_conf_general_set): New.
4311         (hanle_general_set): Call handle_btrace_conf_general_set.
4312         (handle_query): Report Qbtrace-conf:bts:size as supported.
4313
4314 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
4315
4316         * linux-low.c (linux_low_enable_btrace): Update parameters.
4317         (linux_low_btrace_conf): New.
4318         (linux_target_ops)<to_btrace_conf>: Initialize.
4319         * server.c (current_btrace_conf): New.
4320         (handle_btrace_enable): Rename to ...
4321         (handle_btrace_enable_bts): ... this.  Pass &current_btrace_conf
4322         to target_enable_btrace.  Update comment.  Update users.
4323         (handle_qxfer_btrace_conf): New.
4324         (qxfer_packets): Add btrace-conf entry.
4325         (handle_query): Report qXfer:btrace-conf:read as supported packet.
4326         * target.h (target_ops)<enable_btrace>: Update parameters and comment.
4327         (target_ops)<read_btrace_conf>: New.
4328         (target_enable_btrace): Update parameters.
4329         (target_read_btrace_conf): New.
4330
4331 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
4332
4333         * server.c (handle_btrace_general_set): Remove call to
4334         target_supports_btrace.
4335         (supported_btrace_packets): New.
4336         (handle_query): Call supported_btrace_packets.
4337         * target.h: include btrace-common.h.
4338         (btrace_target_info): Removed.
4339         (supports_btrace, target_supports_btrace): Update parameters.
4340
4341 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
4342
4343         * Makefile.in (SFILES): Add common/btrace-common.c.
4344         (OBS): Add common/btrace-common.o.
4345         (btrace-common.o): Add build rules.
4346         * linux-low: Include btrace-common.h.
4347         (linux_low_read_btrace): Use struct btrace_data.  Call
4348         btrace_data_init and btrace_data_fini.
4349
4350 2015-02-06  Pedro Alves  <palves@redhat.com>
4351
4352         * thread-db.c (find_new_threads_callback): Add debug output.
4353
4354 2015-02-04  Pedro Alves  <palves@redhat.com>
4355
4356         * linux-low.c (handle_extended_wait): Don't resume LWPs here.
4357         (resume_stopped_resumed_lwps): New function.
4358         (linux_wait_for_event_filtered): Use it.
4359
4360 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
4361
4362         * Makefile.in (SFILES): Add linux-personality.c.
4363         (linux-personality.o): New rule.
4364         * configure.srv (srv_linux_obj): Add linux-personality.o to the
4365         list of objects to be built.
4366         * linux-low.c: Include nat/linux-personality.h.
4367         (linux_create_inferior): Remove code to disable address space
4368         randomization (moved to ../nat/linux-personality.c).  Create
4369         cleanup to disable address space randomization.
4370
4371 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
4372
4373         * Makefile.in (posix-strerror.o): New rule.
4374         (mingw-strerror.o): Likewise.
4375         * configure: Regenerated.
4376         * configure.ac: Source file ../common/common.host.  Initialize new
4377         variable srv_host_obs.  Add srv_host_obs to GDBSERVER_DEPFILES.
4378
4379 2015-01-14  Yao Qi  <yao@codesourcery.com>
4380
4381         * Makefile.in (SFILES): Add nat/ppc-linux.c.
4382         (ppc-linux.o): New rule.
4383         * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
4384         * configure.ac: AC_CHECK_FUNCS(getauxval).
4385         * config.in: Re-generated.
4386         * configure: Re-generated.
4387         * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
4388         ppc64_64bit_inferior_p
4389
4390 2015-01-14  Yao Qi  <yao@codesourcery.com>
4391
4392         * linux-ppc-low.c: Include "nat/ppc-linux.h".
4393          (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
4394         (PPC_FEATURE_HAS_ALTIVEC,  PPC_FEATURE_HAS_SPE): Likewise.
4395         (PT_ORIG_R3, PT_TRAP): Likewise.
4396         (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
4397         (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
4398         (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
4399
4400 2015-01-10  Joel Brobecker  <brobecker@adacore.com>
4401
4402         * i387-fp.c (i387_cache_to_xsave): In look over
4403         num_avx512_zmmh_high_registers, replace use of struct i387_xsave
4404         zmmh_low_space field by use of zmmh_high_space.
4405
4406 2015-01-09  Pedro Alves  <palves@redhat.com>
4407
4408         * linux-low.c (step_over_bkpt): Move higher up in the file.
4409         (handle_extended_wait): Don't store the stop_pc here.
4410         (get_stop_pc): Adjust comments and rename to ...
4411         (check_stopped_by_breakpoint): ... this.  Record whether the LWP
4412         stopped for a software breakpoint or hardware breakpoint.
4413         (thread_still_has_status_pending_p): New function.
4414         (status_pending_p_callback): Use
4415         thread_still_has_status_pending_p.  If the event is no longer
4416         interesting, resume the LWP.
4417         (handle_tracepoints): Add assert.
4418         (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
4419         (wstatus_maybe_breakpoint): New function.
4420         (cancel_breakpoint): Delete function.
4421         (check_stopped_by_watchpoint): New function, factored out from
4422         linux_low_filter_event.
4423         (lp_status_maybe_breakpoint): Delete function.
4424         (linux_low_filter_event): Remove filter_ptid argument.
4425         Leave thread group exits pending here.  Store the LWP's stop PC.
4426         Always leave events pending.
4427         (linux_wait_for_event_filtered): Pull all events out of the
4428         kernel, and leave them all pending.
4429         (count_events_callback, select_event_lwp_callback): Consider all
4430         events.
4431         (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
4432         (select_event_lwp): Only give preference to the stepping LWP in
4433         all-stop mode.  Adjust comments.
4434         (ignore_event): New function.
4435         (linux_wait_1): Delete 'retry' label.  Use ignore_event.  Remove
4436         references to cancel_breakpoints.  Adjust to renames.  Also give
4437         equal priority to all LWPs that have had events in non-stop mode.
4438         If reporting a software breakpoint event, unadjust the LWP's PC.
4439         (linux_wait): If linux_wait_1 returned an ignored event, retry.
4440         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
4441         Adjust.
4442         (linux_resume_one_lwp): Store the LWP's PC.  Adjust.
4443         (resume_status_pending_p): Use thread_still_has_status_pending_p.
4444         (linux_stopped_by_watchpoint): Adjust.
4445         (linux_target_ops): Remove reference to linux_cancel_breakpoints.
4446         * linux-low.h (enum lwp_stop_reason): New.
4447         (struct lwp_info) <stop_pc>: Adjust comment.
4448         <stopped_by_watchpoint>: Delete field.
4449         <stop_reason>: New field.
4450         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
4451         * mem-break.c (software_breakpoint_inserted_here)
4452         (hardware_breakpoint_inserted_here): New function.
4453         * mem-break.h (software_breakpoint_inserted_here)
4454         (hardware_breakpoint_inserted_here): Declare.
4455         * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
4456         (cancel_breakpoints): Delete.
4457         * tracepoint.c (clear_installed_tracepoints, stop_tracing)
4458         (upload_fast_traceframes): Remove references to
4459         cancel_breakpoints.
4460
4461 2015-01-09  Pedro Alves  <palves@redhat.com>
4462
4463         * thread-db.c (find_new_threads_callback): Ignore thread if the
4464         kernel thread ID is -1.
4465
4466 2015-01-09  Pedro Alves  <palves@redhat.com>
4467
4468         * linux-low.c (linux_attach_fail_reason_string): Move to
4469         nat/linux-ptrace.c, and rename.
4470         (linux_attach_lwp): Update comment.
4471         (attach_proc_task_lwp_callback): New function.
4472         (linux_attach): Adjust to rename and use
4473         linux_proc_attach_tgid_threads.
4474         (linux_attach_fail_reason_string): Delete declaration.
4475
4476 2015-01-01  Joel Brobecker  <brobecker@adacore.com>
4477
4478         * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
4479         * server.c (gdbserver_version): Likewise.
4480
4481 2014-12-29  Sergio Durigan Junior  <sergiodj@redhat.com>
4482
4483         * remote-utils.c: Include ctype.h.
4484         (input_interrupt): Explicitly handle the case when the char
4485         received is the NUL byte.  Improve the printing of non-ASCII
4486         characters.
4487
4488 2014-12-16  Joel Brobecker  <brobecker@adacore.com>
4489
4490         * linux-low.c (linux_low_filter_event): Update call to
4491         linux_enable_event_reporting following the addition of
4492         a new parameter to that function.
4493
4494 2014-12-16  Catalin Udma  <catalin.udma@freescale.com>
4495
4496         PR server/17457
4497         * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
4498         (AARCH64_FPCR_REGNO): Likewise.
4499         (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
4500         (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
4501         (aarch64_store_fpregset): Likewise.
4502
4503 2014-12-15  Joel Brobecker  <brobecker@adacore.com>
4504
4505         * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
4506         Remove FIXME comment about assumption about N.
4507
4508 2014-12-13  Joel Brobecker  <brobecker@adacore.com>
4509
4510         * configure.ac: If large-file support is disabled in GDBserver,
4511         pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
4512         * configure: Regenerate.
4513
4514 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4515
4516         * linux-low.c (regsets_fetch_inferior_registers): Suppress the
4517         warning upon ENODATA from ptrace.
4518         * linux-s390-low.c (s390_store_tdb): New.
4519         (s390_regsets): Add regset for NT_S390_TDB.
4520
4521 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4522
4523         * linux-low.c (regsets_store_inferior_registers): Skip regsets
4524         without a fill_function.
4525         * linux-s390-low.c (s390_fill_last_break): Remove.
4526         (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
4527         (s390_arch_setup): Use regset's size instead of fill_function for
4528         loop end condition.
4529
4530 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4531
4532         * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
4533         the regset's store function when ptrace returned an error.
4534         * regcache.c (get_thread_regcache): Invalidate register cache
4535         before fetching inferior's registers.
4536
4537 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4538
4539         * linux-low.c (regsets_fetch_inferior_registers): Rephrase
4540         while-loop as for-loop.
4541         (regsets_store_inferior_registers): Likewise.
4542
4543 2014-11-28  Yao Qi  <yao@codesourcery.com>
4544
4545         * configure.ac(AC_CHECK_FUNCS): Remove readlink.
4546         * config.in, configure: Re-generate.
4547         * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
4548         is defined.
4549
4550 2014-11-21  Yao Qi  <yao@codesourcery.com>
4551
4552         * configure.ac: Don't invoke AC_FUNC_ALLOCA.
4553         (AC_CHECK_HEADERS): Remove malloc.h.
4554         * configure: Re-generated.
4555         * config.in: Re-generated.
4556         * server.h: Don't include alloca.h and malloc.h.
4557         * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
4558         Don't include malloc.h.
4559
4560 2014-11-17  Joel Brobecker  <brobecker@adacore.com>
4561
4562         * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
4563         corresponding ERRNO check in same block.
4564
4565 2014-11-12  Pedro Alves  <palves@redhat.com>
4566
4567         * server.c (cont_thread): Update comment.
4568         (start_inferior, attach_inferior): No longer clear cont_thread.
4569         (handle_v_cont): No longer set cont_thread.
4570         (captured_main): Clear cont_thread each time a GDB connects.
4571
4572 2014-11-12  Pedro Alves  <palves@redhat.com>
4573
4574         * linux-low.c (linux_wait_1): Don't force a wait for the Hc
4575         thread, and don't resume all threads if the Hc thread has exited.
4576
4577 2014-11-12  Pedro Alves  <palves@redhat.com>
4578
4579         * linux-low.c (linux_request_interrupt): Always send a SIGINT to
4580         the process group instead of to a specific LWP.
4581
4582 2014-10-15  Pedro Alves  <palves@redhat.com>
4583
4584         PR server/17487
4585         * win32-arm-low.c (arm_set_thread_context): Remove current_event
4586         parameter.
4587         (arm_set_thread_context): Delete.
4588         (the_low_target): Adjust.
4589         * win32-i386-low.c (debug_registers_changed)
4590         (debug_registers_used): Delete.
4591         (update_debug_registers_callback): New function.
4592         (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
4593         needing to update their debug registers.
4594         (win32_get_current_dr): New function.
4595         (x86_dr_low_get_addr, x86_dr_low_get_control)
4596         (x86_dr_low_get_status): Fetch the debug register from the thread
4597         record's context.
4598         (i386_initial_stuff): Adjust.
4599         (i386_get_thread_context): Remove current_event parameter.  Don't
4600         clear debug_registers_changed nor copy DR values to
4601         debug_reg_state.
4602         (i386_set_thread_context): Delete.
4603         (i386_prepare_to_resume): New function.
4604         (i386_thread_added): Mark the thread as needing to update irs
4605         debug registers.
4606         (the_low_target): Remove i386_set_thread_context and install
4607         i386_prepare_to_resume.
4608         * win32-low.c (win32_get_thread_context): Adjust.
4609         (win32_set_thread_context): Use SetThreadContext
4610         directly.
4611         (win32_prepare_to_resume): New function.
4612         (win32_require_context): New function, factored out from ...
4613         (thread_rec): ... this.
4614         (continue_one_thread): Call win32_prepare_to_resume on each thread
4615         we're about to continue.
4616         (win32_resume): Call win32_prepare_to_resume on the event thread.
4617         * win32-low.h (struct win32_thread_info)
4618         <debug_registers_changed>: New field.
4619         (struct win32_target_ops): Change prototype of set_thread_context,
4620         delete set_thread_context and add prepare_to_resume.
4621         (win32_require_context): New declaration.
4622
4623 2014-10-08  Gary Benson  <gbenson@redhat.com>
4624
4625         * server.h: Do not include common-exceptions.h.
4626
4627 2014-10-08  Gary Benson  <gbenson@redhat.com>
4628
4629         * server.h: Do not include cleanups.h.
4630
4631 2014-09-30  James Hogan  <james.hogan@imgtec.com>
4632
4633         * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
4634         mips64-dsp-linux.c.
4635
4636 2014-09-23  Yao Qi  <yao@codesourcery.com>
4637
4638         * linux-low.c (lp_status_maybe_breakpoint): New function.
4639         (linux_low_filter_event): Call lp_status_maybe_breakpoint.
4640         (count_events_callback): Likewise.
4641         (select_event_lwp_callback): Likewise.
4642         (cancel_breakpoints_callback): Likewise.
4643
4644 2014-09-19  Don Breazeal  <donb@codesourcery.com>
4645
4646         * linux-low.c (handle_extended_wait): Call
4647         linux_ptrace_get_extended_event.
4648         (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
4649         linux_is_extended_waitstatus.
4650
4651 2014-09-16  Joel Brobecker  <brobecker@adacore.com>
4652
4653         * Makefile.in (CPPFLAGS): Define.
4654         (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
4655         (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
4656
4657 2014-09-16  Gary Benson  <gbenson@redhat.com>
4658
4659         * inferiors.h (current_inferior): Renamed as...
4660         (current_thread): New variable.  All uses updated.
4661         * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
4662         (maybe_move_out_of_jump_pad): Likewise.
4663         (cancel_breakpoint): Likewise.
4664         (linux_low_filter_event): Likewise.
4665         (wait_for_sigstop): Likewise.
4666         (linux_resume_one_lwp): Likewise.
4667         (need_step_over_p): Likewise.
4668         (start_step_over): Likewise.
4669         (linux_stabilize_threads): Renamed save_inferior as saved_thread.
4670         * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
4671         * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
4672         and save_inferior as saved_thread.
4673         * regcache.c (get_thread_regcache): Renamed saved_inferior as
4674         saved_thread.
4675         (regcache_invalidate_thread): Likewise.
4676         * remote-utils.c (prepare_resume_reply): Likewise.
4677         * thread-db.c (thread_db_get_tls_address): Likewise.
4678         (disable_thread_event_reporting): Likewise.
4679         (remove_thread_event_breakpoints): Likewise.
4680         * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
4681         as saved_thread.
4682         * target.h (set_desired_inferior): Renamed as...
4683         (set_desired_thread): New declaration.  All uses updated.
4684         * server.c (myresume): Updated comment to reference thread instead
4685         of inferior.
4686         (handle_serial_event): Likewise.
4687         (handle_target_event): Likewise.
4688
4689 2014-09-12  Tom Tromey  <tromey@redhat.com>
4690             Gary Benson  <gbenson@redhat.com>
4691
4692         * regcache.h: Include common-regcache.h.
4693         (regcache_read_pc): Don't declare.
4694         * regcache.c (get_thread_regcache_for_ptid): New function.
4695
4696 2014-09-11  Tom Tromey  <tromey@redhat.com>
4697             Gary Benson  <gbenson@redhat.com>
4698
4699         * symbol.c: New file.
4700         * Makefile.in (SFILES): Add symbol.c.
4701         (OBS): Add symbol.o.
4702
4703 2014-09-11  Gary Benson  <gbenson@redhat.com>
4704
4705         * target.c (target_stop_ptid, target_continue_ptid): New
4706         functions.
4707
4708 2014-09-11  Tom Tromey  <tromey@redhat.com>
4709             Gary Benson  <gbenson@redhat.com>
4710
4711         * target.h: Include target/target.h.
4712         * target.c (target_read_memory, target_read_uint32)
4713         (target_write_memory): New functions.
4714
4715 2014-09-11  Gary Benson  <gbenson@redhat.com>
4716
4717         * server.h (debug_hw_points): Don't declare.
4718         * server.c (debug_hw_points): Don't define.  Replace all uses
4719         with show_debug_regs.
4720         * linux-aarch64-low.c (debug_hw_points): Don't define.  Replace
4721         all uses with show_debug_regs.
4722
4723 2014-09-08  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
4724
4725         * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
4726         endianness into account.
4727         (ppc_supply_ptrace_register): Likewise.
4728
4729 2014-09-03  James Hogan  <james.hogan@imgtec.com>
4730
4731         * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
4732         to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
4733
4734 2014-09-03  Gary Benson  <gbenson@redhat.com>
4735
4736         * linux-x86-low.c (x86_linux_prepare_to_resume): Use
4737         ALL_DEBUG_ADDRESS_REGISTERS.
4738
4739 2014-09-02  Gary Benson  <gbenson@redhat.com>
4740
4741         * i386-low.h: Renamed as...
4742         * x86-low.h: New file.  All type, function and variable name
4743         prefixes changed from "i386_" to "x86_".  All references updated.
4744         * i386-low.c: Renamed as...
4745         * x86-low.c: New file.  All type, function and variable name
4746         prefixes changed from "i386_" to "x86_".  All references updated.
4747
4748 2014-09-02  Gary Benson  <gbenson@redhat.com>
4749
4750         * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
4751         (x86_linux_new_thread): Likewise.
4752
4753 2014-08-29  Gary Benson  <gbenson@redhat.com>
4754
4755         * server.h (setjmp.h): Do not include.
4756         (toplevel): Do not declare.
4757         (common-exceptions.h): Include.
4758         (cleanups.h): Likewise.
4759         * server.c (toplevel): Do not define.
4760         (exit_code): New static global.
4761         (detach_or_kill_for_exit_cleanup): New function.
4762         (main): New function.  Original main renamed to...
4763         (captured_main): New function.
4764         * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
4765
4766 2014-08-29  Gary Benson  <gbenson@redhat.com>
4767
4768         * Makefile.in (SFILES): Add common/common-exceptions.c.
4769         (OBS): Add common-exceptions.o.
4770         (common-exceptions.o): New rule.
4771         * utils.c (prepare_to_throw_exception): New function.
4772
4773 2014-08-29  Gary Benson  <gbenson@redhat.com>
4774
4775         * config.in: Regenerate.
4776         * configure: Likewise.
4777
4778 2014-08-29  Gary Benson  <gbenson@redhat.com>
4779
4780         * Makefile.in (SFILES): Add common/cleanups.c.
4781         (OBS): cleanups.o.
4782         (cleanups.o): New rule.
4783
4784 2014-08-29  Gary Benson  <gbenson@redhat.com>
4785
4786         * utils.c (internal_vwarning): New function.
4787
4788 2014-08-28  Gary Benson  <gbenson@redhat.com>
4789
4790         * utils.h (fatal): Remove declaration.
4791         * utils.c (fatal): Remove function.
4792
4793 2014-08-28  Gary Benson  <gbenson@redhat.com>
4794
4795         * tracepoint.c (gdb_agent_init): Replace fatal with
4796         perror_with_name.
4797         (initialize_tracepoint): Likewise.
4798
4799 2014-08-28  Gary Benson  <gbenson@redhat.com>
4800
4801         * remote-utils.c (remote_prepare): Replace fatal with error.
4802
4803 2014-08-28  Gary Benson  <gbenson@redhat.com>
4804
4805         * linux-low.c (linux_async): Replace fatal with warning.
4806         Tidy up and return.
4807         (linux_start_non_stop): Return -1 if linux_async failed.
4808
4809 2014-08-28  Gary Benson  <gbenson@redhat.com>
4810
4811         * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
4812         gdb_assert.
4813         (i386_dr_low_get_addr): Remove vague comment.
4814         * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
4815         gdb_assert.
4816
4817 2014-08-28  Gary Benson  <gbenson@redhat.com>
4818
4819         * inferiors.c (get_thread_process): Replace check with gdb_assert.
4820         * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
4821         internal_error.
4822         (linux_resume_one_lwp): Likewise.
4823         * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
4824         gdb_assert.
4825         * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
4826         with internal_error.
4827         * regcache.c (get_thread_regcache): Replace check with gdb_assert.
4828         (init_register_cache): Replace fatal with gdb_assert_not_reached.
4829         (find_register_by_name): Replace fatal with internal_error.
4830         (find_regno): Likewise.
4831         * tdesc.c (init_target_desc): Replace check with gdb_assert.
4832         * thread-db.c (thread_db_create_event): Likewise.
4833         (thread_db_load_search): Likewise.
4834         (try_thread_db_load_1): Likewise.
4835         * tracepoint.c (get_jump_space_head): Replace fatal with
4836         internal_error.
4837         (claim_trampoline_space): Likewise.
4838         (have_fast_tracepoint_trampoline_buffer): Likewise.
4839         (cmd_qtstart): Likewise.
4840         (stop_tracing): Likewise.
4841         (fast_tracepoint_collecting): Likewise.
4842         (target_malloc): Likewise.
4843         (download_tracepoint): Likewise.
4844         (download_trace_state_variables): Replace check with gdb_assert.
4845         (upload_fast_traceframes): Replace fatal with internal_error.
4846
4847 2014-08-19  Tom Tromey  <tromey@redhat.com>
4848             Gary Benson  <gbenson@redhat.com>
4849
4850         * Makefile.in (SFILES): Add common/common-debug.c.
4851         (OBS): Add common-debug.o.
4852         (common-debug.o): New rule.
4853         * debug.h (debug_printf): Don't declare.
4854         * debug.c (debug_printf): Renamed and rewritten as...
4855         (debug_vprintf): New function.
4856
4857 2014-08-19  Gary Benson  <gbenson@redhat.com>
4858
4859         * utils.h: Do not include print-utils.h.
4860
4861 2014-08-19  Tom Tromey  <tromey@redhat.com>
4862             Gary Benson  <gbenson@redhat.com>
4863
4864         * server.h: Add static assertion.
4865         (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
4866
4867 2014-08-19  Tom Tromey  <tromey@redhat.com>
4868             Gary Benson  <gbenson@redhat.com>
4869
4870         * Makefile.in (SFILES): Add common/errors.c.
4871         (OBS): Add errors.o.
4872         (IPA_OBS): Add errors-ipa.o.
4873         (errors.o): New rule.
4874         (errors-ipa.o): Likewise.
4875         * utils.h (perror_with_name, error, warning): Don't declare.
4876         * utils.c (warning): Renamed and rewritten as...
4877         (vwarning): New function.
4878         (error): Renamed and rewritten as...
4879         (verror): New function.
4880         (internal_error): Renamed and rewritten as...
4881         (internal_verror): New function.
4882
4883 2014-08-07  Gary Benson  <gbenson@redhat.com>
4884
4885         * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
4886         * configure: Regenerate.
4887         * config.in: Likewise.
4888         * server.h: Do not include errno.h.
4889         * event-loop.c: Likewise.
4890         * hostio-errno.c: Likewise.
4891         * linux-low.c: Likewise.
4892         * remote-utils.c: Likewise.
4893         * spu-low.c: Likewise.
4894         * utils.c: Likewise.
4895         * gdbreplay.c: Unconditionally include errno.h.
4896
4897 2014-08-07  Gary Benson  <gbenson@redhat.com>
4898
4899         * server.h: Do not include string.h.
4900         * event-loop.c: Likewise.
4901         * linux-low.c: Likewise.
4902         * regcache.c: Likewise.
4903         * remote-utils.c: Likewise.
4904         * spu-low.c: Likewise.
4905         * utils.c: Likewise.
4906
4907 2014-08-07  Gary Benson  <gbenson@redhat.com>
4908
4909         * server.h: Do not include gdb_assert.h.
4910
4911 2014-08-07  Gary Benson  <gbenson@redhat.com>
4912
4913         * server.h: Do not include common-utils.h.
4914
4915 2014-08-07  Gary Benson  <gbenson@redhat.com>
4916
4917         * server.h: Do not include ptid.h.
4918         * notif.h: Likewise.
4919
4920 2014-08-07  Gary Benson  <gbenson@redhat.com>
4921
4922         * server.h: Do not include gdb_locale.h.
4923
4924 2014-08-07  Gary Benson  <gbenson@redhat.com>
4925
4926         * server.h: Do not include gdb/signals.h.
4927         * win32-low.c: Likewise.
4928
4929 2014-08-07  Gary Benson  <gbenson@redhat.com>
4930
4931         * server.h: Do not include pathmax.h.
4932
4933 2014-08-07  Gary Benson  <gbenson@redhat.com>
4934
4935         * server.h: Do not include libiberty.h.
4936         * linux-bfin-low.c: Likewise.
4937
4938 2014-08-07  Gary Benson  <gbenson@redhat.com>
4939
4940         * server.h: Do not include ansidecl.h.
4941
4942 2014-08-07  Gary Benson  <gbenson@redhat.com>
4943
4944         * linux-x86-low.c: Do not include stddef.h.
4945         * lynx-ppc-low.c: Likewise.
4946         * tracepoint.c: Likewise.
4947
4948 2014-08-07  Gary Benson  <gbenson@redhat.com>
4949
4950         * server.h: Do not include stdarg.h.
4951         * nto-low.c: Likewise.
4952
4953 2014-08-07  Gary Benson  <gbenson@redhat.com>
4954
4955         * server.h: Do not include stdlib.h.
4956         * inferiors.c: Likewise.
4957         * linux-low.c: Likewise.
4958         * regcache.c: Likewise.
4959         * spu-low.c: Likewise.
4960         * tracepoint.c: Likewise.
4961         * utils.c: Likewise.
4962
4963 2014-08-07  Gary Benson  <gbenson@redhat.com>
4964
4965         * server.h: Do not include stdio.h.
4966         * linux-low.c: Likewise.
4967         * remote-utils.c: Likewise.
4968         * spu-low.c: Likewise.
4969         * utils.c: Likewise.
4970         * wincecompat.c: Likewise.
4971
4972 2014-08-06  Gary Benson  <gbenson@redhat.com>
4973
4974         * regcache.c (init_register_cache): Move conditionals inside if.
4975
4976 2014-08-06  Gary Benson  <gbenson@redhat.com>
4977
4978         * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4979
4980 2014-07-31  Gary Benson  <gbenson@redhat.com>
4981
4982         * ax.h: Do not include server.h.
4983         * gdbthread.h: Likewise.
4984         * lynx-low.h: Likewise.
4985         * notif.h: Likewise.
4986
4987 2014-07-30  Gary Benson  <gbenson@redhat.com>
4988
4989         * server.h: Include common-defs.h.
4990         Do not include config.h or build-gnulib-gdbserver/config.h.
4991
4992 2014-07-30  Gary Benson  <gbenson@redhat.com>
4993
4994         * hostio-errno.c: Move server.h to top of includes list.
4995         * inferiors.c: Likewise.
4996         * linux-x86-low.c: Likewise.
4997         * notif.c: Include server.h.
4998
4999 2014-07-24  Tom Tromey  <tromey@redhat.com>
5000             Gary Benson  <gbenson@redhat.com>
5001
5002         * server.h (CORE_ADDR): Now unsigned.
5003
5004 2014-07-16  Pedro Alves  <palves@redhat.com>
5005
5006         * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
5007
5008 2014-07-15  Pedro Alves  <palves@redhat.com>
5009
5010         * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
5011         copy.
5012
5013 2014-07-11  Pedro Alves  <palves@redhat.com>
5014
5015         * linux-low.c (kill_wait_lwp): New function, based on
5016         kill_one_lwp_callback, but use my_waitpid directly.
5017         (kill_one_lwp_callback, linux_kill): Use it.
5018
5019 2014-06-23  Pedro Alves  <palves@redhat.com>
5020
5021         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
5022         before setting DR0..DR3.
5023
5024 2014-06-20  Gary Benson  <gbenson@redhat.com>
5025
5026         * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
5027         * configure: Regenerated.
5028         * config.in: Likewise.
5029
5030 2014-06-20  Gary Benson  <gbenson@redhat.com>
5031
5032         * Makefile.in (SFILES): Update locations for files moved
5033         from common to nat.
5034         (object file files): Reordered.
5035
5036 2014-06-20  Gary Benson  <gbenson@redhat.com>
5037
5038         * i386-low.h (i386_dr_low_can_set_addr): Removed.
5039         (i386_dr_low_set_addr): Likewise.
5040         (i386_dr_low_get_addr): Likewise.
5041         (i386_dr_low_can_set_control): Likewise.
5042         (i386_dr_low_set_control): Likewise.
5043         (i386_dr_low_get_control): Likewise.
5044         (i386_dr_low_get_status): Likewise.
5045         (i386_get_debug_register_length): Likewise.
5046         * linux-x86-low.c (i386_dr_low_set_addr):
5047         Changed signature.  Made static.
5048         (i386_dr_low_get_addr): Likewise.
5049         (i386_dr_low_set_control): Likewise.
5050         (i386_dr_low_get_control): Likewise.
5051         (i386_dr_low_get_status): Likewise.
5052         (i386_dr_low): New global variable.
5053         * win32-i386-low.c (i386_dr_low_set_addr):
5054         Changed signature.  Made static.
5055         (i386_dr_low_get_addr): Likewise.
5056         (i386_dr_low_set_control): Likewise.
5057         (i386_dr_low_get_control): Likewise.
5058         (i386_dr_low_get_status): Likewise.
5059         (i386_dr_low): New global variable.
5060
5061 2014-06-20  Marcus Shawcroft  <marcus.shawcroft@arm.com>
5062
5063         * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
5064         * Makefile.in (AR, AR_FLAGS): Define.
5065         * configure: Regenerate.
5066
5067 2014-06-19  Gary Benson  <gbenson@redhat.com>
5068
5069         * Makefile.in (i386-dregs.o): New rule.
5070         * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
5071         * i386-low.c (target.h): Remove include.
5072         (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
5073         (DR_CONTROL_SHIFT): Likewise.
5074         (DR_CONTROL_SIZE): Likewise.
5075         (DR_RW_EXECUTE): Likewise.
5076         (DR_RW_WRITE): Likewise.
5077         (DR_RW_READ): Likewise.
5078         (DR_RW_IORW): Likewise.
5079         (DR_LEN_1): Likewise.
5080         (DR_LEN_2): Likewise.
5081         (DR_LEN_4): Likewise.
5082         (DR_LEN_8): Likewise.
5083         (DR_LOCAL_ENABLE_SHIFT): Likewise.
5084         (DR_GLOBAL_ENABLE_SHIFT): Likewise.
5085         (DR_ENABLE_SIZE): Likewise.
5086         (DR_LOCAL_SLOWDOWN): Likewise.
5087         (DR_GLOBAL_SLOWDOWN): Likewise.
5088         (DR_CONTROL_RESERVED): Likewise.
5089         (I386_DR_CONTROL_MASK): Likewise.
5090         (I386_DR_VACANT): Likewise.
5091         (I386_DR_LOCAL_ENABLE): Likewise.
5092         (I386_DR_GLOBAL_ENABLE): Likewise.
5093         (I386_DR_DISABLE): Likewise.
5094         (I386_DR_SET_RW_LEN): Likewise.
5095         (I386_DR_GET_RW_LEN): Likewise.
5096         (I386_DR_WATCH_HIT): Likewise.
5097         (i386_wp_op_t): Likewise.
5098         (i386_show_dr): Likewise.
5099         (i386_length_and_rw_bits): Likewise.
5100         (i386_insert_aligned_watchpoint): Likewise.
5101         (i386_remove_aligned_watchpoint): Likewise.
5102         (i386_handle_nonaligned_watchpoint): Likewise.
5103         i386_update_inferior_debug_regs(): Likewise.
5104         (i386_dr_insert_watchpoint): Likewise.
5105         (i386_dr_remove_watchpoint): Likewise.
5106         (i386_dr_region_ok_for_watchpoint): Likewise.
5107         (i386_dr_stopped_data_address): Likewise.
5108         (i386_dr_stopped_by_watchpoint): Likewise.
5109
5110 2014-06-19  Gary Benson  <gbenson@redhat.com>
5111
5112         * i386-low.c (i386_dr_show): Renamed to
5113         i386_show_dr and made static.  All uses updated.
5114         (i386_dr_length_and_rw_bits): Renamed to
5115         i386_length_and_rw_bits and made static.
5116         All uses updated.
5117         (i386_dr_insert_aligned_watchpoint): Renamed to
5118         i386_insert_aligned_watchpoint and made static.
5119         All uses updated.
5120         (i386_dr_remove_aligned_watchpoint): Renamed to
5121         i386_remove_aligned_watchpoint and made static.
5122         All uses updated.
5123         (i386_dr_update_inferior_debug_regs): Renamed to
5124         i386_update_inferior_debug_regs and made static.
5125         All uses updated.
5126
5127 2014-06-18  Gary Benson  <gbenson@redhat.com>
5128
5129         * i386-low.h (i386_dr_low_can_set_addr): New macro.
5130         (i386_dr_low_can_set_control): Likewise.
5131         (i386_get_debug_register_length): Likewise.
5132         * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
5133         (i386_dr_low_can_set_control): Likewise.
5134         (i386_get_debug_register_length): Likewise.
5135
5136 2014-06-17  Gary Benson  <gbenson@redhat.com>
5137
5138         * i386-low.h (i386-dregs.h): New include.
5139         (DR_FIRSTADDR): Now in i386-dregs.h.
5140         (DR_LASTADDR): Likewise.
5141         (DR_NADDR): Likewise.
5142         (DR_STATUS): Likewise.
5143         (DR_CONTROL): Likewise.
5144         (i386_debug_reg_state): Likewise.
5145         (i386_dr_insert_watchpoint): Likewise.
5146         (i386_dr_remove_watchpoint): Likewise.
5147         (i386_dr_region_ok_for_watchpoint): Likewise.
5148         (i386_dr_stopped_data_address): Likewise.
5149         (i386_dr_stopped_by_watchpoint): Likewise.
5150         * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
5151
5152 2014-06-18  Gary Benson  <gbenson@redhat.com>
5153
5154         * i386-low.h (i386_low_insert_watchpoint): Renamed to
5155         i386_dr_insert_watchpoint.
5156         (i386_low_remove_watchpoint): Renamed to
5157         i386_dr_remove_watchpoint.
5158         (i386_low_region_ok_for_watchpoint): Renamed to
5159         i386_dr_region_ok_for_watchpoint.
5160         (i386_low_stopped_data_address): Renamed to
5161         i386_dr_stopped_data_address.
5162         (i386_low_stopped_by_watchpoint): Renamed to
5163         i386_dr_stopped_by_watchpoint.
5164         * i386-low.c (i386_show_dr): Renamed to
5165         i386_dr_show and made nonstatic.  All uses updated.
5166         (i386_length_and_rw_bits): Renamed to
5167         i386_dr_length_and_rw_bits and made nonstatic.
5168         All uses updated.
5169         (i386_insert_aligned_watchpoint): Renamed to
5170         i386_dr_insert_aligned_watchpoint and made nonstatic.
5171         All uses updated.
5172         (i386_remove_aligned_watchpoint): Renamed to
5173         i386_dr_remove_aligned_watchpoint and made nonstatic.
5174         All uses updated.
5175         (i386_update_inferior_debug_regs): Renamed to
5176         i386_dr_update_inferior_debug_regs and made nonstatic.
5177         All uses updated.
5178         (i386_low_insert_watchpoint): Renamed to
5179         i386_dr_insert_watchpoint.  All uses updated.
5180         (i386_low_remove_watchpoint): Renamed to
5181         i386_dr_remove_watchpoint.  All uses updated.
5182         (i386_low_region_ok_for_watchpoint): Renamed to
5183         i386_dr_region_ok_for_watchpoint.  All uses updated.
5184         (i386_low_stopped_data_address): Renamed to
5185         i386_dr_stopped_data_address.  All uses updated.
5186         (i386_low_stopped_by_watchpoint): Renamed to
5187         i386_dr_stopped_by_watchpoint.  All uses updated.
5188
5189 2014-06-18  Gary Benson  <gbenson@redhat.com>
5190
5191         * i386-low.c (i386_dr_low_can_set_addr): New macro.
5192         (i386_dr_low_can_set_control): Likewise.
5193         (i386_insert_aligned_watchpoint): New check.
5194
5195 2014-06-18  Gary Benson  <gbenson@redhat.com>
5196
5197         * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
5198         Renamed to state.
5199
5200 2014-06-18  Gary Benson  <gbenson@redhat.com>
5201
5202         * i386-low.c (i386_length_and_rw_bits): Use internal_error
5203         instead of fatal and error.
5204         (i386_handle_nonaligned_watchpoint): Likewise.
5205
5206 2014-06-18  Gary Benson  <gbenson@redhat.com>
5207
5208         * i386-low.c (i386_get_debug_register_length): New macro.
5209         (TARGET_HAS_DR_LEN_8): Remove conditional.  Use above macro.
5210         (i386_show_dr): Use debug_printf instead of fprintf.  Use
5211         phex to format values.
5212
5213 2014-06-18  Gary Benson  <gbenson@redhat.com>
5214
5215         * i386-low.h: Comment changes.
5216         * i386-low.c: Likewise.
5217
5218 2014-06-18  Gary Benson  <gbenson@redhat.com>
5219
5220         * i386-low.c: Whitespace changes.
5221
5222 2014-06-12  Tom Tromey  <tromey@redhat.com>
5223
5224         * utils.c (freeargv): Remove.
5225
5226 2014-06-12  Tom Tromey  <tromey@redhat.com>
5227
5228         * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
5229         * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
5230         (parse_debug_format_options): Likewise.
5231         (gdbserver_usage): Likewise.
5232         * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
5233         (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
5234         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
5235         against libiberty.
5236         ($(LIBGNU)): Depend on libiberty.
5237         (all-lib): Recurse into all subdirs.
5238         (install-only): Invoke "install" target in subdirs.
5239         (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
5240         targets.
5241         * configure: Rebuild.
5242         * configure.ac: Add ACX_CONFIGURE_DIR for libiberty.  Don't check
5243         for vasprintf, vsnprintf, or gettimeofday.
5244         * configure.srv: Don't add safe-ctype.o or lbasename.o to
5245         srv_tgtobj.
5246
5247 2014-06-05  Joel Brobecker  <brobecker@adacore.com>
5248
5249         * development.sh: Delete.
5250         * Makefile.in (config.status): Adjust dependency on development.sh.
5251         * configure.ac: Adjust development.sh source call.
5252         * configure: Regenerate.
5253
5254 2014-06-02  Pedro Alves  <palves@redhat.com>
5255
5256         * ax.c (gdb_free_agent_expr): New function.
5257         * ax.h (gdb_free_agent_expr): New declaration.
5258         * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
5259         list.
5260         (clear_breakpoint_conditions, clear_breakpoint_commands): Make
5261         static.
5262         (clear_breakpoint_conditions_and_commands): New function.
5263         * mem-break.h (clear_breakpoint_conditions): Delete declaration.
5264         (clear_breakpoint_conditions_and_commands): New declaration.
5265
5266 2014-05-23  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
5267
5268         * linux-aarch64-low.c (asm/ptrace.h): Include.
5269
5270 2014-05-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
5271
5272         Fix TLS access for -static -pthread.
5273         * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
5274         (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
5275         (thread_db_load_search, try_thread_db_load_1): Initialize it.
5276
5277 2014-05-20  Pedro Alves  <palves@redhat.com>
5278
5279         * linux-aarch64-low.c (aarch64_insert_point)
5280         (aarch64_remove_point): No longer check whether the type is
5281         supported here.  Adjust to new interface.
5282         (the_low_target): Install aarch64_supports_z_point_type as
5283         supports_z_point_type method.
5284         * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
5285         (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
5286         instead of a Z packet char.  Adjust.
5287         (arm_supports_z_point_type): New function.
5288         (arm_insert_point, arm_remove_point): Adjust to new interface.
5289         (the_low_target): Install arm_supports_z_point_type.
5290         * linux-crisv32-low.c (cris_supports_z_point_type): New function.
5291         (cris_insert_point, cris_remove_point): Adjust to new interface.
5292         Don't check whether the type is supported here.
5293         (the_low_target): Install cris_supports_z_point_type.
5294         * linux-low.c (linux_supports_z_point_type): New function.
5295         (linux_insert_point, linux_remove_point): Adjust to new interface.
5296         * linux-low.h (struct linux_target_ops) <insert_point,
5297         remove_point>: Take an enum raw_bkpt_type instead of a char.  Add
5298         raw_breakpoint pointer parameter.
5299         <supports_z_point_type>: New method.
5300         * linux-mips-low.c (mips_supports_z_point_type): New function.
5301         (mips_insert_point, mips_remove_point): Adjust to new interface.
5302         Use mips_supports_z_point_type.
5303         (the_low_target): Install mips_supports_z_point_type.
5304         * linux-ppc-low.c (the_low_target): Install NULL as
5305         supports_z_point_type method.
5306         * linux-s390-low.c (the_low_target): Install NULL as
5307         supports_z_point_type method.
5308         * linux-sparc-low.c (the_low_target): Install NULL as
5309         supports_z_point_type method.
5310         * linux-x86-low.c (x86_supports_z_point_type): New function.
5311         (x86_insert_point): Adjust to new insert_point interface.  Use
5312         insert_memory_breakpoint.  Adjust to new
5313         i386_low_insert_watchpoint interface.
5314         (x86_remove_point): Adjust to remove_point interface.  Use
5315         remove_memory_breakpoint.  Adjust to new
5316         i386_low_remove_watchpoint interface.
5317         (the_low_target): Install x86_supports_z_point_type.
5318         * lynx-low.c (lynx_target_ops): Install NULL as
5319         supports_z_point_type callback.
5320         * nto-low.c (nto_supports_z_point_type): New.
5321         (nto_insert_point, nto_remove_point): Adjust to new interface.
5322         (nto_target_ops): Install nto_supports_z_point_type.
5323         * mem-break.c: Adjust intro comment.
5324         (struct raw_breakpoint) <raw_type, size>: New fields.
5325         <inserted>: Update comment.
5326         <shlib_disabled>: Delete field.
5327         (enum bkpt_type) <gdb_breakpoint>: Delete value.
5328         <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
5329         gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
5330         (raw_bkpt_type_to_target_hw_bp_type): New function.
5331         (find_enabled_raw_code_breakpoint_at): New function.
5332         (find_raw_breakpoint_at): New type and size parameters.  Use them.
5333         (insert_memory_breakpoint): New function, based off
5334         set_raw_breakpoint_at.
5335         (remove_memory_breakpoint): New function.
5336         (set_raw_breakpoint_at): Reimplement.
5337         (set_breakpoint): New, based on set_breakpoint_at.
5338         (set_breakpoint_at): Reimplement.
5339         (delete_raw_breakpoint): Go through the_target->remove_point
5340         instead of assuming memory breakpoints.
5341         (find_gdb_breakpoint_at): Delete.
5342         (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
5343         (find_gdb_breakpoint): New function.
5344         (set_gdb_breakpoint_at): Delete.
5345         (z_type_supported): New function.
5346         (set_gdb_breakpoint_1): New function, loosely based off
5347         set_gdb_breakpoint_at.
5348         (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
5349         (delete_gdb_breakpoint_at): Delete.
5350         (delete_gdb_breakpoint_1): New function, loosely based off
5351         delete_gdb_breakpoint_at.
5352         (delete_gdb_breakpoint): New function.
5353         (clear_gdb_breakpoint_conditions): Rename to ...
5354         (clear_breakpoint_conditions): ... this.  Don't handle a NULL
5355         breakpoint.
5356         (add_condition_to_breakpoint): Make static.
5357         (add_breakpoint_condition): Take a struct breakpoint pointer
5358         instead of an address.  Adjust.
5359         (gdb_condition_true_at_breakpoint): Rename to ...
5360         (gdb_condition_true_at_breakpoint_z_type): ... this, and add
5361         z_type parameter.
5362         (gdb_condition_true_at_breakpoint): Reimplement.
5363         (add_breakpoint_commands): Take a struct breakpoint pointer
5364         instead of an address.  Adjust.
5365         (gdb_no_commands_at_breakpoint): Rename to ...
5366         (gdb_no_commands_at_breakpoint_z_type): ... this.  Add z_type
5367         parameter.  Return true if no breakpoint was found.  Change debug
5368         output.
5369         (gdb_no_commands_at_breakpoint): Reimplement.
5370         (run_breakpoint_commands): Rename to ...
5371         (run_breakpoint_commands_z_type): ... this.  Add z_type parameter,
5372         and change return type to boolean.
5373         (run_breakpoint_commands): New function.
5374         (gdb_breakpoint_here): Also check for Z1 breakpoints.
5375         (uninsert_raw_breakpoint): Don't try to reinsert a disabled
5376         breakpoint.  Go through the_target->remove_point instead of
5377         assuming memory breakpoint.
5378         (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
5379         software and hardware breakpoints.
5380         (reinsert_raw_breakpoint): Go through the_target->insert_point
5381         instead of assuming memory breakpoint.
5382         (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
5383         software and hardware breakpoints.
5384         (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
5385         Check both software and hardware breakpoints.
5386         (validate_inserted_breakpoint): Assert the breakpoint is a
5387         software breakpoint.  Set the inserted flag to -1 instead of
5388         setting shlib_disabled.
5389         (delete_disabled_breakpoints): Adjust.
5390         (validate_breakpoints): Only validate software breakpoints.
5391         Adjust to inserted flag change.
5392         (check_mem_read, check_mem_write): Skip breakpoint types other
5393         than software breakpoints.  Adjust to inserted flag change.
5394         * mem-break.h (enum raw_bkpt_type): New enum.
5395         (raw_breakpoint, struct process_info): Forward declare.
5396         (Z_packet_to_target_hw_bp_type): Delete declaration.
5397         (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
5398         (set_gdb_breakpoint, delete_gdb_breakpoint)
5399         (clear_breakpoint_conditions): New declarations.
5400         (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
5401         (breakpoint_inserted_here): Update comment.
5402         (add_breakpoint_condition, add_breakpoint_commands): Replace
5403         address parameter with a breakpoint pointer parameter.
5404         (gdb_breakpoint_here): Update comment.
5405         (delete_gdb_breakpoint_at): Delete.
5406         (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
5407         * server.c (process_point_options): Take a struct breakpoint
5408         pointer instead of an address.  Adjust.
5409         (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
5410         delete_gdb_breakpoint.
5411         * spu-low.c (spu_target_ops): Install NULL as
5412         supports_z_point_type method.
5413         * target.h: Include mem-break.h.
5414         (struct target_ops) <prepare_to_access_memory>: Update comment.
5415         <supports_z_point_type>: New field.
5416         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5417         instead of a char.  Also take a raw breakpoint pointer.
5418         * win32-arm-low.c (the_low_target): Install NULL as
5419         supports_z_point_type.
5420         * win32-i386-low.c (i386_supports_z_point_type): New function.
5421         (i386_insert_point, i386_remove_point): Adjust to new interface.
5422         (the_low_target): Install i386_supports_z_point_type.
5423         * win32-low.c (win32_supports_z_point_type): New function.
5424         (win32_insert_point, win32_remove_point): Adjust to new interface.
5425         (win32_target_ops): Install win32_supports_z_point_type.
5426         * win32-low.h (struct win32_target_ops):
5427         <supports_z_point_type>: New method.
5428         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
5429         instead of a char.  Also take a raw breakpoint pointer.
5430
5431 2014-05-20  Pedro Alves  <palves@redhat.com>
5432
5433         * mem-break.h: Include break-common.h.
5434         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5435         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
5436         (Z_packet_to_target_hw_bp_type): New declaration.
5437         * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
5438         * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
5439         (Z_PACKET_ACCESS_WP): Delete macros.
5440         (Z_packet_to_hw_type): Delete function.
5441         * i386-low.h: Don't include break-common.h here.
5442         (Z_packet_to_hw_type): Delete declaration.
5443         * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
5444         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5445         * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
5446         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
5447         * linux-aarch64-low.c: Don't include break-common.h here.
5448         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
5449         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
5450         (Z_packet_to_target_hw_bp_type): Delete function.
5451         * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
5452         function.
5453         (mips_insert_point, mips_remove_point): Use
5454         Z_packet_to_target_hw_bp_type.
5455
5456 2014-05-20  Pedro Alves  <palves@redhat.com>
5457
5458         * linux-aarch64-low.c: Include break-common.h.
5459         (enum target_point_type): Delete.
5460         (Z_packet_to_point_type): Rename to ...
5461         (Z_packet_to_target_hw_bp_type): ... this, and return a
5462         target_hw_bp_type instead.
5463         (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
5464         instead of an enum target_point_type.
5465         (aarch64_point_encode_ctrl_reg): Likewise.  Compute type mask from
5466         breakpoint type.
5467         (aarch64_dr_state_insert_one_point)
5468         (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
5469         (aarch64_handle_aligned_watchpoint)
5470         (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
5471         Take an enum target_hw_bp_type instead of an enum
5472         target_point_type.
5473         (aarch64_supports_z_point_type): New function.
5474         (aarch64_insert_point, aarch64_remove_point): Use it.  Adjust to
5475         use Z_packet_to_target_hw_bp_type.
5476
5477 2014-05-20  Joel Brobecker  <brobecker@adacore.com>
5478
5479         * configure.ac: Only use -Werror by default when DEVELOPMENT
5480         is true.
5481         * configure: Regenerate.
5482
5483 2014-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
5484
5485         Fix gdbserver qGetTLSAddr for x86_64 -m32.
5486         * linux-x86-low.c (X86_64_USER_REGS): New.
5487         (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
5488
5489 2014-04-28  Yao Qi  <yao@codesourcery.com>
5490
5491         * Makefile.in (i386-avx512.c): Fix the typo of generated file
5492         name.
5493
5494 2014-04-25  Pedro Alves  <palves@redhat.com>
5495
5496         PR server/16255
5497         * linux-low.c (linux_attach_fail_reason_string): New function.
5498         (linux_attach_lwp): Delete.
5499         (linux_attach_lwp_1): Rename to ...
5500         (linux_attach_lwp): ... this.  Take a ptid instead of a pid as
5501         argument.  Remove "initial" parameter.  Return int instead of
5502         void.  Don't error or warn here.
5503         (linux_attach): Adjust to call linux_attach_lwp.  Call error on
5504         failure to attach to the tgid.  Call warning when failing to
5505         attach to an lwp.
5506         * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
5507         argument.  Remove "initial" parameter.  Return int instead of
5508         void.  Don't error or warn here.
5509         (linux_attach_fail_reason_string): New declaration.
5510         * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
5511         interface change.  Use linux_attach_fail_reason_string.
5512
5513 2014-04-24  Michael Sturm  <michael.sturm@mintel.com>
5514             Walfred Tedeschi  <walfred.tedeschi@intel.com>
5515
5516         * Makefile.in: Added rules to handle new files
5517         i386-avx512.c i386-avx512-linux.c amd64-avx512.c
5518         amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
5519         * configure.srv (srv_i386_regobj): Add i386-avx512.o.
5520         (srv_i386_linux_regobj): Add i386-avx512-linux.o.
5521         (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
5522         (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
5523         x32-avx512-linux.o.
5524         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
5525         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
5526         (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
5527         i386/x32-avx512.xml.
5528         (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
5529         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
5530         i386/x32-avx512-linux.xml.
5531         * i387-fp.c (num_avx512_k_registers): New constant for number
5532         of K registers.
5533         (num_avx512_zmmh_low_registers): New constant for number of
5534         lower ZMM registers (0-15).
5535         (num_avx512_zmmh_high_registers): New constant for number of
5536         higher ZMM registers (16-31).
5537         (num_avx512_ymmh_registers): New contant for number of higher
5538         YMM registers (ymm16-31 added by avx521 on x86_64).
5539         (num_avx512_xmm_registers): New constant for number of higher
5540         XMM registers (xmm16-31 added by AVX512 on x86_64).
5541         (struct i387_xsave): Add space for AVX512 registers.
5542         (i387_cache_to_xsave): Change raw buffer size to 64 characters.
5543         Add code to handle AVX512 registers.
5544         (i387_xsave_to_cache): Add code to handle AVX512 registers.
5545         * linux-x86-low.c (init_registers_amd64_avx512_linux): New
5546         prototypei from generated file.
5547         (tdesc_amd64_avx512_linux): Likewise.
5548         (init_registers_x32_avx512_linux): Likewise.
5549         (tdesc_x32_avx512_linux): Likewise.
5550         (init_registers_i386_avx512_linux): Likewise.
5551         (tdesc_i386_avx512_linux): Likewise.
5552         (x86_64_regmap): Add AVX512 registers.
5553         (x86_linux_read_description): Add code to handle AVX512 XSTATE
5554         mask.
5555         (initialize_low_arch): Add code to initialize AVX512 registers.
5556
5557 2014-04-23  Pedro Alves  <palves@redhat.com>
5558
5559         * mem-break.c (find_gdb_breakpoint_at): Make static.
5560         * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
5561
5562 2014-04-23  Pedro Alves  <palves@redhat.com>
5563
5564         * i386-low.c: Don't include break-common.h here.
5565         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5566         prototype to take target_hw_bp_type as argument instead of a Z
5567         packet char.
5568         * i386-low.h: Include break-common.h here.
5569         (Z_packet_to_hw_type): Declare.
5570         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
5571         prototypes.
5572         * linux-x86-low.c (x86_insert_point): Convert the packet number to
5573         a target_hw_bp_type before calling i386_low_insert_watchpoint.
5574         (x86_remove_point): Convert the packet number to a
5575         target_hw_bp_type before calling i386_low_remove_watchpoint.
5576         * win32-i386-low.c (i386_insert_point): Convert the packet number
5577         to a target_hw_bp_type before calling i386_low_insert_watchpoint.
5578         (i386_remove_point): Convert the packet number to a
5579         target_hw_bp_type before calling i386_low_remove_watchpoint.
5580
5581 2014-04-23  Pedro Alves  <palves@redhat.com>
5582
5583         * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
5584
5585 2014-04-10  Pedro Alves  <palves@redhat.com>
5586
5587         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
5588         Check if the condition or command is NULL before checking if the
5589         breakpoint is known.  On success, return true.
5590         * mem-break.h (add_breakpoint_condition): Document return.
5591         (add_breakpoint_commands): Add describing comment.
5592         * server.c (skip_to_semicolon): New function.
5593         (process_point_options): Use it.
5594
5595 2014-04-09  Pedro Alves  <palves@redhat.com>
5596
5597         * linux-low.c (linux_read_loadmap): Pass current_inferior directly
5598         to lwpid_of.
5599
5600 2014-02-27  Pedro Alves  <palves@redhat.com>
5601
5602         PR 12702
5603         * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
5604         macros.
5605         * linux-low.c (delete_lwp, handle_extended_wait): Add debug
5606         output.
5607         (last_thread_of_process_p): Take a PID argument instead of a
5608         thread pointer.
5609         (linux_wait_for_lwp): Delete.
5610         (num_lwps, check_zombie_leaders, not_stopped_callback): New
5611         functions.
5612         (linux_low_filter_event): New function, party factored out from
5613         linux_wait_for_event.
5614         (linux_wait_for_event): Rename to ...
5615         (linux_wait_for_event_filtered): ... this.  Add new filter ptid
5616         argument.  Partly rewrite.  Always use waitpid(-1, WNOHANG) and
5617         sigsuspend.  Check for zombie leaders.
5618         (linux_wait_for_event): Reimplement as wrapper around
5619         linux_wait_for_event_filtered.
5620         (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED.  Assume that if
5621         a normal or signal exit is seen, it's the whole process exiting.
5622         (wait_for_sigstop): No longer a for_each_inferior callback.
5623         Rewrite on top of linux_wait_for_event_filtered.
5624         (stop_all_lwps): Call wait_for_sigstop directly.
5625         * server.c (resume, handle_target_event): Handle
5626         TARGET_WAITKIND_NO_RESUMED.
5627
5628 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
5629
5630         * win32-low.c (psapi_get_dll_name,
5631         * win32_CreateToolhelp32Snapshot): Delete.
5632         (win32_CreateToolhelp32Snapshot, win32_Module32First)
5633         (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
5634         Delete.
5635         (handle_load_dll): Add function description.
5636         Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
5637
5638 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
5639
5640         * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
5641         Add comment.
5642         (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
5643         base address when calling win32_add_one_solib.
5644         (handle_load_dll): Delete local variable load_addr.
5645         Remove 0x1000 offset applied to DLL base address when calling
5646         win32_add_one_solib.
5647         (handle_unload_dll): Add comment.
5648
5649 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
5650
5651         * win32-low.c (win32_add_all_dlls): Renames
5652         win32_ensure_ntdll_loaded.  Rewrite function documentation.
5653         Adjust implementation to always load all DLLs.
5654         Add 0x1000 offset to DLL base address when calling
5655         win32_add_one_solib.
5656         (child_initialization_done): New static global.
5657         (do_initial_child_stuff): Set child_initialization_done to
5658         zero during child initialization, and 1 after.  Replace call
5659         to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
5660         Add comment.
5661         (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
5662         (handle_unload_dll): Add function documentation.
5663         (get_child_debug_event): Ignore load and unload DLL events
5664         during child initialization.
5665
5666 2014-02-20  Doug Evans  <dje@google.com>
5667
5668         Remove global all_lwps.
5669         * inferiors.h (ptid_of): Move here from linux-low.h.
5670         (pid_of, lwpid_of): Ditto.
5671         * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
5672         parameter is a struct thread_info * now.
5673         (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
5674         directly.  Pass &all_threads to find_inferior instead of &all_lwps.
5675         (aarch64_stopped_data_address): Fetch lwpid from current_inferior
5676         directly.
5677         (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
5678         (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
5679         * linux-arm-low.c (update_registers_callback): Update, "entry"
5680         parameter is a struct thread_info * now.
5681         Fetch lwpid from current_inferior directly.
5682         (arm_insert_point): Pass &all_threads to find_inferior instead of
5683         &all_lwps.
5684         (arm_remove_point): Ditto.
5685         (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
5686         (arm_prepare_to_resume): Fetch pid from thread.
5687         (arm_read_description): Fetch lwpid from current_inferior directly.
5688         * linux-low.c (all_lwps): Delete.
5689         (delete_lwp): Delete call to remove_inferior.
5690         (handle_extended_wait): Fetch lwpid from thread.
5691         (add_lwp): Don't set lwp->entry.id.  Remove call to
5692         add_inferior_to_list.
5693         (linux_attach_lwp_1): Fetch pid from current_inferior directly.
5694         (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
5695         (kill_one_lwp_callback): Ditto.
5696         (linux_kill): Don't dereference NULL pointer.
5697         Fetch ptid,lwpid from thread.
5698         (get_detach_signal): Fetch ptid from thread.
5699         (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
5700         Simplify call to regcache_invalidate_thread.
5701         (delete_lwp_callback): Update, "entry" parameter is a
5702         struct thread_info * now.  Fetch pid from thread.
5703         (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
5704         (status_pending_p_callback): Update, "entry" parameter is a
5705         struct thread_info * now.  Fetch ptid from thread.
5706         (find_lwp_pid): Update, "entry" parameter is a
5707         struct thread_info * now.
5708         (linux_wait_for_lwp): Fetch pid from thread.
5709         (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
5710         (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
5711         (enqueue_one_deferred_signal): Fetch lwpid from thread.
5712         (dequeue_one_deferred_signal): Ditto.
5713         (cancel_breakpoint): Fetch ptid from current_inferior.
5714         (linux_wait_for_event): Pass &all_threads to find_inferior,
5715         not &all_lwps.  Fetch ptid, lwpid from thread.
5716         (count_events_callback): Update, "entry" parameter is a
5717         struct thread_info * now.
5718         (select_singlestep_lwp_callback): Ditto.
5719         (select_event_lwp_callback): Ditto.
5720         (cancel_breakpoints_callback): Ditto.
5721         (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
5722         not &all_lwps.
5723         (select_event_lwp): Ditto.  Fetch ptid from event_thread.
5724         (unsuspend_one_lwp): Update, "entry" parameter is a
5725         struct thread_info * now.
5726         (unsuspend_all_lwps): Pass &all_threads to find_inferior,
5727         not &all_lwps.
5728         (linux_stabilize_threads): Ditto.  And for for_each_inferior.
5729         Fetch lwpid from thread, not lwp.
5730         (linux_wait_1): Fetch ptid, lwpid from current_inferior.
5731         Pass &all_threads to find_inferior, not &all_lwps.
5732         (send_sigstop): Fetch lwpid from thread, not lwp.
5733         (send_sigstop_callback): Update, "entry" parameter is a
5734         struct thread_info * now.
5735         (suspend_and_send_sigstop_callback): Ditto.
5736         (wait_for_sigstop): Ditto.  Fetch ptid, lwpid from thread, lwp.
5737         (stuck_in_jump_pad_callback): Update, "entry" parameter is a
5738         struct thread_info * now.
5739         (move_out_of_jump_pad_callback): Ditto.  Fetch ptid, lwpid
5740         from thread, lwp.
5741         (lwp_running): Update, "entry" parameter is a
5742         struct thread_info * now.
5743         (stop_all_lwps): Fetch ptid from thread.
5744         Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
5745         (linux_resume_one_lwp): Fetch lwpid from thread.
5746         (linux_set_resume_request): Update, "entry" parameter is a
5747         struct thread_info * now.  Fetch pid, lwpid from thread.
5748         (resume_status_pending_p): Update, "entry" parameter is a
5749         struct thread_info * now.
5750         (need_step_over_p): Ditto.  Fetch lwpid from thread.
5751         (start_step_over): Fetch lwpid from thread.
5752         (linux_resume_one_thread): Update, "entry" parameter is a
5753         struct thread_info * now.  Fetch lwpid from thread.
5754         (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
5755         (proceed_one_lwp): Update, "entry" parameter is a
5756         struct thread_info * now.  Fetch lwpid from thread.
5757         (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
5758         struct thread_info * now.
5759         (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
5760         (unstop_all_lwps): Ditto.  Fetch lwpid from thread.
5761         (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
5762         directly.
5763         (regsets_store_inferior_registers): Ditto.
5764         (fetch_register, store_register): Ditto.
5765         (linux_read_memory, linux_write_memory): Ditto.
5766         (linux_request_interrupt): Ditto.
5767         (linux_read_auxv): Ditto.
5768         (linux_xfer_siginfo): Ditto.
5769         (linux_qxfer_spu): Ditto.
5770         (linux_qxfer_libraries_svr4): Ditto.
5771         * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
5772         moved to inferiors.h.
5773         (get_lwp): Delete.
5774         (get_thread_lwp): Update.
5775         (struct lwp_info): Delete member "entry".  Simplify comment for
5776         member "thread".
5777         (all_lwps): Delete.
5778         * linux-mips-low.c (mips_read_description): Fetch lwpid from
5779         current_inferior directly.
5780         (update_watch_registers_callback): Update, "entry" parameter is a
5781         struct thread_info * now.  Fetch pid from thread.
5782         (mips_linux_prepare_to_resume): Fetch ptid from thread.
5783         (mips_insert_point): Fetch lwpid from current_inferior.
5784         Pass &all_threads to find_inferior, not &all_lwps.
5785         (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
5786         (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
5787         directly.
5788         (mips_stopped_data_address): Ditto.
5789         * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
5790         directly.
5791         * linux-tile-low.c (tile_arch_setup): Ditto.
5792         * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
5793         (update_debug_registers_callback): Update, "entry" parameter is a
5794         struct thread_info * now.  Fetch pid from thread.
5795         (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
5796         Pass &all_threads to find_inferior, not &all_lwps.
5797         (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
5798         (i386_dr_low_set_control): Fetch pid from current_inferior directly.
5799         Pass &all_threads to find_inferior, not &all_lwps.
5800         (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
5801         (i386_dr_low_get_status): Ditto.
5802         (x86_linux_prepare_to_resume): Fetch ptid from thread.
5803         (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
5804         (x86_linux_read_description): Ditto.
5805         * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
5806
5807 2014-02-20  Doug Evans  <dje@google.com>
5808
5809         * inferiors.c (get_first_inferior): Fix buglet.
5810
5811 2014-02-19  Doug Evans  <dje@google.com>
5812
5813         * gdbthread.h (add_thread): Change result type to struct thread_info *.
5814         * inferiors.c (add_thread): Change result type to struct thread_info *.
5815         All callers updated.
5816         (add_lwp): Call add_thread here instead of in callers.
5817         All callers updated.
5818         * linux-low.h (get_lwp_thread): Rewrite.
5819         (struct lwp_info): New member "thread".
5820
5821 2014-02-19  Doug Evans  <dje@google.com>
5822
5823         * linux-low.c (add_lwp): Change result to struct lwp_info *.
5824         All callers updated.
5825
5826 2014-02-19  Doug Evans  <dje@google.com>
5827
5828         * inferiors.c (add_thread): Fix whitespace.
5829
5830 2014-02-19  Doug Evans  <dje@google.com>
5831
5832         * dll.c (clear_dlls): Replace accessing list implemention details
5833         with API function.
5834         * gdbthread.h (get_first_thread): Declare.
5835         * inferiors.c (for_each_inferior_with_data): New function.
5836         (get_first_thread): New function.
5837         (find_thread_ptid): Simplify.
5838         (get_first_inferior): New function.
5839         (clear_list): Delete.
5840         (one_inferior_p): New function.
5841         (clear_inferior_list): New function.
5842         (clear_inferiors): Update.
5843         * inferiors.h (for_each_inferior_with_data): Declare.
5844         (clear_inferior_list): Declare.
5845         (one_inferior_p): Declare.
5846         (get_first_inferior): Declare.
5847         * linux-low.c (linux_wait_for_event): Replace accessing list
5848         implemention details with API function.
5849         * server.c (target_running): Ditto.
5850         (accumulate_file_name_length): New function.
5851         (emit_dll_description): New function.
5852         (handle_qxfer_libraries): Replace accessing list implemention
5853         details with API function.
5854         (handle_qxfer_threads_worker): New function.
5855         (handle_qxfer_threads_proper): Replace accessing list implemention
5856         details with API function.
5857         (handle_query): Ditto.
5858         (visit_actioned_threads_callback_ftype): New typedef.
5859         (visit_actioned_threads_data): New struct.
5860         (visit_actioned_threads): Rewrite to be find_inferior callback.
5861         (resume): Call find_inferior.
5862         (handle_status): Replace accessing list implemention
5863         details with API function.
5864         (process_serial_event): Replace accessing list implemention details
5865         with API function.
5866         * target.c (set_desired_inferior): Replace accessing list implemention
5867         details with API function.
5868         * tracepoint.c (same_process_p): New function.
5869         (gdb_agent_about_to_close): Replace accessing list implemention
5870         details with API function.
5871         * win32-low.c (child_delete_thread): Replace accessing list
5872         implemention details with API function.
5873         (match_dll_by_basename): New function.
5874         (dll_is_loaded_by_basename): New function.
5875         (win32_ensure_ntdll_loaded): Replace accessing list implemention
5876         details call to dll_is_loaded_by_basename.
5877
5878 2014-02-19  Doug Evans  <dje@google.com>
5879
5880         * dll.h (struct dll_info): Add comment.
5881         * gdbthread.h (struct thread_info): Add comment.
5882         (current_ptid): Simplify.
5883         * inferiors.c (add_process): Update.
5884         (remove_process): Update.
5885         * inferiors.h (struct process_info): Rename member "head" to "entry".
5886         * linux-low.c (delete_lwp): Update.
5887         (add_lwp): Update.
5888         (last_thread_of_process_p): Update.
5889         (kill_one_lwp_callback, linux_kill): Update.
5890         (status_pending_p_callback): Update.
5891         (wait_for_sigstop): Update.  Simplify read of ptid.
5892         (start_step_over): Update.
5893         * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
5894         (get_lwp_thread): Update.
5895         (struct lwp_info): Rename member "head" to "entry".
5896         * regcache.h (inferior_list_entry): Delete.
5897         * server.c (kill_inferior_callback): Update.
5898         (detach_or_kill_inferior_callback): Update.
5899         (print_started_pid): Update.
5900         (print_attached_pid): Update.
5901         (process_serial_event): Simplify read of ptid.
5902         * thread-db.c (thread_db_create_event): Update.
5903         (thread_db_get_tls_address): Update.
5904         * win32-low.c (current_inferior_ptid): Simplify.
5905
5906 2014-02-19  Tom Tromey  <tromey@redhat.com>
5907
5908         * target.h (struct target_ops) <supports_btrace>: Add target_ops
5909         argument.
5910         (target_supports_btrace): Update.
5911
5912 2014-02-14  Yao Qi  <yao@codesourcery.com>
5913
5914         * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
5915         (rsp-low-ipa.o): New target.
5916
5917 2014-02-12  Tom Tromey  <tromey@redhat.com>
5918
5919         * ax.c (gdb_parse_agent_expr): Use hex2bin, not
5920         convert_ascii_to_int.
5921         * regcache.c (registers_to_string): Likewise.
5922         * remote-utils.c (decode_M_packet): Likewise.
5923         * server.c (process_serial_event): Likewise.
5924
5925 2014-02-12  Tom Tromey  <tromey@redhat.com>
5926
5927         * server.c (handle_query, handle_v_run): Use hex2bin, not
5928         unhexify.
5929         * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
5930
5931 2014-02-12  Tom Tromey  <tromey@redhat.com>
5932
5933         * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
5934         convert_int_to_ascii.
5935         * regcache.c (registers_to_string, collect_register_as_string):
5936         Likewise.
5937         * remote-utils.c (look_up_one_symbol, relocate_instruction):
5938         Likewise.
5939         * server.c (process_serial_event): Likewise.
5940         * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
5941         (cmd_qtbuffer, cstr_to_hexstr): Likewise.
5942
5943 2014-02-12  Tom Tromey  <tromey@redhat.com>
5944
5945         * remote-utils.c (look_up_one_symbol, monitor_output): Use
5946         bin2hex, not hexify.
5947         * tracepoint.c (cmd_qtstatus): Likewise.
5948
5949 2014-02-12  Tom Tromey  <tromey@redhat.com>
5950
5951         * remote-utils.c (monitor_output): Pass explicit length to
5952         hexify.
5953
5954 2014-02-12  Tom Tromey  <tromey@redhat.com>
5955
5956         * tracepoint.c: Include rsp-low.h.
5957         * server.c: Include rsp-low.h.
5958         * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5959         (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5960         declare.
5961         * remote-utils.c: Include rsp-low.h.
5962         (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5963         (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5964         (convert_int_to_ascii, convert_ascii_to_int): Move to
5965         common/rsp-low.c.
5966         * regcache.c: Include rsp-low.h.
5967         * ax.c: Include rsp-low.h.
5968         * Makefile.in (SFILES): Add common/rsp-low.c.
5969         (OBS): Add rsp-low.o.
5970         (rsp-low.o): New target.
5971
5972 2014-02-12  Tom Tromey  <tromey@redhat.com>
5973
5974         * utils.h (pulongest, plongest, phex_nz): Don't declare.
5975         Include print-utils.h.
5976         * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5977         (plongest, thirty_two, phex_nz): Remove.
5978         * Makefile.in (SFILES): Add common/print-utils.c.
5979         (OBS): Add print-utils.o.
5980         (print-utils-ipa.o): New target.
5981         (print-utils.o): New target.
5982         (IPA_OBJS): Add print-utils-ipa.o.
5983
5984 2014-02-06  Tom Tromey  <tromey@redhat.com>
5985
5986         * Makefile.in (SFILES): Fix indentation.
5987
5988 2014-02-05  Doug Evans  <dje@google.com>
5989
5990         * linux-low.c (linux_wait_for_event): Improve comment.
5991         (linux_wait_1): Keep current_inferior in sync with event_child.
5992
5993 2014-01-22  Doug Evans  <dje@google.com>
5994
5995         * gdbthread.h (gdb_id_to_thread): Delete, unused.
5996
5997 2014-01-22  Doug Evans  <dje@google.com>
5998
5999         * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
6000         * configure: Regenerate.
6001         * config.in: Regenerate.
6002         * Makefile.in (SFILES): Add debug.c.
6003         (OBS): Add debug.o.
6004         * debug.c: New file.
6005         * debug.h: New file.
6006         * linux-aarch64-low.c (*): Update all debugging printfs to use
6007         debug_printf instead of fprintf.
6008         * linux-arm-low.c (*): Ditto.
6009         * linux-cris-low.c (*): Ditto.
6010         * linux-crisv32-low.c (*): Ditto.
6011         * linux-m32r-low.c (*): Ditto.
6012         * linux-sparc-low.c (*): Ditto.
6013         * linux-x86.c (*): Ditto.
6014         * linux-low.c (*): Ditto.
6015         (linux_wait_1): Add calls to debug_enter, debug_exit.
6016         (linux_wait): Remove redundant debugging printf.
6017         (stop_all_lwps): Add calls to debug_enter, debug_exit.
6018         (linux_resume, unstop_all_lwps): Ditto.
6019         * mem-break.c (*): Update all debugging printfs to use
6020         debug_printf instead of fprintf.
6021         * remote-utils.c (*): Ditto.
6022         * thread-db.c (*): Ditto.
6023         * server.c #include <ctype.h>, "gdb_vecs.h".
6024         (debug_threads): Moved to debug.c.
6025         (*): Update all debugging printfs to use debug_printf instead of
6026         fprintf.
6027         (start_inferior): Replace call to fflush with call to debug_flush.
6028         (monitor_show_help): Mention set debug-format.
6029         (parse_debug_format_options): New function.
6030         (handle_monitor_command): Handle "monitor set debug-format".
6031         (gdbserver_usage): Mention --debug-format.
6032         (main): Parse --debug-format.
6033         * server.h (debug_threads): Declaration moved to debug.h.
6034         #include "debug.h".
6035         * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
6036         trace_debug_1 that uses debug_printf.
6037         (tracepoint_look_up_symbols): Update all debugging printfs to use
6038         debug_printf instead of fprintf.
6039
6040 2014-01-20  Baruch Siach  <baruch@tkos.co.il>
6041
6042         * linux-xtensa-low.c: Include asm/ptrace.h instead of
6043         sys/ptrace.h.
6044
6045 2014-01-17  Pedro Alves  <palves@redhat.com>
6046
6047         PR build/16445
6048         * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
6049         defined after including gdb_proc_service.h.
6050
6051 2014-01-16  Doug Evans  <dje@google.com>
6052
6053         * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
6054         (match_dll): Use it.
6055
6056 2014-01-16  Markus Metzger  <markus.t.metzger@intel.com>
6057
6058         * target.h (target_ops) <read_btrace>: Change parameters and
6059         return type to allow error reporting.
6060         * server.c (handle_qxfer_btrace): Support delta reads.  Pass
6061         trace reading errors on.
6062         * linux-low.c (linux_low_read_btrace): Pass trace reading
6063         errors on.
6064         (linux_low_disable_btrace): New.
6065
6066 2014-01-15  Doug Evans  <dje@google.com>
6067
6068         * inferiors.c (thread_id_to_gdb_id): Delete.
6069         * inferiors.h (thread_id_to_gdb_id): Delete.
6070
6071 2014-01-13  Eli Zaretskii  <eliz@gnu.org>
6072
6073         * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
6074         "-I$(srcdir)/../".  Fixes MinGW compilation errors with old GCC
6075         versions.
6076
6077 2014-01-08  Pedro Alves  <palves@redhat.com>
6078
6079         * server.c (handle_status): Don't discard previous queued stop
6080         replies or thread's pending status here.
6081         (main) <disconnection>: Do it here instead.
6082
6083 2014-01-08  Pedro Alves  <palves@redhat.com>
6084
6085         * gdbthread.h (struct thread_info) <status_pending_p>: New field.
6086         * server.c (visit_actioned_threads, handle_pending_status): New
6087         function.
6088         (handle_v_cont): Factor out parts to ...
6089         (resume): ... this new function.  If in all-stop, and a thread
6090         being resumed has a pending status, report it without actually
6091         resuming.
6092         (myresume): Adjust to use the new 'resume' function.
6093         (clear_pending_status_callback, set_pending_status_callback)
6094         (find_status_pending_thread_callback): New functions.
6095         (handle_status): Handle the case of multiple threads having
6096         interesting statuses to report.  Report threads' real last signal
6097         instead of always reporting GDB_SIGNAL_TRAP.  Look for a thread
6098         with an interesting thread to report the status for, instead of
6099         always reporting the status of the first thread.
6100
6101 2014-01-01  Joel Brobecker  <brobecker@adacore.com>
6102
6103         * gdbserver.c (gdbserver_version): Set copyright year to 2014.
6104         * gdbreplay.c (gdbreplay_version): Likewise.
6105
6106 2013-12-18  Yufeng Zhang  <yufeng.zhang@arm.com>
6107
6108         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
6109         iov.iov_len with the real length in use.
6110
6111 2013-12-13  Joel Brobecker  <brobecker@adacore.com>
6112
6113         * Makefile.in (safe-ctype.o, lbasename.o): New rules.
6114         * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
6115         for all targets that use win32-low.c.
6116         * win32-low.c (win32_ensure_ntdll_loaded): New function.
6117         (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
6118
6119 2013-12-13  Pedro Alves  <palves@redhat.com>
6120
6121         * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
6122         if equal to TARGET_WAITKIND_LOADED.
6123         * win32-low.c (cached_status): New static global.
6124         (win32_wait): Add declaration.
6125         (do_initial_child_stuff): Flush all initial pending debug events
6126         up to the initial breakpoint.
6127         (win32_wait): If CACHED_STATUS was set, return that instead
6128         of doing a real wait.  Remove the code resuming the execution
6129         of the inferior after receiving a TARGET_WAITKIND_LOADED event
6130         during the initial phase.  Also remove the code changing
6131         OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
6132         TARGET_WAITKIND_STOPPED.
6133
6134 2013-12-11  Yao Qi  <yao@codesourcery.com>
6135
6136         * notif.c (handle_notif_ack): Return 0 if no notification
6137         matches.
6138
6139 2013-11-20  Doug Evans  <dje@google.com>
6140
6141         * linux-low.c (linux_set_resume_request): Fix comment.
6142
6143 2013-11-20  Doug Evans  <dje@google.com>
6144
6145         * linux-low.c (resume_status_pending_p): Tweak comment.
6146
6147 2013-11-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
6148
6149         * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
6150         amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
6151         * configure.srv (srv_i386_regobj): Add i386-mpx.o.
6152         (srv_i386_linux_regobj): Add i386-mpx-linux.o.
6153         (srv_amd64_regobj): Add amd64-mpx.o.
6154         (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
6155         (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
6156         (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
6157         * i387-fp.c (num_pl_bnd_register) Added constant.
6158         (num_pl_bnd_cfg_registers) Added constant.
6159         (struct i387_xsave) Added reserved area and MPX fields.
6160         (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
6161         * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
6162         function.
6163         (tdesc_i386_mpx_linux): Add MPX amd64 target.
6164         (init_registers_amd64_mpx_linux): Declare new function.
6165         (tdesc_amd64_mpx_linux): Add MPX amd64 target.
6166         (x86_64_regmap): Add MPX registers.
6167         (x86_linux_read_description): Add MPX case.
6168         (initialize_low_arch): Initialize MPX targets.
6169
6170 2013-11-18  Tom Tromey  <tromey@redhat.com>
6171
6172         * configure: Rebuild.
6173         * configure.ac: Don't check for stdlib.h.
6174         * gdbreplay.c: Unconditionally include stdlib.h.
6175
6176 2013-11-18  Tom Tromey  <tromey@redhat.com>
6177
6178         * config.in: Rebuild.
6179         * configure: Rebuild.
6180         * configure.ac: Don't use AC_HEADER_DIRENT.
6181
6182 2013-11-18  Tom Tromey  <tromey@redhat.com>
6183
6184         * server.h: Don't check HAVE_STRING_H.
6185         * gdbreplay.c: Don't check HAVE_STRING_H.
6186         * configure: Rebuild.
6187
6188 2013-11-18  Tom Tromey  <tromey@redhat.com>
6189
6190         * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
6191         LIBGNU.
6192
6193 2013-11-08  Tom Tromey  <tromey@redhat.com>
6194
6195         * configure, config.in: Rebuild.
6196         * configure.ac: Remove unused configury.
6197
6198 2013-11-08  Tom Tromey  <tromey@redhat.com>
6199
6200         * acinclude.m4: Include common.m4, codeset.m4.
6201         * configure, config.in: Rebuild.
6202         * configure.ac: Use GDB_AC_COMMON.
6203
6204 2013-11-06  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6205
6206         * linux-s390-low.c (HWCAP_S390_TE): New define.
6207         (s390_arch_setup): Consider the TE field in the HWCAP for
6208         determining 'have_regset_tdb'.
6209
6210 2013-10-16  Sergio Durigan Junior  <sergiodj@redhat.com>
6211
6212         PR gdb/16014
6213         * tracepoint.c (download_tracepoint_1): Remove unnecessary double
6214         call to sizeof.
6215
6216 2013-10-02  Pedro Alves  <palves@redhat.com>
6217
6218         * server.c (process_serial_event): Don't output "GDBserver
6219         exiting" if GDB is connected through stdio.
6220         * target.c (mywait): Likewise, be silent if GDB is connected
6221         through stdio.
6222
6223 2013-10-01  Joel Brobecker  <brobecker@adacore.com>
6224
6225         * lynx-low.c (lynx_add_threads_after_attach): New function.
6226         (lynx_attach): Remove call to add_thread.  Add call to
6227         lynx_add_threads_after_attach instead.
6228
6229 2013-09-28  Mike Frysinger  <vapier@gentoo.org>
6230
6231         * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
6232         * config.in, configure: Regenerated.
6233
6234 2013-09-18  Yao Qi  <yao@codesourcery.com>
6235
6236         PR server/15959
6237         * server.c (start_inferior): Clear 'resume_info'.
6238
6239 2013-09-16  Jiong Wang  <jiwang@tilera.com>
6240
6241         * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
6242         for each register.
6243
6244 2013-09-16  Jiong Wang  <jiwang@tilera.com>
6245
6246         * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
6247         linux-tile-low.o to srv_tgtobj.
6248
6249 2013-09-16  Will Newton  <will.newton@linaro.org>
6250
6251         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
6252         out regs.
6253
6254 2013-09-06  Pedro Alves  <palves@redhat.com>
6255
6256         * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
6257         (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
6258         (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
6259         (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
6260         (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
6261         (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
6262
6263 2013-09-06  Pedro Alves  <palves@redhat.com>
6264
6265         * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
6266         explicit header dependencies and use $COMPILE/$POSTCOMPILE.
6267
6268 2013-09-06  Pedro Alves  <palves@redhat.com>
6269
6270         * linux-amd64-ipa.c: Include tracepoint.h.
6271         * linux-i386-ipa.c: Include tracepoint.h.
6272
6273 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
6274
6275         * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
6276         (ps_get_thread_area): New function.
6277
6278 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
6279
6280         * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
6281         (initialize_low_arch): Call init_registers_crisv32 rather than
6282         init_register_crisv32.
6283
6284 2013-09-05  Pedro Alves  <palves@redhat.com>
6285
6286         * server.h (handle_vFile, hostio_last_error_from_errno): Move
6287         to ...
6288         * hostio.h: ... this new file.
6289         * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
6290         win32-low.c: Include hostio.h.
6291
6292 2013-09-05  Pedro Alves  <palves@redhat.com>
6293
6294         * server.h (gdb_client_data, handler_func, callback_handler_func)
6295         (delete_file_handler, add_file_handler, append_callback_event)
6296         (delete_callback_event, start_event_loop, initialize_event_loop):
6297         Move to event-loop.h and include it.
6298         * event-loop.h: New file.
6299
6300 2013-09-05  Pedro Alves  <palves@redhat.com>
6301
6302         * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
6303         * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
6304         (loaded_dll, unloaded_dll): Move to ...
6305         * dll.h: ... this new file.
6306         * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
6307
6308 2013-09-05  Pedro Alves  <palves@redhat.com>
6309
6310         * server.h (current_process, get_thread_process, all_processes)
6311         (add_inferior_to_list, for_each_inferior, current_inferior)
6312         (remove_inferior, add_process, remove_process, find_process_pid)
6313         (have_started_inferiors_p, have_attached_inferiors_p)
6314         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
6315         (clear_inferiors, find_inferior, find_inferior_id)
6316         (inferior_target_data, set_inferior_target_data)
6317         (inferior_regcache_data, set_inferior_regcache_data): Move to
6318         inferiors.h, and include it.
6319         * inferiors.h: New file.
6320
6321 2013-09-05  Pedro Alves  <palves@redhat.com>
6322
6323         * server.h (struct emit_ops, current_insn_ptr, emit_error):
6324         Move ...
6325         * ax.h: ... here.
6326
6327 2013-09-05  Pedro Alves  <palves@redhat.com>
6328
6329         * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
6330         tracepoint.h.
6331         * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
6332         (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
6333         (handle_tracepoint_general_set, handle_tracepoint_query)
6334         (tracepoint_finished_step, tracepoint_was_hit)
6335         (release_while_stepping_state_list, current_traceframe)
6336         (in_readonly_region, traceframe_read_mem)
6337         (fetch_traceframe_registers, traceframe_read_sdata)
6338         (traceframe_read_info, struct fast_tpoint_collect_status)
6339         (fast_tracepoint_collecting, force_unlock_trace_buffer)
6340         (handle_tracepoit_bkpts, initialize_low_tracepoint)
6341         (supply_fast_tracepoint_registers)
6342         (supply_static_tracepoint_registers, set_trampoline_buffer_space)
6343         (ipa_tdesc, claim_trampoline_space)
6344         (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
6345         (agent_mem_read, agent_get_trace_state_variable_value)
6346         (agent_set_trace_state_variable_value, agent_tsv_read)
6347         (agent_mem_read_string, get_raw_reg_func_addr)
6348         (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
6349         * tracepoint.h: ... this new file.
6350
6351 2013-09-05  Pedro Alves  <palves@redhat.com>
6352
6353         * server.h (perror_with_name, error, fatal, warning, paddress)
6354         (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
6355         include it.
6356         * utils.h: New file.
6357
6358 2013-09-05  Pedro Alves  <palves@redhat.com>
6359
6360         * server.h (remote_debug, noack_mode, transport_is_reliable)
6361         (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
6362         (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
6363         (getpkt, remote_prepare, remote_open, remote_close, write_ok)
6364         (write_enn, initialize_async_io, enable_async_io)
6365         (disable_async_io, check_remote_input_interrupt_request)
6366         (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
6367         (dead_thread_notify, prepare_resume_reply)
6368         (decode_address_to_semicolon, decode_address, decode_m_packet)
6369         (decode_M_packet, decode_X_packet, decode_xfer_write)
6370         (decode_search_memory_packet, unhexify, hexify)
6371         (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
6372         (look_up_one_symbol, relocate_instruction)
6373         (monitor_output): Move to remote-utils.h, and include it.
6374         * remote-utils.h: New file.
6375
6376 2013-09-05  Pedro Alves  <palves@redhat.com>
6377
6378         * server.h (_): Delete.
6379
6380 2013-09-02  Pedro Alves  <palves@redhat.com>
6381
6382         * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
6383         (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
6384         allocated.
6385         (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
6386
6387 2013-09-02  Pierre Muller  <muller@sourceware.org>
6388
6389         * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
6390         or WriteProcessMemory complete successfully and handle
6391         ERROR_PARTIAL_COPY error.
6392
6393 2013-09-02  Pedro Alves  <palves@redhat.com>
6394
6395         * server.c (gdb_read_memory): Return -1 on traceframe memory read
6396         error instead of EIO.
6397
6398 2013-08-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
6399
6400         PR server/15604
6401         * linux-low.c: Include filestuff.h.
6402         (linux_create_inferior) <pid == 0>: Call close_most_fds.
6403         * lynx-low.c: Include filestuff.h.
6404         (lynx_create_inferior) <pid == 0>: Call close_most_fds.
6405         * server.c: Include filestuff.h.
6406         (main): Call notice_open_fds.
6407         * spu-low.c: Include filestuff.h.
6408         (spu_create_inferior) <pid == 0>: Call close_most_fds.
6409
6410 2013-08-22  Luis Machado  <lgustavo@codesourcery.com>
6411
6412         * Makefile.in: Explain why ../target and ../nat are not
6413         listed as include file search paths.
6414         (linux-waitpid.o): New object file rule.
6415         * configure.srv (srv_native_linux_obj): New variable.
6416         Replace all occurrences of linux native object files with
6417         $srv_native_linux_obj.
6418         * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
6419         (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
6420         (linux_enable_event_reporting): Remove declaration.
6421         (my_waitpid): Moved to common/linux-waitpid.c.
6422         (linux_wait_for_event): Pass ptid when calling
6423         linux_enable_event_reporting.
6424         (linux_supports_tracefork_flag): Remove.
6425         (linux_enable_event_reporting): Likewise.
6426         (linux_tracefork_grandchild): Remove.
6427         (STACK_SIZE): Moved to common/linux-ptrace.c.
6428         (linux_tracefork_child): Remove.
6429         (linux_test_for_tracefork): Remove.
6430         (linux_look_up_symbols): Call linux_supports_traceclone.
6431         (initialize_low): Remove call to linux_test_for_tracefork.
6432         * linux-low.h (PTRACE_TYPE_ARG3): Move to
6433         common/linux-ptrace.h.
6434         (PTRACE_TYPE_ARG4): Likewise.
6435         Include linux-ptrace.h.
6436
6437 2013-08-21  Pedro Alves  <palves@redhat.com>
6438
6439         * config.in: Renegerate.
6440
6441 2013-08-19  Luis Machado  <lgustavo@codesourcery.com>
6442
6443         * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
6444         (SFILES): Remove $(srcdir)/common/target-common.c and
6445         add $(srcdir)/target/waitstatus.c.
6446         (OBS): Remove target-common.o and add waitstatus.o.
6447         (server_h): Remove $(srcdir)/../common/target-common.h and
6448         add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
6449         and $(srcdir)/../target/waitstatus.h.
6450         (target-common.o): Remove.
6451         (waitstatus.o): New target object file.
6452         * target.h: Do not include target-common.h and
6453         include target/resume.h, target/wait.h and
6454         target/waitstatus.h.
6455
6456 2013-08-13  Luis Machado  <lgustavo@codesourcery.com>
6457
6458         * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6459         to PTRACE_TYPE_ARG3.
6460         * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
6461         to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
6462         PTRACE_TYPE_ARG4.
6463         * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
6464         (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
6465
6466 2013-07-27  Jie Zhang  <jie@codesourcery.com>
6467             Daniel Jacobowitz  <dan@codesourcery.com>
6468             Yao Qi  <yao@codesourcery.com>
6469
6470         * Makefile.in (SFILES): Add common/mips-linux-watch.c.
6471         (mips-linux-watch.o): New rule.
6472         (mips_linux_watch_h): New variable.
6473         * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
6474         srv_tgtobj.
6475         * linux-mips-low.c: Include mips-linux-watch.h.
6476         (struct arch_process_info, struct arch_lwp_info): New.
6477         (update_watch_registers_callback): New function.
6478         (mips_linux_new_process, mips_linux_new_thread) New functions.
6479         (mips_linux_prepare_to_resume, mips_insert_point): New
6480         functions.
6481         (mips_remove_point, mips_stopped_by_watchpoint): New
6482         functions.
6483         (rsp_bp_type_to_target_hw_bp_type): New function.
6484         (mips_stopped_data_address): New function.
6485         (the_low_target): Add watchpoint support functions.
6486
6487 2013-07-27  Yao Qi  <yao@codesourcery.com>
6488
6489         * i386-low.c: Include break-common.h.
6490         (enum target_hw_bp_type): Remove.
6491
6492 2013-07-24  Luis Machado  <lgustavo@codesourcery.com>
6493
6494         * Makefile.in (SFILES): /common/target-common.c.
6495         (OBS): Add target-common.o.
6496         (server_h): Add $(srcdir)/../common/target-common.h.
6497         (target-common.o): New target.
6498         * server.c (queue_stop_reply_callback): Free
6499         status string after use.
6500         * target.c (target_waitstatus_to_string): Remove.
6501         * target.h: Include target-common.h.
6502         (resume_kind): Likewise.
6503         (target_waitkind): Likewise.
6504         (target_waitstatus): Likewise.
6505         (TARGET_WNOHANG): Likewise.
6506
6507 2013-07-04  Yao Qi  <yao@codesourcery.com>
6508
6509         * Makefile.in (host_alias): Use @host_noncanonical@.
6510         (target_alias): Use @target_noncanonical@.
6511         * configure.ac: Use ACX_NONCANONICAL_TARGET and
6512         ACX_NONCANONICAL_HOST.
6513         * configure: Regenerated.
6514
6515         Revert:
6516         2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
6517
6518         * configure.ac (version_host, version_target): Set and AC_SUBST them.
6519         * configure: Rebuild.
6520         * Makefile.in (version_host, version_target): Get from configure.
6521         (version.c): Use $(version_host) and $(version_target).
6522
6523 2013-07-03  Pedro Alves  <palves@redhat.com>
6524
6525         * Makefile.in (config.status): Depend on development.sh.
6526         * acinclude.m4: Include libmcheck.m4.
6527         * configure: Regenerate.
6528
6529 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
6530
6531         * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
6532         attribute inside the parentheses.
6533         (winapi_DebugSetProcessKillOnExit): Ditto.
6534         (winapi_DebugBreakProcess): Ditto.
6535         (winapi_GenerateConsoleCtrlEvent): Ditto.
6536
6537 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
6538
6539         * notif.h (notif_event): Add a dummy member to avoid compiler
6540         errors.
6541
6542 2013-07-01  Pedro Alves  <palves@redhat.com>
6543
6544         * hostio.c (HOSTIO_PATH_MAX): Define.
6545         (require_filename, handle_open, handle_unlink, handle_readlink):
6546         Use it.
6547
6548 2013-07-01  Pedro Alves  <palves@redhat.com>
6549
6550         * server.h: Include "pathmax.h".
6551         * linux-low.c: Don't include sys/param.h.
6552         (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
6553         MAXPATHLEN.
6554         * win32-low.c: Don't include sys/param.h.
6555         (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
6556
6557 2013-07-01  Pedro Alves  <palves@redhat.com>
6558
6559         * event-loop.c: Don't check HAVE_UNISTD_H before including
6560         <unistd.h>.
6561         * gdbreplay.c: Likewise.
6562         * remote-utils.c: Likewise.
6563         * server.c: Likewise.
6564         * configure.ac: Don't check for unistd.h.
6565         * configure: Regenerate.
6566
6567 2013-06-28  Tom Tromey  <tromey@redhat.com>
6568
6569         * Makefile.in (version.c): Use version.in, not
6570         common/version.in.
6571
6572 2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
6573
6574         * configure.ac (version_host, version_target): Set and AC_SUBST them.
6575         * configure: Rebuild.
6576         * Makefile.in (version_host, version_target): Get from configure.
6577         (version.c): Use $(version_host) and $(version_target).
6578
6579 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
6580
6581         Fix trace-status to output user name without trailing colon.
6582         * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
6583
6584 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
6585
6586         Fix trace-status to output proper start-time and stop-time.
6587         * tracepoint.c (cmd_qtstatus): Modify trace-status output to
6588         output start time and stop time in hex as gdb expects.
6589
6590 2013-06-26  Pedro Alves  <pedro@codesourcery.com>
6591
6592         * tracepoint.c (build_traceframe_info_xml): Output trace state
6593         variables present in the trace buffer.
6594
6595 2013-06-24  Tom Tromey  <tromey@redhat.com>
6596
6597         * Makefile.in (version.c): Use bfd/version.h, common/version.in,
6598         create-version.sh.
6599         (version.o): Remove.
6600         * gdbreplay.c: Include version.h.
6601         (version, host_name): Don't declare.
6602         * server.h: Include version.h.
6603         (version, host_name): Don't declare.
6604
6605 2013-06-12  Pedro Alves  <palves@redhat.com>
6606
6607         * linux-x86-low.c (linux_is_elf64): Delete global.
6608         (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
6609         with local linux_pid_exe_is_elf_64_file use.
6610
6611 2013-06-11  Pedro Alves  <palves@redhat.com>
6612
6613         * linux-low.c (regset_disabled, disable_regset): New functions.
6614         (regsets_fetch_inferior_registers)
6615         (regsets_store_inferior_registers): Use them.
6616         (initialize_regsets_info); Don't allocate the disabled_regsets
6617         array here.
6618         * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
6619         comment.
6620
6621 2013-06-11  Pedro Alves  <palves@redhat.com>
6622
6623         * linux-low.c (initialize_regsets_info): Use xcalloc instead of
6624         xmalloc.
6625
6626 2013-06-11  Pedro Alves  <palves@redhat.com>
6627
6628         * linux-x86-low.c (initialize_low_arch): Call
6629         init_registers_x32_avx_linux.
6630
6631 2013-06-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
6632
6633         Fix compatibility with Android Bionic.
6634         * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
6635         it is not empty.
6636
6637 2013-06-07  Pedro Alves  <palves@redhat.com>
6638
6639         PR server/14823
6640         * Makefile.in (OBS): Add tdesc.o.
6641         (IPA_OBJS): Add tdesc-ipa.o.
6642         (tdesc-ipa.o): New rule.
6643         * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
6644         interface.
6645         * linux-low.c (new_inferior): Delete.
6646         (disabled_regsets, num_regsets): Delete.
6647         (linux_add_process): Adjust to set the new per-process
6648         new_inferior flag.
6649         (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
6650         (linux_wait_for_lwp): Adjust.  Only call arch_setup if the event
6651         was a stop.  When calling arch_setup, switch the current inferior
6652         to the thread that got an event.
6653         (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
6654         (regsets_fetch_inferior_registers)
6655         (regsets_store_inferior_registers): New regsets_info parameter.
6656         Adjust to use it.
6657         (linux_register_in_regsets): New regs_info parameter.  Adjust to
6658         use it.
6659         (register_addr, fetch_register, store_register): New usrregs_info
6660         parameter.  Adjust to use it.
6661         (usr_fetch_inferior_registers, usr_store_inferior_registers): New
6662         parameter regs_info.  Adjust to use it.
6663         (linux_fetch_registers): Get the current inferior's regs_info, and
6664         adjust to use it.
6665         (linux_store_registers): Ditto.
6666         [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
6667         (initialize_low): Don't initialize the target_regsets here.  Call
6668         initialize_low_arch.
6669         * linux-low.h (target_regsets): Delete declaration.
6670         (struct regsets_info): New.
6671         (struct usrregs_info): New.
6672         (struct regs_info): New.
6673         (struct process_info_private) <new_inferior>: New field.
6674         (struct linux_target_ops): Delete the num_regs, regmap, and
6675         regset_bitmap fields.  New field regs_info.
6676         [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
6677         * i387-fp.c (num_xmm_registers): Delete.
6678         (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
6679         calls to new interface.
6680         (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
6681         (i387_xsave_to_cache): Adjust find_regno calls to new interface.
6682         Infer the number of xmm registers from the regcache's target
6683         description.
6684         * i387-fp.h (num_xmm_registers): Delete.
6685         * inferiors.c (add_thread): Don't install the thread's regcache
6686         here.
6687         * proc-service.c (gregset_info): Fetch the current inferior's
6688         regs_info.  Adjust to use it.
6689         * regcache.c: Include tdesc.h.
6690         (register_bytes, reg_defs, num_registers)
6691         (gdbserver_expedite_regs): Delete.
6692         (get_thread_regcache): If the thread doesn't have a regcache yet,
6693         create one, instead of aborting gdbserver.
6694         (regcache_invalidate_one): Rename to ...
6695         (regcache_invalidate_thread): ... this.
6696         (regcache_invalidate_one): New.
6697         (regcache_invalidate): Only invalidate registers of the current
6698         process.
6699         (init_register_cache): Add target_desc parameter, and use it.
6700         (new_register_cache): Ditto.  Assert the target description has a
6701         non zero registers_size.
6702         (regcache_cpy): Add assertions.  Adjust.
6703         (realloc_register_cache, set_register_cache): Delete.
6704         (registers_to_string, registers_from_string): Adjust.
6705         (find_register_by_name, find_regno, find_register_by_number)
6706         (register_cache_size): Add target_desc parameter, and use it.
6707         (free_register_cache_thread, free_register_cache_thread_one)
6708         (regcache_release, register_cache_size): New.
6709         (register_size): Add target_desc parameter, and use it.
6710         (register_data, supply_register, supply_register_zeroed)
6711         (supply_regblock, supply_register_by_name, collect_register)
6712         (collect_register_as_string, collect_register_by_name): Adjust.
6713         * regcache.h (struct target_desc): Forward declare.
6714         (struct regcache) <tdesc>: New field.
6715         (init_register_cache, new_register_cache): Add target_desc
6716         parameter.
6717         (regcache_invalidate_thread): Declare.
6718         (regcache_invalidate_one): Delete declaration.
6719         (regcache_release): Declare.
6720         (find_register_by_number, register_cache_size, register_size)
6721         (find_regno): Add target_desc parameter.
6722         (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
6723         declarations.
6724         * remote-utils.c: Include tdesc.h.
6725         (outreg, prepare_resume_reply): Adjust.
6726         * server.c: Include tdesc.h.
6727         (gdbserver_xmltarget): Delete declaration.
6728         (get_features_xml, process_serial_event): Adjust.
6729         * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
6730         declare.
6731         (struct process_info) <tdesc>: New field.
6732         (ipa_tdesc): Declare.
6733         * tdesc.c: New file.
6734         * tdesc.h: New file.
6735         * tracepoint.c: Include tdesc.h.
6736         [IN_PROCESS_AGENT] (ipa_tdesc): Define.
6737         (get_context_regcache): Adjust to pass ipa_tdesc down.
6738         (do_action_at_tracepoint): Adjust to get the register cache size
6739         from the context regcache's description.
6740         (traceframe_walk_blocks): Adjust to get the register cache size
6741         from the current trace frame's description.
6742         (traceframe_get_pc): Adjust to get current trace frame's
6743         description and pass it down.
6744         (gdb_collect): Adjust to get the register cache size from the
6745         IPA's description.
6746         * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
6747         (gdbserver_xmltarget): Delete.
6748         (initialize_low_tracepoint): Set the ipa's target description.
6749         * linux-i386-ipa.c (tdesc_i386_linux): Declare.
6750         (initialize_low_tracepoint): Set the ipa's target description.
6751         * linux-x86-low.c: Include tdesc.h.
6752         [__x86_64__] (is_64bit_tdesc): New.
6753         (ps_get_thread_area, x86_get_thread_area): Use it.
6754         (i386_cannot_store_register): Rename to ...
6755         (x86_cannot_store_register): ... this.  Use is_64bit_tdesc.
6756         (i386_cannot_fetch_register): Rename to ...
6757         (x86_cannot_fetch_register): ... this.  Use is_64bit_tdesc.
6758         (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
6759         to new interface.
6760         (target_regsets): Rename to ...
6761         (x86_regsets): ... this.
6762         (x86_get_pc, x86_set_pc): Adjust register_size calls to new
6763         interface.
6764         (x86_siginfo_fixup): Use is_64bit_tdesc.
6765         [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
6766         (tdesc_x32_avx_linux, tdesc_x32_linux)
6767         (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
6768         Declare.
6769         (x86_linux_update_xmltarget): Delete.
6770         (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
6771         (have_ptrace_getfpxregs, have_ptrace_getregset): New.
6772         (AMD64_LINUX_USER64_CS): New.
6773         (x86_linux_read_description): New, based on
6774         x86_linux_update_xmltarget.
6775         (same_process_callback): New.
6776         (x86_arch_setup_process_callback): New.
6777         (x86_linux_update_xmltarget): New.
6778         (x86_regsets_info): New.
6779         (amd64_linux_regs_info): New.
6780         (i386_linux_usrregs_info): New.
6781         (i386_linux_regs_info): New.
6782         (x86_linux_regs_info): New.
6783         (x86_arch_setup): Reimplement.
6784         (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
6785         (x86_emit_ops): Ditto.
6786         (the_low_target): Adjust.  Install x86_linux_regs_info,
6787         x86_cannot_fetch_register, and x86_cannot_store_register.
6788         (initialize_low_arch): New.
6789         * linux-ia64-low.c (tdesc_ia64): Declare.
6790         (ia64_fetch_register): Adjust.
6791         (ia64_usrregs_info, regs_info): New globals.
6792         (ia64_regs_info): New function.
6793         (the_low_target): Adjust.
6794         (initialize_low_arch): New function.
6795         * linux-sparc-low.c (tdesc_sparc64): Declare.
6796         (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
6797         Adjust.
6798         (sparc_arch_setup): New function.
6799         (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
6800         (the_low_target): Adjust.
6801         (initialize_low_arch): New function.
6802         * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
6803         (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
6804         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
6805         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
6806         (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
6807         (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
6808         (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
6809         (tdesc_powerpc_isa205_vsx64l): Declare.
6810         (ppc_cannot_store_register, ppc_collect_ptrace_register)
6811         (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
6812         (ppc_set_pc, ppc_get_hwcap): Adjust.
6813         (ppc_usrregs_info): Forward declare.
6814         (!__powerpc64__) ppc_regmap_adjusted: New global.
6815         (ppc_arch_setup): Adjust to the current process'es target
6816         description.
6817         (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
6818         (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
6819         (ppc_store_evrregset): Adjust.
6820         (target_regsets): Rename to ...
6821         (ppc_regsets): ... this, and make static.
6822         (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
6823         (ppc_regs_info): New function.
6824         (the_low_target): Adjust.
6825         (initialize_low_arch): New function.
6826         * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
6827         (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
6828         (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
6829         (tdesc_s390x_linux64v2): Declare.
6830         (s390_collect_ptrace_register, s390_supply_ptrace_register)
6831         (s390_fill_gregset, s390_store_last_break): Adjust.
6832         (target_regsets): Rename to ...
6833         (s390_regsets): ... this, and make static.
6834         (s390_get_pc, s390_set_pc): Adjust.
6835         (s390_get_hwcap): New target_desc parameter, and use it.
6836         [__s390x__] (have_hwcap_s390_high_gprs): New global.
6837         (s390_arch_setup): Adjust to set the current process'es target
6838         description.  Don't adjust the regmap.
6839         (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
6840         [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
6841         (regs_info_3264): New globals.
6842         (s390_regs_info): New function.
6843         (the_low_target): Adjust.
6844         (initialize_low_arch): New function.
6845         * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
6846         (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
6847         [__mips64] (init_registers_mips_linux)
6848         (init_registers_mips_dsp_linux): Delete defines.
6849         [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
6850         (have_dsp): New global.
6851         (mips_read_description): New, based on mips_arch_setup.
6852         (mips_arch_setup): Reimplement.
6853         (get_usrregs_info): New function.
6854         (mips_cannot_fetch_register, mips_cannot_store_register)
6855         (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
6856         (mips_fill_fpregset, mips_store_fpregset): Adjust.
6857         (target_regsets): Rename to ...
6858         (mips_regsets): ... this, and make static.
6859         (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
6860         (dsp_regs_info, regs_info): New globals.
6861         (mips_regs_info): New function.
6862         (the_low_target): Adjust.
6863         (initialize_low_arch): New function.
6864         * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
6865         (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
6866         Declare.
6867         (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
6868         (arm_read_description): New, with bits factored from
6869         arm_arch_setup.
6870         (arm_arch_setup): Reimplement.
6871         (target_regsets): Rename to ...
6872         (arm_regsets): ... this, and make static.
6873         (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
6874         (arm_regs_info): New function.
6875         (the_low_target): Adjust.
6876         (initialize_low_arch): New function.
6877         * linux-m68k-low.c (tdesc_m68k): Declare.
6878         (target_regsets): Rename to ...
6879         (m68k_regsets): ... this, and make static.
6880         (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
6881         (m68k_regs_info): New function.
6882         (m68k_arch_setup): New function.
6883         (the_low_target): Adjust.
6884         (initialize_low_arch): New function.
6885         * linux-sh-low.c (tdesc_sharch): Declare.
6886         (target_regsets): Rename to ...
6887         (sh_regsets): ... this, and make static.
6888         (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
6889         (sh_regs_info, sh_arch_setup): New functions.
6890         (the_low_target): Adjust.
6891         (initialize_low_arch): New function.
6892         * linux-bfin-low.c (tdesc_bfin): Declare.
6893         (bfin_arch_setup): New function.
6894         (bfin_usrregs_info, regs_info): New globals.
6895         (bfin_regs_info): New function.
6896         (the_low_target): Adjust.
6897         (initialize_low_arch): New function.
6898         * linux-cris-low.c (tdesc_cris): Declare.
6899         (cris_arch_setup): New function.
6900         (cris_usrregs_info, regs_info): New globals.
6901         (cris_regs_info): New function.
6902         (the_low_target): Adjust.
6903         (initialize_low_arch): New function.
6904         * linux-cris-low.c (tdesc_crisv32): Declare.
6905         (cris_arch_setup): New function.
6906         (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
6907         (cris_regs_info): New function.
6908         (the_low_target): Adjust.
6909         (initialize_low_arch): New function.
6910         * linux-m32r-low.c (tdesc_m32r): Declare.
6911         (m32r_arch_setup): New function.
6912         (m32r_usrregs_info, regs_info): New globals.
6913         (m32r_regs_info): Adjust.
6914         (initialize_low_arch): New function.
6915         * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
6916         (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
6917         (tic6x_usrregs_info): Forward declare.
6918         (tic6x_read_description): New function, based on ...
6919         (tic6x_arch_setup): ... this.  Reimplement.
6920         (target_regsets): Rename to ...
6921         (tic6x_regsets): ... this, and make static.
6922         (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
6923         (tic6x_regs_info): New function.
6924         (the_low_target): Adjust.
6925         (initialize_low_arch): New function.
6926         * linux-xtensa-low.c (tdesc_xtensa): Declare.
6927         (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
6928         (target_regsets): Rename to ...
6929         (xtensa_regsets): ... this, and make static.
6930         (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
6931         globals.
6932         (xtensa_arch_setup, xtensa_regs_info): New functions.
6933         (the_low_target): Adjust.
6934         (initialize_low_arch): New function.
6935         * linux-nios2-low.c (tdesc_nios2_linux): Declare.
6936         (nios2_arch_setup): Set the current process'es tdesc.
6937         (target_regsets): Rename to ...
6938         (nios2_regsets): ... this.
6939         (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
6940         (nios2_regs_info): New function.
6941         (the_low_target): Adjust.
6942         (initialize_low_arch): New function.
6943         * linux-aarch64-low.c (tdesc_aarch64): Declare.
6944         (aarch64_arch_setup): Set the current process'es tdesc.
6945         (target_regsets): Rename to ...
6946         (aarch64_regsets): ... this.
6947         (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6948         (aarch64_regs_info): New function.
6949         (the_low_target): Adjust.
6950         (initialize_low_arch): New function.
6951         * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6952         globals.
6953         (target_regsets): Rename to ...
6954         (tile_regsets): ... this.
6955         (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6956         (tile_regs_info): New function.
6957         (tile_arch_setup): Set the current process'es tdesc.
6958         (the_low_target): Adjust.
6959         (initialize_low_arch): New function.
6960         * spu-low.c (tdesc_spu): Declare.
6961         (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6962         * win32-arm-low.c (tdesc_arm): Declare.
6963         (arm_arch_setup): New function.
6964         (the_low_target): Install arm_arch_setup instead of
6965         init_registers_arm.
6966         * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6967         (init_windows_x86): Rename to ...
6968         (i386_arch_setup): ... this.  Set `win32_tdesc'.
6969         (the_low_target): Adjust.
6970         * win32-low.c (win32_tdesc): New global.
6971         (child_add_thread): Don't create the thread cache here.
6972         (do_initial_child_stuff): Set the new process'es tdesc.
6973         * win32-low.h (struct target_desc): Forward declare.
6974         (win32_tdesc): Declare.
6975         * lynx-i386-low.c (tdesc_i386): Declare global.
6976         (lynx_i386_arch_setup): Set `lynx_tdesc'.
6977         * lynx-low.c (lynx_tdesc): New global.
6978         (lynx_add_process): Set the new process'es tdesc.
6979         * lynx-low.h (struct target_desc): Forward declare.
6980         (lynx_tdesc): Declare global.
6981         * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6982         (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6983         * nto-low.c (nto_tdesc): New global.
6984         (do_attach): Set the new process'es tdesc.
6985         * nto-low.h (struct target_desc): Forward declare.
6986         (nto_tdesc): Declare.
6987         * nto-x86-low.c (tdesc_i386): Declare.
6988         (nto_x86_arch_setup): Set `nto_tdesc'.
6989
6990 2013-06-04  Gary Benson  <gbenson@redhat.com>
6991
6992         * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6993         to qSupported response when appropriate.
6994         (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6995         with nonzero-length annex.
6996         * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6997         arguments supplied in annex.
6998
6999 2013-05-31  Doug Evans  <dje@google.com>
7000
7001         PR server/15594
7002         * linux-x86-low.c (ps_get_thread_area): Properly extend address to
7003         64 bits in 64-cross-32 environment.
7004
7005 2013-05-28  Pedro Alves  <palves@redhat.com>
7006
7007         * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
7008         (aarch64-without-fpu.c): Delete rule.
7009         * configure.srv (aarch64*-*-linux*): Remove references to
7010         aarch64-without-fpu.o and aarch64-without-fpu.xml.
7011         * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
7012         declaration.
7013
7014 2013-05-24  Pedro Alves  <palves@redhat.com>
7015
7016         * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
7017         instead of strchr/decode_address.  Error if the range isn't split
7018         with a ','.  Don't assume there's be a ':' in the action.
7019
7020 2013-05-23  Yao Qi  <yao@codesourcery.com>
7021             Pedro Alves  <palves@redhat.com>
7022
7023         * linux-low.c (lwp_in_step_range): New function.
7024         (linux_wait_1): If the thread was range stepping and stopped
7025         outside the stepping range, report the stop to GDB.  Otherwise,
7026         continue stepping.  Add range stepping debug output.
7027         (linux_set_resume_request): Copy the step range from the resume
7028         request to the lwp.
7029         (linux_supports_range_stepping): New.
7030         (linux_target_ops) <supports_range_stepping>: Set to
7031         linux_supports_range_stepping.
7032         * linux-low.h (struct linux_target_ops)
7033         <supports_range_stepping>: New field.
7034         (struct lwp_info) <step_range_start, step_range_end>: New fields.
7035         * linux-x86-low.c (x86_supports_range_stepping): New.
7036         (the_low_target) <supports_range_stepping>: Set to
7037         x86_supports_range_stepping.
7038         * server.c (handle_v_cont): Handle 'r' action.
7039         (handle_v_requests): Append ";r" if the target supports range
7040         stepping.
7041         * target.h (struct thread_resume) <step_range_start,
7042         step_range_end>: New fields.
7043         (struct target_ops) <supports_range_stepping>:
7044         New field.
7045         (target_supports_range_stepping): New macro.
7046
7047 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
7048
7049         * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
7050         confusion in comment.
7051
7052 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
7053
7054         * lynx-low.c (struct process_info_private): New type.
7055         (lynx_add_process): New function.
7056         (lynx_create_inferior, lynx_attach): Replace calls to
7057         add_process by calls to lynx_add_process.
7058         (lynx_resume): If PTID is null, then try using
7059         current_process()->private->last_wait_event_ptid.
7060         Add comments.
7061         (lynx_clear_inferiors): Delete.  The contents of that function
7062         has been inlined in lynx_mourn;
7063         (lynx_wait_1): Save the ptid in the process's private data.
7064         (lynx_mourn): Free the process' private data.  Replace call
7065         to lynx_clear_inferiors by call to clear_inferiors.
7066
7067 2013-05-17  Yao Qi  <yao@codesourcery.com>
7068
7069         * i386-low.c (i386_length_and_rw_bits): Move the comment to
7070         the right place.
7071
7072 2013-05-16  Luis Machado  <lgustavo@codesourcery.com>
7073
7074         * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
7075         PT_DATA_ADDR and PT_TEXT_END_ADDR.  Update comments.
7076         (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
7077         PT_TEXT_END_ADDR guards.  Update comments.
7078         (linux_target_op) <read_offsets>: Conditionally define to
7079         linux_read_offsets if the target is UCLIBC and if it defines
7080         PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
7081
7082 2013-05-06  Sandra Loosemore  <sandra@codesourcery.com>
7083             Andrew Jenner  <andrew@codesourcery.com>
7084
7085         * Makefile.in (SFILES): Add linux-nios2-low.c.
7086         (clean): Add action to delete nios2-linux.c.
7087         (nios2-linux.c): New rule.
7088         * configure.srv: Add nios2*-*-linux*.
7089         * linux-nios2-low.c: New.
7090
7091 2013-05-03  Hafiz Abid Qadeer  <abidh@codesourcery.com>
7092
7093         * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
7094
7095 2013-04-25  Hui Zhu  <hui@codesourcery.com>
7096
7097         PR gdb/15186
7098         * ax.c (ax_printf): Add fflush.
7099
7100 2013-04-22  Tom Tromey  <tromey@redhat.com>
7101
7102         * Makefile.in (SFILES): Add filestuff.c.
7103         (OBS): Add filestuff.o.
7104         (filestuff.o): New target.
7105         * config.in, configure: Rebuild.
7106         * configure.ac: Check for fdwalk, pipe2.
7107
7108 2013-04-17  Pedro Alves  <palves@redhat.com>
7109
7110         * configure.ac (USE_THREAD_DB): Delete variable.
7111         (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
7112         Don't AC_SUBST USE_THREAD_DB.
7113         * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
7114         * config.in, configure: Regenerate.
7115
7116 2013-04-16  Pedro Alves  <palves@redhat.com>
7117
7118         * linux-low.h (struct lwp_info) <thread_known>: Move under
7119         the USE_THREAD_DB #ifdef.
7120
7121 2013-04-16  Pedro Alves  <palves@redhat.com>
7122
7123         * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
7124         (linux-low.o): Delete rule.
7125         * linux-low.h: Always include "gdb_thread_db.h" instead of
7126         conditionally including thread_db.h.
7127         (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
7128         HAVE_THREAD_DB_H.
7129
7130 2013-04-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
7131
7132         * Makefile.in (install-only): Fix make install regression.
7133
7134 2013-04-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
7135
7136         Convert man pages to texinfo, new gdbinit.5 texinfo page.
7137         * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
7138         installation.
7139         * gdbserver.1: Remove.
7140
7141 2013-03-22  Pedro Alves  <palves@redhat.com>
7142
7143         * linux-low.c (handle_extended_wait): Don't call
7144         linux_enable_event_reporting.
7145
7146 2013-03-15  Tony Theodore  <tonyt@logyst.com>
7147
7148         PR build/9098:
7149         * Makefile.in (SHELL): Use @SHELL@.
7150
7151 2013-03-14  Sergio Durigan Junior  <sergiodj@redhat.com>
7152
7153         * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
7154         compiler warning.
7155
7156 2013-03-13  Joel Brobecker  <brobecker@adacore.com>
7157
7158         * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
7159         Remove extraneous NULL element.
7160
7161 2013-03-13  Yao Qi  <yao@codesourcery.com>
7162
7163         * tracepoint.c (traceframe_read_tsv): Look for the last matched
7164         'V' block in trace frame.
7165
7166 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
7167
7168         * target.h (struct target_ops): Add btrace ops.
7169         (target_supports_btrace): New macro.
7170         (target_enable_btrace): New macro.
7171         (target_disable_btrace): New macro.
7172         (target_read_btrace): New macro.
7173         * gdbthread.h (struct thread_info): Add btrace field.
7174         * server.c: Include btrace-common.h.
7175         (handle_btrace_general_set): New function.
7176         (handle_btrace_enable): New function.
7177         (handle_btrace_disable): New function.
7178         (handle_general_set): Call handle_btrace_general_set.
7179         (handle_qxfer_btrace): New function.
7180         (struct qxfer qxfer_packets[]): Add btrace entry.
7181         * inferiors.c (remove_thread): Disable btrace.
7182         * linux-low: Include linux-btrace.h.
7183         (linux_low_enable_btrace): New function.
7184         (linux_low_read_btrace): New function.
7185         (linux_target_ops): Add btrace ops.
7186         * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
7187         Add srv_linux_btrace=yes.
7188         (x86_64-*-linux*): Add linux-btrace.o.
7189         Add srv_linux_btrace=yes.
7190         * configure.ac: Define HAVE_LINUX_BTRACE.
7191         * config.in: Regenerated.
7192         * configure: Regenerated.
7193
7194 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
7195
7196         * server.c (handle_qxfer): Preserve error message if -3 is
7197         returned.
7198         (qxfer): Document the -3 return value.
7199
7200 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
7201
7202         * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
7203         (linux_btrace_h): New variable.
7204         (linux-btrace.o): New rule.
7205
7206 2013-03-08  Stan Shebs  <stan@codesourcery.com>
7207             Hafiz Abid Qadeer  <abidh@codesourcery.com>
7208
7209         * tracepoint.c (trace_buffer_size): New global.
7210         (DEFAULT_TRACE_BUFFER_SIZE): New define.
7211         (init_trace_buffer): Change to one-argument function. Allocate
7212         trace buffer memory.
7213         (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
7214         handle QTBuffer:size packet.
7215         (cmd_bigqtbuffer_size): New function.
7216         (initialize_tracepoint): Call init_trace_buffer with
7217         DEFAULT_TRACE_BUFFER_SIZE.
7218         * server.c (handle_query): Add QTBuffer:size in the
7219         supported packets.
7220
7221 2013-03-07  Yao Qi  <yao@codesourcery.com>
7222
7223         * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
7224         (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
7225         of -1.
7226         (cmd_qtsp): Adjust condition.  Do post increment.
7227         Set cur_action and cur_step_action back to 0.
7228
7229 2013-03-07  Jeremy Bennett  <jeremy.bennett@embecosm.com>
7230
7231         PR server/15236
7232         * linux-low.c (linux_write_memory): Return early success if LEN is
7233         zero.
7234
7235 2013-03-05  Corinna Vinschen  <vinschen@redhat.de>
7236
7237         * configure.srv: Add x86_64-*-cygwin* as target.
7238
7239 2013-02-28  Tom Tromey  <tromey@redhat.com>
7240
7241         * configure.ac: Invoke AC_SYS_LARGEFILE.
7242         * configure, config.in: Rebuild.
7243
7244 2013-02-28  Corinna Vinschen  <vinschen@redhat.com>
7245
7246         * win32-low.c: Throughout, fix format strings and casts of
7247         printf-like functions to avoid type related warnings on all
7248         platforms.
7249         (get_child_debug_event): Print dwDebugEventCode as hex since
7250         that's how it's usually documented.
7251
7252 2013-02-28  Yao Qi  <yao@codesourcery.com>
7253
7254         * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
7255         pulongest.
7256
7257 2013-02-27  Jiong Wang  <jiwang@tilera.com>
7258
7259         * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
7260         (reg-tilegx32.c): New rule.
7261         * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
7262         * linux-tile-low.c (tile_arch_setup): New function.  Invoke
7263         different register info initializer according to elf class.
7264         (init_registers_tilgx32): New function.  The tilegx32 register info
7265         initializer.
7266         (tile_fill_gregset): Use "uint_reg_t" to represent register size.
7267         (tile_store_gregset): Likewise.
7268
7269 2013-02-27  Yao Qi  <yao@codesourcery.com>
7270
7271         * server.c (process_point_options): Print debug message when
7272         debug_threads is true.
7273
7274 2013-02-26  Yao Qi  <yao@codesourcery.com>
7275
7276         * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
7277
7278 2013-02-19  Pedro Alves  <palves@redhat.com>
7279             Kai Tietz <ktietz@redhat.com>
7280
7281         PR gdb/15161
7282
7283         * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
7284         instead of strtoul to extract address from packet.
7285         (process_serial_event) <'z'>: Likewise.
7286
7287 2013-02-18  Yao Qi  <yao@codesourcery.com>
7288
7289         * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
7290
7291 2013-02-14  Pedro Alves  <palves@redhat.com>
7292
7293         Plug memory leak.
7294
7295         * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
7296         TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
7297
7298 2013-02-14  Pedro Alves  <palves@redhat.com>
7299
7300         * tracepoint.c (cmd_qtdpsrc): Use savestring.
7301
7302 2013-02-14  Pedro Alves  <palves@redhat.com>
7303
7304         * tracepoint.c (save_string): Delete.
7305         (add_tracepoint_action): Use savestring instead of save_string.
7306
7307 2013-02-12  Pedro Alves  <palves@redhat.com>
7308
7309         * linux-xtensa-low.c: Ditto.
7310         * xtensa-xtregs.c: Ditto.
7311
7312 2013-02-12  Sanimir Agovic  <sanimir.agovic@intel.com>
7313
7314         * thread-db.c (thread_db_get_tls_address): NULL pointer check
7315         thread_db.
7316
7317 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
7318
7319         * linux-aarch64-low.c (aarch64_arch_setup): Clamp
7320         aarch64_num_wp_regs and aarch64_num_bp_regs to
7321         AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
7322
7323 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
7324
7325         * linux-aarch64-low.c (ps_get_thread_area): Replace
7326         PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
7327
7328 2013-02-04  Jim MacArthur  <jim.macarthur@arm.com>
7329             Marcus Shawcroft  <marcus.shawcroft@arm.com>
7330             Nigel Stephens  <nigel.stephens@arm.com>
7331             Yufeng Zhang  <yufeng.zhang@arm.com>
7332
7333         * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
7334         (aarch64.c, aarch64-without-fpu.c): New targets.
7335         * configure.srv (aarch64*-*-linux*): New.
7336         * linux-aarch64-low.c: New file.
7337
7338 2013-02-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
7339
7340         * linux-low.c (handle_extended_wait, linux_create_inferior)
7341         (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
7342         (dequeue_one_deferred_signal, linux_resume_one_thread)
7343         (fetch_register, linux_write_memory, linux_enable_event_reporting)
7344         (linux_tracefork_grandchild, linux_test_for_tracefork)
7345         (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
7346         PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
7347         where the argument is 0.
7348
7349 2013-01-25  Yao Qi  <yao@codesourcery.com>
7350
7351         * event-loop.c: Include "queue.h".
7352         (gdb_event_p): New typedef.
7353         (struct gdb_event) <next_event>: Remove.
7354         (event_queue): Change to QUEUE(gdb_event_p).
7355         (async_queue_event): Remove.
7356         (gdb_event_xfree): New.
7357         (initialize_event_loop): New.
7358         (process_event): Use API from QUEUE.
7359         (wait_for_event): Likewise.
7360         * server.c (main): Call initialize_event_loop.
7361         * server.h (initialize_event_loop): Declare.
7362
7363 2013-01-18  Yao Qi  <yao@codesourcery.com>
7364
7365         * ax.h (struct eval_agent_expr_context): New.
7366         (gdb_eval_agent_expr): Update declaration.
7367         * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
7368         TFRAME.  Add new argument CTX.
7369         * server.h (struct eval_agent_expr_context): Declare.
7370         (agent_mem_read, agent_tsv_read): Update declaration.
7371         (agent_mem_read_string): Likewise.
7372         * tracepoint.c (eval_tracepoint_agent_expr): Remove.
7373         (add_traceframe_block): Add new argument TPOINT.
7374         Increase TPOINT->traceframe_usage.
7375         (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
7376         eval_tracepoint_agent_expr.
7377         (condition_true_at_tracepoint): Likewise.
7378         (agent_mem_read): Remove argument TFRAME.  Add argument CTX.
7379         (agent_mem_read_string, agent_tsv_read): Likewise.
7380
7381 2013-01-16  Yao Qi  <yao@codesourcery.com>
7382
7383         * linux-low.c (linux_resume_one_lwp): Don't check
7384         'lwp->bp_reinsert != 0'.
7385
7386 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
7387             Pedro Alves  <palves@redhat.com>
7388
7389         * lynx-low.c (ptrace_request_to_str): Define a temporary
7390         macro and use it to simplify this function's implementation.
7391
7392 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
7393
7394         * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
7395         sets errno.
7396
7397 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
7398
7399         * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
7400
7401 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
7402
7403         * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
7404
7405 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
7406
7407         * lynx-low.c (lynx_resume): Use the resume_info parameter
7408         to determine the ptid for the lynx_ptrace call, unless
7409         it is equal to minus_one_ptid, in which case we use the
7410         ptid of the current_inferior.
7411         (lynx_wait_1): After having received a thread create/exit
7412         event, resume the inferior's execution using the signaling
7413         thread's ptid, rather than the old ptid.
7414
7415 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
7416
7417         * lynx-low.c (lynx_resume): Delete variable ret.
7418
7419 2013-01-01  Joel Brobecker  <brobecker@adacore.com>
7420
7421         * gdbreplay.c (gdbreplay_version): Update copyright year.
7422         * server.c (gdbserver_version): Likewise.
7423
7424 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
7425
7426         * lynx-low.c (lynx_wait_1): Add debug trace before adding
7427         new thread.
7428
7429 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
7430
7431         * lynx-low.c (ptrace_request_to_str): Add handling for
7432         PTRACE_GETTRACESIG.
7433
7434 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
7435
7436         * lynx-low.c (lynx_attach): Delete variable new_process.
7437
7438 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
7439
7440         * lynx-low.c (lynx_create_inferior): Delete variable
7441         new_process.
7442
7443 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
7444
7445         * lynx-low.c (ptrace_request_to_str): Do not handle
7446         PTRACE_GETTHREADLIST if this macro does not exist.
7447
7448 2012-12-15  Yao Qi  <yao@codesourcery.com>
7449
7450         * Makefile.in (OBS): Add notif.o.
7451         * notif.c, notif.h: New.
7452         * server.c: Include "notif.h".
7453         (struct vstop_notif) <next>: Remove.
7454         <base>: New field.
7455         (queue_stop_reply): Update.
7456         (push_event, send_next_stop_reply): Remove.
7457         (discard_queued_stop_replies): Update.
7458         (notif_stop): New variable.
7459         (handle_v_stopped): Remove.
7460         (handle_v_requests): Don't call handle_v_stopped.  Call
7461         handle_ack_notif instead.
7462         (queue_stop_reply_callback): Call notif_event_enque instead
7463         of queue_stop_reply.
7464         (handle_status): Don't call send_next_stop_reply, call
7465         notif_write_event instead.
7466         (kill_inferior_callback): Likewise.
7467         (detach_or_kill_inferior_callback): Likewise.
7468         (main): Call initialize_notif.
7469         (process_serial_event): Call QUEUE_is_empty.
7470         (handle_target_event): Call notif_push instead of push event.
7471         * server.h (push_event): Remove declaration.
7472
7473 2012-12-10  Tom Tromey  <tromey@redhat.com>
7474
7475         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
7476         (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
7477         macros.
7478         (.c.o): Rewrite.
7479         (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
7480         (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
7481         (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
7482         (amd64-linux-ipa.o, ax.o): Rewrite.
7483         (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
7484         (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
7485         (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
7486         (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
7487         (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
7488         (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
7489         (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
7490         (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
7491         (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
7492         (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
7493         (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
7494         (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
7495         (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
7496         (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
7497         (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
7498         (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
7499         (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
7500         (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
7501         (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
7502         (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
7503         (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
7504         (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
7505         (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
7506         (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
7507         (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
7508         (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
7509         (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
7510         (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
7511         (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
7512         (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
7513         (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
7514         (reg-tilegx.o): Remove.
7515         (all_object_files): New macro.
7516         Include .deps files.
7517         * aclocal.m4, configure: Rebuild.
7518         * acinclude.m4: Include depstand.m4, lead-dot.m4.
7519         * configure.ac: Invoke ZW_CREATE_DEPDIR,
7520         ZW_PROG_COMPILER_DEPENDENCIES.  Compute GMAKE condition.
7521
7522 2012-12-05  Tom Tromey  <tromey@redhat.com>
7523
7524         PR gdb/14917:
7525         * server.h (current_insn_ptr, emit_error): Declare 'extern'.
7526
7527 2012-11-28  Markus Metzger  <markus.t.metzger@intel.com>
7528
7529         * configure.ac: Check for linux/perf_event.h.
7530         * config.in: Regenerated.
7531         * configure: Regenerated.
7532
7533 2012-11-26  Maxime Villard  <rustyBSD@gmx.fr>
7534
7535         * hostio.c (handle_readlink): Decrease buffer size
7536         parameter passed to readlink by one byte.
7537
7538 2012-11-26  Yao Qi  <yao@codesourcery.com>
7539
7540         * configure.ac (build_warnings): Append '-Wempty-body'.
7541         * configure: Regenerated.
7542         * linux-low.c (linux_create_inferior): Use braces for empty 'if'
7543         body.
7544
7545 2012-11-15  Pierre Muller  <muller@sourceware.org>
7546
7547         * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
7548         * config.in: Regenerate.
7549         * configure: Regenerate.
7550         * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
7551         Use "gdb_wait.h" header instead of <sys/wait.h> header.
7552         * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7553         * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
7554         header.
7555         * server.c: Remove HAVE_WAIT_H conditional.  Use "gdb_wait.h" header
7556         instead of <sys/wait.h> header.
7557         * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
7558
7559 2012-11-13 Markus Metzger  <markus.t.metzger@intel.com>
7560
7561         * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
7562         (various make rules): Remove -DGDBSERVER
7563
7564 2012-11-09  Yao Qi  <yao@codesourcery.com>
7565
7566         * spu-low.c (current_ptid): Move it to ..
7567         * gdbthread.h: ... here.  New.
7568         * remote-utils.c (read_ptid): Use macro 'current_ptid'.
7569         * server.c (myresume, process_serial_event): Likewise.
7570         * thread-db.c (thread_db_find_new_threads): Likewise.
7571         * tracepoint.c (run_inferior_command): Likewise.
7572
7573 2012-10-01  Andrew Burgess  <aburgess@broadcom.com>
7574
7575         * server.c (handle_search_memory_1): Include access length in
7576         warning message.
7577
7578 2012-09-05  Michael Brandt  <michael.brandt@axis.com>
7579
7580         * linux-crisv32-low.c: Fix compile errors.
7581
7582 2012-09-04  Yao Qi  <yao@codesourcery.com>
7583
7584         * tracepoint.c (cmd_qtsv): Adjust debug message.
7585         Don't check CUR_TPOINT.
7586
7587 2012-08-28  Yao Qi  <yao@codesourcery.com>
7588
7589         * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
7590         * server.h: Include 'libiberty.h' and 'ansidecl.h'.
7591         (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
7592         Remove declarations of xmalloc, xreallloc, xstrdup and
7593         freeargv.
7594         * Makefile.in (libiberty_h): New.
7595         (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
7596         (linux-bfin-low.o): Append dependency 'libiberty.h'.
7597
7598 2012-08-23  Yao Qi  <yao@codesourcery.com>
7599
7600         * server.h: Remove declaration of 'xsnprintf'.
7601
7602 2012-08-22  Keith Seitz  <keiths@redhat.com>
7603
7604         * server.h: Include build-gnulib-gbserver/config.h.
7605         * gdbreplay.c: Likewise.
7606
7607 2012-08-08  Doug Evans  <dje@google.com>
7608
7609         * Makefile.in (SFILES): Add gdb_vecs.c.
7610         (OBS): Add gdb_vecs.o.
7611         (gdb_vecs_h, host_defs_h): New variables.
7612         (thread-db.o): Add $(gdb_vecs_h) dependency.
7613         (gdb_vecs.o): New rule.
7614         * thread-db.c: #include "gdb_vecs.h".
7615         (thread_db_load_search): Use a vector to iterate over path elements.
7616         Handle text appearing after "$pdir".
7617
7618         * configure.ac: Add check for strstr.
7619         * config.in: Regenerate.
7620         * configure: Regenerate.
7621
7622 2012-08-02  Ulrich Weigand  <ulrich.weigand@linaro.org>
7623
7624         * hostio.c (handle_pread): If pread fails, fall back to attempting
7625         lseek/read.
7626         (handle_pwrite): Likewise for pwrite.
7627
7628 2012-08-01  Ulrich Weigand  <ulrich.weigand@linaro.org>
7629
7630         * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
7631         between unsupported TYPE and unimplementable ADDR/LEN combination.
7632         (arm_insert_point): Act on new return value.
7633
7634 2012-07-31  Pedro Alves  <palves@redhat.com>
7635
7636         * server.c (process_point_options): Only skip tokens if we find
7637         one that is unrecognized.  Don't treat 'X' specially while
7638         skipping unrecognized tokens.
7639
7640 2012-07-30  Ulrich Weigand  <ulrich.weigand@linaro.org>
7641
7642         * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
7643         to 4-byte-align HW breakpoint addresses for Thumb.
7644
7645 2012-07-27  Yao Qi  <yao@codesourcery.com>
7646
7647         PR remote/14161.
7648
7649         * server.h: Declare gdb_agent_about_to_close.
7650         * target.c (kill_inferior): Include "agent.h".
7651         New.  Send command 'kill'.
7652         * target.h (kill_inferior): Removed macro.
7653         * tracepoint.c (gdb_agent_about_to_close): New.
7654         (gdb_agent_helper_thread): Handle command 'close'.
7655         Wait endlessly until the inferior stops.
7656         Install gdb_agent_remove_socket to atexit hook.
7657         (agent_socket_name): New static variable.
7658         (gdb_agent_socket_init): Replace local variable 'name' with
7659         'agent_socket_name'.
7660         (gdb_agent_remove_socket): New.
7661
7662 2012-07-27  Yao Qi  <yao@codesourcery.com>
7663
7664         * server.c (process_point_options): Stop at 'X' when parsing.
7665
7666 2012-07-19  Michael Eager  <eager@eagercon.com>
7667
7668         * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
7669         to hw_execute.
7670         * linux-x86-low.c (x86_insert_point, x86_remove_point):
7671         Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
7672         hardware breakpoint.
7673
7674 2012-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
7675
7676         * gdbserver/linux-low.c (initialize_low): Call
7677         linux_ptrace_init_warnings.
7678
7679 2012-07-02  Doug Evans  <dje@google.com>
7680
7681         * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
7682         pointer to int.
7683
7684 2012-07-02  Stan Shebs  <stan@codesourcery.com>
7685
7686         * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
7687         (ax.o): Add it to build rule.
7688         (ax-ipa.o): Ditto.
7689         (OBS): Add format.o.
7690         (IPA_OBS): Add format.o.
7691         * server.c (handle_query): Claim support for breakpoint commands.
7692         (process_point_options): Add command case.
7693         (process_serial_event): Leave running if there are printfs in
7694         effect.
7695         * mem-break.h (any_persistent_commands): Declare.
7696         (add_breakpoint_commands): Declare.
7697         (gdb_no_commands_at_breakpoint): Declare.
7698         (run_breakpoint_commands): Declare.
7699         * mem-break.c (struct point_command_list): New struct.
7700         (struct breakpoint): New field command_list.
7701         (any_persistent_commands): New function.
7702         (add_commands_to_breakpoint): New function.
7703         (add_breakpoint_commands): New function.
7704         (gdb_no_commands_at_breakpoint): New function.
7705         (run_breakpoint_commands): New function.
7706         * linux-low.c (linux_wait_1): Test for and run breakpoint commands
7707         locally.
7708         * ax.c: Include format.h.
7709         (ax_printf): New function.
7710         (gdb_eval_agent_expr): Add printf opcode.
7711
7712 2012-06-13  Yao Qi  <yao@codesourcery.com>
7713
7714         * server.c (start_inferior): Remove duplicated writes to fields
7715         'last_resume_kind' and 'last_status' of 'current_inferior'.
7716
7717 2012-06-12  Yao Qi  <yao@codesourcery.com>
7718             Pedro Alves  <palves@redhat.com>
7719
7720         * linux-low.c (linux_set_resume_request): Simplify predicate.  Add
7721         comment.
7722         * server.c (handle_v_cont): Extend comment.
7723
7724 2012-06-11  Yao Qi  <yao@codesourcery.com>
7725
7726         * linux-low.c (linux_attach): Add 'static'.
7727
7728 2012-06-06  Yao Qi  <yao@codesourcery.com>
7729
7730         * ax.c (gdb_eval_agent_expr): Print `top' in hex.
7731
7732 2012-06-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
7733
7734         Fix gcc -flto compilation warning.
7735         * server.c (main): Make variable multi_mode and attach volatile.
7736
7737 2012-05-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
7738
7739         * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
7740         if the platform doesn't know about it.
7741
7742 2012-05-30  Jeff Kenton  <jkenton@tilera.com>
7743
7744         * Makefile.in (SFILES): Add linux-tile-low.c.
7745         (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
7746         * configure.srv: Handle tilegx-*-linux*.
7747         * linux-tile-low.c: New file.
7748
7749 2012-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
7750
7751         * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
7752
7753 2012-05-24  Pedro Alves  <palves@redhat.com>
7754
7755         PR gdb/7205
7756
7757         Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
7758
7759 2012-05-24  Pedro Alves  <palves@redhat.com>
7760
7761         PR gdb/7205
7762
7763         Replace target_signal with gdb_signal throughout.
7764
7765 2012-05-22  Maciej W. Rozycki  <macro@codesourcery.com>
7766
7767         * linux-low.c (linux_store_registers): Avoid the copying sequence
7768         when no data has been retrieved by ptrace.
7769
7770 2012-05-22  Will Deacon  <will.deacon@arm.com>
7771
7772         * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
7773         Include asm/ptrace.h.
7774         (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
7775         already defined.
7776
7777 2012-05-21  Maciej W. Rozycki  <macro@codesourcery.com>
7778
7779         * linux-low.c (linux_store_registers): Don't re-retrieve data
7780         with ptrace that has already been obtained from /proc.  Always
7781         copy any data retrieved with ptrace to the buffer supplied.
7782
7783 2012-05-11  Yao Qi  <yao@codesourcery.com>
7784             Pedro Alves  <palves@redhat.com>
7785
7786         * linux-low.c (enum stopping_threads_kind): New.
7787         (stopping_threads): Change type to `enum stopping_threads_kind'.
7788         (handle_extended_wait): If stopping and suspending threads, leave
7789         the new_lwp suspended too.
7790         (linux_wait_for_event): Adjust.
7791         (stop_all_lwps): Set `stopping_threads' to
7792         STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
7793         whether we're suspending threads or just stopping them.  Assert no
7794         recursion happens.
7795
7796 2012-04-29  Yao Qi  <yao@codesourcery.com>
7797
7798         * server.h: Move some code to ...
7799         * gdbthread.h: ... here.  New.
7800         * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
7801         (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
7802         (nto-low.o, win32-low.o): Likewise.
7803         * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
7804         * regcache.c, remote-utils.c, server.c: Likewise.
7805         * target.c, tracepoint.c, win32-low.c: Likewise.
7806
7807 2012-04-24  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
7808
7809         * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
7810         (PTRACE_ARG4_TYPE): Likewise.
7811         (PTRACE_XFER_TYPE): Likewise.
7812         * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
7813         ptrace to PTRACE_ARG3_TYPE.
7814         * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
7815         (PTRACE_ARG4_TYPE): Likewise.
7816         (PTRACE_XFER_TYPE): Likewise.
7817         (linux_detach_one_lwp): Cast fourth argument of
7818         ptrace to long then PTRACE_ARG4_TYPE.
7819         (regsets_fetch_inferior_registers): Cast third argument of
7820         ptrace to long then PTRACE_ARG3_TYPE.
7821         (regsets_store_inferior_registers): Likewise.
7822
7823 2012-04-20  Pedro Alves  <palves@redhat.com>
7824
7825         * configure: Regenerate.
7826
7827 2012-04-19  Pedro Alves  <palves@redhat.com>
7828
7829         * Makefile.in (GNULIB_BUILDDIR): New.
7830         (LIBGNU, INCGNU, GNULIB_H): Adjust.
7831         (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
7832         (all, install-only, uninstall, clean-info, all-lib, clean): No
7833         longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
7834         (maintainer-clean realclean distclean): Use subdir_do.
7835         (subdir_do): New.
7836         (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
7837         $(GNULIB_BUILDDIR).  Don't pass argument to config.status.
7838         * acinclude.m4: Include acx_configure_dir.m4.
7839         * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
7840         calls.  Call AC_PROG_RANLIB.  Configure gnulib using
7841         ACX_CONFIGURE_DIR.
7842         (GNULIB): New.
7843         (GNULIB_STDINT_H): Adjust.
7844         (AC_OUTPUT): Don't output gnulib/Makefile anymore.
7845         * gdbreplay.c: Include build-gnulib/config.h.
7846         * server.h: Likewise.
7847         * aclocal.m4: Regenerate.
7848         * config.in: Regenerate.
7849         * configure: Regenerate.
7850
7851 2012-04-19  Pedro Alves  <palves@redhat.com>
7852
7853         * Makefile.in (LIBGNU, INCGNU): Adjust.
7854         (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
7855         (all, install-only, uninstall, clean-info, all-lib, clean)
7856         (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
7857         * configure.ac: Adjust AC_OUTPUT output.
7858         * aclocal.m4: Regenerate.
7859         * configure: Regenerate.
7860
7861 2012-04-19  Pedro Alves  <palves@redhat.com>
7862
7863         * Makefile.in (generated_files): New.
7864         (server_h): Remove the explicit dependency on config.h, and depend
7865         on $generated_files.
7866
7867 2012-04-19  Pedro Alves  <palves@redhat.com>
7868
7869         * Makefile.in (INCGNU): Add -Ignulib.
7870
7871 2012-04-19  Pedro Alves  <palves@redhat.com>
7872
7873         * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
7874         (INCGNU): ... this, and spell out -I here.
7875         (GNULIB_LIB): Rename to ...
7876         (LIBGNU): ... this.
7877         (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
7878
7879 2012-04-19  Pedro Alves  <palves@redhat.com>
7880
7881         * config.in: Regenerate.
7882
7883 2012-04-19  Pedro Alves  <palves@redhat.com>
7884
7885         * configure.ac: Remove AC_CHECK_DECLS check for memmem.
7886         * server.h (memmem): Remove declaration.
7887         * config.in: Regenerate.
7888         * configure: Regenerate.
7889
7890 2012-04-19  Yao Qi  <yao@codesourcery.com>
7891
7892         * Makefile.in (SFILES): Add common/vec.c.
7893         (OBS): Add vec.o.
7894         (vec.o): New rule.
7895
7896 2012-04-19  Yao Qi  <yao@codesourcery.com>
7897
7898         * remote-utils.c (prepare_resume_reply): Replace with macro
7899         target_core_of_thread.
7900         * server.c (handle_qxfer_threads_proper): Likewise.
7901         * target.h (traget_core_of_thread): New macro.
7902
7903 2012-04-18  Pedro Alves  <palves@redhat.com>
7904
7905         * aclocal.m4: Regenerate.
7906         * configure: Regenerate.
7907
7908 2012-04-16  Yao Qi  <yao@codesourcery.com>
7909
7910         * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
7911         duplicated on address.
7912
7913 2012-04-16  Yao Qi  <yao@codesourcery.com>
7914
7915         * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
7916         (struct tracepoint_action_ops) <send>: New field.
7917         (m_tracepoint_action_send, r_tracepoint_action_send): New.
7918         (agent_expr_send, x_tracepoint_action_send): New.
7919         (l_tracepoint_action_send): New.
7920         (cmd_qtdp): Download and install tracepoint
7921         according to `use_agent'.
7922         (run_inferior_command): Add one more parameter `len'.
7923         Update callers.
7924         (tracepoint_send_agent): New.
7925         (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
7926
7927 2012-04-16  Yao Qi  <yao@codesourcery.com>
7928
7929         * tracepoint.c (download_tracepoints): Moved to ...
7930         (cmd_qtstart): ... here.
7931
7932 2012-04-14  Yao Qi  <yao@codesourcery.com>
7933
7934         * tracepoint.c: Include inttypes.h.
7935         (struct collect_memory_action): Use sized types.
7936         (struct tracepoint): Likewise.
7937         (cmd_qtdp, stop_tracing): Update print specifiers.
7938         (cmd_qtp, response_tracepoint): Likewise.
7939         (collect_data_at_tracepoint): Likewise.
7940         (collect_data_at_step): Likewise.
7941
7942 2012-04-14  Yao Qi  <yao@codesourcery.com>
7943
7944         Import gnulib module inttypes.
7945         * aclocal.m4, config.in, configure: Regenerated.
7946
7947 2012-04-14  Yao Qi  <yao@codesourcery.com>
7948
7949         * Makefile.in (maintainer-clean, realclean, distclean): Remove
7950         Makefile and config.status at last.
7951
7952 2012-04-13  Yao Qi  <yao@codesourcery.com>
7953
7954         * tracepoint.c: Include stdint.h unconditionally.
7955
7956 2012-04-13  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
7957
7958         * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7959         on BFD_HAVE_SYS_PROCFS_TYPE.
7960         * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7961         * configure: Regenerate.
7962         * config.in: Likewise.
7963
7964 2012-04-13  H.J. Lu  <hongjiu.lu@intel.com>
7965
7966         * Makefile.in (clean): Also remove x32.c x32-linux.c
7967         x32-avx.c x32-avx-linux.c.
7968         (x32.o): New target.
7969         (x32.c): Likewise.
7970         (x32-linux.o): Likewise.
7971         (x32-linux.c): Likewise.
7972         (x32-avx.o): Likewise.
7973         (x32-avx.c): Likewise.
7974         (x32-avx-linux.o): Likewise.
7975         (x32-avx-linux.c): Likewise.
7976
7977         * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7978         (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7979         (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7980         (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7981         (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7982         i386/x32-avx-linux.xml.
7983
7984         * linux-x86-low.c (init_registers_x32_linux): New prototype.
7985         (init_registers_x32_avx_linux): Likwise.
7986         (x86_linux_update_xmltarget): Call init_registers_x32_linux
7987         or init_registers_x32_avx_linux if linux_is_elf64 is false.
7988
7989 2012-04-13  Pedro Alves  <palves@redhat.com>
7990
7991         * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7992         (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7993         (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7994         (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7995         the sub-make.
7996
7997 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
7998
7999         * linux-x86-low.c (compat_x32_clock_t): New.
8000         (compat_x32_siginfo_t): Likewise.
8001         (compat_x32_siginfo_from_siginfo): Likewise.
8002         (siginfo_from_compat_x32_siginfo): Likewise.
8003         (linux_is_elf64): Likewise.
8004         (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
8005         and siginfo_from_compat_x32_siginfo for x32.
8006         (x86_arch_setup): Set linux_is_elf64.
8007
8008 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
8009
8010         PR gdb/13969
8011         * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
8012         e_machine field.
8013         (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
8014         * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
8015         * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
8016         compatible with process.
8017
8018 2012-04-12  Yao Qi  <yao@codesourcery.com>
8019
8020         * Makefile.in: Define abs_top_srcdir and abs_srcdir.
8021         (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
8022         (install-only, install-info, clean): Handle sub dir gnulib.
8023         (all-lib, am--refresh): New targets.
8024         (memmem.o): Remove target.
8025         * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
8026         Invoke gl_EARLY.  Invoke AC_CHECK_PROGS for make.
8027         (AC_REPLACE_FUNCS): Remove memmem.
8028         Invoke gl_INIT and AM_INIT_AUTOMAKE.
8029         (AC_OUTPUT): Generate Makefile in gnulib/.
8030         * aclocal.m4, config.in, configure: Regenerated.
8031
8032 2012-04-10  Maciej W. Rozycki  <macro@codesourcery.com>
8033
8034         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
8035
8036 2012-04-05  Pedro Alves  <palves@redhat.com>
8037
8038         -Werror=strict-aliasing
8039
8040         * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
8041         pointer.
8042
8043 2012-04-04  Pedro Alves  <palves@redhat.com>
8044
8045         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8046         (sparc_store_gregset_from_stack, sparc_store_gregset)
8047         (sparc_breakpoint_at): Fix formatting.
8048
8049 2012-03-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
8050
8051         * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
8052         are available.
8053         * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
8054         [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
8055         * config.in: Regenerate.
8056         * configure: Likewise.
8057
8058 2012-03-29  Pedro Alves  <palves@redhat.com>
8059
8060         * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
8061         Correct ptrace arguments.
8062
8063 2012-03-28  Pedro Alves  <palves@redhat.com>
8064
8065         * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
8066         (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
8067         (IA64_FR1_REGNUM): New defines.
8068         (ia64_fetch_register): New.
8069         (the_low_target): Install it.
8070         * linux-low.h (struct linux_target_ops) <fetch_register>: New
8071         field.
8072         * linux-low.c (linux_fetch_registers): Try the
8073         the_low_target.fetch_register hook first.
8074
8075         * linux-arm-low.c (the_low_target): Adjust.
8076         * linux-bfin-low.c (the_low_target): Adjust.
8077         * linux-cris-low.c (the_low_target): Adjust.
8078         * linux-crisv32-low.c (the_low_target): Adjust.
8079         * linux-m32r-low.c (the_low_target): Adjust.
8080         * linux-m68k-low.c (the_low_target): Adjust.
8081         * linux-mips-low.c (the_low_target): Adjust.
8082         * linux-ppc-low.c (the_low_target): Adjust.
8083         * linux-s390-low.c (the_low_target): Adjust.
8084         * linux-sh-low.c (the_low_target): Adjust.
8085         * linux-sparc-low.c (the_low_target): Adjust.
8086         * linux-tic6x-low.c (the_low_target): Adjust.
8087         * linux-x86-low.c (the_low_target): Adjust.
8088         * linux-xtensa-low.c (the_low_target): Adjust.
8089
8090 2012-03-26  Pedro Alves  <palves@redhat.com>
8091
8092         * server.c (handle_qxfer_libraries): Don't bail early if
8093         the_target->qxfer_libraries_svr4 is not NULL.
8094
8095 2012-03-26  Pedro Alves  <palves@redhat.com>
8096
8097         * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
8098
8099 2012-03-23  Pedro Alves  <palves@redhat.com>
8100
8101         * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
8102         "library-list-svr4" element's start tag when the the DSO list is
8103         empty.
8104
8105 2012-03-23  Pedro Alves  <palves@redhat.com>
8106
8107         * linux-low.c (read_one_ptr): Read the inferior's pointer through
8108         a variable whose type size is the same as the inferior's pointer
8109         size.
8110
8111 2012-03-21  Thomas Schwinge  <thomas@codesourcery.com>
8112
8113         * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
8114         struct siginfo.
8115         * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
8116         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
8117         * linux-low.h: Include <signal.h>.
8118         (struct siginfo): Remove forward declaration.
8119         (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
8120         struct siginfo.
8121
8122 2012-03-21  Mike Frysinger  <vapier@gentoo.org>
8123
8124         * .gitignore: Ignore more files.
8125
8126 2012-03-19  Pedro Alves  <palves@redhat.com>
8127             Jan Kratochvil  <jan.kratochvil@redhat.com>
8128
8129         * server.c (cont_thread, general_thread): Add describing comments.
8130         (start_inferior): Clear `cont_thread'.
8131         (handle_v_cont): Don't set `cont_thread' if resuming all threads
8132         of a process.
8133
8134 2012-03-15  Yao Qi  <yao@codesourcery.com>
8135
8136         * tracepoint.c (install_tracepoint): Move duplicated tracepoint
8137         handling to ...
8138         (cmd_qtdp): ... here.
8139
8140 2012-03-15  Yao Qi  <yao@codesourcery.com>
8141
8142         * tracepoint.c (struct tracepoint_action_ops): New.
8143         (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
8144         (m_tracepoint_action_download): New.
8145         (r_tracepoint_action_download): New.
8146         (x_tracepoint_action_download): New.
8147         (l_tracepoint_action_download): New.
8148         (add_tracepoint_action): Install `action->ops' according type.
8149         (download_tracepoint_1): Move code `download' function pointer
8150         of various tracepoint_action_ops.
8151
8152 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
8153
8154         * linux-low.c (linux_attach_lwp_1): New variable buffer.  Call
8155         linux_ptrace_attach_warnings.
8156
8157 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
8158
8159         * Makefile.in (linux-ptrace.o): New.
8160         * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
8161         (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
8162         (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
8163         (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
8164         (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
8165         of these targets.
8166         * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
8167
8168 2012-03-08  Yao Qi  <yao@codesourcery.com>
8169             Pedro Alves  <palves@redhat.com>
8170
8171         Fix PR server/13392.
8172         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
8173         offset of JMP insn.
8174         * tracepoint.c (remove_tracepoint): New.
8175         (cmd_qtdp): Call remove_tracepoint when failed to install.
8176
8177 2012-03-07  Pedro Alves  <palves@redhat.com>
8178
8179         * linux-low.c (get_detach_signal): New.
8180         (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
8181         Pass on pending signals to PTRACE_DETACH.  Check the result of the
8182         ptrace call.
8183         * server.c (program_signals, program_signals_p): New.
8184         (handle_general_set): Handle QProgramSignals.
8185         * server.h (program_signals, program_signals_p): Declare.
8186
8187 2012-03-05  Pedro Alves  <palves@redhat.com>
8188             Jan Kratochvil  <jan.kratochvil@redhat.com>
8189
8190         * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
8191         New comment why.
8192
8193 2012-03-03  Yao Qi  <yao@codesourcery.com>
8194
8195         * tracepoint.c (tracepoint_look_up_symbols): Update call to
8196         agent_look_up_symbols.
8197
8198 2012-03-03  Yao Qi  <yao@codesourcery.com>
8199
8200         * Makefile.in (linux-low.o): Keep dependence on agent.h.
8201         (linux-x86-low.o): Likewise.
8202         * server.h: Remove in_process_agent_loaded.
8203         * tracepoint.c (in_process_agent_loaded): Removed.  Moved it
8204         common/agent.c.
8205         Update callers.
8206
8207 2012-03-03  Yao Qi  <yao@codesourcery.com>
8208
8209         * tracepoint.c (gdb_agent_capability): New global.
8210         (in_process_agent_loaded_ust): Renamed to
8211         `in_process_agent_supports_ust'.
8212         Update callers.
8213         (in_process_agent_supports_ust): Call agent_capability_check.
8214         (clear_installed_tracepoints): Assert that agent supports
8215         agent.
8216
8217 2012-03-03  Yao Qi  <yao@codesourcery.com>
8218
8219         * linux-low.c (linux_supports_agent): New.
8220         (linux_target_ops): Initialize field `supports_agent' with
8221         linux_supports_agent.
8222         * target.h (struct target_ops) <supports_agent>: New.
8223         (target_supports_agent): New macro.
8224         * server.c (handle_general_set): Handle packet 'QAgent'.
8225         (handle_query): Send `QAgent+'.
8226         * Makefile.in (server.o): Depends on agent.h.
8227
8228 2012-03-03  Yao Qi  <yao@codesourcery.com>
8229
8230         * Makefile.in (OBS): Add agent.o.
8231         Add new rule for agent.o.
8232         Track dependence of tracepoint.c on agent.h.
8233         * tracepoint.c (run_inferior_command_1):
8234         (run_inferior_command): Call agent_run_command.
8235         (gdb_ust_connect_sync_socket): Deleted.  Move it to
8236         common/agent.c.
8237         (resume_thread, stop_thread): Likewise.
8238         (gdb_ust_socket_init): Renamed to ...
8239         (gdb_agent_socket_init): ... New.
8240         (gdb_ust_thread): Renamed to ...
8241         (gdb_agent_helper_thread): ... New.
8242         (gdb_ust_init): Move some code to ...
8243         (gdb_agent_init): ... here.  New.
8244         [HAVE_UST]: Call gdb_ust_init.
8245         (initialize_tracepoint_ftlib):  Call gdb_agent_init.
8246         * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
8247         * config.in, configure: Regenerated.
8248
8249 2012-03-02  Pedro Alves  <palves@redhat.com>
8250
8251         * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
8252         * linux-low.c (struct simple_pid_list): New.
8253         (stopped_pids): New a struct simple_pid_list pointer.
8254         (add_to_pid_list, pull_pid_from_list): New.
8255         (handle_extended_wait): Don't assume the first signal new children
8256         report is SIGSTOP.  Adjust call to pull_pid_from_list.
8257         (linux_wait_for_lwp): Adjust.
8258
8259 2012-03-02  Yao Qi  <yao@codesourcery.com>
8260
8261         * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
8262         debug log.
8263
8264 2012-03-02  Yao Qi  <yao@codesourcery.com>
8265
8266         * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
8267         `stop_pc' and `tpoint'.  Update caller.
8268
8269 2012-03-01  Maciej W. Rozycki  <macro@codesourcery.com>
8270
8271         * linux-low.h (linux_target_ops): Add regset_bitmap member.
8272         * linux-low.c (use_linux_regsets): New macro.
8273         [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
8274         [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
8275         (linux_register_in_regsets): New function.
8276         (usr_fetch_inferior_registers): Skip registers covered by
8277         regsets.
8278         (usr_store_inferior_registers): Likewise.
8279         (usr_fetch_inferior_registers): New macro.
8280         (usr_store_inferior_registers): Likewise.
8281         (linux_fetch_registers): Handle mixed regset/non-regset targets.
8282         (linux_store_registers): Likewise.
8283         * linux-mips-low.c (init_registers_mips_dsp_linux): New
8284         prototype.
8285         (init_registers_mips64_dsp_linux): Likewise.
8286         (init_registers_mips_linux): New macro.
8287         (init_registers_mips_dsp_linux): Likewise.
8288         (mips_dsp_num_regs): Likewise.
8289         (DSP_BASE, DSP_CONTROL): New fallback macros.
8290         (mips_base_regs): New macro.
8291         (mips_regmap): Use it.  Fix the size.
8292         (mips_dsp_regmap): New variable.
8293         (mips_dsp_regset_bitmap): Likewise.
8294         (mips_arch_setup): New function.
8295         (mips_cannot_fetch_register): Use the_low_target.regmap rather
8296         than mips_regmap.
8297         (mips_cannot_store_register): Likewise.
8298         (the_low_target): Update .arch_setup, .num_regs and .regmap
8299         initializers.  Add .regset_bitmap initializer.
8300         * linux-arm-low.c (the_low_target): Add .regset_bitmap
8301         initializer.
8302         * linux-bfin-low.c (the_low_target): Likewise.
8303         * linux-cris-low.c (the_low_target): Likewise.
8304         * linux-crisv32-low.c (the_low_target): Likewise.
8305         * linux-ia64-low.c (the_low_target): Likewise.
8306         * linux-m32r-low.c (the_low_target): Likewise.
8307         * linux-m68k-low.c (the_low_target): Likewise.
8308         * linux-ppc-low.c (the_low_target): Likewise.
8309         * linux-s390-low.c (the_low_target): Likewise.
8310         * linux-sh-low.c (the_low_target): Likewise.
8311         * linux-sparc-low.c (the_low_target): Likewise.
8312         * linux-tic6x-low.c (the_low_target): Likewise.
8313         * linux-x86-low.c (the_low_target): Likewise.
8314         * linux-xtensa-low.c (the_low_target): Likewise.
8315         * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
8316         mips64-dsp-linux.o to srv_regobj.  Add mips-dsp-linux.xml,
8317         mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
8318         srv_xmlfiles.
8319         * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
8320         (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
8321
8322 2012-02-29  Yao Qi  <yao@codesourcery.com>
8323             Pedro Alves  <palves@redhat.com>
8324
8325         * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
8326         `step_over_finished' is true.
8327
8328 2012-02-27  Pedro Alves  <palves@redhat.com>
8329
8330         * linux-low.c (pid_is_stopped): Delete, moved to common/.
8331         (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
8332
8333 2012-02-27  Pedro Alves  <palves@redhat.com>
8334
8335         PR server/9684
8336         * linux-low.c (pid_is_stopped): New.
8337         (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
8338
8339 2012-02-25  Luis Machado  <lgustavo@codesourcery.com>
8340
8341         * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
8342         of conditions.
8343
8344 2012-02-24  Maciej W. Rozycki  <macro@codesourcery.com>
8345
8346         * linux-mips-low.c (mips_regmap): Correct the index of $f9.
8347
8348 2012-02-24  Luis Machado  <lgustavo@codesourcery>
8349
8350         * server.c (handle_query): Advertise support for target-side
8351         breakpoint condition evaluation.
8352         (process_point_options): New function.
8353         (process_serial_event): When inserting a breakpoint, check for
8354         a target-side condition that should be evaluated.
8355
8356         * mem-break.c: Include regcache.h and ax.h.
8357         (point_cond_list_t): New data structure.
8358         (breakpoint) <cond_list>: New field.
8359         (find_gdb_breakpoint_at): Make non-static.
8360         (delete_gdb_breakpoint_at): Clear any target-side
8361         conditions.
8362         (clear_gdb_breakpoint_conditions): New function.
8363         (add_condition_to_breakpoint): Likewise.
8364         (add_breakpoint_condition): Likewise.
8365         (gdb_condition_true_at_breakpoint): Likewise.
8366         (gdb_breakpoint_here): Return result directly instead
8367         of going through a local variable.
8368
8369         * mem-break.h (find_gdb_breakpoint_at): New prototype.
8370         (clear_gdb_breakpoint_conditions): Likewise.
8371         (add_breakpoint_condition): Likewise.
8372         (gdb_condition_true_at_breakpoint): Likewise.
8373
8374         * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
8375         (need_step_over_p): Take target-side breakpoint condition into
8376         consideration.
8377
8378 2012-02-24  Luis Machado  <lgustavo@codesourcery>
8379
8380         * server.h: Include tracepoint.h.
8381         (agent_mem_read, agent_get_trace_state_variable_value,
8382         agent_set_trace_state_variable_value,
8383         agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
8384         get_set_tsv_func_addr): New prototypes.
8385
8386         * ax.h: New include file.
8387         * ax.c: New source file.
8388
8389         * tracepoint.c: Include ax.h.
8390         (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
8391         agent_expr, eval_result_type): Move to ax.h.
8392         (parse_agent_expr): Rename to ...
8393         (gdb_parse_agent_expr): ... this, make it non-static and move
8394         to ax.h.
8395         (unparse_agent_expr) Rename to ...
8396         (gdb_unparse_agent_expr): ... this, make it non-static and move
8397         to ax.h.
8398         (eval_agent_expr): Rename to ...
8399         (eval_tracepoint_agent_expr): ... this.
8400         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
8401         forward declarations.
8402         (add_tracepoint_action): Call gdb_parse_agent_expr (...).
8403         (agent_get_trace_state_variable_value): New function.
8404         (agent_set_trace_state_variable_value): New function.
8405         (cmd_qtdp): Call gdb_parse_agent_expr (...).
8406         (response_tracepoint): Call gdb_unparse_agent_expr (...).
8407         (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
8408         (condition_true_at_tracepoint): Likewise.
8409         (parse_agent_expr): Rename to ...
8410         (gdb_parse_agent_expr): ... this and move to ax.c.
8411         (unparse_agent_expr): Rename to ...
8412         (gdb_unparse_agent_expr): ... this and move to ax.c.
8413         (gdb_agent_op_name): Move to ax.c.
8414         (eval_agent_expr): Rename to ...
8415         (gdb_eval_agent_expr): ... this, use regcache passed as parameter
8416         and move to ax.c.
8417         (eval_tracepoint_agent_expr): New function.
8418         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
8419         non-static.
8420         (current_insn_ptr, emit_error, struct bytecode_address): Move to
8421         ax.c.
8422         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
8423         emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
8424         emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
8425         emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
8426         emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
8427         emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
8428         emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
8429         emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
8430         (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
8431         (compile_bytecodes): Remove forward declaration.
8432         (is_goto_target): Move to ax.c.
8433         (compile_bytecodes): Move to ax.c and call
8434         agent_get_trace_state_variable_value (...) and
8435         agent_set_trace_state_variable_value (...).
8436
8437         * Makefile.in: Update ax.c and IPA dependencies.
8438
8439 2012-02-24  Pedro Alves  <palves@redhat.com>
8440
8441         * tracepoint.c (cmd_bigqtbuffer): Rename as ...
8442         (cmd_bigqtbuffer_circular): ... this.  Only handle
8443         'QTBuffer:circular:'.
8444         (handle_tracepoint_general_set): Adjust.
8445
8446 2012-02-16  Yao Qi  <yao@codesourcery.com>
8447
8448         * inferiors.c: Move code to ...
8449         * dll.c: .... here.  New.
8450         * server.h: Declare clear_dlls.
8451         * Makefile.in (SFILES): Add dll.c.
8452         (OBS): Add dll.o
8453         (dll.o): New rule.
8454
8455 2012-02-11  Yao Qi  <yao@codesourcery.com>
8456
8457         * server.c: (handle_monitor_command): Add a new parameter
8458         `own_buf'.
8459         (handle_query): Update caller.
8460
8461 2012-02-09  Joel Brobecker  <brobecker@adacore.com>
8462
8463         * configure.ac: Add readlink to AC_CHECK_FUNCS list.
8464         * configure, config.in: Regenerate.
8465         * hostio.c: Provide an alternate implementation if HAVE_READLINK
8466         is not defined.
8467
8468 2012-02-02  Pedro Alves  <palves@redhat.com>
8469
8470         Try SIGKILL first, then PTRACE_KILL.
8471         * linux-low.c (linux_kill_one_lwp): New.
8472         (linux_kill_one_lwp): Rename to ...
8473         (kill_one_lwp_callback): ... this.  Use the new
8474         linux_kill_one_lwp.
8475
8476 2012-02-02  Pedro Alves  <palves@redhat.com>
8477
8478         * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
8479         inferior.
8480
8481 2012-01-27  Pedro Alves  <palves@redhat.com>
8482
8483         * linux-low.c (linux_child_pid_to_exec_file): Delete.
8484         (elf_64_file_p): Make static.
8485         (linux_pid_exe_is_elf_64_file): New.
8486         * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
8487         Delete declarations.
8488         (linux_pid_exe_is_elf_64_file): Declare.
8489         * linux-x86-low.c (x86_arch_setup): Use
8490         linux_pid_exe_is_elf_64_file.
8491
8492 2012-01-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
8493
8494         * linux-low.c (linux_wait_for_event_1): Rename to ...
8495         (linux_wait_for_event): ... here and merge it with former
8496         linux_wait_for_event - new variable wait_ptid, use it.
8497         (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
8498
8499 2012-01-23  Pedro Alves  <palves@redhat.com>
8500
8501         * server.c (main): Avoid yet another case of infinite loop while
8502         detaching/killing after a longjmp.
8503
8504 2012-01-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
8505
8506         Code cleanup.
8507         * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
8508
8509 2012-01-20  Ulrich Weigand  <ulrich.weigand@linaro.org>
8510
8511         * hostio.c (handle_readlink): New function.
8512         (handle_vFile): Call it to handle "vFile:readlink" packets.
8513
8514 2012-01-20  Pedro Alves  <palves@redhat.com>
8515             Ulrich Weigand  <ulrich.weigand@linaro.org>
8516
8517         * server.c (handle_v_requests): Only support vAttach and vRun to
8518         start multiple processes when in extended protocol mode.
8519
8520 2012-01-17  Pedro Alves  <palves@redhat.com>
8521
8522         * tracepoint.c (initialize_tracepoint): Use mmap instead of
8523         memalign plus mprotect to allocate the scratch buffer.
8524
8525 2012-01-13  Pedro Alves  <palves@redhat.com>
8526
8527         * server.c (attach_inferior): Clear `cont_thread'.
8528
8529 2012-01-13  Pedro Alves  <palves@redhat.com>
8530
8531         * server.c (main): Avoid infinite loop while detaching/killing
8532         after a longjmp.
8533
8534 2012-01-09  Doug Evans  <dje@google.com>
8535
8536         * server.c (start_inferior): Set last_ptid in --wrapper case.
8537
8538 2012-01-06  Yao Qi  <yao@codesourcery.com>
8539
8540         * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
8541         defined.
8542         [IN_PROCESS_AGENT] (debug_agent): New global variable.
8543
8544 2012-01-04  Yao Qi  <yao@codesourcery.com>
8545
8546         * tracepoint.c (cmd_qtdp): Print debug message
8547         for static tracepoint.
8548
8549 2012-01-04  Yao Qi  <yao@codesourcery.com>
8550
8551         * tracepoint.c (trace_vdebug): Differentiate debug message
8552         between gdbserver and IPA.
8553
8554 2012-01-03  Yao Qi  <yao@codesourcery.com>
8555
8556         * tracepoint.c (tracepoint_was_hit): Don't collect for
8557         static tracepoint.
8558
8559 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
8560
8561         * terminal.h: Reformat copyright header.
8562
8563 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
8564
8565         * server.c (gdbserver_version): Update copyright year.
8566         * gdbreplay.c (gdbreplay_version): Likewise.
8567
8568 2011-12-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
8569
8570         * linux-low.c (linux_create_inferior): Put empty if clause for write.
8571
8572         Revert:
8573         2011-12-18  Hui Zhu  <teawater@gmail.com>
8574         * linux-low.c (linux_create_inferior): Save return value to ret.
8575
8576 2011-12-18  Hui Zhu  <teawater@gmail.com>
8577
8578         * linux-low.c (linux_create_inferior): Save return value to ret.
8579
8580 2011-12-16  Doug Evans  <dje@google.com>
8581
8582         * linux-low.c (linux_create_inferior): If stdio connection,
8583         redirect stdin from /dev/null, stdout to stderr.
8584         * remote-utils.c (remote_is_stdio): New static global.
8585         (remote_connection_is_stdio): New function.
8586         (remote_prepare): Handle stdio connection.
8587         (remote_open): Ditto.
8588         (remote_close): Don't close stdin for stdio connections.
8589         (read_prim,write_prim): New functions.  Replace all calls to
8590         read/write to these.
8591         * server.c (main): Watch for "-" argument.  Move call to
8592         remote_prepare before start_inferior.
8593         * server.h (STDIO_CONNECTION_NAME): New macro.
8594         (remote_connection_is_stdio): Declare.
8595
8596         * remote-utils.c (prepare_resume_reply): Remove extraneous \n
8597         in debugging output.
8598
8599 2011-12-15  Yao Qi  <yao@codesourcery.com>
8600
8601         * tracepoint.c: Include sys/syscall.h.
8602         (gdb_ust_thread): Remove preprocessor conditional.
8603
8604 2011-12-14  Pedro Alves  <pedro@codesourcery.com>
8605
8606         * linux-low.c (linux_detach_one_lwp): Call
8607         the_low_target.prepare_to_resume before detaching.
8608
8609 2011-12-14  Yao Qi  <yao@codesourcery.com>
8610
8611         * tracepoint.c (gdb_ust_thread): Don't ignore return value
8612         of write.
8613
8614 2011-12-14  Yao Qi  <yao@codesourcery.com>
8615
8616         * i386-low.c (i386_low_stopped_data_address): Initialize local
8617         variable `control'.
8618
8619 2011-12-13  Pedro Alves  <pedro@codesourcery.com>
8620
8621         PR remote/13492
8622
8623         * i386-low.c (i386_low_stopped_data_address): Avoid fetching
8624         DR_CONTROL unless necessary.  Extend comments.
8625         * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
8626         DR0-3 if not used.  If any watchpoint was set, clear DR_STATUS.
8627
8628 2011-12-13  Yao Qi  <yao@codesourcery.com>
8629
8630         * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
8631         macros.
8632         (upload_fast_traceframes, upload_fast_traceframes): Likewise.
8633
8634 2011-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
8635
8636         * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
8637         Print new debug message for such case.
8638
8639 2011-12-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
8640
8641         Fix overlapping memcpy.
8642         * mem-break.c (set_raw_breakpoint_at): New variable buf.  Use it for
8643         the read_inferior_memory transfer.
8644         (delete_fast_tracepoint_jump): New variable buf.  Use it for the
8645         write_inferior_memory transfer.
8646         (set_fast_tracepoint_jump): New variable buf.  Use it for the
8647         read_inferior_memory and write_inferior_memory transfers.
8648         (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
8649         (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
8650         Use it for the write_inferior_memory transfer.
8651         (check_mem_read, check_mem_write): New gdb_asserts for overlapping
8652         buffers.
8653
8654 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
8655
8656         * linux-low.c (fetch_register, store_register): Make code
8657         consistent, fix formatting.
8658
8659 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
8660
8661         * linux-low.c (usr_store_inferior_registers): Factor out code
8662         to handle individual registers into...
8663         (store_register): ... this new function.
8664
8665 2011-12-06  Ulrich Weigand  <uweigand@de.ibm.com>
8666
8667         * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
8668         (s390-linux32v2.o, s390-linux32v2.c): Likewise.
8669         (s390-linux64v1.o, s390-linux64v1.c): Likewise.
8670         (s390-linux64v2.o, s390-linux64v2.c): Likewise.
8671         (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
8672         (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
8673         * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
8674         (srv_xmlfiles): Add new XML files.
8675
8676         * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
8677         and <sys/uio.h>.
8678         (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
8679         (init_registers_s390_linux32v1): Add prototype.
8680         (init_registers_s390_linux32v2): Likewise.
8681         (init_registers_s390_linux64v1): Likewise.
8682         (init_registers_s390_linux64v2): Likewise.
8683         (init_registers_s390x_linux64v1): Likewise.
8684         (init_registers_s390x_linux64v2): Likewise.
8685         (s390_num_regs): Increment to 52.
8686         (s390_regmap): Add orig_r2 register.
8687         (s390_num_regs_3264): Increment to 68.
8688         (s390_regmap_3264): Add orig_r2 register.
8689         (s390_collect_ptrace_register): Handle orig_r2 register.
8690         (s390_supply_ptrace_register): Likewise.
8691         (s390_fill_last_break): New function.
8692         (s390_store_last_break): Likewise.
8693         (s390_fill_system_call): New function.
8694         (s390_store_system_call): Likewise.
8695         (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
8696         register sets.
8697         (s390_check_regset): New function.
8698         (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
8699         NT_S390_SYSTEM_CALL regsets and use appropriate description.
8700         Update target_regsets for available register sets.
8701
8702 2011-12-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
8703             Jan Kratochvil  <jan.kratochvil@redhat.com>
8704
8705         * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
8706         (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
8707         New.
8708         (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
8709         * linux-low.h (struct process_info_private): New member r_debug.
8710         * server.c (handle_qxfer_libraries): Call
8711         the_target->qxfer_libraries_svr4.
8712         (handle_qxfer_libraries_svr4): New function.
8713         (qxfer_packets): New entry "libraries-svr4".
8714         (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
8715         * target.h (struct target_ops): New member qxfer_libraries_svr4.
8716         * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
8717         PACKET_qXfer_libraries_svr4.
8718
8719 2011-11-30  Ulrich Weigand  <uweigand@de.ibm.com>
8720
8721         * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
8722         PSW address/mask between 8-byte and 16-byte formats.
8723         (s390_supply_ptrace_register): Likewise.
8724         (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
8725         basic addressing mode bit.
8726
8727 2011-11-24  Stan Shebs  <stan@codesourcery.com>
8728
8729         * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
8730
8731 2011-11-17  Stan Shebs  <stan@codesourcery.com>
8732
8733         * tracepoint.c (struct tracepoint): New field traceframe_usage.
8734         (tracing_start_time): New global.
8735         (tracing_stop_time): New global.
8736         (tracing_user_name): New global.
8737         (tracing_notes): New global.
8738         (tracing_stop_note): New global.
8739         (cmd_qtstart): Set traceframe_usage, start_time.
8740         (stop_tracing): Set stop_time.
8741         (cmd_qtstatus): Report additional status.
8742         (cmd_qtp): New function.
8743         (handle_tracepoint_query): Call it.
8744         (cmd_qtnotes): New function.
8745         (handle_tracepoint_general_set): Call it.
8746         (get_timestamp): Rename from tsv_get_timestamp.
8747
8748 2011-11-14  Stan Shebs  <stan@codesourcery.com>
8749             Kwok Cheung Yeung  <kcy@codesourcery.com>
8750
8751         * linux-x86-low.c (small_jump_insn): New.
8752         (i386_install_fast_tracepoint_jump_pad): Add arguments for
8753         trampoline and error message, build a trampoline and issue a small
8754         jump instruction to it.
8755         (x86_install_fast_tracepoint_jump_pad): Add arguments for
8756         trampoline and error message.
8757         (x86_get_min_fast_tracepoint_insn_len): New.
8758         (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
8759         * linux-low.h (struct linux_target_ops): Add arguments to
8760         install_fast_tracepoint_jump_pad operation, add new operation.
8761         * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
8762         arguments.
8763         (linux_get_min_fast_tracepoint_insn_len): New function.
8764         (linux_target_op): Add new operation.
8765         * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
8766         (gdb_trampoline_buffer_end): Ditto.
8767         (gdb_trampoline_buffer_error): Ditto.
8768         (struct ipa_sym_addresses): Add fields for new IPA variables.
8769         (symbol_list): Add entries for new IPA variables.
8770         (struct tracepoint): Add fields to hold the address range of the
8771         trampoline used by the tracepoint.
8772         (trampoline_buffer_head): New static variable.
8773         (trampoline_buffer_tail): Ditto.
8774         (claim_trampoline_space): New function.
8775         (have_fast_tracepoint_trampoline_buffer): New function.
8776         (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
8777         structure.
8778         (install_fast_tracepoint): Ditto, also add error buffer argument.
8779         (cmd_qtminftpilen): New function.
8780         (handle_tracepoint_query): Add response to qTMinFTPILen packet.
8781         (fast_tracepoint_from_trampoline_address): New function.
8782         (fast_tracepoint_collecting): Handle trampoline as part of jump
8783         pad space.
8784         (set_trampoline_buffer_space): New function.
8785         (initialize_tracepoint): Initialize new IPA variables.
8786         * target.h (struct target_ops): Add arguments to
8787         install_fast_tracepoint_jump_pad operation, add new
8788         get_min_fast_tracepoint_insn_len operation.
8789         (target_get_min_fast_tracepoint_insn_len): New.
8790         (install_fast_tracepoint_jump_pad): Add arguments.
8791         * server.h (IPA_BUFSIZ): Define.
8792         * linux-i386-ipa.c: Include extra header files.
8793         (initialize_fast_tracepoint_trampoline_buffer): New function.
8794         (initialize_low_tracepoint): Call it.
8795         * server.h (set_trampoline_buffer_space): Declare.
8796         (claim_trampoline_space): Ditto.
8797         (have_fast_tracepoint_trampoline_buffer): Ditto.
8798
8799 2011-11-14  Yao Qi  <yao@codesourcery.com>
8800
8801         * server.c (handle_query): Handle InstallInTrace for qSupported.
8802         * tracepoint.c (add_tracepoint): Sort list.
8803         (install_tracepoint, download_tracepoint): New.
8804         (cmd_qtdp): Call them to install and download tracepoints.
8805         (sort_tracepoints): Removed.
8806         (cmd_qtstart): Update.
8807
8808 2011-11-14  Yao Qi  <yao@codesourcery.com>
8809
8810         * mem-break.c (inc_ref_fast_tracepoint_jump): New.
8811         * mem-break.h: Declare.
8812         * tracepoint.c (cmd_qtstart): Move some code to ...
8813         (clone_fast_tracepoint, install_fast_tracepoint): ... here.
8814         New.
8815         (download_tracepoints): Move some code to ...
8816         (download_tracepoint_1): ... here.  New.
8817
8818 2011-11-08  Yao Qi  <yao@codesourcery.com>
8819
8820         * remote-utils.c (relocate_instruction): A comment fix.
8821
8822 2011-11-07  Joel Brobecker  <brobecker@adacore.com>
8823
8824         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
8825         (i386_dr_low_get_control, i386_dr_low_get_status): Use
8826         dr_status_mirror and dr_control_mirror from debug_reg_state.
8827         (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
8828         (i386_initial_stuff): Remove use of deleted globals.
8829         (i386_get_thread_context, i386_set_thread_context,
8830         i386_thread_added): Use dr_status_mirror and dr_control_mirror
8831         from debug_reg_state.
8832
8833 2011-11-05  Yao Qi  <yao@codesourcery.com>
8834
8835         * tracepoint.c (gdb_collect): Loop over tracepoints of same
8836         address as TPOINT's.
8837
8838 2011-11-02  Stan Shebs  <stan@codesourcery.com>
8839
8840         * tracepoint.c (agent_mem_read_string): New function.
8841         (eval_agent_expr): Call it for tracenz.
8842         * server.c (handle_query): Report support for tracenz.
8843
8844 2011-11-02  Yao Qi  <yao@codesourcery.com>
8845
8846         * tracepoint.c (cmd_qtstart): Remove unused local variables.
8847
8848 2011-11-02  Yao Qi  <yao@codesourcery.com>
8849
8850         * target.h: Fix a typo in comment.
8851
8852 2011-10-31  Pedro Alves  <pedro@codesourcery.com>
8853
8854         * mem-break.c (check_mem_write): Add `myaddr' parameter.  Don't
8855         clobber the breakpoints' shadows with fast tracepoint jumps.
8856         * mem-break.h (check_mem_write): Add `myaddr' parameter.
8857         * target.c (write_inferior_memory): Also pass MYADDR down to
8858         check_mem_write.
8859
8860 2011-10-07  Ulrich Weigand  <ulrich.weigand@linaro.org>
8861
8862         * configure.ac: Check support for personality routine.
8863         * configure: Regenerate.
8864         * config.in: Likewise.
8865         * linux-low.c: Include <sys/personality.h>.
8866         Define ADDR_NO_RANDOMIZE if necessary.
8867         (linux_create_inferior): Disable address space randomization when
8868         forking inferior, if requested.
8869         (linux_supports_disable_randomization): New function.
8870         (linux_target_ops): Install it.
8871         * server.h (disable_randomization): Declare.
8872         * server.c (disable_randomization): New global variable.
8873         (handle_general_set): Handle QDisableRandomization.
8874         (handle_query): Likewise for qSupported.
8875         (main): Support --disable-randomization and --no-disable-randomization
8876         command line arguments.
8877         * target.h (struct target_ops): Add supports_disable_randomization.
8878         (target_supports_disable_randomization): New macro.
8879
8880 2011-09-29  Mike Frysinger  <vapier@gentoo.org>
8881
8882         * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
8883         ifdef check.
8884         [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
8885         [!PT_GETDSBT] (target_loadmap): New definition.
8886         (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
8887         (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
8888         LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
8889         and PT_GETDSBT to LINUX_LOADMAP.
8890         [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
8891         (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
8892
8893 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
8894
8895         * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
8896         (arm_linux_hwbp_cap): New static variable.
8897         (arm_linux_get_hwbp_cap): Replace by ...
8898         (arm_linux_init_hwbp_cap): ... this new function.
8899         (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
8900         (arm_linux_get_hw_watchpoint_count): Likewise.
8901         (arm_linux_get_hw_watchpoint_max_length): Likewise.
8902         (arm_arch_setup): Call arm_linux_init_hwbp_cap.
8903         (arm_prepare_to_resume): Use perror_with_name instead of error.
8904
8905 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
8906
8907         * linux-arm-low.c: Include <signal.h>.
8908         (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
8909         (struct arm_linux_hwbp_cap): New data type.
8910         (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
8911         (struct arm_linux_hw_breakpoint): New data type.
8912         (MAX_BPTS, MAX_WPTS): Define.
8913         (struct arch_process_info, struct arch_lwp_info): New data types.
8914         (arm_linux_get_hwbp_cap): New function.
8915         (arm_linux_get_hw_breakpoint_count): Likewise.
8916         (arm_linux_get_hw_watchpoint_count): Likewise.
8917         (arm_linux_get_hw_watchpoint_max_length): Likewise.
8918         (arm_hwbp_control_initialize): Likewise.
8919         (arm_hwbp_control_is_enabled): Likewise.
8920         (arm_hwbp_control_is_initialized): Likewise.
8921         (arm_hwbp_control_disable): Likewise.
8922         (arm_linux_hw_breakpoint_equal): Likewise.
8923         (arm_linux_hw_point_initialize): Likewise.
8924         (struct update_registers_data): New data structure.
8925         (update_registers_callback: New function.
8926         (arm_insert_point): Likewise.
8927         (arm_remove_point): Likewise.
8928         (arm_stopped_by_watchpoint): Likewise.
8929         (arm_stopped_data_address): Likewise.
8930         (arm_new_process): Likewise.
8931         (arm_new_thread): Likewise.
8932         (arm_prepare_to_resume): Likewise.
8933         (the_low_target): Register arm_insert_point, arm_remove_point,
8934         arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
8935         arm_new_thread, and arm_prepare_to_resume.
8936
8937 2011-09-15  Stan Shebs  <stan@codesourcery.com>
8938
8939         * server.h (struct emit_ops): Add compare-goto fields.
8940         * tracepoint.c (gdb_agent_op_sizes): New table.
8941         (emit_eq_goto): New function.
8942         (emit_ne_goto): New function.
8943         (emit_lt_goto): New function.
8944         (emit_le_goto): New function.
8945         (emit_gt_goto): New function.
8946         (emit_ge_goto): New function.
8947         (is_goto_target): New function.
8948         (compile_bytecodes): Recognize special cases of compare-goto
8949         combinations and call specialized emitters for them.
8950         * linux-x86-low.c (amd64_emit_eq_goto): New function.
8951         (amd64_emit_ne_goto): New function.
8952         (amd64_emit_lt_goto): New function.
8953         (amd64_emit_le_goto): New function.
8954         (amd64_emit_gt_goto): New function.
8955         (amd64_emit_ge_goto): New function.
8956         (amd64_emit_ops): Add the new functions.
8957         (i386_emit_eq_goto): New function.
8958         (i386_emit_ne_goto): New function.
8959         (i386_emit_lt_goto): New function.
8960         (i386_emit_le_goto): New function.
8961         (i386_emit_gt_goto): New function.
8962         (i386_emit_ge_goto): New function.
8963         (i386_emit_ops): Add the new functions.
8964
8965 2011-09-08  Stan Shebs  <stan@codesourcery.com>
8966
8967         * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8968         (i386_emit_epilogue): Restore %ebx.
8969
8970 2011-08-31  Jie Zhang  <jzhang918@gmail.com>
8971
8972         * server.c (step_thread): Remove definition.
8973         (process_serial_event): Don't handle Hs.
8974         * server.h (step_thread): Remove declaration.
8975         * target.c (set_desired_inferior): Remove use of step_thread.
8976
8977 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
8978
8979         * linux-low.c: Include linux-procfs.h.
8980         (linux_attach_lwp_1): Update comments.
8981         (linux_attach): Scan for existing threads when attaching to a
8982         process that is the tgid.
8983         * Makefile.in: Update dependencies.
8984
8985 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
8986
8987         * configure.srv: Add linux-procfs.o dependencies.
8988
8989 2011-08-14  Yao Qi  <yao@codesourcery.com>
8990
8991         * target.h (struct target_ops): Fix indent.
8992         * win32-low.c (win32_target_ops): Fix comment.
8993
8994 2011-08-14  Andrew Jenner  <andrew@codesourcery.com>
8995             Yao Qi  <yao@codesourcery.com>
8996
8997         * Makefile.in (clean): Remove tic6x-*.c files.
8998         (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8999         (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
9000         (tic6x-c64xp-linux.c): Likewise.
9001         * configure.srv: Add support for tic6x-*-uclinux.
9002         * linux-tic6x-low.c: New.
9003         * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
9004
9005 2011-08-14  Andrew Stubbs <ams@codesourcery.com>
9006             Yao Qi  <yao@codesourcery.com>
9007
9008         * target.h (struct target_ops): Add read_loadmap.
9009         * linux-low.c (struct target_loadseg): New type.
9010         (struct target_loadmap): New type.
9011         (linux_read_loadmap): New function.
9012         (linux_target_ops): Add linux_read_loadmap.
9013         * server.c (handle_query): Support qXfer:fdpic:read packet.
9014         * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
9015         to NULL.
9016
9017 2011-08-05  Eli Zaretskii  <eliz@gnu.org>
9018
9019         * win32-low.c: Include <stdint.h>.
9020
9021 2011-07-22  Pedro Alves  <pedro@codesourcery.com>
9022
9023         * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
9024         to the inferior here.
9025         (i386_remove_aligned_watchpoint): Ditto.
9026         (i386_handle_nonaligned_watchpoint): Return immediate on fail to
9027         fit part of the watchpoint in the debug registers.
9028         (i386_update_inferior_debug_regs): New.
9029         (i386_low_insert_watchpoint): Work on a local mirror of the debug
9030         registers, and only update the inferior on success.
9031         (i386_low_remove_watchpoint): Ditto.
9032
9033 2011-07-22  Kwok Cheung Yeung  <kcy@codesourcery.com>
9034
9035         * linux-low.c (compare_ints, unique, list_threads, show_process,
9036         linux_core_of_thread): Delete.
9037         (linux_target_ops): Change linux_core_of_thread to
9038         linux_common_core_of_thread.
9039         (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
9040         * utils.c (malloc_failure): Change type of argument.
9041         (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
9042         * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
9043         common/linux-osdata.c, common/ptid.c and common/buffer.c.
9044         (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
9045         (IPA_OBJS): Add common-utils-ipa.o.
9046         (ptid_h, linux_osdata_h): New macros.
9047         (server_h): Add common/common-utils.h, common/xml-utils.h,
9048         common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
9049         common/ptid.h.
9050         (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
9051         ptid.o, buffer.o): New rules.
9052         (linux-low.o): Add common/linux-osdata.h as a dependency.
9053         * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
9054         * configure.ac: Add AC_HEADER_DIRENT check.
9055         * config.in: Regenerate.
9056         * configure: Regenerate.
9057         * remote-utils.c (xml_escape_text): Delete.
9058         (buffer_grow, buffer_free, buffer_init, buffer_finish,
9059         buffer_xml_printf): Move to common/buffer.c.
9060         * server.c (main): Remove call to initialize_inferiors.
9061         * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
9062         ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
9063         ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
9064         internal_error, gdb_assert, gdb_assert_fail): Delete.
9065         (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
9066         buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
9067         common/buffer.h.
9068         * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
9069         ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
9070         initialize_inferiors): Delete.
9071
9072 2011-07-20  Pedro Alves  <pedro@codesourcery.com>
9073
9074         * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
9075         symbol error.
9076
9077 2011-05-31  Pedro Alves  <pedro@codesourcery.com>
9078
9079         * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
9080         assertion.
9081         * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
9082
9083 2011-05-26  Yao Qi  <yao@codesourcery.com>
9084
9085         * Makefile.in (thread-db.o): Track dependence to
9086         common/gdb_thread_db.h.
9087         * thread-db.c: include gdb_thread_db.h from right place.
9088
9089 2011-05-16  Adrian Cornish  <gnu@bluedreamer.com>
9090
9091         * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
9092         __FILE__ and __LINE__ to internal_error.
9093
9094 2011-05-13  Doug Evans  <dje@google.com>
9095
9096         * thread-db.c (try_thread_db_load_from_sdir): New function.
9097         (try_thread_db_load_from_dir): New function.
9098         (thread_db_load_search): Handle $sdir, ignore $pdir.
9099         Remove trying of system directories if search of
9100         libthread-db-search-path fails, that is now done via $sdir.
9101
9102 2011-05-12  Kwok Cheung Yeung  <kcy@codesourcery.com>
9103
9104         * server.c (handle_query): Add EnableDisableTracepoints to the list
9105         of supported features.
9106         * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
9107         tracepoints.
9108         (cmd_qtenable_disable): New.
9109         (cmd_qtstart): Install tracepoints even if disabled.
9110         (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
9111         receiving a QTEnable or QTDisable packet.
9112         (gdb_collect): Skip data collection if fast tracepoint is disabled.
9113         (ust_marker_to_static_tracepoint): Do not ignore disabled static
9114         tracepoints.
9115         (gdb_probe): Skip data collection if static tracepoint is disabled.
9116
9117 2011-05-10  Doug Evans  <dje@google.com>
9118
9119         * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
9120
9121 2011-05-04  Doug Evans  <dje@google.com>
9122
9123         * linux-low.c (linux_join): Skip process lookup.
9124         * spu-low.c (spu_join): Ditto.
9125         * server.c (join_inferiors_callback): Delete.
9126         (process_serial_event): For 'D' packet (detach) call join_inferior
9127         directly.
9128
9129 2011-05-04  Joseph Myers  <joseph@codesourcery.com>
9130
9131         * README: Don't mention xscale*-*-linux*.
9132         * configure.srv (xscale*-*-linux*): Don't handle target.
9133
9134 2011-04-27  Nathan Froyd  <froydnj@codesourcery.com>
9135
9136         * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
9137         casting pointers.
9138         (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
9139         (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
9140         (i386_emit_void_call_2): Likewise.
9141
9142 2011-04-26  Yao Qi  <yao@codesourcery.com>
9143
9144         * linux-low.c: Move common macros to linux-ptrace.h.
9145         Include linux-ptrace.h.
9146         * Makefile.in (linux_ptrace_h): New.
9147         (linux-low.o): Depends on linux-ptrace.h.
9148
9149 2011-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
9150
9151         * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
9152         RUN_ONCE.  Comment for the LISTEN_DESC delete_file_handler call.
9153         (remote_prepare): New function with most of the TCP code from ...
9154         (remote_open): ... here.  Detect PORT here unconditionally.  Move also
9155         setting transport_is_reliable.
9156         * server.c (run_once): New variable.
9157         (gdbserver_usage): Document it.
9158         (main): Set run_once for `--once'.  Call remote_prepare.  Exit after
9159         the first run if RUN_ONCE.
9160         * server.h (run_once, remote_prepare): New declarations.
9161
9162 2011-04-19  Tom Tromey  <tromey@redhat.com>
9163
9164         * win32-low.c (handle_load_dll): Remove duplicate "the".
9165
9166 2011-04-07  Pierre Muller  <muller@ics.u-strasbg.fr>
9167
9168         Remove support for old Cygwin 1.5 versions.
9169         * win32-low.c (win32_create_inferior): Use new cygwin_path_list
9170         function to avoid warning.
9171         (win32_add_one_solib): Use cygwin_conv_path function to avoid
9172         warning.
9173
9174 2011-03-18  Pierre Muller  <muller@ics.u-strasbg.fr>
9175
9176         * gdbserver/server.h (Macro _): Define it if not available.
9177
9178 2011-03-14  Michael Snyder  <msnyder@vmware.com>
9179
9180         * hostio.c (handle_close): Remove unnecessary null test.
9181
9182 2011-03-10  Joel Brobecker  <brobecker@adacore.com>
9183
9184         * Makefile.in (maintainer-clean realclean distclean): Remove
9185         "make ...  subdir_do" command.
9186
9187 2011-03-10  Michael Snyder  <msnyder@vmware.com>
9188
9189         * tracepoint.c (tracepoint_finish_step): Fix loop variable.
9190
9191         * server.c (handle_v_run): Free alloced buffer on early return.
9192
9193 2011-03-09  Yao Qi  <yao@codesourcery.com>
9194
9195         Revert:
9196         2011-03-04  Yao Qi  <yao@codesourcery.com>
9197
9198         * Makefile.in: Remove GNU make feature --directory.
9199
9200         2011-03-05  Yao Qi  <yao@codesourcery.com>
9201
9202         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9203         (subdir_do): New make target.  Copied from gdb/Makefile.
9204         (maintainer-clean, realclean, distclean, clean): Call corresponding
9205         make targets in common/Makefile.
9206
9207         2011-02-11  Yao Qi  <yao@codesourcery.com>
9208
9209         * configure.ac: Call AC_PROG_RANLIB.
9210         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
9211         * configure: Regenerate.
9212
9213 2011-03-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
9214
9215         * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
9216
9217 2011-03-06  Yao Qi  <yao@codesourcery.com>
9218
9219         * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
9220
9221 2011-03-05  Yao Qi  <yao@codesourcery.com>
9222
9223         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
9224         (subdir_do): New make target.  Copied from gdb/Makefile.
9225         (maintainer-clean, realclean, distclean, clean): Call corresponding
9226         make targets in common/Makefile.
9227
9228 2011-03-04  Yao Qi  <yao@codesourcery.com>
9229
9230         * Makefile.in: Remove GNU make feature --directory.
9231
9232 2011-03-04  Michael Snyder  <msnyder@vmware.com>
9233
9234         * server.c (queue_stop_reply): Call xmalloc not malloc.
9235
9236 2011-03-02  Michael Snyder  <msnyder@vmware.com>
9237
9238         * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
9239
9240 2011-02-28  Michael Snyder  <msnyder@vmware.com>
9241
9242         * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
9243         (cmd_qtframe): Ditto.
9244         (cmd_qtbuffer): Ditto.
9245         (cmd_bigqtbuffer): Ditto.
9246
9247         * utils.c (decimal2str): Initialize 'width' to nine, then
9248         don't mess with it.
9249
9250 2011-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
9251
9252         * hostio.c (require_data): Free *data, not data.
9253
9254 2011-02-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
9255
9256         * hostio.c (require_data): Use free, not xfree.
9257
9258 2011-02-27  Michael Snyder  <msnyder@vmware.com>
9259
9260         * server.c (handle_query): Discard unused value.
9261
9262         * hostio.c (require_data): Free malloc memory before returning
9263         error.
9264
9265 2011-02-26  Michael Snyder  <msnyder@vmware.com>
9266
9267         * linux-low.c (list_threads): Call closedir for dirent.
9268
9269 2011-02-27  Michael Snyder  <msnyder@vmware.com>
9270
9271         * i386-low.c (i386-length_and_rw_bits): Comment the fact that
9272         a case statement falls through.
9273
9274         * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
9275
9276         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
9277         in comparison.
9278
9279 2011-02-26  Michael Snyder  <msnyder@vmware.com>
9280
9281         * utils.c (decimal2str): Eliminate dead code and dead param.
9282         (pulongest): Drop dead param from call to decimal2str.
9283         (plongest): Ditto.
9284
9285 2011-02-24  Joel Brobecker  <brobecker@adacore.com>
9286
9287         Revert the following patch (not approved yet):
9288         2011-02-21  Hui Zhu  <teawater@gmail.com>
9289         * tracepoint.c (tp_printf): New function.
9290         (eval_agent_expr): Handle gdb_agent_op_printf.
9291
9292 2011-02-21  Hui Zhu  <teawater@gmail.com>
9293
9294         * tracepoint.c (tp_printf): New function.
9295         (eval_agent_expr): Handle gdb_agent_op_printf.
9296
9297 2011-02-18  Tom Tromey  <tromey@redhat.com>
9298
9299         * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
9300         (tracepoint.o): Likewise.
9301         * tracepoint.c (enum gdb_agent_op): Use ax.def.
9302         (gdb_agent_op_names): Likewise.
9303
9304 2011-02-18  Tom Tromey  <tromey@redhat.com>
9305
9306         * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
9307         gdb_agent_op_rot>: New constants.
9308         (gdb_agent_op_names): Add pick and roll.
9309         (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
9310         cases.
9311
9312 2011-02-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
9313
9314         * aclocal.m4: Regenerated with aclocal-1.11.1.
9315
9316 2011-02-14  Pedro Alves  <pedro@codesourcery.com>
9317
9318         * server.c (handle_qxfer_traceframe_info): New.
9319         (qxfer_packets): Register "traceframe-info".
9320         (handle_query): Report support for qXfer:traceframe-info:read+.
9321         * tracepoint.c (match_blocktype): New.
9322         (traceframe_find_block_type): Rename to ...
9323         (traceframe_walk_blocks): ... this.  Add callback filter argument,
9324         and use it.
9325         (traceframe_find_block_type): New, reimplemented on top of
9326         traceframe_walk_blocks.
9327         (build_traceframe_info_xml): New.
9328         (traceframe_read_info): New.
9329         * server.h (traceframe_read_info): Declare.
9330
9331 2011-02-11  Yao Qi  <yao@codesourcery.com>
9332
9333         * configure.ac: Call AC_PROG_RANLIB.
9334         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
9335         * configure: Regenerate.
9336
9337 2011-02-07  Pedro Alves  <pedro@codesourcery.com>
9338
9339         * server.c (gdb_read_memory): Change return semantics to allow
9340         partial transfers.
9341         (handle_search_memory_1): Adjust.
9342         (process_serial_event) <'m' packet>: Handle partial transfers.
9343         * tracepoint.c (traceframe_read_mem): Handle partial transfers.
9344
9345 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
9346
9347         * regcache.c (init_register_cache): Initialize
9348         regcache->register_status.
9349         (free_register_cache): Release regcache->register_status.
9350         (regcache_cpy): Copy register_status.
9351         (registers_to_string): Print 'x's for unavailable registers.
9352         (supply_register): Mark the register's status valid or
9353         unavailable, depending on whether a buffer was passed in or not.
9354         (supply_register_zeroed): New.
9355         (supply_regblock): Mark the registers' status valid or
9356         unavailable, depending on whether a buffer was passed in or not.
9357         * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
9358         (struct regcache): New `register_status' field.
9359         (supply_register_zeroed): Declare.
9360         * i387-fp.c (i387_xsave_to_cache): Zero out registers using
9361         supply_register_zeroed, rather than passing a NULL buffer to
9362         supply_register.
9363         * tracepoint.c (fetch_traceframe_registers): Update comment.
9364
9365 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
9366
9367         * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
9368         buffer explicit.
9369
9370 2011-01-25  Pedro Alves  <pedro@codesourcery.com>
9371
9372         * server.h (decode_xfer_write): Change prototype.
9373         * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
9374         and don't extract the annex here.
9375         * server.c (decode_xfer_read): Remove `annex' parameter,
9376         and don't extract the annex here.
9377         (decode_xfer): New.
9378         (struct qxfer): New.
9379         (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
9380         (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
9381         (handle_qxfer_statictrace): New functions, abstracted out from
9382         handle_query, and made to use the struct qxfer interface.
9383         (handle_threads_qxfer_proper): Rename to ...
9384         (handle_qxfer_threads_proper): ... this.
9385         (handle_threads_qxfer): Rename to ...
9386         (handle_qxfer_threads): ... this.  Adjust.
9387         (qxfer_packets): New array.
9388         (handle_qxfer): New function.
9389         (handle_query): Use handle_qxfer.
9390
9391 2011-01-05  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>
9392
9393         * gdbreplay.c: Shorten lines of >= 80 columns.
9394         * linux-low.c: Ditto.
9395         * linux-ppc-low.c: Ditto.
9396         * linux-s390-low.c: Ditto.
9397         * linux-sparc-low.c: Ditto.
9398         * linux-x86-low.c: Ditto.
9399         * linux-xtensa-low.c: Ditto.
9400         * mem-break.c: Ditto.
9401         * nto-low.c: Ditto.
9402         * regcache.h: Ditto.
9403         * remote-utils.c: Ditto.
9404         * server.c: Ditto.
9405         * server.h: Ditto.
9406         * thread-db.c: Ditto.
9407         * tracepoint.c: Ditto.
9408         * utils.c: Ditto.
9409         * win32-low.h: Ditto.
9410
9411 2011-01-05  Joel Brobecker  <brobecker@adacore.com>
9412
9413         * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
9414         update.
9415
9416 2011-01-01  Joel Brobecker  <brobecker@adacore.com>
9417
9418         * server.c (gdbserver_version): Update copyright year in version
9419         output.
9420         * gdbreplay.c (gdbreplay_version): Ditto.
9421
9422 2010-12-29  Jie Zhang  <jie.zhang@analog.com>
9423
9424         * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
9425         * linux-bfin-low.c: New file.
9426         * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
9427         PT_DATA_ADDR for BFIN targets.
9428         * Makefile.in (SFILES): Add linux-bfin-low.c.
9429         (clean): Remove reg-bfin.c.
9430         (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
9431         * README: Mention supported Blackfin targets.
9432
9433 2010-12-23  Mike Frysinger  <vapier@gentoo.org>
9434
9435         * .gitignore: New file.
9436
9437 2010-11-16  Mike Frysinger  <vapier@gentoo.org>
9438
9439         * linux-low.c (linux_tracefork_child): Add char* cast to arg.
9440
9441 2010-10-22  Jie Zhang  <jie@codesourcery.com>
9442
9443         * Makefile.in: Add FLAGS_TO_PASS variable.
9444         (install): Remove dependency of install-only and recursively
9445         invoke make for install-only.
9446
9447 2010-10-04  Doug Evans  <dje@google.com>
9448
9449         * Makefile.in (uninstall): Use $(DESTDIR).
9450
9451 2010-09-24  Pedro Alves  <pedro@codesourcery.com>
9452
9453         PR gdb/11842
9454
9455         * linux-x86-low.c (compat_siginfo_from_siginfo)
9456         (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
9457         si_code is < 0.  Check for si_code == SI_TIMER before checking for
9458         si_code < 0.
9459
9460 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
9461
9462         * lynx-i386-low.c: New file.
9463         * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
9464
9465 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
9466
9467         * lynx-low.c (ptrace_request_to_str): Remove handling for
9468         request values that have been removed in LynxOS 5.x.
9469
9470 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
9471
9472         * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
9473         <ptrace.h>
9474
9475 2010-09-09  Nathan Sidwell  <nathan@codesourcery.com>
9476
9477         * configure.ac: Add --enable-inprocess-agent option.
9478         * configure: Rebuilt.
9479
9480 2010-09-06  Yao Qi  <yao@codesourcery.com>
9481
9482         * linux-low.c (linux_kill): Remove unused variable.
9483         (linux_stabilize_threads): Likewise.
9484         * server.c (start_inferior): Likewise.
9485         (queue_stop_reply_callback): Likewise.
9486         * tracepoint.c (do_action_at_tracepoint): Likewise.
9487
9488 2010-09-06  Yao Qi  <yao@codesourcery.com>
9489
9490         * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
9491         on return.
9492
9493 2010-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
9494
9495         * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
9496
9497 2010-09-06  Pedro Alves  <pedro@codesourcery.com>
9498
9499         * Makefile.in (install-only): Replace $IPA_DEPFILES with
9500         "$(IPA_DEPFILES)".
9501
9502 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
9503
9504         * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
9505         gdbserver/lynx-ppc-low.c: New files.
9506         * Makefile.in (lynx_low_h): New variable.
9507         (lynx-low.o, lynx-ppc-low.o): New rules.
9508         * configure.ac: On LynxOS, link with -lnetinet.
9509         * configure.srv: Add handling of powerpc-*-lynxos* targets.
9510         * configure: regenerate.
9511
9512 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
9513
9514         * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
9515         * configure.ac: Add check for vasprintf and vsnprintf.
9516         * configure, config.in: Regenerate.
9517         * server.h (vasprintf, vsnprintf): Add conditional declarations.
9518
9519 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
9520
9521         * gdbreplay.c: Move include of alloca.h up, next to include of
9522         malloc.h.
9523         * server.h: Add include of malloc.h.
9524         * mem-break.c: Remove include of malloc.h.
9525         * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
9526
9527 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
9528
9529         * Makefile.in (memmem.o): Build with -Wno-error.
9530
9531 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
9532
9533         * utils.c (xsnprintf): Make non-static.
9534         * server.h: Add xsnprintf declaration.
9535         * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
9536         replace calls to snprintf by calls to xsnprintf throughout.
9537
9538 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
9539
9540         * configure.ac: Add configure check for alloca.
9541         * configure, config.in: Regenerate.
9542         * server.h: Include alloca.h if it exists.
9543         * gdbreplay.c: Include alloca.h if it exists.
9544
9545 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
9546
9547         * linux-low.c (__SIGRTMIN): Define if not already defined.
9548         (linux_create_inferior): Check for __ANDROID__ rather than
9549         __SIGRTMIN.
9550         (enqueue_one_deferred_signal): Don't requeue non-RT signals that
9551         are already deferred.
9552         (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
9553         (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
9554         stopped and already has a pending signal to report.
9555         (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
9556         a pending signal to report or is moving out of a jump pad.
9557         (linux_init_signals): Check for __ANDROID__ rather than
9558         __SIGRTMIN.
9559
9560 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
9561
9562         * linux-low.c (linux_stabilize_threads): Wrap debug output in a
9563         debug_threads check.  Avoid a linear search when not doing debug
9564         output.
9565
9566 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
9567
9568         * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
9569         (struct gdb_event) <fd>: Change type to gdb_fildes_t.
9570         (struct file_handler) <fd>: Change type to gdb_fildes_t.
9571         (process_event): Change local fd's type to gdb_fildes_t.
9572         (create_file_handler): Adjust prototype.
9573         (delete_file_handler): Adjust prototype.
9574         (handle_file_event): Adjust prototype.  Use pfildes.
9575         (create_file_event): Adjsut prototype.
9576         * remote-utils.c (remote_desc, listen_desc): Change type to
9577         gdb_fildes_t.
9578         * server.h: New gdb_fildes_t typedef.
9579         [USE_WIN32API]: Include winsock2.h.
9580         (delete_file_handler, add_file_handler): Adjust prototypes.
9581         (pfildes): Declare.
9582         * utils.c (pfildes): New.
9583
9584 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
9585
9586         * configure.ac (build_warnings): Add -Wno-char-subscripts.
9587         * configure: Regenerate.
9588
9589 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
9590
9591         * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
9592         (linux_done_accessing_memory): ... this.
9593         (linux_target_ops): Adjust.
9594         * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
9595         * nto-low.c (nto_target_ops): Adjust comment.
9596         * server.c (gdb_read_memory, gdb_write_memory): Adjust.
9597         * spu-low.c (spu_target_ops): Adjust comment.
9598         * target.h (target_ops): Rename unprepare_to_access_memory field
9599         to done_accessing_memory.
9600         (unprepare_to_access_memory): Rename to ...
9601         (done_accessing_memory): ... this.
9602
9603 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
9604
9605         * linux-low.c (linux_prepare_to_access_memory): New.
9606         (linux_unprepare_to_access_memory): New.
9607         (linux_target_ops): Install them.
9608         * server.c (read_memory): Rename to ...
9609         (gdb_read_memory): ... this.  Use
9610         prepare_to_access_memory/prepare_to_access_memory.
9611         (write_memory): Rename to ...
9612         (gdb_write_memory): ... this.  Use
9613         prepare_to_access_memory/prepare_to_access_memory.
9614         (handle_search_memory_1): Adjust.
9615         (process_serial_event): Adjust.
9616         * target.h (struct target_ops): New fields
9617         prepare_to_access_memory and unprepare_to_access_memory.
9618         (prepare_to_access_memory, unprepare_to_access_memory): New.
9619         * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
9620         prepare_to_access_memory/prepare_to_access_memory.
9621         * nto-low.c (nto_target_ops): Adjust.
9622         * spu-low.c (spu_target_ops): Adjust.
9623         * win32-low.c (win32_target_ops): Adjust.
9624
9625 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
9626
9627         * Makefile.in (WARN_CFLAGS): Get it from configure.
9628         (WERROR_CFLAGS): New.
9629         (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
9630         * configure.ac: Introduce --enable-werror, which adds -Werror to
9631         the compiler command line.  Enabled by default.  Disable with
9632         --disable-werror.  Add -Wdeclaration-after-statement
9633         Wpointer-arith and -Wformat-nonliteral to warning flags.
9634         * configure: Regenerate.
9635
9636 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
9637
9638         * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
9639
9640 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
9641
9642         * gdbreplay.c (remote_error): New.
9643         (gdbchar): New.
9644         (expect): Use gdbchar.  Check for error reading from GDB.
9645         Clarify sync error output.
9646         (play): Check for errors writing to GDB.
9647         * linux-low.c (sigchld_handler): Really ignore `write' errors.
9648         * remote-utils.c (getpkt): Check for errors writing to the remote
9649         descriptor.
9650
9651 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
9652
9653         * linux-low.c (linux_wait_1): Move non-debugging code out of
9654         `debug_threads' control.
9655
9656 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
9657
9658         * linux-low.c (linux_wait_1): Don't set last_status here.
9659         * server.c (push_event, queue_stop_reply_callback): Assert we're
9660         not pushing a TARGET_WAITKIND_IGNORE event.
9661         (start_inferior, start_inferior, attach_inferior, handle_v_cont)
9662         (myresume, handle_target_event): Set the thread's last_resume_kind
9663         and last_status from the target returned status.
9664
9665 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
9666
9667         PR threads/10729
9668
9669         * linux-x86-low.c (update_debug_registers_callback): New.
9670         (i386_dr_low_set_addr): Use it.
9671         (i386_dr_low_get_addr): New.
9672         (i386_dr_low_set_control): Use update_debug_registers_callback.
9673         (i386_dr_low_get_control): New.
9674         (i386_dr_low_get_status): Adjust.
9675         * linux-low.c (linux_stop_lwp): New.
9676         * linux-low.h (linux_stop_lwp): Declare.
9677
9678         * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
9679         argument instead of a i386_debug_reg_state.
9680         (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
9681         a i386_debug_reg_state.
9682         (i386_insert_aligned_watchpoint): Adjust.
9683         (i386_remove_aligned_watchpoint): Adjust.
9684         (i386_low_stopped_data_address): Read the debug registers from the
9685         inferior instead of from the mirrors.
9686         * i386-low.h (struct i386_debug_reg_state): Extend comment.
9687         (i386_dr_low_get_addr): Declare.
9688         (i386_dr_low_get_control): Declare.
9689         (i386_dr_low_get_status): Change prototype.
9690
9691         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
9692         (i386_dr_low_get_addr): New.
9693         (i386_dr_low_get_control): New.
9694         (i386_dr_low_get_status): Adjust prototype.  Return
9695         dr_status_mirror.
9696         (i386_initial_stuff): Clear dr_status_mirror and
9697         dr_control_mirror.
9698         (i386_get_thread_context): Adjust.
9699         (i386_set_thread_context): Adjust.
9700         (i386_thread_added): Adjust.
9701
9702 2010-08-24  Pedro Alves  <pedro@codesourcery.com>
9703
9704         * linux-low.h (linux_thread_area): Delete declaration.
9705
9706 2010-08-11  Thomas Schwinge  <thomas@codesourcery.com>
9707
9708         * linux-low.c (linux_wait_1): Correctly return the ptid of the child
9709         after its termination.
9710
9711 2010-08-09  Pedro Alves  <pedro@codesourcery.com>
9712
9713         * linux-low.c (gdb_wants_lwp_stopped): Delete.
9714         (gdb_wants_all_stopped): Delete.
9715         (linux_wait_1): Don't call them.
9716         * server.c (handle_v_cont): Tag all threads as want-stopped.
9717         (gdb_wants_thread_stopped): Fix comments.  Tag the thread that
9718         stopped as "client-wants-stopped".
9719
9720 2010-07-31  Pedro Alves  <pedro@codesourcery.com>
9721
9722         * Makefile.in (signals_h): New.
9723         (server_h): Depend on it.
9724         (server.o): Don't depend on $(signals_def).
9725         (signals.o): Depend on $(signals_def).
9726
9727 2010-07-31  Jan Kratochvil  <jan.kratochvil@redhat.com>
9728
9729         * Makefile.in (signals_def): New.
9730         (server_h): Append include/gdb/signals.h and signals_def.
9731         (server.o): Append signals_def.
9732
9733 2010-07-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
9734
9735         * server.c (handle_target_event): Use target_signal_to_host for
9736         resume_info.sig initialization.
9737         * target.h (struct thread_resume) <sig>: New comment.
9738
9739 2010-07-20  Ozkan Sezer  <sezeroz@gmail.com>
9740
9741         * server.c (handle_query): strcpy() the returned string from paddress()
9742         instead of sprintf().
9743         * utils.c (paddress): Return phex_nz().
9744
9745 2010-07-07  Joel Brobecker  <brobecker@adacore.com>
9746
9747         * server.c (handle_v_cont): Call mourn_inferior if process
9748         just exited.
9749         (myresume): Likewise.
9750
9751 2010-07-01  Pedro Alves  <pedro@codesourcery.com>
9752
9753         Static tracepoints, and integration with UST.
9754
9755         * configure.ac: Handle --with-ust.  substitute ustlibs and ustinc.
9756         * mem-break.c (uninsert_all_breakpoints)
9757         (reinsert_all_breakpoints): New.
9758         * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
9759         * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
9760         (gdb_agent_ust_loaded, helper_thread_id)
9761         (gdb_agent_helper_thread_id): New macros.
9762         (struct ipa_sym_addresses): Add addr_ust_loaded,
9763         addr_helper_thread_id, addr_cmd_buf.
9764         (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
9765         (in_process_agent_loaded_ust): New.
9766         (write_e_ust_not_loaded): New.
9767         (maybe_write_ipa_ust_not_loaded): New.
9768         (struct collect_static_trace_data_action): New.
9769         (enum tracepoint_type) <static_tracepoint>: New.
9770         (struct tracepoint) <handle>: Mention static tracepoints.
9771         (struct static_tracepoint_ctx): New.
9772         (CMD_BUF_SIZE): New.
9773         (add_tracepoint_action): Handle static tracepoint actions.
9774         (unprobe_marker_at): New.
9775         (clear_installed_tracepoints): Handle static tracepoints.
9776         (cmd_qtdp): Handle static tracepoints.
9777         (probe_marker_at): New.
9778         (cmd_qtstart): Handle static tracepoints.
9779         (response_tracepoint): Handle static tracepoints.
9780         (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
9781         (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
9782         (get_context_regcache): Handle static tracepoints.
9783         (do_action_at_tracepoint): Handle static tracepoint actions.
9784         (traceframe_find_block_type): Handle static trace data blocks.
9785         (traceframe_read_sdata): New.
9786         (download_tracepoints): Download static tracepoint actions.
9787         [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
9788         (GDB_PROBE_NAME): New.
9789         (ust_ops): New.
9790         (GET_UST_SYM): New.
9791         (USTF): New.
9792         (dlsym_ust): New.
9793         (ust_marker_to_static_tracepoint): New.
9794         (gdb_probe): New.
9795         (collect_ust_data_at_tracepoint): New.
9796         (gdb_ust_probe): New.
9797         (UNIX_PATH_MAX, SOCK_DIR): New.
9798         (gdb_ust_connect_sync_socket): New.
9799         (resume_thread, stop_thread): New.
9800         (run_inferior_command): New.
9801         (init_named_socket): New.
9802         (gdb_ust_socket_init): New.
9803         (cstr_to_hexstr): New.
9804         (next_st): New.
9805         (first_marker, next_marker): New.
9806         (response_ust_marker): New.
9807         (cmd_qtfstm, cmd_qtsstm): New.
9808         (unprobe_marker_at, probe_marker_at): New.
9809         (cmd_qtstmat, gdb_ust_thread): New.
9810         (gdb_ust_init): New.
9811         (initialize_tracepoint_ftlib): Call gdb_ust_init.
9812         * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
9813         (ST_REGENTRY): New.
9814         (x86_64_st_collect_regmap): New.
9815         (X86_64_NUM_ST_COLLECT_GREGS): New.
9816         (AMD64_RIP_REGNUM): New.
9817         (supply_static_tracepoint_registers): New.
9818         * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
9819         (ST_REGENTRY): New.
9820         (i386_st_collect_regmap): New.
9821         (i386_NUM_ST_COLLECT_GREGS): New.
9822         (supply_static_tracepoint_registers): New.
9823         * server.c (handle_query): Handle qXfer:statictrace:read.
9824         <qSupported>: Report support for StaticTracepoints, and
9825         qXfer:statictrace:read features.
9826         * server.h (traceframe_read_sdata)
9827         (supply_static_tracepoint_registers): Declare.
9828         * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
9829         (unpack_varlen_hex): Include in IPA build.
9830         * Makefile.in (ustlibs, ustinc): New.
9831         (IPA_OBJS): Add remote-utils-ipa.o.
9832         ($(IPA_LIB)): Link -ldl and -lpthread.
9833         (UST_CFLAGS): New.
9834         (IPAGENT_CFLAGS): Add UST_CFLAGS.
9835         * config.in, configure: Regenerate.
9836
9837 2010-06-20  Ian Lance Taylor  <iant@google.com>
9838             Pedro Alves  <pedro@codesourcery.com>
9839
9840         * linux-x86-low.c (always_true): Delete.
9841         (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
9842         trying to fool the compiler with always_true.
9843
9844 2010-06-20  Pedro Alves  <pedro@codesourcery.com>
9845
9846         * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
9847         conditions in gdbserver.
9848
9849 2010-06-19  Ulrich Weigand  <uweigand@de.ibm.com>
9850
9851         * spu-low.c (spu_read_memory): Wrap around local store limit.
9852         (spu_write_memory): Likewise.
9853
9854 2010-06-15  Pedro Alves  <pedro@codesourcery.com>
9855
9856         * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
9857         (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
9858         LONGEST uses.
9859         * server.h (struct emit_ops): Replace int64_t uses with LONGEST
9860         uses.
9861         * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
9862         uses with LONGEST uses.
9863
9864 2010-06-14  Stan Shebs  <stan@codesourcery.com>
9865             Pedro Alves  <pedro@codesourcery.com>
9866
9867         Bytecode compiler.
9868
9869         * linux-x86-low.c: Include limits.h.
9870         (add_insns): New.
9871         (always_true): New.
9872         (EMIT_ASM): New.
9873         (EMIT_ASM32): New.
9874         (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
9875         (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
9876         (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
9877         (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
9878         (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
9879         (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
9880         (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
9881         (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
9882         (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
9883         (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
9884         (amd64_emit_void_call_2): New.
9885         (amd64_emit_ops): New.
9886         (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
9887         (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
9888         (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
9889         (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
9890         (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
9891         (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
9892         (i386_emit_goto, i386_write_goto_address, i386_emit_const)
9893         (i386_emit_call, i386_emit_reg, i386_emit_pop)
9894         (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
9895         (i386_emit_stack_adjust, i386_emit_int_call_1)
9896         (i386_emit_void_call_2): New.
9897         (i386_emit_ops): New.
9898         (x86_emit_ops): New.
9899         (the_low_target): Install x86_emit_ops.
9900         * server.h (struct emit_ops): New.
9901         (get_raw_reg_func_addr): Declare.
9902         (current_insn_ptr, emit_error): Declare.
9903         * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
9904         (set_trace_state_variable_value): New defines.
9905         (struct ipa_sym_addresses): New fields addr_get_raw_reg,
9906         addr_get_trace_state_variable_value and
9907         addr_set_trace_state_variable_value.
9908         (symbol_list): New fields for get_raw_reg,
9909         get_trace_state_variable_value and set_trace_state_variable_value.
9910         (condfn): New typedef.
9911         (struct tracepoint): New field `compiled_cond'.
9912         (do_action_at_tracepoint): Clear compiled_cond.
9913         (get_trace_state_variable_value, set_trace_state_variable_value):
9914         Export in the IPA.
9915         (condition_true_at_tracepoint): If there's a compiled condition,
9916         run that.
9917         (current_insn_ptr, emit_error): New globals.
9918         (struct bytecode_address): New.
9919         (get_raw_reg_func_addr): New.
9920         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
9921         (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
9922         (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
9923         (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
9924         (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
9925         (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
9926         (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
9927         (compile_tracepoint_condition, compile_bytecodes): New.
9928         * target.h (emit_ops): Forward declare.
9929         (struct target_ops): New field emit_ops.
9930         (target_emit_ops): New.
9931         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
9932         * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
9933         * linux-low.c (linux_emit_ops): New.
9934         (linux_target_ops): Install it.
9935         * linux-low.h (struct linux_target_ops): New field emit_ops.
9936
9937 2010-06-14  Ulrich Weigand  <uweigand@de.ibm.com>
9938
9939         * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
9940         * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
9941
9942 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
9943             Stan Shebs  <stan@codesourcery.com>
9944
9945         * Makefile.in (IPA_DEPFILES, extra_libraries): New.
9946         (all): Depend on $(extra_libraries).
9947         (install-only): Install the IPA.
9948         (IPA_OBJS, IPA_LIB): New.
9949         (clean): Remove the IPA lib.
9950         (IPAGENT_CFLAGS): New.
9951         (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9952         (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9953         (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9954         * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9955         * configure.ac: Check for atomic builtins support in the compiler.
9956         (IPA_DEPFILES, extra_libraries): Define.
9957         * configure.srv (ipa_obj): Add description.
9958         (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9959         (i[34567]86-*-linux*): Set ipa_obj.
9960         (x86_64-*-linux*): Set ipa_obj.
9961         * linux-low.c (stabilizing_threads): New.
9962         (supports_fast_tracepoints): New.
9963         (linux_detach): Stabilize threads before detaching.
9964         (handle_tracepoints): Handle internal tracing breakpoints.  Assert
9965         the lwp is either not stabilizing, or is moving out of a jump pad.
9966         (linux_fast_tracepoint_collecting): New.
9967         (maybe_move_out_of_jump_pad): New.
9968         (enqueue_one_deferred_signal): New.
9969         (dequeue_one_deferred_signal): New.
9970         (linux_wait_for_event_1): If moving out of a jump pad, defer
9971         pending signals to later.
9972         (linux_stabilize_threads): New.
9973         (linux_wait_1): Check if threads need moving out of jump pads, and
9974         do it if so.
9975         (stuck_in_jump_pad_callback): New.
9976         (move_out_of_jump_pad_callback): New.
9977         (lwp_running): New.
9978         (linux_resume_one_lwp): Handle moving out of jump pads.
9979         (linux_set_resume_request): Dequeue deferred signals.
9980         (need_step_over_p): Also step over fast tracepoint jumps.
9981         (start_step_over): Also uninsert fast tracepoint jumps.
9982         (finish_step_over): Also reinsert fast tracepoint jumps.
9983         (linux_install_fast_tracepoint_jump): New.
9984         (linux_target_ops): Install linux_stabilize_threads and
9985         linux_install_fast_tracepoint_jump_pad.
9986         * linux-low.h (linux_target_ops) <get_thread_area,
9987         install_fast_tracepoint_jump_pad>: New fields.
9988         (struct lwp_info) <collecting_fast_tracepoint,
9989         pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9990         (linux_get_thread_area): Declare.
9991         * linux-x86-low.c (jump_insn): New.
9992         (x86_get_thread_area): New.
9993         (append_insns): New.
9994         (push_opcode): New.
9995         (amd64_install_fast_tracepoint_jump_pad): New.
9996         (i386_install_fast_tracepoint_jump_pad): New.
9997         (x86_install_fast_tracepoint_jump_pad): New.
9998         (the_low_target): Install x86_get_thread_area and
9999         x86_install_fast_tracepoint_jump_pad.
10000         * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
10001         (struct fast_tracepoint_jump): New.
10002         (fast_tracepoint_jump_insn): New.
10003         (fast_tracepoint_jump_shadow): New.
10004         (find_fast_tracepoint_jump_at): New.
10005         (fast_tracepoint_jump_here): New.
10006         (delete_fast_tracepoint_jump): New.
10007         (set_fast_tracepoint_jump): New.
10008         (uninsert_fast_tracepoint_jumps_at): New.
10009         (reinsert_fast_tracepoint_jumps_at): New.
10010         (set_breakpoint_at): Use write_inferior_memory.
10011         (uninsert_raw_breakpoint): Use write_inferior_memory.
10012         (check_mem_read): Mask out fast tracepoint jumps.
10013         (check_mem_write): Mask out fast tracepoint jumps.
10014         * mem-break.h (struct fast_tracepoint_jump): Forward declare.
10015         (set_fast_tracepoint_jump): Declare.
10016         (delete_fast_tracepoint_jump)
10017         (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
10018         (reinsert_fast_tracepoint_jumps_at): Declare.
10019         * regcache.c: Don't compile many functions when building the
10020         in-process agent library.
10021         (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
10022         the register buffer in the heap.
10023         (free_register_cache): If the register buffer isn't owned by the
10024         regcache, don't free it.
10025         (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
10026         pre-existing register caches.
10027         * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
10028         type.
10029         (convert_ascii_to_int): : Constify `from' parameter type.
10030         (decode_M_packet, decode_X_packet): Replace the `to' parameter by
10031         a `to_p' pointer to pointer parameter.  If TO_P is NULL, malloc
10032         the needed buffer in-place.
10033         (relocate_instruction): New.
10034         * server.c (handle_query) <qSymbols>: If the target supports
10035         tracepoints, give it a chance of looking up symbols.  Report
10036         support for fast tracepoints.
10037         (handle_status): Stabilize threads.
10038         (process_serial_event): Adjust.
10039         * server.h (struct fast_tracepoint_jump): Forward declare.
10040         (struct process_info) <fast_tracepoint_jumps>: New field.
10041         (convert_ascii_to_int, convert_int_to_ascii): Adjust.
10042         (decode_X_packet, decode_M_packet): Adjust.
10043         (relocate_instruction): Declare.
10044         (in_process_agent_loaded): Declare.
10045         (tracepoint_look_up_symbols): Declare.
10046         (struct fast_tpoint_collect_status): Declare.
10047         (fast_tracepoint_collecting): Declare.
10048         (force_unlock_trace_buffer): Declare.
10049         (handle_tracepoint_bkpts): Declare.
10050         (initialize_low_tracepoint)
10051         (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
10052         * target.h (struct target_ops) <stabilize_threads,
10053         install_fast_tracepoint_jump_pad>: New fields.
10054         (stabilize_threads, install_fast_tracepoint_jump_pad): New.
10055         * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
10056         [HAVE_STDINT_H]: Include stdint.h.
10057         (trace_debug_1): Rename to ...
10058         (trace_vdebug): ... this.
10059         (trace_debug): Rename to ...
10060         (trace_debug_1): ... this.  Add `level' parameter.
10061         (trace_debug): New.
10062         (ATTR_USED, ATTR_NOINLINE): New.
10063         (IP_AGENT_EXPORT): New.
10064         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
10065         (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
10066         (about_to_request_buffer_space, trace_buffer_is_full)
10067         (stopping_tracepoint, expr_eval_result, error_tracepoint)
10068         (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
10069         (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
10070         (traceframe_write_count, traceframes_created)
10071         (trace_state_variables)
10072         New renaming defines.
10073         (struct ipa_sym_addresses): New.
10074         (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
10075         (symbol_list): New.
10076         (ipa_sym_addrs): New.
10077         (all_tracepoint_symbols_looked_up): New.
10078         (in_process_agent_loaded): New.
10079         (write_e_ipa_not_loaded): New.
10080         (maybe_write_ipa_not_loaded): New.
10081         (tracepoint_look_up_symbols): New.
10082         (debug_threads) [IN_PROCESS_AGENT]: New.
10083         (read_inferior_memory) [IN_PROCESS_AGENT]: New.
10084         (UNKNOWN_SIDE_EFFECTS): New.
10085         (stop_tracing): New.
10086         (flush_trace_buffer): New.
10087         (stop_tracing_bkpt): New.
10088         (flush_trace_buffer_bkpt): New.
10089         (read_inferior_integer): New.
10090         (read_inferior_uinteger): New.
10091         (read_inferior_data_pointer): New.
10092         (write_inferior_data_pointer): New.
10093         (write_inferior_integer): New.
10094         (write_inferior_uinteger): New.
10095         (struct collect_static_trace_data_action): Delete.
10096         (enum tracepoint_type): New.
10097         (struct tracepoint) <type>: New field `type'.
10098         <actions_str, step_actions, step_actions_str>: Only include in
10099         GDBserver.
10100         <orig_size, obj_addr_on_target, adjusted_insn_addr>
10101         <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
10102         (tracepoints): Use IP_AGENT_EXPORT.
10103         (last_tracepoint): Don't include in the IPA.
10104         (stopping_tracepoint): Use IP_AGENT_EXPORT.
10105         (trace_buffer_is_full): Use IP_AGENT_EXPORT.
10106         (alloced_trace_state_variables): New.
10107         (trace_state_variables): Use IP_AGENT_EXPORT.
10108         (traceframe_t): Delete unused variable.
10109         (circular_trace_buffer): Don't include in the IPA.
10110         (trace_buffer_start): Delete.
10111         (struct trace_buffer_control): New.
10112         (trace_buffer_free): Delete.
10113         (struct ipa_trace_buffer_control): New.
10114         (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
10115         (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
10116         New.
10117         (trace_buffer_ctrl): New.
10118         (TRACE_BUFFER_CTRL_CURR): New.
10119         (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
10120         Reimplement as macros.
10121         (trace_buffer_wrap): Delete.
10122         (traceframe_write_count, traceframe_read_count)
10123         (traceframes_created, tracing): Use IP_AGENT_EXPORT.
10124         (struct tracepoint_hit_ctx) <type>: New field.
10125         (struct fast_tracepoint_ctx): New.
10126         (memory_barrier): New.
10127         (cmpxchg): New.
10128         (record_tracepoint_error): Update atomically in the IPA.
10129         (clear_inferior_trace_buffer): New.
10130         (about_to_request_buffer_space): New.
10131         (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
10132         updating the same buffer.
10133         (add_tracepoint): Default the tracepoint's type to trap
10134         tracepoint, and orig_size to -1.
10135         (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
10136         internal variables.
10137         (create_trace_state_variable): New parameter `gdb'.  Handle it.
10138         (clear_installed_tracepoints): Clear fast tracepoint jumps.
10139         (cmd_qtdp): Handle fast tracepoints.
10140         (cmd_qtdv): Adjust.
10141         (max_jump_pad_size): New.
10142         (gdb_jump_pad_head): New.
10143         (get_jump_space_head): New.
10144         (claim_jump_space): New.
10145         (sort_tracepoints): New.
10146         (MAX_JUMP_SIZE): New.
10147         (cmd_qtstart): Handle fast tracepoints.  Sync tracepoints with the
10148         IPA.
10149         (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
10150         support.  Upload fast traceframes, and delete internal IPA
10151         breakpoints.
10152         (stop_tracing_handler): New.
10153         (flush_trace_buffer_handler): New.
10154         (cmd_qtstop): Upload fast tracepoints.
10155         (response_tracepoint): Handle fast tracepoints.
10156         (tracepoint_finished_step): Upload fast traceframes.  Set the
10157         tracepoint hit context's tracepoint type.
10158         (handle_tracepoint_bkpts): New.
10159         (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
10160         type.  Add comment about fast tracepoints.
10161         (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
10162         non-existing action_str field.
10163         (get_context_regcache): Handle fast tracepoints.
10164         (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
10165         to the regcache.
10166         (fast_tracepoint_from_jump_pad_address): New.
10167         (fast_tracepoint_from_ipa_tpoint_address): New.
10168         (collecting_t): New.
10169         (force_unlock_trace_buffer): New.
10170         (fast_tracepoint_collecting): New.
10171         (collecting): New.
10172         (gdb_collect): New.
10173         (write_inferior_data_ptr): New.
10174         (target_tp_heap): New.
10175         (target_malloc): New.
10176         (download_agent_expr): New.
10177         (UALIGN): New.
10178         (download_tracepoints): New.
10179         (download_trace_state_variables): New.
10180         (upload_fast_traceframes): New.
10181         (IPA_FIRST_TRACEFRAME): New.
10182         (IPA_NEXT_TRACEFRAME_1): New.
10183         (IPA_NEXT_TRACEFRAME): New.
10184         [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
10185         [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
10186         (gdb_jump_pad_buffer_end): New.
10187         [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
10188         (initialize_tracepoint): Adjust.
10189         [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
10190         buffer.  Initialize the low module.
10191         * utils.c (PREFIX, TOOLNAME): New.
10192         (malloc_failure): Use PREFIX.
10193         (error): In the IPA, an error causes an exit.
10194         (fatal, warning): Use PREFIX.
10195         (internal_error): Use TOOLNAME.
10196         (NUMCELLS): Increase to 10.
10197         * configure, config.in: Regenerate.
10198
10199 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
10200
10201         * server.c (handle_query) <qSupported>: Do two passes over the
10202         qSupported string to avoid nesting strtok.
10203
10204 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
10205
10206         * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
10207         (CDEPS): New.
10208         * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping.  Test also
10209         -Wl,--dynamic-list.
10210         * configure: Regenerate.
10211         * proc-service.list: New.
10212
10213 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
10214
10215         * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
10216         New comment.
10217
10218 2010-05-26  Ozkan Sezer  <sezeroz@gmail.com>
10219
10220         * gdbreplay.c (remote_open): Check error return from socket() call by
10221         its equality to -1 not by it being negative.
10222         * remote-utils.c (remote_open): Likewise.
10223
10224 2010-05-23  Pedro Alves  <pedro@codesourcery.com>
10225
10226         * config.h: Regenerate.
10227
10228 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
10229
10230         * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
10231         doesn't provide PTRACE_GET_THREAD_AREA.
10232
10233 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
10234
10235         * linux-m68k-low.c: Include <asm/ptrace.h>
10236         (ps_get_thread_area): Implement.
10237
10238 2010-05-03  Doug Evans  <dje@google.com>
10239
10240         * event-loop.c (struct callback_event): New struct.
10241         (callback_list): New global.
10242         (append_callback_event, delete_callback_event): New functions.
10243         (process_callback): New function.
10244         (start_event_loop): Call it.
10245         * remote-utils.c (NOT_SCHEDULED): Define.
10246         (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
10247         moved out of readchar.
10248         (readchar): Rewrite.  Call reschedule before returning.
10249         (reset_readchar): New function.
10250         (remote_close): Call it.
10251         (process_remaining, reschedule): New functions.
10252         * server.h (callback_handler_func): New typedef.
10253         (append_callback_event, delete_callback_event): Declare.
10254
10255 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
10256
10257         * proc-service.c (ps_pglobal_lookup): Use
10258         thread_db_look_up_one_symbol.
10259         * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
10260         parameter.  Use it instead of all_symbols_looked_up.
10261         * server.h (struct process_info) <all_symbols_looked_up>: Delete
10262         field.
10263         (all_symbols_looked_up): Don't declare.
10264         (look_up_one_symbol): Add new `may_ask_gdb' parameter.
10265         * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
10266         field.
10267         (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
10268         Set all_symbols_looked_up here.
10269         (thread_db_look_up_one_symbol): New.
10270         (thread_db_get_tls_address): Adjust.
10271         (thread_db_load_search, try_thread_db_load_1): Always allocate the
10272         thread_db object on the heap, and tentatively set it in the
10273         process structure.
10274         (thread_db_init): Don't set all_symbols_looked_up here.
10275         * linux-low.h (thread_db_look_up_one_symbol): Declare.
10276
10277 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
10278
10279         * linux-low.c (linux_kill, linux_detach): Adjust.
10280         (status_pending_p_callback): Remove redundant statement.  Check
10281         for !TARGET_WAITIKIND_IGNORE, instead of
10282         TARGET_WAITKIND_STOPPED.
10283         (handle_tracepoints): Make sure LWP is locked.  Adjust.
10284         (linux_wait_for_event_1): Adjust.
10285         (linux_cancel_breakpoints): New.
10286         (unsuspend_one_lwp): New.
10287         (unsuspend_all_lwps): New.
10288         (linux_wait_1): If finishing a step-over, unsuspend all lwps.
10289         (send_sigstop_callback): Change return type to int, add new
10290         `except' parameter and handle it.
10291         (suspend_and_send_sigstop_callback): New.
10292         (stop_all_lwps): Add new `suspend' and `expect' parameters, and
10293         pass them down.  If SUSPEND, also increment the lwp's suspend
10294         count.
10295         (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
10296         (need_step_over_p): Don't consider suspended LWPs.
10297         (start_step_over): Adjust.
10298         (proceed_one_lwp): Change return type to int, add new `except'
10299         parameter and handle it.
10300         (unsuspend_and_proceed_one_lwp): New.
10301         (proceed_all_lwps): Use find_inferior instead of
10302         for_each_inferior.
10303         (unstop_all_lwps): Add `unsuspend' parameter.  If UNSUSPEND, them
10304         also decrement the suspend count of LWPs.  Pass `except' down,
10305         instead of hacking its suspend count.
10306         (linux_pause_all): Add `freeze' parameter.  Adjust.
10307         (linux_unpause_all): New.
10308         (linux_target_ops): Install linux_unpause_all.
10309         * server.c (handle_status): Adjust.
10310         * target.h (struct target_ops): New fields `unpause_all' and
10311         `cancel_breakpoints'.  Add new parameter to `pause_all'.
10312         (pause_all): Add new `freeze' parameter.
10313         (unpause_all): New.
10314         (cancel_breakpoints): New.
10315         * tracepoint.c (clear_installed_tracepoints): Pause threads, and
10316         cancel breakpoints.
10317         (cmd_qtstart): Pause threads.
10318         (stop_tracing): Pause threads, and cancel breakpoints.
10319         * win32-low.c (win32_target_ops): Adjust.
10320
10321 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
10322
10323         * linux-low.c (linux_wait_for_event_1): Move passing the signal to
10324         the inferior right away from here...
10325         (linux_wait_1): ... to here, and adjust to check the thread's
10326         last_resume_kind instead of the lwp's step or stop_expected flags.
10327
10328 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
10329
10330         * README: Use consistent `GDB' and `GDBserver' spellings.
10331
10332 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
10333
10334         * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
10335         (linux_kill): Stop all lwps here.  Don't delete the main lwp here.
10336         (linux_detach_one_lwp): Assume the lwp is stopped.
10337         (any_thread_of): Delete.
10338         (linux_detach): Stop all lwps here.  Don't blindly delete all
10339         breakpoints.
10340         (delete_lwp_callback): New.
10341         (linux_mourn): Delete all lwps of the process that is gone.
10342         (linux_wait_1): Don't delete the last lwp of the process here.
10343         * mem-break.h (mark_breakpoints_out): Declare.
10344         * mem-break.c (mark_breakpoints_out): New.
10345         (free_all_breakpoints): Use it.
10346         * server.c (handle_target_event): If the process is gone, mark
10347         breakpoints out.
10348         * thread-db.c (struct thread_db) <create_bp>: New field.
10349         (thread_db_enable_reporting): Fix prototype.  Store a thread event
10350         breakpoint reference in the thread_db struct.
10351         (thread_db_load_search): Clear the thread_db object.
10352         (try_thread_db_load_1): Ditto.
10353         (switch_to_process): New.
10354         (disable_thread_event_reporting): Use it.
10355         (remove_thread_event_breakpoints): New.
10356         (thread_db_detach, thread_db_mourn): Use it.
10357
10358 2010-05-01  Pedro Alves  <pedro@codesourcery.com>
10359
10360         * linux-low.c (linux_enable_event_reporting): New.
10361         (linux_wait_for_event_1, handle_extended_wait): Use it.
10362
10363 2010-04-30  Pedro Alves  <pedro@codesourcery.com>
10364
10365         * linux-low.c (linux_kill_one_lwp, linux_kill)
10366         (linux_detach_one_lwp): Adjust to send_sigstop interface change.
10367         (send_sigstop): Take an lwp_info as parameter instead.  Queue a
10368         SIGSTOP even if the LWP is stopped.
10369         (send_sigstop_callback): New.
10370         (stop_all_lwps): Use send_sigstop_callback instead.
10371         (linux_resume_one_thread): Adjust.
10372         (proceed_one_lwp): Still proceed an LWP that the client has
10373         requested to stop, if we haven't reported it as stopped yet.  Make
10374         sure that LWPs the client want stopped, have a pending SIGSTOP.
10375
10376 2010-04-26  Doug Evans  <dje@google.com>
10377
10378         * server.c (handle_general_set): Make static.
10379
10380         * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
10381         Print received char after testing for error/eof instead of before.
10382         (input_interrupt): Tweak comment.
10383
10384 2010-04-23  Doug Evans  <dje@google.com>
10385
10386         * server.c (start_inferior): Print inferior argv if --debug.
10387
10388 2010-04-21  Aleksandar Ristovski  <aristovski@qnx.com>
10389
10390         * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
10391         * nto-x86-low.c: Include server.h
10392
10393 2010-04-20  Pierre Muller  <muller@ics.u-strasbg.fr>
10394
10395         * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
10396         be consistent with other sources of this directory.
10397         (init_registers_amd64): Correct name of source file of this function
10398         in the comment.
10399
10400 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
10401
10402         * configure.srv (x86_64-*-mingw*): New configuration for Windows
10403         64-bit executables.
10404
10405 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
10406
10407         * win32-i386-low.c: Add 64-bit support.
10408         (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
10409         (init_registers_amd64): Declare.
10410         (mappings): Add 64-bit version of array.
10411         (init_windows_x86): New function.
10412         (the_low_target): Change init_arch field to init_windows_x86.
10413
10414 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
10415
10416         * win32-low.c: Adapt to support also 64-bit architecture.
10417         (child_xfer_memory): Use uintptr_t type for local variable `addr'.
10418         (get_image_name): Use SIZE_T type for local variable `done'.
10419         (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
10420         (toolhelp_get_dll_name): Idem.
10421         (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
10422         Use uintptr_t typecast to avoid warning.
10423         (handle_unload_dll): Use uintptr_t typecast to avoid warning.
10424         (handle_exception): Use phex_nz to avoid warning.
10425         (win32_wait): Remove unused local variable `process'.
10426
10427 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
10428
10429         * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
10430         `amd64-avx.o'.
10431
10432 2010-04-17  Pierre Muller  <muller@ics.u-strasbg.fr>
10433
10434         * configure.ac: Use `ws2_32' library for srv_mingw.
10435         * configure: Regenerate.
10436         * gdbreplay.c: Include winsock2.h instead of winsock.h.
10437         * remote-utils.c: Likewise.
10438
10439 2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>
10440
10441         * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
10442         if __x86_64__ is defined.
10443
10444 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
10445
10446         * configure: Regenerate.
10447
10448 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
10449
10450         * server.c (handle_query): Handle 'qGetTIBAddr' query.
10451         * target.h (target_ops): New get_tib_address field.
10452         * win32-low.h (win32_thread_info): Add thread_local_base field.
10453         * win32-low.c (child_add_thread): Add tlb argument.
10454         Set thread_local_base field to TLB.
10455         (get_child_debug_event): Adapt to child_add_thread change.
10456         (win32_get_tib_address): New function.
10457         (win32_target_ops): Set get_tib_address field to
10458         win32_get_tib_address.
10459         * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
10460
10461 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
10462
10463         * linux-low.c (linux_mourn): Also remove the process.
10464         * server.c (handle_target_event): Don't remove the process here.
10465         * nto-low.c (nto_mourn): New.
10466         (nto_target_ops): Install it.
10467         * spu-low.c (spu_mourn): New.
10468         (spu_target_ops): Install it.
10469         * win32-low.c (win32_mourn): New.
10470         (win32_target_ops): Install it.
10471
10472 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
10473
10474         * server.h (buffer_xml_printf): Remove redundant `;'.
10475
10476 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
10477
10478         * regcache.c (set_register_cache): Invalidate regcaches before
10479         changing the register cache layout.
10480         (regcache_invalidate_one): Allow a NULL regcache.
10481         * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
10482         regcaches before changing the register cache layout or the target
10483         regsets.
10484
10485 2010-04-12  H.J. Lu  <hongjiu.lu@intel.com>
10486
10487         * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
10488         variable warning on Linux/x86-64.
10489
10490 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
10491
10492         GDBserver disconnected tracing support.
10493
10494         * linux-low.c (linux_remove_process): Delete.
10495         (add_lwp): Don't set last_resume_kind here.
10496         (linux_kill): Use `mourn'.
10497         (linux_detach): Use `thread_db_detach', and `mourn'.
10498         (linux_mourn): New.
10499         (linux_attach_lwp_1): Adjust comment.
10500         (linux_attach): last_resume_kind moved the thread_info; adjust.
10501         (status_pending_p_callback): Adjust.
10502         (linux_wait_for_event_1): Adjust.
10503         (count_events_callback, select_singlestep_lwp_callback)
10504         (select_event_lwp_callback, cancel_breakpoints_callback)
10505         (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
10506         (proceed_one_lwp): Adjust.
10507         (linux_async): Add debug output.
10508         (linux_thread_stopped): New.
10509         (linux_pause_all): New.
10510         (linux_target_ops): Install linux_mourn, linux_thread_stopped and
10511         linux_pause_all.
10512         * linux-low.h (struct lwp_info): Delete last_resume_kind field.
10513         (thread_db_free): Delete declaration.
10514         (thread_db_detach, thread_db_mourn): Declare.
10515         * thread-db.c (thread_db_init): Use thread_db_mourn.
10516         (thread_db_free): Delete, split in two.
10517         (disable_thread_event_reporting): New.
10518         (thread_db_detach): New.
10519         (thread_db_mourn): New.
10520
10521         * server.h (struct thread_info) <last_resume_kind>: New field.
10522         <attached>: Add comment.
10523         <gdb_detached>: New field.
10524         (handler_func): Change return type to int.
10525         (handle_serial_event, handle_target_event): Ditto.
10526         (gdb_connected): Declare.
10527         (tracing): Delete.
10528         (disconnected_tracing): Declare.
10529         (stop_tracing): Declare.
10530
10531         * server.c (handle_query) <qSupported>: Report support for
10532         disconnected tracing.
10533         (queue_stop_reply_callback): Account for running threads.
10534         (gdb_wants_thread_stopped): New.
10535         (gdb_wants_all_threads_stopped): New.
10536         (gdb_reattached_process): New.
10537         (handle_status): Clear the `gdb_detached' flag of all processes.
10538         In all-stop, stop all threads.
10539         (main): Be sure to leave tfind mode.  Handle disconnected tracing.
10540         (process_serial_event): If the remote connection breaks, or if an
10541         exit was forced with "monitor exit", force an event loop exit.
10542         Handle disconnected tracing on detach.
10543         (handle_serial_event): Adjust.
10544         (handle_target_event): If GDB isn't connected, forward events back
10545         to the inferior, unless the last process exited, in which case,
10546         exit gdbserver.  Adjust interface.
10547
10548         * remote-utils.c (remote_open): Don't block in accept.  Instead
10549         register an event loop source on the listen socket file
10550         descriptor.  Refactor bits into ...
10551         (listen_desc): ... this new global.
10552         (gdb_connected): ... this new function.
10553         (enable_async_notification): ... this new function.
10554         (handle_accept_event): ... this new function.
10555         (remote_close): Clear remote_desc.
10556
10557         * inferiors.c (add_thread): Set the new thread's last_resume_kind.
10558
10559         * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
10560         New fields.
10561         (mourn_inferior): Define.
10562         (target_process_qsupported): Avoid the dangling else problem.
10563         (thread_stopped): Define.
10564         (pause_all): Define.
10565         (target_waitstatus_to_string): Declare.
10566         * target.c (target_waitstatus_to_string): New.
10567
10568         * tracepoint.c (tracing): Make extern.
10569         (disconnected_tracing): New.
10570         (stop_tracing): Make extern.  Handle tracing stops due to GDB
10571         disconnecting.
10572         (cmd_qtdisconnected): New.
10573         (cmd_qtstatus): Report disconnected tracing status in trace reply.
10574         (handle_tracepoint_general_set): Handle QTDisconnected.
10575
10576         * event-loop.c (event_handler_func): Change return type to int.
10577         (process_event): Bail out if the event handler wants the event
10578         loop to stop.
10579         (handle_file_event): Ditto.
10580         (start_event_loop): Bail out if the event handler wants the event
10581         loop to stop.
10582
10583         * nto-low.c (nto_target_ops): Adjust.
10584         * spu-low.c (spu_wait): Don't remove the process here.
10585         (spu_target_ops): Adjust.
10586         * win32-low.c (win32_wait): Don't remove the process here.
10587         (win32_target_ops): Adjust.
10588
10589 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
10590
10591         * regcache.c (realloc_register_cache): Invalidate inferior's
10592         regcache before recreating it.
10593
10594 2010-04-09  Pedro Alves  <pedro@codesourcery.com>
10595
10596         * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
10597
10598 2010-04-09  Stan Shebs  <stan@codesourcery.com>
10599             Pedro Alves  <pedro@codesourcery.com>
10600
10601         * server.h (LONGEST): New.
10602         (struct thread_info) <while_stepping>: New field.
10603         (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
10604         Declare.
10605         (initialize_tracepoint, handle_tracepoint_general_set)
10606         (handle_tracepoint_query, tracepoint_finished_step)
10607         (tracepoint_was_hit, release_while_stepping_state_list):
10608         (current_traceframe): Declare.
10609         * server.c (handle_general_set): Handle tracepoint packets.
10610         (read_memory): New.
10611         (write_memory): New.
10612         (handle_search_memory_1): Use read_memory.
10613         (handle_query): Report support for conditional tracepoints, trace
10614         state variables, and tracepoint sources.  Handle tracepoint
10615         queries.
10616         (main): Initialize the tracepoints module.
10617         (process_serial_event): Handle traceframe reads/writes.
10618
10619         * linux-low.c (handle_tracepoints): New.
10620         (linux_wait_1): Call it.
10621         (linux_resume_one_lwp): Handle while-stepping.
10622         (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
10623         (linux_target_ops): Install them.
10624         * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
10625         New field.
10626         * linux-x86-low.c (x86_supports_tracepoints): New.
10627         (the_low_target). Install it.
10628
10629         * mem-break.h (delete_breakpoint): Declare.
10630         * mem-break.c (delete_breakpoint): Make external.
10631
10632         * target.h (struct target_ops): Add `supports_tracepoints',
10633         `read_pc', and `write_pc' fields.
10634         (target_supports_tracepoints): Define.
10635         * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
10636         (phex_nz): New.
10637
10638         * regcache.h (struct regcache) <registers_owned>: New field.
10639         (init_register_cache, regcache_cpy): Declare.
10640         (regcache_read_pc, regcache_write_pc): Declare.
10641         (register_cache_size): Declare.
10642         (supply_regblock): Declare.
10643         * regcache.c (init_register_cache): New.
10644         (new_register_cache): Use it.
10645         (regcache_cpy): New.
10646         (register_cache_size): New.
10647         (supply_regblock): New.
10648         (regcache_read_pc, regcache_write_pc): New.
10649
10650         * tracepoint.c: New.
10651
10652         * Makefile.in (OBS): Add tracepoint.o.
10653         (tracepoint.o): New rule.
10654
10655 2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>
10656
10657         * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
10658         (i386-mmx.o): New.
10659         (i386-mmx.c): Likewise.
10660         (i386-mmx-linux.o): Likewise.
10661         (i386-mmx-linux.c): Likewise.
10662
10663         * configure.srv (srv_i386_regobj): Add i386-mmx.o.
10664         (srv_i386_linux_regobj): Add i386-mmx-linux.o.
10665         (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
10666         (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
10667
10668         * linux-x86-low.c (init_registers_i386_mmx_linux): New.
10669         (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
10670         and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
10671
10672 2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>
10673
10674         * Makefile.in (clean): Updated.
10675         (i386-avx.o): New.
10676         (i386-avx.c): Likewise.
10677         (i386-avx-linux.o): Likewise.
10678         (i386-avx-linux.c): Likewise.
10679         (amd64-avx.o): Likewise.
10680         (amd64-avx.c): Likewise.
10681         (amd64-avx-linux.o): Likewise.
10682         (amd64-avx-linux.c): Likewise.
10683
10684         * configure.srv (srv_i386_regobj): Add i386-avx.o.
10685         (srv_i386_linux_regobj): Add i386-avx-linux.o.
10686         (srv_amd64_regobj): Add amd64-avx.o.
10687         (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
10688         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
10689         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
10690         (srv_i386_xmlfiles): Add i386/i386-avx.xml.
10691         (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
10692         (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
10693         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
10694
10695         * i387-fp.c: Include "i386-xstate.h".
10696         (i387_xsave): New.
10697         (i387_cache_to_xsave): Likewise.
10698         (i387_xsave_to_cache): Likewise.
10699         (x86_xcr0): Likewise.
10700
10701         * i387-fp.h (i387_cache_to_xsave): Likewise.
10702         (i387_xsave_to_cache): Likewise.
10703         (x86_xcr0): Likewise.
10704
10705         * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
10706         * linux-crisv32-low.c (target_regsets): Likewise.
10707         * linux-m68k-low.c (target_regsets): Likewise.
10708         * linux-mips-low.c (target_regsets): Likewise.
10709         * linux-ppc-low.c (target_regsets): Likewise.
10710         * linux-s390-low.c (target_regsets): Likewise.
10711         * linux-sh-low.c (target_regsets): Likewise.
10712         * linux-sparc-low.c (target_regsets): Likewise.
10713         * linux-xtensa-low.c (target_regsets): Likewise.
10714
10715         * linux-low.c: Include <sys/uio.h>.
10716         (regsets_fetch_inferior_registers): Support nt_type.
10717         (regsets_store_inferior_registers): Likewise.
10718         (linux_process_qsupported): New.
10719         (linux_target_ops): Add linux_process_qsupported.
10720
10721         * linux-low.h (regset_info): Add nt_type.
10722         (linux_target_ops): Add process_qsupported.
10723
10724         * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
10725         and <sys/uio.h>.
10726         (init_registers_i386_avx_linux): New.
10727         (init_registers_amd64_avx_linux): Likewise.
10728         (xmltarget_i386_linux_no_xml): Likewise.
10729         (xmltarget_amd64_linux_no_xml): Likewise.
10730         (PTRACE_GETREGSET): Likewise.
10731         (PTRACE_SETREGSET): Likewise.
10732         (x86_fill_xstateregset): Likewise.
10733         (x86_store_xstateregset): Likewise.
10734         (use_xml): Likewise.
10735         (x86_linux_update_xmltarget): Likewise.
10736         (x86_linux_process_qsupported): Likewise.
10737         (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
10738         (x86_arch_setup): Don't call init_registers_amd64_linux nor
10739         init_registers_i386_linux here.  Call
10740         x86_linux_update_xmltarget.
10741         (the_low_target): Add x86_linux_process_qsupported.
10742
10743         * server.c (handle_query): Call target_process_qsupported.
10744
10745         * target.h (target_ops): Add process_qsupported.
10746         (target_process_qsupported): New.
10747
10748 2010-04-03  Pedro Alves  <pedro@codesourcery.com>
10749
10750         * inferiors.c (add_thread): Set last_status kind to
10751         TARGET_WAITKIND_IGNORE.
10752         * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
10753         fetch.  Use ptid_of.  Avoid unnecessary get_lwp_thread calls.
10754         (linux_wait_1): Move `thread' local definition to block that uses
10755         it.  Don't NULL initialize `event_child'.
10756         (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
10757         Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
10758         * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
10759
10760 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
10761
10762         * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
10763         an extended waitstatus, or by a watchpoint.
10764         (cancel_breakpoints_callback): Don't cancel a breakpoint if the
10765         thread was stepping or has been stopped by a watchpoint.
10766
10767 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
10768
10769         * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
10770         (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
10771         of another, then delete the previous, and validate all
10772         breakpoints.
10773         (validate_inserted_breakpoint): New.
10774         (delete_disabled_breakpoints): New.
10775         (validate_breakpoints): New.
10776         (check_mem_read): Validate breakpoints before trusting their
10777         shadow.  Delete disabled breakpoints.
10778         (check_mem_write): Validate breakpoints before trusting they
10779         should be inserted.  Delete disabled breakpoints.
10780         * mem-break.h (validate_breakpoints):
10781         * server.c (handle_query): Validate breakpoints when we see a
10782         qSymbol query.
10783
10784 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
10785
10786         * linux-low.c (linux_wait_1): Avoid setting need_step_over is
10787         there's a GDB breakpoint at stop_pc.  Always report a trap to GDB
10788         if we could tell there's a GDB breakpoint at stop_pc.
10789         (need_step_over_p): Don't do a step over if we find a GDB
10790         breakpoint at the resume PC.
10791
10792         * mem-break.c (struct raw_breakpoint): New.
10793         (enum bkpt_type): New type `gdb_breakpoint'.
10794         (struct breakpoint): Delete the `PC', `old_data' and `inserted'
10795         fields.  New field `raw'.
10796         (find_raw_breakpoint_at): New.
10797         (set_raw_breakpoint_at): Handle refcounting.  Create a raw
10798         breakpoint instead.
10799         (set_breakpoint_at): Adjust.
10800         (delete_raw_breakpoint): New.
10801         (release_breakpoint): New.
10802         (delete_breakpoint): Rename to...
10803         (delete_breakpoint_1): ... this.  Add proc parameter.  Use
10804         release_breakpoint.  Return ENOENT.
10805         (delete_breakpoint): Reimplement.
10806         (find_breakpoint_at): Delete.
10807         (find_gdb_breakpoint_at): New.
10808         (delete_breakpoint_at): Delete.
10809         (set_gdb_breakpoint_at): New.
10810         (delete_gdb_breakpoint_at): New.
10811         (gdb_breakpoint_here): New.
10812         (set_reinsert_breakpoint): Use release_breakpoint.
10813         (uninsert_breakpoint): Rename to ...
10814         (uninsert_raw_breakpoint): ... this.
10815         (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
10816         (reinsert_raw_breakpoint): Change parameter type to
10817         raw_breakpoint.
10818         (reinsert_breakpoints_at): Adjust to handle raw breakpoints
10819         instead.
10820         (check_breakpoints): Adjust.  Use release_breakpoint.
10821         (breakpoint_here): Rewrite using find_raw_breakpoint_at.
10822         (breakpoint_inserted_here): Ditto.
10823         (check_mem_read): Adjust to iterate over raw breakpoints instead.
10824         Don't trust the breakpoint's shadow if it is not inserted.
10825         (check_mem_write): Adjust to iterate over raw breakpoints instead.
10826         (delete_all_breakpoints): Adjust.
10827         (free_all_breakpoints): Mark all breakpoints as uninserted, and
10828         use delete_breakpoint_1.
10829
10830         * mem-break.h (breakpoints_supported): Delete declaration.
10831         (set_gdb_breakpoint_at): Declare.
10832         (gdb_breakpoint_here): Declare.
10833         (delete_breakpoint_at): Delete.
10834         (delete_gdb_breakpoint_at): Declare.
10835
10836         * server.h (struct raw_breakpoint): Forward declare.
10837         (struct process_info): New field `raw_breakpoints'.
10838
10839         * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
10840         breakpoints.
10841
10842 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
10843
10844         * linux-low.c (status_pending_p_callback): Fix comment.
10845         (linux_wait_for_event_1): Move most of the internal breakpoint
10846         handling from here...
10847         (linux_wait_1): ... to here.
10848         (count_events_callback): New.
10849         (select_singlestep_lwp_callback): New.
10850         (select_event_lwp_callback): New.
10851         (cancel_breakpoints_callback): New.
10852         (select_event_lwp): New.
10853         (linux_wait_1): Simplify internal breakpoint handling.  Give equal
10854         priority to all LWPs that have had events that should be reported
10855         to the client.  Cancel breakpoints when about to reporting the
10856         event to the client, not while stopping lwps.  No longer cancel
10857         finished single-steps here.
10858         (cancel_finished_single_step): Delete.
10859         (cancel_finished_single_steps): Delete.
10860
10861 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
10862
10863         * mem-break.c (enum bkpt_type): New.
10864         (struct breakpoint): New field `type'.
10865         (set_breakpoint_at): Change return type to struct breakpoint
10866         pointer.  Set type to `other_breakpoint' by default.
10867         (delete_breakpoint): Rewrite, supporting more than one breakpoint
10868         in the breakpoint list.
10869         (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
10870         (reinsert_breakpoint): Rename to ...
10871         (reinsert_raw_breakpoint): ... this.
10872         (reinsert_breakpoints_at): Adjust.
10873         * mem-break.h (struct breakpoint): Declare.
10874         (set_breakpoint_at): Change return type to struct breakpoint
10875         pointer.
10876
10877 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
10878
10879         * server.c (handle_query): Assign, not compare.
10880
10881 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
10882
10883         Teach linux gdbserver to step-over-breakpoints.
10884
10885         * linux-low.c (can_hardware_single_step): New.
10886         (supports_breakpoints): New.
10887         (handle_extended_wait): If stopping threads, read the stop pc of
10888         the new cloned LWP.
10889         (get_pc): New.
10890         (get_stop_pc): Add `lwp' parameter.  Handle it.  Bail out if the
10891         low target doesn't support retrieving the PC.
10892         (add_lwp): Set last_resume_kind to resume_continue.
10893         (linux_attach_lwp_1): Adjust comments.  Always set stop_expected.
10894         (linux_attach): Don't clear stop_expected.  Set the lwp's
10895         last_resume_kind to resume_stop.
10896         (linux_detach_one_lwp): Don't check for removed breakpoints.
10897         (check_removed_breakpoint): Delete.
10898         (status_pending_p): Rename to ...
10899         (status_pending_p_callback): ... this.  Don't check for removed
10900         breakpoints.  Don't consider threads that are stopped from GDB's
10901         perspective.
10902         (linux_wait_for_lwp): Always read the stop_pc here.
10903         (cancel_breakpoint): New.
10904         (step_over_bkpt): New global.
10905         (linux_wait_for_event_1): Implement stepping over breakpoints.
10906         (gdb_wants_lwp_stopped): New.
10907         (gdb_wants_all_stopped): New.
10908         (linux_wait_1): Tag threads as gdb-wants-stopped.  Cancel finished
10909         single-step traps here.  Store the thread's last reported target
10910         wait status.
10911         (send_sigstop): Don't clear stop_expected.  Always set it,
10912         instead.
10913         (mark_lwp_dead): Remove reference to pending_is_breakpoint.
10914         (cancel_finished_single_step): New.
10915         (cancel_finished_single_steps): New.
10916         (wait_for_sigstop): Don't cancel finished single-step traps here.
10917         (linux_resume_one_lwp): Don't check for removed breakpoints.
10918         Don't set `step' on non-hardware step archs.
10919         (linux_set_resume_request): Ignore resume_stop requests if already
10920         stopping or stopped.  Set the lwp's last_resume_kind.
10921         (resume_status_pending_p): Don't check for removed breakpoints.
10922         (need_step_over_p): New.
10923         (start_step_over): New.
10924         (finish_step_over): New.
10925         (linux_resume_one_thread): Always queue a sigstop for resume_stop
10926         requests.  Clear the thread's last reported target waitstatus.
10927         Don't use the `suspended' flag.  Don't consider pending breakpoints.
10928         (linux_resume): Start a step-over if necessary.
10929         (proceed_one_lwp): New.
10930         (proceed_all_lwps): New.
10931         (unstop_all_lwps): New.
10932         * linux-low.h (struct lwp_info): Rewrite comment for the
10933         `suspended' flag.  Add the `stop_pc' field.  Delete the
10934         `pending_stop_pc' field.  Tweak the `stepping' flag's comment.
10935         Add `'last_resume_kind' and `need_step_over' fields.
10936         * inferiors.c (struct thread_info): Delete, moved elsewhere.
10937         * mem-break.c (struct breakpoint): Delete `reinserting' flag.
10938         Delete `breakpoint_to_reinsert' field.  New flag `inserted'.
10939         (set_raw_breakpoint_at): New.
10940         (set_breakpoint_at): Rewrite to use it.
10941         (reinsert_breakpoint_handler): Delete.
10942         (set_reinsert_breakpoint): New.
10943         (reinsert_breakpoint_by_bp): Delete.
10944         (delete_reinsert_breakpoints): New.
10945         (uninsert_breakpoint): Rewrite.
10946         (uninsert_breakpoints_at): New.
10947         (reinsert_breakpoint): Rewrite.
10948         (reinsert_breakpoints_at): New.
10949         (check_breakpoints): Rewrite.
10950         (breakpoint_here): New.
10951         (breakpoint_inserted_here): New.
10952         (check_mem_read): Adjust.
10953         * mem-break.h (breakpoints_supported, breakpoint_here)
10954         (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10955         (reinsert_breakpoint_by_bp): Delete declaration.
10956         (delete_reinsert_breakpoints): Declare.
10957         (reinsert_breakpoint): Delete declaration.
10958         (reinsert_breakpoints_at): Declare.
10959         (uninsert_breakpoint): Delete declaration.
10960         (uninsert_breakpoints_at): Declare.
10961         (check_breakpoints): Adjust prototype.
10962         * server.h: Adjust include order.
10963         (struct thread_info): Declare here.  Add a `last_status' field.
10964
10965 2010-03-23  Michael Snyder  <msnyder@vmware.com>
10966
10967         * server.c (crc32): New function.
10968         (handle_query): Add handling for 'qCRC:' request.
10969
10970 2010-03-23  Pedro Alves  <pedro@codesourcery.com>
10971
10972         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10973         lwp had been stopped by a watchpoint.
10974
10975 2010-03-16  Pedro Alves  <pedro@codesourcery.com>
10976
10977         * server.h (internal_error): Declare.
10978         (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10979         * utils.c (internal_error): New function.
10980
10981 2010-03-15  Andreas Schwab  <schwab@redhat.com>
10982
10983         * configure.srv: Fix typo setting srv_regobj.
10984
10985 2010-03-15  Pedro Alves  <pedro@codesourcery.com>
10986
10987         * linux-low.c (fetch_register): Avoid passing a non string literal
10988         format to `error'.
10989         (usr_store_inferior_registers): Ditto.
10990
10991 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
10992
10993         * linux-low.c (linux_write_memory): Bail out early if peeking
10994         memory failed.
10995
10996 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
10997
10998         * linux-low.h (struct lwp_info): New fields
10999         `stopped_by_watchpoint' and `stopped_data_address'.
11000         * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
11001         here, and cache them in the lwp object.
11002         (wait_for_sigstop): Check stopped_by_watchpoint lwp field
11003         directly.
11004         (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
11005         field.
11006         (linux_stopped_by_watchpoint): Rewrite.
11007         (linux_stopped_data_address): Rewrite.
11008
11009 2010-03-06  Simo Melenius  <simo.melenius@iki.fi>
11010
11011         * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
11012         switching the current inferior, not before.
11013
11014 2010-03-01  H.J. Lu  <hongjiu.lu@intel.com>
11015
11016         * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
11017         reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
11018         i386-linux.c and amd64-linux.c.
11019         (reg-i386.o): Removed.
11020         (reg-i386.c): Likewise.
11021         (reg-i386-linux.o): Likewise.
11022         (reg-i386-linux.c): Likewise.
11023         (reg-x86-64.o): Likewise.
11024         (reg-x86-64.c): Likewise.
11025         (reg-x86-64-linux.o): Likewise.
11026         (reg-x86-64-linux.c): Likewise.
11027         (i386.o): New.
11028         (i386.c): Likewise.
11029         (i386-linux.o): Likewise.
11030         (i386-linux.c): Likewise.
11031         (amd64.o): Likewise.
11032         (amd64.c): Likewise.
11033         (amd64-linux.o): Likewise.
11034         (amd64-linux.c): Likewise.
11035
11036         * configure.srv (srv_i386_regobj): New.
11037         (srv_i386_linux_regobj): Likewise.
11038         (srv_amd64_regobj): Likewise.
11039         (srv_amd64_linux_regobj): Likewise.
11040         (srv_i386_32bit_xmlfiles): Likewise.
11041         (srv_i386_64bit_xmlfiles): Likewise.
11042         (srv_i386_xmlfiles): Likewise.
11043         (srv_amd64_xmlfiles): Likewise.
11044         (srv_i386_linux_xmlfiles): Likewise.
11045         (srv_amd64_linux_xmlfiles): Likewise.
11046         (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj.  Set
11047         srv_xmlfiles to $srv_i386_xmlfiles.
11048         (i[34567]86-*-mingw32ce*): Likewise.
11049         (i[34567]86-*-mingw*): Likewise.
11050         (i[34567]86-*-nto*): Likewise.
11051         (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
11052         and $srv_amd64_linux_regobj.  Set srv_xmlfiles to
11053         $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
11054         (x86_64-*-linux*): Likewise.
11055
11056         * linux-x86-low.c (init_registers_x86_64_linux): Removed.
11057         (init_registers_amd64_linux): New.
11058         (x86_arch_setup): Replace init_registers_x86_64_linux with
11059         init_registers_amd64_linux.
11060
11061 2010-02-23  Maxim Kuvyrkov  <maxim@codesourcery.com>
11062
11063         * configure.ac: Check for libdl.  If it is not available link against
11064         static libthread_db.
11065         * configure: Regenerate.
11066
11067 2010-02-22  Pedro Alves  <pedro@codesourcery.com>
11068
11069         PR9605
11070
11071         * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
11072         handing a read watchpoint.
11073         (i386_low_insert_watchpoint): Read watchpoints aren't supported.
11074
11075 2010-02-12  Doug Evans  <dje@google.com>
11076
11077         * linux-low.c (linux_supports_tracefork_flag): Document.
11078         (linux_look_up_symbols): Add comment.
11079
11080 2010-02-03  H.J. Lu  <hongjiu.lu@intel.com>
11081
11082         * regcache.c (supply_register): Clear regcache if buf is NULL.
11083
11084 2010-02-02  Nicolas Roche  <roche@sourceware.org>
11085             Joel Brobecker  <brobecker@adacore.com>
11086
11087         * inferiors.c (find_inferior): Add function documentation.
11088         (unloaded_dll): Handle the case where the unloaded dll has not
11089         been previously registered in the dll list.
11090
11091 2010-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
11092
11093         * linux-arm-low.c (thumb_breakpoint_len): Delete.
11094         (thumb2_breakpoint): New.
11095         (arm_breakpoint_at): Check for Thumb-2 breakpoints.
11096
11097 2010-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
11098
11099         * linux-low.c (get_stop_pc): Check for SIGTRAP.
11100         (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
11101         breakpoints.
11102
11103 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
11104
11105         * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
11106
11107 2010-01-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11108
11109         * linux-s390-low.c (s390_collect_ptrace_register)
11110         (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
11111
11112 2010-01-21  Doug Evans  <dje@google.com>
11113
11114         * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
11115         (PTRACE_ARG4_TYPE): New macro.
11116         (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
11117         (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
11118         (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
11119         (usr_store_inferior_registers): Ditto.
11120         (linux_read_memory, linux_write_memory): Ditto.
11121         (linux_test_for_tracefork): Ditto.
11122
11123         * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
11124         Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
11125
11126 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
11127
11128         * proc-service.c (ps_lgetregs): Don't refetch registers from the
11129         target.
11130
11131 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
11132
11133         * spu-low.c (spu_fetch_registers, spu_store_registers): Change
11134         prototype to take a regcache.  Adjust.
11135
11136 2010-01-20  Pedro Alves  <pedro@codesourcery.com>
11137
11138         * regcache.h (struct thread_info): Forward declare.
11139         (struct regcache): New.
11140         (new_register_cache): Adjust prototype.
11141         (get_thread_regcache): Declare.
11142         (free_register_cache): Adjust prototype.
11143         (registers_to_string, registers_from_string): Ditto.
11144         (supply_register, supply_register_by_name, collect_register)
11145         (collect_register_as_string, collect_register_by_name): Ditto.
11146         * regcache.c (struct inferior_regcache_data): Delete.
11147         (get_regcache): Rename to ...
11148         (get_thread_regcache): ... this.  Adjust.  Switch inferior before
11149         fetching registers.
11150         (regcache_invalidate_one): Adjust.
11151         (regcache_invalidate): Fix prototype.
11152         (new_register_cache): Return the new register cache.
11153         (free_register_cache): Change prototype.
11154         (realloc_register_cache): Adjust.
11155         (registers_to_string): Change prototype to take a regcache.  Adjust.
11156         (registers_from_string): Ditto.
11157         (register_data): Ditto.
11158         (supply_register): Ditto.
11159         (supply_register_by_name): Ditto.
11160         (collect_register): Ditto.
11161         (collect_register_as_string): Ditto.
11162         (collect_register_by_name): Ditto.
11163         * server.c (process_serial_event): Adjust.
11164         * linux-low.h (regset_fill_func, regset_store_func): Change
11165         prototype.
11166         (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
11167         Change prototype.
11168         * linux-low.c (get_stop_pc): Adjust.
11169         (check_removed_breakpoint): Adjust.
11170         (linux_wait_for_event): Adjust.
11171         (linux_resume_one_lwp): Adjust.
11172         (fetch_register): Add regcache parameter.  Adjust.
11173         (usr_store_inferior_registers): Ditto.
11174         (regsets_fetch_inferior_registers): Ditto.
11175         (regsets_store_inferior_registers): Ditto.
11176         (linux_fetch_registers, linux_store_registers): Ditto.
11177         * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
11178         regcache.  Adjust.
11179         (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
11180         Ditto.
11181         * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
11182         prototype to take a regcache.
11183         (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
11184         * remote-utils.c (convert_ascii_to_int, outreg)
11185         (prepare_resume_reply): Change prototype to take a regcache.
11186         Adjust.
11187         * target.h (struct target_ops) <fetch_registers, store_registers>:
11188         Change prototype to take a regcache.
11189         (fetch_inferior_registers, store_inferior_registers): Change
11190         prototype to take a regcache.  Adjust.
11191         * proc-service.c (ps_lgetregs): Adjust.
11192         * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
11193         (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
11194         (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
11195         take a regcache.  Adjust.
11196         * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
11197         (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
11198         (arm_store_vfpregset, arm_get_pc, arm_set_pc):
11199         (arm_breakpoint_at): Change prototype to take a regcache.  Adjust.
11200         * linux-cris-low.c (cris_get_pc, cris_set_pc)
11201         (cris_cannot_fetch_register):
11202         (cris_breakpoint_at): Change prototype to take a regcache.
11203         Adjust.
11204         * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
11205         cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
11206         to take a regcache.  Adjust.
11207         (cris_breakpoint_at, cris_insert_point, cris_remove_point):
11208         Adjust.
11209         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
11210         take a regcache.  Adjust.
11211         * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
11212         (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
11213         (m68k_set_pc): Change prototype to take a regcache.  Adjust.
11214         * linux-mips-low.c (mips_get_pc):
11215         (mips_set_pc): Change prototype to take a regcache.  Adjust.
11216         (mips_reinsert_addr): Adjust.
11217         (mips_collect_register): Change prototype to take a regcache.
11218         Adjust.
11219         (mips_supply_register):
11220         (mips_collect_register_32bit, mips_supply_register_32bit)
11221         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11222         (mips_store_fpregset): Ditto.
11223         * linux-ppc-low.c (ppc_supply_ptrace_register)
11224         (ppc_supply_ptrace_register): Ditto.
11225         (parse_spufs_run): Adjust.
11226         (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
11227         (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
11228         (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
11229         take a regcache.  Adjust.
11230         * linux-s390-low.c (s390_collect_ptrace_register)
11231         (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
11232         (s390_set_pc): Change prototype to take a regcache.  Adjust.
11233         (s390_arch_setup): Adjust.
11234         * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
11235         (sh_fill_gregset): Change prototype to take a regcache.  Adjust.
11236         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
11237         (sparc_fill_gregset, sparc_store_gregset_from_stack)
11238         (sparc_store_gregset, sparc_get_pc): Change prototype to take a
11239         regcache.  Adjust.
11240         (sparc_breakpoint_at): Adjust.
11241         * linux-xtensa-low.c (xtensa_fill_gregset):
11242         (xtensa_store_gregset):
11243         (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
11244         (xtensa_set_pc): Change prototype to take a regcache.  Adjust.
11245         * nto-low.c (nto_fetch_registers, nto_store_registers): Change
11246         prototype to take a regcache.  Adjust.
11247         * win32-arm-low.c (arm_fetch_inferior_register)
11248         (arm_store_inferior_register): Change prototype to take a
11249         regcache.  Adjust.
11250         * win32-i386-low.c (i386_fetch_inferior_register)
11251         (i386_store_inferior_register): Change prototype to take a
11252         regcache.  Adjust.
11253         * win32-low.c (child_fetch_inferior_registers)
11254         (child_store_inferior_registers): Change prototype to take a
11255         regcache.  Adjust.
11256         (win32_wait): Adjust.
11257         (win32_fetch_inferior_registers): Change prototype to take a
11258         regcache.  Adjust.
11259         (win32_store_inferior_registers): Adjust.
11260         * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
11261         store_inferior_register>: Change prototype to take a regcache.
11262
11263 2010-01-20  Doug Evans  <dje@google.com>
11264
11265         * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
11266         #ifdef.
11267         (linux_wait_for_event1, linux_init_signals): Ditto.
11268         (W_STOPCODE): Provide definition if missing.
11269
11270 2010-01-13  Vladimir Prus  <vladimir@codesourcery.com>
11271
11272         * linux-low.c (linux_core_of_thread): New.
11273         (compare_ints, show_process, list_threads): New.
11274         (linux_qxfer_osdata): Report threads and cores.
11275         (linux_target_op): Register linux_core_of_thread.
11276         * remote-utils.c (prepare_resume_reply): Report the core.
11277         (buffer_xml_printf): Support %d specifier.
11278         * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
11279         New.
11280         (handle_query): Handle qXfer:threads.  Announce availability
11281         thereof.
11282         * target.h (struct target_ops): New field core_of_thread.
11283
11284 2010-01-04  Ulrich Weigand  <uweigand@de.ibm.com>
11285
11286         * Makefile.in (clean): Remove new generated files.
11287         (reg-s390.o, reg-s390.c): Remove rules.
11288         (reg-s390x.o, reg-s390x.c): Likewise.
11289         (s390-linux32.o, s390-linux32.c): Add rules.
11290         (s390-linux64.o, s390-linux64.c): Likewise.
11291         (s390x-linux64.o, s390x-linux64.c): Likewise.
11292         * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
11293         * linux-s390-low.c: Include <elf.h>.
11294         (HWCAP_S390_HIGH_GPRS): Define if undefined.
11295         (init_registers_s390): Remove prototype.
11296         (init_registers_s390x): Likewise.
11297         (init_registers_s390_linux32): Add prototype.
11298         (init_registers_s390_linux64): Likewise.
11299         (init_registers_s390x_linux64): Likewise.
11300         (s390_num_regs_3264): New define.
11301         (s390_regmap_3264): New global variable.
11302         (s390_cannot_fetch_register): Remove obsolete check.
11303         (s390_cannot_store_register): Likewise.
11304         (s390_collect_ptrace_register): Handle upper/lower register halves.
11305         (s390_supply_ptrace_register): Likewise.
11306         (s390_fill_gregset): Update to register number changes.
11307         (s390_get_hwcap): New routine.
11308         (s390_arch_setup): Detect 32-bit process running on 64-bit system.
11309         Install appropriate regmap and register set.
11310
11311 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
11312
11313         * server.c (gdbserver_version): Update copyright year to 2010.
11314         * gdbreplay.c (gdbreplay_version): Likewise.
11315
11316 2009-12-28  Doug Evans  <dje@google.com>
11317
11318         * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
11319         elf/external.h.  Include <elf.h> instead but only if necessary.
11320
11321 2009-12-28  Pedro Alves  <pedro@codesourcery.com>
11322
11323         * linux-low.c (linux_remove_process): Remove `detaching'
11324         parameter.  Don't release/detach from thread_db here.
11325         (linux_kill): Release/detach from thread_db here, ...
11326         (linux_detach): ... and here, before actually detaching.
11327         (linux_wait_1): ... and here, when a process exits.
11328         * thread-db.c (any_thread_of): New.
11329         (thread_db_free): Switch the current inferior to a thread of the
11330         passed in process.
11331
11332 2009-12-21  Doug Evans  <dje@google.com>
11333
11334         * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
11335
11336         * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
11337         Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
11338         warning ifndef __NR_tkill.  Move setting of errno there too.
11339         Delete unnecessary resetting of errno after syscall.
11340         Minor comment changes to match gdb/linux-nat.c:kill_lwp.
11341
11342         * configure.ac: Check for dladdr.
11343         * config.in: Regenerate.
11344         * configure: Regenerate.
11345         * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
11346         (try_thread_db_load): Update.
11347
11348         * linux-low.c (my_waitpid): Delete unnecessary prototype.
11349
11350 2009-12-18  Doug Evans  <dje@google.com>
11351
11352         * event-loop.c: Include unistd.h if it exists.
11353
11354         * linux-low.c (my_waitpid): Move definition away from being in
11355         between linux_tracefork_child/linux_test_for_tracefork.
11356
11357         * gdb_proc_service.h (psaddr_t): Fix type.
11358         * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
11359         signature to match glibc.
11360
11361 2009-12-16  Doug Evans  <dje@google.com>
11362
11363         * linux-low.c (linux_read_memory): Fix argument to read.
11364
11365 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
11366
11367         * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
11368         events, don't leave current_inferior pointing at null.
11369
11370 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
11371
11372         * win32-low.c (LOG): Delete.
11373         (OUTMSG): Output to stderr.
11374         (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
11375         on compile time LOG macro.
11376         (win32_wait): Fix debug output.
11377
11378 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
11379
11380         * win32-low.c (win32_add_one_solib): If the dll name is
11381         "ntdll.dll", prepend the system directory to the dll path.
11382
11383 2009-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
11384
11385         * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
11386
11387 2009-11-17  Nathan Sidwell  <nathan@codesourcery.com>
11388             Vladimir Prus  <vladimir@codesourcery.com>
11389
11390         * Makefile.in (reg-cf.o, reg-cf.c): New targets.
11391         * configure.ac: Check for __mcoldfire__ and set
11392         gdb_cv_m68k_is_coldfire.
11393         * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
11394         reg-cf.o and reg-m68k.o.
11395         * configure: Regenerated.
11396
11397 2009-11-16  Pedro Alves  <pedro@codesourcery.com>
11398
11399         * linux-low.c (linux_remove_process): Add `detaching' parameter.
11400         Pass it to thread_db_free.
11401         (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
11402         proper `detaching' argument to linux_remove_process.
11403         * linux-low.h (thread_db_free): Add `detaching' parameter.
11404         * thread-db.c (thread_db_init): Pass false as `detaching' argument
11405         to thread_db_free.
11406         (thread_db_free): Add `detaching' parameter.  Only
11407         call td_ta_clear_event if detaching from process.
11408
11409 2009-11-12  Maxim Kuvyrkov  <maxim@codesourcery.com>
11410
11411         * thread-db.c (thread_db_free): Fix typo.
11412
11413 2009-11-11  Paul Pluzhnikov  <ppluzhnikov@google.com>
11414
11415         PR gdb/10838
11416         * thread-db.c (thread_db_free): Call td_ta_clear_event.
11417
11418 2009-11-03  Nathan Sidwell  <nathan@codesourcery.com>
11419
11420         * configure.ac (i[34567]86-*): Check if we're targetting x86-64
11421         with an i686 compiler.
11422         * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
11423         needed.
11424         * configure: Rebuilt.
11425
11426 2009-10-29  Sandra Loosemore  <sandra@codesourcery.com>
11427
11428         PR gdb/10783
11429
11430         * server.c (handle_search_memory_1): Correct read_addr initialization
11431         in loop for searching subsequent chunks.
11432
11433 2009-10-29  Paul Pluzhnikov  <ppluzhnikov@google.com>
11434
11435         * configure.ac: New --with-libthread-db option.
11436         * thread-db.c: Allow direct dependence on libthread_db.
11437         (thread_db_free): Adjust.
11438         * config.in: Regenerate.
11439         * configure: Likewise.
11440
11441 2009-10-28  Paul Pluzhnikov  <ppluzhnikov@google.com>
11442
11443         PR gdb/10757
11444         * thread-db.c (attach_thread): New function.
11445         (maybe_attach_thread): Return success/failure.
11446         (find_new_threads_callback): Adjust.
11447         (thread_db_find_new_threads): Loop until no new threads.
11448
11449 2009-10-13  Pedro Alves  <pedro@codesourcery.com>
11450
11451         * proc-service.c (ps_lgetregs): Formatting.
11452
11453 2009-10-08  Paul Pluzhnikov  <ppluzhnikov@google.com>
11454
11455         * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
11456         * configure.ac: Adjust.
11457         * linux-low.h (struct process_info_private): Move members to struct
11458         thread_db.
11459         (thread_db_free, thread_db_handle_monitor_command): New prototype.
11460         * linux-low.c (linux_remove_process): Adjust.
11461         (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
11462         * server.c (handle_query): Move code ...
11463         (handle_monitor_command): ... here. New function.
11464         * target.h (struct target_ops): New member.
11465         * thread-db.c (struct thread_db): New.
11466         (libthread_db_search_path): New variable.
11467         (thread_db_create_event, thread_db_enable_reporting)
11468         (find_one_thread, maybe_attach_thread, find_new_threads_callback)
11469         (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
11470         (try_thread_db_load_1, dladdr_to_soname): New functions.
11471         (try_thread_db_load, thread_db_load_search): New functions.
11472         (thread_db_init): Search for libthread_db.
11473         (thread_db_free): New function.
11474         (thread_db_handle_monitor_command): Likewise.
11475         * config.in: Regenerate.
11476         * configure: Regenerate.
11477
11478 2009-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
11479
11480         * spu-low.c (spu_kill): Wait for inferior to terminate.
11481         Call clear_inferiors.
11482         (spu_detach): Call clear_inferiors.
11483
11484 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11485
11486         * aclocal.m4: Regenerate.
11487         * config.in: Likewise.
11488         * configure: Likewise.
11489
11490 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
11491
11492         * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
11493         (parse_spufs_run): New function.
11494         (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
11495         (ppc_breakpoint_at): Handle SPU breakpoints.
11496
11497 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
11498
11499         * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
11500         (SPUFS_MAGIC): Define.
11501         (spu_enumerate_spu_ids): New function.
11502         (linux_qxfer_spu): New function.
11503         (linux_target_ops): Install linux_qxfer_spu.
11504
11505 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
11506
11507         * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
11508         and powerpc-cell64l.o to srv_regobj.  Add rs6000/powerpc-cell32l.xml
11509         and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
11510         * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
11511         (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
11512         (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
11513         * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
11514         (init_registers_powerpc_cell32l): Add prototype.
11515         (init_registers_powerpc_cell64l): Likewise.
11516         (ppc_arch_setup): Detect Cell/B.E. architecture.
11517
11518 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11519
11520         * Makefile.in (datarootdir): New variable.
11521
11522 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
11523
11524         * linux-low.c (linux_write_memory): Update debugging output.
11525         * Makefile.in (clean): Add new descriptions.
11526         (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
11527         (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
11528         * configure.srv: Add new files for arm*-*-linux*.
11529         * linux-arm-low.c: Add new declarations.
11530         (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
11531         (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
11532         (HWCAP_VFPv3D16): New.
11533         (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
11534         instead of __IWMMXT__.
11535         (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
11536         (arm_arch_setup): New.
11537         (target_regsets): Remove #ifdef.  Add VFP regset.
11538         (the_low_target): Use arm_arch_setup.
11539
11540 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
11541
11542         * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
11543         the main thread again.
11544
11545 2009-07-06  Aleksandar Ristovski  <aristovski@qnx.com>
11546
11547         Adding Neutrino gdbserver.
11548         * configure: Regenerated.
11549         * configure.ac: Add case for srv_qnx and set LIBS accordingly.
11550         * configure.srv (i[34567]86-*-nto*): New target.
11551         * nto-low.c, nto-low.h, nto-x86-low.c: New files.
11552         * remote-utils.c [__QNX__]: Include sys/iomgr.h
11553         (nto_comctrl) [__QNX__]: New function.
11554         (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
11555
11556 2009-07-05  Danny Backx  <dannybackx@users.sourceforge.net>
11557
11558         * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
11559         srv_tgtobj.
11560
11561 2009-07-04  Danny Backx  <dannybackx@users.sourceforge.net>
11562             Pedro Alves  <pedro@codesourcery.com>
11563
11564         * win32-i386-low.c (i386_get_thread_context): Handle systems that
11565         don't support CONTEXT_EXTENDED_REGISTERS.
11566         (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
11567         (the_low_target): Install them.
11568         * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
11569         failing with ERROR_PIPE_NOT_CONNECTED.
11570
11571 2009-06-30  Doug Evans  <dje@google.com>
11572             Pierre Muller  <muller@ics.u-strasbg.fr>
11573
11574         Add h/w watchpoint support to x86-linux, win32-i386.
11575         * Makefile.in (SFILES): Add i386-low.c
11576         (i386_low_h): Define.
11577         (i386-low.o): Add dependencies.
11578         (linux-x86-low.o): Add i386-low.h dependency.
11579         (win32-i386-low.o): Ditto.
11580         * i386-low.c: New file.
11581         * i386-low.h: New file.
11582         * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
11583         (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
11584         * linux-low.c (linux_add_process): Initialize arch_private.
11585         (linux_remove_process): Free arch_private.
11586         (add_lwp): Initialize arch_private.
11587         (delete_lwp): Free arch_private.
11588         (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
11589         provided.
11590         * linux-low.h (process_info_private): New member arch_private.
11591         (lwp_info): New member arch_private.
11592         (linux_target_ops): New members new_process, new_thread,
11593         prepare_to_resume.
11594         (ptid_of): New macro.
11595         * linux-x86-low.c: Include stddef.h, i386-low.h.
11596         (arch_process_info): New struct.
11597         (arch_lwp_info): New struct.
11598         (x86_linux_dr_get, x86_linux_dr_set): New functions.
11599         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11600         (i386_dr_low_get_status): New function.
11601         (x86_insert_point, x86_remove_point): New functions.
11602         (x86_stopped_by_watchpoint): New function.
11603         (x86_stopped_data_address): New function.
11604         (x86_linux_new_process, x86_linux_new_thread): New functions.
11605         (x86_linux_prepare_to_resume): New function.
11606         (the_low_target): Add entries for insert_point, remove_point,
11607         stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
11608         prepare_to_resume.
11609         * server.c (debug_hw_points): New global.
11610         (monitor_show_help): Document set debug-hw-points.
11611         (handle_query): Process "set debug-hw-points".
11612         * server.h (debug_hw_points): Declare.
11613         (paddress): Declare.
11614         * utils.c (NUMCELLS, CELLSIZE): New macros.
11615         (get_sell, xsnprintf, paddress): New functions.
11616         * win32-arm-low.c (the_low_target): Add entries for insert_point,
11617         remove_point, stopped_by_watchpoint, stopped_data_address.
11618         * win32-i386-low.c: Include i386-low.h.
11619         (debug_reg_state): Replaces dr.
11620         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
11621         (i386_dr_low_get_status): New function.
11622         (i386_insert_point, i386_remove_point): New functions.
11623         (i386_stopped_by_watchpoint): New function.
11624         (i386_stopped_data_address): New function.
11625         (i386_initial_stuff): Update.
11626         (get_thread_context,set_thread_context,i386_thread_added): Update.
11627         (the_low_target): Add entries for insert_point,
11628         remove_point, stopped_by_watchpoint, stopped_data_address.
11629         * win32-low.c (win32_insert_watchpoint): New function.
11630         (win32_remove_watchpoint): New function.
11631         (win32_stopped_by_watchpoint): New function.
11632         (win32_stopped_data_address): New function.
11633         (win32_target_ops): Add entries for insert_watchpoint,
11634         remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
11635         * win32-low.h (win32_target_ops): New members insert_point,
11636         remove_point, stopped_by_watchpoint, stopped_data_address.
11637
11638 2009-06-25  Pedro Alves  <pedro@codesourcery.com>
11639
11640         * server.c (process_serial_event): Re-return unsupported, not
11641         error, if the type isn't recognized.  Re-allow supporting only
11642         insert or remove packets.  Also call require_running for
11643         breakpoints.  Add missing break statement to default case.  Tidy.
11644         * target.h (struct target_ops): Rename insert_watchpoint to
11645         insert_point, and remove_watchpoint to remove_point.
11646
11647         * linux-low.h (struct linux_target_ops): Likewise.
11648         * linux-low.c (linux_insert_watchpoint): Rename to ...
11649         (linux_insert_point): ... this.  Adjust.
11650         (linux_remove_watchpoint): Rename to ...
11651         (linux_remove_point): ... this.  Adjust.
11652         (linux_target_ops): Adjust.
11653         * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
11654         (cris_insert_point): ... this.
11655         (cris_remove_watchpoint): Rename to ...
11656         (cris_remove_point): ... this.
11657         (the_low_target): Adjust.
11658
11659 2009-06-24  Pierre Muller  <muller@ics.u-strasbg.fr>
11660
11661         * server.c (handle_v_kill): Pass signal_pid to
11662         kill_inferior if multi_process is zero.
11663
11664 2009-06-23  Aleksandar Ristovski  <aristovski@qnx.com>
11665
11666         * server.c (process_serial_event): Add support for Z0 and Z1 packet.
11667         * target.h (target_ops): Comment for *_watchpoint to make it clear
11668         the functions can get types '0' and '1'.
11669
11670 2009-06-22  Aleksandar Ristovski  <aristovski@qnx.com>
11671
11672         * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
11673         * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
11674         * regcache.c (get_regcache): Likewise.
11675         * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
11676         * win32-low.c (child_fetch_inferior_registers): Remove check for
11677         regno 0.
11678
11679 2009-06-19  Aleksandar Ristovski  <aristovski@qnx.com>
11680             Pedro Alves <pedro@codesourcery.com>
11681
11682         * target.h (struct target_ops) <supports_multi_process>: New
11683         callback.
11684         (target_supports_multi_process): New.
11685         * server.c (handle_query): Even if GDB reports support, only
11686         enable multi-process if the target also supports it.  Report
11687         multi-process support only if the target backend supports it.
11688         * linux-low.c (linux_supports_multi_process): New function.
11689         (linux_target_ops): Install it as target_supports_multi_process
11690         callback.
11691
11692 2009-05-24  Doug Evans  <dje@google.com>
11693
11694         Global renaming of find_thread_pid to find_thread_ptid.
11695         * server.h (find_thread_ptid): Renamed from find_thread_pid.
11696         * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
11697         All callers updated.
11698
11699         * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
11700         to resume the newly created thread, don't call ptrace (PTRACE_CONT)
11701         directly.
11702
11703         * linux-low.c (get_stop_pc): Print pc if debug_threads.
11704         (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
11705         (linux_resume_one_lwp): Ditto.
11706
11707 2009-05-23  Doug Evans  <dje@google.com>
11708
11709         * linux-low.c (linux_resume_one_lwp): Change type of first arg
11710         from struct inferior_list_entry * to struct lwp_info *.
11711         All callers updated.
11712
11713 2009-05-13  Doug Evans  <dje@google.com>
11714
11715         * linux-x86-low.c: Don't include assert.h.
11716         (x86_siginfo_fixup): Use fatal, not assert.
11717         (x86_arch_setup): Fix comment.
11718
11719 2009-05-12  Doug Evans  <dje@google.com>
11720
11721         Biarch support for i386/amd64 gdbserver.
11722         * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
11723         Add linux-x86-low.c.
11724         (linux-i386-low.o, linux-x86-64-low.o): Delete.
11725         (linux-x86-low.o): Add.
11726         * linux-x86-64-low.c: Delete.
11727         * linux-i386-low.c: Delete.
11728         * linux-x86-low.c: New file.
11729         * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
11730         linux-x86-low.o.
11731         (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
11732         linux-x86-low.o.
11733         (x86_64-linux srv_regobj): Add reg-i386-linux.o.
11734         * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
11735         (linux_child_pid_to_exec_file): New function.
11736         (elf_64_header_p, elf_64_file_p): New functions.
11737         (siginfo_fixup): New function.
11738         (linux_xfer_siginfo): New local inf_siginfo.  Call siginfo_fixup to
11739         give target a chance to convert layout.
11740         * linux-low.h (linux_target_ops): New member siginfo_fixup.
11741         (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
11742
11743 2009-05-07  Doug Evans  <dje@google.com>
11744
11745         * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
11746         (regsets_store_inferior_registers): Ditto.
11747
11748 2009-05-06  Pedro Alves  <pedro@codesourcery.com>
11749
11750         PR server/10048
11751
11752         * linux-low.c (must_set_ptrace_flags): Delete.
11753         (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
11754         of the global.
11755         (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here.  Set
11756         `lwp->must_set_ptrace_flags' instead.
11757         (linux_wait_for_event_1): Set ptrace options here.
11758         (linux_wait_1): ... not here.
11759
11760 2009-04-30  Doug Evans  <dje@google.com>
11761
11762         * inferiors.c (started_inferior_callback): New function.
11763         (attached_inferior_callback): New function.
11764         (have_started_inferiors_p, have_attached_inferiors_p): New functions.
11765         * server.c (print_started_pid, print_attached_pid): New functions.
11766         (detach_or_kill_for_exit): New function.
11767         (main): Call it instead of for_each_inferior (kill_inferior_callback).
11768         * server.h (have_started_inferiors_p): Declare.
11769         (have_attached_inferiors_p): Declare.
11770
11771         * inferiors.c (remove_process): Fix memory leak, free process.
11772         * linux-low.c (linux_remove_process): New function.
11773         (linux_kill): Call it instead of remove_process.
11774         (linux_detach, linux_wait_1): Ditto.
11775
11776 2009-04-19  Danny Backx  <dannybackx@users.sourceforge.net>
11777
11778         * configure.srv: Add x86 Windows CE target.
11779
11780 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
11781
11782         * inferiors.c (get_thread_process): Make global.
11783         * server.h (get_thread_process): Add prototype.
11784         * thread-db.c (find_one_thread): Use get_thread_process
11785         instead of current_process.
11786         (thread_db_get_tls_address): Do not crash if called when
11787         thread layer is not yet initialized.
11788
11789 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
11790
11791         * remote-utils.c (prepare_resume_reply): Null-terminate packet.
11792         * spu-low.c (current_tid): Rename to ...
11793         (current_ptid): ... this.
11794         (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
11795         spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
11796         ptid_get_lwp (current_ptid) instead of current_tid.
11797         (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
11798         instead of current_tid.  Use find_process_pid to verify pid
11799         argument is valid.  Pass proper argument to remove_process.
11800         (spu_thread_alive): Compare current_ptid instead of current_tid.
11801         (spu_resume): Likewise.
11802
11803 2009-04-02  Pedro Alves  <pedro@codesourcery.com>
11804
11805         * linux-low.c (usr_store_inferior_registers): Declare local `pid'
11806         variable.
11807
11808 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
11809
11810         Implement the multiprocess extensions, and add linux multiprocess
11811         support.
11812
11813         * server.h (ULONGEST): Declare.
11814         (struct ptid, ptid_t): New.
11815         (minus_one_ptid, null_ptid): Declare.
11816         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11817         (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
11818         (struct inferior_list_entry): Change `id' type from unsigned from
11819         to ptid_t.
11820         (struct sym_cache, struct breakpoint, struct
11821         process_info_private): Forward declare.
11822         (struct process_info): Declare.
11823         (current_process): Declare.
11824         (all_processes): Declare.
11825         (initialize_inferiors): Declare.
11826         (add_thread): Adjust to use ptid_t.
11827         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
11828         (add_process, remove_process, find_thread_pid): Declare.
11829         (find_inferior_id): Adjust to use ptid_t.
11830         (cont_thread, general_thread, step_thread): Change type to ptid_t.
11831         (multi_process): Declare.
11832         (push_event): Adjust to use ptid_t.
11833         (read_ptid, write_ptid): Declare.
11834         (prepare_resume_reply): Adjust to use ptid_t.
11835         (clear_symbol_cache): Declare.
11836         * inferiors.c (all_processes): New.
11837         (null_ptid, minus_one_ptid): New.
11838         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
11839         (ptid_get_tid, ptid_equal, ptid_is_pid): New.
11840         (add_thread): Change unsigned long to ptid.  Remove gdb_id
11841         parameter.  Adjust.
11842         (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
11843         (gdb_id_to_thread): Rename to ...
11844         (find_thread_pid): ... this.  Change unsigned long to ptid.
11845         (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
11846         (loaded_dll, pull_pid_from_list): Adjust.
11847         (add_process, remove_process, find_process_pid)
11848         (get_thread_process, current_process, initialize_inferiors): New.
11849         * target.h (struct thread_resume) <thread>: Change type to ptid_t.
11850         (struct target_waitstatus) <related_pid>: Ditto.
11851         (struct target_ops) <kill, detach>: Add `pid' argument.  Change
11852         return type to int.
11853         (struct target_ops) <join>: Add `pid' argument.
11854         (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
11855         (struct target_ops) <wait>: Add `ptid' field.  Change return type
11856         to ptid.
11857         (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
11858         (mywait): Add `ptid' argument.  Change return type to ptid_t.
11859         (target_pid_to_str): Declare.
11860         * target.c (set_desired_inferior): Adjust to use ptids.
11861         (mywait): Add new `ptid' argument.  Adjust.
11862         (target_pid_to_str): New.
11863         * mem-break.h (free_all_breakpoints): Declare.
11864         * mem-break.c (breakpoints): Delelete.
11865         (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
11866         (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
11867         to use per-process breakpoint list.
11868         (free_all_breakpoints): New.
11869         * remote-utils.c (struct sym_cache) <name>: Drop `const'.
11870         (symbol_cache, all_symbols_looked_up): Delete.
11871         (hexchars): New.
11872         (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
11873         read_ptid): New.
11874         (prepare_resume_reply): Change ptid argument's type from unsigned
11875         long to ptid_t.  Adjust.  Implement W;process and X;process.
11876         (free_sym_cache, clear_symbol_cache): New.
11877         (look_up_one_symbol): Adjust to per-process symbol cache.  *
11878         * server.c (cont_thread, general_thread, step_thread): Change type
11879         to ptid_t.
11880         (attached): Delete.
11881         (multi_process): New.
11882         (last_ptid): Change type to ptid_t.
11883         (struct vstop_notif) <ptid>: Change type to ptid_t.
11884         (queue_stop_reply, push_event): Change `ptid' argument's type to
11885         ptid_t.
11886         (discard_queued_stop_replies): Add `pid' argument.
11887         (start_inferior): Adjust to use ptids.  Adjust to mywait interface
11888         changes.  Don't reference the `attached' global.
11889         (attach_inferior): Adjust to mywait interface changes.
11890         (handle_query): Adjust to use ptids.  Parse GDB's qSupported
11891         features.  Handle and report "multiprocess+".  Handle
11892         "qAttached:PID".
11893         (handle_v_cont): Adjust to use ptids.  Adjust to mywait interface
11894         changes.
11895         (handle_v_kill): New.
11896         (handle_v_stopped): Adjust to use target_pid_to_str.
11897         (handle_v_requests): Allow multiple attaches and runs when
11898         multiprocess extensions are in effect.  Handle "vKill".
11899         (myresume): Adjust to use ptids.
11900         (queue_stop_reply_callback): Add `arg' parameter.  Handle it.
11901         (handle_status): Adjust to discard_queued_stop_replies interface
11902         change.
11903         (first_thread_of, kill_inferior_callback)
11904         (detach_or_kill_inferior_callback, join_inferiors_callback): New.
11905         (main): Call initialize_inferiors.  Adjust to use ptids, killing
11906         and detaching from all inferiors.  Handle multiprocess packet
11907         variants.
11908         * linux-low.h: Include gdb_proc_service.h.
11909         (struct process_info_private): New.
11910         (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
11911         <lwpid_of>: Use ptid_get_lwp.
11912         (get_lwp_thread): Adjust.
11913         (struct lwp_info): Add `dead' member.
11914         (find_lwp_pid): Declare.
11915         * linux-low.c (thread_db_active): Delete.
11916         (new_inferior): Adjust comment.
11917         (inferior_pid): Delete.
11918         (linux_add_process): New.
11919         (handle_extended_wait): Adjust.
11920         (add_lwp): Change unsigned long to ptid.
11921         (linux_create_inferior): Add process to processes table.  Adjust
11922         to use ptids.  Don't set new_inferior here.
11923         (linux_attach_lwp): Rename to ...
11924         (linux_attach_lwp_1): ... this.  Add `initial' argument.  Handle
11925         it.  Adjust to use ptids.
11926         (linux_attach_lwp): New.
11927         (linux_attach): Add process to processes table.  Don't set
11928         new_inferior here.
11929         (struct counter): New.
11930         (second_thread_of_pid_p, last_thread_of_process_p): New.
11931         (linux_kill_one_lwp): Add `args' parameter.  Handle it.  Adjust to
11932         multiple processes.
11933         (linux_kill): Add `pid' argument.  Handle it.  Adjust to multiple
11934         processes.  Remove process from process table.
11935         (linux_detach_one_lwp): Add `args' parameter.  Handle it.  Adjust
11936         to multiple processes.
11937         (any_thread_of): New.
11938         (linux_detach): Add `pid' argument, and handle it.  Remove process
11939         from processes table.
11940         (linux_join): Add `pid' argument.  Handle it.
11941         (linux_thread_alive): Change unsighed long argument to ptid_t.
11942         Consider dead lwps as not being alive.
11943         (status_pending_p): Rename `dummy' argument to `arg'.  Filter out
11944         threads we're not interested in.
11945         (same_lwp, find_lwp_pid): New.
11946         (linux_wait_for_lwp): Change `pid' argument's type from int to
11947         ptid_t.  Adjust.
11948         (linux_wait_for_event): Rename to ...
11949         (linux_wait_for_event_1): ... this.  Change `pid' argument's type
11950         from int to ptid_t.  Adjust.
11951         (linux_wait_for_event): New.
11952         (linux_wait_1): Add `ptid' argument.  Change return type to
11953         ptid_t.  Adjust.  Use last_thread_of_process_p.  Remove processes
11954         that exit from the process table.
11955         (linux_wait): Add `ptid' argument.  Change return type to ptid_t.
11956         Adjust.
11957         (mark_lwp_dead): New.
11958         (wait_for_sigstop): Adjust to use ptids.  If a process exits while
11959         stopping all threads, mark its main lwp as dead.
11960         (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11961         ptids.
11962         (fetch_register, usr_store_inferior_registers)
11963         (regsets_fetch_inferior_registers)
11964         (regsets_store_inferior_registers, linux_read_memory)
11965         (linux_write_memory): Inline `inferior_pid'.
11966         (linux_look_up_symbols): Adjust to use per-process
11967         `thread_db_active'.
11968         (linux_request_interrupt): Adjust to use ptids.
11969         (linux_read_auxv): Inline `inferior_pid'.
11970         (initialize_low): Don't reference thread_db_active.
11971         * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11972         * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11973         (ps_getpid): Return the pid of the current inferior.
11974         * thread-db.c (proc_handle, thread_agent): Delete.
11975         (thread_db_create_event, thread_db_enable_reporting): Adjust to
11976         per-process data.
11977         (find_one_thread): Change argument type to ptid_t.  Adjust to
11978         per-process data.
11979         (maybe_attach_thread): Adjust to per-process data and ptids.
11980         (thread_db_find_new_threads): Ditto.
11981         (thread_db_init): Ditto.
11982         * spu-low.c (spu_create_inferior, spu_attach): Add process to
11983         processes table.  Adjust to use ptids.
11984         (spu_kill, spu_detach): Adjust interface.  Remove process from
11985         processes table.
11986         (spu_join, spu_thread_alive): Adjust interface.
11987         (spu_wait): Adjust interface.  Remove process from processes
11988         table.  Adjust to use ptids.
11989         * win32-low.c (current_inferior_tid): Delete.
11990         (current_inferior_ptid): New.
11991         (debug_event_ptid): New.
11992         (thread_rec): Take a ptid.  Adjust.
11993         (child_add_thread): Add `pid' argument.  Adjust to use ptids.
11994         (child_delete_thread): Ditto.
11995         (do_initial_child_stuff): Add `attached' argument.  Add process to
11996         processes table.
11997         (child_fetch_inferior_registers, child_store_inferior_registers):
11998         Adjust.
11999         (win32_create_inferior): Pass 0 to do_initial_child_stuff.
12000         (win32_attach): Pass 1 to do_initial_child_stuff.
12001         (win32_kill): Adjust interface.  Remove process from processes
12002         table.
12003         (win32_detach): Ditto.
12004         (win32_join): Adjust interface.
12005         (win32_thread_alive): Take a ptid.
12006         (win32_resume): Adjust to use ptids.
12007         (get_child_debug_event): Ditto.
12008         (win32_wait): Adjust interface.  Remove exiting process from
12009         processes table.
12010
12011 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
12012
12013         Non-stop mode support.
12014
12015         * server.h (non_stop): Declare.
12016         (gdb_client_data, handler_func): Declare.
12017         (delete_file_handler, add_file_handler, start_event_loop):
12018         Declare.
12019         (handle_serial_event, handle_target_event, push_event)
12020         (putpkt_notif): Declare.
12021         * target.h (enum resume_kind): New.
12022         (struct thread_resume): Replace `step' field by `kind' field.
12023         (TARGET_WNOHANG): Define.
12024         (struct target_ops) <wait>: Add `options' argument.
12025         <supports_non_stop, async, start_non_stop>: New fields.
12026         (target_supports_non_stop, target_async): New.
12027         (start_non_stop): Declare.
12028         (mywait): Add `options' argument.
12029         * target.c (mywait): Add `options' argument.  Print child exit
12030         notifications here.
12031         (start_non_stop): New.
12032         * server.c (non_stop, own_buf, mem_buf): New globals.
12033         (struct vstop_notif): New.
12034         (notif_queue): New global.
12035         (queue_stop_reply, push_event, discard_queued_stop_replies)
12036         (send_next_stop_reply): New.
12037         (start_inferior): Adjust to use resume_kind.  Adjust to mywait
12038         interface changes.
12039         (attach_inferior): In non-stop mode, don't wait for the target
12040         here.
12041         (handle_general_set): Handle QNonStop.
12042         (handle_query): When handling qC, return the current general
12043         thread, instead of the first thread of the list.
12044         (handle_query): If the backend supports non-stop mode, include
12045         QNonStop+ in the qSupported query response.
12046         (handle_v_cont): Adjust to use resume_kind.  Handle resume_stop
12047         and non-stop mode.
12048         (handle_v_attach, handle_v_run): Handle non-stop mode.
12049         (handle_v_stopped): New.
12050         (handle_v_requests): Report support for vCont;t.  Handle vStopped.
12051         (myresume): Adjust to use resume_kind.  Handle non-stop.
12052         (queue_stop_reply_callback): New.
12053         (handle_status): Handle non-stop mode.
12054         (main): Clear non_stop flag on reconnection.  Use the event-loop.
12055         Refactor serial protocol handling from here ...
12056         (process_serial_event): ... to this new function.  When GDB
12057         selects any thread, select one here.  In non-stop mode, wait until
12058         GDB acks all pending events before exiting.
12059         (handle_serial_event, handle_target_event): New.
12060         * remote-utils.c (remote_open): Install remote_desc in the event
12061         loop.
12062         (remote_close): Remove remote_desc from the event loop.
12063         (putpkt_binary): Rename to...
12064         (putpkt_binary_1): ... this.  Add `is_notic' argument.  Handle it.
12065         (putpkt_binary): New as wrapper around putpkt_binary_1.
12066         (putpkt_notif): New.
12067         (prepare_resume_reply): In non-stop mode, don't change the
12068         general_thread.
12069         * event-loop.c: New.
12070         * Makefile.in (OBJ): Add event-loop.o.
12071         (event-loop.o): New rule.
12072
12073         * linux-low.h (pid_of): Moved here.
12074         (lwpid_of): New.
12075         (get_lwp_thread): Use lwpid_of.
12076         (struct lwp_info): Delete `lwpid' field.  Add `suspended' field.
12077         * linux-low.c (pid_of): Delete.
12078         (inferior_pid): Use lwpid_of.
12079         (linux_event_pipe): New.
12080         (target_is_async_p): New.
12081         (delete_lwp): New.
12082         (handle_extended_wait): Use lwpid_of.
12083         (add_lwp): Don't set lwpid field.
12084         (linux_attach_lwp): Adjust debug output.  Use lwpid_of.
12085         (linux_kill_one_lwp): If killing a running lwp, stop it first.
12086         Use lwpid_of.  Adjust to linux_wait_for_event interface changes.
12087         (linux_detach_one_lwp): If detaching from a running lwp, stop it
12088         first.  Adjust to linux_wait_for_event interface changes.  Use
12089         lwpid_of.
12090         (linux_detach): Don't delete the main lwp here.
12091         (linux_join): Use my_waitpid.  Avoid signal_pid.  Use lwpid_of.
12092         (status_pending_p): Don't consider explicitly suspended lwps.
12093         (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
12094         pointer.  Add OPTIONS argument.  Change return type to int.  Use
12095         my_waitpid instead of sleeping.  Handle WNOHANG.  Use lwpid_of.
12096         (linux_wait_for_event): Take an integer pid instead of a lwp_info
12097         pointer.  Add status pointer argument.  Return a pid instead of a
12098         status.  Use lwpid_of.  Adjust to linux_wait_for_lwp interface
12099         changes.  In non-stop mode, don't switch to a random thread.
12100         (linux_wait): Rename to...
12101         (linux_wait_1): ... this.  Add target_options argument, and handle
12102         it.  Adjust to use resume_kind.  Use lwpid_of.  In non-stop mode,
12103         don't handle the continue thread.  Handle TARGET_WNOHANG.  Merge
12104         clean exit and signal exit code.  Don't stop all threads in
12105         non-stop mode.  In all-stop mode, only stop all threads when
12106         reporting a stop to GDB.  Handle explicit thread stop requests.
12107         (async_file_flush, async_file_mark): New.
12108         (linux_wait): New.
12109         (send_sigstop): Use lwpid_of.
12110         (wait_for_sigstop): Use lwpid_of.  Adjust to linux_wait_for_event
12111         interface changes.  In non-stop mode, don't switch to a random
12112         thread.
12113         (linux_resume_one_lwp): Use lwpid_of.
12114         (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
12115         (linux_resume_one_thread): ... this.  Handle resume_stop.  In
12116         non-stop mode, don't look for pending flag in all threads.
12117         (resume_status_pending_p): Don't consider explicitly suspended
12118         threads.
12119         (my_waitpid): Reimplement.  Emulate __WALL.
12120         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12121         Use lwpid_of.
12122         (sigchld_handler, linux_supports_non_stop, linux_async)
12123         (linux_start_non_stop): New.
12124         (linux_target_ops): Register linux_supports_non_stop, linux_async
12125         and linux_start_non_stop.
12126         (initialize_low): Install SIGCHLD handler.
12127         * thread-db.c (thread_db_create_event, find_one_thread)
12128         (thread_db_get_tls_address): Use lwpid_of.
12129         * win32-low.c (win32_detach): Adjust to use resume_kind.
12130         (win32_wait): Add `options' argument.
12131         * spu-low.c (spu_resume): Adjust to use resume_kind.
12132         (spu_wait): Add `options' argument.
12133
12134 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
12135
12136         Decouple target code from remote protocol.
12137
12138         * target.h (enum target_waitkind): New.
12139         (struct target_waitstatus): New.
12140         (struct target_ops) <wait>: Return an unsigned long.  Take a
12141         target_waitstatus pointer instead of a char pointer.
12142         (mywait): Likewise.
12143         * target.c (mywait): Change prototype to return an unsigned long.
12144         Take a target_waitstatus pointer instead of a char pointer.  Adjust.
12145         * server.h (thread_from_wait, old_thread_from_wait): Delete
12146         declarations.
12147         (prepare_resume_reply): Change prototype to take a
12148         target_waitstatus.
12149         * server.c (thread_from_wait, old_thread_from_wait): Delete.
12150         (last_status, last_ptid): New.
12151         (start_inferior): Remove "statusptr" argument.  Adjust.  Return a
12152         pid instead of a signal.
12153         (attach_inferior): Remove "status" and "signal" parameters.
12154         Adjust.
12155         (handle_query): For qGetTLSAddr, parse the thread id with strtol,
12156         not as an address.
12157         (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
12158         (handle_v_requests, myresume): Remove "status" and "signal"
12159         parameters.  Adjust.
12160         (handle_status): New.
12161         (main): Delete local `status'.  Adjust.
12162         * remote-utils.c: Include target.h.
12163         (prepare_resume_reply): Change prototype to take a
12164         target_waitstatus.  Adjust.
12165
12166         * linux-low.c (linux_wait): Adjust to new target_ops->wait
12167         interface.
12168         * spu-low.c (spu_wait): Adjust.
12169         * win32-low.c (enum target_waitkind, struct target_waitstatus):
12170         Delete.
12171         (win32_wait): Adjust.
12172
12173 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
12174
12175         * target.h (struct thread_resume): Delete leave_stopped member.
12176         (struct target_ops): Add a `n' argument to the `resume' callback.
12177         * server.c (start_inferior): Adjust.
12178         (handle_v_cont, myresume): Adjust.
12179         * linux-low.c (check_removed_breakpoint): Adjust to resume
12180         interface change, and to removed leave_stopped field.
12181         (resume_ptr): Delete.
12182         (struct thread_resume_array): New.
12183         (linux_set_resume_request): Add new `arg' parameter.  Adjust to
12184         resume interface change.
12185         (linux_continue_one_thread, linux_queue_one_thread)
12186         (resume_status_pending_p): Check if the resume field is NULL
12187         instead of checking the leave_stopped member.
12188         (linux_resume): Adjust to the target resume interface change.
12189         * spu-low.c (spu_resume): Adjust to the target resume interface
12190         change.
12191         * win32-low.c (win32_detach, win32_resume): Ditto.
12192
12193 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
12194
12195         * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
12196         flag.
12197         (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
12198         pending.
12199         (linux_continue_one_thread): Only preserve the stepping flag if
12200         there's a pending breakpoint.
12201
12202 2009-03-31  Pedro Alves  <pedro@codesourcery.com>
12203
12204         * server.c (main): After the inferior having exited, call
12205         remote_close before exiting gdbserver.
12206
12207 2009-03-25  Thiago Jung Bauermann  <bauerman@br.ibm.com>
12208
12209         Fix size of FPSCR in Power 7 processors.
12210         * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
12211         (PPC_FEATURE_HAS_DFP): New #define.
12212         (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
12213         size of the FPSCR.
12214
12215 2009-03-23  Pedro Alves  <pedro@codesourcery.com>
12216
12217         * server.c (handle_query) Whitespace and formatting.
12218
12219 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
12220
12221         * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
12222         linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
12223         linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
12224         linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
12225         regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
12226         thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
12227         Makefile.in, configure.ac: Fix whitespace throughout.
12228         * configure: Regenerate.
12229
12230 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
12231
12232         * inferiors.c (find_inferior): Make it safe for the callback
12233         function to delete the currently iterated inferior.
12234
12235 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
12236
12237         * Makefile.in (linuw_low_h): Move higher.
12238         (thread-db.o): Depend on $(linux_low_h).
12239
12240 2009-03-17  Pedro Alves  <pedro@codesourcery.com>
12241
12242         Rename "process" to "lwp" throughout.
12243
12244         * linux-low.c (all_processes): Rename to...
12245         (all_lwps): ... this.
12246         (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
12247         (add_process): Rename to ...
12248         (add_lwp): ... this.  Adjust.
12249         (linux_create_inferior): Adjust.
12250         (linux_attach_lwp): Adjust.
12251         (linux_attach): Adjust.
12252         (linux_kill_one_process): Rename to ...
12253         (linux_kill_one_lwp): ... this.  Adjust.
12254         (linux_kill): Adjust.
12255         (linux_detach_one_process): Rename to ...
12256         (linux_detach_one_lwp): ... this.  Adjust.
12257         (linux_detach): Adjust.
12258         (check_removed_breakpoint): Adjust.
12259         (status_pending_p): Adjust.
12260         (linux_wait_for_process): Rename to ...
12261         (linux_wait_for_lwp): ... this.  Adjust.
12262         (linux_wait_for_event): Adjust.
12263         (send_sigstop): Adjust.
12264         (wait_for_sigstop): Adjust.
12265         (stop_all_processes): Rename to ...
12266         (stop_all_lwps): ... this.
12267         (linux_resume_one_process): Rename to ...
12268         (linux_resume_one_lwp): ... this.  Adjust.
12269         (linux_set_resume_request, linux_continue_one_thread)
12270         (linux_queue_one_thread, resume_status_pending_p)
12271         (usr_store_inferior_registers, regsets_store_inferior_registers)
12272         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
12273         Adjust.
12274         * linux-low.h (get_process): Rename to ...
12275         (get_lwp): ... this.  Adjust.
12276         (get_thread_process): Rename to ...
12277         (get_thread_lwp): ... this.  Adjust.
12278         (get_process_thread): Rename to ...
12279         (get_lwp_thread): ... this.  Adjust.
12280         (struct process_info): Rename to ...
12281         (struct lwp_info): ... this.
12282         (all_processes): Rename to ...
12283         (all_lwps): ... this.
12284         * proc-service.c (ps_lgetregs): Adjust.
12285         * thread-db.c (thread_db_create_event, find_one_thread)
12286         (maybe_attach_thread, thread_db_get_tls_address): Adjust.
12287
12288 2009-03-14  Pedro Alves  <pedro@codesourcery.com>
12289
12290         * server.c (handle_query): Handle "qAttached".
12291
12292 2009-03-13  Nathan Sidwell  <nathan@codesourcery.com>
12293
12294         * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
12295         GPLv3, update license URL.
12296
12297 2009-03-01  Doug Evans  <dje@google.com>
12298
12299         * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
12300         (server_h): Add gdb_signals.h.
12301         (signals.o): Update.
12302         * server.h (target_signal_from_host,target_signal_to_host_p)
12303         (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
12304
12305 2009-02-14  Pierre Muller  <muller@ics.u-strasbg.fr>
12306
12307         * remote-utils.c (getpkt): Also generate remote-debug
12308         information if noack_mode is set.
12309
12310 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
12311
12312         * server.c (handle_query): Report qXfer:siginfo:read and
12313         qXfer:siginfo:write as supported and handle them.
12314         * target.h (struct target_ops) <qxfer_siginfo>: New field.
12315         * linux-low.c (linux_xfer_siginfo): New.
12316         (linux_target_ops): Set it.
12317
12318 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
12319
12320         * server.c (gdbserver_usage): Mention --remote-debug.
12321         (main): Accept '--remote-debug' switch.
12322
12323 2009-01-18  Doug Evans  <dje@google.com>
12324
12325         * regcache.c (new_register_cache): No need to check result of xcalloc.
12326         * server.c (handle_search_memory): Back out calls to xmalloc,
12327         result is checked and error is returned to user upon failure.
12328         (handle_query): Ditto.  Add more checks for result of malloc.
12329         (handle_v_cont): Check result of malloc, report error back to
12330         user upon failure.
12331         (handle_v_run): Ditto.  Call freeargv.
12332         * server.h (freeargv): Declare.
12333         * utils.c (freeargv): New fn.
12334
12335 2009-01-15  Doug Evans  <dje@google.com>
12336
12337         * gdbreplay.c (perror_with_name): Make arg const char *.
12338         * server.h (target_signal_to_name): Make return type const char *.
12339         * thread-db.c (thread_db_err_str): Make return type const char *.
12340         * utils.c (perror_with_name): Make arg const char *.
12341
12342 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
12343
12344         * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
12345         when handling a EXIT_PROCESS_DEBUG_EVENT.
12346
12347 2009-01-06  Joel Brobecker  <brobecker@adacore.com>
12348
12349         * gdbreplay.c (gdbreplay_version): Update copyright year.
12350         * server.c (gdbserver_version): Likewise.
12351
12352 2009-01-05  Doug Evans  <dje@google.com>
12353
12354         * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
12355         (handle_extended_wait): Improve comment.
12356
12357 2008-12-13  Doug Evans  <dje@google.com>
12358
12359         * utils.c (xmalloc,xcalloc,xstrdup): New fns.
12360         * server.h (ATTR_MALLOC): New macro.
12361         (xmalloc,xcalloc,xstrdup): Declare.
12362         * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
12363         * inferiors.c: Ditto.
12364         * linux-low.c: Ditto.
12365         * mem-break.c: Ditto.
12366         * regcache.c: Ditto.
12367         * remote-utils.c: Ditto.
12368         * server.c: Ditto.
12369         * target.c: Ditto.
12370         * win32-low.c: Ditto.
12371
12372 2008-12-12  Doug Evans  <dje@google.com>
12373
12374         * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
12375         in debugging printf.
12376
12377         * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
12378
12379 2008-12-09  Doug Evans  <dje@google.com>
12380
12381         * linux-low.h (struct process_info): Delete member tid, unused.
12382         * thread-db.c (find_one_thread): Update.
12383         (maybe_attach_thread): Update.
12384
12385 2008-12-02  Pedro Alves  <pedro@codesourcery.com>
12386
12387         * target.h (struct target_ops): Add qxfer_osdata member.
12388         * linux-low.c: Include ctype.h and pwd.h and sys/types.h
12389         and dirent.h.
12390         (linux_qxfer_osdata): New functions.
12391         (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
12392         callback.
12393         * server.c (handle_query): Handle "qXfer:osdata:read:".
12394         * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
12395         (buffer_xml_printf): New functions.
12396         * server.h (struct buffer): New.
12397         (buffer_grow_str, buffer_grow_str0): New macros.
12398         (buffer_grow, buffer_free, buffer_init, buffer_finish)
12399         (buffer_xml_printf): Declare.
12400
12401 2008-11-24  Doug Evans  <dje@google.com>
12402
12403         * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
12404
12405 2008-11-24  Daniel Jacobowitz  <dan@codesourcery.com>
12406
12407         * server.c (handle_v_run): Always use the supplied argument list.
12408
12409 2008-11-19  Bob Wilson  <bob.wilson@acm.org>
12410
12411         * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
12412         (xtensa_regmap_table): Add entry for scompare1.
12413
12414 2008-11-18  Thiago Jung Bauermann  <bauerman@br.ibm.com>
12415
12416         * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
12417         powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
12418         powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
12419         powerpc-isa205-64l.o, powerpc-isa205-64l.c,
12420         powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
12421         powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
12422         * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
12423         XML target descriptions.
12424         * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
12425         when inferior is running on an ISA 2.05 or later processor.  Add
12426         special case to return offset for full 64-bit slot of FPSCR when
12427         in 32-bits.
12428
12429 2008-11-14  Daniel Gutson  <dgutson@codesourcery.com>
12430
12431         * Makefile.in (SFILES, clean): Added sparc64 files.
12432         (reg-sparc64.o, reg-sparc64.c): New.
12433         * configure.srv (sparc*-*-linux*): New configuration.
12434         * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
12435         syscall arguments for SPARC.
12436         (regsets_store_inferior_registers): Likewise.
12437         * linux-sparc-low.c: New file.
12438
12439 2008-10-21  Doug Evans  <dje@google.com>
12440
12441         * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
12442         (READLINE_DIR,READLINE_DEP): Delete.
12443         (INTERNAL_CFLAGS): Update.
12444         (LINTFLAGS): Update.
12445
12446 2008-10-10  Pedro Alves  <pedro@codesourcery.com>
12447
12448         * server.c (handle_v_run): If GDB didn't specify an argv, use the
12449         whole argv from the last run, not just argv[0].
12450
12451 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
12452
12453         * regcache.c (new_register_cache): Return NULL if the register
12454         cache size isn't known yet.
12455         (free_register_cache): Avoid dereferencing a NULL regcache.
12456
12457 2008-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
12458
12459         * configure.srv: Merge MIPS and MIPS64.
12460
12461 2008-08-24  Maciej W. Rozycki  <macro@linux-mips.org>
12462
12463         * Makefile.in (uninstall): Apply $(EXEEXT) too.
12464
12465 2008-08-18  Luis Machado  <luisgpm@br.ibm.com>
12466
12467         * Makefile.in: Add required vsx dependencies.
12468
12469         * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
12470         Declare init_registers_powerpc_vsx32l.
12471         Declare init_registers_powerpc_vsx64l.
12472         Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
12473         (ppc_arch_setup): Check for VSX in hwcap.
12474         (ppc_fill_vsxregset): New function.
12475         (ppc_store_vsxregset): New function.
12476         Add new VSX entry in regset_info target_regsets.
12477
12478         * configure.srv: Add new VSX dependencies.
12479
12480 2008-08-12  Pedro Alves  <pedro@codesourcery.com>
12481
12482         * remote-utils.c (noack_mode, transport_is_reliable): New globals.
12483         (remote_open): Set or clear transport_is_reliable.
12484         (putpkt_binary): Don't expect acks in noack mode.
12485         (getpkt): Don't send ack/nac in noack mode.
12486         * server.c (handle_general_set): Handle QStartNoAckMode.
12487         (handle_query): If connected by tcp pass QStartNoAckMode+ in
12488         qSupported.
12489         (main): Reset noack_mode on every connection.
12490         * server.h (noack_mode): Declare.
12491
12492 2008-08-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
12493
12494         * Makefile.in (GDBREPLAY_OBS): New variable.
12495         (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
12496
12497 2008-08-05  Ulrich Weigand  <uweigand@de.ibm.com>
12498             Daniel Jacobowitz  <dan@codesourcery.com>
12499
12500         * linux-low.c (linux_resume_one_process): Ignore ESRCH.
12501         (usr_store_inferior_registers): Likewise.
12502         (regsets_store_inferior_registers): Likewise.
12503
12504 2008-07-31  Rolf Jansen  <rj@surtec.com>
12505             Pedro Alves  <pedro@codesourcery.com>
12506
12507         * configure.ac: Check for memmem declaration.
12508         * server.c [HAVE_MALLOC_H]: Include malloc.h.
12509         (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
12510         (disable_packet_qfThreadInfo): Unconditionally compile.
12511         * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
12512         * configure, config.in: Regenerate.
12513
12514 2008-07-28  Doug Kwan  <dougkwan@google.com>
12515
12516         * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
12517         (linux_write_memory): Remove declaration of errno.
12518
12519 2008-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
12520
12521         * linux-low.c (handle_extended_wait): Do not use "status"
12522         variable uninitialized.
12523
12524 2008-07-07  Pedro Alves  <pedro@codesourcery.com>
12525
12526         * server.c (handle_v_attach): Inhibit reporting dll changes.
12527
12528 2008-06-27  Pedro Alves  <pedro@codesourcery.com>
12529
12530         * remote-utils.c (prepare_resume_reply): If requested, don't
12531         output "thread:TID" in the T stop reply.
12532
12533         * server.c (disable_packet_vCont, disable_packet_Tthread)
12534         (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
12535         (handle_query): If requested, disable support for qC, qfThreadInfo
12536         and qsThreadInfo.
12537         (handle_v_requests): If requested, disable support for vCont.
12538         (gdbserver_show_disableable): New.
12539         (main): Handle --disable-packet and --disable-packet=LIST.
12540
12541         * server.h (disable_packet_vCont, disable_packet_Tthread)
12542         (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
12543
12544 2008-06-20  Carlos O'Donell  <carlos@codesourcery.com>
12545
12546         * server.c (gdbserver_usage): Mention --version.
12547
12548 2008-06-06  Daniel Jacobowitz  <dan@codesourcery.com>
12549
12550         * Makefile.in (gdbreplay.o): New rule.
12551
12552 2008-06-06  Joseph Myers  <joseph@codesourcery.com>
12553
12554         * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
12555         message, not gdbserver.
12556
12557 2008-06-05  Vladimir Prus  <vladimir@codesourcery.com>
12558             Nathan Sidwell  <nathan@codesourcery.com>
12559             Joseph Myers  <joseph@codesourcery.com>
12560
12561         * acinclude.m4: Include ../../config/acx.m4.
12562         * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
12563         * configure, config.in: Regenerate.
12564         * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
12565         * server.c (gdbserver_version): Print PKGVERSION.
12566         (gdbsrever_usage): Add stream parameter.  Print REPORT_BUGS_TO.
12567         (main): Adjust gdbserver_usage calls.
12568         * gdbreplay.c (version, host_name): Add declarations.
12569         (gdbreplay_version, gdbreplay_usage): New.
12570         (main): Accept --version and --help options.
12571
12572 2008-06-04  Daniel Jacobowitz  <dan@codesourcery.com>
12573
12574         * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
12575         (arm_breakpoint_at): Handle Thumb.
12576         (the_low_target): Add comment.
12577
12578 2008-05-29  Ulrich Weigand  <uweigand@de.ibm.com>
12579
12580         * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
12581
12582 2008-05-09  Doug Evans  <dje@google.com>
12583
12584         * server.h (decode_search_memory_packet): Declare.
12585         * remote-utils.c (decode_search_memory_packet): New fn.
12586         * server.c (handle_search_memory_1): New fn.
12587         (handle_search_memory): New fn.
12588         (handle_query): Process qSearch:memory packets.
12589
12590 2008-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
12591
12592         * regcache.c (registers_length): Remove.
12593         (set_register_cache): Verify that PBUFSIZ is large enough to hold a
12594         full register packet.
12595         * regcache.h (registers_length): Remove prototype.
12596         * server.h (PBUFSIZ): Define to 16384.
12597
12598 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
12599
12600         * configure.srv (powerpc*-*-linux*): Set srv_regobj to
12601         powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
12602         powerpc-64l.o, and powerpc-altivec64l.o.
12603         Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
12604         rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
12605         rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
12606         rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
12607         rs6000/power-linux.xml, and rs6000/power64-linux.xml
12608         to srv_xmlfiles.
12609
12610         * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
12611         (powerpc-32l.o, powerpc-32l.c): ... these new rules.
12612         (powerpc-32.o, powerpc-32.c): Remove, replace by ...
12613         (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
12614         (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
12615         (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
12616         (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
12617         (powerpc-64l.o, powerpc-64l.c): ... these new rules.
12618         (powerpc-64.o, powerpc-64.c): Remove, replace by ...
12619         (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
12620         (clean): Update.
12621
12622         * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
12623         (init_registers_powerpc_32l): ... this new prototype.
12624         (init_registers_powerpc_32): Remove, replace by ...
12625         (init_registers_powerpc_altivec32l): ... this new prototype.
12626         (init_registers_powerpc_e500): Remove, replace by ...
12627         (init_registers_powerpc_e500l): ... this new prototype.
12628         (init_registers_ppc64): Remove, replace by ...
12629         (init_registers_powerpc_64l): ... this new prototype.
12630         (init_registers_powerpc_64): Remove, replace by ...
12631         (init_registers_powerpc_altivec64l): ... this new prototype.
12632         (ppc_num_regs): Set to 73.
12633         (PT_ORIG_R3, PT_TRAP): Define if necessary.
12634         (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
12635         (ppc_cannot_store_register): Handle orig_r3 and trap.
12636         (ppc_arch_setup): Update init_registers_... calls.
12637         (ppc_fill_gregset): Handle orig_r3 and trap.
12638
12639         * inferiors.c (clear_inferiors): Reset current_inferior.
12640
12641 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
12642
12643         * acinclude.m4: Add override.m4.
12644         * configure: Regenerate.
12645
12646 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
12647
12648         * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
12649         initial call to init_register_ppc64.
12650
12651 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
12652
12653         * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
12654         single powerpc*-*-linux* case.
12655         (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
12656
12657 2008-04-17  Ulrich Weigand  <uweigand@de.ibm.com>
12658
12659         * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
12660         srv_regobj.  Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
12661         from reg_xmlfiles.
12662         * linux-ppc-low.c: Include <elf.h>.
12663         (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
12664         (ppc_hwcap): New global variable.
12665         (ppc_regmap): Remove __SPE__ #ifdef sections.
12666         (ppc_regmap_e500): New global variable.
12667         (ppc_cannot_store_register): Update __SPE__ special case.
12668         (ppc_get_hwcap): New function.
12669         (ppc_arch_setup): Use it to determine whether inferior supports
12670         AltiVec or SPE registers.  Set the_low_target.regmap if appropriate.
12671         (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
12672         Do not access registers if target does not support AltiVec.
12673         (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
12674         Do not access registers if target does not support SPE.
12675         (target_regsets): Unconditionally include AltiVec and SPE regsets.
12676
12677 2008-04-17  Daniel Jacobowitz  <dan@codesourcery.com>
12678
12679         * linux-low.c (disabled_regsets, num_regsets): New.
12680         (use_regsets_p): Delete.
12681         (linux_wait_for_process): Clear disabled_regsets.
12682         (regsets_fetch_inferior_registers): Check and set it.
12683         (regsets_store_inferior_registers): Likewise.
12684         (linux_fetch_registers, linux_store_registers): Do not use
12685         use_regsets_p.
12686         (initialize_low): Allocate disabled_regsets.
12687
12688 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
12689
12690         * Makefile.in (LIBOBJS): New.
12691         (OBS): Use LIBOBJS.
12692         (memmem.o): New rule.
12693         * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
12694         * configure: Regenerated.
12695
12696 2008-04-04  Ulrich Weigand  <uweigand@de.ibm.com>
12697
12698         * server.c (handle_query): Never return "unsupported" for
12699         qXfer:features:read queries.
12700
12701 2008-03-27  Ulrich Weigand  <uweigand@de.ibm.com>
12702
12703         * server.c (get_features_xml): Fix inverted condition.
12704         (handle_query): Always support qXfer:feature:read.
12705
12706 2008-03-10  Daniel Jacobowitz  <dan@codesourcery.com>
12707
12708         * server.c (wrapper_argv): New.
12709         (start_inferior): Handle wrapper_argv.  If set, expect an extra
12710         trap.
12711         (gdbserver_usage): Document --wrapper.
12712         (main): Parse --wrapper.
12713
12714 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
12715
12716         * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
12717         powerpc-*-linux* to srv_regobj and reg_xmlfiles.
12718         * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
12719         (ppc_set_pc): Likewise.
12720         (ppc_arch_setup): New function.
12721         (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
12722         of collect_register.
12723         (the_low_target): Use ppc_arch_setup as arch_setup initializer.
12724
12725 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
12726
12727         * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
12728         instead of linux-ppc64-low.o.
12729         * linux-ppc64-low.c: Remove file.
12730         * Makefile.in (SFILES): Remove linux-ppc64-low.c.
12731         (linux-ppc64-low.o): Remove rule.
12732
12733         * linux-ppc-low.c (init_registers_ppc64): Add prototype.
12734         (init_registers_powerpc_64): Likewise.
12735         (ppc_regmap): Conditionally define depending on __powerpc64__.
12736         (ppc_cannot_store_register): Do not special-case "fpscr" when
12737         compiled on __powerpc64__.
12738         (ppc_collect_ptrace_register): New function.
12739         (ppc_supply_ptrace_register): New function.
12740         (ppc_breakpoint): Change type to "unsigned int".
12741         (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
12742         (the_low_target): Conditionally provide initializers for the
12743         arch_setup member depending on __powerpc64__.  Install
12744         collect_ptrace_register and supply_ptrace_register members.
12745
12746 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
12747
12748         * regcache.h (gdbserver_xmltarget): Add extern declaration.
12749         * server.c (gdbserver_xmltarget): Define.
12750         (get_features_xml): Use it to replace "target.xml" and arch_string.
12751
12752         * configure.srv: Remove srv_xmltarget.  Add XML files that were
12753         mentioned there to srv_xmlfiles instead.  Remove conditional tests
12754         on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
12755         srv_xmlfiles and srv_regobj to include all possible choices.
12756         * configure.ac (srv_xmltarget): Remove.
12757         (srv_xmlfiles): Do not add "target.xml".
12758         (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
12759         checks for supplementary target information.
12760         * configure: Regenerate.
12761         * Makefile.in (XML_TARGET): Remove.
12762         (target.xml): Remove rule.
12763         (clean): Do not clean up target.xml.
12764         (.PRECIOUS): Do not mention target.xml.
12765
12766         * target.h (struct target_ops): Remove arch_string member.
12767         * linux-low.c (linux_arch_string): Remove.
12768         (linux_target_ops): Remove arch_string initializer.
12769         * linux-low.h (struct linux_target_ops): Remove arch_string member.
12770         * linux-i386-low.c (the_low_target): Remove arch_string initializer.
12771         * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
12772         * spu-low.c (spu_arch_string): Remove.
12773         (spu_target_ops): Remove arch_string initializer.
12774         * win32-low.c (win32_arch_string): Remove.
12775         (win32_target_ops): Remove arch_string initializer.
12776         * win32-low.h (struct win32_target_ops): Remove arch_string member.
12777         * win32-arm-low.c (the_low_target): Remove arch_string initializer.
12778         * win32-i368-low.c (the_low_target): Remove arch_string initializer.
12779
12780 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
12781
12782         * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
12783         by collect_ptrace_register and supply_ptrace_register hooks.
12784         * linux-low.c (fetch_register): Use supply_ptrace_register callback
12785         instead of checking for the_low_target.left_pad_xfer.
12786         (usr_store_inferior_registers): Use collect_ptrace_register callback
12787         instead of checking for the_low_target.left_pad_xfer.
12788
12789         * linux-s390-low.c (s390_collect_ptrace_register): New function.
12790         (s390_supply_ptrace_register): Likewise.
12791         (s390_fill_gregset): Call s390_collect_ptrace_register.
12792         (the_low_target): Update.
12793
12794         * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
12795         (ppc_supply_ptrace_register): Likewise.
12796         (the_low_target): Update.
12797
12798         * linux-i386-low.c (the_low_target): Update.
12799         * linux-x86-64-low.c (the_low_target): Update.
12800
12801 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
12802
12803         * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
12804         reg-s390.o and reg-s390x.o.
12805
12806         * linux-low.c (new_inferior): New global variable.
12807         (linux_create_inferior, linux_attach): Set it.
12808         (linux_wait_for_process): Call the_low_target.arch_setup after the
12809         target has stopped for the first time.
12810         (initialize_low): Do not call the_low_target.arch_setup.
12811
12812         * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
12813         (s390_set_pc): Likewise.
12814         (s390_arch_setup): New function.
12815         (the_low_target): Use s390_arch_setup as arch_setup routine.
12816
12817         * regcache.c (realloc_register_cache): New function.
12818         (set_register_cache): Call it for each existing regcache.
12819
12820 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
12821
12822         * server.h (init_registers): Remove prototype.
12823
12824         * linux-low.h (struct linux_target_ops): Add arch_setup field.
12825         * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
12826         instead of init_registers ().
12827         * linux-arm-low.c (init_registers_arm): Add prototype.
12828         (init_registers_arm_with_iwmmxt): Likewise.
12829         (the_low_target): Add initializer for arch_setup field.
12830         * linux-cris-low.c (init_registers_cris): Add prototype.
12831         (the_low_target): Add initializer for arch_setup field.
12832         * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
12833         (the_low_target): Add initializer for arch_setup field.
12834         * linux-i386-low.c (init_registers_i386_linux): Add prototype.
12835         (the_low_target): Add initializer for arch_setup field.
12836         * linux-ia64-low.c (init_registers_ia64): Add prototype.
12837         (the_low_target): Add initializer for arch_setup field.
12838         * linux-m32r-low.c (init_registers_m32r): Add prototype.
12839         (the_low_target): Add initializer for arch_setup field.
12840         * linux-m68k-low.c (init_registers_m68k): Add prototype.
12841         (the_low_target): Add initializer for arch_setup field.
12842         * linux-mips-low.c (init_registers_mips_linux): Add prototype.
12843         (init_registers_mips64_linux): Likewise.
12844         (the_low_target): Add initializer for arch_setup field.
12845         * linux-ppc-low.c (init_registers_ppc): Add prototype.
12846         (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
12847         (the_low_target): Add initializer for arch_setup field.
12848         * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
12849         (init_registers_powerpc_64): Likewise.
12850         (the_low_target): Add initializer for arch_setup field.
12851         * linux-s390-low.c (init_registers_s390): Add prototype.
12852         (init_registers_s390x): Likewise.
12853         (the_low_target): Add initializer for arch_setup field.
12854         * linux-sh-low.c (init_registers_sh): Add prototype.
12855         (the_low_target): Add initializer for arch_setup field.
12856         * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
12857         (the_low_target): Add initializer for arch_setup field.
12858         * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
12859         (the_low_target): Add initializer for arch_setup field.
12860
12861         * win32-low.h (struct win32_target_ops): Add arch_setup field.
12862         * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
12863         instead of init_registers ().
12864         * win32-arm-low.c (init_registers_arm): Add prototype.
12865         (the_low_target): Add initializer for arch_setup field.
12866         * win32-i386-low.c (init_registers_i386): Add prototype.
12867         (the_low_target): Add initializer for arch_setup field.
12868
12869         * spu-low.c (init_registers_spu): Add prototype.
12870         (initialize_low): Call initialie_registers_spu () instead of
12871         initialize_registers ().
12872
12873 2008-02-19  Pedro Alves  <pedro@codesourcery.com>
12874
12875         * server.c (handle_v_requests): When handling the vRun and vAttach
12876         packets, if already debugging a process, don't kill it.  Return an
12877         error instead.
12878
12879 2008-02-17  Daniel Jacobowitz  <dan@codesourcery.com>
12880
12881         * server.c (handle_query): Correct length check.
12882
12883 2008-02-14  Pedro Alves  <pedro_alves@portugalmail.pt>
12884
12885         * win32-low.c (do_initial_child_stuff): Add process handle
12886         parameter.  Set current_process_handle and current_process_id from the
12887         parameters. Clear globals.
12888         (win32_create_inferior): Don't set current_process_handle and
12889         current_process_id here.  Instead pass them on the call to
12890         do_initial_child_stuff.
12891         (win32_attach): Likewise.
12892         (win32_clear_inferiors): New.
12893         (win32_kill): Don't close the current process handle or the
12894         current thread handle here.  Instead call win32_clear_inferiors.
12895         (win32_detach): Don't open a new handle to the process.  Call
12896         win32_clear_inferiors.
12897         (win32_join): Don't rely on current_process_handle; open a new
12898         handle using the process id.
12899         (win32_wait): Call win32_clear_inferiors when the inferior process
12900         has exited.
12901
12902 2008-02-14  Daniel Jacobowitz  <dan@codesourcery.com>
12903
12904         * server.c (monitor_show_help): Add "exit".
12905
12906 2008-02-11  Maxim Grigoriev  <maxim2405@gmail.com>
12907
12908         * Makefile.in (SFILES): Add linux-xtensa-low.c.
12909         (clean): Add reg-xtensa.c.
12910         (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
12911         * configure.srv (xtensa*-*-linux*) New target.
12912         * linux-xtensa-low.c: New.
12913         * xtensa-xtregs.c: New.
12914
12915 2008-02-01  Pedro Alves  <pedro_alves@portugalmail.pt>
12916
12917         * hostio.c: Don't include errno.h.
12918         (errno_to_fileio_errno): Move to hostio-errno.
12919         * hostio.c: (hostio_error): Remove the error parameter.  Defer the
12920         error number outputting to the target->hostio_last_error callback.
12921         (hostio_packet_error): Use FILEIO_EINVAL directly.
12922         (handle_open, handle_pread, hostio_error, handle_unlink): Update
12923         calls to hostio_error.
12924         * hostio-errno.c: New.
12925         * server.h (hostio_last_error_from_errno): Declare.
12926         * target.h (target_ops): Add hostio_last_error member.
12927         * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
12928         as hostio_last_error handler.
12929         * spu-low.c (spu_target_ops): Likewise.
12930         * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
12931         (wince_hostio_last_error): New functions.
12932         (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
12933         as hostio_last_error handler.
12934         (win32_target_ops) [!_WIN32_WCE]: Register
12935         hostio_last_error_from_errno as hostio_last_error handler.
12936         * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
12937         (hostio-errno.o): New rule.
12938         * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
12939         * configure.srv (srv_hostio_err_objs): New variable.  Default to
12940         hostio-errno.o.
12941         (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
12942         * configure: Regenerate.
12943
12944 2008-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
12945
12946         * linux-low.c (linux_attach_lwp): Do not _exit after errors.
12947         (linux_kill, linux_detach): Clean up the process list.
12948         * remote-utils.c (remote_open): Improve port number parsing.
12949         (putpkt_binary, input_interrupt): Only send interrupts if the target
12950         is running.
12951         * server.c (extended_protocol): Make static.
12952         (attached): Define earlier.
12953         (exit_requested, response_needed, program_argv): New variables.
12954         (target_running): New.
12955         (start_inferior): Clear attached here.
12956         (attach_inferior): Set attached here.
12957         (require_running): Define.
12958         (handle_query): Use require_running and target_running.  Implement
12959         "monitor exit".
12960         (handle_v_attach, handle_v_run): New.
12961         (handle_v_requests): Use require_running.  Handle vAttach and vRun.
12962         (gdbserver_usage): Update.
12963         (main): Redo argument parsing.  Handle --debug and --multi.  Handle
12964         --attach along with other options or after the port.  Save
12965         program_argv.  Support no initial program.  Resynchronize
12966         communication with GDB after an error.  Handle "monitor exit".
12967         Use require_running and target_running.  Always allow the extended
12968         protocol.  Do not error out for Hc0 or Hc-1.  Do not automatically
12969         restart in extended mode.
12970         * README: Refer to the GDB manual.  Update --attach usage.
12971
12972 2007-12-20  Andreas Schwab  <schwab@suse.de>
12973
12974         * linux-low.c (STACK_SIZE): Define.
12975         (linux_tracefork_child): Use it.  Use __clone2 on ia64.
12976         (linux_test_for_tracefork): Likewise.
12977
12978 2007-12-18  Daniel Jacobowitz  <dan@codesourcery.com>
12979
12980         * linux-low.c (linux_wait_for_event): Update messages.  Do not
12981         reinsert auto-delete breakpoints.
12982         * mem-break.c (struct breakpoint): Change return type of handler to
12983         int.
12984         (set_breakpoint_at): Update handler type.
12985         (reinsert_breakpoint_handler): Return 1 instead of calling
12986         delete_breakpoint.
12987         (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12988         setting a new one.
12989         (check_breakpoints): Delete auto-delete breakpoints and return 2.
12990         * mem-break.h (set_breakpoint_at): Update handler type.
12991         * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12992         * win32-low.c (auto_delete_breakpoint): New.
12993         (get_child_debug_event): Use it.
12994
12995 2007-12-16  Daniel Jacobowitz  <dan@codesourcery.com>
12996
12997         * configure.ac: Check for pread and pwrite.
12998         * hostio.c (handle_pread): Fall back to lseek and read.
12999         (handle_pwrite): Fall back to lseek and write.
13000         * config.in, configure: Regenerated.
13001
13002 2007-12-07  Daniel Jacobowitz  <dan@codesourcery.com>
13003
13004         * server.c (myresume): Add own_buf argument.
13005         (main): Update calls.
13006
13007 2007-12-06  Daniel Jacobowitz  <dan@codesourcery.com>
13008
13009         * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
13010         * remote-utils.c (remote_open): Do not call disable_async_io.
13011         (block_async_io): Delete.
13012         (unblock_async_io): Make static.
13013         (initialize_async_io): New.
13014         * server.c (handle_v_cont): Handle async I/O here.
13015         (myresume): Likewise.  Move other common resume tasks here...
13016         (main): ... from here.  Call initialize_async_io.  Disable async
13017         I/O before the main loop.
13018         * server.h (initialize_async_io): Declare.
13019         (block_async_io, unblock_async_io): Delete prototypes.
13020         * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
13021
13022 2007-12-06  Mick Davis  <mickd@goanna.iinet.net.au>
13023
13024         * remote-utils.c (readchar): Allow binary data in received messages.
13025
13026 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
13027
13028         * win32-low.c (attaching): New global.
13029         (win32_create_inferior): Clear the `attaching' global.
13030         (win32_attach): Set the `attaching' global.
13031         (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
13032         attaching.  Only set a breakpoint at the entry point if not
13033         attaching.
13034
13035 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
13036
13037         * server.c (main): Don't report dll events on the initial
13038         connection on attaches.
13039
13040 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
13041
13042         * server.c (main): Relax numerical bases supported for the pid of
13043         the --attach command line argument.
13044
13045 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
13046
13047         * win32-low.c (win32_attach): Call OpenProcess before
13048         DebugActiveProcess, not after.  Add last error output to error
13049         call.
13050
13051 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
13052
13053         * win32-low.c (win32_get_thread_context)
13054         (win32_set_thread_context): New functions.
13055         (thread_rec): Use win32_get_thread_context.
13056         (continue_one_thread, win32_resume): Use win32_set_thread_context.
13057         * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
13058         field.
13059
13060 2007-12-03  Leo Zayas
13061             Pedro Alves  <pedro_alves@portugalmail.pt>
13062
13063         * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
13064         global variables.
13065         (child_add_thread): Minor cleanup.
13066         (child_continue): Resume artificially suspended threads before
13067         calling ContinueDebugEvent.
13068         (suspend_one_thread): New.
13069         (fake_breakpoint_event): New.
13070         (get_child_debug_event): Change return type to int.  Check here if
13071         gdb sent an interrupt request.  If a soft interrupt was requested,
13072         fake a breakpoint event.  Return 0 if there is no event to handle,
13073         and 1 otherwise.
13074         (win32_wait): Don't check here if gdb sent an interrupt request.
13075         Ensure there is a valid event to handle.
13076         (win32_request_interrupt): Add soft interruption method as last
13077         resort.
13078
13079 2007-12-03  Leo Zayas
13080             Pedro Alves  <pedro_alves@portugalmail.pt>
13081
13082         * win32-low.h (win32_thread_info): Add descriptions to the
13083         structure members.  Replace `suspend_count' counter by a
13084         `suspended' flag.
13085         * win32-low.c (thread_rec): Update condition of when to get the
13086         context from the inferior.  Rely on ContextFlags being set if it
13087         has already been retrieved.  Only suspend the inferior thread if
13088         we haven't already.  Warn if that fails.
13089         (continue_one_thread): s/suspend_count/suspended/.  Only call
13090         ResumeThread once.  Warn if that fails.
13091
13092 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
13093
13094         * win32-low.c (win32_wait): Don't read from the inferior when it
13095         has already exited.
13096
13097 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
13098
13099         * Makefile.in (win32_low_h): New variable.
13100         (win32-low.o): Add dependency on $(win32_low_h).
13101         (win32-arm-low.o, win32-i386-low.o): New rules.
13102
13103 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
13104
13105         * hostio.c: Correct copyright year.
13106
13107 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
13108
13109         * Makefile.in (OBS): Add hostio.o.
13110         (hostio.o): New rule.
13111         * server.h (handle_vFile): Declare.
13112         * hostio.c: New file.
13113         * server.c (handle_v_requests): Take packet_len and new_packet_len
13114         for binary packets.  Call handle_vFile.
13115         (main): Update call to handle_v_requests.
13116
13117 2007-11-05  Daniel Jacobowitz  <dan@codesourcery.com>
13118
13119         * linux-low.c: Include <sched.h>.
13120
13121 2007-11-01  Daniel Jacobowitz  <dan@codesourcery.com>
13122
13123         * linux-low.c (linux_tracefork_grandchild): New.
13124         (linux_tracefork_child): Use clone.
13125         (linux_test_for_tracefork): Use clone; allocate and free a stack.
13126
13127 2007-10-31  Joel Brobecker  <brobecker@adacore.com>
13128
13129         * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
13130
13131 2007-10-24  Daniel Jacobowitz  <dan@codesourcery.com>
13132
13133         * linux-low.c (handle_extended_wait): Handle unexpected signals.
13134
13135 2007-10-23  Daniel Jacobowitz  <dan@codesourcery.com>
13136
13137         * inferiors.c (change_inferior_id): Delete.
13138         (add_pid_to_list, pull_pid_from_list): New.
13139         * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
13140         (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
13141         (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
13142         (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
13143         (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
13144         (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
13145         (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
13146         (using_threads): Always set to 1.
13147         (handle_extended_wait): New.
13148         (add_process): Do not set TID.
13149         (linux_create_inferior): Set must_set_ptrace_flags.
13150         (linux_attach_lwp): Remove TID argument.  Do not check using_threads.
13151         Use PTRACE_SETOPTIONS.  Call new_thread_notify.  Update all callers.
13152         (linux_thread_alive): Rename TID argument to LWPID.
13153         (linux_wait_for_process): Handle unknown processes.  Do not use TID.
13154         (linux_wait_for_event): Do not use TID or check using_threads.  Update
13155         call to dead_thread_notify.  Call handle_extended_wait.
13156         (linux_create_inferior): Use PTRACE_SETOPTIONS.
13157         (send_sigstop): Delete sigstop_sent.
13158         (wait_for_sigstop): Avoid TID.
13159         (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
13160         (linux_test_for_tracefork): New.
13161         (linux_lookup_signals): Use thread_db_active and
13162         linux_supports_tracefork_flag.
13163         (initialize_low): Use thread_db_active and linux_test_for_tracefork.
13164         * linux-low.h (get_process_thread): Avoid TID.
13165         (struct process_ifo): Move thread_known and tid to the end.  Remove
13166         sigstop_sent.
13167         (linux_attach_lwp, thread_db_init): Update prototypes.
13168         * server.h (change_inferior_id): Delete prototype.
13169         (add_pid_to_list, pull_pid_from_list): New prototypes.
13170         * thread-db.c (thread_db_use_events): New.
13171         (find_first_thread): Rename to...
13172         (find_one_thread): ...this.  Update callers and messages.  Do not
13173         call fatal.  Check thread_db_use_events.  Do not call
13174         change_inferior_id or new_thread_notify.
13175         (maybe_attach_thread): Update.  Do not call new_thread_notify.
13176         (thread_db_init): Set thread_db_use_events.  Check use_events.
13177         * utils.c (fatal, warning): Correct message prefix.
13178
13179 2007-10-15  Daniel Jacobowitz  <dan@codesourcery.com>
13180
13181         * Makefile.in (clean): Remove new files.
13182         (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
13183         (powerpc-64.o, powerpc-64.c): New rules.
13184         * configure.srv: Use alternate register sets for powerpc64-*-linux*
13185         with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
13186         with SPE.
13187         * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
13188         SPE targets.
13189         (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
13190         (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
13191         (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
13192         (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
13193         (target_regsets): Add AltiVec and SPE register sets.
13194         * configure.ac: Check for AltiVec and SPE.
13195         * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
13196         (ppc_fill_vrregset, ppc_store_vrregset): New.
13197         (target_regsets): Add AltiVec register set.
13198         * configure: Regenerated.
13199
13200 2007-09-19  Daniel Jacobowitz  <dan@codesourcery.com>
13201
13202         * linux-low.c (O_LARGEFILE): Define.
13203         (linux_read_memory): Use /proc/PID/mem.
13204         * configure.ac: Use AC_GNU_SOURCE.  Check for pread64.
13205         * configure, config.in: Regenerated.
13206
13207 2007-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
13208
13209         * linux-low.c (linux_wait_for_event): Do not pass signals while
13210         single-stepping.
13211
13212 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
13213
13214         * win32-low.c (create_process): New.
13215         (win32_create_inferior): Use create_process instead of
13216         CreateProcess.  If create_process failed retry appending an ".exe"
13217         suffix.  Store the GetLastError result immediatelly after
13218         create_process calls and use it on the call to error.
13219
13220 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
13221
13222         * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
13223
13224 2007-08-23  Joel Brobecker  <brobecker@adacore.com>
13225
13226         * configure.ac: Switch license to GPLv3.
13227
13228 2007-08-01  Michael Snyder  <msnyder@access-company.com>
13229
13230         * remote-utils.c (putpkt_binary): Memory leak, free buf2.
13231
13232 2007-07-31  Pedro Alves  <pedro_alves@portugalmail.pt>
13233
13234         * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
13235         typedef.
13236         (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
13237         (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL.  Get
13238         CloseToolhelp32Snapshot.
13239         (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
13240         CloseToolhelp32Snapshot.
13241
13242 2007-07-27  Michael Snyder  <michael.snyder@access-company.com>
13243
13244         * server.c (main): Check for inferior exit before main loop.
13245
13246 2007-07-18  Pedro Alves  <pedro_alves@portugalmail.pt>
13247
13248         * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
13249         instead of on tmp_desc.
13250
13251 2007-07-17  Pedro Alves  <pedro_alves@portugalmail.pt>
13252             Daniel Jacobowitz  <dan@codesourcery.com>
13253
13254         * inferiors.c (all_dlls, dlls_changed, get_dll): New.
13255         (add_thread): Minor cleanups.
13256         (clear_inferiors): Move lower in the file.  Clear the DLL
13257         list.
13258         (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
13259         * remote-utils.c (prepare_resume_reply): Check dlls_changed.
13260         (xml_escape_text): New.
13261         * server.c (handle_query): Handle qXfer:libraries:read.  Report it
13262         for qSupported.
13263         (handle_v_cont): Report errors.
13264         (gdbserver_version): Update.
13265         (main): Correct size of own_buf.  Do not report initial DLL events.
13266         * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
13267         (unloaded_dll, xml_escape_text): New.
13268         * win32-low.c (enum target_waitkind): Update comments.
13269         (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
13270         (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
13271         (win32_EnumProcessModules, win32_GetModuleInformation)
13272         (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
13273         (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
13274         (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
13275         (win32_Module32First, win32_Module32Next, load_toolhelp)
13276         (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
13277         (get_child_debug_event): Handle DLL events.
13278         (win32_wait): Likewise.
13279
13280 2007-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
13281
13282         * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
13283         * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
13284
13285 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
13286
13287         * win32-low.c (handle_output_debug_string): Ignore event if not
13288         waiting.
13289
13290 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
13291
13292         * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
13293
13294 2007-07-03  Daniel Jacobowitz  <dan@codesourcery.com>
13295
13296         * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
13297
13298 2007-07-02  Daniel Jacobowitz  <dan@codesourcery.com>
13299
13300         * inferiors.c (change_inferior_id): Add comment.
13301         * linux-low.c (check_removed_breakpoint): Add an early
13302         prototype.  Improve debug output.
13303         (linux_attach): Doc update.
13304         (linux_detach_one_process, linux_detach): Clean up before releasing
13305         each process.
13306         (send_sigstop, wait_for_sigstop): Improve comments and debug output.
13307         * linux-low.h (struct process_info): Doc improvement.
13308         * mem-break.c (delete_all_breakpoints): New.
13309         * mem-break.h (delete_all_breakpoints): New prototype.
13310         * thread-db.c (find_first_thread): New.
13311         (thread_db_create_event): Call it instead of
13312         thread_db_find_new_threads.  Clean up unused variables.
13313         (maybe_attach_thread): Remove first thread handling.
13314         (thread_db_find_new_threads): Use find_first_thread.
13315         (thread_db_get_tls_address): Likewise.
13316
13317 2007-06-27  Daniel Jacobowitz  <dan@codesourcery.com>
13318
13319         * thread-db.c (thread_db_find_new_threads): Add prototype.
13320         (thread_db_create_event): Check for the main thread before adding
13321         a new thread.
13322         (maybe_attach_thread): Only enable event reporting if TID == 0.
13323         (thread_db_get_tls_address): Check for new threads.
13324
13325 2007-06-20  Daniel Jacobowitz  <dan@codesourcery.com>
13326
13327         * linux-low.c (linux_create_inferior): Try execv before execvp.
13328         * spu-low.c (spu_create_inferior): Likewise.
13329
13330 2007-06-13  Mike Frysinger  <vapier@gentoo.org>
13331
13332         * linux-low.c (linux_create_inferior): Change execv to execvp.
13333         * spu-low.c (spu_create_inferior): Likewies.
13334
13335 2007-06-13  Daniel Jacobowitz  <dan@codesourcery.com>
13336
13337         * Makefile.in (clean): Clean new files instead of deleted ones.
13338         (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
13339         (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
13340         rules.
13341         * configure.srv: Specify XML files and new regformats for MIPS and
13342         MIPS64 GNU/Linux.
13343         * linux-mips-low.c (mips_num_regs): Set to only used registers.
13344         (mips_regmap): Do not fetch $0.  Remove unused registers.  Add
13345         an entry for the restart register.
13346         (mips_cannot_fetch_register, mips_cannot_store_register)
13347         (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
13348         register names to match the XML descriptions.
13349         (mips_fill_gregset, mips_store_gregset): Likewise.  Handle the
13350         restart register instead of $0.
13351
13352 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
13353             Markus Deuling  <deuling@de.ibm.com>
13354
13355         * remote-utils.c (decode_xfer_write): New function.
13356         * server.h (decode_xfer_write): Add prototype.
13357         * server.c (handle_query): Add PACKET_LEN argument.  Support
13358         qXfer:spu:read and qXfer:spu:write packets.
13359         (main): Pass packet_len to handle_query.
13360         * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
13361         * target.h (target_ops): Add qxfer_spu.
13362
13363 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
13364
13365         * spu-low.c (spu_proc_xfer_spu): Do not return failure when
13366         accessing non-seekable spufs files.
13367
13368 2007-05-16  Markus Deuling  <deuling@de.ibm.com>
13369
13370         * server.c (handle_query): Add reply for qC packet.
13371
13372 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
13373             Leo Zayas  <lerele@champenstudios@com>
13374
13375         * server.h (check_remote_input_interrupt_request): New function.
13376         * remote_utils.c (INVALID_DESCRIPTOR): New define.
13377         (remote_desc): Initialize with INVALID_DESCRIPTOR.
13378         (input_interrupt): Expose on USE_WIN32API too.  Fix whitespace.
13379         (check_remote_input_interrupt_request): New function.
13380         * server.h (check_remote_input_interrupt_request): Declare.
13381         * win32-low.c (winapi_DebugBreakProcess,
13382         winapi_GenerateConsoleCtrlEvent): New typedefs.
13383         (get_child_debug_event): Lower Win32 debug event polling from 1 sec
13384         to 250 ms.
13385         (win32_wait): Check for remote interrupt request
13386         with check_remote_input_interrupt_request.
13387         (win32_request_interrupt): New function.
13388         (win32_target_op): Set request_interrupt to win32_request_interrupt.
13389
13390 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
13391
13392         * win32-low.c (debug_registers_changed,
13393         debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
13394         CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
13395         CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
13396         (thread_rec): Get context using the low target.
13397         (child_add_thread): Call thread_added on the low target,
13398         which does the same thing.
13399         (regptr): Delete.
13400         (do_initial_child_stuff): Remove debug registers references.
13401         Set context using the low target.  Resume threads after
13402         setting the contexts.
13403         (child_continue): Remove dead variable.  Remove debug
13404         registers references.
13405         (child_fetch_inferior_registers): Go through the low target.
13406         (do_child_store_inferior_registers): Remove.
13407         (child_store_inferior_registers): Go through the low target.
13408         (win32_resume): Remove debug registers references.
13409         Set context using the low target.
13410         (handle_exception): Change return type to void.  Don't record
13411         context here.  Set status to TARGET_WAITKIND_SPURIOUS on a
13412         first chance exception.
13413         (get_child_debug_event): Change return type to void.  Remove
13414         goto loop.  Always return after waiting for debug event.
13415         (win32_wait): Convert to switch statement.  Handle spurious
13416         events.
13417
13418         * win32-i386-low.c (debug_registers_changed,
13419         debug_registers_used): New.
13420         (initial_stuff): Rename to ...
13421         (i386_initial_stuff): ... this.  Clear debug registers
13422         state variables.
13423         (store_debug_registers): Delete.
13424         (i386_get_thread_context): New.
13425         (load_debug_registers): Delete.
13426         (i386_set_thread_context): New.
13427         (i386_thread_added): New.
13428         (single_step): Rename to ...
13429         (i386_single_step): ... this.
13430         (do_fetch_inferior_registers): Rename to ...
13431         (i386_fetch_inferior_register): ... this.
13432         (i386_store_inferior_register): New.
13433         (the_low_target): Adapt to new interface.
13434
13435         * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
13436         (arm_get_thread_context): New.
13437         (arm_set_thread_context): New.
13438         (regptr): New.
13439         (do_fetch_inferior_registers): Rename to ...
13440         (arm_fetch_inferior_register): ... this.
13441         (arm_store_inferior_register): New.
13442         (arm_wince_breakpoint): Reimplement as unsigned long.
13443         (arm_wince_breakpoint_len): Define.
13444         (the_low_target): Adapt to new interface.
13445
13446         * win32-low.h (target_ops): Remove regmap, store_debug_registers and
13447         load_debug_registers.  Add get_thread_context, set_thread_context,
13448         thread_added and store_inferior_register.  Rename
13449         fetch_inferior_registers to fetch_inferior_register.
13450         (regptr): Remove declaration.
13451
13452 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
13453
13454         * linux-low.c (linux_detach): Change return type to int.  Return 0.
13455         * spu-low.c (spu_detach): Likewise.
13456
13457 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
13458
13459         * target.h (target_ops): Change return type of detach to int.
13460         Add join.
13461         (join_inferior): New.
13462         * server.c (main): Don't skip detach support on mingw32.
13463         If the inferior doesn't support detaching return error.
13464         Call join_inferior instead of using waitpid.
13465         * linux-low.c (linux_join): New.
13466         (linux_target_op): Add linux_join.
13467         * spu-low.c (spu_join): New.
13468         (spu_target_ops): Add spu_join.
13469         * win32-low.c (win32_detach): Adapt to new interface.
13470         Reopen current_process_handle before detaching.  Issue a child
13471         resume before detaching.
13472         (win32_join): New.
13473         (win32_target_op): Add win32_join.
13474
13475 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
13476
13477         * win32-low.c (win32-attach): Fix return value.
13478         * target.h (target_ops): Describe ATTACH return values.
13479
13480 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
13481
13482         * win32-low.c (GETPROCADDRESS): Define.
13483         (winapi_DebugActiveProcessStop): Add WINAPI.  typedef as pointer.
13484         (winapi_DebugSetProcessKillOnExit): Likewise.
13485         (win32_create_inferior): Force usage of ansi CreateProcessA.
13486         (win32_attach): Use GETPROCADDRESS.
13487         (win32_detach): Likewise.
13488
13489 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
13490
13491         * win32-low.c (win32_wait): Don't use WSTOPSIG.
13492
13493 2007-03-30  Pedro Alves  <pedro_alves@portugalmail.pt>
13494
13495         * win32-low.c: Commit leftover changes from 2007-03-29.
13496
13497 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
13498
13499         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
13500         fields short instead of int.  Add explicit padding.
13501         (i387_cache_to_fsave): Remove unnecessary casts.
13502         (i387_fsave_to_cache): Doc fix.
13503         (i387_cache_to_fxsave): Remove unnecessary casts and masking.
13504
13505 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
13506
13507         * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
13508         (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
13509
13510 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
13511
13512         * configure.srv (arm*-*-mingw32ce*): Move near the other
13513         arm targets.
13514
13515 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
13516
13517         * configure.ac: Add errno checking.
13518         (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
13519         sys/file.h and malloc.h.
13520         (AC_CHECK_DECLS): Add perror.
13521         (srv_mingwce): Handle.
13522         * configure.srv (i[34567]86-*-cygwin*): Add
13523         win32-i386-low.o to srv_tgtobj.
13524         (i[34567]86-*-mingw*): Likewise.
13525         (arm*-*-mingw32ce*): Add case.
13526         * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13527         HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
13528         [__MINGW32CE__] (strerror): New function.
13529         [__MINGW32CE__] (errno): Define to GetLastError.
13530         [__MINGW32CE__] (COUNTOF): New macro.
13531         (remote_open): Remove extra close call.
13532         * mem-break.c (delete_breakpoint_at): New function.
13533         * mem-break.h (delete_breakpoint_at): Declare.
13534         * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
13535         HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
13536         [USE_WIN32API] (read, write): Add char* casts.
13537         * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
13538         * server.h: Include wincecompat.h on Windows CE.
13539         [HAVE_ERRNO_H]: Check.
13540         (perror): Declare if not declared.
13541         * utils.c: Add stdlib.h, errno.h and malloc.h includes.
13542         (perror_with_name): Remove errno declaration.
13543         * wincecompat.h: New.
13544         * wincecompat.c: New.
13545         * win32-low.h: New.
13546         * win32-arm-low.c: New.
13547         * win32-i386-low.c: New.
13548         (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
13549         (OUTMSG2): Make it safe.
13550         (_T): New macro.
13551         (COUNTOF): New macro.
13552         (NUM_REGS): Get it from the low target.
13553         (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
13554         CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
13555         (thread_rec): Let low target handle debug registers.
13556         (child_add_thread): Likewise.
13557         (child_init_thread_list): Likewise.
13558         (continue_one_thread): Likewise.
13559         (regptr): New.
13560         (do_child_fetch_inferior_registers): Move to ...
13561         * win32-i386-low.c: ... here, and rename to ...
13562         (do_fetch_inferior_registers): ... this.
13563         * win32-low.c (child_fetch_inferior_registers):
13564         Go through the low target.
13565         (do_child_store_inferior_registers): Use regptr.
13566         (strwinerror): New function.
13567         (win32_create_inferior): Handle Windows CE.
13568         Use strwinerror instead of strerror on Windows error
13569         codes.  Add program to the error output.
13570         Don't close the main thread handle on Windows CE.
13571         (win32_attach): Use coredll.dll on Windows CE.
13572         (win32_kill): Close current process and current
13573         thread handles.
13574         (win32_detach): Use coredll.dll on Windows CE.
13575         (win32_resume): Let low target handle debug registers, and
13576         step request.
13577         (handle_exception): Add/Remove initial breakpoint.  Avoid
13578         non-existant WSTOPSIG on Windows CE.
13579         (win32_read_inferior_memory): Cast to remove warning.
13580         (win32_arch_string): Go through the low target.
13581         (initialize_low): Call set_breakpoint_data with the low
13582         target's breakpoint.
13583         * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
13584         FOP_REGNUM, mappings): Move to ...
13585         * win32-i386-low.c: ... here.
13586         * win32-low.c (win32_thread_info): Move to ...
13587         * win32-low.h: ... here.
13588         * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
13589         win32-arm-low.c and wincecompat.c.
13590         (all:): Add $EXEEXT.
13591         (install-only:): Likewise.
13592         (gdbserver:): Likewise.
13593         (gdbreplay:): Likewise.
13594         * config.in: Regenerate.
13595         * configure: Regenerate.
13596
13597 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
13598
13599         * win32-low.c: Rename typedef thread_info to
13600         win32_thread_info throughout.
13601
13602 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
13603
13604         * win32-i386-low.c: Rename to ...
13605         * win32-low.c: ... this.
13606         * configure.srv: Replace win32-i386-low.o with win32-low.o.
13607         * Makefile.in: Likewise.
13608
13609 2007-03-27  Pedro Alves  <pedro_alves@portugalmail.pt>
13610
13611         * remote-utils.c (monitor_output): Constify msg parameter.
13612         * server.h (monitor_output): Likewise.
13613         * win32-i386-low.c (handle_output_debug_string): New.
13614         (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
13615         handle_output_debug_string.
13616         (get_child_debug_event): Likewise.
13617
13618 2007-03-27  Mat Hostetter  <mat@lcs.mit.edu>
13619
13620         * server.c (main): Correct strtoul check.
13621
13622 2007-03-27  Jon Ringle  <jon@ringle.org>
13623
13624         * linux-low.c: Check __ARCH_HAS_MMU__ also.
13625
13626 2007-03-27  Brooks Moses  <brooks.moses@codesourcery.com>
13627
13628         * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
13629
13630 2007-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
13631
13632         * terminal.h: Check HAVE_SGTTY_H.
13633
13634 2007-02-27  Mat Hostetter  <mat@lcs.mit.edu>
13635
13636         * remote-utils.c (remote_open): Print out the assigned port number.
13637
13638 2007-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
13639
13640         * remote-utils.c (monitor_output): New function.
13641         * server.c (debug_threads): Define here.
13642         (monitor_show_help): New function.
13643         (handle_query): Handle qRcmd.
13644         (main): Do not handle 'd' packet.
13645         * server.h (debug_threads, remote_debug, monitor_output): Declare.
13646         * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
13647         of debug_threads.
13648
13649 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
13650
13651         * Makefile.in (EXEEXT): New.
13652         (clean): Use $(EXEEXT).
13653
13654 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
13655
13656         * target.h (target_ops): Rename send_signal to request_interrupt,
13657         and remove enum target_signal parameter.
13658         * linux-low.c (linux_request_interrupt): Rename from
13659         linux_send_signal, and always send SIGINT.
13660         * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
13661         and always send SIGINT.
13662         * remote-utils.c (putpkt_binary): Call request_interrupt, instead
13663         of send_signal.
13664         (input_interrupt): Likewise.
13665
13666 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
13667
13668         * server.c (get_features_xml): Check if target implemented
13669         arch_string.
13670         * win32-i386-low.c (win32_arch_string): New.
13671         (win32_target_ops): Add win32_arch_string as arch_string member.
13672
13673 2007-02-22  Markus Deuling  <deuling@de.ibm.com>
13674
13675         * spu-low.c (spu_arch_string): New.
13676         (spu_target_ops): Add spu_arch_string.
13677
13678 2007-02-16  Daniel Jacobowitz  <dan@codesourcery.com>
13679
13680         * remote-utils.c: Remove HAVE_TERMINAL_H check.
13681         * configure.ac: Do not check for terminal.h.
13682         * configure, config.in: Regenerated.
13683
13684 2007-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
13685
13686         * Makefile.in (OBS): Add $(XML_BUILTIN).
13687         (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
13688         (clean): Update.
13689         (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
13690         (arm-with-iwmmxt.c): New.
13691         * config.in, configure: Regenerate.
13692         * configure.ac: Check for iWMMXt.  Handle srv_xmltarget,
13693         srv_xmlbuiltin, and srv_xmlfiles.  Define USE_XML.
13694         * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
13695         (arm*-*-linux*): Add iWMMXt and regset support.
13696         * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
13697         (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
13698         (arm_store_wmmxregset, target_regsets): New.
13699         * server.c (get_features_xml): Take annex argument.  Check builtin
13700         XML documents.
13701         (handle_query): Handle multiple annexes.
13702
13703 2007-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
13704
13705         * remote-utils.c [USE_WIN32API] (read, write): Define.
13706         (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
13707         write.
13708
13709 2007-01-09  Daniel Jacobowitz  <dan@codesourcery.com>
13710
13711         * linux-i386-low.c (the_low_target): Set arch_string.
13712         * linux-x86-64-low.c (the_low_target): Likewise.
13713         * linux-low.c (linux_arch_string): New.
13714         (linux_target_ops): Add it.
13715         * linux-low.h (struct linux_target_ops): Add arch_string.
13716         * server.c (write_qxfer_response): Use const void * for DATA.
13717         (get_features_xml): New.
13718         (handle_query): Handle qXfer:features:read.  Report it for qSupported.
13719         * target.h (struct target_ops): Add arch_string method.
13720
13721 2007-01-03  Denis Pilat  <denis.pilat@st.com>
13722             Daniel Jacobowitz  <dan@codesourcery.com>
13723
13724         * linux-low.c (linux_kill): Handle being called with no threads.
13725         * win32-i386-low.c (win32_kill): Likewise.
13726         (get_child_debug_event): Clear current_process_handle.
13727
13728 2006-12-30  Denis PILAT  <denis.pilat@st.com>
13729             Daniel Jacobowitz  <dan@codesourcery.com>
13730
13731         * remote-utils.c (remote_open): Check the type of specified
13732         serial port devices before opening them.
13733         * server.c (main): Kill the inferior if an error occurs during
13734         the first remote_open.
13735
13736 2006-12-05  Markus Deuling  <deuling@de.ibm.com>
13737
13738         * README: Update supported targets.
13739
13740 2006-11-28  Daniel Jacobowitz  <dan@codesourcery.com>
13741
13742         * Makefile.in (clean): Remove reg-mips64.c.
13743         (reg-mips64.c, reg-mips64.o): New rules.
13744         * configure.srv: Handle mips64.  Include regset support for mips.
13745         * linux-mips-low.c (union mips_register): New.
13746         (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
13747         (mips_breakpoint, mips_breakpoint_at): Use int.
13748         (mips_collect_register, mips_supply_register)
13749         (mips_collect_register_32bit, mips_supply_register_32bit)
13750         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13751         (mips_store_fpregset, target_regsets): New.
13752         * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
13753
13754 2006-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
13755
13756         * configure.srv: Add target "spu*-*-*".
13757         * Makefile.in (clean): Remove reg-spu.c.
13758         (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
13759         * spu-low.c: New file.
13760
13761 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
13762
13763         * configure.ac: Correct td_thr_tls_get_addr test.
13764         * configure: Regenerated.
13765
13766 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
13767
13768         * linux-low.c (linux_wait_for_event): Reformat.  Use the
13769         pass_signals array.
13770         * remote-utils.c (decode_address_to_semicolon): New.
13771         * server.c (pass_signals, handle_general_set): New.
13772         (handle_query): Mention QPassSignals for qSupported.
13773         (main): Call handle_general_set.
13774         * server.h (pass_signals, decode_address_to_semicolon): New.
13775
13776 2006-11-06  Daniel Jacobowitz  <dan@codesourcery.com>
13777
13778         * server.c (handle_query): Correct error handling for read_auxv.
13779
13780 2005-10-19  Ulrich Weigand  <uweigand@de.ibm.com>
13781
13782         * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
13783         and srv_linux_thread_db to yes.
13784         * linux-s390-low.c (s390_fill_gregset): New function.
13785         (target_regsets): Define data structure.
13786
13787 2006-10-17  Daniel Jacobowitz  <dan@codesourcery.com>
13788
13789         * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
13790         * configure.ac: Use it.  Define HAVE_TD_THR_TLS_GET_ADDR.
13791         * config.in, configure: Regenerated.
13792         * inferiors.c (gdb_id_to_thread): New function.
13793         (gdb_id_to_thread_id): Use it.
13794         * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
13795         * linux-low.h (struct process_info): Add th member.
13796         (thread_db_get_tls_address): New prototype.
13797         * remote-utils.c (decode_address): Make non-static.
13798         * server.c (handle_query): Handle qGetTLSAddr.
13799         * server.h (gdb_id_to_thread, decode_address): New prototypes.
13800         * target.h (struct target_ops): Add get_tls_address.
13801         * thread-db.c (maybe_attach_thread): Save the thread handle.
13802         (thread_db_get_tls_address): New.
13803
13804 2006-09-28  Daniel Jacobowitz  <dan@codesourcery.com>
13805
13806         * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
13807         (linux_resume_one_process): Take a siginfo_t *.  Update all
13808         callers.  Queue it if necessary.  Use PTRACE_SETSIGINFO.
13809         (struct pending_signals): Add a siginfo_t.
13810         (linux_wait_for_process): Always set last_status.
13811         (linux_wait_for_event): Use PTRACE_GETSIGINFO.
13812         (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
13813         * linux-low.h (struct process_info): Add last_status.
13814
13815 2006-09-21  Daniel Jacobowitz  <dan@codesourcery.com>
13816
13817         * remote-utils.c (try_rle): New function.
13818         (putpkt_binary): Use it.
13819
13820 2006-08-19  Daniel Jacobowitz  <dan@codesourcery.com>
13821
13822         * Makefile.in (clean): Clean reg-x86-64-linux.c.
13823         (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
13824         * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
13825         * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
13826         (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
13827         point registers.
13828
13829 2006-08-08  Richard Sandiford  <richard@codesourcery.com>
13830
13831         * server.c (terminal_fd): New variable.
13832         (old_foreground_pgrp): Likewise.
13833         (restore_old_foreground_pgrp): New function.
13834         (start_inferior): Record the terminal file descriptor in terminal_fd
13835         and its original foreground group in old_foreground_pgrp.  Register
13836         restore_old_foreground_pgrp with atexit().
13837
13838 2006-07-26  Daniel Jacobowitz  <dan@codesourcery.com>
13839
13840         * server.c (handle_query): Correct qPart to qXfer.
13841
13842 2006-07-22  Daniel Jacobowitz  <dan@codesourcery.com>
13843
13844         * configure.ac: Check for more headers which are missing on
13845         Windows.  Automatically supply -lwsock32 and USE_WIN32API.
13846         * configure.srv: Add Cygwin and mingw32.
13847         * remote-utils.c: Don't include headers unconditionally which
13848         are missing on mingw32.  Include <winsock.h> for mingw32.
13849         (remote_open): Adjust for mingw32 support.  Flush
13850         standard error after writing to it.
13851         (remote_close, putpkt_binary, input_interrupt, block_async_io)
13852         (unblock_async_io, enable_async_io, disable_async_io)
13853         (readchar, getpkt): Update for Winsock support.
13854         (prepare_resume_reply): Expect a protocol signal number.
13855         * server.c: Disable <sys/wait.h> on mingw32.
13856         (start_inferior): Adjust for mingw32 support.  Flush
13857         standard error after writing to it.
13858         (attach_inferior): Likewise.  Use protocol signal
13859         numbers.
13860         (main): Skip 'D' packet on mingw32.  Use protocol signal numbers
13861         and names.
13862         * win32-i386-low.c: New file.
13863         * Makefile.in (XM_CLIBS): Set.
13864         (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
13865         (win32-i386-low.o): New dependency rule.
13866         * linux-low.c (linux_wait): Use target signal numbers.
13867         * target.h (struct target_ops): Doc fix.
13868         * server.h (target_signal_to_name): New prototype.
13869         * gdbreplay.c: Don't include headers unconditionally which
13870         are missing on mingw32.  Include <winsock.h> for mingw32.
13871         (remote_close, remote_open): Adjust for Winsock support.
13872         * configure, config.in: Regenerated.
13873
13874 2006-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
13875
13876         * server.c (decode_xfer_read, write_qxfer_response): New.
13877         (handle_query): Take a packet length argument.  Handle
13878         qXfer:auxv:read instead of qPart:auxv:read.  Mention it in
13879         the qSupported response.
13880         (main): Update call to handle_query.
13881
13882 2006-06-22  Daniel Jacobowitz  <dan@codesourcery.com>
13883
13884         * remote-utils.c (remote_escape_output, remote_unescape_input): New.
13885         (putpkt_binary): Renamed from putpkt and adjusted for binary
13886         data.
13887         (putpkt): New wrapper for putpkt_binary.
13888         (readchar): Don't mask off the high bit.
13889         (decode_X_packet): New function.
13890         * server.c (main): Call putpkt_binary if a handler sets the packet
13891         length.  Save the length of the incoming packet.  Handle 'X'.
13892         * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
13893
13894 2006-06-21  Daniel Jacobowitz  <dan@codesourcery.com>
13895
13896         * server.c (handle_query): Handle qSupported.
13897
13898 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
13899
13900         * remote-utils.c (all_symbols_looked_up): New variable.
13901         (look_up_one_symbol): Check it.
13902         * server.h (look_up_one_symbol): New declaration.
13903         * thread-db.c (thread_db_init): Set all_symbols_looked_up.
13904
13905 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
13906
13907         * Makefile.in (linux-arm-low.o): Update dependencies.
13908         * linux-arm-low.c: Include "gdb_proc_service.h".
13909         (PTRACE_GET_THREAD_AREA): Define.
13910         (ps_get_thread_area): New function.
13911
13912 2006-05-09  Nathan Sidwell  <nathan@codesourcery.com>
13913
13914         * configure.srv (m68k*-*-uclinux*): New target.
13915         * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
13916         (linux_resume_one_process): Remove extraneous cast.
13917         (linux_read_offsets): New.
13918         (linux_target_op): Add linux_read_offsets on mmuless systems.
13919         * server.c (handle_query): Add qOffsets logic.
13920         * target.h (struct target_ops): Add read_offsets.
13921
13922 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
13923
13924         * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
13925         (PTRACE_GET_THREAD_AREA): Define.
13926         (ps_get_thread_area): New function.
13927         * Makefile.in (linux-i386-low.o, linux-mips-low.o)
13928         (linux-x86-64-low.o): Update.
13929
13930 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
13931
13932         * configure.ac: Remove checks for prfpregset_t.
13933         * gdb_proc_service.h: New file.
13934         * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
13935         new "gdb_proc_service.h".
13936         * proc-service.c: Likewise.
13937         (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
13938         (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
13939         * Makefile.in (gdb_proc_service_h): Updated.
13940         * configure, config.in: Regenerated.
13941
13942 2006-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
13943
13944         * remote-utils.c (prepare_resume_reply): Move declaration
13945         of gdb_id_from_wait to the top of the block.
13946
13947 2006-02-15  Daniel Jacobowitz  <dan@codesourcery.com>
13948
13949         * linux-low.c (regsets_store_inferior_registers): Read the regset
13950         from the target before filling it.
13951
13952 2006-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
13953
13954         * server.c (attach_inferior): Return SIGTRAP for a successful
13955         attach.
13956
13957 2006-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
13958
13959         * Makefile.in (OBS): Add version.o.
13960         (STAGESTUFF): Delete.
13961         (version.o): Add dependencies.
13962         (version.c): Replace rule.
13963         (clean): Remove version.c.
13964         * server.c (gdbserver_version): New.
13965         (gdbserver_usage): Use printf.
13966         (main): Handle --version and --help.
13967         * server.h (version, host_name): Add declarations.
13968
13969 2005-12-23  Eli Zaretskii  <eliz@gnu.org>
13970
13971         * linux-arm-low.c:
13972         * linux-arm-low.c:
13973         * inferiors.c:
13974         * i387-fp.h:
13975         * i387-fp.c:
13976         * gdbreplay.c:
13977         * regcache.c:
13978         * proc-service.c:
13979         * mem-break.h:
13980         * mem-break.c:
13981         * linux-x86-64-low.c:
13982         * linux-sh-low.c:
13983         * linux-s390-low.c:
13984         * linux-ppc64-low.c:
13985         * linux-ppc-low.c:
13986         * linux-mips-low.c:
13987         * linux-m68k-low.c:
13988         * linux-m32r-low.c:
13989         * linux-low.h:
13990         * linux-low.c:
13991         * linux-ia64-low.c:
13992         * linux-i386-low.c:
13993         * linux-crisv32-low.c:
13994         * thread-db.c:
13995         * terminal.h:
13996         * target.h:
13997         * target.c:
13998         * server.h:
13999         * server.c:
14000         * remote-utils.c:
14001         * regcache.h:
14002         * utils.c:
14003         * Makefile.in:
14004         * configure.ac:
14005         * gdbserver.1: Add (C) after Copyright.  Update the FSF
14006         address.
14007
14008 2005-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
14009
14010         * linux-arm-low.c (arm_eabi_breakpoint): New variable.
14011         (arm_breakpoint_at): Recognize both breakpoints.
14012         (the_low_target): Use the correct breakpoint instruction.
14013
14014 2005-11-02  Daniel Jacobowitz  <dan@codesourcery.com>
14015
14016         * configure.srv (x86_64-*-linux*): Turn on thread_db support.
14017         * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
14018         (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
14019         (the_low_target): Update.
14020
14021 2005-10-25  Andreas Schwab  <schwab@suse.de>
14022
14023         * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
14024
14025         * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
14026         (ia64_num_regs): Reduce to 462.
14027
14028 2005-09-17  Daniel Jacobowitz  <dan@codesourcery.com>
14029
14030         * acinclude.m4: Correct quoting.
14031         * aclocal.m4: Regenerated.
14032
14033         Suggested by SZOKOVACS Robert <szo@ies.hu>:
14034         * thread-db.c (thread_db_err_str): Handle TD_VERSION.
14035         (thread_db_init): Call thread_db_err_str.
14036         * configure.ac: Check for TD_VERSION.
14037         * config.in, configure: Regenerated.
14038
14039 2005-07-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
14040
14041         * server.h (error, fatal, warning): Add ATTR_FORMAT.
14042
14043 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
14044
14045         * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
14046         is not available.  Define HAVE_PTRACE_GETREGS if it is.
14047         * config.in, configure: Regenerated.
14048         * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
14049         * linux-i386-low.c, linux-m68k-low.c: Update to use
14050         HAVE_PTRACE_GETREGS.
14051         * linux-low.c (regsets_fetch_inferior_registers)
14052         (regsets_store_inferior_registers): Only return 0 if we processed
14053         GENERAL_REGS.
14054         * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
14055         * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
14056
14057 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
14058
14059         * inferiors.c (struct thread_info): Add gdb_id.
14060         (add_thread): Add gdb_id argument.
14061         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
14062         * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
14063         calls to add_thread.
14064         * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
14065         * server.c (handle_query): Use thread_to_gdb_id.
14066         (handle_v_cont, main): Use gdb_id_to_thread_id.
14067         * server.h (add_thread): Update prototype.
14068         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
14069         prototypes.
14070
14071 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
14072
14073         * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
14074         left-padded registers.
14075         * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
14076         * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
14077
14078 2005-07-01  Steve Ellcey  <sje@cup.hp.com>
14079
14080         * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
14081         * configure: Regenerate.
14082         * config.in: Regenerate.
14083         * server.h (NEED_DECLARATION_STRERROR):
14084         Replace with !HAVE_DECL_STRERROR.
14085
14086 2005-06-16  Daniel Jacobowitz  <dan@codesourcery.com>
14087
14088         * linux-low.c (linux_wait, linux_send_signal): Don't test
14089         an unsigned long variable for > 0 if it could be MAX_ULONG.
14090         * server.c (myresume): Likewise.
14091         * target.c (set_desired_inferior): Likewise.
14092
14093 2005-06-13  Mark Kettenis  <kettenis@gnu.org>
14094
14095         * configure.ac: Simplify and improve check for socklen_t.
14096         * configure, config.in: Regenerate.
14097
14098 2005-06-12  Daniel Jacobowitz  <dan@codesourcery.com>
14099
14100         * acconfig.h: Remove.
14101         * configure.ac: Add a test for socklen_t.  Use three-argument
14102         AC_DEFINE throughout.
14103         * config.in: Regenerated using autoheader 2.59.
14104         * configure: Regenerated.
14105
14106         * gdbreplay.c (socklen_t): Provide a default.
14107         (remote_open): Use socklen_t.
14108         * remote-utils.c (socklen_t): Provide a default.
14109         (remote_open): Use socklen_t.
14110         (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
14111         unsigned char.
14112
14113         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
14114         char for buffers.
14115         * linux-low.c (linux_read_memory, linux_write_memory)
14116         (linux_read_auxv): Likewise.
14117         * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
14118         (check_mem_write): Likewise.
14119         * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
14120         Likewise.
14121         * regcache.c (struct inferior_rgcache_data, registers_to_string)
14122         (registers_from_string, register_data): Likewise.
14123         * server.c (handle_query, main): Likewise.
14124         * server.h (convert_ascii_to_int, convert_int_to_ascii)
14125         (decode_M_packet): Likewise.
14126         * target.c (read_inferior_memory, write_inferior_memory): Likewise.
14127         * target.h (struct target_ops): Update read_memory, write_memory,
14128         and read_auxv.
14129         (read_inferior_memory, write_inferior_memory): Update.
14130         * linux-low.h (struct linux_target_ops): Change type of breakpoint
14131         to unsigned char *.
14132         * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
14133         linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
14134         linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
14135         linux-s390-low.c, linux-sh-low.c: Update for changes in
14136         read_inferior_memory and the_low_target->breakpoint.
14137
14138 2005-05-28  Daniel Jacobowitz  <dan@codesourcery.com>
14139
14140         * Makefile.in (SFILES): Add linux-ppc64-low.c.
14141         (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
14142         * configure.srv: Add powerpc64-*-linux*.
14143         * linux-ppc64-low.c: New file.
14144
14145 2005-05-23  Orjan Friberg  <orjanf@axis.com>
14146
14147         * linux-cris-low.c: New file with support for CRIS.
14148         * linux-crisv32-low.c: Ditto for CRISv32.
14149         * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
14150         (clean): Add reg-cris.c and reg-crisv32.c.
14151         Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
14152         reg-crisv32.o, and reg-crisv32.c to make rules.
14153         * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
14154         recognized targets.
14155
14156 2005-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
14157
14158         * linux-low.c (fetch_register): Ensure buffer size is a multiple
14159         of sizeof (PTRACE_XFER_TYPE).
14160         (usr_store_inferior_registers): Likewise.  Zero out excess bytes.
14161
14162 2005-05-12  Orjan Friberg  <orjanf@axis.com>
14163
14164         * target.h (struct target_ops): Add insert_watchpoint,
14165         remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
14166         pointers for hardware watchpoint support.
14167         * linux-low.h (struct linux_target_ops): Ditto.
14168         * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
14169         (linux_stopped_by_watchpoint, linux_stopped_data_address): New.  Add
14170         to linux_target_ops.
14171         * remote-utils.c (prepare_resume_reply): Add watchpoint information to
14172         reply packet.
14173         * server.c (main): Recognize 'Z' and 'z' packets.
14174
14175 2005-05-10  Ulrich Weigand  <uweigand@de.ibm.com>
14176
14177         * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
14178         (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
14179         (the_low_target): Add new members.
14180
14181 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
14182
14183         * proc-service.c (ps_lgetregs): Search all_processes instead of
14184         all_threads.
14185
14186 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
14187
14188         * server.c (start_inferior): Change return type to int.
14189         (attach_inferior): Change sigptr to int *.
14190         (handle_v_cont, handle_v_requests): Change signal to int *.
14191         (main): Change signal to int.
14192
14193 2005-04-15  Kei Sakamoto  <sakamoto.kei@renesas.com>
14194
14195         * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
14196         * configure.srv: Add m32r*-*-linux*.
14197         * linux-m32r-low.c: New file.
14198
14199 2005-03-04  Daniel Jacobowitz  <dan@codesourcery.com>
14200
14201         * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
14202
14203 2005-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
14204
14205         * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
14206         Take unsigned long arguments for PIDs.
14207         * linux-low.c (add_process, linux_attach_lwp, linux_attach)
14208         (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
14209         (wait_for_sigstop, linux_resume_one_process)
14210         (regsets_fetch_inferior_registers, linux_send_signal)
14211         (linux_read_auxv): Likewise.  Update the types of variables holding
14212         PIDs.  Update format string specifiers.
14213         * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
14214         * remote-utils.c (prepare_resume_reply): Likewise.
14215         * server.c (cont_thread, general_thread, step_thread)
14216         (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
14217         unsigned long.
14218         (handle_query): Update format specifiers.
14219         (handle_v_cont, main): Use strtoul for thread IDs.
14220         * server.h (struct inferior_list_entry): Use unsigned long for ID.
14221         (add_thread, find_inferior_id, change_inferior_id, cont_thread)
14222         (general_thread, step_thread, thread_from_wait)
14223         (old_thread_from_wait): Update.
14224         * target.h (struct thread_resume): Use unsigned long for THREAD.
14225         (struct target_ops): Use unsigned long for arguments to attach and
14226         thread_alive.
14227
14228 2005-02-24  Daniel Jacobowitz  <dan@codesourcery.com>
14229
14230         * acinclude.m4: Include bfd/bfd.m4 directly.
14231         * configure.ac: Use AC_ARG_PROGRAM.  Suggested by Aron Griffis
14232         <agriffis@toolchain.org>.
14233         * aclocal.m4, configure: Regenerated.
14234
14235 2005-01-07  Andrew Cagney  <cagney@gnu.org>
14236
14237         * configure.ac: Rename configure.in, require autoconf 2.59.
14238         * configure: Re-generate.
14239
14240 2004-12-08  Daniel Jacobowitz  <dan@debian.org>
14241
14242         * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area.  Reset
14243         LIBS when finished.
14244         * aclocal.m4: Regenerated.
14245         * configure: Regenerated.
14246
14247 2004-11-21  Andreas Schwab  <schwab@suse.de>
14248
14249         * linux-m68k-low.c (m68k_num_gregs): Define.
14250         (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
14251         (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
14252         (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
14253         (m68k_breakpoint_at): New.  Add to the_low_target.
14254
14255         * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
14256         srv_linux_thread_db to yes.
14257
14258 2004-10-20  Joel Brobecker  <brobecker@gnat.com>
14259
14260         * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
14261         (ARCH_SET_FS): Likewise.
14262         (ARCH_GET_FS): Likewise.
14263         (ARCH_GET_GS): Likewise.
14264
14265 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
14266
14267         * linux-i386-low.c (ps_get_thread_area): New.
14268         * linux-x86-64-low.c (ps_get_thread_area): New.
14269         * linux-low.c: Include <sys/syscall.h>.
14270         (linux_kill_one_process): Don't kill the first thread here.
14271         (linux_kill): Kill the first thread here.
14272         (kill_lwp): New function.
14273         (send_sigstop, linux_send_signal): Use it.
14274         * proc-service.c: Clean up #ifdefs.
14275         (fpregset_info): Delete.
14276         (ps_lgetregs): Update and enable implementation.
14277         (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
14278         implementations.
14279         * remote-utils.c (struct sym_cache, symbol_cache): New.
14280         (input_interrupt): Print a clearer message.
14281         (async_io_enabled): New variable.
14282         (enable_async_io, disable_async_io): Use it.  Update comments.
14283         (look_up_one_symbol): Use the symbol cache.
14284         * thread-db.c (thread_db_look_up_symbols): New function.
14285         (thread_db_init): Update comments.  Call thread_db_look_up_symbols.
14286
14287 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
14288
14289         * configure.in: Test for -rdynamic.
14290         * configure: Regenerated.
14291         * Makefile (INTERNAL_LDFLAGS): New.
14292         (gdbserver, gdbreplay): Use it.
14293
14294 2004-09-02  Andrew Cagney  <cagney@gnu.org>
14295
14296         * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
14297
14298 2004-03-23  Daniel Jacobowitz  <drow@mvista.com>
14299
14300         * linux-low.c (linux_wait): Clear all_processes list also.
14301
14302 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
14303
14304         * linux-low.c: Include <errno.h>.  Remove extern declaration of
14305         errno.
14306
14307 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
14308
14309         * gdbreplay.c, server.h, utils.c: Update copyright years.
14310
14311 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
14312
14313         * server.c (main): Print child status or termination signal from
14314         variable 'signal', not 'sig'.
14315
14316 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
14317
14318         * linux-low.c (linux_read_memory): Change return type to
14319         int.  Check for and return error from ptrace().
14320         * target.c (read_inferior_memory): Change return type to int.  Pass
14321         back return status from the_target->read_memory().
14322         * target.h (struct target_ops): Adapt *read_memory() prototype.
14323         Update comment.
14324         (read_inferior_memory): Adapt prototype.
14325         * server.c (main): Return an error packet if
14326         read_inferior_memory() returns an error.
14327
14328 2004-03-04  Daniel Jacobowitz  <drow@mvista.com>
14329
14330         * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
14331         Unify with other clean targets.
14332
14333 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
14334
14335         * server.c (handle_v_cont): Call set_desired_inferior.
14336
14337 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
14338
14339         * remote-utils.c (prepare_resume_reply): Always supply "thread:".
14340
14341 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
14342
14343         * linux-low.c (linux_wait): Unblock async I/O.
14344         (linux_resume): Block and enable async I/O.
14345         * remote-utils.c (block_async_io, unblock_async_io): New functions.
14346         * server.h (block_async_io, unblock_async_io): Add prototypes.
14347
14348 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
14349
14350         * remote-utils.c (remote_open): Print a status notice after
14351         opening a TCP port.
14352         * server.c (attach_inferior): Print a status notice after
14353         attaching.
14354
14355 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
14356
14357         * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
14358
14359 2004-02-26  Daniel Jacobowitz  <drow@mvista.com>
14360
14361         * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
14362         error packet.
14363         * server.c, target.h: Update copyright years.
14364
14365 2004-02-25  Roland McGrath  <roland@redhat.com>
14366
14367         * target.h (struct target_ops): New member `read_auxv'.
14368         * server.c (handle_query): Handle qPart:auxv:read: query using that.
14369         * linux-low.c (linux_read_auxv): New function.
14370         (linux_target_ops): Initialize `read_auxv' member to that.
14371
14372 2004-02-17  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
14373
14374         Committed by Jim Blandy  <jimb@redhat.com>.
14375
14376         * linux-s390-low.c (s390_num_regs): Update.
14377         (s390_regmap): Remove control registers.  Use __s390x__ predefine
14378         instead of GPR_SIZE to distiguish s390 and s390x targets.
14379
14380 2004-01-31  Daniel Jacobowitz  <drow@mvista.com>
14381
14382         * linux-low.c: Update copyright year.
14383         (check_removed_breakpoint): Clear pending_is_breakpoint.
14384         (linux_set_resume_request, linux_queue_one_thread)
14385         (resume_status_pending_p): New functions.
14386         (linux_continue_one_thread): Use process->resume.
14387         (linux_resume): Only resume threads if there are no pending events.
14388         * linux-low.h (struct process_info): Add resume request
14389         pointer.
14390
14391 2004-01-30  Daniel Jacobowitz  <drow@mvista.com>
14392
14393         * regcache.c (new_register_cache): Clear the allocated register
14394         buffer.  Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
14395
14396 2003-10-13  Daniel Jacobowitz  <drow@mvista.com>
14397
14398         * linux-low.c (linux_resume): Take a struct thread_resume *
14399         argument.
14400         (linux_wait): Update call.
14401         (resume_ptr): New static variable.
14402         (linux_continue_one_thread): Renamed from
14403         linux_continue_one_process.  Use resume_ptr.
14404         (linux_resume): Use linux_continue_one_thread.
14405         * server.c (handle_v_cont, handle_v_requests): New functions.
14406         (myresume): New function.
14407         (main): Handle 'v' case.
14408         * target.h (struct thread_resume): New type.
14409         (struct target_ops): Change argument of "resume" to struct
14410         thread_resume *.
14411         (myresume): Delete macro.
14412
14413 2003-08-08  H.J. Lu  <hongjiu.lu@intel.com>
14414
14415         * Makefile.in (install-only): Create dest dir. Support DESTDIR.
14416         (uninstall): Support DESTDIR.
14417
14418 Mon Jul 21 20:09:34 UTC 2003  Brendan Conoboy  <blc@redhat.com>
14419
14420         * configure.srv: Add xscale*linux copy of arm*linux entry.
14421
14422 2003-07-24  Daniel Jacobowitz  <drow@mvista.com>
14423
14424         * linux-arm-low.c (arm_reinsert_addr): New function.
14425         (the_low_target): Add arm_reinsert_addr.
14426
14427 2003-07-08  Mark Kettenis  <kettenis@gnu.org>
14428
14429         * mem-break.c: Remove whitespace at end of file.
14430
14431 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
14432
14433         * configure.in: Check whether we need to prototype strerror.
14434         * server.h: Optionally prototype strerror.
14435         * gdbreplay.c (perror_with_name): Use strerror.
14436         * linux-low.c (linux_attach_lwp): Use strerror.
14437         * utils.c (perror_with_name): Use strerror.
14438         * config.in, configure: Regenerated.
14439
14440 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
14441
14442         * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
14443         SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
14444
14445 2003-06-20  Daniel Jacobowitz  <drow@mvista.com>
14446
14447         * Makefile.in (SFILES): Update.
14448         * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
14449         low-sun3.c: Remove files.
14450
14451 2003-06-17  Daniel Jacobowitz  <drow@mvista.com>
14452
14453         * linux-low.c: Move comment to linux_thread_alive where it belonged.
14454         (linux_detach_one_process, linux_detach): New functions.
14455         (linux_target_ops): Add linux_detach.
14456         * server.c (main): Handle 'D' packet.
14457         * target.h (struct target_ops): Add "detach" member.
14458         (detach_inferior): Define.
14459
14460 2003-06-13  Mark Kettenis  <kettenis@gnu.org>
14461
14462         From Kelley Cook  <kelleycook@wideopenwest.com>:
14463         * configure.srv: Accept i[34567]86 variants.
14464
14465 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
14466
14467         * linux-low.c (linux_wait_for_event): Correct comment typos.
14468         (linux_resume_one_process): Call check_removed_breakpoint.
14469         (linux_send_signal): New function.
14470         (linux_target_ops): Add linux_send_signal.
14471         * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
14472         of kill.
14473         * target.h (struct target_ops): Add send_signal.
14474
14475 2003-05-29  Jim Blandy  <jimb@redhat.com>
14476
14477         * linux-low.c (usr_store_inferior_registers): Transfer buf in
14478         PTRACE_XFER_TYPE-sized chunks, not int-sized chunks.  Otherwise,
14479         if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
14480         away part of the register's value.
14481
14482 2003-03-26  Daniel Jacobowitz  <drow@mvista.com>
14483
14484         * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
14485         (linux_wait_for_event, linux_init_signals): Likewise.
14486
14487 2003-03-17  Daniel Jacobowitz  <drow@mvista.com>
14488
14489         * configure.in: Check for stdlib.h.
14490         * configure: Regenerated.
14491         * config.in: Regenerated.
14492
14493 2003-01-04  Andreas Schwab  <schwab@suse.de>
14494
14495         * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
14496
14497 2003-01-02  Andrew Cagney  <ac131313@redhat.com>
14498
14499         * Makefile.in: Remove obsolete code.
14500
14501 2002-11-20  Daniel Jacobowitz  <drow@mvista.com>
14502
14503         * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
14504         defined(PT_FPR0_HI).
14505
14506 2002-11-17  Stuart Hughes  <seh@zee2.com>
14507
14508         * linux-arm-low.c (arm_num_regs): Increase.
14509         (arm_regmap): Include status register.
14510
14511 2002-11-17  Daniel Jacobowitz  <drow@mvista.com>
14512
14513         * linux-low.c (register_addr): Remove incorrect -1 check.
14514
14515 2002-08-29  Daniel Jacobowitz  <drow@mvista.com>
14516
14517         * linux-low.c (linux_create_inferior): Call setpgid.  Return
14518         the new PID.
14519         (unstopped_p, linux_signal_pid): Remove.
14520         (linux_target_ops): Remove linux_signal_pid.
14521         * remote-utils.c (putpkt, input_interrupt): Use signal_pid
14522         global instead of target method.
14523         * target.h (struct target_ops): Remove signal_pid.  Update comment
14524         for create_inferior.
14525         * server.c (signal_pid): New variable.
14526         (create_inferior): Set signal_pid.  Block SIGTTOU and SIGTTIN in
14527         gdbserver.  Set the child to be the foreground process group.
14528         (attach_inferior): Set signal_pid.
14529
14530 2002-08-23  Daniel Jacobowitz  <drow@mvista.com>
14531
14532         * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
14533
14534 2002-08-20  Jim Blandy  <jimb@redhat.com>
14535
14536         * Makefile.in (LDFLAGS): Allow the configure script to establish a
14537         default for this.
14538
14539 2002-08-01  Andrew Cagney  <cagney@redhat.com>
14540
14541         * Makefile.in: Make chill references obsolete.
14542
14543 2002-07-24  Kevin Buettner  <kevinb@redhat.com>
14544
14545         * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
14546         * configure: Regenerate.
14547         * config.in: Regenerate.
14548
14549 2002-07-09  David O'Brien  <obrien@FreeBSD.org>
14550
14551         * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
14552         (perror_with_name, remote_close, remote_open, expect, play): Static.
14553
14554 2002-07-04  Michal Ludvig  <mludvig@suse.cz>
14555
14556         * linux-x86-64-low.c (x86_64_regmap): Make it an array of
14557         byte offsets instead of an array of indexes.
14558         (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
14559
14560 2002-06-13  Daniel Jacobowitz  <drow@mvista.com>
14561
14562         * regcache.c: Add comment.
14563
14564 2002-06-11  Daniel Jacobowitz  <drow@mvista.com>
14565
14566         * thread-db.c: New file.
14567         * proc-service.c: New file.
14568         * acinclude.m4: New file.
14569         * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
14570         proc-service.o, and thread-db.o.
14571         (linux-low.o): Add USE_THREAD_DB.
14572         * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
14573         HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
14574         * aclocal.m4: Regenerated.
14575         * config.in: Regenerated.
14576         * configure: Regenerated.
14577         * configure.in: Check for proc_service.h, sys/procfs.h,
14578         thread_db.h, and linux/elf.h headrs.
14579         Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
14580         PRFPREGSET_T_BROKEN.  Introduce srv_thread_depfiles and USE_THREAD_DB.
14581         Check for -lthread_db and thread support.
14582         * configure.srv: Enable thread_db support for ARM, i386, MIPS,
14583         PowerPC, and SuperH.
14584         * i387-fp.c: Constify arguments.
14585         * i387-fp.h: Likewise.
14586         * inferiors.c: (struct thread_info): Renamed from
14587         `struct inferior_info'.  Remove PID member.  Use generic inferior
14588         list header.  All uses updated.
14589         (inferiors, signal_pid): Removed.
14590         (all_threads): New variable.
14591         (get_thread): Define.
14592         (add_inferior_to_list): New function.
14593         (for_each_inferior): New function.
14594         (change_inferior_id): New function.
14595         (add_inferior): Removed.
14596         (remove_inferior): New function.
14597         (add_thread): New function.
14598         (free_one_thread): New function.
14599         (remove_thread): New function.
14600         (clear_inferiors): Use for_each_inferior and free_one_thread.
14601         (find_inferior): New function.
14602         (find_inferior_id): New function.
14603         (inferior_target_data): Update argument type.
14604         (set_inferior_target_data): Likewise.
14605         (inferior_regcache_data): Likewise.
14606         (set_inferior_regcache_data): Likewise.
14607         * linux-low.c (linux_bp_reinsert): Remove.
14608         (all_processes, stopping_threads, using_thrads)
14609         (struct pending_signals, debug_threads, pid_of): New.
14610         (inferior_pid): Replace with macro.
14611         (struct inferior_linux_data): Remove.
14612         (get_stop_pc, add_process): New functions.
14613         (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
14614         Use add_process and add_thread.
14615         (linux_attach_lwp): New function, based on old linux_attach.  Use
14616         add_process and add_thread.  Set stop_expected for new threads.
14617         (linux_attach): New function.
14618         (linux_kill_one_process): New function.
14619         (linux_kill): Kill all LWPs.
14620         (linux_thread_alive): Use find_inferior_id.
14621         (check_removed_breakpoints, status_pending_p): New functions.
14622         (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
14623         Update.  Use WNOHANG.  Wait for cloned processes also.  Update process
14624         struct for the found process.
14625         (linux_wait_for_event): New function.
14626         (linux_wait): Use it.  Support LWPs.
14627         (send_sigstop, wait_for_sigstop, stop_all_processes)
14628         (linux_resume_one_process, linux_continue_one_process): New functions.
14629         (linux_resume): Support LWPs.
14630         (REGISTER_RAW_SIZE): Remove.
14631         (fetch_register): Use register_size instead.  Call supply_register.
14632         (usr_store_inferior_registers): Likewise.  Call collect_register.
14633         Fix recursive case.
14634         (regsets_fetch_inferior_registers): Improve error message.
14635         (regsets_store_inferior_registers): Add debugging.
14636         (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
14637         (unstopped_p, linux_signal_pid): New functions.
14638         (linux_target_ops): Add linux_signal_pid.
14639         (linux_init_signals): New function.
14640         (initialize_low): Call it.  Initialize using_threads.
14641         * regcache.c (inferior_regcache_data): Add valid
14642         flag.
14643         (get_regcache): Fetch registers lazily.  Add fetch argument
14644         and update all callers.
14645         (regcache_invalidate_one, regcache_invalidate): New
14646         functions.
14647         (new_register_cache): Renamed from create_register_cache.
14648         Return the new regcache.
14649         (free_register_cache): Change argument to a void *.
14650         (registers_to_string, registers_from_string): Call get_regcache
14651         with fetch flag set.
14652         (register_data): Make static.  Pass fetch flag to get_regcache.
14653         (supply_register): Call get_regcache with fetch flag clear.
14654         (collect_register): Call get_regcache with fetch flag set.
14655         (collect_register_as_string): New function.
14656         * regcache.h: Update.
14657         * remote-utils.c (putpkt): Flush after debug output and use
14658         stderr.
14659         Handle input interrupts while waiting for an ACK.
14660         (input_interrupt): Use signal_pid method.
14661         (getpkt): Flush after debug output and use stderr.
14662         (outreg): Use collect_register_as_string.
14663         (new_thread_notify, dead_thread_notify): New functions.
14664         (prepare_resume_reply): Check using_threads.  Set thread_from_wait
14665         and general_thread.
14666         (look_up_one_symbol): Flush after debug output.
14667         * server.c (step_thread, server_waiting): New variables.
14668         (start_inferior): Don't use signal_pid.  Update call to mywait.
14669         (attach_inferior): Update call to mywait.
14670         (handle_query): Handle qfThreadInfo and qsThreadInfo.
14671         (main): Don't fetch/store registers explicitly.  Use
14672         set_desired_inferior.  Support proposed ``Hs'' packet.  Update
14673         calls to mywait.
14674         * server.h: Update.
14675         (struct inferior_list, struct_inferior_list_entry): New.
14676         * target.c (set_desired_inferior): New.
14677         (write_inferior_memory): Constify.
14678         (mywait): New function.
14679         * target.h: Update.
14680         (struct target_ops): New signal_pid method.
14681         (mywait): Removed macro, added prototype.
14682
14683         * linux-low.h (regset_func): Removed.
14684         (regset_fill_func, regset_store_func): New.
14685         (enum regset_type): New.
14686         (struct regset_info): Add type field.  Use new operation types.
14687         (struct linux_target_ops): stop_pc renamed to get_pc.
14688         Add decr_pc_after_break and breakpoint_at.
14689         (get_process, get_thread_proess, get_process_thread)
14690         (strut process_info, all_processes, linux_attach_lwp)
14691         (thread_db_init): New.
14692
14693         * linux-arm-low.c (arm_get_pc, arm_set_pc,
14694         arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
14695         (the_low_target): Add new members.
14696         * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
14697         (i386_store_fpxregset): Constify.
14698         (target_regsets): Add new kind identifier.
14699         (i386_get_pc): Renamed from i386_stop_pc.  Simplify.
14700         (i386_set_pc): Add debugging.
14701         (i386_breakpoint_at): New function.
14702         (the_low_target): Add new members.
14703         * linux-mips-low.c (mips_get_pc, mips_set_pc)
14704         (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
14705         (mips_breakpoint_at): New.
14706         (the_low_target): Add new members.
14707         * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
14708         (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
14709         (the_low_target): Add new members.
14710         * linux-sh-low.c (sh_get_pc, sh_set_pc)
14711         (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
14712         (the_low_target): Add new members.
14713         * linux-x86-64-low.c (target_regsets): Add new kind
14714         identifier.
14715
14716 2002-05-15  Daniel Jacobowitz  <drow@mvista.com>
14717
14718         From Martin Pool <mbp@samba.org>:
14719         * server.c (gdbserver_usage): New function.
14720         (main): Call it.
14721
14722 2002-05-14  Daniel Jacobowitz  <drow@mvista.com>
14723
14724         * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
14725         stop_at -> stop_pc.
14726
14727 2002-05-04  Andrew Cagney  <ac131313@redhat.com>
14728
14729         * Makefile.in: Remove obsolete code.
14730
14731 2002-04-24  Michal Ludvig  <mludvig@suse.cz>
14732
14733         * linux-low.c (regsets_fetch_inferior_registers),
14734         (regsets_store_inferior_registers): Removed cast to int from
14735         ptrace() calls.
14736         * regcache.h: Added declaration of struct inferior_info.
14737
14738 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
14739
14740         * inferiors.c (struct inferior_info): Add regcache_data.
14741         (add_inferior): Call create_register_cache.
14742         (clear_inferiors): Call free_register_cache.
14743         (inferior_regcache_data, set_inferior_regcache_data): New functions.
14744         * regcache.c (struct inferior_regcache_data): New.
14745         (registers): Remove.
14746         (get_regcache): New function.
14747         (create_register_cache, free_register_cache): New functions.
14748         (set_register_cache): Don't initialize the register cache here.
14749         (registers_to_string, registers_from_string, register_data): Call
14750         get_regcache.
14751         * regcache.h: Add prototypes.
14752         * server.h: Likewise.
14753
14754 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
14755
14756         * mem-break.c: New file.
14757         * mem-break.h: New file.
14758         * Makefile.in: Add mem-break.o rule; update server.h
14759         dependencies.
14760         * inferiors.c (struct inferior_info): Add target_data
14761         member.
14762         (clear_inferiors): Free target_data member if set.
14763         (inferior_target_data, set_inferior_target_data): New functions.
14764         * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
14765         (i386_stop_pc, i386_set_pc): New.  Add to the_low_target.
14766         * linux-low.c (linux_bp_reinsert): New variable.
14767         (struct inferior_linux_data): New.
14768         (linux_create_inferior): Use set_inferior_target_data.
14769         (linux_attach): Likewise.  Call add_inferior.
14770         (linux_wait_for_one_inferior): New function.
14771         (linux_wait): Call it.
14772         (linux_write_memory): Add const.
14773         (initialize_low): Call set_breakpoint_data.
14774         * linux-low.h (struct linux_target_ops): Add breakpoint
14775         handling members.
14776         * server.c (attach_inferior): Remove extra add_inferior
14777         call.
14778         * server.h: Include mem-break.h.  Update inferior.c
14779         prototypes.
14780         * target.c (read_inferior_memory)
14781         (write_inferior_memory): New functions.
14782         * target.h (read_inferior_memory)
14783         (write_inferior_memory): Change macros to prototypes.
14784         (struct target_ops): Update comments.  Add const to write_memory
14785         definition.
14786
14787 2002-04-11  Daniel Jacobowitz  <drow@mvista.com>
14788
14789         * linux-low.c (usr_store_inferior_registers): Support
14790         registers which are allowed to fail to store.
14791         * linux-low.h (linux_target_ops): Likewise.
14792         * linux-ppc-low.c (ppc_regmap): Support FPSCR.
14793         (ppc_cannot_store_register): FPSCR may not be storable.
14794
14795 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
14796
14797         * server.h: Include <string.h> if HAVE_STRING_H.
14798         * ChangeLog: Correct paths in last ChangeLog entry.
14799
14800 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
14801
14802         * linux-low.h: Remove obsolete prototypes.
14803         (struct linux_target_ops): New.
14804         (extern the_low_target): New.
14805         * linux-low.c (num_regs, regmap): Remove declarations.
14806         (register_addr): Use the_low_target explicitly.
14807         (fetch_register): Likewise.
14808         (usr_fetch_inferior_registers): Likewise.
14809         (usr_store_inferior_registers): Likewise.
14810         * linux-arm-low.c (num_regs): Remove.
14811         (arm_num_regs): Define.
14812         (arm_regmap): Renamed from regmap, made static.
14813         (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
14814         made static.
14815         (arm_cannot_store_register): Renamed from cannot_store_register,
14816         made static.
14817         (the_low_target): New.
14818         * linux-i386-low.c (num_regs): Remove.
14819         (i386_num_regs): Define.
14820         (i386_regmap): Renamed from regmap, made static.
14821         (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
14822         made static.
14823         (i386_cannot_store_register): Renamed from cannot_store_register,
14824         made static.
14825         (the_low_target): New.
14826         * linux-ia64-low.c (num_regs): Remove.
14827         (ia64_num_regs): Define.
14828         (ia64_regmap): Renamed from regmap, made static.
14829         (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
14830         made static.
14831         (ia64_cannot_store_register): Renamed from cannot_store_register,
14832         made static.
14833         (the_low_target): New.
14834         * linux-m68k-low.c (num_regs): Remove.
14835         (m68k_num_regs): Define.
14836         (m68k_regmap): Renamed from regmap, made static.
14837         (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
14838         made static.
14839         (m68k_cannot_store_register): Renamed from cannot_store_register,
14840         made static.
14841         (the_low_target): New.
14842         * linux-mips-low.c (num_regs): Remove.
14843         (mips_num_regs): Define.
14844         (mips_regmap): Renamed from regmap, made static.
14845         (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
14846         made static.
14847         (mips_cannot_store_register): Renamed from cannot_store_register,
14848         made static.
14849         (the_low_target): New.
14850         * linux-ppc-low.c (num_regs): Remove.
14851         (ppc_num_regs): Define.
14852         (ppc_regmap): Renamed from regmap, made static.
14853         (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
14854         made static.
14855         (ppc_cannot_store_register): Renamed from cannot_store_register,
14856         made static.
14857         (the_low_target): New.
14858         * linux-s390-low.c (num_regs): Remove.
14859         (s390_num_regs): Define.
14860         (s390_regmap): Renamed from regmap, made static.
14861         (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
14862         made static.
14863         (s390_cannot_store_register): Renamed from cannot_store_register,
14864         made static.
14865         (the_low_target): New.
14866         * linux-sh-low.c (num_regs): Remove.
14867         (sh_num_regs): Define.
14868         (sh_regmap): Renamed from regmap, made static.
14869         (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
14870         made static.
14871         (sh_cannot_store_register): Renamed from cannot_store_register,
14872         made static.
14873         (the_low_target): New.
14874         * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
14875         (the_low_target): New.
14876
14877 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
14878
14879         * Makefile.in: Add stamp-h target.
14880         * configure.in: Create stamp-h.
14881         * configure: Regenerated.
14882
14883 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
14884
14885         * inferiors.c: New file.
14886         * target.c: New file.
14887         * target.h: New file.
14888         * Makefile.in:  Add target.o and inferiors.o.  Update
14889         dependencies.
14890         * linux-low.c (inferior_pid): New static variable,
14891         moved from server.c.
14892         (linux_create_inferior): Renamed from create_inferior.
14893         Call add_inferior.  Return 0 on success instead of a PID.
14894         (linux_attach): Renamed from myattach.
14895         (linux_kill): Renamed from kill_inferior.  Call clear_inferiors ().
14896         (linux_thread_alive): Renamed from mythread_alive.
14897         (linux_wait): Renamed from mywait.  Call clear_inferiors () if the
14898         child dies.
14899         (linux_resume): Renamed from myresume.  Add missing ``return 0''.
14900         (regsets_store_inferior_registers): Correct error message.
14901         Add missing ``return 0''.
14902         (linux_fetch_registers): Renamed from fetch_inferior_registers.
14903         (linux_store_registers): Renamed from store_inferior_registers.
14904         (linux_read_memory): Renamed from read_inferior_memory.
14905         (linux_write_memory): Renamed from write_inferior_memory.
14906         (linux_target_ops): New structure.
14907         (initialize_low): Call set_target_ops ().
14908         * remote-utils.c (unhexify): New function.
14909         (hexify): New function.
14910         (input_interrupt): Send signals to ``signal_pid''.
14911         * server.c (inferior_pid): Remove.
14912         (start_inferior): Update create_inferior call.
14913         (attach_inferior): Call add_inferior.
14914         (handle_query): New function.
14915         (main): Call handle_query for `q' packets.
14916         * server.h: Include "target.h".  Remove obsolete prototypes.
14917         Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
14918
14919 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
14920
14921         * Makefile.in: Add WARN_CFLAGS.  Update configury
14922         dependencies.
14923         * configure.in: Check for <string.h>
14924         * configure: Regenerate.
14925         * config.in: Regenerate.
14926         * gdbreplay.c: Include needed system headers.
14927         (remote_open): Remove strchr prototype.
14928         * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
14929         * regcache.c (supply_register): Change buf argument to const void *.
14930         (supply_register_by_name): Likewise.
14931         (collect_register): Change buf argument to void *.
14932         (collect_register_by_name): Likewise.
14933         * regcache.h: Add missing prototypes.
14934         * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
14935         * server.c (handle_query): New function.
14936         (attached): New static variable, moved out of main.
14937         (main): Quiet longjmp clobber warnings.
14938         * server.h: Add ATTR_NORETURN and ATTR_FORMAT.  Update prototypes.
14939         * utils.c (error): Remove NORETURN.
14940         (fatal): Likewise.