6648a1ed53648504d731a1e2b801574429bbe18c
[external/binutils.git] / gdb / gdbserver / ChangeLog
1 2019-03-04  Sergio Durigan Junior  <sergiodj@redhat.com>
2
3         * configure.srv: Use '$enable_unittest' instead of '$development'
4         when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
5         case.
6
7 2019-02-07  Alan Hayward  <alan.hayward@arm.com>
8
9         * linux-low.c (linux_attach): Add process before lwp.
10         * server.c (attach_inferior): Check if already attached.
11
12 2019-02-07  Tom Tromey  <tom@tromey.com>
13
14         * x86-tdesc.h: Rename include guard.
15         * x86-low.h: Add include guard.
16         * wincecompat.h: Rename include guard.
17         * win32-low.h: Add include guard.
18         * utils.h: Rename include guard.
19         * tracepoint.h: Rename include guard.
20         * tdesc.h: Rename include guard.
21         * target.h: Rename include guard.
22         * server.h: Rename include guard.
23         * remote-utils.h: Rename include guard.
24         * regcache.h: Rename include guard.
25         * nto-low.h: Rename include guard.
26         * notif.h: Add include guard.
27         * mem-break.h: Rename include guard.
28         * lynx-low.h: Add include guard.
29         * linux-x86-tdesc.h: Add include guard.
30         * linux-s390-tdesc.h: Add include guard.
31         * linux-ppc-tdesc-init.h: Add include guard.
32         * linux-low.h: Add include guard.
33         * linux-aarch64-tdesc.h: Add include guard.
34         * linux-aarch32-low.h: Add include guard.
35         * inferiors.h: Rename include guard.
36         * i387-fp.h: Rename include guard.
37         * hostio.h: Rename include guard.
38         * gdbthread.h: Rename include guard.
39         * gdb_proc_service.h: Rename include guard.
40         * event-loop.h: Rename include guard.
41         * dll.h: Rename include guard.
42         * debug.h: Rename include guard.
43         * ax.h: Rename include guard.
44
45 2018-01-30  Szabolcs Nagy  <szabolcs.nagy@arm.com>
46
47         PR gdb/23985
48         * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
49         (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
50
51 2019-01-25  Tom Tromey  <tom@tromey.com>
52
53         * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
54
55 2019-01-25  Tom Tromey  <tom@tromey.com>
56
57         * win32-low.c: Fix common/ includes.
58         * win32-i386-low.c: Fix common/ includes.
59         * tracepoint.c: Fix common/ includes.
60         * thread-db.c: Fix common/ includes.
61         * target.h: Fix common/ includes.
62         * symbol.c: Fix common/ includes.
63         * spu-low.c: Fix common/ includes.
64         * server.h: Fix common/ includes.
65         * server.c: Fix common/ includes.
66         * remote-utils.c: Fix common/ includes.
67         * regcache.h: Fix common/ includes.
68         * regcache.c: Fix common/ includes.
69         * nto-x86-low.c: Fix common/ includes.
70         * notif.h: Fix common/ includes.
71         * mem-break.h: Fix common/ includes.
72         * lynx-low.c: Fix common/ includes.
73         * lynx-i386-low.c: Fix common/ includes.
74         * linux-x86-tdesc-selftest.c: Fix common/ includes.
75         * linux-x86-low.c: Fix common/ includes.
76         * linux-low.c: Fix common/ includes.
77         * inferiors.h: Fix common/ includes.
78         * i387-fp.c: Fix common/ includes.
79         * hostio.c: Fix common/ includes.
80         * hostio-errno.c: Fix common/ includes.
81         * gdbthread.h: Fix common/ includes.
82         * gdbreplay.c: Fix common/ includes.
83         * fork-child.c: Fix common/ includes.
84         * event-loop.c: Fix common/ includes.
85         * ax.c: 
86         (enum gdb_agent_op): Fix common/ includes.
87
88 2019-01-21  Tom Tromey  <tom@tromey.com>
89
90         * tracepoint.c: Fix includes.
91         * remote-utils.c: Fix includes.
92         * linux-x86-low.c: Fix includes.
93
94 2019-01-01  Joel Brobecker  <brobecker@adacore.com>
95
96         * gdbreplay.c (gdbreplay_version): Update copyright year in
97         version message.
98         * server.c (gdbserver_version): Likewise.
99
100 2018-12-05  Alan Hayward  <alan.hayward@arm.com>
101
102         * linux-low.c (add_lwp): Switch ordering.
103
104 2018-11-29  Tom Tromey  <tom@tromey.com>
105
106         * win32-low.c (win32_join): Take pid, not process.
107         * target.h (struct target_ops) <join>: Change argument type.
108         (join_inferior): Change argument name.
109         * spu-low.c (spu_join): Take pid, not process.
110         * server.c (handle_detach): Preserve pid before destroying
111         process.
112         * lynx-low.c (lynx_join): Take pid, not process.
113         * linux-low.c (linux_join): Take pid, not process.
114
115 2018-11-23  Alan Hayward  <alan.hayward@arm.com>
116
117         * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
118         (aarch64_cannot_fetch_register): Likewise.
119         (struct linux_target_ops): Update references.
120
121 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
122
123         * linux-ppc-low.c: Include nat/linux-ptrace.h.
124
125 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
126
127         * configure.srv (ipa_ppc_linux_regobj): Add
128         powerpc-isa207-htm-vsx32l-ipa.o and
129         powerpc-isa207-htm-vsx64l-ipa.o.
130         (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
131         powerpc-isa207-htm-vsx64l.o to srv_regobj.  Add
132         rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
133         rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
134         rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
135         rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
136         rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
137         and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
138         * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
139         <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
140         (init_registers_powerpc_isa207_htm_vsx32l)
141         (init_registers_powerpc_isa207_htm_vsx64l): Declare.
142         * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
143         (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
144         (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
145         (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
146         (ppc_store_tm_ctarregset): New functions.
147         (ppc_regsets): Add entries for HTM regsets.
148         (ppc_arch_setup): Set htm in features struct when needed.  Set
149         sizes for the HTM regsets.
150         (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
151         (initialize_low_arch): Call
152         init_registers_powerpc_isa207_htm_vsx32l and
153         init_registers_powerpc_isa207_htm_vsx64l.
154         * linux-ppc-ipa.c (get_ipa_tdesc): Handle
155         PPC_TDESC_ISA207_HTM_VSX.
156         (initialize_low_tracepoint): Call
157         init_registers_powerpc_isa207_htm_vsx32l and
158         init_registers_powerpc_isa207_htm_vsx64l.
159
160 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
161
162         * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
163         rs6000/power-linux-pmu.xml to srv_xmlfiles.
164         * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
165         (ppc_store_pmuregset): New functions.
166         (ppc_regsets): Add entries for ebb and pmu regsets.
167         (ppc_arch_setup): Set isa207 in features struct if the ebb and
168         pmu regsets are available.  Set sizes for these regsets.
169
170 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
171
172         * configure.srv (ipa_ppc_linux_regobj): Add
173         powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
174         (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
175         powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
176         rs6000/powerpc-isa207-vsx32l.xml, and
177         rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
178         * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
179         <PPC_TDESC_ISA207_VSX>: New enum value.
180         (init_registers_powerpc_isa207_vsx32l): Declare.
181         (init_registers_powerpc_isa207_vsx64l): Declare.
182         * linux-ppc-low.c (ppc_fill_tarregset): New function.
183         (ppc_store_tarregset): New function.
184         (ppc_regsets): Add entry for the TAR regset.
185         (ppc_arch_setup): Set isa207 in features struct when needed.  Set
186         size for the TAR regsets.
187         (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
188         (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
189         and init_registers_powerpc_isa207_vsx64l.
190         * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
191         (initialize_low_tracepoint): Call
192         init_registers_powerpc_isa207_vsx32l and
193         init_registers_powerpc_isa207_vsx64l.
194
195 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
196             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
197
198         * configure.srv (ipa_ppc_linux_regobj): Add
199         powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
200         powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
201         (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
202         powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
203         rs6000/power-dscr.xml, rs6000/power-ppr.xml,
204         rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
205         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
206         * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
207         <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
208         (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
209         (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
210         * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
211         (ppc_hwcap): Add comment.
212         (ppc_hwcap2): New global.
213         (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
214         (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
215         (ppc_regsets): Add entries for the DSCR and PPR regsets.
216         (ppc_arch_setup): Get AT_HWCAP2.  Set ppr_dscr in features struct
217         when needed.  Set sizes for the the DSCR and PPR regsets.
218         (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
219         (initialize_low_arch): Call
220         init_registers_powerpc_isa205_ppr_dscr_vsx32l and
221         init_registers_powerpc_isa205_ppr_dscr_vsx64l.
222         * linux-ppc-ipa.c (get_ipa_tdesc): Handle
223         PPC_TDESC_ISA205_PPR_DSCR_VSX.
224         (initialize_low_tracepoint): Call
225         init_registers_powerpc_isa205_ppr_dscr_vsx32l and
226         init_registers_powerpc_isa205_ppr_dscr_vsx64l.
227
228 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
229
230         * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
231
232 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
233             Simon Marchi <simark@simark.ca>
234
235         * acinclude.m4: Include "../selftest.m4".
236         * configure: Regenerate.
237         * configure.ac: Use "GDB_AC_SELFTEST".
238         * configure.srv: Use "$enable_unittests" instead of
239         "$development" when checking whether unit tests have been
240         enabled.
241         * server.c (captured_main): Update message informing that
242         selftests have been disabled.
243
244 2018-10-04  Tom Tromey  <tom@tromey.com>
245
246         * configure: Rebuild.
247
248 2018-10-04  Tom Tromey  <tom@tromey.com>
249
250         * server.c (handle_status): Rename inner "thread".
251         (process_serial_event): Declare "res" in 'm' case.
252         * linux-low.c (last_thread_of_process_p, find_lwp_pid)
253         (iterate_over_lwps): Rename inner "thread".
254         (linux_qxfer_libraries_svr4): Rename inner "len".
255         * gdbthread.h (find_thread_in_random): Rename inner "thread".
256
257 2018-10-01  Gary Benson <gbenson@redhat.com>
258
259         * gdb_proc_service.h: Moved common code to
260         common/gdb_proc_service.h.
261
262 2018-10-01  Gary Benson <gbenson@redhat.com>
263
264         * gdb_proc_service.h: Synchronize comments and whitespace with
265         GDB's version of this file.
266
267 2018-09-25  Tom Tromey  <tom@tromey.com>
268
269         * configure: Rebuild.
270         * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
271
272 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
273
274         * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
275         (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
276         ($(IPA_LIB)): Sort IPA_OBJS.
277
278 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
279
280         * Makefile.in: Remove references to $(ADD_DEPS).
281
282 2018-09-16  Tom Tromey  <tom@tromey.com>
283
284         * remote-utils.c (remote_open): Use GNU style for metasyntactic
285         variables.
286         * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
287         variables.
288
289 2018-09-05  Tom Tromey  <tom@tromey.com>
290
291         * configure: Rebuild.
292
293 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
294
295         PR build/23399
296         * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
297
298 2018-08-27  Tom Tromey  <tom@tromey.com>
299
300         PR build/23087:
301         * configure: Rebuild.
302
303 2018-08-27  Tom Tromey  <tom@tromey.com>
304
305         * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
306         (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
307         (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
308         (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
309         (s390x_emit_stack_adjust): Add casts to unsigned char.
310
311 2018-08-22  Simon Marchi  <simon.marchi@ericsson.com>
312
313         PR gdb/23374
314         PR gdb/23375
315         * server.h (struct client_state) <disable_randomization>:
316         Initialize to 1.
317
318 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
319
320         * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
321         variable.
322         (mips_supply_ptrace_register): Likewise.
323
324 2018-07-22  Tom Tromey  <tom@tromey.com>
325
326         * configure: Rebuild.
327
328 2018-07-22  Tom Tromey  <tom@tromey.com>
329
330         * win32-low.c (win32_create_inferior): Remove unused variables.
331         * gdbreplay.c (remote_open): Remove unused variable.
332         * remote-utils.c (remote_prepare): Remove unused variable.
333         * x86-tdesc.h (X86_TDESC_H): Define.
334         (amd64_expedite_regs): Define conditionally.
335         (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
336         * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
337         * remote-utils.c (readchar): Remove unused variable.
338
339 2018-07-13  Pedro Alves  <palves@redhat.com>
340
341         * linux-low.c (linux_kill): Change parameter to process_info
342         pointer instead of pid.  Adjust.
343         * lynx-low.c (lynx_kill): Likewise.
344         * nto-low.c (nto_kill): Likewise.
345         * spu-low.c (spu_kill): Likewise.
346         * win32-low.c (win32_kill): Likewise.
347         * server.c (handle_v_kill, kill_inferior_callback)
348         (detach_or_kill_for_exit): Adjust.
349         * target.c (kill_inferior): Change parameter to process_info
350         pointer instead of pid.  Adjust.
351         * target.h (struct target_ops) <kill>: Change parameter to
352         process_info pointer instead of pid.  Adjust all implementations
353         and callers.
354         (kill_inferior): Likewise.
355
356 2018-07-13  Pedro Alves  <palves@redhat.com>
357
358         * linux-low.c (linux_detach, linux_join): Change parameter to
359         process_info pointer instead of pid.  Adjust.
360         * lynx-low.c (lynx_detach, lynx_join): Likewise.
361         * nto-low.c (nto_detach): Likewise.
362         * spu-low.c (spu_detach, spu_join): Likewise.
363         * win32-low.c (win32_detach, win32_join): Likewise.
364         * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
365         * target.h (struct target_ops) <detach, join>: Change parameter to
366         process_info pointer instead of pid.  Adjust all implementations
367         and callers.
368         (detach_inferior, join_inferior): Rename 'pid' parameter to
369         'proc'.
370
371 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
372             Jan Kratochvil  <jan.kratochvil@redhat.com>
373             Paul Fertser  <fercerpav@gmail.com>
374             Tsutomu Seki  <sekiriki@gmail.com>
375
376         * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
377         (OBS): Add 'common/netstuff.o'.
378         (GDBREPLAY_OBS): Likewise.
379         * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
380         (remote_open): Implement support for IPv6
381         connections.
382         * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
383         and 'wspiapi.h'.
384         (handle_accept_event): Accept connections from IPv6 sources.
385         (remote_prepare): Handle IPv6-style hostnames; implement
386         support for IPv6 connections.
387         (remote_open): Implement support for printing connections from
388         IPv6 sources.
389
390 2018-07-11  Pedro Alves  <palves@redhat.com>
391
392         PR gdb/23377
393         * mem-break.c (any_persistent_commands): Add process_info
394         parameter and use it instead of relying on the current process.
395         Change return type to bool.
396         * mem-break.h (any_persistent_commands): Add process_info
397         parameter and change return type to bool.
398         * server.c (handle_detach): Remove require_running_or_return call.
399         Look up the process_info for the process we're about to detach.
400         If not found, return back error to GDB.  Adjust
401         any_persistent_commands call to pass down a process pointer.
402
403 2018-07-11  Pedro Alves  <palves@redhat.com>
404
405         * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
406         (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
407         instead of collect_register_by_name.
408         * regcache.c (regcache_raw_get_unsigned_by_name): New.
409         * regcache.h (regcache_raw_get_unsigned_by_name): New.
410
411 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
412             Pedro Alves  <palves@redhat.com>
413
414         * linux-low.c (initialize_low): Call linux_proc_init_warnings.
415
416 2018-07-03  Tom Tromey  <tom@tromey.com>
417
418         * linux-low.c: Update.
419         * lynx-low.c: Update.
420         * mem-break.c: Update.
421         * nto-low.c: Update.
422         * remote-utils.c: Update.
423         * server.c: Update.
424         * spu-low.c: Update.
425         * target.c: Update.
426         * win32-low.c: Update.
427
428 2018-07-03  Tom Tromey  <tom@tromey.com>
429
430         * server.c: Update.
431
432 2018-07-03  Tom Tromey  <tom@tromey.com>
433
434         * linux-low.c: Update.
435
436 2018-07-03  Tom Tromey  <tom@tromey.com>
437
438         * target.c: Update.
439
440 2018-07-03  Tom Tromey  <tom@tromey.com>
441
442         * linux-low.c: Update.
443         * linux-mips-low.c: Update.
444         * lynx-low.c: Update.
445         * nto-low.c: Update.
446         * remote-utils.c: Update.
447         * server.c: Update.
448         * spu-low.c: Update.
449         * target.c: Update.
450         * thread-db.c: Update.
451
452 2018-07-03  Tom Tromey  <tom@tromey.com>
453
454         * linux-low.c: Update.
455         * linux-mips-low.c: Update.
456         * lynx-low.c: Update.
457         * mem-break.c: Update.
458         * nto-low.c: Update.
459         * remote-utils.c: Update.
460         * server.c: Update.
461         * spu-low.c: Update.
462         * target.c: Update.
463         * tracepoint.c: Update.
464
465 2018-07-03  Tom Tromey  <tom@tromey.com>
466
467         * linux-low.c: Update.
468         * linux-ppc-low.c: Update.
469         * linux-x86-low.c: Update.
470         * proc-service.c: Update.
471         * server.c: Update.
472         * spu-low.c: Update.
473         * thread-db.c: Update.
474         * win32-low.c: Update.
475
476 2018-07-03  Tom Tromey  <tom@tromey.com>
477
478         * linux-low.c: Update.
479         * lynx-low.c: Update.
480         * nto-low.c: Update.
481         * remote-utils.c: Update.
482         * spu-low.c: Update.
483         * thread-db.c: Update.
484         * win32-low.c: Update.
485
486 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
487
488         * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
489         parameter in call to 'amd64_create_target_description'.
490
491 2018-06-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
492
493         * x86-tdesc.h: Remove executable permission flag.
494
495 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
496
497         * configure.ac: Remove AC_PREREQ, add missing quoting.
498         * configure: Re-generate.
499         * config.in: Re-generate.
500         * aclocal.m4: Re-generate.
501
502 2018-06-18  Simon Marchi  <simon.marchi@ericsson.com>
503
504         * tracepoint.h (current_traceframe): Remove declaration.
505
506 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
507
508         * linux-aarch64-low.c (is_sve_tdesc): New function.
509         (aarch64_sve_regs_copy_to_regcache): Likewise.
510         (aarch64_sve_regs_copy_from_regcache): Likewise.
511         (aarch64_regs_info): Add SVE checks.
512         (initialize_low_arch): Initialize SVE.
513
514 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
515
516         * Makefile.in: Add aarch64-sve-linux-ptrace.c.
517
518 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
519
520         * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
521         (initialize_low_tracepoint): Likewise
522         * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
523         * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
524         param.
525         * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
526         checks.
527         * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
528
529 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
530
531         * server.h (PBUFSIZ): Increase size
532
533 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
534
535         * regcache.c (regcache::raw_compare): New function.
536         * regcache.h (regcache::raw_compare): New declaration.
537
538 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
539
540         * regcache.c (new_register_cache): Use new.
541         (free_register_cache): Use delete.
542         (register_data): Use const.
543         (supply_register): Move body inside regcache.
544         (regcache::raw_supply): New override function.
545         (collect_register): Move body inside regcache.
546         (regcache::raw_collect): New override function.
547         (regcache::get_register_status): New override function.
548         * regcache.h (struct regcache): Inherit from reg_buffer_common.
549
550 2018-06-09  Tom Tromey  <tom@tromey.com>
551
552         * event-loop.c (gdb_event, gdb_event_p): Remove typedefs.  Don't
553         declare queue.
554         (event_queue): Use std::queue.
555         (gdb_event_xfree): Remove.
556         (initialize_event_loop, process_event, wait_for_event): Update.
557
558 2018-06-08  Stan Cox  <scox@redhat.com>
559
560         * win32-low.c (win32_create_inferior):  last_ptid and last_status
561         moved to client_state.
562
563 2018-06-08  Pedro Alves  <palves@redhat.com>
564
565         * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
566         common/common-exceptions.o, common/common-utils.o,
567         common/errors.o, common/print-utils.o and utils.o.
568         * gdbreplay.c: Include "common-defs.h" instead of the two
569         'config.h's here.  Don't include stdio.h, errno.h, stdlib.h,
570         string.h or alloca.h.
571         (perror_with_name): Delete.
572         (remote_open): Use xstrdup instead of strdup.
573         (main): Rename to ...
574         (captured_main): ... this.
575         (main): New.
576
577 2018-06-08  Tom Tromey  <tom@tromey.com>
578
579         * linux-low.c (linux_low_read_btrace): Update.
580
581 2018-06-04  Stan Cox  <scox@redhat.com>
582
583         * server.h (struct client_state): New.
584         * server.c (cont_thread, general_thread, multi_process)
585         (report_fork_events, report_vfork_events, report_exec_events)
586         (report_thread_events, swbreak_feature, hwbreak_feature)
587         (vCont_supported, disable_randomization, pass_signals)
588         (program_signals, program_signals_p, last_status, last_ptid, own_buf):
589         Moved to client_state.
590         * remote-utils.c (remote_debug, noack_mode)
591         (transport_is_reliable): Moved to client_state.
592         * tracepoint.c (current_traceframe): Moved to client_state.
593
594         Update all callers.
595         * server.c, remote-utils.c, tracepoint.c, fork-child.c,
596         linux-low.c, remote-utils.h, target.c: Use client_state.
597
598 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
599
600         * configure.srv: Add new c/h file.
601
602 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
603
604         * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
605         null VQ.
606
607 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
608
609         * gdb.arch/mips-fpregset-core.exp: New test.
610         * gdb.arch/mips-fpregset-core.c: New test source.
611
612 2018-05-23  Erik Kurzinger  <ekurzinger@nvidia.com>
613
614         PR server/23198
615         * hostio.c (require_int): Do not report overflow for integers
616         between 0xfffffff and 0x7fffffff.
617
618 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
619
620         * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
621         (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
622         (mips_collect_ptrace_register, mips_supply_ptrace_register): New
623         functions.
624         (the_low_target): Wire them.
625
626 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
627
628         * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
629         Set vscr_offset to 0 in little-endian mode and 12 in big-endian
630         mode. Call collect_register_by_name with vscr using
631         vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
632         (ppc_store_vrregset): Add and set vscr_offset variable as in
633         ppc_fill_vrregset. Call supply_register_by_name with vscr using
634         vscr_offset.
635
636 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
637
638         * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
639         (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
640         PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
641
642 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
643
644         * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
645         (ppc_store_vsxregset): Likewise.
646         (ppc_fill_vrregset): Likewise.
647         (ppc_store_vrregset): Likewise.
648         (ppc_fill_evrregset): Likewise.
649         (ppc_store_evrregset): Likewise.
650         (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
651         (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
652         needed.
653
654 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
655
656         * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
657         wordsize of the inferior. Call ppc_linux_target_wordsize.
658
659 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
660
661         * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
662         * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
663         * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
664         * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
665         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
666         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
667         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
668         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
669         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
670         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
671         (tdesc_powerpc_e500l): Remove.
672         * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
673         linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
674         * linux-ppc-low.c: Include arch/ppc-linux-common.h,
675         arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
676         linux-ppc-tdesc.h.
677         (ppc_arch_setup): Remove target description matching code. Fill a
678         ppc_linux_features struct and call ppc_linux_match_description
679         with it.
680
681 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
682
683         * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
684         width of the requested register exceeds the width of the
685         `ptrace' data type.
686         (mips_cannot_store_register): Likewise.
687
688 2018-05-21  Maciej W. Rozycki  <macro@mips.com>
689
690         * linux-mips-low.c (mips_fetch_register): New function.  Update
691         preceding comment.
692         (mips_store_gregset): Supply 0 rather than $restart for $zero.
693         (the_low_target): Wire `mips_fetch_register'.
694
695 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
696
697         * lynx-i386-low.c (LYNXOS_178): New macro.
698         [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
699         the layout on LynxOS-178.
700         (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
701         handle floating point registers that are not supported by
702         LynxOS-178.
703
704 2018-05-10  Tom Tromey  <tom@tromey.com>
705
706         * configure: Rebuild.
707
708 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
709
710         PR server/23158:
711         * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
712         * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
713         Use it to set the expedite_regs field in the given tdesc.
714         * x86-tdesc.h: New file.
715         * linux-aarch64-tdesc.c (aarch64_linux_read_description):
716         Adjust following the addition of the new expedite_regs parameter
717         to init_target_desc.
718         * linux-tic6x-low.c (tic6x_read_description): Likewise.
719         * linux-x86-tdesc.c: #include "x86-tdesc.h".
720         (i386_linux_read_description, amd64_linux_read_description):
721         Adjust following the addition of the new expedite_regs parameter
722         to init_target_desc.
723         * lynx-i386-low.c: #include "x86-tdesc.h".
724         (lynx_i386_arch_setup): Adjust following the addition of the new
725         expedite_regs parameter to init_target_desc.
726         * nto-x86-low.c: #include "x86-tdesc.h".
727         (nto_x86_arch_setup): Adjust following the addition of the new
728         expedite_regs parameter to init_target_desc.
729         * win32-i386-low.c: #include "x86-tdesc.h".
730         (i386_arch_setup): Adjust following the addition of the new
731         expedite_regs parameter to init_target_desc.
732
733 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
734
735         PR server/23158:
736         * win32-low.c (win32_create_inferior): Add call to my_wait
737         setting last_status global.
738
739 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
740
741         PR server/23158:
742         * win32-low.c (create_process): Only call gdb_tilde_expand if
743         inferior_cwd is not NULL.
744
745 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
746
747         * i387-fp.c (i387_cache_to_xsave): Only write x87 control
748         registers to the cache if their values have changed.
749         (i387_xsave_to_cache): Provide default values for x87 control
750         registers when these features are available, but disabled.
751         * regcache.c (supply_register_by_name_zeroed): New function.
752         * regcache.h (supply_register_by_name_zeroed): Declare new
753         function.
754
755 2018-05-07  Tom Tromey  <tom@tromey.com>
756
757         * configure: Rebuild.
758
759 2018-05-04  Tom Tromey  <tom@tromey.com>
760
761         * configure: Rebuild.
762
763 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
764             Pedro Alves <palves@redhat.com>
765
766         * linux-aarch64-low.c (aarch64_stopped_data_address):
767         Likewise.
768
769 2018-04-27  Tom Tromey  <tom@tromey.com>
770
771         * configure: Rebuild.
772
773 2018-04-23  Tom Tromey  <tom@tromey.com>
774
775         * configure: Rebuild.
776
777 2018-04-19  Simon Marchi  <simon.marchi@ericsson.com>
778
779         * Makefile.in (depcomp): Add "..".
780         (all_deps_files): New and use it.
781
782 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
783
784         * configure.srv (aarch64*-*-linux*): Don't include xml.
785         (i[34567]86-*-cygwin*): Likewise.
786         (i[34567]86-*-linux*): Likewise.
787         (i[34567]86-*-lynxos*): Likewise.
788         (i[34567]86-*-mingw32ce*): Likewise.
789         (i[34567]86-*-mingw*): Likewise.
790         (i[34567]86-*-nto*): Likewise.
791         (tic6x-*-uclinux): Likewise.
792         (x86_64-*-linux*): Likewise.
793         (x86_64-*-mingw*): Likewise.
794         (x86_64-*-cygwin*): Likewise.
795
796 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
797
798         * tdesc.c: Remove xml parameter.
799
800 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
801
802         * server.c (get_features_xml): Remove cast.
803         * tdesc.c (void target_desc::accept): Fill in function.
804         (tdesc_get_features_xml): Remove old xml creation.
805         (print_xml_feature::visit_pre): Add xml vistor.
806         * tdesc.h (struct target_desc): Make xmltarget mutable.
807         (tdesc_get_features_xml): Remove declaration.
808
809 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
810
811         * tdesc.c (tdesc_architecture_name): Add new function.
812         (tdesc_osabi_name): Likewise.
813         (tdesc_get_features_xml): Use new functions.
814
815 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
816
817         * tdesc.c (tdesc_create_flags): Remove.
818         (tdesc_add_flag): Likewise.
819         (tdesc_named_type): Likewise.
820         (tdesc_create_union): Likewise.
821         (tdesc_create_struct): Likewise.
822         (tdesc_create_vector): Likewise.
823         (tdesc_add_bitfield): Likewise.
824         (tdesc_add_field): Likewise.
825         (tdesc_set_struct_size): Likewise.
826
827 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
828
829         * tdesc.c (~target_desc): Remove implictly deleted items.
830         (init_target_desc): Iterate all features.
831         (tdesc_get_features_xml): Use vector.
832         (tdesc_create_feature): Create feature.
833         * tdesc.h (tdesc_feature) Remove
834         (target_desc): Add features.
835
836 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
837
838         * Makefile.in: Add common/tdesc.c
839         * tdesc.c (init_target_desc): init all reg_defs from register
840         vector.
841         (tdesc_create_reg): Create tdesc_reg.
842         * tdesc.h (tdesc_feature): Add register vector.
843
844 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
845
846         * tdesc.h (struct target_desc) <features>: Change type to
847         std::vector<std::string>.
848         * tdesc.c (target_desc::~target_desc): Adjust to std::vector
849         changes.
850         (tdesc_get_features_xml): Likewise.
851         (tdesc_create_feature): Likewise.
852
853 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
854
855         * regcache.c (find_register_by_number): Return a ref.
856         (find_regno): Use references.
857         (register_size): Likewise.
858         (register_data): Likewise.
859         * tdesc.c (target_desc::~target_desc): Remove free calls.
860         (target_desc::operator==): Use std::vector compare.
861         (init_target_desc): Use reference.
862         (tdesc_create_reg): Use reg constructors.
863         * tdesc.h (struct target_desc): Replace pointer with object.
864
865 2018-03-23  Alan Hayward  <alan.hayward@arm.com>
866
867         * regcache.c (find_register_by_number): Make static.
868         (find_regno): Use find_register_by_number
869         * regcache.h (struct reg): Remove declaration.
870
871 2018-03-23  Alan Hayward  <alan.hayward@arm.com>
872
873         * tdesc.c (target_desc::~target_desc): Move to here.
874         (target_desc::operator==): Likewise.
875         * tdesc.h (target_desc::~target_desc): Move from here.
876         (target_desc::operator==): Likewise.
877
878 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
879
880         * linux-s390-low.c (s390_get_wordsize): Correct brace style.
881
882 2018-03-21  Andreas Arnez  <arnez@linux.vnet.ibm.com>
883
884         * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
885         S390_TDESC_GS.
886         * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
887         (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
888         and init_registers_s390_gs_linux64.
889
890 2018-03-21  Andreas Arnez  <arnez@linux.vnet.ibm.com>
891
892         * linux-s390-low.c (s390_fill_gs): Remove function.
893         (s390_fill_gsbc): Remove function.
894         (s390_regsets): Set fill functions for the guarded storage regsets
895         to NULL.
896
897 2018-03-21  Andreas Arnez  <arnez@linux.vnet.ibm.com>
898
899         * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
900         the word size.  Add comment.
901         (s390_get_wordsize): New function.
902         (s390_arch_setup): No longer select a temporary tdesc to fetch the
903         pswm with it.  Instead, use s390_get_wordsize to determine the
904         word size first and derive the correct tdesc from that directly.
905
906 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
907
908         * Makefile.in: Include silent-rules.mk.
909         (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
910         (COMPILE): Add ECHO_CXX.
911         (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
912         (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
913         ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
914         (version-generated.c): Add ECHO_GEN.
915         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
916         (IPAGENT_COMPILE): Add ECHO_CXX.
917         (%-generated.c): Add ECHO_REGDAT.
918
919 2018-03-14  Tom Tromey  <tom@tromey.com>
920
921         PR cli/14977:
922         * ax.c (ax_printf): Special case for NULL.
923
924 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
925
926         * linux-low.c (linux_qxfer_libraries_svr4): Use
927         xml_escape_text_append.
928
929 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
930
931         * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
932
933 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
934
935         * server.c (handle_general_set): Remove unnecessary xstrdup.
936
937 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
938
939         * server.c (parse_debug_format_options): Adjust to
940         delim_string_to_char_ptr_vec changes.
941         * thread-db.c (thread_db_load_search): Adjust to
942         dirnames_to_char_ptr_vec changes.
943
944 2018-03-01  Markus Metzger  <markus.t.metzger@intel.com>
945
946         * target.h (target_enable_btrace, target_disable_btrace)
947         (target_read_btrace, target_read_btrace_conf): Turn macro into
948         inline function.  Throw error if target method is not defined.
949         * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
950         check for btrace target method.  Be prepared to handle exceptions
951         from btrace target methods.
952
953 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
954
955         * server.c (captured_main): Change order of error message printed
956         when the current working directory cannot be found.
957
958 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
959
960         * server.c: Include "filenames.h" and "pathstuff.h".
961         (program_name): Delete variable.
962         (program_path): New anonymous class.
963         (get_exec_wrapper): Use "program_path" instead of
964         "program_name".
965         (handle_v_run): Likewise.
966         (captured_main): Likewise.
967         (process_serial_event): Likewise.
968
969 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
970
971         * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
972         (OBJS): Add "pathstuff.o".
973         * server.c (current_directory): New global variable.
974         (captured_main): Initialize "current_directory".
975
976 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
977
978         * tdesc.c: Use common/tdesc.h.
979         * tdesc.h: Likewise.
980
981 2018-02-20  Alan Hayward  <alan.hayward@arm.com>
982             Simon Marchi  <simon.marchi@ericsson.com>
983
984         * Makefile.in: Switch order of make rules.
985
986 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
987
988         * Makefile.in: Add common directory in build.
989         * configure.ac: Add common reference.
990         * configure: Regenerate.
991
992 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
993
994         * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
995         * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
996         * spu-low.c (spu_target_ops): Likewise.
997         * win32-low.c (win32_target_ops): Likewise.
998         * server.c (supported_btrace_packets): Report packets unconditionally.
999         * target.h (target_ops) <supports_btrace>: Remove.
1000         (target_supports_btrace): Remove.
1001
1002 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
1003
1004         * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1005         (handle_btrace_disable): Change return type to void.  Use exceptions
1006         to report errors.
1007         (handle_btrace_general_set): Catch exception and copy message to
1008         return message.
1009
1010 2018-02-08  Tom Tromey  <tom@tromey.com>
1011
1012         * linux-low.c (install_software_single_step_breakpoints): Use
1013         make_scoped_restore.
1014         * inferiors.c (make_cleanup_restore_current_thread): Remove.
1015         (do_restore_current_thread_cleanup): Remove.
1016         * gdbthread.h (make_cleanup_restore_current_thread): Don't
1017         declare.
1018
1019 2018-02-08  Tom Tromey  <tom@tromey.com>
1020
1021         * mem-break.c (set_raw_breakpoint_at): Use
1022         gdb::unique_xmalloc_ptr.
1023
1024 2018-01-30  Pedro Alves  <palves@redhat.com>
1025
1026         PR gdb/13211
1027         * target.c (target_terminal::terminal_state): Rename to ...
1028         (target_terminal::m_terminal_state): ... this.
1029
1030 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
1031
1032         * linux-low.c (handle_extended_wait): Surround call to
1033         thread_db_notice_clone with #ifdef USE_THREAD_DB.
1034
1035 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
1036
1037         * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1038         linux_ptrace_attach_fail_reason_string now returning an
1039         std::string.
1040         (linux_attach): Likewise.
1041         * thread-db.c (attach_thread): Likewise.
1042
1043 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
1044
1045         PR gdb/21559
1046         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1047         checking for fs_base/gs_base fields in struct user_regs_struct.
1048         * configure: Regenerate.
1049
1050 2018-01-16  Yao Qi  <yao.qi@linaro.org>
1051
1052         PR gdb/18749
1053         * linux-low.c (fetch_register): Call supply_register instead of
1054         error.
1055
1056 2018-01-08  Yao Qi  <yao.qi@linaro.org>
1057             Simon Marchi  <simon.marchi@ericsson.com>
1058
1059         * Makefile.in (OBS): Remove selftest.o.
1060         * configure.ac: Set srv_selftest_objs if $development is true.
1061         (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1062         * configure: Re-generated.
1063         * server.c (captured_main): Wrap variable selftest_filter with
1064         GDB_SELF_TEST.
1065
1066 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
1067
1068         * server.c (parse_debug_format_options): Return std::string.
1069         (handle_monitor_command, captured_main): Adjust.
1070
1071 2018-01-05  Pedro Alves  <palves@redhat.com>
1072
1073         PR gdb/18653
1074         * server.c (captured_main): Pass quiet=false to
1075         save_original_signals_state.
1076
1077 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
1078
1079         * gdbreplay.c (gdbreplay_version): Update copyright year in
1080         version message.
1081         * server.c (gdbserver_version): Likewise.
1082
1083 2017-12-08  Tom Tromey  <tom@tromey.com>
1084
1085         * ax.c (ax_printf): Update.
1086
1087 2017-12-07  Yao Qi  <yao.qi@linaro.org>
1088
1089         * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1090         aarch64_linux_read_description.
1091         * linux-amd64-ipa.c (idx2mask): New array.
1092         (get_ipa_tdesc): Move idx2mask out.
1093         (initialize_low_tracepoint): Initialize target descriptions.
1094         * linux-i386-ipa.c (idx2mask): New array.
1095         (get_ipa_tdesc): Move idx2mask out.
1096         (initialize_low_tracepoint): Initialize target descriptions.
1097
1098 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
1099
1100         * tdesc.c (struct tdesc_type): Change return type.
1101         (tdesc_add_flag): Change parameter type.
1102         (tdesc_add_bitfield): Likewise.
1103         (tdesc_add_field): Likewise.
1104         (tdesc_set_struct_size): Likewise.
1105
1106 2017-12-05  Simon Marchi  <simon.marchi@ericsson.com>
1107
1108         * regcache.c (registers_to_string): Remove unused variable.
1109
1110 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1111
1112         * inferiors.c (for_each_inferior_with_data): Remove.
1113         * inferiors.h (for_each_inferior_with_data): Remove.
1114         * server.c (handle_qxfer_threads_worker): Change parameter type.
1115         (handle_qxfer_threads_proper): Use for_each_thread.
1116
1117 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1118
1119         * inferiors.c (for_each_inferior): Remove.
1120         (clear_inferiors): Use for_each_thread.
1121         * inferiors.h (for_each_inferior): Remove.
1122         * linux-low.c (linux_wait_for_event_filtered): Use
1123         for_each_thread.
1124         (linux_stabilize_threads): Likewise.
1125         * regcache.c (regcache_release): Likewise.
1126         * server.c (gdb_wants_all_threads_stopped): Likewise.
1127         (clear_pending_status_callback): Remove.
1128         (handle_status): Use for_each_thread.
1129         (captured_main): Likewise.
1130         * win32-low.c (child_init_thread_list): Likewise.
1131         (win32_clear_inferiors): Likewise.
1132         (fake_breakpoint_event): Likewise.
1133
1134 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1135
1136         * inferiors.h (find_inferior): Remove.
1137         * inferiors.c (find_inferior): Remove.
1138
1139 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1140
1141         * linux-low.c (resume_status_pending_p): Update comment.
1142         (need_step_over_p): Update comment.
1143
1144 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1145
1146         * linux-low.c (proceed_one_lwp): Return void, change parameter
1147         type.
1148         (unsuspend_and_proceed_one_lwp): Likewise.
1149         (proceed_all_lwps): Use for_each_thread.
1150         (unstop_all_lwps): Likewise.
1151
1152 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1153
1154         * linux-low.c (linux_resume_one_thread): Return void, take
1155         parameter directly.
1156         (linux_resume): Use for_each_thread.
1157
1158 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1159
1160         * linux-low.c (send_sigstop_callback): Return void, change
1161         parameter type.  Rename to...
1162         (send_sigstop): ... this.
1163         (suspend_and_send_sigstop_callback): Return void, change parameter
1164         type.  Rename to...
1165         (suspend_and_send_sigstop): ... this.
1166         (stop_all_lwps): Use for_each_thread.
1167
1168 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1169
1170         * linux-low.c (lwp_running): Return bool, remove unused
1171         argument.
1172         (linux_stabilize_threads): Use find_thread.
1173
1174 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1175
1176         * linux-low.c (select_singlestep_lwp_callback): Remove.
1177         (count_events_callback): Remove.
1178         (select_event_lwp_callback): Remove.
1179         (select_event_lwp): Use find_thread/for_each_thread.
1180
1181 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1182
1183         * linux-low.c (not_stopped_callback): Return bool, take filter
1184         argument directly.
1185         (linux_wait_for_event_filtered): Use find_thread.
1186         (linux_wait_1): Likewise.
1187
1188 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1189
1190         * linux-low.c (same_lwp): Remove.
1191         (find_lwp_pid): Use find_thread.
1192
1193 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1194
1195         * linux-low.c (delete_lwp_callback): Remove.
1196         (linux_mourn): Use for_each_thread.
1197
1198 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1199
1200         * linux-low.c (linux_detach_lwp_callback): Return void, remove
1201         args parameter, don't check for pid.
1202         (linux_detach): Use for_each_thread.
1203
1204 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1205
1206         * linux-low.c (struct counter): Remove.
1207         (second_thread_of_pid_p): Remove.
1208         (last_thread_of_process_p): Use find_thread.
1209
1210 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1211
1212         * inferiors.c (find_inferior_in_random): Remove.
1213         * inferiors.h (find_inferior_in_random): Remove.
1214         * linux-low.c (status_pending_p_callback): Return bool, accept
1215         parameter ptid directly.
1216         (linux_wait_for_event_filtered): Use find_thread_in_random.
1217         (linux_wait_1): Likewise.
1218
1219 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1220
1221         * inferiors.c (find_inferior_id): Remove.
1222         (find_thread_ptid): Move implemention from find_inferior_id to
1223         here.
1224         * inferiors.h (find_inferior_id): Remove.
1225         * server.c (handle_status): Use find_thread_ptid.
1226         (process_serial_event): Likewise.
1227         * thread-db.c (find_one_thread): Likewise.
1228         (thread_db_thread_handle): Likewise.
1229         * win32-low.c (thread_rec): Likewise.
1230         (child_delete_thread): Likewise.
1231         (win32_thread_alive): Likewise.
1232         (get_child_debug_event): Likewise.
1233
1234 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1235
1236         * linux-mips-low.c (update_watch_registers_callback): Return
1237         void, remove pid_p parameter, don't check for pid.
1238         (mips_insert_point, mips_remove_point): Use for_each_thread.
1239
1240 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1241
1242         * lynx.low (lynx_delete_thread_callback): Remove.
1243         (lynx_mourn): Use for_each_thread.
1244
1245 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1246
1247         * regcache.c (regcache_invalidate_one): Remove.
1248         (regcache_invalidate_pid): use for_each_thread.
1249
1250 2017-11-26  Tom Tromey  <tom@tromey.com>
1251
1252         * linux-low.c (linux_create_inferior): Update.
1253
1254 2017-11-24  Ulrich Weigand  <uweigand@de.ibm.com>
1255
1256         * spu-low.c (spu_create_inferior): Fix typo in argument name.
1257
1258 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
1259
1260         * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1261         * linux-aarch64-low.c (initialize_low_arch): Call init func.
1262         * linux-aarch64-tdesc-selftest.c: New file.
1263         * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1264
1265 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
1266
1267         * configure.srv: Add new file.
1268         * linux-aarch64-low.c (initialize_low_arch): Call init func.
1269         * linux-aarch64-tdesc-selftest.c: New file.
1270         * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1271
1272 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
1273
1274         * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1275         * linux-aarch64-low.c (initialize_low_arch): Remove init.
1276         * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1277
1278 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
1279
1280         * configure.srv: Add new files.
1281         * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1282         aarch64_linux_read_description.
1283         * linux-aarch64-low.c (aarch64_linux_read_description):
1284         Merge with aarch64_arch_setup.
1285         (aarch64_arch_setup): Call aarch64_linux_read_description.
1286         * linux-aarch64-tdesc.c: New file.
1287         * linux-aarch64-tdesc.h: New file.
1288
1289 2017-11-24  Yao Qi  <yao.qi@linaro.org>
1290
1291         * configure.srv: Set $srv_regobj for tic6x-linux.
1292         * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1293         (tic6x_read_description): Move some code to tic6x_arch_setup.
1294         (tic6x_tdesc_test): New function.
1295         (initialize_low_arch): Call selftests::register_test.
1296
1297 2017-11-22  Yao Qi  <yao.qi@linaro.org>
1298
1299         * remote-utils.c (prepare_resume_reply): Use memcpy.
1300
1301 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1302
1303         * linux-low.c (kill_one_lwp_callback): Return void, take
1304         argument directly, don't filter on pid.
1305         (linux_kill): Use for_each_thread.
1306
1307 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1308
1309         * linux-low.c (need_step_over_p): Return bool, remove dummy
1310         argument.
1311         (linux_resume, proceed_all_lwps): Use find_thread.
1312
1313 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1314
1315         * linux-low.c (resume_status_pending_p): Return bool, remove
1316         flag_p argument.
1317         (linux_resume): Use find_thread.
1318
1319 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1320
1321         * linux-low.c (struct thread_resume_array): Remove.
1322         (linux_set_resume_request): Return void, take arguments
1323         directly.
1324         (linux_resume): Use for_each_thread.
1325
1326 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1327
1328         * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1329         return bool, remove data argument.
1330         (linux_stabilize_threads): Use find_thread.
1331
1332 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1333
1334         * linux-low.c (unsuspend_one_lwp): Remove.
1335         (unsuspend_all_lwps): Use for_each_thread, inline code from
1336         unsuspend_one_lwp.
1337
1338 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1339
1340         * gdbthread.h (find_thread): Add overload with ptid_t filter.
1341         * linux-low.c (struct iterate_over_lwps_args): Remove.
1342         (iterate_over_lwps_filter): Remove.
1343         (iterate_over_lwps): Use find_thread.
1344
1345 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1346
1347         * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1348         (linux_handle_new_gdb_connection): Use for_each_thread, inline
1349         code from reset_lwp_ptrace_options_callback.
1350
1351 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1352
1353         * linux-arm-low.c (struct update_registers_data): Remove.
1354         (update_registers_callback): Return void, take arguments
1355         directly, don't check thread's pid.
1356         (arm_insert_point, arm_remove_point): Use for_each_thread.
1357
1358 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1359
1360         * win32-low.c (continue_one_thread): Return void, take argument
1361         directly.
1362         (child_continue): Use for_each_thread.
1363
1364 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1365
1366         * win32-i386-low.c (update_debug_registers_callback): Rename
1367         to ...
1368         (update_debug_registers): ... this, return void, remove pid_p arg.
1369         (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1370
1371 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
1372
1373         * inferiors.h (struct process_info): Add constructor, initialize
1374         fields..
1375         <syscalls_to_catch>: Change type to std::vector<int>.
1376         * inferiors.c (add_process): Allocate process_info with new.
1377         (remove_process): Free process_info with delete.
1378         * linux-low.c (handle_extended_wait): Adjust.
1379         (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1380         * server.c (handle_general_set): Adjust.
1381
1382 2017-11-16  Pedro Alves  <palves@redhat.com>
1383
1384         * remote-utils.c (remote_close): Block SIGIO signals instead of
1385         uninstalling the SIGIO handler.
1386
1387 2017-11-16  Alan Hayward  <alan.hayward@arm.com>
1388
1389         * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1390
1391 2017-11-16  Yao Qi  <yao.qi@linaro.org>
1392
1393         * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1394         (tic6x_store_gregset): Likewise.
1395         (tic6x_usrregs_info): Move it up.
1396
1397 2017-11-15  Alan Hayward  <alan.hayward@arm.com>
1398
1399         * Makefile.in: Update arch rules.
1400         * configure.srv: Explicitly mark arch/ files.
1401
1402 2017-11-13  Andreas Schwab  <schwab@suse.de>
1403
1404         * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1405         function.
1406         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1407
1408 2017-11-06  Pedro Alves  <palves@redhat.com>
1409
1410         * config.in, configure: Regenerate.
1411
1412 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1413
1414         * target.c (struct thread_search): Remove.
1415         (thread_search_callback): Remove.
1416         (prepare_to_access_memory): Use for_each_thread instead of
1417         find_inferior.  Inline code from thread_search_callback.
1418
1419 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1420
1421         * server.c (struct visit_actioned_threads_data): Remove.
1422         (visit_actioned_threads): Change prototype to take arguments
1423         directly.
1424         (resume): Use find_thread instead of find_inferior.
1425
1426 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1427
1428         * server.c (queue_stop_reply_callback): Change prototype, return
1429         void.
1430         (find_status_pending_thread_callback): Remove.
1431         (handle_status): Replace find_inferior with find_thread and
1432         for_each_thread.
1433
1434 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
1435
1436         * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1437         with REGNO.
1438         (aarch64_store_gregset): Likewise.
1439         (aarch64_fill_fpregset): Likewise.
1440         (aarch64_store_fpregset): Likewise.
1441
1442 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1443
1444         * gdbthread.h (find_thread, for_each_thread): New functions.
1445         * inferiors.c (thread_of_pid): Remove.
1446         (find_any_thread_of_pid): Use find_thread.
1447         * linux-low.c (num_lwps): Use for_each_thread.
1448
1449 2017-10-17  Yao Qi  <yao.qi@linaro.org>
1450
1451         * Makefile.in: Remove one rule.
1452         * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1453
1454 2017-10-17  Yao Qi  <yao.qi@linaro.org>
1455
1456         * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1457         Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1458
1459 2017-10-17  Yao Qi  <yao.qi@linaro.org>
1460
1461         * configure.srv: Rename arm.o with arch/arm.o.
1462
1463 2017-10-17  Yao Qi  <yao.qi@linaro.org>
1464
1465         * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1466         (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1467         (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1468         (arch-i386.o, arch-amd64.o): Remove rules.
1469         (arch/%.o): New rule.
1470         Update POSTCOMPILE and COMPILE.pre.
1471         * configure.ac: Invoke AC_CONFIG_COMMANDS.
1472         * configure: Re-generated.
1473         * configure.srv: Replace arch-i386.o with arch/i386.o.
1474         Replace arch-amd64.o with arch/amd64.o.
1475
1476 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1477
1478         * configure: Regenerated.
1479
1480 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1481
1482         * inferiors.h: (struct inferior_list): Remove.
1483         (struct inferior_list_entry); Remove.
1484         (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1485         A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1486         get_first_inferior): Remove.
1487         (for_each_inferior, for_each_inferior_with_data, find_inferior,
1488         find_inferior_id, find_inferior_in_random): Change signature.
1489         * inferiors.c (all_threads): Change type to
1490         std::list<thread_info *>.
1491         (get_thread): Remove macro.
1492         (find_inferior, find_inferior_id): Change signature, implement
1493         using find_thread.
1494         (find_inferior_in_random): Change signature, implement using
1495         find_thread_in_random.
1496         (for_each_inferior, for_each_inferior_with_data): Change
1497         signature, implement using for_each_thread.
1498         (add_inferior_to_list, remove_inferior): Remove.
1499         (add_thread, get_first_thread, thread_of_pid,
1500         find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1501         (get_first_inferior, one_inferior_p, clear_inferior_list):
1502         Remove.
1503         (clear_inferiors, get_thread_process): Update.
1504         * gdbthread.h: Include <list>.
1505         (struct thread_info) <entry>: Remove field.
1506         <id>: New field.
1507         (all_threads): Change type to std::list<thread_info *>.
1508         (get_first_inferior): Add doc.
1509         (find_thread, for_each_thread, find_thread_in_random): New
1510         functions.
1511         (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1512         * linux-arm-low.c (update_registers_callback): Update.
1513         * linux-low.c (second_thread_of_pid_p): Update.
1514         (kill_one_lwp_callback, linux_detach_lwp_callback,
1515         delete_lwp_callback, status_pending_p_callback, same_lwp,
1516         find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1517         iterate_over_lwps, not_stopped_callback,
1518         resume_stopped_resumed_lwps, count_events_callback,
1519         select_singlestep_lwp_callback, select_event_lwp_callback,
1520         unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1521         suspend_and_send_sigstop_callback, wait_for_sigstop,
1522         stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1523         lwp_running, linux_set_resume_request, resume_status_pending_p,
1524         need_step_over_p, start_step_over, linux_resume_one_thread,
1525         proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1526         reset_lwp_ptrace_options_callback): Update.
1527         * linux-mips-low.c (update_watch_registers_callback): Update.
1528         * regcache.c (regcache_invalidate_one, regcache_invalidate):
1529         Update.
1530         (free_register_cache_thread_one): Remove.
1531         (regcache_release): Update.
1532         * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1533         handle_qxfer_threads_worker): Update.
1534         (handle_query): Update, use list iterator.
1535         (visit_actioned_threads, handle_pending_status,
1536         queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1537         clear_pending_status_callback, set_pending_status_callback,
1538         find_status_pending_thread_callback, handle_status,
1539         process_serial_event): Update.
1540         * target.c (thread_search_callback): Update.
1541         * thread-db.c (thread_db_get_tls_address): Update.
1542         * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1543         Update.
1544         * win32-i386-low.c (update_debug_registers_callback): Update.
1545         * win32-low.c (delete_thread_info, child_delete_thread,
1546         continue_one_thread, suspend_one_thread,
1547         get_child_debug_event): Adjust.
1548
1549 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1550
1551         * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1552         * inferiors.h: Include <list>.
1553         (struct process_info) <entry>: Remove field.
1554         <pid>: New field.
1555         (pid_of): Change macro to function.
1556         (ptid_of, lwpid_of): Remove macro.
1557         (all_processes): Change type to std::list<process_info *>.
1558         (ALL_PROCESSES): Remove macro.
1559         (for_each_process, find_process): New function.
1560         * inferiors.c (all_processes): Change type to
1561         std::list<process_info *>.
1562         (find_thread_process): Adjust.
1563         (add_process): Likewise.
1564         (remove_process): Likewise.
1565         (find_process_pid): Likewise.
1566         (get_first_process): Likewise.
1567         (started_inferior_callback): Remove.
1568         (have_started_inferiors_p): Adjust.
1569         (attached_inferior_callback): Remove.
1570         (have_attached_inferiors_p): Adjust.
1571         * linux-low.c (check_zombie_leaders): Likewise.
1572         * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1573         (x86_linux_update_xmltarget): Adjust.
1574         * server.c (handle_query): Likewise.
1575         (gdb_reattached_process): Remove.
1576         (handle_status): Adjust.
1577         (kill_inferior_callback): Likewise.
1578         (detach_or_kill_inferior): Remove.
1579         (print_started_pid): Likewise.
1580         (print_attached_pid): Likewise.
1581         (detach_or_kill_for_exit): Update.
1582         (process_serial_event): Likewise.
1583         * linux-arm-low.c (arm_new_fork): Likewise.
1584
1585 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1586
1587         * dll.h: Include <list>.
1588         (struct dll_info): Add constructor.
1589         <entry>: Remove field.
1590         (all_dlls): Change type to std::list<dll_info>.
1591         * dll.c: Include <algorithm>.
1592         (get_dll): Remove macro.
1593         (all_dlls): Change type to std::list<dll_info *>.
1594         (free_one_dll): Remove.
1595         (match_dll): Likewise.
1596         (loaded_dll): Adjust.
1597         (unloaded_dll): Adjust to all_dlls type change, use
1598         std::find_if.  Inline code from match_dll.
1599         (clear_dlls): Adjust to all_dlls type change.
1600         * server.c (emit_dll_description): Remove.
1601         (handle_qxfer_libraries): Adjust to all_dlls type change,
1602         integrate emit_dll_description's functionality.
1603
1604 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1605
1606         * linux-low.h (struct linux_target_ops) <delete_process>: New
1607         field.
1608         * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1609         * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1610         (struct linux_target_ops): Add delete_process callback.
1611         * linux-arm-low.c (arm_delete_process): New.
1612         (struct linux_target_ops): Add delete_process callback.
1613         * linux-bfin-low.c (struct linux_target_ops): Likewise.
1614         * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1615         * linux-m32r-low.c (struct linux_target_ops): Likewise.
1616         * linux-mips-low.c (mips_linux_delete_process): New.
1617         (struct linux_target_ops): Add delete_process callback.
1618         * linux-ppc-low.c (struct linux_target_ops): Likewise.
1619         * linux-s390-low.c (struct linux_target_ops): Likewise.
1620         * linux-sh-low.c (struct linux_target_ops): Likewise.
1621         * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1622         * linux-tile-low.c (struct linux_target_ops): Likewise.
1623         * linux-x86-low.c (x86_linux_delete_process): New.
1624         (struct linux_target_ops): Add delete_process callback.
1625         * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1626
1627 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1628
1629         * linux-aarch64-low.c (the_low_target): Add thread delete
1630         callback.
1631         * linux-arm-low.c (arm_delete_thread): New function.
1632         (the_low_target): Add thread delete callback.
1633         * linux-bfin-low.c (the_low_target): Likewise.
1634         * linux-crisv32-low.c (the_low_target): Likewise.
1635         * linux-low.c (delete_lwp): Invoke delete_thread callback if
1636         set.
1637         * linux-low.h (struct linux_target_ops) <delete_thread>: New
1638         field.
1639         * linux-m32r-low.c (the_low_target): Add thread delete callback.
1640         * linux-mips-low.c (mips_linux_delete_thread): New function.
1641         (the_low_target): Add thread delete callback.
1642         * linux-ppc-low.c (the_low_target): Likewise.
1643         * linux-s390-low.c (the_low_target): Likewise.
1644         * linux-sh-low.c (the_low_target): Likewise.
1645         * linux-tic6x-low.c (the_low_target): Likewise.
1646         * linux-tile-low.c (the_low_target): Likewise.
1647         * linux-x86-low.c (the_low_target): Likewise.
1648         * linux-xtensa-low.c (the_low_target): Likewise.
1649
1650 2017-10-06  Yuanhui Zhang  <asmwarrior@gmail.com>
1651
1652         * win32-low.c: Include "common-inferior.h".
1653
1654 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1655
1656         * inferiors.c (set_inferior_cwd): New function.
1657         * server.c (handle_general_set): Handle QSetWorkingDir packet.
1658         (handle_query): Inform that QSetWorkingDir is supported.
1659         * win32-low.c (create_process): Pass the inferior's cwd to
1660         CreateProcess.
1661
1662 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1663
1664         * inferiors.c (current_inferior_cwd): New global variable.
1665         (get_inferior_cwd): New function.
1666         * inferiors.h (struct process_info) <cwd>: New field.
1667
1668 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1669
1670         * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1671         (OBS): Add gdb_tilde_expand.o.
1672
1673 2017-10-02  Simon Marchi  <simon.marchi@ericsson.com>
1674
1675         * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1676         * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1677
1678 2017-09-29  Pedro Alves  <palves@redhat.com>
1679
1680         * ax.c (gdb_parse_agent_expr): Constify.
1681         * ax.h (gdb_parse_agent_expr): Constify.
1682         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1683         Constify.
1684         * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1685         * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1686         * remote-utils.h (read_ptid): Constify.
1687         * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1688         (process_point_options, process_serial_event): Constify.
1689         * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1690         (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1691         (cmd_qtbuffer): Constify.
1692
1693 2017-09-29  Pedro Alves  <palves@redhat.com>
1694
1695         * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1696         fails.
1697
1698 2017-09-29  Pedro Alves  <palves@redhat.com>
1699
1700         * linux-low.c (handle_extended_wait): Pass parent thread instead
1701         of process to thread_db_notice_clone.
1702         * linux-low.h (thread_db_notice_clone): Replace parent process
1703         parameter with parent thread parameter.
1704         * thread-db.c (find_one_thread): Add comment.
1705         (thread_db_notice_clone): Replace parent process parameter with
1706         parent thread parameter.  Temporarily switch to the parent thread.
1707
1708 2017-09-26  Sergio Durigan Junior  <sergiodj@redhat.com>
1709
1710         * gdbthread.h: Include "common-gdbthread.h".
1711         * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1712         "if" when validating the ptid.
1713         * remote-utils.c: Include "gdbthread.h".
1714         (prepare_resume_reply): Use "switch_to_thread".
1715         * target.c (done_accessing_memory): Likewise.
1716
1717 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1718
1719         * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1720         s390x-gs-linux64.o to srv_regobj.  Add s390-gs-linux64.xml,
1721         s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1722         srv_xmlfiles.  Add s390-gs-linux64-ipa.o and
1723         s390x-gs-linux64-ipa.o to ipa_obj.
1724         * linux-s390-low.c (HWCAP_S390_GS): New define.
1725         (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1726         New functions.
1727         (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1728         (s390_arch_setup): Check for guarded-storage support and choose
1729         appropriate tdesc.
1730         (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1731         init_registers_s390x_gs_linux64.
1732         * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1733         enum value.
1734         (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1735         (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1736
1737 2017-09-22  Simon Marchi  <simon.marchi@ericsson.com>
1738
1739         * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1740
1741 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1742
1743         * linux-low.h (struct lwp_info): Add new field, thread_handle.
1744         (thread_db_thread_handle): Declare.
1745         * linux-low.c (linux_target_ops): Initialize thread_handle.
1746         * server.c (handle_qxfer_threads_worker): Add support for
1747         "handle" attribute.
1748         * target.h (struct target_ops): Add new function pointer,
1749         thread_handle.
1750         (target_thread_handle): Define.
1751         * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1752         field in lwp.
1753         (thread_db_thread_handle): New function.
1754
1755 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1756
1757         * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1758         * linux-low.h (thread_db_notice_clone): Declare.
1759         * thread-db.c (thread_db_notice_clone): New function.
1760
1761 2017-09-21  Pedro Alves  <palves@redhat.com>
1762
1763         * server.c (gdb_read_memory, handle_status, process_serial_event)
1764         (handle_serial_event, handle_target_event): Adjust to
1765         set_desired_thread prototype change.
1766         * target.c (set_desired_thread): Remove 'use_general' parameter
1767         and adjust.
1768         * target.h (set_desired_thread): Remove 'use_general' parameter.
1769
1770 2017-09-20  Tom Tromey  <tom@tromey.com>
1771
1772         * target.c (target_terminal::terminal_state): Define.
1773         (target_terminal::init): Rename from target_terminal_init.
1774         (target_terminal::inferior): Rename from
1775         target_terminal_inferior.
1776         (target_terminal::ours): Rename from target_terminal_ours.
1777         (target_terminal::ours_for_output, target_terminal::info): New.
1778
1779 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1780
1781         * server.c (accumulate_file_name_length): Remove.
1782         (emit_dll_description): Adjust to std::string change.
1783         (handle_qxfer_libraries): Use std::string to hold document.
1784
1785 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1786
1787         * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1788         return type of xml_escape_text.
1789         * server.c (emit_dll_description): Likewise.
1790
1791 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1792
1793         * server.c (captured_main): Accept argument for --selftest.
1794         Update run_tests call.
1795         * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1796         when registering selftests.
1797
1798 2017-09-16  Sergio Durigan Junior  <sergiodj@redhat.com>
1799
1800         * regcache.c (get_thread_regcache): Update code to use "std::vector"
1801         instead of "VEC" for "target_desc.reg_defs".
1802         (regcache_cpy): Likewise.
1803         (registers_to_string): Likewise.
1804         (registers_from_string): Likewise.
1805         (find_regno): Likewise.
1806         (supply_regblock): Likewise.
1807         (regcache_raw_read_unsigned): Likewise.
1808         * tdesc.c (init_target_desc): Likewise.
1809         (tdesc_create_reg): Likewise.
1810         * tdesc.h: Remove declaration of "tdesc_reg_p".  Include <vector>.
1811         (struct target_desc) <reg_defs>: Convert to "std::vector".
1812         (target_desc): Do not initialize "reg_defs".
1813         (~target_desc): Update code to use "std::vector" instead of "VEC"
1814         for "target_desc.reg_defs".
1815         (operator==): Likewise.
1816
1817 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1818
1819         * inferiors.h (thread_to_gdb_id): Remove.
1820         * inferiors.c (thread_to_gdb_id): Remove.
1821         * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1822         * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1823         lynx_store_registers, lynx_read_memory, lynx_write_memory):
1824         Likewise.
1825         * nto-low.c (nto_fetch_registers, nto_store_registers,
1826         nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1827
1828 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1829
1830         * inferiors.h (gdb_id_to_thread_id): Remove.
1831         * inferiors.c (gdb_id_to_thread_id): Remove.
1832         * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1833         removal.  Move pid declaration closer to where it's used.
1834
1835 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1836
1837         * server.c (handle_detach): New function.
1838         (process_serial_event): Move code out, call handle_detach.
1839
1840 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1841
1842         * server.c (require_running): Rename to ...
1843         (require_running_or_return): ... this ...
1844         (require_running_or_break): ... and this.
1845         (handle_query, process_serial_event): Adjust.
1846
1847 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1848
1849         * linux-low.c (linux_set_resume_request): Remove unused
1850         variables.
1851
1852 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1853
1854         * server.c (first_thread_of): Remove.
1855         (process_serial_event): Replace usage of first_thread_of with
1856         find_any_thread_of_pid.
1857         * tracepoint.c (same_process_p): Remove.
1858         (gdb_agent_about_to_close): Replace usage of same_process_p with
1859         find_any_thread_of_pid.
1860         * linux-x86-low.c (same_process_callback): Remove.
1861         (x86_arch_setup_process_callback): Replace usage of
1862         same_process_callback with find_any_thread_of_pid.
1863         * thread-db.c (any_thread_of): Remove.
1864         (switch_to_process): Replace usage of any_thread_of with
1865         find_any_thread_of_pid.
1866         * inferiors.c (thread_pid_matches_callback): Remove.
1867         (find_thread_process): Adjust to use find_any_thread_of_pid.
1868
1869 2017-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1870
1871         * regcache.c (get_thread_regcache): Guard calls to "memset"
1872           with "!VEC_empty".
1873
1874 2017-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1875
1876         * linux-low.c (handle_extended_wait): Use
1877         "allocate_target_description" instead of "XNEW".
1878         * linux-x86-low.c (initialize_low_arch): Likewise.
1879
1880 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1881
1882         * configure.srv (srv_i386_regobj): Remove.
1883         (srv_amd64_regobj): Remove.
1884         (srv_regobj): Set it to "" for x86 non-linux targets.
1885         * linux-x86-tdesc.c (i386_linux_read_description):
1886         * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1887         (init_registers_i386): Remove the declaration.
1888         (tdesc_i386): Remove the declaration.
1889         (lynx_i386_arch_setup): Call i386_create_target_description.
1890         * nto-x86-low.c: Likewise.
1891         * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1892         [!__x86_64__]: include arch/i386.h.
1893         (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1894
1895 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1896
1897         * configure.srv (srv_amd64_linux_xmlfiles): Remove
1898         i386/amd64-XXX-linux from it.
1899
1900 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1901
1902         * configure.srv: Empty srv_amd64_linux_regobj if $development is
1903         false.
1904         (ipa_amd64_linux_regobj): Remove.
1905         (ipa_x32_linux_regobj): Remove.
1906
1907 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1908
1909         * Makefile.in (arch-amd64.o): New rule.
1910         * configure.srv: Append arch-amd64.o.
1911         * linux-amd64-ipa.c: Include common/x86-xstate.h.
1912         (get_ipa_tdesc): Call amd64_linux_read_description.
1913         (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1914         and init_registers_amd64_XXX.
1915         * linux-x86-low.c (x86_linux_read_description): Call
1916         amd64_linux_read_description.
1917         (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1918         (initialize_low_arch): Don't call init_registers_x32_XXX and
1919         init_registers_amd64_XXX.
1920         * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1921         and tdesc_amd64_XXX.
1922         [__x86_64__] (amd64_tdesc_test): New function.
1923         (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1924         and init_registers_amd64_XXX.
1925         * linux-x86-tdesc.c: Include arch/amd64.h.
1926         (xcr0_to_tdesc_idx): New function.
1927         (i386_linux_read_description): New function.
1928         (amd64_get_ipa_tdesc_idx): New function.
1929         * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1930         (amd64_get_ipa_tdesc): Declare.
1931
1932 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1933
1934         * configure.srv (srv_i386_linux_xmlfiles): Remove
1935         i386/i386-XXX-linux.xml from it.
1936
1937 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1938
1939         * configure.srv: Set srv_i386_linux_regobj empty if $development
1940         is false.
1941         * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1942         initialize_low_tdesc.
1943         * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1944         with #if initialize_low_tdesc.
1945         * linux-x86-tdesc-selftest.c: New file.
1946         * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1947
1948 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1949
1950         * Makefile.in (arch-i386.o): New rule.
1951         * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1952         (x86_64-*-linux*): Likewise.
1953         * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1954         include arch/i386.h.
1955         (i386_linux_read_description): Remove code and call
1956         i386_create_target_description.
1957         * tdesc.c (allocate_target_description): New function.
1958         * tdesc.h (set_tdesc_architecture): Remove declaration.
1959         (set_tdesc_osabi): Likewise.
1960
1961 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1962
1963         * linux-x86-tdesc.c: Don't include <inttypes.h>.
1964         (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1965         set_tdesc_architecture and set_tdesc_osabi.  Remove code setting
1966         .xmltarget.
1967         * server.c (get_features_xml): Call tdesc_get_features_xml.
1968         * tdesc.c (set_tdesc_architecture): New function.
1969         (set_tdesc_osabi): New function.
1970         (tdesc_get_features_xml): New function.
1971         (tdesc_create_feature): Add an argument.
1972         * tdesc.h (struct target_desc) <features>: New field.
1973         <arch, osabi>: New field.
1974         (~target_desc): xfree features, arch, and osabi.
1975         (target_desc::oerator==): Don't compare .xmltarget.
1976         [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1977         (set_tdesc_osabi): Likewise.
1978         (tdesc_get_features_xml): Likewise.
1979
1980 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1981
1982         * linux-x86-tdesc.c: Include selftest.h.
1983         (i386_tdesc_test): New function.
1984         (initialize_low_tdesc): Call selftests::register_test.
1985         * tdesc.h: Include regdef.h.
1986         (target_desc): Override operator == and !=.
1987
1988 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1989
1990         * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1991         (ipa_obj): Likewise.
1992         * linux-i386-ipa.c: Include common/x86-xstate.h
1993         (get_ipa_tdesc): Call i386_linux_read_description.
1994         (initialize_low_tracepoint): Don't call  init_registers_XXX
1995         functions, call initialize_low_tdesc instead.
1996         * linux-x86-low.c (x86_linux_read_description): Call
1997         i386_linux_read_description.
1998         (initialize_low_arch): Don't call init_registers_i386_XXX
1999         functions, call initialize_low_tdesc.
2000         * linux-x86-tdesc.c: New file.
2001         * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2002         (i386_get_ipa_tdesc_idx): Declare.
2003         (i386_get_ipa_tdesc): Declare.
2004         (initialize_low_tdesc): Declare.
2005
2006 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2007
2008         * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2009         instead of 0.
2010
2011 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2012
2013         * Makefile.in (IPA_OBJS): Add vec-ipa.o
2014         * regcache.c (get_thread_regcache): Use VEC_length.
2015         (init_register_cache): Likewise.
2016         (regcache_cpy): Likewise.
2017         (registers_to_string): Iterate reg_defs via VEC_iterate.
2018         (find_regno): Likewise.
2019         (find_register_by_number): Use VEC_index.
2020         (register_size): Call find_register_by_number.
2021         (register_data): Call find_register_by_number.
2022         (supply_regblock): Use VEC_length.
2023         (regcache_raw_read_unsigned): Likewise.
2024         * tdesc.c (init_target_desc): Iterate reg_defs via
2025         VEC_iterate.
2026         (default_description): Update initializer.
2027         (copy_target_description): Don't update field num_registers.
2028         * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2029         <num_registers>: Remove.
2030
2031 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
2032
2033         * Makefile.in (.SECONDARY): Define target.
2034
2035 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
2036
2037         * linux-low.c (linux_wait_1): Adjust.
2038         * server.c (queue_stop_reply_callback): Adjust.
2039
2040 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
2041
2042         * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2043         QEnvironmentUnset and QEnvironmentReset packets.
2044         (handle_query): Inform remote that QEnvironmentHexEncoded,
2045         QEnvironmentUnset and QEnvironmentReset are supported.
2046
2047 2017-08-25  Simon Marchi  <simon.marchi@ericsson.com>
2048
2049         * inferiors.h (inferior_target_data): Rename to ...
2050         (thread_target_data): ... this.
2051         (inferior_regcache_data): Rename to ...
2052         (thread_regcache_data): ... this.
2053         (set_inferior_regcache_data): Rename to ...
2054         (set_thread_regcache_data): ... this.
2055         * inferiors.c (inferior_target_data): Rename to ...
2056         (thread_target_data): ... this.
2057         (inferior_regcache_data): Rename to ...
2058         (thread_regcache_data): ... this.
2059         (set_inferior_regcache_data): Rename to ...
2060         (set_thread_regcache_data): ... this.
2061         (free_one_thread): Update.
2062         * linux-low.h (get_thread_lwp): Update.
2063         * regcache.c (get_thread_regcache): Update.
2064         (regcache_invalidate_thread): Update.
2065         (free_register_cache_thread): Update.
2066         * win32-i386-low.c (update_debug_registers_callback): Update.
2067         (win32_get_current_dr): Update.
2068         * win32-low.c (thread_rec): Update.
2069         (delete_thread_info): Update.
2070         (continue_one_thread): Update.
2071         (suspend_one_thread): Update.
2072
2073 2017-08-24  Simon Marchi  <simon.marchi@ericsson.com>
2074
2075         * inferiors.c (set_inferior_target_data): Remove.
2076         * inferiors.h (set_inferior_target_data): Remove.
2077
2078 2017-08-18  Yao Qi  <yao.qi@linaro.org>
2079
2080         * Makefile.in (OBS): Add selftest.o.
2081         * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2082         * configure, config.in: Re-generated.
2083         * server.c: Include common/sefltest.h.
2084         (captured_main): Handle option --selftest.
2085
2086 2017-08-09  Yao Qi  <yao.qi@linaro.org>
2087
2088         * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2089         i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2090         i386-avx-mpx.o and i386-mmx.o.
2091         (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2092         amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2093         (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2094         i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2095         i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2096         (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2097         i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2098         i386/amd64-avx-mpx.xml.
2099
2100 2017-08-09  Yao Qi  <yao.qi@linaro.org>
2101
2102         * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2103         and x32-avx-avx512.o.
2104         (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2105         i386/x32-avx-avx512.xml.
2106
2107 2017-07-26  Simon Marchi  <simon.marchi@ericsson.com>
2108
2109         * tracepoint.h (enum class fast_tpoint_collect_result): New
2110         enumeration.
2111         (fast_tracepoint_collecting): Change return type to
2112         fast_tpoint_collect_result.
2113         * tracepoint.c (fast_tracepoint_collecting): Likewise.
2114         * linux-low.h: Include tracepoint.h.
2115         (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2116         fast_tpoint_collect_result.
2117         * linux-low.c (handle_tracepoints): Adjust.
2118         (linux_fast_tracepoint_collecting): Change return type to
2119         fast_tpoint_collect_result.
2120         (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2121         linux_wait_1, stuck_in_jump_pad_callback,
2122         lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2123         proceed_one_lwp): Adjust to type change.
2124
2125 2017-07-10  Yao Qi  <yao.qi@linaro.org>
2126
2127         * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2128
2129 2017-06-29  Yao Qi  <yao.qi@linaro.org>
2130
2131         * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2132         Remove.
2133         [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2134
2135 2017-06-20  Simon Marchi  <simon.marchi@ericsson.com>
2136
2137         * Makefile.in (IPA_OBJS): Sort and format one item per line.
2138
2139 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
2140
2141         * linux-low.c (linux_create_inferior): Adjust code to access the
2142         environment information via 'gdb_environ' class.
2143         * lynx-low.c (lynx_create_inferior): Likewise.
2144         * server.c (our_environ): Make it an instance of 'gdb_environ'.
2145         (get_environ): Return a pointer to 'our_environ'.
2146         (captured_main): Initialize 'our_environ'.
2147         * server.h (get_environ): Adjust prototype.
2148         * spu-low.c (spu_create_inferior): Adjust code to access the
2149         environment information via 'gdb_environ' class.
2150
2151 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
2152
2153         * linux-low.c (linux_read_memory, linux_write_memory): Remove
2154         usage of "register" keyword.
2155
2156 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
2157
2158         * configure: Re-generate.
2159
2160 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
2161
2162         * configure: Re-generate.
2163
2164 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
2165
2166         * Makefile.in (COMPILE.pre): Add "-x c++".
2167
2168 2017-06-09  Sergio Durigan Junior  <sergiodj@redhat.com>
2169
2170         * fork-child.c: Conditionally include <signal.h>.
2171
2172 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
2173
2174         * server.c (handle_general_set): Handle new packet
2175         "QStartupWithShell".
2176         (handle_query): Add "QStartupWithShell" to the list of supported
2177         packets.
2178         (gdbserver_usage): Add help text explaining the
2179         new "--startup-with-shell" and "--no-startup-with-shell" CLI
2180         options.
2181         (captured_main): Recognize and act upon the presence of the new
2182         CLI options.
2183
2184 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
2185             Pedro Alves  <palves@redhat.com>
2186
2187         * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2188         * configure: Regenerate.
2189         * configure.srv (srv_linux_obj): Add "fork-child.o" and
2190         "fork-inferior.o".
2191         (i[34567]86-*-lynxos*): Likewise.
2192         (spu*-*-*): Likewise.
2193         * fork-child.c: New file.
2194         * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2195         and "environ.h".
2196         (linux_ptrace_fun): New function.
2197         (linux_create_inferior): Adjust function prototype to reflect
2198         change on "target.h".  Adjust function code to use
2199         "fork_inferior".
2200         (linux_request_interrupt): Delete "signal_pid".
2201         * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2202         (lynx_ptrace_fun): New function.
2203         (lynx_create_inferior): Adjust function prototype to reflect
2204         change on "target.h".  Adjust function code to use
2205         "fork_inferior".
2206         * nto-low.c (nto_create_inferior): Adjust function prototype and
2207         code to reflect change on "target.h".  Update comments.
2208         * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2209         "common-terminal.h" and "environ.h".
2210         (terminal_fd): Moved to fork-child.c.
2211         (old_foreground_pgrp): Likewise.
2212         (restore_old_foreground_pgrp): Likewise.
2213         (last_status): Make it global.
2214         (last_ptid): Likewise.
2215         (our_environ): New variable.
2216         (startup_with_shell): Likewise.
2217         (program_name): Likewise.
2218         (program_argv): Rename to...
2219         (program_args): ...this.
2220         (wrapper_argv): New variable.
2221         (start_inferior): Delete function.
2222         (get_exec_wrapper): New function.
2223         (get_exec_file): Likewise.
2224         (get_environ): Likewise.
2225         (prefork_hook): Likewise.
2226         (post_fork_inferior): Likewise.
2227         (postfork_hook): Likewise.
2228         (postfork_child_hook): Likewise.
2229         (handle_v_run): Update code to deal with arguments coming from the
2230         remote host.  Update calls from "start_inferior" to
2231         "create_inferior".
2232         (captured_main): Likewise.  Initialize environment variable.  Call
2233         "have_job_control".
2234         * server.h (post_fork_inferior): New prototype.
2235         (get_environ): Likewise.
2236         (last_status): Declare.
2237         (last_ptid): Likewise.
2238         (signal_pid): Likewise.
2239         * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2240         (spu_ptrace_fun): New function.
2241         (spu_create_inferior): Adjust function prototype to reflect change
2242         on "target.h".  Adjust function code to use "fork_inferior".
2243         * target.c (target_terminal_init): New function.
2244         (target_terminal_inferior): Likewise.
2245         (target_terminal_ours): Likewise.
2246         * target.h: Include <vector>.
2247         (struct target_ops) <create_inferior>: Update prototype.
2248         (create_inferior): Update macro.
2249         * utils.c (gdb_flush_out_err): New function.
2250         * win32-low.c (win32_create_inferior): Adjust function prototype
2251         and code to reflect change on "target.h".
2252
2253 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
2254
2255         * inferiors.c (switch_to_thread): New function.
2256
2257 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
2258
2259         * Makefile.in (SFILE): Add "common/job-control.c".
2260         (OBS): Add "job-control.o".
2261
2262 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
2263
2264         * Makefile: Remove "@host_makefile_frag@".
2265
2266 2017-05-05  Pedro Alves  <palves@redhat.com>
2267
2268         * configure: Regenerate.
2269
2270 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
2271
2272         * configure: Regenerate.
2273
2274 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
2275
2276         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2277         software_single_step change of return type to
2278         std::vector<CORE_ADDR>.
2279         * linux-low.c (install_software_single_step_breakpoints):
2280         Likewise.
2281         * linux-low.h (install_software_single_step_breakpoints):
2282         Likewise.
2283
2284 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2285
2286         * remote-utils.c: Include "gdb_termios.h" instead of
2287         "terminal.h".
2288         * terminal.h: Delete file.
2289
2290 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2291
2292         * server.c: Include <vector>.
2293         <program_argv, wrapper_argv>: Convert to std::vector.
2294         (start_inferior): Rewrite function to use C++.
2295         (handle_v_run): Likewise.  Update code that calculates the argv
2296         based on the vRun packet; use C++.
2297         (captured_main): Likewise.
2298
2299 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
2300
2301         * server.c (handle_v_cont): Initialize thread_resume::thread
2302         with null_ptid.
2303
2304 2017-04-05  Pedro Alves  <palves@redhat.com>
2305
2306         * configure: Regenerate.
2307
2308 2017-04-05  Pedro Alves  <palves@redhat.com>
2309
2310         * gdbreplay.c (sync_error): Constify.
2311         * linux-x86-low.c (push_opcode): Constify.
2312
2313 2017-04-05  Pedro Alves  <palves@redhat.com>
2314
2315         * win32-low.c (get_child_debug_event)
2316         <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2317         Report TARGET_WAITKIND_SPURIOUS instead.
2318
2319 2017-04-05  Pedro Alves  <palves@redhat.com>
2320
2321         * remote-utils.c (remote_prepare, remote_open): Constify.
2322         * remote-utils.h (remote_prepare, remote_open): Constify.
2323         * server.c (captured_main): Constify 'port' handling.
2324
2325 2017-04-04  Simon Marchi  <simon.marchi@ericsson.com>
2326
2327         * Makefile.in (clean): Clear .deps.
2328
2329 2017-03-31  Simon Marchi  <simon.marchi@polymtl.ca>
2330
2331         * .gitignore: Remove generated files, replace with wildcard.
2332         * (clean): Replace removal of generated files with wildcard.
2333         (version.c): Replace with...
2334         (version-generated.c): ...this.
2335         (xml-builtin.c): Replace with...
2336         (xml-builtin-generated.c): ...this.
2337         (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2338         (%.c: *regformats*): Replace with...
2339         (%-generated.c: *regformats*): ...this.
2340
2341 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
2342
2343         * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2344         (xtensa_fill_gregset): Call collect_register_by_name for
2345         threadptr register.
2346         (xtensa_store_gregset): Call supply_register_by_name for
2347         threadptr register.
2348
2349 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
2350
2351         * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2352         for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2353         (xtensa_store_gregset): Call supply_register for all registers in
2354         a0_regnum..a0_regnum + C0_NREGS range.
2355
2356 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
2357
2358         * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2359         (ax-ipa.o: ax.c): Remove.
2360         (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2361         (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2362         (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2363         (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2364         (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2365
2366 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
2367
2368         * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2369         (print-utils-ipa.o: ../common/print-utils.c): Remove.
2370         (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2371         (errors-ipa.o: ../common/errors.c): Remove.
2372         (format-ipa.o: ../common/format.c): Remove.
2373         (common-utils-ipa.o: ../common/common-utils.c): Remove.
2374
2375 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
2376
2377         * Makefile.in (%-ipa.o: %.c): New rule.
2378         (tracepoint-ipa.o: tracepoint.c): Remove.
2379         (utils-ipa.o: utils.c): Remove.
2380         (remote-utils-ipa.o: remote-utils.c): Remove.
2381         (regcache-ipa.o: regcache.c): Remove.
2382         (i386-linux-ipa.o: i386-linux.c): Remove.
2383         (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2384         (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2385         (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2386         (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2387         (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2388         (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2389         (amd64-linux-ipa.o: amd64-linux.c): Remove.
2390         (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2391         (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2392         (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2393         (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2394         (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2395         (aarch64-ipa.o: aarch64.c): Remove.
2396         (s390-linux32-ipa.o: s390-linux32.c): Remove.
2397         (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2398         (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2399         (s390-linux64-ipa.o: s390-linux64.c): Remove.
2400         (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2401         (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2402         (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2403         (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2404         (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2405         (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2406         (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2407         (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2408         (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2409         (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2410         (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2411         (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2412         (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2413         (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2414         (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2415         (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2416         (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2417         (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2418         (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2419         (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2420         (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2421         (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2422         (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2423         (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2424         (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2425         (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2426         (tdesc-ipa.o: tdesc.c): Remove.
2427         (x32-linux-ipa.o: x32-linux.c): Remove.
2428         (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2429         (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2430
2431 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
2432
2433         * Makefile.in (%.o: ../arch/%.c): New rule.
2434         (arm.o: ../arch/arm.c): Remove.
2435         (arm-linux.o: ../arch/arm-linux.c): Remove.
2436         (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2437         (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2438
2439 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
2440
2441         * Makefile.in (%.o: ../nat/%.c): New rule.
2442         (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2443         (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2444         (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2445         (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2446         (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2447         (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2448         (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2449         (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2450         (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2451         (linux-personality.o: ../nat/linux-personality.c): Remove.
2452         (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2453         (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2454         (x86-linux.o: ../nat/x86-linux.c): Remove.
2455         (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2456         (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2457
2458 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
2459
2460         * Makefile.in (%.o: ../common/%.c): New rule.
2461         (signals.o: ../common/signals.c): Remove.
2462         (print-utils.o: ../common/print-utils.c): Remove.
2463         (rsp-low.o: ../common/rsp-low.c): Remove.
2464         (common-utils.o: ../common/common-utils.c): Remove.
2465         (posix-strerror.o: ../common/posix-strerror.c): Remove.
2466         (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2467         (vec.o: ../common/vec.c): Remove.
2468         (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2469         (xml-utils.o: ../common/xml-utils.c): Remove.
2470         (ptid.o: ../common/ptid.c): Remove.
2471         (buffer.o: ../common/buffer.c): Remove.
2472         (format.o: ../common/format.c): Remove.
2473         (filestuff.o: ../common/filestuff.c): Remove.
2474         (agent.o: ../common/agent.c): Remove.
2475         (errors.o: ../common/errors.c): Remove.
2476         (environ.o: ../common/environ.c): Remove.
2477         (common-debug.o: ../common/common-debug.c): Remove.
2478         (cleanups.o: ../common/cleanups.c): Remove.
2479         (common-exceptions.o: ../common/common-exceptions.c): Remove.
2480         (fileio.o: ../common/fileio.c): Remove.
2481         (common-regcache.o: ../common/common-regcache.c): Remove.
2482         (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2483         (new-op.o: ../common/new-op.c): Remove.
2484         (btrace-common.o: ../common/btrace-common.c): Remove.
2485
2486 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
2487
2488         * Makefile.in (%.o: ../target/%.c): New rule.
2489         (waitstatus.o: ../target/waitstatus.c): Remove.
2490
2491 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
2492
2493         * Makefile.in
2494         (%.c: ../regformats/%.dat,
2495         (%.c: ../regformats/arm/%.dat,
2496         (%.c: ../regformats/i386/%.dat,
2497         (%.c: ../regformats/rs6000/%.dat): New rules.
2498         (aarch64.c): Remove.
2499         (reg-arm.c): Remove.
2500         (arm-with-iwmmxt.c): Remove.
2501         (arm-with-vfpv2.c): Remove.
2502         (arm-with-vfpv3.c): Remove.
2503         (arm-with-neon.c): Remove.
2504         (reg-bfin.c): Remove.
2505         (reg-cris.c): Remove.
2506         (reg-crisv32.c): Remove.
2507         (i386.c): Remove.
2508         (i386-linux.c): Remove.
2509         (i386-avx.c): Remove.
2510         (i386-avx-linux.c): Remove.
2511         (i386-avx-avx512.c): Remove.
2512         (i386-avx-avx512-linux.c): Remove.
2513         (i386-mpx.c): Remove.
2514         (i386-mpx-linux.c): Remove.
2515         (i386-avx-mpx-avx512-pku.c): Remove.
2516         (i386-avx-mpx-avx512-pku-linux.c): Remove.
2517         (i386-avx-mpx.c): Remove.
2518         (i386-avx-mpx-linux.c): Remove.
2519         (i386-mmx.c): Remove.
2520         (i386-mmx-linux.c): Remove.
2521         (reg-ia64.c): Remove.
2522         (reg-m32r.c): Remove.
2523         (reg-m68k.c): Remove.
2524         (reg-cf.c): Remove.
2525         (mips-linux.c): Remove.
2526         (mips-dsp-linux.c): Remove.
2527         (mips64-linux.c): Remove.
2528         (mips64-dsp-linux.c): Remove.
2529         (nios2-linux.c): Remove.
2530         (powerpc-32.c): Remove.
2531         (powerpc-32l.c): Remove.
2532         (powerpc-altivec32l.c): Remove.
2533         (powerpc-cell32l.c): Remove.
2534         (powerpc-vsx32l.c): Remove.
2535         (powerpc-isa205-32l.c): Remove.
2536         (powerpc-isa205-altivec32l.c): Remove.
2537         (powerpc-isa205-vsx32l.c): Remove.
2538         (powerpc-e500l.c): Remove.
2539         (powerpc-64l.c): Remove.
2540         (powerpc-altivec64l.c): Remove.
2541         (powerpc-cell64l.c): Remove.
2542         (powerpc-vsx64l.c): Remove.
2543         (powerpc-isa205-64l.c): Remove.
2544         (powerpc-isa205-altivec64l.c): Remove.
2545         (powerpc-isa205-vsx64l.c): Remove.
2546         (s390-linux32.c): Remove.
2547         (s390-linux32v1.c): Remove.
2548         (s390-linux32v2.c): Remove.
2549         (s390-linux64.c): Remove.
2550         (s390-linux64v1.c): Remove.
2551         (s390-linux64v2.c): Remove.
2552         (s390-te-linux64.c): Remove.
2553         (s390-vx-linux64.c): Remove.
2554         (s390-tevx-linux64.c): Remove.
2555         (s390x-linux64.c): Remove.
2556         (s390x-linux64v1.c): Remove.
2557         (s390x-linux64v2.c): Remove.
2558         (s390x-te-linux64.c): Remove.
2559         (s390x-vx-linux64.c): Remove.
2560         (s390x-tevx-linux64.c): Remove.
2561         (tic6x-c64xp-linux.c): Remove.
2562         (tic6x-c64x-linux.c): Remove.
2563         (tic6x-c62x-linux.c): Remove.
2564         (reg-sh.c): Remove.
2565         (reg-sparc64.c): Remove.
2566         (reg-spu.c): Remove.
2567         (amd64.c): Remove.
2568         (amd64-linux.c): Remove.
2569         (amd64-avx.c): Remove.
2570         (amd64-avx-linux.c): Remove.
2571         (amd64-avx-avx512.c): Remove.
2572         (amd64-avx-avx512-linux.c): Remove.
2573         (amd64-mpx.c): Remove.
2574         (amd64-mpx-linux.c): Remove.
2575         (amd64-avx-mpx-avx512-pku.c): Remove.
2576         (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2577         (amd64-avx-mpx.c): Remove.
2578         (amd64-avx-mpx-linux.c): Remove.
2579         (x32.c): Remove.
2580         (x32-linux.c): Remove.
2581         (x32-avx.c): Remove.
2582         (x32-avx-linux.c): Remove.
2583         (x32-avx-avx512.c): Remove.
2584         (x32-avx-avx512-linux.c): Remove.
2585         (reg-xtensa.c): Remove.
2586         (reg-tilegx.c): Remove.
2587         (reg-tilegx32.c): Remove.
2588
2589 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
2590
2591         * Makefile.in (SFILES): Add "common/environ.c".
2592         (OBJS): Add "common/environ.h".
2593
2594 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2595
2596         * configure.ac: Check if the fs_base and gs_base members of
2597         `struct user_regs_struct' exist.
2598         * config.in: Regenerated.
2599         * configure: Likewise.
2600
2601 2017-01-09  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2602
2603         * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2604         target_read_memory.
2605         * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2606         (get_next_pcs_syscall_next_pc): Likewise.
2607
2608 2016-12-23  Luis Machado  <lgustavo@codesourcery.com>
2609
2610         * win32-i386-low.c: Fix incorrect reference to a couple source files.
2611         * nto-x86-low.c: Likewise.
2612
2613 2016-11-30  Simon Marchi  <simon.marchi@polymtl.ca>
2614
2615         * Makefile.in: Include disable-implicit-rules.mk.
2616
2617 2016-11-23  Pedro Alves  <palves@redhat.com>
2618
2619         * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2620         (debug_vprintf): Use std::chrono::steady_clock instead of
2621         gettimeofday.  Use '.' instead of ':'.
2622         * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2623         (get_timestamp): Use std::chrono::steady_clock instead of
2624         gettimeofday.
2625
2626 2016-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
2627
2628         * Makefile.in: Fix whitespace formatting.
2629
2630 2016-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
2631
2632         * Makefile.in (SFILES, OBS): Flatten list and order
2633         alphabetically.
2634
2635 2016-11-23  Pedro Alves  <palves@redhat.com>
2636
2637         * event-loop.c (handle_file_event): Use warning.
2638         * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2639         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2640         Use warning.
2641
2642 2016-11-23  Pedro Alves  <palves@redhat.com>
2643
2644         * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2645         output.
2646         * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2647         * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2648         debug_printf and debug_flush for debug output.
2649         * server.c (handle_general_set): Likewise.
2650         * thread-db.c (try_thread_db_load): Use debug_printf for debug
2651         output.
2652
2653 2016-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
2654
2655         * Makefile.in (.c.o): Replace rule with ...
2656         (%.o: %.c): ... this one.
2657
2658 2016-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
2659
2660         * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2661         prefixed with @GMAKE_FALSE@.  Update comment related to non-GNU
2662         make.
2663         * configure.ac: Remove checks for the make program.
2664         * configure: Re-generate.
2665
2666 2016-10-28  Pedro Alves  <palves@redhat.com>
2667
2668         * Makefile.in (CXX_DIALECT): Get from configure.
2669         (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2670         * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2671         * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2672         * config.in: Regenerate.
2673         * configure: Regenerate.
2674
2675 2016-10-27  Yao Qi  <yao.qi@linaro.org>
2676
2677         * linux-low.c (linux_supports_range_stepping): Return true if
2678         can_software_single_step return true.
2679
2680 2016-10-27  Yao Qi  <yao.qi@linaro.org>
2681
2682         * inferiors.c (find_inferior_in_random): New function.
2683         * inferiors.h (find_inferior_in_random): Declare.
2684         * linux-low.c (linux_wait_for_event_filtered): Call
2685         find_inferior_in_random instead of find_inferior.
2686
2687 2016-10-27  Yao Qi  <yao.qi@linaro.org>
2688
2689         * linux-low.c (linux_wait_1): If single-step breakpoints are
2690         inserted, remove them.
2691
2692 2016-10-26  Pedro Alves  <palves@redhat.com>
2693
2694         * linux-low.c (handle_extended_wait): Link parent/child fork
2695         threads.
2696         (linux_wait_1): Unlink them.
2697         (linux_set_resume_request): Ignore resume requests for
2698         already-resumed and unhandled fork child threads.
2699         * linux-low.h (struct lwp_info) <fork_relative>: New field.
2700         * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2701         New functions.
2702         (handle_v_requests) <vCont>: Don't call require_running.
2703         * server.h (in_queued_stop_replies): New declaration.
2704
2705 2016-10-24  Yao Qi  <yao.qi@linaro.org>
2706
2707         PR server/20733
2708         * linux-aarch64-low.c (append_insns): Cast the return value to
2709         'uint32_t *'.
2710
2711 2016-10-10  Yao Qi  <yao.qi@linaro.org>
2712
2713         * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2714
2715 2016-10-06  Sergio Durigan Junior  <sergiodj@redhat.com>
2716
2717         * target.c (target_supports_multi_process): New function, moved
2718         from...
2719         * target.h (target_supports_multi_process): ... here.  Remove
2720         macro.
2721
2722 2016-10-05  Tom Tromey  <tom@tromey.com>
2723
2724         PR remote/20655:
2725         * tracepoint.c (handle_tracepoint_bkpts): Check
2726         ipa_error_tracepoint, not ipa_stopping_tracepoint.
2727
2728 2016-10-05  Yao Qi  <yao.qi@linaro.org>
2729
2730         * configure.srv: Update the path of arm-*.xml files.
2731
2732 2016-10-05  Terry Guo  <terry.guo@arm.com>
2733             Yao Qi  <yao.qi@linaro.org>
2734
2735         * Makefile.in: Adjust the path of rules.
2736         * configure.srv: Update the path of xml files.
2737         * regformats/arm-with-iwmmxt.dat: Regenerated.
2738         * regformats/arm-with-neon.dat: Likewise.
2739         * regformats/arm-with-vfpv2.dat: Likewise.
2740         * regformats/arm-with-vfpv3.dat Likewise.
2741
2742 2016-09-30  Yao Qi  <yao.qi@linaro.org>
2743
2744         PR gdbserver/20627
2745         * target.c (target_stop_and_wait): Don't call
2746         target_continue_no_signal, use resume_stop instead.
2747
2748 2016-09-26  Yao Qi  <yao.qi@linaro.org>
2749
2750         * linux-low.c (linux_wait_1): Call debug_exit.
2751
2752 2016-09-23  Pedro Alves  <palves@redhat.com>
2753
2754         * Makefile.in (SFILES): Add common/new-op.c.
2755         (OBS): Add common/new-op.o.
2756         (new-op.o): New rule.
2757
2758 2016-09-21  Simon Marchi  <simon.marchi@ericsson.com>
2759
2760         * .gitinore: Ignore more files.
2761
2762 2016-09-21  Yao Qi  <yao.qi@linaro.org>
2763
2764         * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2765         23.
2766
2767 2016-09-19  Sergio Durigan Junior  <sergiodj@redhat.com>
2768
2769         * server.c (start_inferior): Call target_mourn_inferior instead of
2770         mourn_inferior; pass ptid_t argument to it.
2771         (resume): Likewise.
2772         (handle_target_event): Likewise.
2773         * target.c (target_mourn_inferior): New function.
2774         * target.h (mourn_inferior): Delete macro.
2775
2776 2016-09-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2777
2778         * linux-low.c (lwp_is_stepping): New function.
2779
2780 2016-09-06  Carl Love  <cel@us.ibm.com>
2781
2782         * server.c (start_inferior):  Fixed comment, requested comment change
2783         didn't get updated correctly.  Removed reference to ptrace () call as
2784         it is only true on Linux systems.
2785
2786 2016-09-06  Carl Love  <cel@us.ibm.com>
2787
2788         * server.c (start_inferior):  Do not call
2789         function target_post_create_inferior () if the
2790         inferior process has already exited.
2791
2792 2016-09-05  Pedro Alves  <palves@redhat.com>
2793
2794         * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2795         (COMPILE.pre, CC_LD): Use CXX directly.
2796         (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2797         * acinclude.m4: Don't include build-with-cxx.m4.
2798         * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2799         * configure: Regenerate.
2800
2801 2016-09-02  Akash Trehan  <akash.trehan123@gmail.com>
2802
2803         PR gdb/19495
2804         * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2805         call writing data to own_buf.
2806
2807 2016-09-01  Sergio Durigan Junior  <sergiodj@redhat.com>
2808
2809         * target.c (mywait): Call target_wait instead of
2810         the_target->wait.
2811         (target_wait): New function.
2812
2813 2016-09-01  Sergio Durigan Junior  <sergiodj@redhat.com>
2814
2815         * server.c (start_inferior): New variable 'ptid'.  Replace calls
2816         to the_target->resume by target_continue{,_no_signal}, depending
2817         on the case.
2818         * target.c (target_stop_and_wait): Call target_continue_no_signal
2819         instead of the_target->resume.
2820         (target_continue): New function.
2821
2822 2016-08-31  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2823
2824         * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2825
2826 2016-08-25  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2827
2828         PR server/20491
2829         * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2830         ps_prochandle.
2831         * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2832         * linux-arm-low.c (ps_get_thread_area): Likewise.
2833         * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2834         * linux-m68k-low.c (ps_get_thread_area): Likewise.
2835         * linux-mips-low.c (ps_get_thread_area): Likewise.
2836         * linux-nios2-low.c (ps_get_thread_area): Likewise.
2837         * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2838         * linux-x86-low.c (ps_get_thread_area): Likewise.
2839         * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2840
2841 2016-08-19  Pedro Alves  <palves@redhat.com>
2842
2843         * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2844
2845 2016-08-19  Pedro Alves  <palves@redhat.com>
2846
2847         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2848         comment.  Use memcpy instead of casting through unsigned long.
2849
2850 2016-08-19  Pedro Alves  <palves@redhat.com>
2851
2852         * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2853         allocating around 0x80000000.
2854
2855 2016-08-19  Pedro Alves  <palves@redhat.com>
2856
2857         PR gdb/20415
2858         * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2859         (x32-avx512-linux-ipa.o): New rules.
2860         * configure.ac (x86_64-*-linux*): New x32 check.
2861         * configure.srv (ipa_x32_linux_regobj): New.
2862         (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2863         * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2864         descriptions.
2865         (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2866         descriptions.
2867         * configure: Regenerate.
2868
2869 2016-08-09  Pedro Alves  <palves@redhat.com>
2870
2871         PR gdb/18653
2872         * Makefile.in (OBS): Add signals-state-save-restore.o.
2873         (signals-state-save-restore.o): New rule.
2874         * config.in: Regenerate.
2875         * configure: Regenerate.
2876         * linux-low.c: Include "signals-state-save-restore.h".
2877         (linux_create_inferior): Call
2878         restore_original_signals_state.
2879         * server.c: Include "dispositions-save-restore.h".
2880         (captured_main): Call save_original_signals_state.
2881
2882 2016-08-05  Pedro Alves  <palves@redhat.com>
2883
2884         * configure: Regenerate.
2885
2886 2016-08-04  Yao Qi  <yao.qi@linaro.org>
2887
2888         * linux-low.c (regsets_fetch_inferior_registers): Check
2889         errno is ESRCH or not.
2890
2891 2016-08-02  Yao Qi  <yao.qi@linaro.org>
2892
2893         * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2894         <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2895         (thread_db_load_search): Update.
2896         (try_thread_db_load_1): Don't look for td_ta_event_addr,
2897         td_ta_set_event and td_ta_event_getmsg.
2898
2899 2016-07-26  Pedro Alves  <palves@redhat.com>
2900
2901         PR server/20414
2902         * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2903         of unsigned long for 64-bit registers and use uint32_t instead of
2904         unsigned int for 32-bit registers.
2905
2906 2016-07-26  Pedro Alves  <palves@redhat.com>
2907
2908         * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2909         to 'ptrace'.
2910
2911 2016-07-21  Tom Tromey  <tom@tromey.com>
2912
2913         * configure: Rebuild.
2914
2915 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2916
2917         * mem-break.c (find_gdb_breakpoint): Cast bp to
2918         'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2919
2920 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2921
2922         * server.c (handle_v_requests): Support s and S actions
2923         if target_supports_software_single_step return true.
2924
2925 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2926
2927         * linux-low.c (resume_stopped_resumed_lwps): If resume request
2928         is resume_step, call maybe_hw_step.
2929         (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2930         and unstop them.
2931         (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2932         breakpoints or not.
2933         (proceed_one_lwp): If resume request is resume_step, install
2934         reinsert breakpoints and call maybe_hw_step.
2935
2936 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2937
2938         * linux-low.c (proceed_one_lwp): Declare.
2939         (linux_resume_one_thread): Remove local variable 'step'.
2940         Lift code enqueue signal.  Call proceed_one_lwp instead of
2941         linux_resume_one_lwp.
2942
2943 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2944
2945         * linux-low.c (linux_resume_one_thread): Call
2946         enqueue_pending_signal.
2947
2948 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2949
2950         * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2951         * inferiors.c (do_restore_current_thread_cleanup): New function.
2952         (make_cleanup_restore_current_thread): Likewise.
2953         * linux-low.c (install_software_single_step_breakpoints): Call
2954         make_cleanup_restore_current_thread.  Switch current_thread to
2955         thread.
2956
2957 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2958
2959         * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2960         (set_reinsert_breakpoint): New parameter ptid.  Callers updated.
2961         (clone_one_breakpoint): Likewise.
2962         (delete_reinsert_breakpoints): Change parameter to thread.
2963         Callers updated.
2964         (has_reinsert_breakpoints): Likewise.
2965         (uninsert_reinsert_breakpoints): Likewise.
2966         (reinsert_reinsert_breakpoints): Likewise.
2967         * mem-break.h (set_reinsert_breakpoint): Update declaration.
2968         (delete_reinsert_breakpoints): Likewise.
2969         (reinsert_reinsert_breakpoints): Likewise.
2970         (uninsert_reinsert_breakpoints): Likewise.
2971         (has_reinsert_breakpoints): Likewise.
2972
2973 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2974
2975         * inferiors.c (get_thread_process): Make parameter const.
2976         * inferiors.h (get_thread_process): Update declaration.
2977         * mem-break.c (clone_all_breakpoints): Remove all parameters.
2978         Add new parameters child_thread and parent_thread.  Callers
2979         updated.
2980         * mem-break.h (clone_all_breakpoints): Update declaration.
2981
2982 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2983
2984         * mem-break.c (struct breakpoint) <cond_list>: Remove.
2985         <command_list, handler>: Remove.
2986         (struct gdb_breakpoint): New.
2987         (struct other_breakpoint): New.
2988         (struct reinsert_breakpoint): New.
2989         (is_gdb_breakpoint): New function.
2990         (any_persistent_commands): Update command_list if
2991         is_gdb_breakpoint returns true.
2992         (set_breakpoint): Create breakpoints according to their types.
2993         (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2994         (set_gdb_breakpoint_1): Likewise.
2995         (set_gdb_breakpoint): Likewise.
2996         (clear_breakpoint_conditions): Change parameter type to
2997         'struct gdb_breakpoint *'.
2998         (clear_breakpoint_commands): Likewise.
2999         (clear_breakpoint_conditions_and_commands): Likewise.
3000         (add_condition_to_breakpoint): Likewise.
3001         (add_breakpoint_condition): Likewise.
3002         (add_commands_to_breakpoint): Likewise.
3003         (check_breakpoints): Check other_breakpoint.
3004         (clone_one_breakpoint): Clone breakpopint according to its type.
3005         * mem-break.h (struct gdb_breakpoint): Declare.
3006         (set_gdb_breakpoint): Update declaration.
3007         (clear_breakpoint_conditions_and_commands): Likewise.
3008         (add_breakpoint_condition): Likewise.
3009         (add_breakpoint_commands): Likewise.
3010         * server.c (process_point_options): Change parameter type to
3011         'struct gdb_breakpoint *'.
3012
3013 2016-07-21  Yao Qi  <yao.qi@linaro.org>
3014
3015         * mem-break.c (set_breakpoint_at): Rename it to ...
3016         (set_breakpoint_type_at): ... it.
3017         (set_breakpoint_at): Call set_breakpoint_type_at.
3018         (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3019         * mem-break.h (set_breakpoint_at): Update comments.
3020
3021 2016-07-12  Chung-Lin Tang  <cltang@codesourcery.com>
3022
3023         * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3024         to buf parameter.
3025         (nios2_store_gregset): Likewise.
3026
3027 2016-07-01  Pedro Alves  <palves@redhat.com>
3028             Antoine Tremblay  <antoine.tremblay@ericsson.com>
3029
3030         * linux-low.c: Change interface to take the target lwp_info
3031         pointer directly and return void.  Handle detaching from a zombie
3032         thread.
3033         (linux_detach_lwp_callback): New function.
3034         (linux_detach): Detach from the leader thread after detaching from
3035         the clone threads.
3036
3037 2016-06-28  Yao Qi  <yao.qi@linaro.org>
3038
3039         * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3040         for variable new_offset.
3041         (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3042         (aarch64_ftrace_insn_reloc_cb): Likewise.
3043         (aarch64_ftrace_insn_reloc_tb): Likewise.
3044         (aarch64_install_fast_tracepoint_jump_pad): Likewise.  Use
3045         PRIx64 instead of PRIx32.
3046
3047 2016-06-28  Yao Qi  <yao.qi@linaro.org>
3048
3049         * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3050         (the_low_target): Install arm_get_syscall_trapinfo.
3051
3052 2016-06-28  Yao Qi  <yao.qi@linaro.org>
3053
3054         * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3055         function.
3056         (the_low_target): Install aarch64_get_syscall_trapinfo.
3057
3058 2016-06-28  Yao Qi  <yao.qi@linaro.org>
3059
3060         * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3061         Callers updated.
3062         * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3063         Remove parameter sysno.
3064         * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3065         sysret.
3066
3067 2016-06-21  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3068
3069         * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3070         (s390_emit_ne_goto): Likewise.
3071         (s390_emit_lt_goto): Likewise.
3072         (s390_emit_le_goto): Likewise.
3073         (s390_emit_gt_goto): Likewise.
3074         (s390_emit_ge_goto): Likewise.
3075         (s390x_emit_eq_goto): Likewise.
3076         (s390x_emit_ne_goto): Likewise.
3077         (s390x_emit_lt_goto): Likewise.
3078         (s390x_emit_le_goto): Likewise.
3079         (s390x_emit_gt_goto): Likewise.
3080         (s390x_emit_ge_goto): Likewise.
3081         (s390_emit_ops_impl): Mark variable static.
3082         (s390x_emit_ops): Likewise.
3083
3084 2016-06-17  Yao Qi  <yao.qi@linaro.org>
3085
3086         * linux-low.c (handle_extended_wait): Call
3087         uninsert_reinsert_breakpoints for the parent process.  Remove
3088         reinsert breakpoints from the child process.  Reinsert them to
3089         the parent process when vfork is done.
3090         * mem-break.c (uninsert_reinsert_breakpoints): New function.
3091         (reinsert_reinsert_breakpoints): New function.
3092         * mem-break.h (uninsert_reinsert_breakpoints): Declare
3093         (reinsert_reinsert_breakpoints): Declare.
3094
3095 2016-06-17  Yao Qi  <yao.qi@linaro.org>
3096
3097         * linux-low.c (handle_extended_wait): If the parent is doing
3098         step-over, remove the reinsert breakpoints from the forked child.
3099
3100 2016-06-17  Yao Qi  <yao.qi@linaro.org>
3101
3102         * linux-low.c (unsuspend_all_lwps): Declare.
3103         (linux_low_filter_event): If thread exited, call finish_step_over.
3104         If step-over is finished, unsuspend other threads.
3105
3106 2016-06-17  Yao Qi  <yao.qi@linaro.org>
3107
3108         * linux-low.c (linux_resume_one_lwp_throw): Assert
3109         has_reinsert_breakpoints returns false.
3110         * mem-break.c (delete_disabled_breakpoints): Assert
3111         bp type isn't reinsert_breakpoint.
3112
3113 2016-06-17  Yao Qi  <yao.qi@linaro.org>
3114
3115         * linux-low.c (maybe_hw_step): New function.
3116         (linux_resume_one_lwp_throw): Call maybe_hw_step.
3117         (finish_step_over): Switch current_thread to lwp temporarily,
3118         and assert has_reinsert_breakpoints returns true.
3119         (proceed_one_lwp): Call maybe_hw_step.
3120         * mem-break.c (has_reinsert_breakpoints): New function.
3121         * mem-break.h (has_reinsert_breakpoints): Declare.
3122
3123 2016-06-02  Jon Turney  <jon.turney@dronecode.org.uk>
3124
3125         * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3126
3127 2016-05-17  Yao Qi  <yao.qi@linaro.org>
3128
3129         * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3130         instead of find_inferior.
3131
3132 2016-05-05  Yao Qi  <yao.qi@linaro.org>
3133
3134         * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3135         Initialize res to zero.
3136
3137 2016-05-05  Yao Qi  <yao.qi@linaro.org>
3138
3139         * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3140         to uint32_t.
3141
3142 2016-05-04  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3143
3144         * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3145         used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3146         (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3147
3148 2016-04-28  Par Olsson  <par.olsson@windriver.com>
3149             Simon Marchi  <simon.marchi@ericsson.com>
3150
3151         * tracepoint.c (write_inferior_int8): New function.
3152         (cmd_qtenable_disable): Write enable flag using
3153         write_inferior_int8.
3154
3155 2016-04-25  Yao Qi  <yao.qi@linaro.org>
3156
3157         * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3158         (need_step_over_p): Return zero if the LWP has pending signals
3159         can be delivered on software single step target.
3160
3161 2016-04-25  Yao Qi  <yao.qi@linaro.org>
3162
3163         * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3164         return instead of error.
3165
3166 2016-04-22  Yao Qi  <yao.qi@linaro.org>
3167
3168         * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3169         to 23.
3170
3171 2016-04-22  Yao Qi  <yao.qi@linaro.org>
3172
3173         * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3174         signal when stepping over breakpoint with software single
3175         step.
3176
3177 2016-04-21  Pedro Alves  <palves@redhat.com>
3178
3179         * linux-s390-low.c (s390_collect_ptrace_register)
3180         (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3181         add casts.
3182         (s390_check_regset): Use void * instead of gdb_byte *.
3183
3184 2016-04-20  Pedro Alves  <palves@redhat.com>
3185
3186         * configure: Renegerate.
3187
3188 2016-04-20  Yao Qi  <yao.qi@linaro.org>
3189
3190         * linux-aarch32-low.c: Include "arch/arm-linux.h".
3191         (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3192         number 16.
3193         (arm_store_gregset): Likewise.
3194
3195 2016-04-16  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3196
3197         * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3198         i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3199         (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3200         (amd64-avx-mpx-linux.c): New rules.
3201         (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3202         * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3203         (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3204         (srv_amd64_regobj): Add amd64-avx-mpx.o.
3205         (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3206         (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3207         (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3208         (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3209         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3210         (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3211         (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3212         * linux-x86-low.c (x86_linux_read_description): Add case for
3213         X86_XSTATE_AVX_MPX_MASK.
3214         (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3215         (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3216         init_registers_i386_avx_mpx_linux.
3217         * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3218         (initialize_low_tracepoint): Call
3219         init_registers_i386_avx_mpx_linux.
3220         * linux-amd64-ipa.c (get_ipa_tdesc):  Add case for avx_mpx.
3221         (initialize_low_tracepoint): Call
3222         init_registers_amd64_avx_mpx_linux.
3223         * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3224         (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3225         (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3226         declarations.
3227
3228 2016-04-18  Pedro Alves  <palves@redhat.com>
3229
3230         * configure: Regenerate.
3231
3232 2016-04-13  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3233
3234         * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3235         (aarch64_emit_sub): Likewise.
3236
3237 2016-04-12  Pedro Alves  <palves@redhat.com>
3238
3239         * utils.c (prepare_to_throw_exception): Delete.
3240
3241 2016-04-05  Simon Marchi  <simon.marchi@ericsson.com>
3242
3243         * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3244
3245 2016-04-05  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3246
3247         * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3248
3249 2016-04-03  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3250
3251         * linux-aarch64-ipa.c: Add <elf.h> include.
3252         * linux-ppc-ipa.c: Add <elf.h> include.
3253         * linux-s390-ipa.c: Add <elf.h> include.
3254
3255 2016-03-31  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3256
3257         * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3258         (get_raw_reg_ptr): Likewise.
3259         (get_trace_state_variable_value_ptr): Likewise.
3260         (set_trace_state_variable_value_ptr): Likewise.
3261         (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3262         char *.
3263
3264 2016-03-31  Wei-cheng Wang  <cole945@gmail.com>
3265             Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3266
3267         PR/17221
3268         * linux-ppc-low.c (emit_insns): New function.
3269         (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3270         (ppc_emit_prologue): New function.
3271         (ppc_emit_epilogue): New function.
3272         (ppc_emit_add): New function.
3273         (ppc_emit_sub): New function.
3274         (ppc_emit_mul): New function.
3275         (ppc_emit_lsh): New function.
3276         (ppc_emit_rsh_signed): New function.
3277         (ppc_emit_rsh_unsigned): New function.
3278         (ppc_emit_ext): New function.
3279         (ppc_emit_zero_ext): New function.
3280         (ppc_emit_log_not): New function.
3281         (ppc_emit_bit_and): New function.
3282         (ppc_emit_bit_or): New function.
3283         (ppc_emit_bit_xor): New function.
3284         (ppc_emit_bit_not): New function.
3285         (ppc_emit_equal): New function.
3286         (ppc_emit_less_signed): New function.
3287         (ppc_emit_less_unsigned): New function.
3288         (ppc_emit_ref): New function.
3289         (ppc_emit_const): New function.
3290         (ppc_emit_reg): New function.
3291         (ppc_emit_pop): New function.
3292         (ppc_emit_stack_flush): New function.
3293         (ppc_emit_swap): New function.
3294         (ppc_emit_stack_adjust): New function.
3295         (ppc_emit_call): New function.
3296         (ppc_emit_int_call_1): New function.
3297         (ppc_emit_void_call_2): New function.
3298         (ppc_emit_if_goto): New function.
3299         (ppc_emit_goto): New function.
3300         (ppc_emit_eq_goto): New function.
3301         (ppc_emit_ne_goto): New function.
3302         (ppc_emit_lt_goto): New function.
3303         (ppc_emit_le_goto): New function.
3304         (ppc_emit_gt_goto): New function.
3305         (ppc_emit_ge_goto): New function.
3306         (ppc_write_goto_address): New function.
3307         (ppc_emit_ops_impl): New static variable.
3308         (ppc64v1_emit_prologue): New function.
3309         (ppc64v2_emit_prologue): New function.
3310         (ppc64_emit_epilogue): New function.
3311         (ppc64_emit_add): New function.
3312         (ppc64_emit_sub): New function.
3313         (ppc64_emit_mul): New function.
3314         (ppc64_emit_lsh): New function.
3315         (ppc64_emit_rsh_signed): New function.
3316         (ppc64_emit_rsh_unsigned): New function.
3317         (ppc64_emit_ext): New function.
3318         (ppc64_emit_zero_ext): New function.
3319         (ppc64_emit_log_not): New function.
3320         (ppc64_emit_bit_and): New function.
3321         (ppc64_emit_bit_or): New function.
3322         (ppc64_emit_bit_xor): New function.
3323         (ppc64_emit_bit_not): New function.
3324         (ppc64_emit_equal): New function.
3325         (ppc64_emit_less_signed): New function.
3326         (ppc64_emit_less_unsigned): New function.
3327         (ppc64_emit_ref): New function.
3328         (ppc64_emit_const): New function.
3329         (ppc64v1_emit_reg): New function.
3330         (ppc64v2_emit_reg): New function.
3331         (ppc64_emit_pop): New function.
3332         (ppc64_emit_stack_flush): New function.
3333         (ppc64_emit_swap): New function.
3334         (ppc64v1_emit_call): New function.
3335         (ppc64v2_emit_call): New function.
3336         (ppc64v1_emit_int_call_1): New function.
3337         (ppc64v2_emit_int_call_1): New function.
3338         (ppc64v1_emit_void_call_2): New function.
3339         (ppc64v2_emit_void_call_2): New function.
3340         (ppc64_emit_if_goto): New function.
3341         (ppc64_emit_eq_goto): New function.
3342         (ppc64_emit_ne_goto): New function.
3343         (ppc64_emit_lt_goto): New function.
3344         (ppc64_emit_le_goto): New function.
3345         (ppc64_emit_gt_goto): New function.
3346         (ppc64_emit_ge_goto): New function.
3347         (ppc64v1_emit_ops_impl): New static variable.
3348         (ppc64v2_emit_ops_impl): New static variable.
3349         (ppc_emit_ops): New function.
3350         (linux_low_target): Wire in ppc_emit_ops.
3351
3352 2016-03-31  Wei-cheng Wang  <cole945@gmail.com>
3353             Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3354
3355         PR/17221
3356         * Makefile.in: Add powerpc-*-ipa.o
3357         * configure.srv: Add ipa_obj for powerpc*-linux.
3358         * linux-ppc-ipa.c: New file.
3359         * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3360         includes.
3361         (PPC_FIELD): New macro.
3362         (PPC_SEXT): New macro.
3363         (PPC_OP6): New macro.
3364         (PPC_BO): New macro.
3365         (PPC_LI): New macro.
3366         (PPC_BD): New macro.
3367         (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3368         (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3369         (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3370         (ppc_get_thread_area): New function.
3371         (is_elfv2_inferior): New function.
3372         (gen_ds_form): New function.
3373         (GEN_STD): New macro.
3374         (GEN_STDU): New macro.
3375         (GEN_LD): New macro.
3376         (GEN_LDU): New macro.
3377         (gen_d_form): New function.
3378         (GEN_ADDI): New macro.
3379         (GEN_ADDIS): New macro.
3380         (GEN_LI): New macro.
3381         (GEN_LIS): New macro.
3382         (GEN_ORI): New macro.
3383         (GEN_ORIS): New macro.
3384         (GEN_LWZ): New macro.
3385         (GEN_STW): New macro.
3386         (GEN_STWU): New macro.
3387         (gen_xfx_form): New function.
3388         (GEN_MFSPR): New macro.
3389         (GEN_MTSPR): New macro.
3390         (GEN_MFCR): New macro.
3391         (GEN_MTCR): New macro.
3392         (GEN_SYNC): New macro.
3393         (GEN_LWSYNC): New macro.
3394         (gen_x_form): New function.
3395         (GEN_OR): New macro.
3396         (GEN_MR): New macro.
3397         (GEN_LWARX): New macro.
3398         (GEN_STWCX): New macro.
3399         (GEN_CMPW): New macro.
3400         (gen_md_form): New function.
3401         (GEN_RLDICL): New macro.
3402         (GEN_RLDICR): New macro.
3403         (gen_i_form): New function.
3404         (GEN_B): New macro.
3405         (GEN_BL): New macro.
3406         (gen_b_form): New function.
3407         (GEN_BNE): New macro.
3408         (GEN_LOAD): New macro.
3409         (GEN_STORE): New macro.
3410         (gen_limm): New function.
3411         (gen_atomic_xchg): New function.
3412         (gen_call): New function.
3413         (ppc_relocate_instruction): New function.
3414         (ppc_install_fast_tracepoint_jump_pad): New function.
3415         (ppc_get_min_fast_tracepoint_insn_len): New function.
3416         (ppc_get_ipa_tdesc_idx): New function.
3417         (the_low_target): Wire in the new functions.
3418         (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3419         tdescs.
3420         * linux-ppc-tdesc.h: New file.
3421
3422 2016-03-31  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3423
3424         * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3425         (alloc_jump_pad_buffer): New function.
3426         * linux-amd64-ipa.c: Add <sys/mman.h> include.
3427         (alloc_jump_pad_buffer): New function.
3428         * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3429         * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3430         (alloc_jump_pad_buffer): New function.
3431         * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3432         (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3433         * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3434         (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3435
3436 2016-03-30  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3437
3438         * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3439         * linux-amd64-ipa.c: Likewise.
3440         * linux-i386-ipa.c: Likewise.
3441         * linux-s390-ipa.c: Likewise.
3442         * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3443         ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3444         set_trace_state_variable_value_ptr.
3445         (struct ipa_sym_addresses): Likewise.
3446         (symbol_list): Likewise.
3447         (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3448         accessing gdb_collect directly.
3449         (gdb_collect_ptr_type): New typedef.
3450         (get_raw_reg_ptr_type): New typedef.
3451         (get_trace_state_variable_value_ptr_type): New typedef.
3452         (set_trace_state_variable_value_ptr_type): New typedef.
3453         (gdb_collect_ptr): New global.
3454         (get_raw_reg_ptr): New global.
3455         (get_trace_state_variable_value_ptr): New global.
3456         (set_trace_state_variable_value_ptr): New global.
3457         (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3458         accessing get_raw_reg directly.
3459         (get_get_tsv_func_addr): Likewise for
3460         get_trace_state_variable_value_ptr.
3461         (get_set_tsv_func_addr): Likewise for
3462         set_trace_state_variable_value_ptr.
3463         * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3464
3465 2016-03-30  Simon Marchi  <simon.marchi@ericsson.com>
3466
3467         * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3468
3469 2016-03-30  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3470
3471         * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3472         packets.
3473         (relocate_instruction): Remove own_buf.
3474         * server.c (own_buf): Make global.
3475         (handle_v_requests): Make global.
3476         * server.h (own_buf): New declaration.
3477         (handle_v_requests): New prototype.
3478
3479 2016-03-29  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3480
3481         PR 18377
3482         * linux-s390-low.c (add_insns): New function.
3483         (s390_emit_prologue): New function.
3484         (s390_emit_epilogue): New function.
3485         (s390_emit_add): New function.
3486         (s390_emit_sub): New function.
3487         (s390_emit_mul): New function.
3488         (s390_emit_lsh): New function.
3489         (s390_emit_rsh_signed): New function.
3490         (s390_emit_rsh_unsigned): New function.
3491         (s390_emit_ext): New function.
3492         (s390_emit_log_not): New function.
3493         (s390_emit_bit_and): New function.
3494         (s390_emit_bit_or): New function.
3495         (s390_emit_bit_xor): New function.
3496         (s390_emit_bit_not): New function.
3497         (s390_emit_equal): New function.
3498         (s390_emit_less_signed): New function.
3499         (s390_emit_less_unsigned): New function.
3500         (s390_emit_ref): New function.
3501         (s390_emit_if_goto): New function.
3502         (s390_emit_goto): New function.
3503         (s390_write_goto_address): New function.
3504         (s390_emit_litpool): New function.
3505         (s390_emit_const): New function.
3506         (s390_emit_call): New function.
3507         (s390_emit_reg): New function.
3508         (s390_emit_pop): New function.
3509         (s390_emit_stack_flush): New function.
3510         (s390_emit_zero_ext): New function.
3511         (s390_emit_swap): New function.
3512         (s390_emit_stack_adjust): New function.
3513         (s390_emit_set_r2): New function.
3514         (s390_emit_int_call_1): New function.
3515         (s390_emit_void_call_2): New function.
3516         (s390_emit_eq_goto): New function.
3517         (s390_emit_ne_goto): New function.
3518         (s390_emit_lt_goto): New function.
3519         (s390_emit_le_goto): New function.
3520         (s390_emit_gt_goto): New function.
3521         (s390_emit_ge_goto): New function.
3522         (s390x_emit_prologue): New function.
3523         (s390x_emit_epilogue): New function.
3524         (s390x_emit_add): New function.
3525         (s390x_emit_sub): New function.
3526         (s390x_emit_mul): New function.
3527         (s390x_emit_lsh): New function.
3528         (s390x_emit_rsh_signed): New function.
3529         (s390x_emit_rsh_unsigned): New function.
3530         (s390x_emit_ext): New function.
3531         (s390x_emit_log_not): New function.
3532         (s390x_emit_bit_and): New function.
3533         (s390x_emit_bit_or): New function.
3534         (s390x_emit_bit_xor): New function.
3535         (s390x_emit_bit_not): New function.
3536         (s390x_emit_equal): New function.
3537         (s390x_emit_less_signed): New function.
3538         (s390x_emit_less_unsigned): New function.
3539         (s390x_emit_ref): New function.
3540         (s390x_emit_if_goto): New function.
3541         (s390x_emit_const): New function.
3542         (s390x_emit_call): New function.
3543         (s390x_emit_reg): New function.
3544         (s390x_emit_pop): New function.
3545         (s390x_emit_stack_flush): New function.
3546         (s390x_emit_zero_ext): New function.
3547         (s390x_emit_swap): New function.
3548         (s390x_emit_stack_adjust): New function.
3549         (s390x_emit_int_call_1): New function.
3550         (s390x_emit_void_call_2): New function.
3551         (s390x_emit_eq_goto): New function.
3552         (s390x_emit_ne_goto): New function.
3553         (s390x_emit_lt_goto): New function.
3554         (s390x_emit_le_goto): New function.
3555         (s390x_emit_gt_goto): New function.
3556         (s390x_emit_ge_goto): New function.
3557         (s390_emit_ops): New function.
3558         (struct linux_target_ops): Fill in emit_ops hook.
3559
3560 2016-03-29  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3561
3562         PR 18377
3563         * Makefile.in: Add s390 IPA files.
3564         * configure.srv: Build IPA for s390.
3565         * linux-s390-ipa.c: New file.
3566         * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3567         (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3568         (tdesc_s390_linux32): Likewise.
3569         (init_registers_s390_linux32v1): Likewise.
3570         (tdesc_s390_linux32v1): Likewise.
3571         (init_registers_s390_linux32v2): Likewise.
3572         (tdesc_s390_linux32v2): Likewise.
3573         (init_registers_s390_linux64): Likewise.
3574         (tdesc_s390_linux64): Likewise.
3575         (init_registers_s390_linux64v1): Likewise.
3576         (tdesc_s390_linux64v1): Likewise.
3577         (init_registers_s390_linux64v2): Likewise.
3578         (tdesc_s390_linux64v2): Likewise.
3579         (init_registers_s390_te_linux64): Likewise.
3580         (tdesc_s390_te_linux64): Likewise.
3581         (init_registers_s390_vx_linux64): Likewise.
3582         (tdesc_s390_vx_linux64): Likewise.
3583         (init_registers_s390_tevx_linux64): Likewise.
3584         (tdesc_s390_tevx_linux64): Likewise.
3585         (init_registers_s390x_linux64): Likewise.
3586         (tdesc_s390x_linux64): Likewise.
3587         (init_registers_s390x_linux64v1): Likewise.
3588         (tdesc_s390x_linux64v1): Likewise.
3589         (init_registers_s390x_linux64v2): Likewise.
3590         (tdesc_s390x_linux64v2): Likewise.
3591         (init_registers_s390x_te_linux64): Likewise.
3592         (tdesc_s390x_te_linux64): Likewise.
3593         (init_registers_s390x_vx_linux64): Likewise.
3594         (tdesc_s390x_vx_linux64): Likewise.
3595         (init_registers_s390x_tevx_linux64): Likewise.
3596         (tdesc_s390x_tevx_linux64): Likewise.
3597         (have_hwcap_s390_vx): New static variable.
3598         (s390_arch_setup): Fill have_hwcap_s390_vx.
3599         (s390_get_thread_area): New function.
3600         (s390_ft_entry_gpr_esa): New const.
3601         (s390_ft_entry_gpr_zarch): New const.
3602         (s390_ft_entry_misc): New const.
3603         (s390_ft_entry_fr): New const.
3604         (s390_ft_entry_vr): New const.
3605         (s390_ft_main_31): New const.
3606         (s390_ft_main_64): New const.
3607         (s390_ft_exit_fr): New const.
3608         (s390_ft_exit_vr): New const.
3609         (s390_ft_exit_misc): New const.
3610         (s390_ft_exit_gpr_esa): New const.
3611         (s390_ft_exit_gpr_zarch): New const.
3612         (append_insns): New function.
3613         (s390_relocate_instruction): New function.
3614         (s390_install_fast_tracepoint_jump_pad): New function.
3615         (s390_get_min_fast_tracepoint_insn_len): New function.
3616         (s390_get_ipa_tdesc_idx): New function.
3617         (struct linux_target_ops): Wire in the above functions.
3618         (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3619         * linux-s390-tdesc.h: New file.
3620
3621 2016-03-29  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3622
3623         * linux-s390-low.c (s390_supports_tracepoints): New function.
3624         (struct linux_target_ops): Fill supports_tracepoints hook.
3625
3626 2016-03-18  Yao Qi  <yao.qi@linaro.org>
3627
3628         * linux-low.c (lwp_signal_can_be_delivered): New function.
3629         (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3630
3631 2016-03-18  Yao Qi  <yao.qi@linaro.org>
3632
3633         * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3634         0 if signal is enqueued.  Remove 'signal' from one debugging
3635         message.  Move one debugging message to some lines below.
3636         Remove code setting 'signal' to 0.
3637
3638 2016-03-18  Yao Qi  <yao.qi@linaro.org>
3639
3640         * linux-low.c (linux_low_filter_event): Remove redundant
3641         WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3642
3643 2016-03-09  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3644
3645         * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3646         (struct linux_target_ops): Wire in the above.
3647
3648 2016-03-03  Yao Qi  <yao.qi@linaro.org>
3649
3650         * linux-low.c: Update comments to start_step_over.
3651
3652 2016-03-03  Yao Qi  <yao.qi@linaro.org>
3653
3654         PR server/19736
3655         * linux-low.c (handle_extended_wait): Set child suspended
3656         if event_lwp->bp_reinsert isn't zero.
3657
3658 2016-03-02  Yao Qi  <yao.qi@linaro.org>
3659
3660         * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3661         enqueue_pending_signal.
3662
3663 2016-03-02  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3664
3665         * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3666         is actually loaded.
3667
3668 2016-02-25  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3669
3670         * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3671         (s390_regmap_3264) [!__s390x__]: New global.
3672         (s390_collect_ptrace_register): Skip map entries containing -1.
3673         (s390_supply_ptrace_register): Ditto.
3674         (s390_fill_gprs_high): New function.
3675         (s390_store_gprs_high): New function.
3676         (s390_regsets): Add NT_S390_HIGH_GPRS.
3677         (s390_get_hwcap): Enable on 31-bit.
3678         (have_hwcap_s390_high_gprs): Enable on 31-bit.
3679         (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3680         Detect NT_S390_HIGH_GPRS.
3681         (s390_usrregs_info_3264): Enable on 31-bit.
3682         (s390_regs_info): Enable regs_info_3264 on 31-bit.
3683         (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3684
3685 2016-02-25  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3686
3687         PR gdb/13808
3688         * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3689         * configure.srv: Ditto.
3690         * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3691         (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3692         * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3693         (init_registers_amd64_linux): Remove prototype.
3694         (tdesc_amd64_linux): Remove declaration.
3695         (get_ipa_tdesc): New function.
3696         (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3697         initialize remaining tdescs.
3698         * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3699         (init_registers_i386_linux): Remove prototype.
3700         (tdesc_i386_linux): Remove declaration.
3701         (get_ipa_tdesc): New function.
3702         (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3703         initialize remaining tdescs.
3704         * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3705         (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3706         * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3707         * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3708         (x86_get_ipa_tdesc_idx): New function.
3709         (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3710         * linux-x86-tdesc.h: New file.
3711         * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3712         (target_get_ipa_tdesc_idx): New macro.
3713         * tracepoint.c (ipa_tdesc_idx): New macro.
3714         (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3715         (symbol_list): Add ipa_tdesc_idx.
3716         (cmd_qtstart): Write ipa_tdesc_idx in the target.
3717         (ipa_tdesc): Remove.
3718         (ipa_tdesc_idx): New variable.
3719         (get_context_regcache): Use get_ipa_tdesc.
3720         (gdb_collect): Ditto.
3721         (gdb_probe): Ditto.
3722         * tracepoint.h (get_ipa_tdesc): New prototype.
3723         (ipa_tdesc): Remove.
3724
3725 2016-02-24  Pedro Alves  <palves@redhat.com>
3726
3727         * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3728         (save_stop_reason): ... this.  Use GDB_ARCH_IS_TRAP_HWBKPT and
3729         handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3730         Factor out common code between the USE_SIGTRAP_SIGINFO and
3731         !USE_SIGTRAP_SIGINFO blocks.
3732         (linux_low_filter_event): Call save_stop_reason instead of
3733         check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3734         Update comments.
3735         (linux_wait_1): Update comments.
3736
3737 2016-02-24  Wei-cheng Wang  <cole945@gmail.com>
3738
3739         * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3740         (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3741         (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3742         ppc_insert_point, ppc_remove_point.
3743
3744 2016-02-17  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3745
3746         * linux-s390-low.c (s390_supports_z_point_type): New function.
3747         (struct linux_target_ops): Wire s390_supports_z_point_type in.
3748
3749 2016-02-16  Yao Qi  <yao.qi@linaro.org>
3750
3751         * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3752         PC.  Get pc from regcache_read_pc.
3753
3754 2016-02-12  Yao Qi  <yao.qi@linaro.org>
3755
3756         * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3757         or linux_get_pc_32bit.
3758         (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3759
3760 2016-02-12  Yao Qi  <yao.qi@linaro.org>
3761
3762         * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3763         arm_linux_get_next_pcs_fixup.
3764
3765 2016-02-12  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3766
3767         * tracepoint.c (x_tracepoint_action_download): Change
3768         write_inferior_data_ptr to write_inferior_data_pointer.
3769         (cmd_qtstart): Likewise.
3770         (write_inferior_data_ptr): Remove.
3771         (download_agent_expr): Change write_inferior_data_ptr to
3772         write_inferior_data_pointer.
3773         (download_tracepoint_1): Likewise.
3774         (download_tracepoint): Likewise.
3775         (download_trace_state_variables): Likewise.
3776
3777 2016-02-11  Wei-cheng Wang  <cole945@gmail.com>
3778             Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3779
3780         * tracepoint.c (struct tracepoint_action_ops): Remove.
3781         (struct tracepoint_action): Remove ops.
3782         (m_tracepoint_action_download, r_tracepoint_action_download)
3783         (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3784         size and offset accordingly.
3785         (m_tracepoint_action_ops, r_tracepoint_action_ops)
3786         (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3787         (tracepoint_action_send, tracepoint_action_download): New functions.
3788         Helpers for trace action handlers.
3789         (add_tracepoint_action): Remove setup actions ops.
3790         (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3791
3792 2016-02-10  Yao Qi  <yao.qi@linaro.org>
3793
3794         * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3795
3796 2016-02-09  Simon Marchi  <simon.marchi@ericsson.com>
3797
3798         * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3799         to AC_OUTPUT.
3800         * configure: Regenerate.
3801
3802 2016-02-09  Simon Marchi  <simon.marchi@ericsson.com>
3803
3804         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3805         void * to gdb_byte *.
3806         * linux-low.c (siginfo_fixup): Likewise.
3807         (linux_xfer_siginfo): Likewise.
3808         * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3809         Likewise.
3810         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3811
3812 2016-02-02  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3813
3814         * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3815         to srv_tgtobj.
3816         (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3817         to srv_tgtobj.
3818         * linux-x86-low.c [__x86_64__]: Include
3819         "nat/amd64-linux-siginfo.h".
3820         (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3821         (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3822         (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3823         (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3824         (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3825         (cpt_si_fd, si_timerid, si_overrun): Move from
3826         nat/amd64-linux-siginfo.c.
3827         * Makefile.in (amd64-linux-siginfo.o:): New rule.
3828
3829 2016-01-28  Simon Marchi  <simon.marchi@ericsson.com>
3830
3831         * server.c (skip_to_semicolon):  Remove.
3832         (process_point_options): Use strchrnul instead of
3833         skip_to_semicolon.
3834
3835 2016-01-26  Yao Qi  <yao.qi@linaro.org>
3836
3837         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3838         * linux-low.c (install_software_single_step_breakpoints): Don't
3839         call regcache_read_pc.
3840         * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3841         argument pc.
3842
3843 2016-01-26  Yao Qi  <yao.qi@linaro.org>
3844
3845         * linux-low.c (install_software_single_step_breakpoints): Call
3846         regcache_read_pc instead of get_pc.
3847
3848 2016-01-26  Yao Qi  <yao.qi@linaro.org>
3849
3850         * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3851         (unblock_async_io): Rename to ...
3852         (block_unblock_async_io): ... it.  New function.
3853         (enable_async_io): Don't install SIGIO handler.  Unblock it
3854         instead.
3855         (disable_async_io): Don't ignore SIGIO.  Block it instead.
3856         (initialize_async_io): Install SIGIO handler.  Don't call
3857         unblock_async_io.
3858
3859 2016-01-26  Yao Qi  <yao.qi@linaro.org>
3860
3861         * remote-utils.c (getpkt): If the buffer isn't empty, and the
3862         first character is '\003', call *the_target->request_interrupt.
3863
3864 2016-01-25  Yao Qi  <yao.qi@linaro.org>
3865
3866         * remote-utils.c (new_thread_notify): Remove.
3867         (dead_thread_notify): Likewise.
3868         * remote-utils.h (new_thread_notify): Remove declaration.
3869         (dead_thread_notify): Likewise.
3870
3871 2016-01-23  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3872
3873         * gdb.trace/pending.exp: Fix expected message on continue.
3874
3875 2016-01-22  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3876
3877         * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3878         it works properly on big-endian machines where sizeof (CORE_ADDR)
3879         != sizeof (void *).
3880
3881 2016-01-21  Pedro Alves  <palves@redhat.com>
3882
3883         * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3884         (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3885         * configure: Regenerate.
3886
3887 2016-01-21  Yao Qi  <yao.qi@linaro.org>
3888
3889         * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3890         is_thumb and set it according to CPSR saved on the stack.
3891         (get_next_pcs_syscall_next_pc): Pass is_thumb to
3892         arm_sigreturn_next_pc.
3893
3894 2016-01-18  Yao Qi  <yao.qi@linaro.org>
3895
3896         * linux-low.c (linux_set_pc_64bit): New function.
3897         (linux_get_pc_64bit): New function.
3898         * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3899         Declare.
3900         * linux-sparc-low.c (debug_threads): Remove declaration.
3901         (sparc_get_pc): Remove.
3902         (the_low_target): Use linux_get_pc_64bit instead of
3903         sparc_get_pc.
3904         * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3905         (the_low_target): Use linux_get_pc_64bit and
3906         linux_set_pc_64bit.
3907
3908 2016-01-18  Yao Qi  <yao.qi@linaro.org>
3909
3910         * linux-arm-low.c (debug_threads): Remove declaration.
3911         (arm_get_pc, arm_set_pc): Remove.
3912         (the_low_target): Use linux_get_pc_32bit and
3913         linux_set_pc_32bit.
3914         * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3915         (the_low_target): Use linux_get_pc_32bit and
3916         linux_set_pc_32bit.
3917         * linux-cris-low.c (debug_threads): Remove declaration.
3918         (cris_get_pc, cris_set_pc,): Remove.
3919         (the_low_target): Use linux_get_pc_32bit and
3920         linux_set_pc_32bit.
3921         * linux-crisv32-low.c (debug_threads): Remove declaration.
3922         (cris_get_pc, cris_set_pc): Remove.
3923         (the_low_target): Use linux_get_pc_32bit and
3924         linux_set_pc_32bit.
3925         * linux-low.c: Include inttypes.h.
3926         (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3927         * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3928         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3929         (the_low_target): Use linux_get_pc_32bit and
3930         linux_set_pc_32bit.
3931         * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3932         (the_low_target): Use linux_get_pc_32bit and
3933         linux_set_pc_32bit.
3934         * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3935         (the_low_target): Use linux_get_pc_32bit and
3936         linux_set_pc_32bit.
3937         * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3938         (the_low_target): Use linux_get_pc_32bit and
3939         linux_set_pc_32bit.
3940         * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3941         (the_low_target): Use linux_get_pc_32bit and
3942         linux_set_pc_32bit.
3943
3944 2016-01-18  Gary Benson  <gbenson@redhat.com>
3945
3946         * configure.ac (AC_FUNC_FORK): New check.
3947         * config.in: Regenerate.
3948         * configure: Likewise.
3949
3950 2016-01-14  Yao Qi  <yao.qi@linaro.org>
3951
3952         * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3953         * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3954         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3955         arm_get_next_pcs_ctor.
3956
3957 2016-01-12  Josh Stone  <jistone@redhat.com>
3958             Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3959
3960         * inferiors.h: Include "gdb_vecs.h".
3961         (struct process_info): Add syscalls_to_catch.
3962         * inferiors.c (remove_process): Free syscalls_to_catch.
3963         * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3964         syscall_return stops.
3965         * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3966         * server.c (handle_general_set): Handle QCatchSyscalls.
3967         (handle_query): Report support for QCatchSyscalls.
3968         * target.h (struct target_ops): Add supports_catch_syscall.
3969         (target_supports_catch_syscall): New macro.
3970         * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3971         (struct lwp_info): Add syscall_state.
3972         * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3973         Maintain syscall_state and syscalls_to_catch across exec.
3974         (get_syscall_trapinfo): New function, proxy to the_low_target.
3975         (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3976         (linux_low_filter_event): Toggle syscall_state entry/return for
3977         syscall traps, and set it ignored for all others.
3978         (gdb_catching_syscalls_p): New function.
3979         (gdb_catch_this_syscall_p): New function.
3980         (linux_wait_1): Handle SYSCALL_SIGTRAP.
3981         (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3982         (linux_supports_catch_syscall): New function.
3983         (linux_target_ops): Install it.
3984         * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3985         (the_low_target): Install it.
3986
3987 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
3988
3989         * acinclude.m4: Include new ../warning.m4 file.
3990         * configure: Regenerated.
3991         * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3992
3993 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
3994
3995         * ax.c (is_goto_target): Mark static.
3996         * linux-low.c (register_addr): Likewise.
3997         (linux_fetch_registers, linux_store_registers): Likewise.
3998         * mem-break.c (any_persistent_commands): Fix old prototype.
3999         (add_commands_to_breakpoint): Mark static.
4000         * regcache.c (find_register_by_name): Delete unused func.
4001         * remote-utils.c (hex_or_minus_one): Mark static.
4002         * server.c (monitor_show_help): Mark static.
4003         (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4004         handle_v_requests): Likewise.
4005
4006 2016-01-12  Pedro Alves  <palves@redhat.com>
4007
4008         Remove use of the registered trademark symbol throughout.
4009
4010 2016-01-08  Yao Qi  <yao.qi@linaro.org>
4011
4012         * remote-utils.c (getpkt): If c is '\003', call target hook
4013         request_interrupt.
4014
4015 2016-01-06  Yao Qi  <yao.qi@linaro.org>
4016
4017         * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4018         linux-aarch32-low.c.
4019         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4020         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4021         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4022         (thumb2_breakpoint): Declare.
4023         * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4024         linux-aarch32-low.h.
4025         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4026         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4027         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4028
4029 2016-01-01  Joel Brobecker  <brobecker@adacore.com>
4030
4031         * gdbreplay.c (gdbreplay_version): Change copyright year in
4032         version message.
4033         * server.c (gdbserver_version): Likewise.
4034
4035 2015-12-28  Patrick Palka  <patrick@parcs.ath.cx>
4036
4037         * server.c (crc32_table): Delete.
4038         (crc32): Use libiberty's xcrc32 function.
4039
4040 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
4041
4042         * lynx-low.c (lynx_delete_thread_callback): New function.
4043         (lynx_mourn): Properly delete our process and all of its
4044         threads.  Remove call to clear_inferiors.
4045
4046 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
4047
4048         * target.c (thread_search_callback): Add check that
4049         the thread_stopped target callback is not NULL before
4050         calling it.
4051
4052 2015-12-21  Yao Qi  <yao.qi@linaro.org>
4053
4054         * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4055         arm breakpoint.
4056
4057 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4058
4059         * server.c (handle_query): Call target_supports_software_single_step.
4060
4061 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4062
4063         * linux-low.c (single_step): New function.
4064         (linux_resume_one_lwp_throw): Call single_step.
4065         (start_step_over): Likewise.
4066
4067 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4068
4069         * Makefile.in (SFILES): Append arch/arm-linux.c,
4070         arch/arm-get-next-pcs.c.
4071         (arm-linux.o): New rule.
4072         (arm-get-next-pcs.o): New rule.
4073         * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4074         arm-linux.o.
4075         * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro.  Moved
4076         to linux-aarch32-low.c.
4077         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4078         (arm_breakpoint_len, thumb_breakpoint): Likewise.
4079         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4080         (thumb2_breakpoint_len): Likewise.
4081         (arm_is_thumb_mode): Make non-static.
4082         * linux-aarch32-low.h (arm_abi_breakpoint): New macro.  Moved
4083         from linux-aarch32-low.c.
4084         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4085         (arm_breakpoint_len, thumb_breakpoint): Likewise.
4086         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4087         (thumb2_breakpoint_len): Likewise.
4088         (arm_is_thumb_mode): New declaration.
4089         * linux-arm-low.c: Include arch/arm-linux.h
4090         aarch/arm-get-next-pcs.h, sys/syscall.h.
4091         (get_next_pcs_ops): New struct.
4092         (get_next_pcs_addr_bits_remove): New function.
4093         (get_next_pcs_is_thumb): New function.
4094         (get_next_pcs_read_memory_unsigned_integer): Likewise.
4095         (arm_sigreturn_next_pc): Likewise.
4096         (get_next_pcs_syscall_next_pc): Likewise.
4097         (arm_gdbserver_get_next_pcs): Likewise.
4098         (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4099         Initialize.
4100         * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4101         * server.h: Include gdb_vecs.h.
4102
4103 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4104
4105         * Makefile.in (SFILES): Append common/common-regcache.c.
4106         (OBS): Append common-regcache.o.
4107         (common-regcache.o): New rule.
4108         * regcache.c (init_register_cache): Initialize cache to
4109         REG_UNAVAILABLE.
4110         (regcache_raw_read_unsigned): New function.
4111         * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4112         register_status enum.
4113
4114 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4115
4116         * linux-aarch64-low.c (the_low_targets): Rename
4117         breakpoint_reinsert_addr to get_next_pcs.
4118         * linux-arm-low.c (the_low_targets): Likewise.
4119         * linux-bfin-low.c (the_low_targets): Likewise.
4120         * linux-cris-low.c (the_low_targets): Likewise.
4121         * linux-crisv32-low.c (the_low_targets): Likewise.
4122         * linux-low.c (can_software_single_step): Likewise.
4123         (install_software_single_step_breakpoints): New function.
4124         (start_step_over): Use install_software_single_step_breakpoints.
4125         * linux-low.h: New CORE_ADDR vector.
4126         (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4127         get_next_pcs.
4128         * linux-mips-low.c (the_low_targets): Likewise.
4129         * linux-nios2-low.c (the_low_targets): Likewise.
4130         * linux-sparc-low.c (the_low_targets): Likewise.
4131
4132 2015-12-17  Pedro Alves  <palves@redhat.com>
4133
4134         * linux-low.c (linux_kill_one_lwp): Remove references to
4135         LinuxThreads.
4136         (kill_lwp): Remove HAVE_TKILL_SYSCALL check.  No longer fall back
4137         to 'kill'.
4138         (linux_init_signals): Delete.
4139         (initialize_low): Adjust.
4140         * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4141
4142 2015-12-16  Pedro Alves  <palves@redhat.com>
4143
4144         * configure.ac (compiler warning flags): When testing a
4145         -Wno-foo option, check whether -Wfoo works instead.
4146         * configure: Regenerate.
4147
4148 2015-12-11  Don Breazeal  <donb@codesourcery.com>
4149
4150         * server.c (process_serial_event): Don't exit from gdbserver
4151         in remote mode if there are still active inferiors.
4152
4153 2015-12-11  Yao Qi  <yao.qi@linaro.org>
4154
4155         * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4156         arm_breakpoint_at if the process is 32-bit.
4157
4158 2015-12-11  Yao Qi  <yao.qi@linaro.org>
4159
4160         * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4161         arm breakpoint.
4162
4163 2015-12-07  Yao Qi  <yao.qi@linaro.org>
4164
4165         * configure.srv: Append arm.o to srv_tgtobj for
4166         aarch64*-*-linux* target.
4167         * linux-aarch32-low.c (arm_abi_breakpoint): New macro.  Moved
4168         from linux-arm-low.c.
4169         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4170         (arm_breakpoint_len, thumb_breakpoint): Likewise.
4171         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4172         (thumb2_breakpoint_len): Likewise.
4173         (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4174         (arm_breakpoint_kinds): Likewise.
4175         (arm_breakpoint_kind_from_pc): Likewise.
4176         (arm_sw_breakpoint_from_kind): Likewise.
4177         (arm_breakpoint_kind_from_current_state): Likewise.
4178         * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4179         (arm_sw_breakpoint_from_kind): Declare.
4180         (arm_breakpoint_kind_from_current_state): Declare.
4181         (arm_breakpoint_at): Declare.
4182         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4183         arm_sw_breakpoint_from_kind if process is 32-bit.
4184         (aarch64_breakpoint_kind_from_pc): New function.
4185         (aarch64_breakpoint_kind_from_current_state): New function.
4186         (the_low_target): Initialize fields breakpoint_kind_from_pc
4187         and breakpoint_kind_from_current_state.
4188         * linux-arm-low.c (arm_breakpoint_kinds): Move to
4189         linux-aarch32-low.c.
4190         (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4191         (arm_breakpoint, arm_breakpoint_len): Likewise.
4192         (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4193         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4194         (arm_is_thumb_mode): Likewise.
4195         (arm_breakpoint_at): Likewise.
4196         (arm_breakpoint_kind_from_pc): Likewise.
4197         (arm_sw_breakpoint_from_kind): Likewise.
4198         (arm_breakpoint_kind_from_current_state): Likewise.
4199
4200         Revert:
4201         2015-08-04  Yao Qi  <yao.qi@linaro.org>
4202
4203         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4204         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4205         * server.c (extended_protocol): Remove "static".
4206         * server.h (extended_protocol): Declare it.
4207
4208 2015-12-04  Josh Stone  <jistone@redhat.com>
4209
4210         * target.h (struct target_ops) <arch_setup>: Rename to ...
4211         (struct target_ops) <post_create_inferior>: ... this.
4212         (target_arch_setup): Rename to ...
4213         (target_post_create_inferior): ... this, calling post_create_inferior.
4214         * server.c (start_inferior): Update target_arch_setup calls to
4215         target_post_create_inferior.
4216         * linux-low.c (linux_low_ptrace_options): Forward declare.
4217         (linux_arch_setup): Update its comment for general use.
4218         (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4219         (struct linux_target_ops): Use linux_post_create_inferior.
4220         * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4221         to post_create_inferior.
4222         * nto-low.c (struct nto_target_ops): Likewise.
4223         * spu-low.c (struct spu_target_ops): Likewise.
4224         * win32-low.c (struct win32_target_ops): Likewise.
4225
4226 2015-12-03  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4227
4228         * linux-arm-low.c: Remove duplicate arch/arm.h include.
4229
4230 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4231
4232         * linux-arm-low.c (arm_reinsert_addr): Remove function.
4233         (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4234         * linux-cris-low.c (cris_reinsert_addr> Remove function.
4235         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4236         * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4237         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4238         * linux-mips-low.c (mips_reinsert_addr): Remove function.
4239         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4240         * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4241         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4242         * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4243         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4244
4245 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4246
4247         * linux-low.c (linux_look_up_symbols): Don't call
4248         linux_supports_traceclone.
4249         * linux-low.h (thread_db_init): Remove use_events argument.
4250         * thread-db.c (thread_db_use_event): Remove global variable.
4251         (struct thread_db) <td_thr_event_enable_p>: Remove field.
4252         (struct thread_db) <td_create_bp>: Remove field.
4253         (thread_db_create_event): Remove function.
4254         (thread_db_enable_reporting): Likewise.
4255         (find_one_thread): Don't check for thread_db_use_events.
4256         (attach_thread): Likewise.
4257         (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4258         (try_thread_db_load_1): Don't check for thread_db_use_events.
4259         (thread_db_init): Remove use_events argument and thread events
4260         handling.
4261         (remove_thread_event_breakpoints): Remove function.
4262         (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4263
4264 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4265
4266         * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4267         New function.
4268         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4269         * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4270         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4271         * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4272         (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4273         Initialize.
4274         * linux-crisv32-low.c (cris_supports_hardware_single_step):
4275         New function.
4276         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4277         * linux-low.c (can_hardware_single_step): Use
4278         supports_hardware_single_step.
4279         (can_software_single_step): New function.
4280         (start_step_over): Call can_software_single_step.
4281         (linux_supports_hardware_single_step): New function.
4282         (struct target_ops) <supports_software_single_step>: Initialize.
4283         * linux-low.h (struct linux_target_ops)
4284         <supports_hardware_single_step>: Initialize.
4285         * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4286         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4287         * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4288         (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4289         * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4290         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4291         * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4292         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4293         * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4294         (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4295         Initialize.
4296         * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4297         (struct linux_target_ops) <tile_supports_hardware_single_step>:
4298         Initialize.
4299         * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4300         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4301         * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4302         New function.
4303         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4304         * target.h (struct target_ops): <supports_software_single_step>:
4305         New field.
4306         (target_supports_software_single_step): New macro.
4307
4308 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4309
4310         * linux-low.c (linux_wait_1): Fix pc advance condition.
4311         * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4312         * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4313
4314 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4315
4316         * linux-arm-low.c (arm_is_thumb_mode): New function.
4317         (arm_breakpoint_at): Use arm_is_thumb_mode.
4318         (arm_breakpoint_kind_from_current_state): New function.
4319         (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4320         Initialize.
4321         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4322         (linux_breakpoint_kind_from_current_state): New function.
4323         (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4324         * linux-low.h (struct linux_target_ops)
4325         <breakpoint_kind_from_current_state>: New field.
4326         * target.h (struct target_ops): Likewise.
4327         (target_breakpoint_kind_from_current_state): New macro.
4328
4329 2015-11-30  Pedro Alves  <palves@redhat.com>
4330
4331         * linux-low.c (linux_resume): Wake up the event loop before
4332         returning.
4333
4334 2015-11-30  Pedro Alves  <palves@redhat.com>
4335
4336         * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4337         check.
4338         (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4339         to -1.
4340         * target.c (struct thread_search): New structure.
4341         (thread_search_callback): New function.
4342         (prev_general_thread): New global.
4343         (prepare_to_access_memory, done_accessing_memory): New functions.
4344         * target.h (prepare_to_access_memory, done_accessing_memory):
4345         Replace macros with function declarations.
4346
4347 2015-11-30  Pedro Alves  <palves@redhat.com>
4348
4349         PR 14618
4350         * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4351         report TARGET_WAITKIND_NO_RESUMED.
4352         * remote-utils.c (prepare_resume_reply): Handle
4353         TARGET_WAITKIND_NO_RESUMED.
4354         * server.c (report_no_resumed): New global.
4355         (handle_query) <qSupported>: Handle "no-resumed+".  Report
4356         "no-resumed+" support.
4357         (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4358         return error if the client doesn't support no-resumed events.
4359         (push_stop_notification): New function.
4360         (handle_target_event): Use it.  Report TARGET_WAITKIND_NO_RESUMED
4361         events if the client supports them.
4362
4363 2015-11-30  Pedro Alves  <palves@redhat.com>
4364
4365         * linux-low.c (thread_still_has_status_pending_p): Don't check
4366         vCont;t here.
4367         (lwp_resumed): New function.
4368         (status_pending_p_callback): Return early if the LWP is not
4369         supposed to be resumed.
4370
4371 2015-11-30  Pedro Alves  <palves@redhat.com>
4372
4373         * linux-low.c (handle_extended_wait): Assert that the LWP's
4374         waitstatus is TARGET_WAITKIND_IGNORE.  If GDB wants to hear about
4375         thread create events, leave the new child's status pending.
4376         (linux_low_filter_event): If GDB wants to hear about thread exit
4377         events, leave the LWP marked dead and don't delete it.
4378         (linux_wait_for_event_filtered): Don't check for thread exit.
4379         (filter_exit_event): New function.
4380         (linux_wait_1): Use it, when returning an exit event.
4381         (linux_resume_one_lwp_throw): Assert that the LWP's
4382         waitstatus is TARGET_WAITKIND_IGNORE.
4383         * remote-utils.c (prepare_resume_reply): Handle
4384         TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4385         * server.c (report_thread_events): New global.
4386         (handle_general_set): Handle QThreadEvents.
4387         (handle_query) <qSupported>: Handle and report QThreadEvents+;
4388         (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4389         TARGET_WAITKIND_THREAD_EXITED.
4390         * server.h (report_thread_events): Declare.
4391
4392 2015-11-30  Pedro Alves  <palves@redhat.com>
4393
4394         * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4395         the thread's last_resume_kind was resume_stop.
4396
4397 2015-11-30  Pedro Alves  <palves@redhat.com>
4398
4399         * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4400         before returning.
4401
4402 2015-11-30  Pedro Alves  <palves@redhat.com>
4403
4404         * server.c (handle_v_requests): Handle vCtrlC.
4405
4406 2015-11-30  Pedro Alves  <palves@redhat.com>
4407
4408         * gdbthread.h (find_any_thread_of_pid): Declare.
4409         * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4410         functions.
4411         * server.c (handle_query): If current_thread is NULL, look for
4412         another thread of the selected process.
4413
4414 2015-11-26  Daniel Colascione  <dancol@dancol.org>
4415             Simon Marchi  <simon.marchi@ericsson.com>
4416
4417         * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4418         * server.c (handle_qxfer_threads_worker): Refactor to include thread
4419         name in reply.
4420         * target.h (struct target_ops) <thread_name>: New field.
4421         (target_thread_name): New macro.
4422
4423 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
4424
4425         * regcache.h (regcache_invalidate_pid): Add declaration.
4426         * regcache.c (regcache_invalidate_pid): New function, extracted
4427         from regcache_invalidate.
4428         (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4429         Add trivial documentation comment.
4430         * lynx-low.c: Use regcache_invalidate_pid instead of
4431         regcache_invalidate.
4432
4433 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
4434
4435         * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4436         and Elf64_auxv_t if the target is Android.
4437
4438 2015-11-22  Doug Evans  <xdje42@gmail.com>
4439
4440         * target.h: #include <sys/types.h>.
4441
4442 2015-11-19  Pedro Alves  <palves@redhat.com>
4443
4444         * linux-low.c (linux_process_qsupported): Change prototype.
4445         Adjust.
4446         * linux-low.h (struct linux_target_ops) <process_qsupported>:
4447         Change prototype.
4448         * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4449         and adjust to loop over all features.
4450         * server.c (handle_query) <qSupported>: Adjust to call
4451         target_process_qsupported once, passing it a vector of unprocessed
4452         features.
4453         * target.h (struct target_ops) <process_qsupported>: Change
4454         prototype.
4455         (target_process_qsupported): Adjust.
4456
4457 2015-11-19  Pedro Alves  <palves@redhat.com>
4458
4459         * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4460         mode.
4461         * configure: Regenerate.
4462
4463 2015-11-19  Pedro Alves  <palves@redhat.com>
4464
4465         * configure: Regenerate.
4466
4467 2015-11-19  Yao Qi  <yao.qi@linaro.org>
4468
4469         * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4470         type to uint32_t.
4471
4472 2015-11-19  Yao Qi  <yao.qi@linaro.org>
4473
4474         * linux-aarch64-low.c (enum aarch64_operand_type): New.
4475         (struct aarch64_operand): Move enum out.
4476
4477 2015-11-19  Yao Qi  <yao.qi@linaro.org>
4478
4479         * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4480         struct user_fpsimd_state *.
4481         (aarch64_store_fpregset): Likewise.
4482
4483 2015-11-19  Yao Qi  <yao.qi@linaro.org>
4484
4485         * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4486         struct user_pt_regs *.
4487         (aarch64_store_gregset): Likewise.
4488
4489 2015-11-18  Pedro Alves  <palves@redhat.com>
4490
4491         * Makefile.in (all_object_files): Add $IPA_OBJS.
4492
4493 2015-11-17  Pedro Alves  <palves@redhat.com>
4494
4495         * win32-low.c (win32_resume): Use gdb_signal_from_host,
4496         GDB_SIGNAL_0 and gdb_signal_to_string.
4497
4498 2015-11-17  Pedro Alves  <palves@redhat.com>
4499
4500         * win32-low.c (handle_output_debug_string): Remove parameter.
4501         (win32_kill): Remove our_status local and adjust call to
4502         handle_output_debug_string.
4503         (get_child_debug_event): Adjust call to
4504         handle_output_debug_string.
4505
4506 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
4507
4508         * linux-mips-low.c (mips_fill_gregset): Add cast.
4509         (mips_store_gregset): Likewise.
4510         (mips_fill_fpregset): Likewise.
4511         (mips_store_fpregset): Likewise.
4512
4513 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
4514
4515         * linux-mips-low.c (mips_add_watchpoint): Rename private to
4516         priv.
4517
4518 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
4519
4520         * linux-mips-low.c (mips_linux_new_thread): Change type of
4521         watch_type to enum target_hw_bp_type.
4522
4523 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
4524
4525                 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4526                 Change return type to arm_hwbp_type.
4527
4528 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
4529
4530         * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4531         (arm_store_gregset): Likewise.
4532         * linux-arm-low.c (arm_get_hwcap): Likewise.
4533         (arm_read_description): Likewise.
4534
4535 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
4536
4537         * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4538
4539 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
4540
4541         * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4542         (ppc_fill_vsxregset): Likewise.
4543         (ppc_store_vsxregset): Likewise.
4544         (ppc_fill_vrregset): Likewise.
4545         (ppc_store_vrregset): Likewise.
4546         (ppc_fill_evrregset): Likewise.
4547         (ppc_store_evrregset): Likewise.
4548
4549 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
4550
4551         * linux-ppc-low.c (ppc_usrregs_info): Remove
4552         forward-declaration.
4553         (ppc_arch_setup): Move lower in file.
4554
4555 2015-10-30  Simon Marchi  <simon.marchi@ericsson.com>
4556
4557         * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4558         (ps_pdwrite): Likewise.
4559
4560 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4561
4562         * linux-arm-low.c (arm_new_thread): Move pointer dereference
4563         to after assert checks.
4564
4565 2015-10-29  Simon Marchi  <simon.marchi@ericsson.com>
4566
4567         * proc-service.c (ps_pdread): Add/adjust casts.
4568         (ps_pdwrite): Add/adjust casts.
4569
4570 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
4571
4572         * server.c (handle_search_memory_1): Cast return value of
4573         memmem.
4574
4575 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
4576
4577         * server.c (write_qxfer_response): Change type of data to
4578         gdb_byte *.
4579
4580 2015-10-29  Pedro Alves  <palves@redhat.com>
4581
4582         * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4583
4584 2015-10-29  Pedro Alves  <palves@redhat.com>
4585
4586         * tracepoint.c (clear_installed_tracepoints): Add casts.
4587
4588 2015-10-29  Pedro Alves  <palves@redhat.com>
4589
4590         * server.c (handle_v_cont, process_serial_event): Add enum
4591         gdb_signal casts to signal parsing code.
4592
4593 2015-10-29  Pedro Alves  <palves@redhat.com>
4594
4595         * linux-low.h (NULL_REGSET): Define.
4596         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4597         * linux-arm-low.c (arm_regsets): Likewise.
4598         * linux-crisv32-low.c (cris_regsets): Likewise.
4599         * linux-m68k-low.c (m68k_regsets): Likewise.
4600         * linux-mips-low.c (mips_regsets): Likewise.
4601         * linux-nios2-low.c (nios2_regsets): Likewise.
4602         * linux-ppc-low.c (ppc_regsets): Likewise.
4603         * linux-s390-low.c (s390_regsets): Likewise.
4604         * linux-sh-low.c (sh_regsets): Likewise.
4605         * linux-sparc-low.c (sparc_regsets): Likewise.
4606         * linux-tic6x-low.c (tic6x_regsets): Likewise.
4607         * linux-tile-low.c (tile_regsets): Likewise.
4608         * linux-x86-low.c (x86_regsets): Likewise.
4609         * linux-xtensa-low.c (xtensa_regsets): Likewise.
4610
4611 2015-10-29  Pedro Alves  <palves@redhat.com>
4612
4613         * linux-low.h (NULL_REGSET): Define.
4614         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4615         * linux-arm-low.c (arm_regsets): Likewise.
4616         * linux-crisv32-low.c (cris_regsets): Likewise.
4617         * linux-m68k-low.c (m68k_regsets): Likewise.
4618         * linux-mips-low.c (mips_regsets): Likewise.
4619         * linux-nios2-low.c (nios2_regsets): Likewise.
4620         * linux-ppc-low.c (ppc_regsets): Likewise.
4621         * linux-s390-low.c (s390_regsets): Likewise.
4622         * linux-sh-low.c (sh_regsets): Likewise.
4623         * linux-sparc-low.c (sparc_regsets): Likewise.
4624         * linux-tic6x-low.c (tic6x_regsets): Likewise.
4625         * linux-tile-low.c (tile_regsets): Likewise.
4626         * linux-x86-low.c (x86_regsets): Likewise.
4627         * linux-xtensa-low.c (xtensa_regsets): Likewise.
4628
4629 2015-10-26  Doug Evans  <dje@google.com>
4630
4631         * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4632
4633 2015-10-26  Doug Evans  <dje@google.com>
4634
4635         * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4636
4637 2015-10-26  Doug Evans  <dje@google.com>
4638
4639         * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4640         for debug_printf.
4641         (attach_thread, find_new_threads_callback): Ditto.
4642
4643 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4644
4645         * mem-break.h (set_breakpoint_data): Remove.
4646
4647 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4648
4649         * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4650         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4651         (initialize_low): Remove set_breakpoint_data call.
4652         * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4653         (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4654         (initialize_low): Remove set_breakpoint_data call.
4655         * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4656         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4657         (initialize_low): Remove set_breakpoint_data call.
4658
4659 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4660
4661         * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4662         * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4663         * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4664         * target.h (target_breakpoint_kind_from_pc): New macro.
4665
4666 2015-10-22  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4667
4668         * linux-low.c (default_breakpoint_kind_from_pc): New function.
4669         (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4670         the default breakpoint kind.
4671
4672 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4673
4674         * linux-arm-low.c (arm_supports_z_point_type): Add software
4675         breakpoint support.
4676
4677 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4678
4679         * linux-arm-low.c: Refactor breakpoint definitions.
4680         (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4681         (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4682
4683 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4684
4685         * Makefile.in: Add arm.c/o.
4686         * configure.srv: Likewise.
4687         * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4688         (arm_breakpoint_kind_from_pc): New function.
4689         (arm_sw_breakpoint_from_kind): Return proper kind.
4690         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4691
4692 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4693
4694         * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4695         removal.
4696         * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4697         (struct raw_breakpoint) <size>: Remove.
4698         (struct raw_breakpoint) <kind>: Add.
4699         (bp_size): New function.
4700         (bp_opcode): Likewise.
4701         (find_raw_breakpoint_at): Adjust for kind.
4702         (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4703         (remove_memory_breakpoint): Adjust for kind call bp_size.
4704         (set_raw_breakpoint_at): Adjust for kind.
4705         (set_breakpoint): Likewise.
4706         (set_breakpoint_at): Call breakpoint_kind_from_pc.
4707         (delete_raw_breakpoint): Adjust for kind.
4708         (delete_breakpoint): Likewise.
4709         (find_gdb_breakpoint): Likewise.
4710         (set_gdb_breakpoint_1): Likewise.
4711         (set_gdb_breakpoint): Likewise.
4712         (delete_gdb_breakpoint_1): Likewise.
4713         (delete_gdb_breakpoint): Likewise.
4714         (uninsert_raw_breakpoint): Likewise.
4715         (reinsert_raw_breakpoint): Likewise.
4716         (set_breakpoint_data): Remove.
4717         (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4718         (check_mem_read): Adjust for kind call bp_size.
4719         (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4720         (clone_one_breakpoint): Adjust for kind.
4721         * mem-break.h (set_gdb_breakpoint): Likewise.
4722         (delete_gdb_breakpoint): Likewise.
4723         * server.c (process_serial_event): Likewise.
4724
4725 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4726
4727         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4728         (struct linux_target_ops) <breakpoint>: Remove.
4729         (struct linux_target_ops) <breakpoint_len>: Remove.
4730         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4731         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4732         * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4733         (arm_sw_breakpoint_from_kind): New function.
4734         * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4735         (struct linux_target_ops) <breakpoint>: Remove.
4736         (struct linux_target_ops) <breakpoint_len>: Remove.
4737         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4738         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4739         * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4740         (struct linux_target_ops) <breakpoint>: Remove.
4741         (struct linux_target_ops) <breakpoint_len>: Remove.
4742         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4743         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4744         * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4745         (struct linux_target_ops) <breakpoint>: Remove.
4746         (struct linux_target_ops) <breakpoint_len>: Remove.
4747         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4748         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4749         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4750         and sw_breakpoint_from_kind to increment the pc.
4751         (linux_breakpoint_kind_from_pc): New function.
4752         (linux_sw_breakpoint_from_kind): New function.
4753         (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4754         (initialize_low): Call breakpoint_kind_from_pc and
4755         sw_breakpoint_from_kind to replace breakpoint_data/len.
4756         * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4757         New field.
4758         (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4759         * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4760         (struct linux_target_ops) <breakpoint>: Remove.
4761         (struct linux_target_ops) <breakpoint_len>: Remove.
4762         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4763         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4764         * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4765         (struct linux_target_ops) <breakpoint>: Remove.
4766         (struct linux_target_ops) <breakpoint_len>: Remove.
4767         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4768         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4769         * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4770         (struct linux_target_ops) <breakpoint>: Remove.
4771         (struct linux_target_ops) <breakpoint_len>: Remove.
4772         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4773         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4774         * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4775         (struct linux_target_ops) <breakpoint>: Remove.
4776         (struct linux_target_ops) <breakpoint_len>: Remove.
4777         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4778         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4779         * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4780         (struct linux_target_ops) <breakpoint>: Remove.
4781         (struct linux_target_ops) <breakpoint_len>: Remove.
4782         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4783         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4784         * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4785         (struct linux_target_ops) <breakpoint>: Remove.
4786         (struct linux_target_ops) <breakpoint_len>: Remove.
4787         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4788         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4789         * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4790         (struct linux_target_ops) <breakpoint>: Remove.
4791         (struct linux_target_ops) <breakpoint_len>: Remove.
4792         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4793         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4794         * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4795         (struct linux_target_ops) <breakpoint>: Remove.
4796         (struct linux_target_ops) <breakpoint_len>: Remove.
4797         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4798         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4799         * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4800         (struct linux_target_ops) <breakpoint>: Remove.
4801         (struct linux_target_ops) <breakpoint_len>: Remove.
4802         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4803         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4804         * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4805         * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4806         (struct linux_target_ops) <breakpoint>: Remove.
4807         (struct linux_target_ops) <breakpoint_len>: Remove.
4808         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4809         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4810         * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4811         (struct linux_target_ops) <breakpoint>: Remove.
4812         (struct linux_target_ops) <breakpoint_len>: Remove.
4813         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4814         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4815
4816 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4817
4818         * linux-cris-low.c (cris_get_pc): Remove void arg.
4819
4820 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
4821
4822         * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4823         variable name.
4824
4825 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
4826
4827         * inferiors.c (thread_pid_matches_callback): New function.
4828         (find_thread_process): New function.
4829         (remove_thread): Reset current_thread.
4830         (remove_process): Assert threads have been removed first.
4831
4832 2015-10-15  Yao Qi  <yao.qi@linaro.org>
4833
4834         * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4835         if it is 3.
4836         (aarch64_remove_point): Likewise.
4837         * regcache.c (regcache_register_size): New function.
4838
4839 2015-10-12  Yao Qi  <yao.qi@linaro.org>
4840
4841         * linux-aarch64-low.c: Update all callers as emit_load_store
4842         is renamed to aarch64_emit_load_store.
4843
4844 2015-10-12  Yao Qi  <yao.qi@linaro.org>
4845
4846         * linux-aarch64-low.c: Update all callers of function renaming
4847         from emit_insn to aarch64_emit_insn.
4848
4849 2015-10-12  Yao Qi  <yao.qi@linaro.org>
4850
4851         * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4852         arch/aarch64-insn.h.
4853         (struct aarch64_memory_operand): Likewise.
4854         (ENCODE): Likewise.
4855         (emit_insn): Move to arch/aarch64-insn.c.
4856         (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4857         (emit_load_store): Move to arch/aarch64-insn.c.
4858         (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4859         (can_encode_int32): Remove.
4860
4861 2015-10-12  Yao Qi  <yao.qi@linaro.org>
4862
4863         * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4864         (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4865         (aarch64_relocate_instruction): Likewise.
4866         (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4867         (struct aarch64_insn_visitor): Likewise.
4868
4869 2015-10-12  Yao Qi  <yao.qi@linaro.org>
4870
4871         * linux-aarch64-low.c (struct aarch64_insn_data): New.
4872         (struct aarch64_insn_visitor): New.
4873         (struct aarch64_insn_relocation_data): New.
4874         (aarch64_ftrace_insn_reloc_b): New function.
4875         (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4876         (aarch64_ftrace_insn_reloc_cb): Likewise.
4877         (aarch64_ftrace_insn_reloc_tb): Likewise.
4878         (aarch64_ftrace_insn_reloc_adr): Likewise.
4879         (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4880         (aarch64_ftrace_insn_reloc_others): Likewise.
4881         (visitor): New.
4882         (aarch64_relocate_instruction): Use visitor.
4883
4884 2015-10-12  Yao Qi  <yao.qi@linaro.org>
4885
4886         * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4887         int.  Add argument buf.
4888         (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4889         aarch64_relocate_instruction.
4890
4891 2015-10-12  Yao Qi  <yao.qi@linaro.org>
4892
4893         * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4894         argument insn.  Remove local variable insn.  Don't call
4895         target_read_uint32.
4896         (aarch64_install_fast_tracepoint_jump_pad): Call
4897         target_read_uint32.
4898
4899 2015-09-30  Yao Qi  <yao.qi@linaro.org>
4900
4901         * linux-aarch64-low.c (emit_movk): Shorten a long line.
4902         (emit_load_store_pair): Likewise.
4903
4904 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
4905
4906         * dll.c (match_dll): Add cast(s).
4907         (unloaded_dll): Likewise.
4908         * linux-low.c (second_thread_of_pid_p): Likewise.
4909         (delete_lwp_callback): Likewise.
4910         (count_events_callback): Likewise.
4911         (select_event_lwp_callback): Likewise.
4912         (linux_set_resume_request): Likewise.
4913         * server.c (accumulate_file_name_length): Likewise.
4914         (emit_dll_description): Likewise.
4915         (handle_qxfer_threads_worker): Likewise.
4916         (visit_actioned_threads): Likewise.
4917         * thread-db.c (any_thread_of): Likewise.
4918         * tracepoint.c (same_process_p): Likewise.
4919         (match_blocktype): Likewise.
4920         (build_traceframe_info_xml): Likewise.
4921
4922 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
4923
4924         * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4925         assignment.
4926         (gdb_unparse_agent_expr): Likewise.
4927         * hostio.c (require_data): Likewise.
4928         (handle_pread): Likewise.
4929         * linux-low.c (disable_regset): Likewise.
4930         (fetch_register): Likewise.
4931         (store_register): Likewise.
4932         (get_dynamic): Likewise.
4933         (linux_qxfer_libraries_svr4): Likewise.
4934         * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4935         (set_fast_tracepoint_jump): Likewise.
4936         (uninsert_fast_tracepoint_jumps_at): Likewise.
4937         (reinsert_fast_tracepoint_jumps_at): Likewise.
4938         (validate_inserted_breakpoint): Likewise.
4939         (clone_agent_expr): Likewise.
4940         * regcache.c (init_register_cache): Likewise.
4941         * remote-utils.c (putpkt_binary_1): Likewise.
4942         (decode_M_packet): Likewise.
4943         (decode_X_packet): Likewise.
4944         (look_up_one_symbol): Likewise.
4945         (relocate_instruction): Likewise.
4946         (monitor_output): Likewise.
4947         * server.c (handle_search_memory): Likewise.
4948         (handle_qxfer_exec_file): Likewise.
4949         (handle_qxfer_libraries): Likewise.
4950         (handle_qxfer): Likewise.
4951         (handle_query): Likewise.
4952         (handle_v_cont): Likewise.
4953         (handle_v_run): Likewise.
4954         (captured_main): Likewise.
4955         * target.c (write_inferior_memory): Likewise.
4956         * thread-db.c (try_thread_db_load_from_dir): Likewise.
4957         * tracepoint.c (init_trace_buffer): Likewise.
4958         (add_tracepoint_action): Likewise.
4959         (add_traceframe): Likewise.
4960         (add_traceframe_block): Likewise.
4961         (cmd_qtdpsrc): Likewise.
4962         (cmd_qtdv): Likewise.
4963         (cmd_qtstatus): Likewise.
4964         (response_source): Likewise.
4965         (response_tsv): Likewise.
4966         (cmd_qtnotes): Likewise.
4967         (gdb_collect): Likewise.
4968         (initialize_tracepoint): Likewise.
4969
4970 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
4971
4972         * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4973         (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4974         <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4975         <NOP>: New.
4976         (enum aarch64_condition_codes): New enum.
4977         (w0): New static global.
4978         (fp): Likewise.
4979         (lr): Likewise.
4980         (struct aarch64_memory_operand) <type>: New
4981         MEMORY_OPERAND_POSTINDEX type.
4982         (postindex_memory_operand): New helper function.
4983         (emit_ret): New function.
4984         (emit_load_store_pair): New function, factored out of emit_stp
4985         with support for MEMORY_OPERAND_POSTINDEX.
4986         (emit_stp): Rewrite using emit_load_store_pair.
4987         (emit_ldp): New function.
4988         (emit_load_store): Likewise.
4989         (emit_ldr): Mention post-index instruction in comment.
4990         (emit_ldrh): New function.
4991         (emit_ldrb): New function.
4992         (emit_ldrsw): Mention post-index instruction in comment.
4993         (emit_str): Likewise.
4994         (emit_subs): New function.
4995         (emit_cmp): Likewise.
4996         (emit_and): Likewise.
4997         (emit_orr): Likewise.
4998         (emit_orn): Likewise.
4999         (emit_eor): Likewise.
5000         (emit_mvn): Likewise.
5001         (emit_lslv): Likewise.
5002         (emit_lsrv): Likewise.
5003         (emit_asrv): Likewise.
5004         (emit_mul): Likewise.
5005         (emit_sbfm): Likewise.
5006         (emit_sbfx): Likewise.
5007         (emit_ubfm): Likewise.
5008         (emit_ubfx): Likewise.
5009         (emit_csinc): Likewise.
5010         (emit_cset): Likewise.
5011         (emit_nop): Likewise.
5012         (emit_ops_insns): New helper function.
5013         (emit_pop): Likewise.
5014         (emit_push): Likewise.
5015         (aarch64_emit_prologue): New function.
5016         (aarch64_emit_epilogue): Likewise.
5017         (aarch64_emit_add): Likewise.
5018         (aarch64_emit_sub): Likewise.
5019         (aarch64_emit_mul): Likewise.
5020         (aarch64_emit_lsh): Likewise.
5021         (aarch64_emit_rsh_signed): Likewise.
5022         (aarch64_emit_rsh_unsigned): Likewise.
5023         (aarch64_emit_ext): Likewise.
5024         (aarch64_emit_log_not): Likewise.
5025         (aarch64_emit_bit_and): Likewise.
5026         (aarch64_emit_bit_or): Likewise.
5027         (aarch64_emit_bit_xor): Likewise.
5028         (aarch64_emit_bit_not): Likewise.
5029         (aarch64_emit_equal): Likewise.
5030         (aarch64_emit_less_signed): Likewise.
5031         (aarch64_emit_less_unsigned): Likewise.
5032         (aarch64_emit_ref): Likewise.
5033         (aarch64_emit_if_goto): Likewise.
5034         (aarch64_emit_goto): Likewise.
5035         (aarch64_write_goto_address): Likewise.
5036         (aarch64_emit_const): Likewise.
5037         (aarch64_emit_call): Likewise.
5038         (aarch64_emit_reg): Likewise.
5039         (aarch64_emit_pop): Likewise.
5040         (aarch64_emit_stack_flush): Likewise.
5041         (aarch64_emit_zero_ext): Likewise.
5042         (aarch64_emit_swap): Likewise.
5043         (aarch64_emit_stack_adjust): Likewise.
5044         (aarch64_emit_int_call_1): Likewise.
5045         (aarch64_emit_void_call_2): Likewise.
5046         (aarch64_emit_eq_goto): Likewise.
5047         (aarch64_emit_ne_goto): Likewise.
5048         (aarch64_emit_lt_goto): Likewise.
5049         (aarch64_emit_le_goto): Likewise.
5050         (aarch64_emit_gt_goto): Likewise.
5051         (aarch64_emit_ge_got): Likewise.
5052         (aarch64_emit_ops_impl): New static global variable.
5053         (aarch64_emit_ops): New target function, return
5054         &aarch64_emit_ops_impl.
5055         (struct linux_target_ops): Install it.
5056
5057 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
5058
5059         * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5060         * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5061         aarch64-ipa.o.
5062         * linux-aarch64-ipa.c: New file.
5063         * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5064         and endian.h.
5065         (aarch64_get_thread_area): New target method.
5066         (extract_signed_bitfield): New helper function.
5067         (aarch64_decode_ldr_literal): New function.
5068         (enum aarch64_opcodes): New enum.
5069         (struct aarch64_register): New struct.
5070         (struct aarch64_operand): New struct.
5071         (x0): New static global.
5072         (x1): Likewise.
5073         (x2): Likewise.
5074         (x3): Likewise.
5075         (x4): Likewise.
5076         (w2): Likewise.
5077         (ip0): Likewise.
5078         (sp): Likewise.
5079         (xzr): Likewise.
5080         (aarch64_register): New helper function.
5081         (register_operand): Likewise.
5082         (immediate_operand): Likewise.
5083         (struct aarch64_memory_operand): New struct.
5084         (offset_memory_operand): New helper function.
5085         (preindex_memory_operand): Likewise.
5086         (enum aarch64_system_control_registers): New enum.
5087         (ENCODE): New macro.
5088         (emit_insn): New helper function.
5089         (emit_b): New function.
5090         (emit_bcond): Likewise.
5091         (emit_cb): Likewise.
5092         (emit_tb): Likewise.
5093         (emit_blr): Likewise.
5094         (emit_stp): Likewise.
5095         (emit_ldp_q_offset): Likewise.
5096         (emit_stp_q_offset): Likewise.
5097         (emit_load_store): Likewise.
5098         (emit_ldr): Likewise.
5099         (emit_ldrsw): Likewise.
5100         (emit_str): Likewise.
5101         (emit_ldaxr): Likewise.
5102         (emit_stxr): Likewise.
5103         (emit_stlr): Likewise.
5104         (emit_data_processing_reg): Likewise.
5105         (emit_data_processing): Likewise.
5106         (emit_add): Likewise.
5107         (emit_sub): Likewise.
5108         (emit_mov): Likewise.
5109         (emit_movk): Likewise.
5110         (emit_mov_addr): Likewise.
5111         (emit_mrs): Likewise.
5112         (emit_msr): Likewise.
5113         (emit_sevl): Likewise.
5114         (emit_wfe): Likewise.
5115         (append_insns): Likewise.
5116         (can_encode_int32_in): New helper function.
5117         (aarch64_relocate_instruction): New function.
5118         (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5119         (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5120         (struct linux_target_ops): Install aarch64_get_thread_area,
5121         aarch64_install_fast_tracepoint_jump_pad and
5122         aarch64_get_min_fast_tracepoint_insn_len.
5123
5124 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
5125
5126         * Makefile.in (aarch64-insn.o): New rule.
5127         * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5128
5129 2015-09-21  Yao Qi  <yao.qi@linaro.org>
5130
5131         * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5132
5133 2015-09-21  Yao Qi  <yao.qi@linaro.org>
5134
5135         * tracepoint.c (max_jump_pad_size): Remove.
5136
5137 2015-09-18  Yao Qi  <yao.qi@linaro.org>
5138
5139         * linux-aarch64-low.c: Don't include sys/uio.h.
5140         (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5141
5142 2015-09-16  Wei-cheng Wang  <cole945@gmail.com>
5143
5144         * tracepoint.c (eval_result_type): Change prototype.
5145         (condition_true_at_tracepoint): Fix argument to compiled_cond.
5146
5147 2015-09-15  Pedro Alves  <palves@redhat.com>
5148
5149         * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5150         Check whether to report exec events instead of checking whether
5151         multiprocess is enabled.
5152
5153 2015-09-15  Pedro Alves  <palves@redhat.com>
5154
5155         PR remote/18965
5156         * remote-utils.c (prepare_resume_reply): Merge
5157         TARGET_WAITKIND_VFORK_DONE switch case with the
5158         TARGET_WAITKIND_FORKED case.
5159
5160 2015-09-15  Yao Qi  <yao.qi@linaro.org>
5161
5162         * server.c (handle_query): Check string comparison using
5163         "else if" instead of "if".
5164
5165 2015-09-15  Yao Qi  <yao.qi@linaro.org>
5166
5167         * server.c (vCont_supported): New global variable.
5168         (handle_query): Set vCont_supported to 1 if "vContSupported+"
5169         matches.  Append ";vContSupported+" to own_buf.
5170         (handle_v_requests): Append ";s;S" to own_buf if target supports
5171         hardware single step or vCont_supported is false.
5172         (capture_main): Set vCont_supported to zero.
5173
5174 2015-09-15  Yao Qi  <yao.qi@linaro.org>
5175
5176         * linux-low.c (linux_supports_conditional_breakpoints): Rename
5177         it to ...
5178         (linux_supports_hardware_single_step): ... New function.
5179         (linux_target_ops): Update.
5180         * lynx-low.c (lynx_target_ops): Set field
5181         supports_hardware_single_step to target_can_do_hardware_single_step.
5182         * nto-low.c (nto_target_ops): Likewise.
5183         * spu-low.c (spu_target_ops): Likewise.
5184         * win32-low.c (win32_target_ops): Likewise.
5185         * target.c (target_can_do_hardware_single_step): New function.
5186         * target.h (struct target_ops) <supports_conditional_breakpoints>:
5187         Remove.  <supports_hardware_single_step>: New field.
5188         (target_supports_conditional_breakpoints): Remove.
5189         (target_supports_hardware_single_step): New macro.
5190         (target_can_do_hardware_single_step): Declare.
5191         * server.c (handle_query): Use target_supports_hardware_single_step
5192         instead of target_supports_conditional_breakpoints.
5193
5194 2015-09-15  Yao Qi  <yao.qi@linaro.org>
5195
5196         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5197         function.
5198         (struct linux_target_ops the_low_target): Install
5199         aarch64_linux_siginfo_fixup.
5200
5201 2015-09-11  Don Breazeal  <donb@codesourcery.com>
5202             Luis Machado  <lgustavo@codesourcery.com>
5203
5204         * linux-low.c (linux_mourn): Static declaration.
5205         (linux_arch_setup): Move in front of
5206         handle_extended_wait.
5207         (linux_arch_setup_thread): New function.
5208         (handle_extended_wait): Handle exec events.  Call
5209         linux_arch_setup_thread.  Make event_lwp argument a
5210         pointer-to-a-pointer.
5211         (check_zombie_leaders): Do not check stopped threads.
5212         (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5213         (linux_low_filter_event): Add lwp and thread for exec'ing
5214         non-leader thread if leader thread has been deleted.
5215         Refactor code into linux_arch_setup_thread and call it.
5216         Pass child lwp pointer by reference to handle_extended_wait.
5217         (linux_wait_for_event_filtered): Update comment.
5218         (linux_wait_1): Prevent clobbering exec event status.
5219         (linux_supports_exec_events): New function.
5220         (linux_target_ops) <supports_exec_events>: Initialize new member.
5221         * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5222         new member.
5223         * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5224         * server.c (report_exec_events): New global variable.
5225         (handle_query): Handle qSupported query for exec-events feature.
5226         (captured_main): Initialize report_exec_events.
5227         * server.h (report_exec_events): Declare new global variable.
5228         * target.h (struct target_ops) <supports_exec_events>: New
5229         member.
5230         (target_supports_exec_events): New macro.
5231         * win32-low.c (win32_target_ops) <supports_exec_events>:
5232         Initialize new member.
5233
5234 2015-09-09  Markus Metzger  <markus.t.metzger@intel.com>
5235
5236         * linux-low.c (linux_low_enable_btrace): Remove.
5237         (linux_target_ops): Replace linux_low_enable_btrace with
5238         linux_enable_btrace.
5239
5240 2015-09-03  Yao Qi  <yao.qi@linaro.org>
5241
5242         * linux-aarch64-low.c (aarch64_insert_point): Call
5243         aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5244         returns true.
5245
5246 2015-08-27  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5247
5248         * linux-low.c (check_stopped_by_breakpoint): Use
5249         GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5250
5251 2015-08-27  Pedro Alves  <palves@redhat.com>
5252
5253         * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5254
5255 2015-08-26  Simon Marchi  <simon.marchi@ericsson.com>
5256
5257         * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5258         the XNEW-family equivalent.
5259         (compile_bytecodes): Likewise.
5260         * dll.c (loaded_dll): Likewise.
5261         * event-loop.c (append_callback_event): Likewise.
5262         (create_file_handler): Likewise.
5263         (create_file_event): Likewise.
5264         * hostio.c (handle_open): Likewise.
5265         * inferiors.c (add_thread): Likewise.
5266         (add_process): Likewise.
5267         * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5268         * linux-arm-low.c (arm_new_process): Likewise.
5269         (arm_new_thread): Likewise.
5270         * linux-low.c (add_to_pid_list): Likewise.
5271         (linux_add_process): Likewise.
5272         (handle_extended_wait): Likewise.
5273         (add_lwp): Likewise.
5274         (enqueue_one_deferred_signal): Likewise.
5275         (enqueue_pending_signal): Likewise.
5276         (linux_resume_one_lwp_throw): Likewise.
5277         (linux_resume_one_thread): Likewise.
5278         (linux_read_memory): Likewise.
5279         (linux_write_memory): Likewise.
5280         * linux-mips-low.c (mips_linux_new_process): Likewise.
5281         (mips_linux_new_thread): Likewise.
5282         (mips_add_watchpoint): Likewise.
5283         * linux-x86-low.c (initialize_low_arch): Likewise.
5284         * lynx-low.c (lynx_add_process): Likewise.
5285         * mem-break.c (set_raw_breakpoint_at): Likewise.
5286         (set_breakpoint): Likewise.
5287         (add_condition_to_breakpoint): Likewise.
5288         (add_commands_to_breakpoint): Likewise.
5289         (clone_agent_expr): Likewise.
5290         (clone_one_breakpoint): Likewise.
5291         * regcache.c (new_register_cache): Likewise.
5292         * remote-utils.c (look_up_one_symbol): Likewise.
5293         * server.c (queue_stop_reply): Likewise.
5294         (start_inferior): Likewise.
5295         (queue_stop_reply_callback): Likewise.
5296         (handle_target_event): Likewise.
5297         * spu-low.c (fetch_ppc_memory): Likewise.
5298         (store_ppc_memory): Likewise.
5299         * target.c (set_target_ops): Likewise.
5300         * thread-db.c (thread_db_load_search): Likewise.
5301         (try_thread_db_load_1): Likewise.
5302         * tracepoint.c (add_tracepoint): Likewise.
5303         (add_tracepoint_action): Likewise.
5304         (create_trace_state_variable): Likewise.
5305         (cmd_qtdpsrc): Likewise.
5306         (cmd_qtro): Likewise.
5307         (add_while_stepping_state): Likewise.
5308         * win32-low.c (child_add_thread): Likewise.
5309         (get_image_name): Likewise.
5310
5311 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5312
5313         * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5314
5315 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5316
5317         * Makefile.in (aarch64-linux.o): New rule.
5318         * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5319         srv_tgtobj.
5320         * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5321         (aarch64_init_debug_reg_state): Make it extern.
5322         (aarch64_linux_prepare_to_resume): Remove.
5323
5324 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5325
5326         * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5327         lwp_arch_private_info and ptid_of_lwp.
5328
5329 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5330
5331         * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5332         Find proc_info by find_process_pid.  All callers updated.
5333
5334 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5335
5336         * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5337         Remove.
5338         (debug_reg_change_callback): Remove.
5339         (aarch64_notify_debug_reg_change): Remove.
5340
5341 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5342
5343         * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5344         Call current_lwp_ptid.
5345
5346 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5347
5348         * linux-aarch64-low.c (debug_reg_change_callback): Use
5349         debug_printf.
5350
5351 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5352
5353         * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5354
5355 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5356
5357         * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5358
5359 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5360
5361         * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5362         the code.
5363
5364 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5365
5366         * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5367         Remove.
5368         (debug_reg_change_callback): Remove argument entry and add argument
5369         lwp.  Remove local variable thread.  Don't print thread id in the
5370         debugging output.  Don't check whether pid of thread equals to pid.
5371         (aarch64_notify_debug_reg_change): Don't set param.pid.  Call
5372         iterate_over_lwps instead find_inferior.
5373
5374 2015-08-24  Pedro Alves  <palves@redhat.com>
5375
5376         * inferiors.c (get_first_process): New function.
5377         * inferiors.h (get_first_process): New declaration.
5378         * remote-utils.c (read_ptid): Default to the first process in the
5379         list, instead of to the current thread's process.
5380
5381 2015-08-24  Pedro Alves  <palves@redhat.com>
5382
5383         * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5384         * event-loop.c: Likewise.
5385         * remote-utils.c: Likewise.
5386         * tracepoint.c: Likewise.
5387
5388 2015-08-24  Pedro Alves  <palves@redhat.com>
5389
5390         * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5391         ptid_get_lwp.
5392
5393 2015-08-21  Pedro Alves  <palves@redhat.com>
5394
5395         * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5396         instead of literal 1.
5397
5398 2015-08-21  Pedro Alves  <palves@redhat.com>
5399
5400         * tdesc.c (default_description): Explicitly zero-initialize.
5401
5402 2015-08-21  Pedro Alves  <palves@redhat.com>
5403
5404         PR gdb/18749
5405         * inferiors.c (remove_thread): Discard any pending stop reply for
5406         this thread.
5407         * server.c (remove_all_on_match_pid): Rename to ...
5408         (remove_all_on_match_ptid): ... this.  Work with a filter ptid
5409         instead of a pid.
5410         (discard_queued_stop_replies): Change parameter to a ptid.  Now
5411         extern.
5412         (handle_v_kill, kill_inferior_callback, captured_main)
5413         (process_serial_event): Adjust.
5414         * server.h (discard_queued_stop_replies): Declare.
5415
5416 2015-08-21  Pedro Alves  <palves@redhat.com>
5417
5418         * linux-low.c (wait_for_sigstop): Always switch to no thread
5419         selected if the previously current thread dies.
5420         * lynx-low.c (lynx_request_interrupt): Use the first thread's
5421         process instead of the current thread's.
5422         * remote-utils.c (input_interrupt): Don't check if there's no
5423         current thread.
5424         * server.c (gdb_read_memory, gdb_write_memory): If setting the
5425         current thread to the general thread fails, error out.
5426         (handle_qxfer_auxv, handle_qxfer_libraries)
5427         (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5428         (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5429         (handle_query): Check if there's a thread selected instead of
5430         checking whether there's any thread in the thread list.
5431         (handle_qxfer_threads, handle_qxfer_btrace)
5432         (handle_qxfer_btrace_conf): Don't error out early if there's no
5433         thread in the thread list.
5434         (handle_v_cont, myresume): Don't set the current thread to the
5435         continue thread.
5436         (process_serial_event) <Hg handling>: Also set thread_id if the
5437         previous general thread is still alive.
5438         (process_serial_event) <g/G handling>: If setting the current
5439         thread to the general thread fails, error out.
5440         * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5441         thread's lwp instead of the current thread's.
5442         * target.c (set_desired_thread): If the desired thread was not
5443         found, leave the current thread pointing to NULL.  Return an int
5444         (boolean) indicating success.
5445         * target.h (set_desired_thread): Change return type to int.
5446
5447 2015-08-20  Max Filippov  <jcmvbkbc@gmail.com>
5448
5449         * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5450         * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5451         #includes.
5452         (ps_get_thread_area): New function.
5453
5454 2015-08-19  Gary Benson  <gbenson@redhat.com>
5455
5456         * hostio.c (handle_pread): Do not attempt to read more data
5457         than hostio_reply_with_data can fit in a packet.
5458
5459 2015-08-18  Joel Brobecker  <brobecker@adacore.com>
5460
5461         * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5462
5463 2015-08-14  Matthew Fortune  <matthew.fortune@imgtec.com>
5464
5465         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5466
5467 2015-08-06  Pedro Alves  <palves@redhat.com>
5468
5469         * tracepoint.c (expr_eval_result): Now an int.
5470
5471 2015-08-06  Pedro Alves  <palves@redhat.com>
5472
5473         * gdbthread.h (struct regcache): Forward declare.
5474         (struct thread_info) <regcache_data>: Now a struct regcache
5475         pointer.
5476         * inferiors.c (inferior_regcache_data)
5477         (set_inferior_regcache_data): Now work with struct regcache
5478         pointers.
5479         * inferiors.h (struct regcache): Forward declare.
5480         (inferior_regcache_data, set_inferior_regcache_data): Now work
5481         with struct regcache pointers.
5482         * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5483         (free_register_cache_thread): Remove struct regcache pointer
5484         casts.
5485
5486 2015-08-06  Pedro Alves  <palves@redhat.com>
5487
5488         * server.c (captured_main): On error, print the exception message
5489         to stderr, and if run_once is set, throw a quit.
5490
5491 2015-08-06  Pedro Alves  <palves@redhat.com>
5492
5493         * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5494         the current thread.
5495
5496 2015-08-06  Pedro Alves  <palves@redhat.com>
5497
5498         * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5499         reading beyond the passed in buffer length.
5500
5501 2015-08-06  Pierre Langlois  <pierre.langlois@arm.com>
5502
5503         * tracepoint.c (symbol_list) <required>: Remove.
5504
5505 2015-08-06  Pedro Alves  <palves@redhat.com>
5506
5507         * linux-low.c (handle_extended_wait): Set the fork child's suspend
5508         count if stopping and suspending threads.
5509         (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5510         stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5511         (linux_detach): Complete an ongoing step-over.
5512         (lwp_suspended_inc, lwp_suspended_decr): New functions.  Use
5513         throughout.
5514         (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5515         (linux_wait_1): If passing a signal to the inferior after
5516         finishing a step-over, unsuspend and re-resume all lwps.  If we
5517         see a single-step event but the thread should be continuing, don't
5518         pass the trap to gdb.
5519         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5520         internal_error instead of gdb_assert.
5521         (enqueue_pending_signal): New function.
5522         (check_ptrace_stopped_lwp_gone): Add debug output.
5523         (start_step_over): Use internal_error instead of gdb_assert.
5524         (complete_ongoing_step_over): New function.
5525         (linux_resume_one_thread): Don't resume a suspended thread.
5526         (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5527         it stepping.
5528
5529 2015-08-06  Pedro Alves  <palves@redhat.com>
5530
5531         * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5532         (linux_thread_alive): Use lwp_is_marked_dead.
5533         (extended_event_reported): Delete.
5534         (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5535         instead of extended_event_reported.
5536         (mark_lwp_dead): Don't set the 'dead' flag.  Store the waitstatus
5537         as well.
5538         (lwp_is_marked_dead): New function.
5539         (lwp_running): Use lwp_is_marked_dead.
5540         * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5541         comment.
5542
5543 2015-08-06  Pedro Alves  <palves@redhat.com>
5544
5545         * linux-low.c (linux_wait_1): Move fork event output out of the
5546         !report_to_gdb check.  Pass event_child->waitstatus to
5547         target_waitstatus_to_string instead of ourstatus.
5548
5549 2015-08-04  Yao Qi  <yao.qi@linaro.org>
5550
5551         * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5552         if current_thread is 32 bit.
5553
5554 2015-08-04  Yao Qi  <yao.qi@linaro.org>
5555
5556         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5557         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5558         * server.c (extended_protocol): Remove "static".
5559         * server.h (extended_protocol): Declare it.
5560
5561 2015-08-04  Yao Qi  <yao.qi@linaro.org>
5562
5563         * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5564         both aarch64 and aarch32.
5565         (aarch64_set_pc): Likewise.
5566
5567 2015-08-04  Yao Qi  <yao.qi@linaro.org>
5568
5569         * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5570         to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5571         arm-with-neon.xml to srv_xmlfiles.
5572         * linux-aarch64-low.c: Include linux-aarch32-low.h.
5573         (is_64bit_tdesc): New function.
5574         (aarch64_linux_read_description): New function.
5575         (aarch64_arch_setup): Call aarch64_linux_read_description.
5576         (regs_info): Rename to regs_info_aarch64.
5577         (aarch64_regs_info): Return right regs_info.
5578         (initialize_low_arch): Call initialize_low_arch_aarch32.
5579
5580 2015-08-04  Yao Qi  <yao.qi@linaro.org>
5581
5582         * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5583         * linux-aarch32-low.c: New file.
5584         * linux-aarch32-low.h: New file.
5585         * linux-arm-low.c (arm_fill_gregset): Move it to
5586         linux-aarch32-low.c.
5587         (arm_store_gregset): Likewise.
5588         (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5589         (arm_store_vfpregset): Call arm_store_vfpregset_num.
5590         (arm_arch_setup): Check if PTRACE_GETREGSET works.
5591         (regs_info): Rename to regs_info_arm.
5592         (arm_regs_info): Return regs_info_aarch32 if
5593         have_ptrace_getregset is 1 and target description is
5594         arm_with_neon or arm_with_vfpv3.
5595         (initialize_low_arch): Don't call init_registers_arm_with_neon.
5596         Call initialize_low_arch_aarch32 instead.
5597
5598 2015-08-04  Yao Qi  <yao.qi@linaro.org>
5599
5600         * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5601         * linux-low.c: ... here.
5602         * linux-low.h (have_ptrace_getregset): Declare it.
5603
5604 2015-08-04  Pedro Alves  <palves@redhat.com>
5605
5606         * thread-db.c (struct thread_db): Use new typedefs.
5607         (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5608         CHK calls.
5609         (disable_thread_event_reporting): Cast result of dlsym to
5610         destination function pointer type.
5611         (thread_db_mourn): Use td_ta_delete_ftype.
5612
5613 2015-08-03  Sandra Loosemore  <sandra@codesourcery.com>
5614
5615         * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5616         arch variant.
5617         (CDX_BREAKPOINT): Define for R2.
5618         (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5619         (the_low_target): Add comments.
5620
5621 2015-07-30  Yao Qi  <yao.qi@linaro.org>
5622
5623         * linux-arm-low.c (arm_hwcap): Remove it.
5624         (arm_read_description): New local variable arm_hwcap.  Don't
5625         set arm_hwcap to zero.
5626
5627 2015-07-30  Yao Qi  <yao.qi@linaro.org>
5628
5629         * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5630         Use regcache->tdesc instead.
5631         (arm_store_wmmxregset): Likewise.
5632         (arm_fill_vfpregset): Likewise.
5633         (arm_store_vfpregset): Likewise.
5634
5635 2015-07-30  Yao Qi  <yao.qi@linaro.org>
5636
5637         * linux-arm-low.c: Include arch/arm.h.
5638         (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5639         (arm_store_gregset): Likewise.
5640
5641 2015-07-29  Simon Marchi  <simon.marchi@ericsson.com>
5642
5643         * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5644         ptrace's 4th parameter.
5645
5646 2015-07-27  Yao Qi  <yao.qi@linaro.org>
5647
5648         * configure.srv (case aarch64*-*-linux*): Don't set
5649         srv_linux_usrregs.
5650
5651 2015-07-24  Pedro Alves  <palves@redhat.c: Likewise.om>
5652
5653         * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5654         sys/ptrace.h.
5655         * linux-arm-low.c: Likewise.
5656         * linux-cris-low.c: Likewise.
5657         * linux-crisv32-low.c: Likewise.
5658         * linux-low.c: Likewise.
5659         * linux-m68k-low.c: Likewise.
5660         * linux-mips-low.c: Likewise.
5661         * linux-nios2-low.c: Likewise.
5662         * linux-s390-low.c: Likewise.
5663         * linux-sparc-low.c: Likewise.
5664         * linux-tic6x-low.c: Likewise.
5665         * linux-tile-low.c: Likewise.
5666         * linux-x86-low.c: Likewise.
5667
5668 2015-07-24  Pedro Alves  <palves@redhat.com>
5669
5670         * config.in: Regenerate.
5671         * configure: Regenerate.
5672
5673 2015-07-24  Pedro Alves  <palves@redhat.com>
5674
5675         * acinclude.m4: Include ../ptrace.m4.
5676         * configure.ac: Call GDB_AC_PTRACE.
5677         * config.in, configure: Regenerate.
5678
5679 2015-07-24  Yao Qi  <yao.qi@linaro.org>
5680
5681         * linux-low.c (linux_create_inferior): Remove setting to
5682         proc->priv->new_inferior.
5683         (linux_attach): Likewise.
5684         (linux_low_filter_event): Likewise.
5685         * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5686
5687 2015-07-24  Yao Qi  <yao.qi@linaro.org>
5688
5689         * linux-low.c (linux_arch_setup): New function.
5690         (linux_low_filter_event): If proc->tdesc is NULL and
5691         proc->attached is true, call the_low_target.arch_setup.
5692         Otherwise, keep status pending, and return.
5693         (linux_resume_one_lwp_throw): Don't call get_pc if
5694         thread->while_stepping isn't NULL.  Don't call
5695         get_thread_regcache if proc->tdesc is NULL.
5696         (need_step_over_p): Return 0 if proc->tdesc is NULL.
5697         (linux_target_ops): Install arch_setup.
5698         * server.c (start_inferior): Call the_target->arch_setup.
5699         * target.h (struct target_ops) <arch_setup>: New field.
5700         (target_arch_setup): New marco.
5701         * lynx-low.c (lynx_target_ops): Update.
5702         * nto-low.c (nto_target_ops): Update.
5703         * spu-low.c (spu_target_ops): Update.
5704         * win32-low.c (win32_target_ops): Update.
5705
5706 2015-07-24  Yao Qi  <yao.qi@linaro.org>
5707
5708         * linux-low.c (linux_add_process): Don't set
5709         proc->priv->new_inferior.
5710         (linux_create_inferior): Set proc->priv->new_inferior to 1.
5711         (linux_attach): Likewise.
5712
5713 2015-07-24  Yao Qi  <yao.qi@linaro.org>
5714
5715         * server.c (start_inferior): Code refactor.
5716
5717 2015-07-24  Yao Qi  <yao.qi@linaro.org>
5718
5719         * server.c (process_serial_event): Set general_thread.
5720
5721 2015-07-21  Yao Qi  <yao.qi@linaro.org>
5722
5723         * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5724         aarch64_linux_get_debug_reg_capacity.
5725
5726 2015-07-17  Yao Qi  <yao.qi@linaro.org>
5727
5728         * Makefile.in (aarch64-linux-hw-point.o): New rule.
5729         * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5730         * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5731         (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5732         (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5733         (AARCH64_HWP_ALIGNMENT): Likewise.
5734         (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5735         (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5736         (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5737         (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5738         (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5739         (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5740         (struct aarch64_debug_reg_state): Likewise.
5741         (struct arch_lwp_info): Likewise.
5742         (aarch64_align_watchpoint): Likewise.
5743         (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5744         (aarch64_watchpoint_length): Likewise.
5745         (aarch64_point_encode_ctrl_reg): Likewise
5746         (aarch64_point_is_aligned): Likewise.
5747         (aarch64_align_watchpoint): Likewise.
5748         (aarch64_linux_set_debug_regs):
5749         (aarch64_dr_state_insert_one_point): Likewise.
5750         (aarch64_dr_state_remove_one_point): Likewise.
5751         (aarch64_handle_breakpoint): Likewise.
5752         (aarch64_handle_aligned_watchpoint): Likewise.
5753         (aarch64_handle_unaligned_watchpoint): Likewise.
5754         (aarch64_handle_watchpoint): Likewise.
5755
5756 2015-07-17  Yao Qi  <yao.qi@linaro.org>
5757
5758         * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5759         and don't aarch64_get_debug_reg_state.  All callers update.
5760         (aarch64_handle_aligned_watchpoint): Likewise.
5761         (aarch64_handle_unaligned_watchpoint): Likewise.
5762         (aarch64_handle_watchpoint): Likewise.
5763         (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5764         (aarch64_remove_point): Likewise.
5765
5766 2015-07-17  Yao Qi  <yao.qi@linaro.org>
5767
5768         * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5769         debug_printf.
5770         (aarch64_handle_unaligned_watchpoint): Likewise.
5771
5772 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
5773
5774         Revert the previous 3 commits:
5775         Move gdb_regex* to common/
5776         Move linux_find_memory_regions_full & co.
5777         gdbserver build-id attribute generator
5778
5779 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
5780             Jan Kratochvil  <jan.kratochvil@redhat.com>
5781
5782         gdbserver build-id attribute generator.
5783         * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5784         (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5785         (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5786         (find_phdr): New.
5787         (get_dynamic): Use find_pdhr to traverse program headers.
5788         (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5789         (compare_mapping_entry_range, struct find_memory_region_callback_data)
5790         (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5791         (get_hex_build_id): New.
5792         (linux_qxfer_libraries_svr4): Add optional build-id attribute
5793         to reply XML document.
5794
5795 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
5796             Jan Kratochvil  <jan.kratochvil@redhat.com>
5797
5798         * target.c: Include target/target-utils.h and fcntl.h.
5799         (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5800         (target_fileio_read_stralloc): New functions.
5801
5802 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
5803
5804         * Makefile.in (OBS): Add gdb_regex.o.
5805         (gdb_regex.o): New.
5806         * config.in: Rebuilt.
5807         * configure: Rebuilt.
5808
5809 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
5810             Jan Kratochvil  <jan.kratochvil@redhat.com>
5811
5812         Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5813         * Makefile.in (OBS): Add target-utils.o.
5814         (linux-maps.o, target-utils.o): New.
5815         * configure.srv (srv_linux_obj): Add linux-maps.o.
5816
5817 2015-07-15  Pierre Langlois  <pierre.langlois@arm.com>
5818
5819         * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5820         function, return 1.
5821         (the_low_target): Install it.
5822
5823 2015-07-14  Pedro Alves  <palves@redhat.com>
5824
5825         * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5826         Instead, ignore ECHILD, and throw an error for other errnos.
5827
5828 2015-07-10  Pedro Alves  <palves@redhat.com>
5829
5830         * event-loop.c (struct callback_event) <data>: Change type to
5831         gdb_client_data instance instead of gdb_client_data pointer.
5832         (append_callback_event): Adjust.
5833
5834 2015-07-10  Pierre Langlois  <pierre.langlois@arm.com>
5835
5836         * linux-aarch64-low.c: Add comments for each linux_target_ops
5837         method.  Remove comments already covered in target_ops and
5838         linux_target_ops definitions.
5839         (the_low_target): Add comments for each unimplemented method.
5840
5841 2015-07-09  Yao Qi  <yao.qi@linaro.org>
5842
5843         * linux-aarch64-low.c (aarch64_regmap): Remove.
5844         (aarch64_usrregs_info): Remove.
5845         (regs_info): Set field usrregs to NULL.
5846
5847 2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
5848
5849         * linux-low.c: Include "rsp-low.h"
5850         (linux_low_encode_pt_config, linux_low_encode_raw): New.
5851         (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5852         (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5853         (handle_btrace_enable_pt): New.
5854         (handle_btrace_general_set): Support "pt".
5855         (handle_btrace_conf_general_set): Support "pt:size".
5856
5857 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
5858
5859         * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5860         Z_PACKET_SW_BP.
5861
5862 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
5863
5864         * linux-aarch64-low.c: Remove comment about endianness.
5865         (aarch64_breakpoint): Change type to gdb_byte[].  Set to "brk #0".
5866         (aarch64_breakpoint_at): Change type of insn to gdb_byte[].  Use
5867         memcmp.
5868
5869 2015-06-24  Gary Benson  <gbenson@redhat.com>
5870
5871         * linux-i386-ipa.c (stdint.h): Do not include.
5872         * lynx-i386-low.c (stdint.h): Likewise.
5873         * lynx-ppc-low.c (stdint.h): Likewise.
5874         * mem-break.c (stdint.h): Likewise.
5875         * thread-db.c (stdint.h): Likewise.
5876         * tracepoint.c (stdint.h): Likewise.
5877         * win32-low.c (stdint.h): Likewise.
5878
5879 2015-06-18  Simon Marchi  <simon.marchi@ericsson.com>
5880
5881         * server.c (write_qxfer_response): Update call to
5882         remote_escape_output.
5883
5884 2015-06-15  Aleksandar Ristovski  <aristovski@qnx.com
5885             Jan Kratochvil  <jan.kratochvil@redhat.com>
5886
5887         Merge multiple hex conversions.
5888         * gdbreplay.c (tohex): Rename to 'fromhex'.
5889         (logchar): Use fromhex.
5890
5891 2015-06-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
5892
5893         * server.c (handle_qxfer_libraries): Set `version' attribute for
5894         <library-list>.
5895
5896 2015-06-10  Gary Benson  <gbenson@redhat.com>
5897
5898         * target.h (struct target_ops) <multifs_open>: New field.
5899         <multifs_unlink>: Likewise.
5900         <multifs_readlink>: Likewise.
5901         * linux-low.c (nat/linux-namespaces.h): New include.
5902         (linux_target_ops): Initialize the_target->multifs_open,
5903         the_target->multifs_unlink and the_target->multifs_readlink.
5904         * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5905         * hostio.c (hostio_fs_pid): New static variable.
5906         (hostio_handle_new_gdb_connection): New function.
5907         (handle_setfs): Likewise.
5908         (handle_open): Use the_target->multifs_open as appropriate.
5909         (handle_unlink): Use the_target->multifs_unlink as appropriate.
5910         (handle_readlink): Use the_target->multifs_readlink as
5911         appropriate.
5912         (handle_vFile): Handle vFile:setfs packets.
5913         * server.c (handle_query): Call hostio_handle_new_gdb_connection
5914         after target_handle_new_gdb_connection.
5915
5916 2015-06-10  Gary Benson  <gbenson@redhat.com>
5917
5918         * configure.ac (AC_CHECK_FUNCS): Add setns.
5919         * config.in: Regenerate.
5920         * configure: Likewise.
5921         * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5922         (linux-namespaces.o): New rule.
5923         * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5924
5925 2015-06-09  Gary Benson <gbenson@redhat.com>
5926
5927         * hostio.c (handle_open): Process mode argument with
5928         fileio_to_host_mode.
5929
5930 2015-06-01  Yao Qi  <yao.qi@linaro.org>
5931
5932         * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5933         * linux-x86-low.c: Likewise.
5934
5935 2015-05-28  Don Breazeal  <donb@codesourcery.com>
5936
5937         * linux-low.c (handle_extended_wait): Initialize
5938         thread_info.last_resume_kind for new fork children.
5939
5940 2015-05-15  Pedro Alves  <palves@redhat.com>
5941
5942         * target.h (target_handle_new_gdb_connection): Rewrite using if
5943         wrapped in do/while.
5944
5945 2015-05-14  Joel Brobecker  <brobecker@adacore.com>
5946
5947         * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5948         * configure, config.in: Regenerate.
5949         * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5950         Declare typedef.
5951
5952 2015-05-12  Don Breazeal  <donb@codesourcery.com>
5953
5954         * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5955         PTRACE_EVENT_VFORK_DONE.
5956         (linux_low_ptrace_options, extended_event_reported): Add vfork
5957         events.
5958         * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5959         and "vforkdone" for RSP 'T' Stop Reply Packet.
5960         * server.h (report_vfork_events): Declare
5961         global variable.
5962
5963 2015-05-12  Don Breazeal  <donb@codesourcery.com>
5964
5965         * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5966         (the_low_target) <new_fork>: Initialize new member.
5967         * linux-arm-low.c (arm_new_fork): New function.
5968         (the_low_target) <new_fork>: Initialize new member.
5969         * linux-low.c (handle_extended_wait): Call new target function
5970         new_fork.
5971         * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5972         * linux-mips-low.c (mips_add_watchpoint): New function
5973         extracted from mips_insert_point.
5974         (the_low_target) <new_fork>: Initialize new member.
5975         (mips_linux_new_fork): New function.
5976         (mips_insert_point): Call mips_add_watchpoint.
5977         * linux-x86-low.c (x86_linux_new_fork): New function.
5978         (the_low_target) <new_fork>: Initialize new member.
5979
5980 2015-05-12  Don Breazeal  <donb@codesourcery.com>
5981
5982         * linux-low.c (handle_extended_wait): Implement return value,
5983         rename argument 'event_child' to 'event_lwp', handle
5984         PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5985         (linux_low_ptrace_options): New function.
5986         (linux_low_filter_event): Call linux_low_ptrace_options,
5987         use different argument fo linux_enable_event_reporting,
5988         use return value from handle_extended_wait.
5989         (extended_event_reported): New function.
5990         (linux_wait_1): Call extended_event_reported and set
5991         status to report fork events.
5992         (linux_write_memory): Add pid to debug message.
5993         (reset_lwp_ptrace_options_callback): New function.
5994         (linux_handle_new_gdb_connection): New function.
5995         (linux_target_ops): Initialize new structure member.
5996         * linux-low.h (struct lwp_info) <waitstatus>: New member.
5997         * lynx-low.c: Initialize new structure member.
5998         * remote-utils.c (prepare_resume_reply): Implement stop reason
5999         "fork" for "T" stop message.
6000         * server.c (handle_query): Call handle_new_gdb_connection.
6001         * server.h (report_fork_events): Declare global flag.
6002         * target.h (struct target_ops) <handle_new_gdb_connection>:
6003         New member.
6004         (target_handle_new_gdb_connection): New macro.
6005         * win32-low.c: Initialize new structure member.
6006
6007 2015-05-12  Don Breazeal  <donb@codesourcery.com>
6008
6009         * mem-break.c (APPEND_TO_LIST): Define macro.
6010         (clone_agent_expr): New function.
6011         (clone_one_breakpoint): New function.
6012         (clone_all_breakpoints): New function.
6013         * mem-break.h: Declare new functions.
6014
6015 2015-05-12  Don Breazeal  <donb@codesourcery.com>
6016
6017         * linux-low.c (linux_supports_fork_events): New function.
6018         (linux_supports_vfork_events): New function.
6019         (linux_target_ops): Initialize new structure members.
6020         (initialize_low): Call linux_check_ptrace_features.
6021         * lynx-low.c (lynx_target_ops): Initialize new structure
6022         members.
6023         * server.c (report_fork_events, report_vfork_events):
6024         New global flags.
6025         (handle_query): Add new features to qSupported packet and
6026         response.
6027         (captured_main): Initialize new global variables.
6028         * target.h (struct target_ops) <supports_fork_events>:
6029         New member.
6030         <supports_vfork_events>: New member.
6031         (target_supports_fork_events): New macro.
6032         (target_supports_vfork_events): New macro.
6033         * win32-low.c (win32_target_ops): Initialize new structure
6034         members.
6035
6036 2015-05-12  Gary Benson <gbenson@redhat.com>
6037
6038         * server.c (handle_qxfer_exec_file): Use current process
6039         if annex is empty.
6040
6041 2015-05-08  Sandra Loosemore  <sandra@codesourcery.com>
6042
6043         * linux-nios2-low.c: Include elf/common.h.  Adjust comments.
6044         Remove HAVE_PTRACE_GETREGS conditionals.
6045         (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6046         instead of PTRACE_GETREGS and PTRACE_SETREGS.
6047
6048 2015-05-08  Yao Qi  <yao.qi@linaro.org>
6049
6050         * linux-low.c (linux_supports_conditional_breakpoints): New
6051         function.
6052         (linux_target_ops): Install new target method.
6053         * lynx-low.c (lynx_target_ops): Install NULL hook for
6054         supports_conditional_breakpoints.
6055         * nto-low.c (nto_target_ops): Likewise.
6056         * spu-low.c (spu_target_ops): Likewise.
6057         * win32-low.c (win32_target_ops): Likewise.
6058         * server.c (handle_query): Check
6059         target_supports_conditional_breakpoints.
6060         * target.h (struct target_ops) <supports_conditional_breakpoints>:
6061         New field.
6062         (target_supports_conditional_breakpoints): New macro.
6063
6064 2015-05-06  Pedro Alves  <palves@redhat.com>
6065
6066         PR server/18081
6067         * server.c (start_inferior): If the process exits, mourn it.
6068
6069 2015-04-21  Gary Benson <gbenson@redhat.com>
6070
6071         * hostio.c (fileio_open_flags_to_host): Factored out to
6072         fileio_to_host_openflags in common/fileio.c.  Single use
6073         updated.
6074
6075 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
6076
6077         * linux-xtensa-low.c (xtensa_fill_gregset)
6078         (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6079         XCHAL_HAVE_LOOP.
6080
6081 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
6082
6083         * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6084         (regs_info): Replace usrregs pointer with NULL.
6085
6086 2015-04-17  Gary Benson  <gbenson@redhat.com>
6087
6088         * target.h (struct target_ops) <pid_to_exec_file>: New field.
6089         * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6090         * server.c (handle_qxfer_exec_file): New function.
6091         (qxfer_packets): Add exec-file entry.
6092         (handle_query): Report qXfer:exec-file:read as supported packet.
6093
6094 2015-04-14  Romain Naour <romain.naour@openwide.fr>  (tiny change)
6095
6096         * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6097
6098 2015-04-09  Gary Benson <gbenson@redhat.com>
6099
6100         * hostio-errno.c (errno_to_fileio_error): Remove function.
6101         Update caller to use remote_fileio_to_fio_error.
6102
6103 2015-04-09  Yao Qi  <yao.qi@linaro.org>
6104
6105         * linux-low.c (linux_insert_point): Call
6106         insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6107         (linux_remove_point): Call remove_memory_breakpoint if type is
6108         raw_bkpt_type_sw.
6109         * linux-x86-low.c (x86_insert_point): Don't call
6110         insert_memory_breakpoint.
6111         (x86_remove_point): Don't call remove_memory_breakpoint.
6112
6113 2015-04-01  Pedro Alves  <palves@redhat.com>
6114             Cleber Rosa  <crosa@redhat.com>
6115
6116         * server.c (gdbserver_usage): Reorganize and extend the usage
6117         message.
6118
6119 2015-03-24  Pedro Alves  <palves@redhat.com>
6120
6121         * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6122         output.  Also dump TRAP_TRACE.
6123         (linux_low_filter_event): In debug output, distinguish a
6124         resume_stop SIGSTOP from a delayed SIGSTOP.
6125
6126 2015-03-24  Gary Benson  <gbenson@redhat.com>
6127
6128         * linux-x86-low.c (x86_linux_new_thread): Moved to
6129         nat/x86-linux.c.
6130         (x86_linux_prepare_to_resume): Likewise.
6131
6132 2015-03-24  Gary Benson  <gbenson@redhat.com>
6133
6134         * Makefile.in (x86-linux-dregs.o): New rule.
6135         * configure.srv: Add x86-linux-dregs.o to relevant targets.
6136         * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6137         (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6138         (x86_linux_dr_get): Likewise.
6139         (x86_linux_dr_set): Likewise.
6140         (update_debug_registers_callback): Likewise.
6141         (x86_linux_dr_set_addr): Likewise.
6142         (x86_linux_dr_get_addr): Likewise.
6143         (x86_linux_dr_set_control): Likewise.
6144         (x86_linux_dr_get_control): Likewise.
6145         (x86_linux_dr_get_status): Likewise.
6146         (x86_linux_update_debug_registers): Likewise.
6147
6148 2015-03-24  Gary Benson  <gbenson@redhat.com>
6149
6150         * linux-x86-low.c (x86_linux_update_debug_registers):
6151         New function, factored out from...
6152         (x86_linux_prepare_to_resume): ...this.
6153
6154 2015-03-24  Gary Benson  <gbenson@redhat.com>
6155
6156         * linux-x86-low.c (x86_linux_dr_get): Update comments.
6157         (x86_linux_dr_set): Likewise.
6158         (update_debug_registers_callback): Likewise.
6159         (x86_linux_dr_set_addr): Likewise.
6160         (x86_linux_dr_get_addr): Likewise.
6161         (x86_linux_dr_set_control): Likewise.
6162         (x86_linux_dr_get_control): Likewise.
6163         (x86_linux_dr_get_status): Likewise.
6164         (x86_linux_prepare_to_resume): Likewise.
6165
6166 2015-03-24  Gary Benson  <gbenson@redhat.com>
6167
6168         * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6169         Use perror_with_name.  Pass string through gettext.
6170         (x86_linux_dr_set): Likewise.
6171
6172 2015-03-24  Gary Benson  <gbenson@redhat.com>
6173
6174         * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6175         (x86_linux_dr_set_addr): ...this.
6176         (x86_dr_low_get_addr): Rename to...
6177         (x86_linux_dr_get_addr): ...this.
6178         (x86_dr_low_set_control): Rename to...
6179         (x86_linux_dr_set_control): ...this.
6180         (x86_dr_low_get_control): Rename to...
6181         (x86_linux_dr_get_control): ...this.
6182         (x86_dr_low_get_status): Rename to...
6183         (x86_linux_dr_get_status): ...this.
6184         (x86_dr_low): Update with new function names.
6185
6186 2015-03-24  Gary Benson  <gbenson@redhat.com>
6187
6188         * Makefile.in (x86-linux.o): New rule.
6189         * configure.srv: Add x86-linux.o to relevant targets.
6190         * linux-low.c (lwp_set_arch_private_info): New function.
6191         (lwp_arch_private_info): Likewise.
6192         * linux-x86-low.c: Include nat/x86-linux.h.
6193         (arch_lwp_info): Removed structure.
6194         (update_debug_registers_callback):
6195         Use lwp_set_debug_registers_changed.
6196         (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6197         and lwp_set_debug_registers_changed.
6198         (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6199
6200 2015-03-24  Gary Benson  <gbenson@redhat.com>
6201
6202         * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6203         * linux-arm-low.c (arm_new_thread): Likewise.
6204         * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6205         * linux-mips-low.c (mips_linux_new_thread): Likewise.
6206         * linux-x86-low.c (x86_linux_new_thread): Likewise.
6207         * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6208
6209 2015-03-24  Gary Benson  <gbenson@redhat.com>
6210
6211         * linux-low.c (ptid_of_lwp): New function.
6212         (lwp_is_stopped): Likewise.
6213         (lwp_stop_reason): Likewise.
6214         * linux-x86-low.c (update_debug_registers_callback):
6215         Use lwp_is_stopped.
6216         (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6217         lwp_stop_reason.
6218
6219 2015-03-24  Gary Benson  <gbenson@redhat.com>
6220
6221         * linux-low.h (linux_stop_lwp): Remove declaration.
6222
6223 2015-03-24  Gary Benson  <gbenson@redhat.com>
6224
6225         * linux-low.h: Include nat/linux-nat.h.
6226         * linux-low.c (iterate_over_lwps_args): New structure.
6227         (iterate_over_lwps_filter): New function.
6228         (iterate_over_lwps): Likewise.
6229         * linux-x86-low.c (update_debug_registers_callback):
6230         Update signature to what iterate_over_lwps expects.
6231         Remove PID check that iterate_over_lwps now performs.
6232         (x86_dr_low_set_addr): Use iterate_over_lwps.
6233         (x86_dr_low_set_control): Likewise.
6234
6235 2015-03-24  Gary Benson  <gbenson@redhat.com>
6236
6237         * linux-x86-low.c (x86_debug_reg_state): New function.
6238         (x86_linux_prepare_to_resume): Use the above.
6239
6240 2015-03-24  Gary Benson  <gbenson@redhat.com>
6241
6242         * linux-low.c (current_lwp_ptid): New function.
6243         * linux-x86-low.c: Include nat/linux-nat.h.
6244         (x86_dr_low_get_addr): Use current_lwp_ptid.
6245         (x86_dr_low_get_control): Likewise.
6246         (x86_dr_low_get_status): Likewise.
6247
6248 2015-03-20  Pedro Alves  <palves@redhat.com>
6249
6250         * tracepoint.c (cmd_qtstatus): Make "str" const.
6251
6252 2015-03-20  Pedro Alves  <palves@redhat.com>
6253
6254         * server.c (handle_general_set): Make "req_str" const.
6255
6256 2015-03-19  Pedro Alves  <palves@redhat.com>
6257
6258         * linux-low.c (linux_resume_one_lwp): Rename to ...
6259         (linux_resume_one_lwp_throw): ... this.  Don't handle ESRCH here,
6260         instead call perror_with_name.
6261         (check_ptrace_stopped_lwp_gone): New function.
6262         (linux_resume_one_lwp): Reimplement as wrapper around
6263         linux_resume_one_lwp_throw that swallows errors if the LWP is
6264         gone.
6265
6266 2015-03-19  Pedro Alves  <palves@redhat.com>
6267
6268         * linux-low.c (count_events_callback, select_event_lwp_callback):
6269         No longer check whether the thread has resume_stop as last resume
6270         kind.
6271
6272 2015-03-19 Pedro Alves  <palves@redhat.com>
6273
6274         * linux-low.c (count_events_callback, select_event_lwp_callback):
6275         Use the lwp's status_pending_p field, not the thread's.
6276
6277 2015-03-19  Pedro Alves  <palves@redhat.com>
6278
6279         * linux-low.c (select_event_lwp_callback): Update comments to
6280         no longer mention SIGTRAP.
6281
6282 2015-03-18  Gary Benson  <gbenson@redhat.com>
6283
6284         * server.c (handle_query): Do not report vFile:fstat as supported.
6285
6286 2015-03-11  Gary Benson  <gbenson@redhat.com>
6287
6288         * hostio.c (sys/types.h): New include.
6289         (sys/stat.h): Likewise.
6290         (common-remote-fileio.h): Likewise.
6291         (handle_fstat): New function.
6292         (handle_vFile): Handle vFile:fstat packets.
6293
6294 2015-03-11  Gary Benson  <gbenson@redhat.com>
6295
6296         * configure.ac (AC_CHECK_MEMBERS): Add checks for
6297         struct stat.st_blocks and struct stat.st_blksize.
6298         * configure: Regenerate.
6299         * config.in: Likewise.
6300         * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6301         (OBS): Add common-remote-fileio.o.
6302         (common-remote-fileio.o): New rule.
6303
6304 2015-03-09  Pedro Alves  <palves@redhat.com>
6305
6306         * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6307         'struct sockaddr' pointer in 'accept' call.
6308
6309 2015-03-09  Pedro Alves  <palves@redhat.com>
6310
6311         Revert:
6312         2015-03-07  Pedro Alves  <palves@redhat.com>
6313         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6314         or <winsock2.h> here.  Instead include "gdb_socket.h".
6315         (remote_open): Use union gdb_sockaddr_u.
6316         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6317         or <winsock2.h> here.  Instead include "gdb_socket.h".
6318         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6319         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6320         or <sys/un.h>.
6321         (init_named_socket, gdb_agent_helper_thread): Use union
6322         gdb_sockaddr_u.
6323
6324 2015-03-07  Pedro Alves  <palves@redhat.com>
6325
6326         * configure.ac (build_warnings): Move
6327         -Wdeclaration-after-statement to the C-specific set.
6328         * configure: Regenerate.
6329
6330 2015-03-07  Pedro Alves  <palves@redhat.com>
6331
6332         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6333         or <winsock2.h> here.  Instead include "gdb_socket.h".
6334         (remote_open): Use union gdb_sockaddr_u.
6335         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6336         or <winsock2.h> here.  Instead include "gdb_socket.h".
6337         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6338         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6339         or <sys/un.h>.
6340         (init_named_socket, gdb_agent_helper_thread): Use union
6341         gdb_sockaddr_u.
6342
6343 2015-03-07  Pedro Alves  <palves@redhat.com>
6344
6345         Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6346         instead.
6347
6348 2015-03-06  Yao Qi  <yao.qi@linaro.org>
6349
6350         * linux-aarch64-low.c (aarch64_insert_point): Use
6351         show_debug_regs as a boolean.
6352         (aarch64_remove_point): Likewise.
6353
6354 2015-03-05  Pedro Alves  <palves@redhat.com>
6355
6356         * lynx-low.c (lynx_target_ops): Install NULL hooks for
6357         stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6358         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6359         * nto-low.c (nto_target_ops): Likewise.
6360         * spu-low.c (spu_target_ops): Likewise.
6361         * win32-low.c (win32_target_ops): Likewise.
6362
6363 2015-03-04  Pedro Alves  <palves@redhat.com>
6364
6365         * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6366         Decide whether a breakpoint triggered based on the SIGTRAP's
6367         siginfo.si_code.
6368         (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6369         breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6370         (linux_low_filter_event): Check for breakpoints before checking
6371         watchpoints.
6372         (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6373         siginfo.si_code.
6374         (linux_stopped_by_sw_breakpoint)
6375         (linux_supports_stopped_by_sw_breakpoint)
6376         (linux_stopped_by_hw_breakpoint)
6377         (linux_supports_stopped_by_hw_breakpoint): New functions.
6378         (linux_target_ops): Install new target methods.
6379
6380 2015-03-04  Pedro Alves  <palves@redhat.com>
6381
6382         * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6383         * server.c (swbreak_feature, hwbreak_feature): New globals.
6384         (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6385         (captured_main): Clear swbreak_feature and hwbreak_feature.
6386         * server.h (swbreak_feature, hwbreak_feature): Declare.
6387         * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6388         supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6389         supports_stopped_by_hw_breakpoint>: New fields.
6390         (target_supports_stopped_by_sw_breakpoint)
6391         (target_stopped_by_sw_breakpoint)
6392         (target_supports_stopped_by_hw_breakpoint)
6393         (target_stopped_by_hw_breakpoint): Declare.
6394
6395 2015-03-04  Pedro Alves  <palves@redhat.com>
6396
6397         enum lwp_stop_reason -> enum target_stop_reason
6398         * linux-low.c (check_stopped_by_breakpoint): Adjust.
6399         (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6400         (linux_wait_1, stuck_in_jump_pad_callback)
6401         (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6402         (linux_stopped_by_watchpoint):
6403         * linux-low.h (enum lwp_stop_reason): Delete.
6404         (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6405         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6406
6407 2015-03-04  Yao Qi  <yao.qi@linaro.org>
6408
6409         * Makefile.in (SFILES): Add linux-aarch64-low.c.
6410
6411 2015-03-03  Gary Benson  <gbenson@redhat.com>
6412
6413         * hostio.c (handle_vFile): Fix prefix lengths.
6414
6415 2015-03-03  Markus Metzger  <markus.t.metzger@intel.com>
6416
6417         * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6418         ptr_bits.
6419
6420 2015-03-02  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6421
6422         * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6423         (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6424         (clean): Add "rm -f" for above C files.
6425         * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6426         s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6427         (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6428         s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6429         * linux-s390-low.c (HWCAP_S390_VX): New macro.
6430         (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6431         (init_registers_s390x_vx_linux64)
6432         (init_registers_s390x_tevx_linux64)
6433         (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6434         (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6435         declarations.
6436         (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6437         (s390_store_vxrs_high): New functions.
6438         (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6439         NT_S390_VXRS_HIGH.
6440         (s390_arch_setup): Add logic for selecting one of the new target
6441         descriptions.  Activate the new vector regsets if applicable.
6442         (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6443         init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6444         and init_registers_s390x_tevx_linux64.
6445
6446 2015-03-01  Pedro Alves  <palves@redhat.com>
6447
6448         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6449         parameter.
6450
6451 2015-02-27  Pedro Alves  <palves@redhat.com>
6452
6453         * linux-x86-low.c (u_debugreg_offset): New function.
6454         (x86_linux_dr_get, x86_linux_dr_set): Use it.
6455
6456 2015-02-27  Pedro Alves  <palves@redhat.com>
6457
6458         * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6459         [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6460         [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6461         ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6462         (ps_lsetfpregs, ps_getpid)
6463         (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6464         (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6465         (ps_lsetxregs, ps_plog): Declare.
6466
6467 2015-02-27  Pedro Alves  <palves@redhat.com>
6468
6469         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6470         IP_AGENT_EXPORT_FUNC.
6471         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6472         IP_AGENT_EXPORT_FUNC.
6473         * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6474         (IP_AGENT_EXPORT): Delete.
6475         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6476         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6477         (gdb_trampoline_buffer_error, collecting, gdb_collect)
6478         (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6479         (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6480         (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6481         (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6482         (traceframe_read_count, traceframe_write_count)
6483         (traceframes_created, trace_state_variables, get_raw_reg)
6484         (get_trace_state_variable_value, set_trace_state_variable_value)
6485         (ust_loaded, helper_thread_id, cmd_buf): Use
6486         IPA_SYM_EXPORTED_NAME.
6487         (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6488         (tracepoints) Use IP_AGENT_EXPORT_VAR.
6489         (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6490         IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6491         (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6492         (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6493         EXTERN_C_PUSH/EXTERN_C_POP.
6494         (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6495         (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6496         wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6497         (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6498         (traceframe_write_count, traceframe_read_count)
6499         (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6500         (about_to_request_buffer_space, get_trace_state_variable_value)
6501         (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6502         (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6503         EXTERN_C_PUSH/EXTERN_C_POP.
6504         (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6505         (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6506         (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6507         and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6508         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6509         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6510         (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6511         * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6512         Define.
6513         (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6514         (IP_AGENT_EXPORT_VAR_DECL): Define.
6515         (tracing): Declare.
6516         (gdb_agent_get_raw_reg): Declare.
6517
6518 2015-02-27  Tom Tromey  <tromey@redhat.com>
6519             Pedro Alves  <palves@redhat.com>
6520
6521         Rename symbols whose names are reserved C++ keywords throughout.
6522
6523 2015-02-27  Pedro Alves  <palves@redhat.com>
6524
6525         * Makefile.in (COMPILER): New, get it from autoconf.
6526         (CXX): Get from autoconf instead.
6527         (COMPILE.pre): Use COMPILER.
6528         (CC-LD): Rename to ...
6529         (CC_LD): ... this.  Use COMPILER.
6530         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6531         (CXX_FOR_TARGET): Default to g++ instead of gcc.
6532         * acinclude.m4: Include build-with-cxx.m4.
6533         * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6534         Disable -Werror by default if building in C++ mode.
6535         (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6536         -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6537         the C++ compiler.  Save/restore CXXFLAGS too.
6538         * configure: Regenerate.
6539
6540 2015-02-27  Pedro Alves  <palves@redhat.com>
6541
6542         * acinclude.m4: Include libiberty.m4.
6543         * configure.ac: Call libiberty_INIT.
6544         * config.in, configure: Regenerate.
6545
6546 2015-02-26  Pedro Alves  <palves@redhat.com>
6547
6548         * linux-low.c (linux_wait_1): When incrementing the PC past a
6549         program breakpoint always use the_low_target.breakpoint_len as
6550         increment, rather than the maximum between that and
6551         the_low_target.decr_pc_after_break.
6552
6553 2015-02-23  Pedro Alves  <palves@redhat.com>
6554
6555         * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6556         thread was doing a step-over; always adjust the PC if
6557         we stepped over a permanent breakpoint.
6558         (linux_wait_1): If we stepped over breakpoint that was on top of a
6559         permanent breakpoint, manually advance the PC past it.
6560
6561 2015-02-23  Pedro Alves  <palves@redhat.com>
6562
6563         * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6564         modes.
6565         (x86_fill_gregset, x86_store_gregset): Use it when handling
6566         $orig_eax.
6567
6568 2015-02-20  Pedro Alves  <palves@redhat.com>
6569
6570         * thread-db.c: Include "nat/linux-procfs.h".
6571         (thread_db_init): Skip listing new threads if the kernel supports
6572         PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6573
6574 2015-02-20  Pedro Alves  <palves@redhat.com>
6575
6576         * linux-low.c (status_pending_p_callback): Use ptid_match.
6577
6578 2015-02-19  Antoine Tremblay  <antoine.tremblay@ericsson.com>
6579
6580         PR breakpoints/16812
6581         * linux-low.c (wstatus_maybe_breakpoint): Remove.
6582         (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6583         (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6584
6585 2015-02-10  Antoine Tremblay <antoine.tremblay@ericsson.com>
6586
6587         PR breakpoints/15956
6588         * tracepoint.c (cmd_qtinit): Add check for current_thread.
6589
6590 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
6591
6592         * linux-low.c (linux_low_btrace_conf): Print size.
6593         * server.c (handle_btrace_conf_general_set): New.
6594         (hanle_general_set): Call handle_btrace_conf_general_set.
6595         (handle_query): Report Qbtrace-conf:bts:size as supported.
6596
6597 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
6598
6599         * linux-low.c (linux_low_enable_btrace): Update parameters.
6600         (linux_low_btrace_conf): New.
6601         (linux_target_ops)<to_btrace_conf>: Initialize.
6602         * server.c (current_btrace_conf): New.
6603         (handle_btrace_enable): Rename to ...
6604         (handle_btrace_enable_bts): ... this.  Pass &current_btrace_conf
6605         to target_enable_btrace.  Update comment.  Update users.
6606         (handle_qxfer_btrace_conf): New.
6607         (qxfer_packets): Add btrace-conf entry.
6608         (handle_query): Report qXfer:btrace-conf:read as supported packet.
6609         * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6610         (target_ops)<read_btrace_conf>: New.
6611         (target_enable_btrace): Update parameters.
6612         (target_read_btrace_conf): New.
6613
6614 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
6615
6616         * server.c (handle_btrace_general_set): Remove call to
6617         target_supports_btrace.
6618         (supported_btrace_packets): New.
6619         (handle_query): Call supported_btrace_packets.
6620         * target.h: include btrace-common.h.
6621         (btrace_target_info): Removed.
6622         (supports_btrace, target_supports_btrace): Update parameters.
6623
6624 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
6625
6626         * Makefile.in (SFILES): Add common/btrace-common.c.
6627         (OBS): Add common/btrace-common.o.
6628         (btrace-common.o): Add build rules.
6629         * linux-low: Include btrace-common.h.
6630         (linux_low_read_btrace): Use struct btrace_data.  Call
6631         btrace_data_init and btrace_data_fini.
6632
6633 2015-02-06  Pedro Alves  <palves@redhat.com>
6634
6635         * thread-db.c (find_new_threads_callback): Add debug output.
6636
6637 2015-02-04  Pedro Alves  <palves@redhat.com>
6638
6639         * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6640         (resume_stopped_resumed_lwps): New function.
6641         (linux_wait_for_event_filtered): Use it.
6642
6643 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
6644
6645         * Makefile.in (SFILES): Add linux-personality.c.
6646         (linux-personality.o): New rule.
6647         * configure.srv (srv_linux_obj): Add linux-personality.o to the
6648         list of objects to be built.
6649         * linux-low.c: Include nat/linux-personality.h.
6650         (linux_create_inferior): Remove code to disable address space
6651         randomization (moved to ../nat/linux-personality.c).  Create
6652         cleanup to disable address space randomization.
6653
6654 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
6655
6656         * Makefile.in (posix-strerror.o): New rule.
6657         (mingw-strerror.o): Likewise.
6658         * configure: Regenerated.
6659         * configure.ac: Source file ../common/common.host.  Initialize new
6660         variable srv_host_obs.  Add srv_host_obs to GDBSERVER_DEPFILES.
6661
6662 2015-01-14  Yao Qi  <yao@codesourcery.com>
6663
6664         * Makefile.in (SFILES): Add nat/ppc-linux.c.
6665         (ppc-linux.o): New rule.
6666         * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6667         * configure.ac: AC_CHECK_FUNCS(getauxval).
6668         * config.in: Re-generated.
6669         * configure: Re-generated.
6670         * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6671         ppc64_64bit_inferior_p
6672
6673 2015-01-14  Yao Qi  <yao@codesourcery.com>
6674
6675         * linux-ppc-low.c: Include "nat/ppc-linux.h".
6676          (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6677         (PPC_FEATURE_HAS_ALTIVEC,  PPC_FEATURE_HAS_SPE): Likewise.
6678         (PT_ORIG_R3, PT_TRAP): Likewise.
6679         (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6680         (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6681         (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6682
6683 2015-01-10  Joel Brobecker  <brobecker@adacore.com>
6684
6685         * i387-fp.c (i387_cache_to_xsave): In look over
6686         num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6687         zmmh_low_space field by use of zmmh_high_space.
6688
6689 2015-01-09  Pedro Alves  <palves@redhat.com>
6690
6691         * linux-low.c (step_over_bkpt): Move higher up in the file.
6692         (handle_extended_wait): Don't store the stop_pc here.
6693         (get_stop_pc): Adjust comments and rename to ...
6694         (check_stopped_by_breakpoint): ... this.  Record whether the LWP
6695         stopped for a software breakpoint or hardware breakpoint.
6696         (thread_still_has_status_pending_p): New function.
6697         (status_pending_p_callback): Use
6698         thread_still_has_status_pending_p.  If the event is no longer
6699         interesting, resume the LWP.
6700         (handle_tracepoints): Add assert.
6701         (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6702         (wstatus_maybe_breakpoint): New function.
6703         (cancel_breakpoint): Delete function.
6704         (check_stopped_by_watchpoint): New function, factored out from
6705         linux_low_filter_event.
6706         (lp_status_maybe_breakpoint): Delete function.
6707         (linux_low_filter_event): Remove filter_ptid argument.
6708         Leave thread group exits pending here.  Store the LWP's stop PC.
6709         Always leave events pending.
6710         (linux_wait_for_event_filtered): Pull all events out of the
6711         kernel, and leave them all pending.
6712         (count_events_callback, select_event_lwp_callback): Consider all
6713         events.
6714         (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6715         (select_event_lwp): Only give preference to the stepping LWP in
6716         all-stop mode.  Adjust comments.
6717         (ignore_event): New function.
6718         (linux_wait_1): Delete 'retry' label.  Use ignore_event.  Remove
6719         references to cancel_breakpoints.  Adjust to renames.  Also give
6720         equal priority to all LWPs that have had events in non-stop mode.
6721         If reporting a software breakpoint event, unadjust the LWP's PC.
6722         (linux_wait): If linux_wait_1 returned an ignored event, retry.
6723         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6724         Adjust.
6725         (linux_resume_one_lwp): Store the LWP's PC.  Adjust.
6726         (resume_status_pending_p): Use thread_still_has_status_pending_p.
6727         (linux_stopped_by_watchpoint): Adjust.
6728         (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6729         * linux-low.h (enum lwp_stop_reason): New.
6730         (struct lwp_info) <stop_pc>: Adjust comment.
6731         <stopped_by_watchpoint>: Delete field.
6732         <stop_reason>: New field.
6733         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6734         * mem-break.c (software_breakpoint_inserted_here)
6735         (hardware_breakpoint_inserted_here): New function.
6736         * mem-break.h (software_breakpoint_inserted_here)
6737         (hardware_breakpoint_inserted_here): Declare.
6738         * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6739         (cancel_breakpoints): Delete.
6740         * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6741         (upload_fast_traceframes): Remove references to
6742         cancel_breakpoints.
6743
6744 2015-01-09  Pedro Alves  <palves@redhat.com>
6745
6746         * thread-db.c (find_new_threads_callback): Ignore thread if the
6747         kernel thread ID is -1.
6748
6749 2015-01-09  Pedro Alves  <palves@redhat.com>
6750
6751         * linux-low.c (linux_attach_fail_reason_string): Move to
6752         nat/linux-ptrace.c, and rename.
6753         (linux_attach_lwp): Update comment.
6754         (attach_proc_task_lwp_callback): New function.
6755         (linux_attach): Adjust to rename and use
6756         linux_proc_attach_tgid_threads.
6757         (linux_attach_fail_reason_string): Delete declaration.
6758
6759 2015-01-01  Joel Brobecker  <brobecker@adacore.com>
6760
6761         * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6762         * server.c (gdbserver_version): Likewise.
6763
6764 2014-12-29  Sergio Durigan Junior  <sergiodj@redhat.com>
6765
6766         * remote-utils.c: Include ctype.h.
6767         (input_interrupt): Explicitly handle the case when the char
6768         received is the NUL byte.  Improve the printing of non-ASCII
6769         characters.
6770
6771 2014-12-16  Joel Brobecker  <brobecker@adacore.com>
6772
6773         * linux-low.c (linux_low_filter_event): Update call to
6774         linux_enable_event_reporting following the addition of
6775         a new parameter to that function.
6776
6777 2014-12-16  Catalin Udma  <catalin.udma@freescale.com>
6778
6779         PR server/17457
6780         * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6781         (AARCH64_FPCR_REGNO): Likewise.
6782         (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6783         (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6784         (aarch64_store_fpregset): Likewise.
6785
6786 2014-12-15  Joel Brobecker  <brobecker@adacore.com>
6787
6788         * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6789         Remove FIXME comment about assumption about N.
6790
6791 2014-12-13  Joel Brobecker  <brobecker@adacore.com>
6792
6793         * configure.ac: If large-file support is disabled in GDBserver,
6794         pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6795         * configure: Regenerate.
6796
6797 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6798
6799         * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6800         warning upon ENODATA from ptrace.
6801         * linux-s390-low.c (s390_store_tdb): New.
6802         (s390_regsets): Add regset for NT_S390_TDB.
6803
6804 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6805
6806         * linux-low.c (regsets_store_inferior_registers): Skip regsets
6807         without a fill_function.
6808         * linux-s390-low.c (s390_fill_last_break): Remove.
6809         (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6810         (s390_arch_setup): Use regset's size instead of fill_function for
6811         loop end condition.
6812
6813 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6814
6815         * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6816         the regset's store function when ptrace returned an error.
6817         * regcache.c (get_thread_regcache): Invalidate register cache
6818         before fetching inferior's registers.
6819
6820 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6821
6822         * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6823         while-loop as for-loop.
6824         (regsets_store_inferior_registers): Likewise.
6825
6826 2014-11-28  Yao Qi  <yao@codesourcery.com>
6827
6828         * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6829         * config.in, configure: Re-generate.
6830         * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6831         is defined.
6832
6833 2014-11-21  Yao Qi  <yao@codesourcery.com>
6834
6835         * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6836         (AC_CHECK_HEADERS): Remove malloc.h.
6837         * configure: Re-generated.
6838         * config.in: Re-generated.
6839         * server.h: Don't include alloca.h and malloc.h.
6840         * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6841         Don't include malloc.h.
6842
6843 2014-11-17  Joel Brobecker  <brobecker@adacore.com>
6844
6845         * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6846         corresponding ERRNO check in same block.
6847
6848 2014-11-12  Pedro Alves  <palves@redhat.com>
6849
6850         * server.c (cont_thread): Update comment.
6851         (start_inferior, attach_inferior): No longer clear cont_thread.
6852         (handle_v_cont): No longer set cont_thread.
6853         (captured_main): Clear cont_thread each time a GDB connects.
6854
6855 2014-11-12  Pedro Alves  <palves@redhat.com>
6856
6857         * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6858         thread, and don't resume all threads if the Hc thread has exited.
6859
6860 2014-11-12  Pedro Alves  <palves@redhat.com>
6861
6862         * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6863         the process group instead of to a specific LWP.
6864
6865 2014-10-15  Pedro Alves  <palves@redhat.com>
6866
6867         PR server/17487
6868         * win32-arm-low.c (arm_set_thread_context): Remove current_event
6869         parameter.
6870         (arm_set_thread_context): Delete.
6871         (the_low_target): Adjust.
6872         * win32-i386-low.c (debug_registers_changed)
6873         (debug_registers_used): Delete.
6874         (update_debug_registers_callback): New function.
6875         (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6876         needing to update their debug registers.
6877         (win32_get_current_dr): New function.
6878         (x86_dr_low_get_addr, x86_dr_low_get_control)
6879         (x86_dr_low_get_status): Fetch the debug register from the thread
6880         record's context.
6881         (i386_initial_stuff): Adjust.
6882         (i386_get_thread_context): Remove current_event parameter.  Don't
6883         clear debug_registers_changed nor copy DR values to
6884         debug_reg_state.
6885         (i386_set_thread_context): Delete.
6886         (i386_prepare_to_resume): New function.
6887         (i386_thread_added): Mark the thread as needing to update irs
6888         debug registers.
6889         (the_low_target): Remove i386_set_thread_context and install
6890         i386_prepare_to_resume.
6891         * win32-low.c (win32_get_thread_context): Adjust.
6892         (win32_set_thread_context): Use SetThreadContext
6893         directly.
6894         (win32_prepare_to_resume): New function.
6895         (win32_require_context): New function, factored out from ...
6896         (thread_rec): ... this.
6897         (continue_one_thread): Call win32_prepare_to_resume on each thread
6898         we're about to continue.
6899         (win32_resume): Call win32_prepare_to_resume on the event thread.
6900         * win32-low.h (struct win32_thread_info)
6901         <debug_registers_changed>: New field.
6902         (struct win32_target_ops): Change prototype of set_thread_context,
6903         delete set_thread_context and add prepare_to_resume.
6904         (win32_require_context): New declaration.
6905
6906 2014-10-08  Gary Benson  <gbenson@redhat.com>
6907
6908         * server.h: Do not include common-exceptions.h.
6909
6910 2014-10-08  Gary Benson  <gbenson@redhat.com>
6911
6912         * server.h: Do not include cleanups.h.
6913
6914 2014-09-30  James Hogan  <james.hogan@imgtec.com>
6915
6916         * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6917         mips64-dsp-linux.c.
6918
6919 2014-09-23  Yao Qi  <yao@codesourcery.com>
6920
6921         * linux-low.c (lp_status_maybe_breakpoint): New function.
6922         (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6923         (count_events_callback): Likewise.
6924         (select_event_lwp_callback): Likewise.
6925         (cancel_breakpoints_callback): Likewise.
6926
6927 2014-09-19  Don Breazeal  <donb@codesourcery.com>
6928
6929         * linux-low.c (handle_extended_wait): Call
6930         linux_ptrace_get_extended_event.
6931         (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6932         linux_is_extended_waitstatus.
6933
6934 2014-09-16  Joel Brobecker  <brobecker@adacore.com>
6935
6936         * Makefile.in (CPPFLAGS): Define.
6937         (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6938         (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6939
6940 2014-09-16  Gary Benson  <gbenson@redhat.com>
6941
6942         * inferiors.h (current_inferior): Renamed as...
6943         (current_thread): New variable.  All uses updated.
6944         * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6945         (maybe_move_out_of_jump_pad): Likewise.
6946         (cancel_breakpoint): Likewise.
6947         (linux_low_filter_event): Likewise.
6948         (wait_for_sigstop): Likewise.
6949         (linux_resume_one_lwp): Likewise.
6950         (need_step_over_p): Likewise.
6951         (start_step_over): Likewise.
6952         (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6953         * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6954         * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6955         and save_inferior as saved_thread.
6956         * regcache.c (get_thread_regcache): Renamed saved_inferior as
6957         saved_thread.
6958         (regcache_invalidate_thread): Likewise.
6959         * remote-utils.c (prepare_resume_reply): Likewise.
6960         * thread-db.c (thread_db_get_tls_address): Likewise.
6961         (disable_thread_event_reporting): Likewise.
6962         (remove_thread_event_breakpoints): Likewise.
6963         * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6964         as saved_thread.
6965         * target.h (set_desired_inferior): Renamed as...
6966         (set_desired_thread): New declaration.  All uses updated.
6967         * server.c (myresume): Updated comment to reference thread instead
6968         of inferior.
6969         (handle_serial_event): Likewise.
6970         (handle_target_event): Likewise.
6971
6972 2014-09-12  Tom Tromey  <tromey@redhat.com>
6973             Gary Benson  <gbenson@redhat.com>
6974
6975         * regcache.h: Include common-regcache.h.
6976         (regcache_read_pc): Don't declare.
6977         * regcache.c (get_thread_regcache_for_ptid): New function.
6978
6979 2014-09-11  Tom Tromey  <tromey@redhat.com>
6980             Gary Benson  <gbenson@redhat.com>
6981
6982         * symbol.c: New file.
6983         * Makefile.in (SFILES): Add symbol.c.
6984         (OBS): Add symbol.o.
6985
6986 2014-09-11  Gary Benson  <gbenson@redhat.com>
6987
6988         * target.c (target_stop_ptid, target_continue_ptid): New
6989         functions.
6990
6991 2014-09-11  Tom Tromey  <tromey@redhat.com>
6992             Gary Benson  <gbenson@redhat.com>
6993
6994         * target.h: Include target/target.h.
6995         * target.c (target_read_memory, target_read_uint32)
6996         (target_write_memory): New functions.
6997
6998 2014-09-11  Gary Benson  <gbenson@redhat.com>
6999
7000         * server.h (debug_hw_points): Don't declare.
7001         * server.c (debug_hw_points): Don't define.  Replace all uses
7002         with show_debug_regs.
7003         * linux-aarch64-low.c (debug_hw_points): Don't define.  Replace
7004         all uses with show_debug_regs.
7005
7006 2014-09-08  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
7007
7008         * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7009         endianness into account.
7010         (ppc_supply_ptrace_register): Likewise.
7011
7012 2014-09-03  James Hogan  <james.hogan@imgtec.com>
7013
7014         * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7015         to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7016
7017 2014-09-03  Gary Benson  <gbenson@redhat.com>
7018
7019         * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7020         ALL_DEBUG_ADDRESS_REGISTERS.
7021
7022 2014-09-02  Gary Benson  <gbenson@redhat.com>
7023
7024         * i386-low.h: Renamed as...
7025         * x86-low.h: New file.  All type, function and variable name
7026         prefixes changed from "i386_" to "x86_".  All references updated.
7027         * i386-low.c: Renamed as...
7028         * x86-low.c: New file.  All type, function and variable name
7029         prefixes changed from "i386_" to "x86_".  All references updated.
7030
7031 2014-09-02  Gary Benson  <gbenson@redhat.com>
7032
7033         * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7034         (x86_linux_new_thread): Likewise.
7035
7036 2014-08-29  Gary Benson  <gbenson@redhat.com>
7037
7038         * server.h (setjmp.h): Do not include.
7039         (toplevel): Do not declare.
7040         (common-exceptions.h): Include.
7041         (cleanups.h): Likewise.
7042         * server.c (toplevel): Do not define.
7043         (exit_code): New static global.
7044         (detach_or_kill_for_exit_cleanup): New function.
7045         (main): New function.  Original main renamed to...
7046         (captured_main): New function.
7047         * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7048
7049 2014-08-29  Gary Benson  <gbenson@redhat.com>
7050
7051         * Makefile.in (SFILES): Add common/common-exceptions.c.
7052         (OBS): Add common-exceptions.o.
7053         (common-exceptions.o): New rule.
7054         * utils.c (prepare_to_throw_exception): New function.
7055
7056 2014-08-29  Gary Benson  <gbenson@redhat.com>
7057
7058         * config.in: Regenerate.
7059         * configure: Likewise.
7060
7061 2014-08-29  Gary Benson  <gbenson@redhat.com>
7062
7063         * Makefile.in (SFILES): Add common/cleanups.c.
7064         (OBS): cleanups.o.
7065         (cleanups.o): New rule.
7066
7067 2014-08-29  Gary Benson  <gbenson@redhat.com>
7068
7069         * utils.c (internal_vwarning): New function.
7070
7071 2014-08-28  Gary Benson  <gbenson@redhat.com>
7072
7073         * utils.h (fatal): Remove declaration.
7074         * utils.c (fatal): Remove function.
7075
7076 2014-08-28  Gary Benson  <gbenson@redhat.com>
7077
7078         * tracepoint.c (gdb_agent_init): Replace fatal with
7079         perror_with_name.
7080         (initialize_tracepoint): Likewise.
7081
7082 2014-08-28  Gary Benson  <gbenson@redhat.com>
7083
7084         * remote-utils.c (remote_prepare): Replace fatal with error.
7085
7086 2014-08-28  Gary Benson  <gbenson@redhat.com>
7087
7088         * linux-low.c (linux_async): Replace fatal with warning.
7089         Tidy up and return.
7090         (linux_start_non_stop): Return -1 if linux_async failed.
7091
7092 2014-08-28  Gary Benson  <gbenson@redhat.com>
7093
7094         * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7095         gdb_assert.
7096         (i386_dr_low_get_addr): Remove vague comment.
7097         * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7098         gdb_assert.
7099
7100 2014-08-28  Gary Benson  <gbenson@redhat.com>
7101
7102         * inferiors.c (get_thread_process): Replace check with gdb_assert.
7103         * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7104         internal_error.
7105         (linux_resume_one_lwp): Likewise.
7106         * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7107         gdb_assert.
7108         * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7109         with internal_error.
7110         * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7111         (init_register_cache): Replace fatal with gdb_assert_not_reached.
7112         (find_register_by_name): Replace fatal with internal_error.
7113         (find_regno): Likewise.
7114         * tdesc.c (init_target_desc): Replace check with gdb_assert.
7115         * thread-db.c (thread_db_create_event): Likewise.
7116         (thread_db_load_search): Likewise.
7117         (try_thread_db_load_1): Likewise.
7118         * tracepoint.c (get_jump_space_head): Replace fatal with
7119         internal_error.
7120         (claim_trampoline_space): Likewise.
7121         (have_fast_tracepoint_trampoline_buffer): Likewise.
7122         (cmd_qtstart): Likewise.
7123         (stop_tracing): Likewise.
7124         (fast_tracepoint_collecting): Likewise.
7125         (target_malloc): Likewise.
7126         (download_tracepoint): Likewise.
7127         (download_trace_state_variables): Replace check with gdb_assert.
7128         (upload_fast_traceframes): Replace fatal with internal_error.
7129
7130 2014-08-19  Tom Tromey  <tromey@redhat.com>
7131             Gary Benson  <gbenson@redhat.com>
7132
7133         * Makefile.in (SFILES): Add common/common-debug.c.
7134         (OBS): Add common-debug.o.
7135         (common-debug.o): New rule.
7136         * debug.h (debug_printf): Don't declare.
7137         * debug.c (debug_printf): Renamed and rewritten as...
7138         (debug_vprintf): New function.
7139
7140 2014-08-19  Gary Benson  <gbenson@redhat.com>
7141
7142         * utils.h: Do not include print-utils.h.
7143
7144 2014-08-19  Tom Tromey  <tromey@redhat.com>
7145             Gary Benson  <gbenson@redhat.com>
7146
7147         * server.h: Add static assertion.
7148         (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7149
7150 2014-08-19  Tom Tromey  <tromey@redhat.com>
7151             Gary Benson  <gbenson@redhat.com>
7152
7153         * Makefile.in (SFILES): Add common/errors.c.
7154         (OBS): Add errors.o.
7155         (IPA_OBS): Add errors-ipa.o.
7156         (errors.o): New rule.
7157         (errors-ipa.o): Likewise.
7158         * utils.h (perror_with_name, error, warning): Don't declare.
7159         * utils.c (warning): Renamed and rewritten as...
7160         (vwarning): New function.
7161         (error): Renamed and rewritten as...
7162         (verror): New function.
7163         (internal_error): Renamed and rewritten as...
7164         (internal_verror): New function.
7165
7166 2014-08-07  Gary Benson  <gbenson@redhat.com>
7167
7168         * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7169         * configure: Regenerate.
7170         * config.in: Likewise.
7171         * server.h: Do not include errno.h.
7172         * event-loop.c: Likewise.
7173         * hostio-errno.c: Likewise.
7174         * linux-low.c: Likewise.
7175         * remote-utils.c: Likewise.
7176         * spu-low.c: Likewise.
7177         * utils.c: Likewise.
7178         * gdbreplay.c: Unconditionally include errno.h.
7179
7180 2014-08-07  Gary Benson  <gbenson@redhat.com>
7181
7182         * server.h: Do not include string.h.
7183         * event-loop.c: Likewise.
7184         * linux-low.c: Likewise.
7185         * regcache.c: Likewise.
7186         * remote-utils.c: Likewise.
7187         * spu-low.c: Likewise.
7188         * utils.c: Likewise.
7189
7190 2014-08-07  Gary Benson  <gbenson@redhat.com>
7191
7192         * server.h: Do not include gdb_assert.h.
7193
7194 2014-08-07  Gary Benson  <gbenson@redhat.com>
7195
7196         * server.h: Do not include common-utils.h.
7197
7198 2014-08-07  Gary Benson  <gbenson@redhat.com>
7199
7200         * server.h: Do not include ptid.h.
7201         * notif.h: Likewise.
7202
7203 2014-08-07  Gary Benson  <gbenson@redhat.com>
7204
7205         * server.h: Do not include gdb_locale.h.
7206
7207 2014-08-07  Gary Benson  <gbenson@redhat.com>
7208
7209         * server.h: Do not include gdb/signals.h.
7210         * win32-low.c: Likewise.
7211
7212 2014-08-07  Gary Benson  <gbenson@redhat.com>
7213
7214         * server.h: Do not include pathmax.h.
7215
7216 2014-08-07  Gary Benson  <gbenson@redhat.com>
7217
7218         * server.h: Do not include libiberty.h.
7219         * linux-bfin-low.c: Likewise.
7220
7221 2014-08-07  Gary Benson  <gbenson@redhat.com>
7222
7223         * server.h: Do not include ansidecl.h.
7224
7225 2014-08-07  Gary Benson  <gbenson@redhat.com>
7226
7227         * linux-x86-low.c: Do not include stddef.h.
7228         * lynx-ppc-low.c: Likewise.
7229         * tracepoint.c: Likewise.
7230
7231 2014-08-07  Gary Benson  <gbenson@redhat.com>
7232
7233         * server.h: Do not include stdarg.h.
7234         * nto-low.c: Likewise.
7235
7236 2014-08-07  Gary Benson  <gbenson@redhat.com>
7237
7238         * server.h: Do not include stdlib.h.
7239         * inferiors.c: Likewise.
7240         * linux-low.c: Likewise.
7241         * regcache.c: Likewise.
7242         * spu-low.c: Likewise.
7243         * tracepoint.c: Likewise.
7244         * utils.c: Likewise.
7245
7246 2014-08-07  Gary Benson  <gbenson@redhat.com>
7247
7248         * server.h: Do not include stdio.h.
7249         * linux-low.c: Likewise.
7250         * remote-utils.c: Likewise.
7251         * spu-low.c: Likewise.
7252         * utils.c: Likewise.
7253         * wincecompat.c: Likewise.
7254
7255 2014-08-06  Gary Benson  <gbenson@redhat.com>
7256
7257         * regcache.c (init_register_cache): Move conditionals inside if.
7258
7259 2014-08-06  Gary Benson  <gbenson@redhat.com>
7260
7261         * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7262
7263 2014-07-31  Gary Benson  <gbenson@redhat.com>
7264
7265         * ax.h: Do not include server.h.
7266         * gdbthread.h: Likewise.
7267         * lynx-low.h: Likewise.
7268         * notif.h: Likewise.
7269
7270 2014-07-30  Gary Benson  <gbenson@redhat.com>
7271
7272         * server.h: Include common-defs.h.
7273         Do not include config.h or build-gnulib-gdbserver/config.h.
7274
7275 2014-07-30  Gary Benson  <gbenson@redhat.com>
7276
7277         * hostio-errno.c: Move server.h to top of includes list.
7278         * inferiors.c: Likewise.
7279         * linux-x86-low.c: Likewise.
7280         * notif.c: Include server.h.
7281
7282 2014-07-24  Tom Tromey  <tromey@redhat.com>
7283             Gary Benson  <gbenson@redhat.com>
7284
7285         * server.h (CORE_ADDR): Now unsigned.
7286
7287 2014-07-16  Pedro Alves  <palves@redhat.com>
7288
7289         * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7290
7291 2014-07-15  Pedro Alves  <palves@redhat.com>
7292
7293         * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7294         copy.
7295
7296 2014-07-11  Pedro Alves  <palves@redhat.com>
7297
7298         * linux-low.c (kill_wait_lwp): New function, based on
7299         kill_one_lwp_callback, but use my_waitpid directly.
7300         (kill_one_lwp_callback, linux_kill): Use it.
7301
7302 2014-06-23  Pedro Alves  <palves@redhat.com>
7303
7304         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7305         before setting DR0..DR3.
7306
7307 2014-06-20  Gary Benson  <gbenson@redhat.com>
7308
7309         * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7310         * configure: Regenerated.
7311         * config.in: Likewise.
7312
7313 2014-06-20  Gary Benson  <gbenson@redhat.com>
7314
7315         * Makefile.in (SFILES): Update locations for files moved
7316         from common to nat.
7317         (object file files): Reordered.
7318
7319 2014-06-20  Gary Benson  <gbenson@redhat.com>
7320
7321         * i386-low.h (i386_dr_low_can_set_addr): Removed.
7322         (i386_dr_low_set_addr): Likewise.
7323         (i386_dr_low_get_addr): Likewise.
7324         (i386_dr_low_can_set_control): Likewise.
7325         (i386_dr_low_set_control): Likewise.
7326         (i386_dr_low_get_control): Likewise.
7327         (i386_dr_low_get_status): Likewise.
7328         (i386_get_debug_register_length): Likewise.
7329         * linux-x86-low.c (i386_dr_low_set_addr):
7330         Changed signature.  Made static.
7331         (i386_dr_low_get_addr): Likewise.
7332         (i386_dr_low_set_control): Likewise.
7333         (i386_dr_low_get_control): Likewise.
7334         (i386_dr_low_get_status): Likewise.
7335         (i386_dr_low): New global variable.
7336         * win32-i386-low.c (i386_dr_low_set_addr):
7337         Changed signature.  Made static.
7338         (i386_dr_low_get_addr): Likewise.
7339         (i386_dr_low_set_control): Likewise.
7340         (i386_dr_low_get_control): Likewise.
7341         (i386_dr_low_get_status): Likewise.
7342         (i386_dr_low): New global variable.
7343
7344 2014-06-20  Marcus Shawcroft  <marcus.shawcroft@arm.com>
7345
7346         * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7347         * Makefile.in (AR, AR_FLAGS): Define.
7348         * configure: Regenerate.
7349
7350 2014-06-19  Gary Benson  <gbenson@redhat.com>
7351
7352         * Makefile.in (i386-dregs.o): New rule.
7353         * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7354         * i386-low.c (target.h): Remove include.
7355         (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7356         (DR_CONTROL_SHIFT): Likewise.
7357         (DR_CONTROL_SIZE): Likewise.
7358         (DR_RW_EXECUTE): Likewise.
7359         (DR_RW_WRITE): Likewise.
7360         (DR_RW_READ): Likewise.
7361         (DR_RW_IORW): Likewise.
7362         (DR_LEN_1): Likewise.
7363         (DR_LEN_2): Likewise.
7364         (DR_LEN_4): Likewise.
7365         (DR_LEN_8): Likewise.
7366         (DR_LOCAL_ENABLE_SHIFT): Likewise.
7367         (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7368         (DR_ENABLE_SIZE): Likewise.
7369         (DR_LOCAL_SLOWDOWN): Likewise.
7370         (DR_GLOBAL_SLOWDOWN): Likewise.
7371         (DR_CONTROL_RESERVED): Likewise.
7372         (I386_DR_CONTROL_MASK): Likewise.
7373         (I386_DR_VACANT): Likewise.
7374         (I386_DR_LOCAL_ENABLE): Likewise.
7375         (I386_DR_GLOBAL_ENABLE): Likewise.
7376         (I386_DR_DISABLE): Likewise.
7377         (I386_DR_SET_RW_LEN): Likewise.
7378         (I386_DR_GET_RW_LEN): Likewise.
7379         (I386_DR_WATCH_HIT): Likewise.
7380         (i386_wp_op_t): Likewise.
7381         (i386_show_dr): Likewise.
7382         (i386_length_and_rw_bits): Likewise.
7383         (i386_insert_aligned_watchpoint): Likewise.
7384         (i386_remove_aligned_watchpoint): Likewise.
7385         (i386_handle_nonaligned_watchpoint): Likewise.
7386         i386_update_inferior_debug_regs(): Likewise.
7387         (i386_dr_insert_watchpoint): Likewise.
7388         (i386_dr_remove_watchpoint): Likewise.
7389         (i386_dr_region_ok_for_watchpoint): Likewise.
7390         (i386_dr_stopped_data_address): Likewise.
7391         (i386_dr_stopped_by_watchpoint): Likewise.
7392
7393 2014-06-19  Gary Benson  <gbenson@redhat.com>
7394
7395         * i386-low.c (i386_dr_show): Renamed to
7396         i386_show_dr and made static.  All uses updated.
7397         (i386_dr_length_and_rw_bits): Renamed to
7398         i386_length_and_rw_bits and made static.
7399         All uses updated.
7400         (i386_dr_insert_aligned_watchpoint): Renamed to
7401         i386_insert_aligned_watchpoint and made static.
7402         All uses updated.
7403         (i386_dr_remove_aligned_watchpoint): Renamed to
7404         i386_remove_aligned_watchpoint and made static.
7405         All uses updated.
7406         (i386_dr_update_inferior_debug_regs): Renamed to
7407         i386_update_inferior_debug_regs and made static.
7408         All uses updated.
7409
7410 2014-06-18  Gary Benson  <gbenson@redhat.com>
7411
7412         * i386-low.h (i386_dr_low_can_set_addr): New macro.
7413         (i386_dr_low_can_set_control): Likewise.
7414         (i386_get_debug_register_length): Likewise.
7415         * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7416         (i386_dr_low_can_set_control): Likewise.
7417         (i386_get_debug_register_length): Likewise.
7418
7419 2014-06-17  Gary Benson  <gbenson@redhat.com>
7420
7421         * i386-low.h (i386-dregs.h): New include.
7422         (DR_FIRSTADDR): Now in i386-dregs.h.
7423         (DR_LASTADDR): Likewise.
7424         (DR_NADDR): Likewise.
7425         (DR_STATUS): Likewise.
7426         (DR_CONTROL): Likewise.
7427         (i386_debug_reg_state): Likewise.
7428         (i386_dr_insert_watchpoint): Likewise.
7429         (i386_dr_remove_watchpoint): Likewise.
7430         (i386_dr_region_ok_for_watchpoint): Likewise.
7431         (i386_dr_stopped_data_address): Likewise.
7432         (i386_dr_stopped_by_watchpoint): Likewise.
7433         * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7434
7435 2014-06-18  Gary Benson  <gbenson@redhat.com>
7436
7437         * i386-low.h (i386_low_insert_watchpoint): Renamed to
7438         i386_dr_insert_watchpoint.
7439         (i386_low_remove_watchpoint): Renamed to
7440         i386_dr_remove_watchpoint.
7441         (i386_low_region_ok_for_watchpoint): Renamed to
7442         i386_dr_region_ok_for_watchpoint.
7443         (i386_low_stopped_data_address): Renamed to
7444         i386_dr_stopped_data_address.
7445         (i386_low_stopped_by_watchpoint): Renamed to
7446         i386_dr_stopped_by_watchpoint.
7447         * i386-low.c (i386_show_dr): Renamed to
7448         i386_dr_show and made nonstatic.  All uses updated.
7449         (i386_length_and_rw_bits): Renamed to
7450         i386_dr_length_and_rw_bits and made nonstatic.
7451         All uses updated.
7452         (i386_insert_aligned_watchpoint): Renamed to
7453         i386_dr_insert_aligned_watchpoint and made nonstatic.
7454         All uses updated.
7455         (i386_remove_aligned_watchpoint): Renamed to
7456         i386_dr_remove_aligned_watchpoint and made nonstatic.
7457         All uses updated.
7458         (i386_update_inferior_debug_regs): Renamed to
7459         i386_dr_update_inferior_debug_regs and made nonstatic.
7460         All uses updated.
7461         (i386_low_insert_watchpoint): Renamed to
7462         i386_dr_insert_watchpoint.  All uses updated.
7463         (i386_low_remove_watchpoint): Renamed to
7464         i386_dr_remove_watchpoint.  All uses updated.
7465         (i386_low_region_ok_for_watchpoint): Renamed to
7466         i386_dr_region_ok_for_watchpoint.  All uses updated.
7467         (i386_low_stopped_data_address): Renamed to
7468         i386_dr_stopped_data_address.  All uses updated.
7469         (i386_low_stopped_by_watchpoint): Renamed to
7470         i386_dr_stopped_by_watchpoint.  All uses updated.
7471
7472 2014-06-18  Gary Benson  <gbenson@redhat.com>
7473
7474         * i386-low.c (i386_dr_low_can_set_addr): New macro.
7475         (i386_dr_low_can_set_control): Likewise.
7476         (i386_insert_aligned_watchpoint): New check.
7477
7478 2014-06-18  Gary Benson  <gbenson@redhat.com>
7479
7480         * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7481         Renamed to state.
7482
7483 2014-06-18  Gary Benson  <gbenson@redhat.com>
7484
7485         * i386-low.c (i386_length_and_rw_bits): Use internal_error
7486         instead of fatal and error.
7487         (i386_handle_nonaligned_watchpoint): Likewise.
7488
7489 2014-06-18  Gary Benson  <gbenson@redhat.com>
7490
7491         * i386-low.c (i386_get_debug_register_length): New macro.
7492         (TARGET_HAS_DR_LEN_8): Remove conditional.  Use above macro.
7493         (i386_show_dr): Use debug_printf instead of fprintf.  Use
7494         phex to format values.
7495
7496 2014-06-18  Gary Benson  <gbenson@redhat.com>
7497
7498         * i386-low.h: Comment changes.
7499         * i386-low.c: Likewise.
7500
7501 2014-06-18  Gary Benson  <gbenson@redhat.com>
7502
7503         * i386-low.c: Whitespace changes.
7504
7505 2014-06-12  Tom Tromey  <tromey@redhat.com>
7506
7507         * utils.c (freeargv): Remove.
7508
7509 2014-06-12  Tom Tromey  <tromey@redhat.com>
7510
7511         * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7512         * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7513         (parse_debug_format_options): Likewise.
7514         (gdbserver_usage): Likewise.
7515         * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7516         (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7517         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7518         against libiberty.
7519         ($(LIBGNU)): Depend on libiberty.
7520         (all-lib): Recurse into all subdirs.
7521         (install-only): Invoke "install" target in subdirs.
7522         (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7523         targets.
7524         * configure: Rebuild.
7525         * configure.ac: Add ACX_CONFIGURE_DIR for libiberty.  Don't check
7526         for vasprintf, vsnprintf, or gettimeofday.
7527         * configure.srv: Don't add safe-ctype.o or lbasename.o to
7528         srv_tgtobj.
7529
7530 2014-06-05  Joel Brobecker  <brobecker@adacore.com>
7531
7532         * development.sh: Delete.
7533         * Makefile.in (config.status): Adjust dependency on development.sh.
7534         * configure.ac: Adjust development.sh source call.
7535         * configure: Regenerate.
7536
7537 2014-06-02  Pedro Alves  <palves@redhat.com>
7538
7539         * ax.c (gdb_free_agent_expr): New function.
7540         * ax.h (gdb_free_agent_expr): New declaration.
7541         * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7542         list.
7543         (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7544         static.
7545         (clear_breakpoint_conditions_and_commands): New function.
7546         * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7547         (clear_breakpoint_conditions_and_commands): New declaration.
7548
7549 2014-05-23  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
7550
7551         * linux-aarch64-low.c (asm/ptrace.h): Include.
7552
7553 2014-05-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
7554
7555         Fix TLS access for -static -pthread.
7556         * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7557         (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7558         (thread_db_load_search, try_thread_db_load_1): Initialize it.
7559
7560 2014-05-20  Pedro Alves  <palves@redhat.com>
7561
7562         * linux-aarch64-low.c (aarch64_insert_point)
7563         (aarch64_remove_point): No longer check whether the type is
7564         supported here.  Adjust to new interface.
7565         (the_low_target): Install aarch64_supports_z_point_type as
7566         supports_z_point_type method.
7567         * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7568         (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7569         instead of a Z packet char.  Adjust.
7570         (arm_supports_z_point_type): New function.
7571         (arm_insert_point, arm_remove_point): Adjust to new interface.
7572         (the_low_target): Install arm_supports_z_point_type.
7573         * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7574         (cris_insert_point, cris_remove_point): Adjust to new interface.
7575         Don't check whether the type is supported here.
7576         (the_low_target): Install cris_supports_z_point_type.
7577         * linux-low.c (linux_supports_z_point_type): New function.
7578         (linux_insert_point, linux_remove_point): Adjust to new interface.
7579         * linux-low.h (struct linux_target_ops) <insert_point,
7580         remove_point>: Take an enum raw_bkpt_type instead of a char.  Add
7581         raw_breakpoint pointer parameter.
7582         <supports_z_point_type>: New method.
7583         * linux-mips-low.c (mips_supports_z_point_type): New function.
7584         (mips_insert_point, mips_remove_point): Adjust to new interface.
7585         Use mips_supports_z_point_type.
7586         (the_low_target): Install mips_supports_z_point_type.
7587         * linux-ppc-low.c (the_low_target): Install NULL as
7588         supports_z_point_type method.
7589         * linux-s390-low.c (the_low_target): Install NULL as
7590         supports_z_point_type method.
7591         * linux-sparc-low.c (the_low_target): Install NULL as
7592         supports_z_point_type method.
7593         * linux-x86-low.c (x86_supports_z_point_type): New function.
7594         (x86_insert_point): Adjust to new insert_point interface.  Use
7595         insert_memory_breakpoint.  Adjust to new
7596         i386_low_insert_watchpoint interface.
7597         (x86_remove_point): Adjust to remove_point interface.  Use
7598         remove_memory_breakpoint.  Adjust to new
7599         i386_low_remove_watchpoint interface.
7600         (the_low_target): Install x86_supports_z_point_type.
7601         * lynx-low.c (lynx_target_ops): Install NULL as
7602         supports_z_point_type callback.
7603         * nto-low.c (nto_supports_z_point_type): New.
7604         (nto_insert_point, nto_remove_point): Adjust to new interface.
7605         (nto_target_ops): Install nto_supports_z_point_type.
7606         * mem-break.c: Adjust intro comment.
7607         (struct raw_breakpoint) <raw_type, size>: New fields.
7608         <inserted>: Update comment.
7609         <shlib_disabled>: Delete field.
7610         (enum bkpt_type) <gdb_breakpoint>: Delete value.
7611         <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7612         gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7613         (raw_bkpt_type_to_target_hw_bp_type): New function.
7614         (find_enabled_raw_code_breakpoint_at): New function.
7615         (find_raw_breakpoint_at): New type and size parameters.  Use them.
7616         (insert_memory_breakpoint): New function, based off
7617         set_raw_breakpoint_at.
7618         (remove_memory_breakpoint): New function.
7619         (set_raw_breakpoint_at): Reimplement.
7620         (set_breakpoint): New, based on set_breakpoint_at.
7621         (set_breakpoint_at): Reimplement.
7622         (delete_raw_breakpoint): Go through the_target->remove_point
7623         instead of assuming memory breakpoints.
7624         (find_gdb_breakpoint_at): Delete.
7625         (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7626         (find_gdb_breakpoint): New function.
7627         (set_gdb_breakpoint_at): Delete.
7628         (z_type_supported): New function.
7629         (set_gdb_breakpoint_1): New function, loosely based off
7630         set_gdb_breakpoint_at.
7631         (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7632         (delete_gdb_breakpoint_at): Delete.
7633         (delete_gdb_breakpoint_1): New function, loosely based off
7634         delete_gdb_breakpoint_at.
7635         (delete_gdb_breakpoint): New function.
7636         (clear_gdb_breakpoint_conditions): Rename to ...
7637         (clear_breakpoint_conditions): ... this.  Don't handle a NULL
7638         breakpoint.
7639         (add_condition_to_breakpoint): Make static.
7640         (add_breakpoint_condition): Take a struct breakpoint pointer
7641         instead of an address.  Adjust.
7642         (gdb_condition_true_at_breakpoint): Rename to ...
7643         (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7644         z_type parameter.
7645         (gdb_condition_true_at_breakpoint): Reimplement.
7646         (add_breakpoint_commands): Take a struct breakpoint pointer
7647         instead of an address.  Adjust.
7648         (gdb_no_commands_at_breakpoint): Rename to ...
7649         (gdb_no_commands_at_breakpoint_z_type): ... this.  Add z_type
7650         parameter.  Return true if no breakpoint was found.  Change debug
7651         output.
7652         (gdb_no_commands_at_breakpoint): Reimplement.
7653         (run_breakpoint_commands): Rename to ...
7654         (run_breakpoint_commands_z_type): ... this.  Add z_type parameter,
7655         and change return type to boolean.
7656         (run_breakpoint_commands): New function.
7657         (gdb_breakpoint_here): Also check for Z1 breakpoints.
7658         (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7659         breakpoint.  Go through the_target->remove_point instead of
7660         assuming memory breakpoint.
7661         (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7662         software and hardware breakpoints.
7663         (reinsert_raw_breakpoint): Go through the_target->insert_point
7664         instead of assuming memory breakpoint.
7665         (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7666         software and hardware breakpoints.
7667         (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7668         Check both software and hardware breakpoints.
7669         (validate_inserted_breakpoint): Assert the breakpoint is a
7670         software breakpoint.  Set the inserted flag to -1 instead of
7671         setting shlib_disabled.
7672         (delete_disabled_breakpoints): Adjust.
7673         (validate_breakpoints): Only validate software breakpoints.
7674         Adjust to inserted flag change.
7675         (check_mem_read, check_mem_write): Skip breakpoint types other
7676         than software breakpoints.  Adjust to inserted flag change.
7677         * mem-break.h (enum raw_bkpt_type): New enum.
7678         (raw_breakpoint, struct process_info): Forward declare.
7679         (Z_packet_to_target_hw_bp_type): Delete declaration.
7680         (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7681         (set_gdb_breakpoint, delete_gdb_breakpoint)
7682         (clear_breakpoint_conditions): New declarations.
7683         (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7684         (breakpoint_inserted_here): Update comment.
7685         (add_breakpoint_condition, add_breakpoint_commands): Replace
7686         address parameter with a breakpoint pointer parameter.
7687         (gdb_breakpoint_here): Update comment.
7688         (delete_gdb_breakpoint_at): Delete.
7689         (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7690         * server.c (process_point_options): Take a struct breakpoint
7691         pointer instead of an address.  Adjust.
7692         (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7693         delete_gdb_breakpoint.
7694         * spu-low.c (spu_target_ops): Install NULL as
7695         supports_z_point_type method.
7696         * target.h: Include mem-break.h.
7697         (struct target_ops) <prepare_to_access_memory>: Update comment.
7698         <supports_z_point_type>: New field.
7699         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7700         instead of a char.  Also take a raw breakpoint pointer.
7701         * win32-arm-low.c (the_low_target): Install NULL as
7702         supports_z_point_type.
7703         * win32-i386-low.c (i386_supports_z_point_type): New function.
7704         (i386_insert_point, i386_remove_point): Adjust to new interface.
7705         (the_low_target): Install i386_supports_z_point_type.
7706         * win32-low.c (win32_supports_z_point_type): New function.
7707         (win32_insert_point, win32_remove_point): Adjust to new interface.
7708         (win32_target_ops): Install win32_supports_z_point_type.
7709         * win32-low.h (struct win32_target_ops):
7710         <supports_z_point_type>: New method.
7711         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7712         instead of a char.  Also take a raw breakpoint pointer.
7713
7714 2014-05-20  Pedro Alves  <palves@redhat.com>
7715
7716         * mem-break.h: Include break-common.h.
7717         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7718         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7719         (Z_packet_to_target_hw_bp_type): New declaration.
7720         * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7721         * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7722         (Z_PACKET_ACCESS_WP): Delete macros.
7723         (Z_packet_to_hw_type): Delete function.
7724         * i386-low.h: Don't include break-common.h here.
7725         (Z_packet_to_hw_type): Delete declaration.
7726         * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7727         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7728         * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7729         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7730         * linux-aarch64-low.c: Don't include break-common.h here.
7731         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7732         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7733         (Z_packet_to_target_hw_bp_type): Delete function.
7734         * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7735         function.
7736         (mips_insert_point, mips_remove_point): Use
7737         Z_packet_to_target_hw_bp_type.
7738
7739 2014-05-20  Pedro Alves  <palves@redhat.com>
7740
7741         * linux-aarch64-low.c: Include break-common.h.
7742         (enum target_point_type): Delete.
7743         (Z_packet_to_point_type): Rename to ...
7744         (Z_packet_to_target_hw_bp_type): ... this, and return a
7745         target_hw_bp_type instead.
7746         (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7747         instead of an enum target_point_type.
7748         (aarch64_point_encode_ctrl_reg): Likewise.  Compute type mask from
7749         breakpoint type.
7750         (aarch64_dr_state_insert_one_point)
7751         (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7752         (aarch64_handle_aligned_watchpoint)
7753         (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7754         Take an enum target_hw_bp_type instead of an enum
7755         target_point_type.
7756         (aarch64_supports_z_point_type): New function.
7757         (aarch64_insert_point, aarch64_remove_point): Use it.  Adjust to
7758         use Z_packet_to_target_hw_bp_type.
7759
7760 2014-05-20  Joel Brobecker  <brobecker@adacore.com>
7761
7762         * configure.ac: Only use -Werror by default when DEVELOPMENT
7763         is true.
7764         * configure: Regenerate.
7765
7766 2014-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
7767
7768         Fix gdbserver qGetTLSAddr for x86_64 -m32.
7769         * linux-x86-low.c (X86_64_USER_REGS): New.
7770         (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7771
7772 2014-04-28  Yao Qi  <yao@codesourcery.com>
7773
7774         * Makefile.in (i386-avx512.c): Fix the typo of generated file
7775         name.
7776
7777 2014-04-25  Pedro Alves  <palves@redhat.com>
7778
7779         PR server/16255
7780         * linux-low.c (linux_attach_fail_reason_string): New function.
7781         (linux_attach_lwp): Delete.
7782         (linux_attach_lwp_1): Rename to ...
7783         (linux_attach_lwp): ... this.  Take a ptid instead of a pid as
7784         argument.  Remove "initial" parameter.  Return int instead of
7785         void.  Don't error or warn here.
7786         (linux_attach): Adjust to call linux_attach_lwp.  Call error on
7787         failure to attach to the tgid.  Call warning when failing to
7788         attach to an lwp.
7789         * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7790         argument.  Remove "initial" parameter.  Return int instead of
7791         void.  Don't error or warn here.
7792         (linux_attach_fail_reason_string): New declaration.
7793         * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7794         interface change.  Use linux_attach_fail_reason_string.
7795
7796 2014-04-24  Michael Sturm  <michael.sturm@mintel.com>
7797             Walfred Tedeschi  <walfred.tedeschi@intel.com>
7798
7799         * Makefile.in: Added rules to handle new files
7800         i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7801         amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7802         * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7803         (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7804         (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7805         (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7806         x32-avx512-linux.o.
7807         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7808         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7809         (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7810         i386/x32-avx512.xml.
7811         (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7812         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7813         i386/x32-avx512-linux.xml.
7814         * i387-fp.c (num_avx512_k_registers): New constant for number
7815         of K registers.
7816         (num_avx512_zmmh_low_registers): New constant for number of
7817         lower ZMM registers (0-15).
7818         (num_avx512_zmmh_high_registers): New constant for number of
7819         higher ZMM registers (16-31).
7820         (num_avx512_ymmh_registers): New contant for number of higher
7821         YMM registers (ymm16-31 added by avx521 on x86_64).
7822         (num_avx512_xmm_registers): New constant for number of higher
7823         XMM registers (xmm16-31 added by AVX512 on x86_64).
7824         (struct i387_xsave): Add space for AVX512 registers.
7825         (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7826         Add code to handle AVX512 registers.
7827         (i387_xsave_to_cache): Add code to handle AVX512 registers.
7828         * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7829         prototypei from generated file.
7830         (tdesc_amd64_avx512_linux): Likewise.
7831         (init_registers_x32_avx512_linux): Likewise.
7832         (tdesc_x32_avx512_linux): Likewise.
7833         (init_registers_i386_avx512_linux): Likewise.
7834         (tdesc_i386_avx512_linux): Likewise.
7835         (x86_64_regmap): Add AVX512 registers.
7836         (x86_linux_read_description): Add code to handle AVX512 XSTATE
7837         mask.
7838         (initialize_low_arch): Add code to initialize AVX512 registers.
7839
7840 2014-04-23  Pedro Alves  <palves@redhat.com>
7841
7842         * mem-break.c (find_gdb_breakpoint_at): Make static.
7843         * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7844
7845 2014-04-23  Pedro Alves  <palves@redhat.com>
7846
7847         * i386-low.c: Don't include break-common.h here.
7848         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7849         prototype to take target_hw_bp_type as argument instead of a Z
7850         packet char.
7851         * i386-low.h: Include break-common.h here.
7852         (Z_packet_to_hw_type): Declare.
7853         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7854         prototypes.
7855         * linux-x86-low.c (x86_insert_point): Convert the packet number to
7856         a target_hw_bp_type before calling i386_low_insert_watchpoint.
7857         (x86_remove_point): Convert the packet number to a
7858         target_hw_bp_type before calling i386_low_remove_watchpoint.
7859         * win32-i386-low.c (i386_insert_point): Convert the packet number
7860         to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7861         (i386_remove_point): Convert the packet number to a
7862         target_hw_bp_type before calling i386_low_remove_watchpoint.
7863
7864 2014-04-23  Pedro Alves  <palves@redhat.com>
7865
7866         * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7867
7868 2014-04-10  Pedro Alves  <palves@redhat.com>
7869
7870         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7871         Check if the condition or command is NULL before checking if the
7872         breakpoint is known.  On success, return true.
7873         * mem-break.h (add_breakpoint_condition): Document return.
7874         (add_breakpoint_commands): Add describing comment.
7875         * server.c (skip_to_semicolon): New function.
7876         (process_point_options): Use it.
7877
7878 2014-04-09  Pedro Alves  <palves@redhat.com>
7879
7880         * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7881         to lwpid_of.
7882
7883 2014-02-27  Pedro Alves  <palves@redhat.com>
7884
7885         PR 12702
7886         * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7887         macros.
7888         * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7889         output.
7890         (last_thread_of_process_p): Take a PID argument instead of a
7891         thread pointer.
7892         (linux_wait_for_lwp): Delete.
7893         (num_lwps, check_zombie_leaders, not_stopped_callback): New
7894         functions.
7895         (linux_low_filter_event): New function, party factored out from
7896         linux_wait_for_event.
7897         (linux_wait_for_event): Rename to ...
7898         (linux_wait_for_event_filtered): ... this.  Add new filter ptid
7899         argument.  Partly rewrite.  Always use waitpid(-1, WNOHANG) and
7900         sigsuspend.  Check for zombie leaders.
7901         (linux_wait_for_event): Reimplement as wrapper around
7902         linux_wait_for_event_filtered.
7903         (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED.  Assume that if
7904         a normal or signal exit is seen, it's the whole process exiting.
7905         (wait_for_sigstop): No longer a for_each_inferior callback.
7906         Rewrite on top of linux_wait_for_event_filtered.
7907         (stop_all_lwps): Call wait_for_sigstop directly.
7908         * server.c (resume, handle_target_event): Handle
7909         TARGET_WAITKIND_NO_RESUMED.
7910
7911 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
7912
7913         * win32-low.c (psapi_get_dll_name,
7914         * win32_CreateToolhelp32Snapshot): Delete.
7915         (win32_CreateToolhelp32Snapshot, win32_Module32First)
7916         (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7917         Delete.
7918         (handle_load_dll): Add function description.
7919         Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7920
7921 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
7922
7923         * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7924         Add comment.
7925         (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7926         base address when calling win32_add_one_solib.
7927         (handle_load_dll): Delete local variable load_addr.
7928         Remove 0x1000 offset applied to DLL base address when calling
7929         win32_add_one_solib.
7930         (handle_unload_dll): Add comment.
7931
7932 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
7933
7934         * win32-low.c (win32_add_all_dlls): Renames
7935         win32_ensure_ntdll_loaded.  Rewrite function documentation.
7936         Adjust implementation to always load all DLLs.
7937         Add 0x1000 offset to DLL base address when calling
7938         win32_add_one_solib.
7939         (child_initialization_done): New static global.
7940         (do_initial_child_stuff): Set child_initialization_done to
7941         zero during child initialization, and 1 after.  Replace call
7942         to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7943         Add comment.
7944         (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7945         (handle_unload_dll): Add function documentation.
7946         (get_child_debug_event): Ignore load and unload DLL events
7947         during child initialization.
7948
7949 2014-02-20  Doug Evans  <dje@google.com>
7950
7951         Remove global all_lwps.
7952         * inferiors.h (ptid_of): Move here from linux-low.h.
7953         (pid_of, lwpid_of): Ditto.
7954         * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7955         parameter is a struct thread_info * now.
7956         (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7957         directly.  Pass &all_threads to find_inferior instead of &all_lwps.
7958         (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7959         directly.
7960         (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7961         (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7962         * linux-arm-low.c (update_registers_callback): Update, "entry"
7963         parameter is a struct thread_info * now.
7964         Fetch lwpid from current_inferior directly.
7965         (arm_insert_point): Pass &all_threads to find_inferior instead of
7966         &all_lwps.
7967         (arm_remove_point): Ditto.
7968         (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7969         (arm_prepare_to_resume): Fetch pid from thread.
7970         (arm_read_description): Fetch lwpid from current_inferior directly.
7971         * linux-low.c (all_lwps): Delete.
7972         (delete_lwp): Delete call to remove_inferior.
7973         (handle_extended_wait): Fetch lwpid from thread.
7974         (add_lwp): Don't set lwp->entry.id.  Remove call to
7975         add_inferior_to_list.
7976         (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7977         (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7978         (kill_one_lwp_callback): Ditto.
7979         (linux_kill): Don't dereference NULL pointer.
7980         Fetch ptid,lwpid from thread.
7981         (get_detach_signal): Fetch ptid from thread.
7982         (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7983         Simplify call to regcache_invalidate_thread.
7984         (delete_lwp_callback): Update, "entry" parameter is a
7985         struct thread_info * now.  Fetch pid from thread.
7986         (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7987         (status_pending_p_callback): Update, "entry" parameter is a
7988         struct thread_info * now.  Fetch ptid from thread.
7989         (find_lwp_pid): Update, "entry" parameter is a
7990         struct thread_info * now.
7991         (linux_wait_for_lwp): Fetch pid from thread.
7992         (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7993         (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7994         (enqueue_one_deferred_signal): Fetch lwpid from thread.
7995         (dequeue_one_deferred_signal): Ditto.
7996         (cancel_breakpoint): Fetch ptid from current_inferior.
7997         (linux_wait_for_event): Pass &all_threads to find_inferior,
7998         not &all_lwps.  Fetch ptid, lwpid from thread.
7999         (count_events_callback): Update, "entry" parameter is a
8000         struct thread_info * now.
8001         (select_singlestep_lwp_callback): Ditto.
8002         (select_event_lwp_callback): Ditto.
8003         (cancel_breakpoints_callback): Ditto.
8004         (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8005         not &all_lwps.
8006         (select_event_lwp): Ditto.  Fetch ptid from event_thread.
8007         (unsuspend_one_lwp): Update, "entry" parameter is a
8008         struct thread_info * now.
8009         (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8010         not &all_lwps.
8011         (linux_stabilize_threads): Ditto.  And for for_each_inferior.
8012         Fetch lwpid from thread, not lwp.
8013         (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8014         Pass &all_threads to find_inferior, not &all_lwps.
8015         (send_sigstop): Fetch lwpid from thread, not lwp.
8016         (send_sigstop_callback): Update, "entry" parameter is a
8017         struct thread_info * now.
8018         (suspend_and_send_sigstop_callback): Ditto.
8019         (wait_for_sigstop): Ditto.  Fetch ptid, lwpid from thread, lwp.
8020         (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8021         struct thread_info * now.
8022         (move_out_of_jump_pad_callback): Ditto.  Fetch ptid, lwpid
8023         from thread, lwp.
8024         (lwp_running): Update, "entry" parameter is a
8025         struct thread_info * now.
8026         (stop_all_lwps): Fetch ptid from thread.
8027         Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8028         (linux_resume_one_lwp): Fetch lwpid from thread.
8029         (linux_set_resume_request): Update, "entry" parameter is a
8030         struct thread_info * now.  Fetch pid, lwpid from thread.
8031         (resume_status_pending_p): Update, "entry" parameter is a
8032         struct thread_info * now.
8033         (need_step_over_p): Ditto.  Fetch lwpid from thread.
8034         (start_step_over): Fetch lwpid from thread.
8035         (linux_resume_one_thread): Update, "entry" parameter is a
8036         struct thread_info * now.  Fetch lwpid from thread.
8037         (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8038         (proceed_one_lwp): Update, "entry" parameter is a
8039         struct thread_info * now.  Fetch lwpid from thread.
8040         (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8041         struct thread_info * now.
8042         (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8043         (unstop_all_lwps): Ditto.  Fetch lwpid from thread.
8044         (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8045         directly.
8046         (regsets_store_inferior_registers): Ditto.
8047         (fetch_register, store_register): Ditto.
8048         (linux_read_memory, linux_write_memory): Ditto.
8049         (linux_request_interrupt): Ditto.
8050         (linux_read_auxv): Ditto.
8051         (linux_xfer_siginfo): Ditto.
8052         (linux_qxfer_spu): Ditto.
8053         (linux_qxfer_libraries_svr4): Ditto.
8054         * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8055         moved to inferiors.h.
8056         (get_lwp): Delete.
8057         (get_thread_lwp): Update.
8058         (struct lwp_info): Delete member "entry".  Simplify comment for
8059         member "thread".
8060         (all_lwps): Delete.
8061         * linux-mips-low.c (mips_read_description): Fetch lwpid from
8062         current_inferior directly.
8063         (update_watch_registers_callback): Update, "entry" parameter is a
8064         struct thread_info * now.  Fetch pid from thread.
8065         (mips_linux_prepare_to_resume): Fetch ptid from thread.
8066         (mips_insert_point): Fetch lwpid from current_inferior.
8067         Pass &all_threads to find_inferior, not &all_lwps.
8068         (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8069         (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8070         directly.
8071         (mips_stopped_data_address): Ditto.
8072         * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8073         directly.
8074         * linux-tile-low.c (tile_arch_setup): Ditto.
8075         * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8076         (update_debug_registers_callback): Update, "entry" parameter is a
8077         struct thread_info * now.  Fetch pid from thread.
8078         (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8079         Pass &all_threads to find_inferior, not &all_lwps.
8080         (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8081         (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8082         Pass &all_threads to find_inferior, not &all_lwps.
8083         (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8084         (i386_dr_low_get_status): Ditto.
8085         (x86_linux_prepare_to_resume): Fetch ptid from thread.
8086         (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8087         (x86_linux_read_description): Ditto.
8088         * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8089
8090 2014-02-20  Doug Evans  <dje@google.com>
8091
8092         * inferiors.c (get_first_inferior): Fix buglet.
8093
8094 2014-02-19  Doug Evans  <dje@google.com>
8095
8096         * gdbthread.h (add_thread): Change result type to struct thread_info *.
8097         * inferiors.c (add_thread): Change result type to struct thread_info *.
8098         All callers updated.
8099         (add_lwp): Call add_thread here instead of in callers.
8100         All callers updated.
8101         * linux-low.h (get_lwp_thread): Rewrite.
8102         (struct lwp_info): New member "thread".
8103
8104 2014-02-19  Doug Evans  <dje@google.com>
8105
8106         * linux-low.c (add_lwp): Change result to struct lwp_info *.
8107         All callers updated.
8108
8109 2014-02-19  Doug Evans  <dje@google.com>
8110
8111         * inferiors.c (add_thread): Fix whitespace.
8112
8113 2014-02-19  Doug Evans  <dje@google.com>
8114
8115         * dll.c (clear_dlls): Replace accessing list implemention details
8116         with API function.
8117         * gdbthread.h (get_first_thread): Declare.
8118         * inferiors.c (for_each_inferior_with_data): New function.
8119         (get_first_thread): New function.
8120         (find_thread_ptid): Simplify.
8121         (get_first_inferior): New function.
8122         (clear_list): Delete.
8123         (one_inferior_p): New function.
8124         (clear_inferior_list): New function.
8125         (clear_inferiors): Update.
8126         * inferiors.h (for_each_inferior_with_data): Declare.
8127         (clear_inferior_list): Declare.
8128         (one_inferior_p): Declare.
8129         (get_first_inferior): Declare.
8130         * linux-low.c (linux_wait_for_event): Replace accessing list
8131         implemention details with API function.
8132         * server.c (target_running): Ditto.
8133         (accumulate_file_name_length): New function.
8134         (emit_dll_description): New function.
8135         (handle_qxfer_libraries): Replace accessing list implemention
8136         details with API function.
8137         (handle_qxfer_threads_worker): New function.
8138         (handle_qxfer_threads_proper): Replace accessing list implemention
8139         details with API function.
8140         (handle_query): Ditto.
8141         (visit_actioned_threads_callback_ftype): New typedef.
8142         (visit_actioned_threads_data): New struct.
8143         (visit_actioned_threads): Rewrite to be find_inferior callback.
8144         (resume): Call find_inferior.
8145         (handle_status): Replace accessing list implemention
8146         details with API function.
8147         (process_serial_event): Replace accessing list implemention details
8148         with API function.
8149         * target.c (set_desired_inferior): Replace accessing list implemention
8150         details with API function.
8151         * tracepoint.c (same_process_p): New function.
8152         (gdb_agent_about_to_close): Replace accessing list implemention
8153         details with API function.
8154         * win32-low.c (child_delete_thread): Replace accessing list
8155         implemention details with API function.
8156         (match_dll_by_basename): New function.
8157         (dll_is_loaded_by_basename): New function.
8158         (win32_ensure_ntdll_loaded): Replace accessing list implemention
8159         details call to dll_is_loaded_by_basename.
8160
8161 2014-02-19  Doug Evans  <dje@google.com>
8162
8163         * dll.h (struct dll_info): Add comment.
8164         * gdbthread.h (struct thread_info): Add comment.
8165         (current_ptid): Simplify.
8166         * inferiors.c (add_process): Update.
8167         (remove_process): Update.
8168         * inferiors.h (struct process_info): Rename member "head" to "entry".
8169         * linux-low.c (delete_lwp): Update.
8170         (add_lwp): Update.
8171         (last_thread_of_process_p): Update.
8172         (kill_one_lwp_callback, linux_kill): Update.
8173         (status_pending_p_callback): Update.
8174         (wait_for_sigstop): Update.  Simplify read of ptid.
8175         (start_step_over): Update.
8176         * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8177         (get_lwp_thread): Update.
8178         (struct lwp_info): Rename member "head" to "entry".
8179         * regcache.h (inferior_list_entry): Delete.
8180         * server.c (kill_inferior_callback): Update.
8181         (detach_or_kill_inferior_callback): Update.
8182         (print_started_pid): Update.
8183         (print_attached_pid): Update.
8184         (process_serial_event): Simplify read of ptid.
8185         * thread-db.c (thread_db_create_event): Update.
8186         (thread_db_get_tls_address): Update.
8187         * win32-low.c (current_inferior_ptid): Simplify.
8188
8189 2014-02-19  Tom Tromey  <tromey@redhat.com>
8190
8191         * target.h (struct target_ops) <supports_btrace>: Add target_ops
8192         argument.
8193         (target_supports_btrace): Update.
8194
8195 2014-02-14  Yao Qi  <yao@codesourcery.com>
8196
8197         * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8198         (rsp-low-ipa.o): New target.
8199
8200 2014-02-12  Tom Tromey  <tromey@redhat.com>
8201
8202         * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8203         convert_ascii_to_int.
8204         * regcache.c (registers_to_string): Likewise.
8205         * remote-utils.c (decode_M_packet): Likewise.
8206         * server.c (process_serial_event): Likewise.
8207
8208 2014-02-12  Tom Tromey  <tromey@redhat.com>
8209
8210         * server.c (handle_query, handle_v_run): Use hex2bin, not
8211         unhexify.
8212         * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8213
8214 2014-02-12  Tom Tromey  <tromey@redhat.com>
8215
8216         * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8217         convert_int_to_ascii.
8218         * regcache.c (registers_to_string, collect_register_as_string):
8219         Likewise.
8220         * remote-utils.c (look_up_one_symbol, relocate_instruction):
8221         Likewise.
8222         * server.c (process_serial_event): Likewise.
8223         * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8224         (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8225
8226 2014-02-12  Tom Tromey  <tromey@redhat.com>
8227
8228         * remote-utils.c (look_up_one_symbol, monitor_output): Use
8229         bin2hex, not hexify.
8230         * tracepoint.c (cmd_qtstatus): Likewise.
8231
8232 2014-02-12  Tom Tromey  <tromey@redhat.com>
8233
8234         * remote-utils.c (monitor_output): Pass explicit length to
8235         hexify.
8236
8237 2014-02-12  Tom Tromey  <tromey@redhat.com>
8238
8239         * tracepoint.c: Include rsp-low.h.
8240         * server.c: Include rsp-low.h.
8241         * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8242         (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8243         declare.
8244         * remote-utils.c: Include rsp-low.h.
8245         (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8246         (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8247         (convert_int_to_ascii, convert_ascii_to_int): Move to
8248         common/rsp-low.c.
8249         * regcache.c: Include rsp-low.h.
8250         * ax.c: Include rsp-low.h.
8251         * Makefile.in (SFILES): Add common/rsp-low.c.
8252         (OBS): Add rsp-low.o.
8253         (rsp-low.o): New target.
8254
8255 2014-02-12  Tom Tromey  <tromey@redhat.com>
8256
8257         * utils.h (pulongest, plongest, phex_nz): Don't declare.
8258         Include print-utils.h.
8259         * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8260         (plongest, thirty_two, phex_nz): Remove.
8261         * Makefile.in (SFILES): Add common/print-utils.c.
8262         (OBS): Add print-utils.o.
8263         (print-utils-ipa.o): New target.
8264         (print-utils.o): New target.
8265         (IPA_OBJS): Add print-utils-ipa.o.
8266
8267 2014-02-06  Tom Tromey  <tromey@redhat.com>
8268
8269         * Makefile.in (SFILES): Fix indentation.
8270
8271 2014-02-05  Doug Evans  <dje@google.com>
8272
8273         * linux-low.c (linux_wait_for_event): Improve comment.
8274         (linux_wait_1): Keep current_inferior in sync with event_child.
8275
8276 2014-01-22  Doug Evans  <dje@google.com>
8277
8278         * gdbthread.h (gdb_id_to_thread): Delete, unused.
8279
8280 2014-01-22  Doug Evans  <dje@google.com>
8281
8282         * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8283         * configure: Regenerate.
8284         * config.in: Regenerate.
8285         * Makefile.in (SFILES): Add debug.c.
8286         (OBS): Add debug.o.
8287         * debug.c: New file.
8288         * debug.h: New file.
8289         * linux-aarch64-low.c (*): Update all debugging printfs to use
8290         debug_printf instead of fprintf.
8291         * linux-arm-low.c (*): Ditto.
8292         * linux-cris-low.c (*): Ditto.
8293         * linux-crisv32-low.c (*): Ditto.
8294         * linux-m32r-low.c (*): Ditto.
8295         * linux-sparc-low.c (*): Ditto.
8296         * linux-x86.c (*): Ditto.
8297         * linux-low.c (*): Ditto.
8298         (linux_wait_1): Add calls to debug_enter, debug_exit.
8299         (linux_wait): Remove redundant debugging printf.
8300         (stop_all_lwps): Add calls to debug_enter, debug_exit.
8301         (linux_resume, unstop_all_lwps): Ditto.
8302         * mem-break.c (*): Update all debugging printfs to use
8303         debug_printf instead of fprintf.
8304         * remote-utils.c (*): Ditto.
8305         * thread-db.c (*): Ditto.
8306         * server.c #include <ctype.h>, "gdb_vecs.h".
8307         (debug_threads): Moved to debug.c.
8308         (*): Update all debugging printfs to use debug_printf instead of
8309         fprintf.
8310         (start_inferior): Replace call to fflush with call to debug_flush.
8311         (monitor_show_help): Mention set debug-format.
8312         (parse_debug_format_options): New function.
8313         (handle_monitor_command): Handle "monitor set debug-format".
8314         (gdbserver_usage): Mention --debug-format.
8315         (main): Parse --debug-format.
8316         * server.h (debug_threads): Declaration moved to debug.h.
8317         #include "debug.h".
8318         * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8319         trace_debug_1 that uses debug_printf.
8320         (tracepoint_look_up_symbols): Update all debugging printfs to use
8321         debug_printf instead of fprintf.
8322
8323 2014-01-20  Baruch Siach  <baruch@tkos.co.il>
8324
8325         * linux-xtensa-low.c: Include asm/ptrace.h instead of
8326         sys/ptrace.h.
8327
8328 2014-01-17  Pedro Alves  <palves@redhat.com>
8329
8330         PR build/16445
8331         * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8332         defined after including gdb_proc_service.h.
8333
8334 2014-01-16  Doug Evans  <dje@google.com>
8335
8336         * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8337         (match_dll): Use it.
8338
8339 2014-01-16  Markus Metzger  <markus.t.metzger@intel.com>
8340
8341         * target.h (target_ops) <read_btrace>: Change parameters and
8342         return type to allow error reporting.
8343         * server.c (handle_qxfer_btrace): Support delta reads.  Pass
8344         trace reading errors on.
8345         * linux-low.c (linux_low_read_btrace): Pass trace reading
8346         errors on.
8347         (linux_low_disable_btrace): New.
8348
8349 2014-01-15  Doug Evans  <dje@google.com>
8350
8351         * inferiors.c (thread_id_to_gdb_id): Delete.
8352         * inferiors.h (thread_id_to_gdb_id): Delete.
8353
8354 2014-01-13  Eli Zaretskii  <eliz@gnu.org>
8355
8356         * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8357         "-I$(srcdir)/../".  Fixes MinGW compilation errors with old GCC
8358         versions.
8359
8360 2014-01-08  Pedro Alves  <palves@redhat.com>
8361
8362         * server.c (handle_status): Don't discard previous queued stop
8363         replies or thread's pending status here.
8364         (main) <disconnection>: Do it here instead.
8365
8366 2014-01-08  Pedro Alves  <palves@redhat.com>
8367
8368         * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8369         * server.c (visit_actioned_threads, handle_pending_status): New
8370         function.
8371         (handle_v_cont): Factor out parts to ...
8372         (resume): ... this new function.  If in all-stop, and a thread
8373         being resumed has a pending status, report it without actually
8374         resuming.
8375         (myresume): Adjust to use the new 'resume' function.
8376         (clear_pending_status_callback, set_pending_status_callback)
8377         (find_status_pending_thread_callback): New functions.
8378         (handle_status): Handle the case of multiple threads having
8379         interesting statuses to report.  Report threads' real last signal
8380         instead of always reporting GDB_SIGNAL_TRAP.  Look for a thread
8381         with an interesting thread to report the status for, instead of
8382         always reporting the status of the first thread.
8383
8384 2014-01-01  Joel Brobecker  <brobecker@adacore.com>
8385
8386         * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8387         * gdbreplay.c (gdbreplay_version): Likewise.
8388
8389 2013-12-18  Yufeng Zhang  <yufeng.zhang@arm.com>
8390
8391         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8392         iov.iov_len with the real length in use.
8393
8394 2013-12-13  Joel Brobecker  <brobecker@adacore.com>
8395
8396         * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8397         * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8398         for all targets that use win32-low.c.
8399         * win32-low.c (win32_ensure_ntdll_loaded): New function.
8400         (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8401
8402 2013-12-13  Pedro Alves  <palves@redhat.com>
8403
8404         * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8405         if equal to TARGET_WAITKIND_LOADED.
8406         * win32-low.c (cached_status): New static global.
8407         (win32_wait): Add declaration.
8408         (do_initial_child_stuff): Flush all initial pending debug events
8409         up to the initial breakpoint.
8410         (win32_wait): If CACHED_STATUS was set, return that instead
8411         of doing a real wait.  Remove the code resuming the execution
8412         of the inferior after receiving a TARGET_WAITKIND_LOADED event
8413         during the initial phase.  Also remove the code changing
8414         OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8415         TARGET_WAITKIND_STOPPED.
8416
8417 2013-12-11  Yao Qi  <yao@codesourcery.com>
8418
8419         * notif.c (handle_notif_ack): Return 0 if no notification
8420         matches.
8421
8422 2013-11-20  Doug Evans  <dje@google.com>
8423
8424         * linux-low.c (linux_set_resume_request): Fix comment.
8425
8426 2013-11-20  Doug Evans  <dje@google.com>
8427
8428         * linux-low.c (resume_status_pending_p): Tweak comment.
8429
8430 2013-11-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
8431
8432         * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8433         amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8434         * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8435         (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8436         (srv_amd64_regobj): Add amd64-mpx.o.
8437         (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8438         (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8439         (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8440         * i387-fp.c (num_pl_bnd_register) Added constant.
8441         (num_pl_bnd_cfg_registers) Added constant.
8442         (struct i387_xsave) Added reserved area and MPX fields.
8443         (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8444         * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8445         function.
8446         (tdesc_i386_mpx_linux): Add MPX amd64 target.
8447         (init_registers_amd64_mpx_linux): Declare new function.
8448         (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8449         (x86_64_regmap): Add MPX registers.
8450         (x86_linux_read_description): Add MPX case.
8451         (initialize_low_arch): Initialize MPX targets.
8452
8453 2013-11-18  Tom Tromey  <tromey@redhat.com>
8454
8455         * configure: Rebuild.
8456         * configure.ac: Don't check for stdlib.h.
8457         * gdbreplay.c: Unconditionally include stdlib.h.
8458
8459 2013-11-18  Tom Tromey  <tromey@redhat.com>
8460
8461         * config.in: Rebuild.
8462         * configure: Rebuild.
8463         * configure.ac: Don't use AC_HEADER_DIRENT.
8464
8465 2013-11-18  Tom Tromey  <tromey@redhat.com>
8466
8467         * server.h: Don't check HAVE_STRING_H.
8468         * gdbreplay.c: Don't check HAVE_STRING_H.
8469         * configure: Rebuild.
8470
8471 2013-11-18  Tom Tromey  <tromey@redhat.com>
8472
8473         * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8474         LIBGNU.
8475
8476 2013-11-08  Tom Tromey  <tromey@redhat.com>
8477
8478         * configure, config.in: Rebuild.
8479         * configure.ac: Remove unused configury.
8480
8481 2013-11-08  Tom Tromey  <tromey@redhat.com>
8482
8483         * acinclude.m4: Include common.m4, codeset.m4.
8484         * configure, config.in: Rebuild.
8485         * configure.ac: Use GDB_AC_COMMON.
8486
8487 2013-11-06  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8488
8489         * linux-s390-low.c (HWCAP_S390_TE): New define.
8490         (s390_arch_setup): Consider the TE field in the HWCAP for
8491         determining 'have_regset_tdb'.
8492
8493 2013-10-16  Sergio Durigan Junior  <sergiodj@redhat.com>
8494
8495         PR gdb/16014
8496         * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8497         call to sizeof.
8498
8499 2013-10-02  Pedro Alves  <palves@redhat.com>
8500
8501         * server.c (process_serial_event): Don't output "GDBserver
8502         exiting" if GDB is connected through stdio.
8503         * target.c (mywait): Likewise, be silent if GDB is connected
8504         through stdio.
8505
8506 2013-10-01  Joel Brobecker  <brobecker@adacore.com>
8507
8508         * lynx-low.c (lynx_add_threads_after_attach): New function.
8509         (lynx_attach): Remove call to add_thread.  Add call to
8510         lynx_add_threads_after_attach instead.
8511
8512 2013-09-28  Mike Frysinger  <vapier@gentoo.org>
8513
8514         * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8515         * config.in, configure: Regenerated.
8516
8517 2013-09-18  Yao Qi  <yao@codesourcery.com>
8518
8519         PR server/15959
8520         * server.c (start_inferior): Clear 'resume_info'.
8521
8522 2013-09-16  Jiong Wang  <jiwang@tilera.com>
8523
8524         * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8525         for each register.
8526
8527 2013-09-16  Jiong Wang  <jiwang@tilera.com>
8528
8529         * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8530         linux-tile-low.o to srv_tgtobj.
8531
8532 2013-09-16  Will Newton  <will.newton@linaro.org>
8533
8534         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8535         out regs.
8536
8537 2013-09-06  Pedro Alves  <palves@redhat.com>
8538
8539         * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8540         (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8541         (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8542         (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8543         (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8544         (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8545
8546 2013-09-06  Pedro Alves  <palves@redhat.com>
8547
8548         * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8549         explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8550
8551 2013-09-06  Pedro Alves  <palves@redhat.com>
8552
8553         * linux-amd64-ipa.c: Include tracepoint.h.
8554         * linux-i386-ipa.c: Include tracepoint.h.
8555
8556 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
8557
8558         * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8559         (ps_get_thread_area): New function.
8560
8561 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
8562
8563         * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8564         (initialize_low_arch): Call init_registers_crisv32 rather than
8565         init_register_crisv32.
8566
8567 2013-09-05  Pedro Alves  <palves@redhat.com>
8568
8569         * server.h (handle_vFile, hostio_last_error_from_errno): Move
8570         to ...
8571         * hostio.h: ... this new file.
8572         * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8573         win32-low.c: Include hostio.h.
8574
8575 2013-09-05  Pedro Alves  <palves@redhat.com>
8576
8577         * server.h (gdb_client_data, handler_func, callback_handler_func)
8578         (delete_file_handler, add_file_handler, append_callback_event)
8579         (delete_callback_event, start_event_loop, initialize_event_loop):
8580         Move to event-loop.h and include it.
8581         * event-loop.h: New file.
8582
8583 2013-09-05  Pedro Alves  <palves@redhat.com>
8584
8585         * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8586         * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8587         (loaded_dll, unloaded_dll): Move to ...
8588         * dll.h: ... this new file.
8589         * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8590
8591 2013-09-05  Pedro Alves  <palves@redhat.com>
8592
8593         * server.h (current_process, get_thread_process, all_processes)
8594         (add_inferior_to_list, for_each_inferior, current_inferior)
8595         (remove_inferior, add_process, remove_process, find_process_pid)
8596         (have_started_inferiors_p, have_attached_inferiors_p)
8597         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8598         (clear_inferiors, find_inferior, find_inferior_id)
8599         (inferior_target_data, set_inferior_target_data)
8600         (inferior_regcache_data, set_inferior_regcache_data): Move to
8601         inferiors.h, and include it.
8602         * inferiors.h: New file.
8603
8604 2013-09-05  Pedro Alves  <palves@redhat.com>
8605
8606         * server.h (struct emit_ops, current_insn_ptr, emit_error):
8607         Move ...
8608         * ax.h: ... here.
8609
8610 2013-09-05  Pedro Alves  <palves@redhat.com>
8611
8612         * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8613         tracepoint.h.
8614         * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8615         (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8616         (handle_tracepoint_general_set, handle_tracepoint_query)
8617         (tracepoint_finished_step, tracepoint_was_hit)
8618         (release_while_stepping_state_list, current_traceframe)
8619         (in_readonly_region, traceframe_read_mem)
8620         (fetch_traceframe_registers, traceframe_read_sdata)
8621         (traceframe_read_info, struct fast_tpoint_collect_status)
8622         (fast_tracepoint_collecting, force_unlock_trace_buffer)
8623         (handle_tracepoit_bkpts, initialize_low_tracepoint)
8624         (supply_fast_tracepoint_registers)
8625         (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8626         (ipa_tdesc, claim_trampoline_space)
8627         (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8628         (agent_mem_read, agent_get_trace_state_variable_value)
8629         (agent_set_trace_state_variable_value, agent_tsv_read)
8630         (agent_mem_read_string, get_raw_reg_func_addr)
8631         (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8632         * tracepoint.h: ... this new file.
8633
8634 2013-09-05  Pedro Alves  <palves@redhat.com>
8635
8636         * server.h (perror_with_name, error, fatal, warning, paddress)
8637         (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8638         include it.
8639         * utils.h: New file.
8640
8641 2013-09-05  Pedro Alves  <palves@redhat.com>
8642
8643         * server.h (remote_debug, noack_mode, transport_is_reliable)
8644         (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8645         (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8646         (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8647         (write_enn, initialize_async_io, enable_async_io)
8648         (disable_async_io, check_remote_input_interrupt_request)
8649         (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8650         (dead_thread_notify, prepare_resume_reply)
8651         (decode_address_to_semicolon, decode_address, decode_m_packet)
8652         (decode_M_packet, decode_X_packet, decode_xfer_write)
8653         (decode_search_memory_packet, unhexify, hexify)
8654         (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8655         (look_up_one_symbol, relocate_instruction)
8656         (monitor_output): Move to remote-utils.h, and include it.
8657         * remote-utils.h: New file.
8658
8659 2013-09-05  Pedro Alves  <palves@redhat.com>
8660
8661         * server.h (_): Delete.
8662
8663 2013-09-02  Pedro Alves  <palves@redhat.com>
8664
8665         * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8666         (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8667         allocated.
8668         (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8669
8670 2013-09-02  Pierre Muller  <muller@sourceware.org>
8671
8672         * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8673         or WriteProcessMemory complete successfully and handle
8674         ERROR_PARTIAL_COPY error.
8675
8676 2013-09-02  Pedro Alves  <palves@redhat.com>
8677
8678         * server.c (gdb_read_memory): Return -1 on traceframe memory read
8679         error instead of EIO.
8680
8681 2013-08-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
8682
8683         PR server/15604
8684         * linux-low.c: Include filestuff.h.
8685         (linux_create_inferior) <pid == 0>: Call close_most_fds.
8686         * lynx-low.c: Include filestuff.h.
8687         (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8688         * server.c: Include filestuff.h.
8689         (main): Call notice_open_fds.
8690         * spu-low.c: Include filestuff.h.
8691         (spu_create_inferior) <pid == 0>: Call close_most_fds.
8692
8693 2013-08-22  Luis Machado  <lgustavo@codesourcery.com>
8694
8695         * Makefile.in: Explain why ../target and ../nat are not
8696         listed as include file search paths.
8697         (linux-waitpid.o): New object file rule.
8698         * configure.srv (srv_native_linux_obj): New variable.
8699         Replace all occurrences of linux native object files with
8700         $srv_native_linux_obj.
8701         * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8702         (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8703         (linux_enable_event_reporting): Remove declaration.
8704         (my_waitpid): Moved to common/linux-waitpid.c.
8705         (linux_wait_for_event): Pass ptid when calling
8706         linux_enable_event_reporting.
8707         (linux_supports_tracefork_flag): Remove.
8708         (linux_enable_event_reporting): Likewise.
8709         (linux_tracefork_grandchild): Remove.
8710         (STACK_SIZE): Moved to common/linux-ptrace.c.
8711         (linux_tracefork_child): Remove.
8712         (linux_test_for_tracefork): Remove.
8713         (linux_look_up_symbols): Call linux_supports_traceclone.
8714         (initialize_low): Remove call to linux_test_for_tracefork.
8715         * linux-low.h (PTRACE_TYPE_ARG3): Move to
8716         common/linux-ptrace.h.
8717         (PTRACE_TYPE_ARG4): Likewise.
8718         Include linux-ptrace.h.
8719
8720 2013-08-21  Pedro Alves  <palves@redhat.com>
8721
8722         * config.in: Renegerate.
8723
8724 2013-08-19  Luis Machado  <lgustavo@codesourcery.com>
8725
8726         * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8727         (SFILES): Remove $(srcdir)/common/target-common.c and
8728         add $(srcdir)/target/waitstatus.c.
8729         (OBS): Remove target-common.o and add waitstatus.o.
8730         (server_h): Remove $(srcdir)/../common/target-common.h and
8731         add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8732         and $(srcdir)/../target/waitstatus.h.
8733         (target-common.o): Remove.
8734         (waitstatus.o): New target object file.
8735         * target.h: Do not include target-common.h and
8736         include target/resume.h, target/wait.h and
8737         target/waitstatus.h.
8738
8739 2013-08-13  Luis Machado  <lgustavo@codesourcery.com>
8740
8741         * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8742         to PTRACE_TYPE_ARG3.
8743         * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8744         to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8745         PTRACE_TYPE_ARG4.
8746         * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8747         (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8748
8749 2013-07-27  Jie Zhang  <jie@codesourcery.com>
8750             Daniel Jacobowitz  <dan@codesourcery.com>
8751             Yao Qi  <yao@codesourcery.com>
8752
8753         * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8754         (mips-linux-watch.o): New rule.
8755         (mips_linux_watch_h): New variable.
8756         * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8757         srv_tgtobj.
8758         * linux-mips-low.c: Include mips-linux-watch.h.
8759         (struct arch_process_info, struct arch_lwp_info): New.
8760         (update_watch_registers_callback): New function.
8761         (mips_linux_new_process, mips_linux_new_thread) New functions.
8762         (mips_linux_prepare_to_resume, mips_insert_point): New
8763         functions.
8764         (mips_remove_point, mips_stopped_by_watchpoint): New
8765         functions.
8766         (rsp_bp_type_to_target_hw_bp_type): New function.
8767         (mips_stopped_data_address): New function.
8768         (the_low_target): Add watchpoint support functions.
8769
8770 2013-07-27  Yao Qi  <yao@codesourcery.com>
8771
8772         * i386-low.c: Include break-common.h.
8773         (enum target_hw_bp_type): Remove.
8774
8775 2013-07-24  Luis Machado  <lgustavo@codesourcery.com>
8776
8777         * Makefile.in (SFILES): /common/target-common.c.
8778         (OBS): Add target-common.o.
8779         (server_h): Add $(srcdir)/../common/target-common.h.
8780         (target-common.o): New target.
8781         * server.c (queue_stop_reply_callback): Free
8782         status string after use.
8783         * target.c (target_waitstatus_to_string): Remove.
8784         * target.h: Include target-common.h.
8785         (resume_kind): Likewise.
8786         (target_waitkind): Likewise.
8787         (target_waitstatus): Likewise.
8788         (TARGET_WNOHANG): Likewise.
8789
8790 2013-07-04  Yao Qi  <yao@codesourcery.com>
8791
8792         * Makefile.in (host_alias): Use @host_noncanonical@.
8793         (target_alias): Use @target_noncanonical@.
8794         * configure.ac: Use ACX_NONCANONICAL_TARGET and
8795         ACX_NONCANONICAL_HOST.
8796         * configure: Regenerated.
8797
8798         Revert:
8799         2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
8800
8801         * configure.ac (version_host, version_target): Set and AC_SUBST them.
8802         * configure: Rebuild.
8803         * Makefile.in (version_host, version_target): Get from configure.
8804         (version.c): Use $(version_host) and $(version_target).
8805
8806 2013-07-03  Pedro Alves  <palves@redhat.com>
8807
8808         * Makefile.in (config.status): Depend on development.sh.
8809         * acinclude.m4: Include libmcheck.m4.
8810         * configure: Regenerate.
8811
8812 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
8813
8814         * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8815         attribute inside the parentheses.
8816         (winapi_DebugSetProcessKillOnExit): Ditto.
8817         (winapi_DebugBreakProcess): Ditto.
8818         (winapi_GenerateConsoleCtrlEvent): Ditto.
8819
8820 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
8821
8822         * notif.h (notif_event): Add a dummy member to avoid compiler
8823         errors.
8824
8825 2013-07-01  Pedro Alves  <palves@redhat.com>
8826
8827         * hostio.c (HOSTIO_PATH_MAX): Define.
8828         (require_filename, handle_open, handle_unlink, handle_readlink):
8829         Use it.
8830
8831 2013-07-01  Pedro Alves  <palves@redhat.com>
8832
8833         * server.h: Include "pathmax.h".
8834         * linux-low.c: Don't include sys/param.h.
8835         (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8836         MAXPATHLEN.
8837         * win32-low.c: Don't include sys/param.h.
8838         (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8839
8840 2013-07-01  Pedro Alves  <palves@redhat.com>
8841
8842         * event-loop.c: Don't check HAVE_UNISTD_H before including
8843         <unistd.h>.
8844         * gdbreplay.c: Likewise.
8845         * remote-utils.c: Likewise.
8846         * server.c: Likewise.
8847         * configure.ac: Don't check for unistd.h.
8848         * configure: Regenerate.
8849
8850 2013-06-28  Tom Tromey  <tromey@redhat.com>
8851
8852         * Makefile.in (version.c): Use version.in, not
8853         common/version.in.
8854
8855 2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
8856
8857         * configure.ac (version_host, version_target): Set and AC_SUBST them.
8858         * configure: Rebuild.
8859         * Makefile.in (version_host, version_target): Get from configure.
8860         (version.c): Use $(version_host) and $(version_target).
8861
8862 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
8863
8864         Fix trace-status to output user name without trailing colon.
8865         * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8866
8867 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
8868
8869         Fix trace-status to output proper start-time and stop-time.
8870         * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8871         output start time and stop time in hex as gdb expects.
8872
8873 2013-06-26  Pedro Alves  <pedro@codesourcery.com>
8874
8875         * tracepoint.c (build_traceframe_info_xml): Output trace state
8876         variables present in the trace buffer.
8877
8878 2013-06-24  Tom Tromey  <tromey@redhat.com>
8879
8880         * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8881         create-version.sh.
8882         (version.o): Remove.
8883         * gdbreplay.c: Include version.h.
8884         (version, host_name): Don't declare.
8885         * server.h: Include version.h.
8886         (version, host_name): Don't declare.
8887
8888 2013-06-12  Pedro Alves  <palves@redhat.com>
8889
8890         * linux-x86-low.c (linux_is_elf64): Delete global.
8891         (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8892         with local linux_pid_exe_is_elf_64_file use.
8893
8894 2013-06-11  Pedro Alves  <palves@redhat.com>
8895
8896         * linux-low.c (regset_disabled, disable_regset): New functions.
8897         (regsets_fetch_inferior_registers)
8898         (regsets_store_inferior_registers): Use them.
8899         (initialize_regsets_info); Don't allocate the disabled_regsets
8900         array here.
8901         * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8902         comment.
8903
8904 2013-06-11  Pedro Alves  <palves@redhat.com>
8905
8906         * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8907         xmalloc.
8908
8909 2013-06-11  Pedro Alves  <palves@redhat.com>
8910
8911         * linux-x86-low.c (initialize_low_arch): Call
8912         init_registers_x32_avx_linux.
8913
8914 2013-06-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
8915
8916         Fix compatibility with Android Bionic.
8917         * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8918         it is not empty.
8919
8920 2013-06-07  Pedro Alves  <palves@redhat.com>
8921
8922         PR server/14823
8923         * Makefile.in (OBS): Add tdesc.o.
8924         (IPA_OBJS): Add tdesc-ipa.o.
8925         (tdesc-ipa.o): New rule.
8926         * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8927         interface.
8928         * linux-low.c (new_inferior): Delete.
8929         (disabled_regsets, num_regsets): Delete.
8930         (linux_add_process): Adjust to set the new per-process
8931         new_inferior flag.
8932         (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8933         (linux_wait_for_lwp): Adjust.  Only call arch_setup if the event
8934         was a stop.  When calling arch_setup, switch the current inferior
8935         to the thread that got an event.
8936         (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8937         (regsets_fetch_inferior_registers)
8938         (regsets_store_inferior_registers): New regsets_info parameter.
8939         Adjust to use it.
8940         (linux_register_in_regsets): New regs_info parameter.  Adjust to
8941         use it.
8942         (register_addr, fetch_register, store_register): New usrregs_info
8943         parameter.  Adjust to use it.
8944         (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8945         parameter regs_info.  Adjust to use it.
8946         (linux_fetch_registers): Get the current inferior's regs_info, and
8947         adjust to use it.
8948         (linux_store_registers): Ditto.
8949         [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8950         (initialize_low): Don't initialize the target_regsets here.  Call
8951         initialize_low_arch.
8952         * linux-low.h (target_regsets): Delete declaration.
8953         (struct regsets_info): New.
8954         (struct usrregs_info): New.
8955         (struct regs_info): New.
8956         (struct process_info_private) <new_inferior>: New field.
8957         (struct linux_target_ops): Delete the num_regs, regmap, and
8958         regset_bitmap fields.  New field regs_info.
8959         [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8960         * i387-fp.c (num_xmm_registers): Delete.
8961         (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8962         calls to new interface.
8963         (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8964         (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8965         Infer the number of xmm registers from the regcache's target
8966         description.
8967         * i387-fp.h (num_xmm_registers): Delete.
8968         * inferiors.c (add_thread): Don't install the thread's regcache
8969         here.
8970         * proc-service.c (gregset_info): Fetch the current inferior's
8971         regs_info.  Adjust to use it.
8972         * regcache.c: Include tdesc.h.
8973         (register_bytes, reg_defs, num_registers)
8974         (gdbserver_expedite_regs): Delete.
8975         (get_thread_regcache): If the thread doesn't have a regcache yet,
8976         create one, instead of aborting gdbserver.
8977         (regcache_invalidate_one): Rename to ...
8978         (regcache_invalidate_thread): ... this.
8979         (regcache_invalidate_one): New.
8980         (regcache_invalidate): Only invalidate registers of the current
8981         process.
8982         (init_register_cache): Add target_desc parameter, and use it.
8983         (new_register_cache): Ditto.  Assert the target description has a
8984         non zero registers_size.
8985         (regcache_cpy): Add assertions.  Adjust.
8986         (realloc_register_cache, set_register_cache): Delete.
8987         (registers_to_string, registers_from_string): Adjust.
8988         (find_register_by_name, find_regno, find_register_by_number)
8989         (register_cache_size): Add target_desc parameter, and use it.
8990         (free_register_cache_thread, free_register_cache_thread_one)
8991         (regcache_release, register_cache_size): New.
8992         (register_size): Add target_desc parameter, and use it.
8993         (register_data, supply_register, supply_register_zeroed)
8994         (supply_regblock, supply_register_by_name, collect_register)
8995         (collect_register_as_string, collect_register_by_name): Adjust.
8996         * regcache.h (struct target_desc): Forward declare.
8997         (struct regcache) <tdesc>: New field.
8998         (init_register_cache, new_register_cache): Add target_desc
8999         parameter.
9000         (regcache_invalidate_thread): Declare.
9001         (regcache_invalidate_one): Delete declaration.
9002         (regcache_release): Declare.
9003         (find_register_by_number, register_cache_size, register_size)
9004         (find_regno): Add target_desc parameter.
9005         (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9006         declarations.
9007         * remote-utils.c: Include tdesc.h.
9008         (outreg, prepare_resume_reply): Adjust.
9009         * server.c: Include tdesc.h.
9010         (gdbserver_xmltarget): Delete declaration.
9011         (get_features_xml, process_serial_event): Adjust.
9012         * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9013         declare.
9014         (struct process_info) <tdesc>: New field.
9015         (ipa_tdesc): Declare.
9016         * tdesc.c: New file.
9017         * tdesc.h: New file.
9018         * tracepoint.c: Include tdesc.h.
9019         [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9020         (get_context_regcache): Adjust to pass ipa_tdesc down.
9021         (do_action_at_tracepoint): Adjust to get the register cache size
9022         from the context regcache's description.
9023         (traceframe_walk_blocks): Adjust to get the register cache size
9024         from the current trace frame's description.
9025         (traceframe_get_pc): Adjust to get current trace frame's
9026         description and pass it down.
9027         (gdb_collect): Adjust to get the register cache size from the
9028         IPA's description.
9029         * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9030         (gdbserver_xmltarget): Delete.
9031         (initialize_low_tracepoint): Set the ipa's target description.
9032         * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9033         (initialize_low_tracepoint): Set the ipa's target description.
9034         * linux-x86-low.c: Include tdesc.h.
9035         [__x86_64__] (is_64bit_tdesc): New.
9036         (ps_get_thread_area, x86_get_thread_area): Use it.
9037         (i386_cannot_store_register): Rename to ...
9038         (x86_cannot_store_register): ... this.  Use is_64bit_tdesc.
9039         (i386_cannot_fetch_register): Rename to ...
9040         (x86_cannot_fetch_register): ... this.  Use is_64bit_tdesc.
9041         (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9042         to new interface.
9043         (target_regsets): Rename to ...
9044         (x86_regsets): ... this.
9045         (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9046         interface.
9047         (x86_siginfo_fixup): Use is_64bit_tdesc.
9048         [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9049         (tdesc_x32_avx_linux, tdesc_x32_linux)
9050         (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9051         Declare.
9052         (x86_linux_update_xmltarget): Delete.
9053         (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9054         (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9055         (AMD64_LINUX_USER64_CS): New.
9056         (x86_linux_read_description): New, based on
9057         x86_linux_update_xmltarget.
9058         (same_process_callback): New.
9059         (x86_arch_setup_process_callback): New.
9060         (x86_linux_update_xmltarget): New.
9061         (x86_regsets_info): New.
9062         (amd64_linux_regs_info): New.
9063         (i386_linux_usrregs_info): New.
9064         (i386_linux_regs_info): New.
9065         (x86_linux_regs_info): New.
9066         (x86_arch_setup): Reimplement.
9067         (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9068         (x86_emit_ops): Ditto.
9069         (the_low_target): Adjust.  Install x86_linux_regs_info,
9070         x86_cannot_fetch_register, and x86_cannot_store_register.
9071         (initialize_low_arch): New.
9072         * linux-ia64-low.c (tdesc_ia64): Declare.
9073         (ia64_fetch_register): Adjust.
9074         (ia64_usrregs_info, regs_info): New globals.
9075         (ia64_regs_info): New function.
9076         (the_low_target): Adjust.
9077         (initialize_low_arch): New function.
9078         * linux-sparc-low.c (tdesc_sparc64): Declare.
9079         (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9080         Adjust.
9081         (sparc_arch_setup): New function.
9082         (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9083         (the_low_target): Adjust.
9084         (initialize_low_arch): New function.
9085         * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9086         (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9087         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9088         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9089         (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9090         (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9091         (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9092         (tdesc_powerpc_isa205_vsx64l): Declare.
9093         (ppc_cannot_store_register, ppc_collect_ptrace_register)
9094         (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9095         (ppc_set_pc, ppc_get_hwcap): Adjust.
9096         (ppc_usrregs_info): Forward declare.
9097         (!__powerpc64__) ppc_regmap_adjusted: New global.
9098         (ppc_arch_setup): Adjust to the current process'es target
9099         description.
9100         (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9101         (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9102         (ppc_store_evrregset): Adjust.
9103         (target_regsets): Rename to ...
9104         (ppc_regsets): ... this, and make static.
9105         (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9106         (ppc_regs_info): New function.
9107         (the_low_target): Adjust.
9108         (initialize_low_arch): New function.
9109         * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9110         (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9111         (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9112         (tdesc_s390x_linux64v2): Declare.
9113         (s390_collect_ptrace_register, s390_supply_ptrace_register)
9114         (s390_fill_gregset, s390_store_last_break): Adjust.
9115         (target_regsets): Rename to ...
9116         (s390_regsets): ... this, and make static.
9117         (s390_get_pc, s390_set_pc): Adjust.
9118         (s390_get_hwcap): New target_desc parameter, and use it.
9119         [__s390x__] (have_hwcap_s390_high_gprs): New global.
9120         (s390_arch_setup): Adjust to set the current process'es target
9121         description.  Don't adjust the regmap.
9122         (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9123         [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9124         (regs_info_3264): New globals.
9125         (s390_regs_info): New function.
9126         (the_low_target): Adjust.
9127         (initialize_low_arch): New function.
9128         * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9129         (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9130         [__mips64] (init_registers_mips_linux)
9131         (init_registers_mips_dsp_linux): Delete defines.
9132         [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9133         (have_dsp): New global.
9134         (mips_read_description): New, based on mips_arch_setup.
9135         (mips_arch_setup): Reimplement.
9136         (get_usrregs_info): New function.
9137         (mips_cannot_fetch_register, mips_cannot_store_register)
9138         (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9139         (mips_fill_fpregset, mips_store_fpregset): Adjust.
9140         (target_regsets): Rename to ...
9141         (mips_regsets): ... this, and make static.
9142         (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9143         (dsp_regs_info, regs_info): New globals.
9144         (mips_regs_info): New function.
9145         (the_low_target): Adjust.
9146         (initialize_low_arch): New function.
9147         * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9148         (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9149         Declare.
9150         (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9151         (arm_read_description): New, with bits factored from
9152         arm_arch_setup.
9153         (arm_arch_setup): Reimplement.
9154         (target_regsets): Rename to ...
9155         (arm_regsets): ... this, and make static.
9156         (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9157         (arm_regs_info): New function.
9158         (the_low_target): Adjust.
9159         (initialize_low_arch): New function.
9160         * linux-m68k-low.c (tdesc_m68k): Declare.
9161         (target_regsets): Rename to ...
9162         (m68k_regsets): ... this, and make static.
9163         (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9164         (m68k_regs_info): New function.
9165         (m68k_arch_setup): New function.
9166         (the_low_target): Adjust.
9167         (initialize_low_arch): New function.
9168         * linux-sh-low.c (tdesc_sharch): Declare.
9169         (target_regsets): Rename to ...
9170         (sh_regsets): ... this, and make static.
9171         (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9172         (sh_regs_info, sh_arch_setup): New functions.
9173         (the_low_target): Adjust.
9174         (initialize_low_arch): New function.
9175         * linux-bfin-low.c (tdesc_bfin): Declare.
9176         (bfin_arch_setup): New function.
9177         (bfin_usrregs_info, regs_info): New globals.
9178         (bfin_regs_info): New function.
9179         (the_low_target): Adjust.
9180         (initialize_low_arch): New function.
9181         * linux-cris-low.c (tdesc_cris): Declare.
9182         (cris_arch_setup): New function.
9183         (cris_usrregs_info, regs_info): New globals.
9184         (cris_regs_info): New function.
9185         (the_low_target): Adjust.
9186         (initialize_low_arch): New function.
9187         * linux-cris-low.c (tdesc_crisv32): Declare.
9188         (cris_arch_setup): New function.
9189         (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9190         (cris_regs_info): New function.
9191         (the_low_target): Adjust.
9192         (initialize_low_arch): New function.
9193         * linux-m32r-low.c (tdesc_m32r): Declare.
9194         (m32r_arch_setup): New function.
9195         (m32r_usrregs_info, regs_info): New globals.
9196         (m32r_regs_info): Adjust.
9197         (initialize_low_arch): New function.
9198         * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9199         (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9200         (tic6x_usrregs_info): Forward declare.
9201         (tic6x_read_description): New function, based on ...
9202         (tic6x_arch_setup): ... this.  Reimplement.
9203         (target_regsets): Rename to ...
9204         (tic6x_regsets): ... this, and make static.
9205         (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9206         (tic6x_regs_info): New function.
9207         (the_low_target): Adjust.
9208         (initialize_low_arch): New function.
9209         * linux-xtensa-low.c (tdesc_xtensa): Declare.
9210         (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9211         (target_regsets): Rename to ...
9212         (xtensa_regsets): ... this, and make static.
9213         (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9214         globals.
9215         (xtensa_arch_setup, xtensa_regs_info): New functions.
9216         (the_low_target): Adjust.
9217         (initialize_low_arch): New function.
9218         * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9219         (nios2_arch_setup): Set the current process'es tdesc.
9220         (target_regsets): Rename to ...
9221         (nios2_regsets): ... this.
9222         (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9223         (nios2_regs_info): New function.
9224         (the_low_target): Adjust.
9225         (initialize_low_arch): New function.
9226         * linux-aarch64-low.c (tdesc_aarch64): Declare.
9227         (aarch64_arch_setup): Set the current process'es tdesc.
9228         (target_regsets): Rename to ...
9229         (aarch64_regsets): ... this.
9230         (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9231         (aarch64_regs_info): New function.
9232         (the_low_target): Adjust.
9233         (initialize_low_arch): New function.
9234         * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9235         globals.
9236         (target_regsets): Rename to ...
9237         (tile_regsets): ... this.
9238         (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9239         (tile_regs_info): New function.
9240         (tile_arch_setup): Set the current process'es tdesc.
9241         (the_low_target): Adjust.
9242         (initialize_low_arch): New function.
9243         * spu-low.c (tdesc_spu): Declare.
9244         (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9245         * win32-arm-low.c (tdesc_arm): Declare.
9246         (arm_arch_setup): New function.
9247         (the_low_target): Install arm_arch_setup instead of
9248         init_registers_arm.
9249         * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9250         (init_windows_x86): Rename to ...
9251         (i386_arch_setup): ... this.  Set `win32_tdesc'.
9252         (the_low_target): Adjust.
9253         * win32-low.c (win32_tdesc): New global.
9254         (child_add_thread): Don't create the thread cache here.
9255         (do_initial_child_stuff): Set the new process'es tdesc.
9256         * win32-low.h (struct target_desc): Forward declare.
9257         (win32_tdesc): Declare.
9258         * lynx-i386-low.c (tdesc_i386): Declare global.
9259         (lynx_i386_arch_setup): Set `lynx_tdesc'.
9260         * lynx-low.c (lynx_tdesc): New global.
9261         (lynx_add_process): Set the new process'es tdesc.
9262         * lynx-low.h (struct target_desc): Forward declare.
9263         (lynx_tdesc): Declare global.
9264         * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9265         (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9266         * nto-low.c (nto_tdesc): New global.
9267         (do_attach): Set the new process'es tdesc.
9268         * nto-low.h (struct target_desc): Forward declare.
9269         (nto_tdesc): Declare.
9270         * nto-x86-low.c (tdesc_i386): Declare.
9271         (nto_x86_arch_setup): Set `nto_tdesc'.
9272
9273 2013-06-04  Gary Benson  <gbenson@redhat.com>
9274
9275         * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9276         to qSupported response when appropriate.
9277         (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9278         with nonzero-length annex.
9279         * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9280         arguments supplied in annex.
9281
9282 2013-05-31  Doug Evans  <dje@google.com>
9283
9284         PR server/15594
9285         * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9286         64 bits in 64-cross-32 environment.
9287
9288 2013-05-28  Pedro Alves  <palves@redhat.com>
9289
9290         * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9291         (aarch64-without-fpu.c): Delete rule.
9292         * configure.srv (aarch64*-*-linux*): Remove references to
9293         aarch64-without-fpu.o and aarch64-without-fpu.xml.
9294         * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9295         declaration.
9296
9297 2013-05-24  Pedro Alves  <palves@redhat.com>
9298
9299         * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9300         instead of strchr/decode_address.  Error if the range isn't split
9301         with a ','.  Don't assume there's be a ':' in the action.
9302
9303 2013-05-23  Yao Qi  <yao@codesourcery.com>
9304             Pedro Alves  <palves@redhat.com>
9305
9306         * linux-low.c (lwp_in_step_range): New function.
9307         (linux_wait_1): If the thread was range stepping and stopped
9308         outside the stepping range, report the stop to GDB.  Otherwise,
9309         continue stepping.  Add range stepping debug output.
9310         (linux_set_resume_request): Copy the step range from the resume
9311         request to the lwp.
9312         (linux_supports_range_stepping): New.
9313         (linux_target_ops) <supports_range_stepping>: Set to
9314         linux_supports_range_stepping.
9315         * linux-low.h (struct linux_target_ops)
9316         <supports_range_stepping>: New field.
9317         (struct lwp_info) <step_range_start, step_range_end>: New fields.
9318         * linux-x86-low.c (x86_supports_range_stepping): New.
9319         (the_low_target) <supports_range_stepping>: Set to
9320         x86_supports_range_stepping.
9321         * server.c (handle_v_cont): Handle 'r' action.
9322         (handle_v_requests): Append ";r" if the target supports range
9323         stepping.
9324         * target.h (struct thread_resume) <step_range_start,
9325         step_range_end>: New fields.
9326         (struct target_ops) <supports_range_stepping>:
9327         New field.
9328         (target_supports_range_stepping): New macro.
9329
9330 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
9331
9332         * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9333         confusion in comment.
9334
9335 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
9336
9337         * lynx-low.c (struct process_info_private): New type.
9338         (lynx_add_process): New function.
9339         (lynx_create_inferior, lynx_attach): Replace calls to
9340         add_process by calls to lynx_add_process.
9341         (lynx_resume): If PTID is null, then try using
9342         current_process()->private->last_wait_event_ptid.
9343         Add comments.
9344         (lynx_clear_inferiors): Delete.  The contents of that function
9345         has been inlined in lynx_mourn;
9346         (lynx_wait_1): Save the ptid in the process's private data.
9347         (lynx_mourn): Free the process' private data.  Replace call
9348         to lynx_clear_inferiors by call to clear_inferiors.
9349
9350 2013-05-17  Yao Qi  <yao@codesourcery.com>
9351
9352         * i386-low.c (i386_length_and_rw_bits): Move the comment to
9353         the right place.
9354
9355 2013-05-16  Luis Machado  <lgustavo@codesourcery.com>
9356
9357         * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9358         PT_DATA_ADDR and PT_TEXT_END_ADDR.  Update comments.
9359         (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9360         PT_TEXT_END_ADDR guards.  Update comments.
9361         (linux_target_op) <read_offsets>: Conditionally define to
9362         linux_read_offsets if the target is UCLIBC and if it defines
9363         PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9364
9365 2013-05-06  Sandra Loosemore  <sandra@codesourcery.com>
9366             Andrew Jenner  <andrew@codesourcery.com>
9367
9368         * Makefile.in (SFILES): Add linux-nios2-low.c.
9369         (clean): Add action to delete nios2-linux.c.
9370         (nios2-linux.c): New rule.
9371         * configure.srv: Add nios2*-*-linux*.
9372         * linux-nios2-low.c: New.
9373
9374 2013-05-03  Hafiz Abid Qadeer  <abidh@codesourcery.com>
9375
9376         * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9377
9378 2013-04-25  Hui Zhu  <hui@codesourcery.com>
9379
9380         PR gdb/15186
9381         * ax.c (ax_printf): Add fflush.
9382
9383 2013-04-22  Tom Tromey  <tromey@redhat.com>
9384
9385         * Makefile.in (SFILES): Add filestuff.c.
9386         (OBS): Add filestuff.o.
9387         (filestuff.o): New target.
9388         * config.in, configure: Rebuild.
9389         * configure.ac: Check for fdwalk, pipe2.
9390
9391 2013-04-17  Pedro Alves  <palves@redhat.com>
9392
9393         * configure.ac (USE_THREAD_DB): Delete variable.
9394         (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9395         Don't AC_SUBST USE_THREAD_DB.
9396         * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9397         * config.in, configure: Regenerate.
9398
9399 2013-04-16  Pedro Alves  <palves@redhat.com>
9400
9401         * linux-low.h (struct lwp_info) <thread_known>: Move under
9402         the USE_THREAD_DB #ifdef.
9403
9404 2013-04-16  Pedro Alves  <palves@redhat.com>
9405
9406         * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9407         (linux-low.o): Delete rule.
9408         * linux-low.h: Always include "gdb_thread_db.h" instead of
9409         conditionally including thread_db.h.
9410         (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9411         HAVE_THREAD_DB_H.
9412
9413 2013-04-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
9414
9415         * Makefile.in (install-only): Fix make install regression.
9416
9417 2013-04-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
9418
9419         Convert man pages to texinfo, new gdbinit.5 texinfo page.
9420         * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9421         installation.
9422         * gdbserver.1: Remove.
9423
9424 2013-03-22  Pedro Alves  <palves@redhat.com>
9425
9426         * linux-low.c (handle_extended_wait): Don't call
9427         linux_enable_event_reporting.
9428
9429 2013-03-15  Tony Theodore  <tonyt@logyst.com>
9430
9431         PR build/9098:
9432         * Makefile.in (SHELL): Use @SHELL@.
9433
9434 2013-03-14  Sergio Durigan Junior  <sergiodj@redhat.com>
9435
9436         * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9437         compiler warning.
9438
9439 2013-03-13  Joel Brobecker  <brobecker@adacore.com>
9440
9441         * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9442         Remove extraneous NULL element.
9443
9444 2013-03-13  Yao Qi  <yao@codesourcery.com>
9445
9446         * tracepoint.c (traceframe_read_tsv): Look for the last matched
9447         'V' block in trace frame.
9448
9449 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
9450
9451         * target.h (struct target_ops): Add btrace ops.
9452         (target_supports_btrace): New macro.
9453         (target_enable_btrace): New macro.
9454         (target_disable_btrace): New macro.
9455         (target_read_btrace): New macro.
9456         * gdbthread.h (struct thread_info): Add btrace field.
9457         * server.c: Include btrace-common.h.
9458         (handle_btrace_general_set): New function.
9459         (handle_btrace_enable): New function.
9460         (handle_btrace_disable): New function.
9461         (handle_general_set): Call handle_btrace_general_set.
9462         (handle_qxfer_btrace): New function.
9463         (struct qxfer qxfer_packets[]): Add btrace entry.
9464         * inferiors.c (remove_thread): Disable btrace.
9465         * linux-low: Include linux-btrace.h.
9466         (linux_low_enable_btrace): New function.
9467         (linux_low_read_btrace): New function.
9468         (linux_target_ops): Add btrace ops.
9469         * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9470         Add srv_linux_btrace=yes.
9471         (x86_64-*-linux*): Add linux-btrace.o.
9472         Add srv_linux_btrace=yes.
9473         * configure.ac: Define HAVE_LINUX_BTRACE.
9474         * config.in: Regenerated.
9475         * configure: Regenerated.
9476
9477 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
9478
9479         * server.c (handle_qxfer): Preserve error message if -3 is
9480         returned.
9481         (qxfer): Document the -3 return value.
9482
9483 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
9484
9485         * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9486         (linux_btrace_h): New variable.
9487         (linux-btrace.o): New rule.
9488
9489 2013-03-08  Stan Shebs  <stan@codesourcery.com>
9490             Hafiz Abid Qadeer  <abidh@codesourcery.com>
9491
9492         * tracepoint.c (trace_buffer_size): New global.
9493         (DEFAULT_TRACE_BUFFER_SIZE): New define.
9494         (init_trace_buffer): Change to one-argument function. Allocate
9495         trace buffer memory.
9496         (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9497         handle QTBuffer:size packet.
9498         (cmd_bigqtbuffer_size): New function.
9499         (initialize_tracepoint): Call init_trace_buffer with
9500         DEFAULT_TRACE_BUFFER_SIZE.
9501         * server.c (handle_query): Add QTBuffer:size in the
9502         supported packets.
9503
9504 2013-03-07  Yao Qi  <yao@codesourcery.com>
9505
9506         * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9507         (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9508         of -1.
9509         (cmd_qtsp): Adjust condition.  Do post increment.
9510         Set cur_action and cur_step_action back to 0.
9511
9512 2013-03-07  Jeremy Bennett  <jeremy.bennett@embecosm.com>
9513
9514         PR server/15236
9515         * linux-low.c (linux_write_memory): Return early success if LEN is
9516         zero.
9517
9518 2013-03-05  Corinna Vinschen  <vinschen@redhat.de>
9519
9520         * configure.srv: Add x86_64-*-cygwin* as target.
9521
9522 2013-02-28  Tom Tromey  <tromey@redhat.com>
9523
9524         * configure.ac: Invoke AC_SYS_LARGEFILE.
9525         * configure, config.in: Rebuild.
9526
9527 2013-02-28  Corinna Vinschen  <vinschen@redhat.com>
9528
9529         * win32-low.c: Throughout, fix format strings and casts of
9530         printf-like functions to avoid type related warnings on all
9531         platforms.
9532         (get_child_debug_event): Print dwDebugEventCode as hex since
9533         that's how it's usually documented.
9534
9535 2013-02-28  Yao Qi  <yao@codesourcery.com>
9536
9537         * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9538         pulongest.
9539
9540 2013-02-27  Jiong Wang  <jiwang@tilera.com>
9541
9542         * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9543         (reg-tilegx32.c): New rule.
9544         * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9545         * linux-tile-low.c (tile_arch_setup): New function.  Invoke
9546         different register info initializer according to elf class.
9547         (init_registers_tilgx32): New function.  The tilegx32 register info
9548         initializer.
9549         (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9550         (tile_store_gregset): Likewise.
9551
9552 2013-02-27  Yao Qi  <yao@codesourcery.com>
9553
9554         * server.c (process_point_options): Print debug message when
9555         debug_threads is true.
9556
9557 2013-02-26  Yao Qi  <yao@codesourcery.com>
9558
9559         * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9560
9561 2013-02-19  Pedro Alves  <palves@redhat.com>
9562             Kai Tietz <ktietz@redhat.com>
9563
9564         PR gdb/15161
9565
9566         * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9567         instead of strtoul to extract address from packet.
9568         (process_serial_event) <'z'>: Likewise.
9569
9570 2013-02-18  Yao Qi  <yao@codesourcery.com>
9571
9572         * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9573
9574 2013-02-14  Pedro Alves  <palves@redhat.com>
9575
9576         Plug memory leak.
9577
9578         * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9579         TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9580
9581 2013-02-14  Pedro Alves  <palves@redhat.com>
9582
9583         * tracepoint.c (cmd_qtdpsrc): Use savestring.
9584
9585 2013-02-14  Pedro Alves  <palves@redhat.com>
9586
9587         * tracepoint.c (save_string): Delete.
9588         (add_tracepoint_action): Use savestring instead of save_string.
9589
9590 2013-02-12  Pedro Alves  <palves@redhat.com>
9591
9592         * linux-xtensa-low.c: Ditto.
9593         * xtensa-xtregs.c: Ditto.
9594
9595 2013-02-12  Sanimir Agovic  <sanimir.agovic@intel.com>
9596
9597         * thread-db.c (thread_db_get_tls_address): NULL pointer check
9598         thread_db.
9599
9600 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
9601
9602         * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9603         aarch64_num_wp_regs and aarch64_num_bp_regs to
9604         AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9605
9606 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
9607
9608         * linux-aarch64-low.c (ps_get_thread_area): Replace
9609         PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9610
9611 2013-02-04  Jim MacArthur  <jim.macarthur@arm.com>
9612             Marcus Shawcroft  <marcus.shawcroft@arm.com>
9613             Nigel Stephens  <nigel.stephens@arm.com>
9614             Yufeng Zhang  <yufeng.zhang@arm.com>
9615
9616         * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9617         (aarch64.c, aarch64-without-fpu.c): New targets.
9618         * configure.srv (aarch64*-*-linux*): New.
9619         * linux-aarch64-low.c: New file.
9620
9621 2013-02-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
9622
9623         * linux-low.c (handle_extended_wait, linux_create_inferior)
9624         (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9625         (dequeue_one_deferred_signal, linux_resume_one_thread)
9626         (fetch_register, linux_write_memory, linux_enable_event_reporting)
9627         (linux_tracefork_grandchild, linux_test_for_tracefork)
9628         (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9629         PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9630         where the argument is 0.
9631
9632 2013-01-25  Yao Qi  <yao@codesourcery.com>
9633
9634         * event-loop.c: Include "queue.h".
9635         (gdb_event_p): New typedef.
9636         (struct gdb_event) <next_event>: Remove.
9637         (event_queue): Change to QUEUE(gdb_event_p).
9638         (async_queue_event): Remove.
9639         (gdb_event_xfree): New.
9640         (initialize_event_loop): New.
9641         (process_event): Use API from QUEUE.
9642         (wait_for_event): Likewise.
9643         * server.c (main): Call initialize_event_loop.
9644         * server.h (initialize_event_loop): Declare.
9645
9646 2013-01-18  Yao Qi  <yao@codesourcery.com>
9647
9648         * ax.h (struct eval_agent_expr_context): New.
9649         (gdb_eval_agent_expr): Update declaration.
9650         * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9651         TFRAME.  Add new argument CTX.
9652         * server.h (struct eval_agent_expr_context): Declare.
9653         (agent_mem_read, agent_tsv_read): Update declaration.
9654         (agent_mem_read_string): Likewise.
9655         * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9656         (add_traceframe_block): Add new argument TPOINT.
9657         Increase TPOINT->traceframe_usage.
9658         (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9659         eval_tracepoint_agent_expr.
9660         (condition_true_at_tracepoint): Likewise.
9661         (agent_mem_read): Remove argument TFRAME.  Add argument CTX.
9662         (agent_mem_read_string, agent_tsv_read): Likewise.
9663
9664 2013-01-16  Yao Qi  <yao@codesourcery.com>
9665
9666         * linux-low.c (linux_resume_one_lwp): Don't check
9667         'lwp->bp_reinsert != 0'.
9668
9669 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
9670             Pedro Alves  <palves@redhat.com>
9671
9672         * lynx-low.c (ptrace_request_to_str): Define a temporary
9673         macro and use it to simplify this function's implementation.
9674
9675 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
9676
9677         * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9678         sets errno.
9679
9680 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
9681
9682         * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9683
9684 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
9685
9686         * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9687
9688 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
9689
9690         * lynx-low.c (lynx_resume): Use the resume_info parameter
9691         to determine the ptid for the lynx_ptrace call, unless
9692         it is equal to minus_one_ptid, in which case we use the
9693         ptid of the current_inferior.
9694         (lynx_wait_1): After having received a thread create/exit
9695         event, resume the inferior's execution using the signaling
9696         thread's ptid, rather than the old ptid.
9697
9698 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
9699
9700         * lynx-low.c (lynx_resume): Delete variable ret.
9701
9702 2013-01-01  Joel Brobecker  <brobecker@adacore.com>
9703
9704         * gdbreplay.c (gdbreplay_version): Update copyright year.
9705         * server.c (gdbserver_version): Likewise.
9706
9707 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
9708
9709         * lynx-low.c (lynx_wait_1): Add debug trace before adding
9710         new thread.
9711
9712 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
9713
9714         * lynx-low.c (ptrace_request_to_str): Add handling for
9715         PTRACE_GETTRACESIG.
9716
9717 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
9718
9719         * lynx-low.c (lynx_attach): Delete variable new_process.
9720
9721 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
9722
9723         * lynx-low.c (lynx_create_inferior): Delete variable
9724         new_process.
9725
9726 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
9727
9728         * lynx-low.c (ptrace_request_to_str): Do not handle
9729         PTRACE_GETTHREADLIST if this macro does not exist.
9730
9731 2012-12-15  Yao Qi  <yao@codesourcery.com>
9732
9733         * Makefile.in (OBS): Add notif.o.
9734         * notif.c, notif.h: New.
9735         * server.c: Include "notif.h".
9736         (struct vstop_notif) <next>: Remove.
9737         <base>: New field.
9738         (queue_stop_reply): Update.
9739         (push_event, send_next_stop_reply): Remove.
9740         (discard_queued_stop_replies): Update.
9741         (notif_stop): New variable.
9742         (handle_v_stopped): Remove.
9743         (handle_v_requests): Don't call handle_v_stopped.  Call
9744         handle_ack_notif instead.
9745         (queue_stop_reply_callback): Call notif_event_enque instead
9746         of queue_stop_reply.
9747         (handle_status): Don't call send_next_stop_reply, call
9748         notif_write_event instead.
9749         (kill_inferior_callback): Likewise.
9750         (detach_or_kill_inferior_callback): Likewise.
9751         (main): Call initialize_notif.
9752         (process_serial_event): Call QUEUE_is_empty.
9753         (handle_target_event): Call notif_push instead of push event.
9754         * server.h (push_event): Remove declaration.
9755
9756 2012-12-10  Tom Tromey  <tromey@redhat.com>
9757
9758         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9759         (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9760         macros.
9761         (.c.o): Rewrite.
9762         (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9763         (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9764         (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9765         (amd64-linux-ipa.o, ax.o): Rewrite.
9766         (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9767         (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9768         (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9769         (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9770         (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9771         (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9772         (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9773         (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9774         (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9775         (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9776         (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9777         (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9778         (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9779         (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9780         (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9781         (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9782         (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9783         (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9784         (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9785         (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9786         (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9787         (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9788         (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9789         (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9790         (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9791         (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9792         (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9793         (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9794         (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9795         (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9796         (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9797         (reg-tilegx.o): Remove.
9798         (all_object_files): New macro.
9799         Include .deps files.
9800         * aclocal.m4, configure: Rebuild.
9801         * acinclude.m4: Include depstand.m4, lead-dot.m4.
9802         * configure.ac: Invoke ZW_CREATE_DEPDIR,
9803         ZW_PROG_COMPILER_DEPENDENCIES.  Compute GMAKE condition.
9804
9805 2012-12-05  Tom Tromey  <tromey@redhat.com>
9806
9807         PR gdb/14917:
9808         * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9809
9810 2012-11-28  Markus Metzger  <markus.t.metzger@intel.com>
9811
9812         * configure.ac: Check for linux/perf_event.h.
9813         * config.in: Regenerated.
9814         * configure: Regenerated.
9815
9816 2012-11-26  Maxime Villard  <rustyBSD@gmx.fr>
9817
9818         * hostio.c (handle_readlink): Decrease buffer size
9819         parameter passed to readlink by one byte.
9820
9821 2012-11-26  Yao Qi  <yao@codesourcery.com>
9822
9823         * configure.ac (build_warnings): Append '-Wempty-body'.
9824         * configure: Regenerated.
9825         * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9826         body.
9827
9828 2012-11-15  Pierre Muller  <muller@sourceware.org>
9829
9830         * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9831         * config.in: Regenerate.
9832         * configure: Regenerate.
9833         * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9834         Use "gdb_wait.h" header instead of <sys/wait.h> header.
9835         * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9836         * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9837         header.
9838         * server.c: Remove HAVE_WAIT_H conditional.  Use "gdb_wait.h" header
9839         instead of <sys/wait.h> header.
9840         * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9841
9842 2012-11-13 Markus Metzger  <markus.t.metzger@intel.com>
9843
9844         * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9845         (various make rules): Remove -DGDBSERVER
9846
9847 2012-11-09  Yao Qi  <yao@codesourcery.com>
9848
9849         * spu-low.c (current_ptid): Move it to ..
9850         * gdbthread.h: ... here.  New.
9851         * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9852         * server.c (myresume, process_serial_event): Likewise.
9853         * thread-db.c (thread_db_find_new_threads): Likewise.
9854         * tracepoint.c (run_inferior_command): Likewise.
9855
9856 2012-10-01  Andrew Burgess  <aburgess@broadcom.com>
9857
9858         * server.c (handle_search_memory_1): Include access length in
9859         warning message.
9860
9861 2012-09-05  Michael Brandt  <michael.brandt@axis.com>
9862
9863         * linux-crisv32-low.c: Fix compile errors.
9864
9865 2012-09-04  Yao Qi  <yao@codesourcery.com>
9866
9867         * tracepoint.c (cmd_qtsv): Adjust debug message.
9868         Don't check CUR_TPOINT.
9869
9870 2012-08-28  Yao Qi  <yao@codesourcery.com>
9871
9872         * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9873         * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9874         (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9875         Remove declarations of xmalloc, xreallloc, xstrdup and
9876         freeargv.
9877         * Makefile.in (libiberty_h): New.
9878         (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9879         (linux-bfin-low.o): Append dependency 'libiberty.h'.
9880
9881 2012-08-23  Yao Qi  <yao@codesourcery.com>
9882
9883         * server.h: Remove declaration of 'xsnprintf'.
9884
9885 2012-08-22  Keith Seitz  <keiths@redhat.com>
9886
9887         * server.h: Include build-gnulib-gbserver/config.h.
9888         * gdbreplay.c: Likewise.
9889
9890 2012-08-08  Doug Evans  <dje@google.com>
9891
9892         * Makefile.in (SFILES): Add gdb_vecs.c.
9893         (OBS): Add gdb_vecs.o.
9894         (gdb_vecs_h, host_defs_h): New variables.
9895         (thread-db.o): Add $(gdb_vecs_h) dependency.
9896         (gdb_vecs.o): New rule.
9897         * thread-db.c: #include "gdb_vecs.h".
9898         (thread_db_load_search): Use a vector to iterate over path elements.
9899         Handle text appearing after "$pdir".
9900
9901         * configure.ac: Add check for strstr.
9902         * config.in: Regenerate.
9903         * configure: Regenerate.
9904
9905 2012-08-02  Ulrich Weigand  <ulrich.weigand@linaro.org>
9906
9907         * hostio.c (handle_pread): If pread fails, fall back to attempting
9908         lseek/read.
9909         (handle_pwrite): Likewise for pwrite.
9910
9911 2012-08-01  Ulrich Weigand  <ulrich.weigand@linaro.org>
9912
9913         * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9914         between unsupported TYPE and unimplementable ADDR/LEN combination.
9915         (arm_insert_point): Act on new return value.
9916
9917 2012-07-31  Pedro Alves  <palves@redhat.com>
9918
9919         * server.c (process_point_options): Only skip tokens if we find
9920         one that is unrecognized.  Don't treat 'X' specially while
9921         skipping unrecognized tokens.
9922
9923 2012-07-30  Ulrich Weigand  <ulrich.weigand@linaro.org>
9924
9925         * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9926         to 4-byte-align HW breakpoint addresses for Thumb.
9927
9928 2012-07-27  Yao Qi  <yao@codesourcery.com>
9929
9930         PR remote/14161.
9931
9932         * server.h: Declare gdb_agent_about_to_close.
9933         * target.c (kill_inferior): Include "agent.h".
9934         New.  Send command 'kill'.
9935         * target.h (kill_inferior): Removed macro.
9936         * tracepoint.c (gdb_agent_about_to_close): New.
9937         (gdb_agent_helper_thread): Handle command 'close'.
9938         Wait endlessly until the inferior stops.
9939         Install gdb_agent_remove_socket to atexit hook.
9940         (agent_socket_name): New static variable.
9941         (gdb_agent_socket_init): Replace local variable 'name' with
9942         'agent_socket_name'.
9943         (gdb_agent_remove_socket): New.
9944
9945 2012-07-27  Yao Qi  <yao@codesourcery.com>
9946
9947         * server.c (process_point_options): Stop at 'X' when parsing.
9948
9949 2012-07-19  Michael Eager  <eager@eagercon.com>
9950
9951         * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9952         to hw_execute.
9953         * linux-x86-low.c (x86_insert_point, x86_remove_point):
9954         Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9955         hardware breakpoint.
9956
9957 2012-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
9958
9959         * gdbserver/linux-low.c (initialize_low): Call
9960         linux_ptrace_init_warnings.
9961
9962 2012-07-02  Doug Evans  <dje@google.com>
9963
9964         * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9965         pointer to int.
9966
9967 2012-07-02  Stan Shebs  <stan@codesourcery.com>
9968
9969         * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9970         (ax.o): Add it to build rule.
9971         (ax-ipa.o): Ditto.
9972         (OBS): Add format.o.
9973         (IPA_OBS): Add format.o.
9974         * server.c (handle_query): Claim support for breakpoint commands.
9975         (process_point_options): Add command case.
9976         (process_serial_event): Leave running if there are printfs in
9977         effect.
9978         * mem-break.h (any_persistent_commands): Declare.
9979         (add_breakpoint_commands): Declare.
9980         (gdb_no_commands_at_breakpoint): Declare.
9981         (run_breakpoint_commands): Declare.
9982         * mem-break.c (struct point_command_list): New struct.
9983         (struct breakpoint): New field command_list.
9984         (any_persistent_commands): New function.
9985         (add_commands_to_breakpoint): New function.
9986         (add_breakpoint_commands): New function.
9987         (gdb_no_commands_at_breakpoint): New function.
9988         (run_breakpoint_commands): New function.
9989         * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9990         locally.
9991         * ax.c: Include format.h.
9992         (ax_printf): New function.
9993         (gdb_eval_agent_expr): Add printf opcode.
9994
9995 2012-06-13  Yao Qi  <yao@codesourcery.com>
9996
9997         * server.c (start_inferior): Remove duplicated writes to fields
9998         'last_resume_kind' and 'last_status' of 'current_inferior'.
9999
10000 2012-06-12  Yao Qi  <yao@codesourcery.com>
10001             Pedro Alves  <palves@redhat.com>
10002
10003         * linux-low.c (linux_set_resume_request): Simplify predicate.  Add
10004         comment.
10005         * server.c (handle_v_cont): Extend comment.
10006
10007 2012-06-11  Yao Qi  <yao@codesourcery.com>
10008
10009         * linux-low.c (linux_attach): Add 'static'.
10010
10011 2012-06-06  Yao Qi  <yao@codesourcery.com>
10012
10013         * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10014
10015 2012-06-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
10016
10017         Fix gcc -flto compilation warning.
10018         * server.c (main): Make variable multi_mode and attach volatile.
10019
10020 2012-05-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
10021
10022         * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10023         if the platform doesn't know about it.
10024
10025 2012-05-30  Jeff Kenton  <jkenton@tilera.com>
10026
10027         * Makefile.in (SFILES): Add linux-tile-low.c.
10028         (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10029         * configure.srv: Handle tilegx-*-linux*.
10030         * linux-tile-low.c: New file.
10031
10032 2012-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
10033
10034         * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10035
10036 2012-05-24  Pedro Alves  <palves@redhat.com>
10037
10038         PR gdb/7205
10039
10040         Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10041
10042 2012-05-24  Pedro Alves  <palves@redhat.com>
10043
10044         PR gdb/7205
10045
10046         Replace target_signal with gdb_signal throughout.
10047
10048 2012-05-22  Maciej W. Rozycki  <macro@codesourcery.com>
10049
10050         * linux-low.c (linux_store_registers): Avoid the copying sequence
10051         when no data has been retrieved by ptrace.
10052
10053 2012-05-22  Will Deacon  <will.deacon@arm.com>
10054
10055         * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10056         Include asm/ptrace.h.
10057         (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10058         already defined.
10059
10060 2012-05-21  Maciej W. Rozycki  <macro@codesourcery.com>
10061
10062         * linux-low.c (linux_store_registers): Don't re-retrieve data
10063         with ptrace that has already been obtained from /proc.  Always
10064         copy any data retrieved with ptrace to the buffer supplied.
10065
10066 2012-05-11  Yao Qi  <yao@codesourcery.com>
10067             Pedro Alves  <palves@redhat.com>
10068
10069         * linux-low.c (enum stopping_threads_kind): New.
10070         (stopping_threads): Change type to `enum stopping_threads_kind'.
10071         (handle_extended_wait): If stopping and suspending threads, leave
10072         the new_lwp suspended too.
10073         (linux_wait_for_event): Adjust.
10074         (stop_all_lwps): Set `stopping_threads' to
10075         STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10076         whether we're suspending threads or just stopping them.  Assert no
10077         recursion happens.
10078
10079 2012-04-29  Yao Qi  <yao@codesourcery.com>
10080
10081         * server.h: Move some code to ...
10082         * gdbthread.h: ... here.  New.
10083         * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10084         (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10085         (nto-low.o, win32-low.o): Likewise.
10086         * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10087         * regcache.c, remote-utils.c, server.c: Likewise.
10088         * target.c, tracepoint.c, win32-low.c: Likewise.
10089
10090 2012-04-24  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
10091
10092         * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10093         (PTRACE_ARG4_TYPE): Likewise.
10094         (PTRACE_XFER_TYPE): Likewise.
10095         * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10096         ptrace to PTRACE_ARG3_TYPE.
10097         * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10098         (PTRACE_ARG4_TYPE): Likewise.
10099         (PTRACE_XFER_TYPE): Likewise.
10100         (linux_detach_one_lwp): Cast fourth argument of
10101         ptrace to long then PTRACE_ARG4_TYPE.
10102         (regsets_fetch_inferior_registers): Cast third argument of
10103         ptrace to long then PTRACE_ARG3_TYPE.
10104         (regsets_store_inferior_registers): Likewise.
10105
10106 2012-04-20  Pedro Alves  <palves@redhat.com>
10107
10108         * configure: Regenerate.
10109
10110 2012-04-19  Pedro Alves  <palves@redhat.com>
10111
10112         * Makefile.in (GNULIB_BUILDDIR): New.
10113         (LIBGNU, INCGNU, GNULIB_H): Adjust.
10114         (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10115         (all, install-only, uninstall, clean-info, all-lib, clean): No
10116         longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
10117         (maintainer-clean realclean distclean): Use subdir_do.
10118         (subdir_do): New.
10119         (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
10120         $(GNULIB_BUILDDIR).  Don't pass argument to config.status.
10121         * acinclude.m4: Include acx_configure_dir.m4.
10122         * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10123         calls.  Call AC_PROG_RANLIB.  Configure gnulib using
10124         ACX_CONFIGURE_DIR.
10125         (GNULIB): New.
10126         (GNULIB_STDINT_H): Adjust.
10127         (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10128         * gdbreplay.c: Include build-gnulib/config.h.
10129         * server.h: Likewise.
10130         * aclocal.m4: Regenerate.
10131         * config.in: Regenerate.
10132         * configure: Regenerate.
10133
10134 2012-04-19  Pedro Alves  <palves@redhat.com>
10135
10136         * Makefile.in (LIBGNU, INCGNU): Adjust.
10137         (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10138         (all, install-only, uninstall, clean-info, all-lib, clean)
10139         (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10140         * configure.ac: Adjust AC_OUTPUT output.
10141         * aclocal.m4: Regenerate.
10142         * configure: Regenerate.
10143
10144 2012-04-19  Pedro Alves  <palves@redhat.com>
10145
10146         * Makefile.in (generated_files): New.
10147         (server_h): Remove the explicit dependency on config.h, and depend
10148         on $generated_files.
10149
10150 2012-04-19  Pedro Alves  <palves@redhat.com>
10151
10152         * Makefile.in (INCGNU): Add -Ignulib.
10153
10154 2012-04-19  Pedro Alves  <palves@redhat.com>
10155
10156         * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10157         (INCGNU): ... this, and spell out -I here.
10158         (GNULIB_LIB): Rename to ...
10159         (LIBGNU): ... this.
10160         (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10161
10162 2012-04-19  Pedro Alves  <palves@redhat.com>
10163
10164         * config.in: Regenerate.
10165
10166 2012-04-19  Pedro Alves  <palves@redhat.com>
10167
10168         * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10169         * server.h (memmem): Remove declaration.
10170         * config.in: Regenerate.
10171         * configure: Regenerate.
10172
10173 2012-04-19  Yao Qi  <yao@codesourcery.com>
10174
10175         * Makefile.in (SFILES): Add common/vec.c.
10176         (OBS): Add vec.o.
10177         (vec.o): New rule.
10178
10179 2012-04-19  Yao Qi  <yao@codesourcery.com>
10180
10181         * remote-utils.c (prepare_resume_reply): Replace with macro
10182         target_core_of_thread.
10183         * server.c (handle_qxfer_threads_proper): Likewise.
10184         * target.h (traget_core_of_thread): New macro.
10185
10186 2012-04-18  Pedro Alves  <palves@redhat.com>
10187
10188         * aclocal.m4: Regenerate.
10189         * configure: Regenerate.
10190
10191 2012-04-16  Yao Qi  <yao@codesourcery.com>
10192
10193         * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10194         duplicated on address.
10195
10196 2012-04-16  Yao Qi  <yao@codesourcery.com>
10197
10198         * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10199         (struct tracepoint_action_ops) <send>: New field.
10200         (m_tracepoint_action_send, r_tracepoint_action_send): New.
10201         (agent_expr_send, x_tracepoint_action_send): New.
10202         (l_tracepoint_action_send): New.
10203         (cmd_qtdp): Download and install tracepoint
10204         according to `use_agent'.
10205         (run_inferior_command): Add one more parameter `len'.
10206         Update callers.
10207         (tracepoint_send_agent): New.
10208         (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10209
10210 2012-04-16  Yao Qi  <yao@codesourcery.com>
10211
10212         * tracepoint.c (download_tracepoints): Moved to ...
10213         (cmd_qtstart): ... here.
10214
10215 2012-04-14  Yao Qi  <yao@codesourcery.com>
10216
10217         * tracepoint.c: Include inttypes.h.
10218         (struct collect_memory_action): Use sized types.
10219         (struct tracepoint): Likewise.
10220         (cmd_qtdp, stop_tracing): Update print specifiers.
10221         (cmd_qtp, response_tracepoint): Likewise.
10222         (collect_data_at_tracepoint): Likewise.
10223         (collect_data_at_step): Likewise.
10224
10225 2012-04-14  Yao Qi  <yao@codesourcery.com>
10226
10227         Import gnulib module inttypes.
10228         * aclocal.m4, config.in, configure: Regenerated.
10229
10230 2012-04-14  Yao Qi  <yao@codesourcery.com>
10231
10232         * Makefile.in (maintainer-clean, realclean, distclean): Remove
10233         Makefile and config.status at last.
10234
10235 2012-04-13  Yao Qi  <yao@codesourcery.com>
10236
10237         * tracepoint.c: Include stdint.h unconditionally.
10238
10239 2012-04-13  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
10240
10241         * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10242         on BFD_HAVE_SYS_PROCFS_TYPE.
10243         * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10244         * configure: Regenerate.
10245         * config.in: Likewise.
10246
10247 2012-04-13  H.J. Lu  <hongjiu.lu@intel.com>
10248
10249         * Makefile.in (clean): Also remove x32.c x32-linux.c
10250         x32-avx.c x32-avx-linux.c.
10251         (x32.o): New target.
10252         (x32.c): Likewise.
10253         (x32-linux.o): Likewise.
10254         (x32-linux.c): Likewise.
10255         (x32-avx.o): Likewise.
10256         (x32-avx.c): Likewise.
10257         (x32-avx-linux.o): Likewise.
10258         (x32-avx-linux.c): Likewise.
10259
10260         * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10261         (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10262         (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10263         (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10264         (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10265         i386/x32-avx-linux.xml.
10266
10267         * linux-x86-low.c (init_registers_x32_linux): New prototype.
10268         (init_registers_x32_avx_linux): Likwise.
10269         (x86_linux_update_xmltarget): Call init_registers_x32_linux
10270         or init_registers_x32_avx_linux if linux_is_elf64 is false.
10271
10272 2012-04-13  Pedro Alves  <palves@redhat.com>
10273
10274         * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10275         (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10276         (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10277         (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10278         the sub-make.
10279
10280 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
10281
10282         * linux-x86-low.c (compat_x32_clock_t): New.
10283         (compat_x32_siginfo_t): Likewise.
10284         (compat_x32_siginfo_from_siginfo): Likewise.
10285         (siginfo_from_compat_x32_siginfo): Likewise.
10286         (linux_is_elf64): Likewise.
10287         (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10288         and siginfo_from_compat_x32_siginfo for x32.
10289         (x86_arch_setup): Set linux_is_elf64.
10290
10291 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
10292
10293         PR gdb/13969
10294         * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10295         e_machine field.
10296         (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10297         * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10298         * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10299         compatible with process.
10300
10301 2012-04-12  Yao Qi  <yao@codesourcery.com>
10302
10303         * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10304         (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10305         (install-only, install-info, clean): Handle sub dir gnulib.
10306         (all-lib, am--refresh): New targets.
10307         (memmem.o): Remove target.
10308         * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10309         Invoke gl_EARLY.  Invoke AC_CHECK_PROGS for make.
10310         (AC_REPLACE_FUNCS): Remove memmem.
10311         Invoke gl_INIT and AM_INIT_AUTOMAKE.
10312         (AC_OUTPUT): Generate Makefile in gnulib/.
10313         * aclocal.m4, config.in, configure: Regenerated.
10314
10315 2012-04-10  Maciej W. Rozycki  <macro@codesourcery.com>
10316
10317         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10318
10319 2012-04-05  Pedro Alves  <palves@redhat.com>
10320
10321         -Werror=strict-aliasing
10322
10323         * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10324         pointer.
10325
10326 2012-04-04  Pedro Alves  <palves@redhat.com>
10327
10328         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10329         (sparc_store_gregset_from_stack, sparc_store_gregset)
10330         (sparc_breakpoint_at): Fix formatting.
10331
10332 2012-03-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
10333
10334         * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10335         are available.
10336         * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10337         [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10338         * config.in: Regenerate.
10339         * configure: Likewise.
10340
10341 2012-03-29  Pedro Alves  <palves@redhat.com>
10342
10343         * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10344         Correct ptrace arguments.
10345
10346 2012-03-28  Pedro Alves  <palves@redhat.com>
10347
10348         * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10349         (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10350         (IA64_FR1_REGNUM): New defines.
10351         (ia64_fetch_register): New.
10352         (the_low_target): Install it.
10353         * linux-low.h (struct linux_target_ops) <fetch_register>: New
10354         field.
10355         * linux-low.c (linux_fetch_registers): Try the
10356         the_low_target.fetch_register hook first.
10357
10358         * linux-arm-low.c (the_low_target): Adjust.
10359         * linux-bfin-low.c (the_low_target): Adjust.
10360         * linux-cris-low.c (the_low_target): Adjust.
10361         * linux-crisv32-low.c (the_low_target): Adjust.
10362         * linux-m32r-low.c (the_low_target): Adjust.
10363         * linux-m68k-low.c (the_low_target): Adjust.
10364         * linux-mips-low.c (the_low_target): Adjust.
10365         * linux-ppc-low.c (the_low_target): Adjust.
10366         * linux-s390-low.c (the_low_target): Adjust.
10367         * linux-sh-low.c (the_low_target): Adjust.
10368         * linux-sparc-low.c (the_low_target): Adjust.
10369         * linux-tic6x-low.c (the_low_target): Adjust.
10370         * linux-x86-low.c (the_low_target): Adjust.
10371         * linux-xtensa-low.c (the_low_target): Adjust.
10372
10373 2012-03-26  Pedro Alves  <palves@redhat.com>
10374
10375         * server.c (handle_qxfer_libraries): Don't bail early if
10376         the_target->qxfer_libraries_svr4 is not NULL.
10377
10378 2012-03-26  Pedro Alves  <palves@redhat.com>
10379
10380         * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10381
10382 2012-03-23  Pedro Alves  <palves@redhat.com>
10383
10384         * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10385         "library-list-svr4" element's start tag when the the DSO list is
10386         empty.
10387
10388 2012-03-23  Pedro Alves  <palves@redhat.com>
10389
10390         * linux-low.c (read_one_ptr): Read the inferior's pointer through
10391         a variable whose type size is the same as the inferior's pointer
10392         size.
10393
10394 2012-03-21  Thomas Schwinge  <thomas@codesourcery.com>
10395
10396         * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10397         struct siginfo.
10398         * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10399         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10400         * linux-low.h: Include <signal.h>.
10401         (struct siginfo): Remove forward declaration.
10402         (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10403         struct siginfo.
10404
10405 2012-03-21  Mike Frysinger  <vapier@gentoo.org>
10406
10407         * .gitignore: Ignore more files.
10408
10409 2012-03-19  Pedro Alves  <palves@redhat.com>
10410             Jan Kratochvil  <jan.kratochvil@redhat.com>
10411
10412         * server.c (cont_thread, general_thread): Add describing comments.
10413         (start_inferior): Clear `cont_thread'.
10414         (handle_v_cont): Don't set `cont_thread' if resuming all threads
10415         of a process.
10416
10417 2012-03-15  Yao Qi  <yao@codesourcery.com>
10418
10419         * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10420         handling to ...
10421         (cmd_qtdp): ... here.
10422
10423 2012-03-15  Yao Qi  <yao@codesourcery.com>
10424
10425         * tracepoint.c (struct tracepoint_action_ops): New.
10426         (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10427         (m_tracepoint_action_download): New.
10428         (r_tracepoint_action_download): New.
10429         (x_tracepoint_action_download): New.
10430         (l_tracepoint_action_download): New.
10431         (add_tracepoint_action): Install `action->ops' according type.
10432         (download_tracepoint_1): Move code `download' function pointer
10433         of various tracepoint_action_ops.
10434
10435 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
10436
10437         * linux-low.c (linux_attach_lwp_1): New variable buffer.  Call
10438         linux_ptrace_attach_warnings.
10439
10440 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
10441
10442         * Makefile.in (linux-ptrace.o): New.
10443         * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10444         (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10445         (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10446         (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10447         (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10448         of these targets.
10449         * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10450
10451 2012-03-08  Yao Qi  <yao@codesourcery.com>
10452             Pedro Alves  <palves@redhat.com>
10453
10454         Fix PR server/13392.
10455         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10456         offset of JMP insn.
10457         * tracepoint.c (remove_tracepoint): New.
10458         (cmd_qtdp): Call remove_tracepoint when failed to install.
10459
10460 2012-03-07  Pedro Alves  <palves@redhat.com>
10461
10462         * linux-low.c (get_detach_signal): New.
10463         (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10464         Pass on pending signals to PTRACE_DETACH.  Check the result of the
10465         ptrace call.
10466         * server.c (program_signals, program_signals_p): New.
10467         (handle_general_set): Handle QProgramSignals.
10468         * server.h (program_signals, program_signals_p): Declare.
10469
10470 2012-03-05  Pedro Alves  <palves@redhat.com>
10471             Jan Kratochvil  <jan.kratochvil@redhat.com>
10472
10473         * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10474         New comment why.
10475
10476 2012-03-03  Yao Qi  <yao@codesourcery.com>
10477
10478         * tracepoint.c (tracepoint_look_up_symbols): Update call to
10479         agent_look_up_symbols.
10480
10481 2012-03-03  Yao Qi  <yao@codesourcery.com>
10482
10483         * Makefile.in (linux-low.o): Keep dependence on agent.h.
10484         (linux-x86-low.o): Likewise.
10485         * server.h: Remove in_process_agent_loaded.
10486         * tracepoint.c (in_process_agent_loaded): Removed.  Moved it
10487         common/agent.c.
10488         Update callers.
10489
10490 2012-03-03  Yao Qi  <yao@codesourcery.com>
10491
10492         * tracepoint.c (gdb_agent_capability): New global.
10493         (in_process_agent_loaded_ust): Renamed to
10494         `in_process_agent_supports_ust'.
10495         Update callers.
10496         (in_process_agent_supports_ust): Call agent_capability_check.
10497         (clear_installed_tracepoints): Assert that agent supports
10498         agent.
10499
10500 2012-03-03  Yao Qi  <yao@codesourcery.com>
10501
10502         * linux-low.c (linux_supports_agent): New.
10503         (linux_target_ops): Initialize field `supports_agent' with
10504         linux_supports_agent.
10505         * target.h (struct target_ops) <supports_agent>: New.
10506         (target_supports_agent): New macro.
10507         * server.c (handle_general_set): Handle packet 'QAgent'.
10508         (handle_query): Send `QAgent+'.
10509         * Makefile.in (server.o): Depends on agent.h.
10510
10511 2012-03-03  Yao Qi  <yao@codesourcery.com>
10512
10513         * Makefile.in (OBS): Add agent.o.
10514         Add new rule for agent.o.
10515         Track dependence of tracepoint.c on agent.h.
10516         * tracepoint.c (run_inferior_command_1):
10517         (run_inferior_command): Call agent_run_command.
10518         (gdb_ust_connect_sync_socket): Deleted.  Move it to
10519         common/agent.c.
10520         (resume_thread, stop_thread): Likewise.
10521         (gdb_ust_socket_init): Renamed to ...
10522         (gdb_agent_socket_init): ... New.
10523         (gdb_ust_thread): Renamed to ...
10524         (gdb_agent_helper_thread): ... New.
10525         (gdb_ust_init): Move some code to ...
10526         (gdb_agent_init): ... here.  New.
10527         [HAVE_UST]: Call gdb_ust_init.
10528         (initialize_tracepoint_ftlib):  Call gdb_agent_init.
10529         * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10530         * config.in, configure: Regenerated.
10531
10532 2012-03-02  Pedro Alves  <palves@redhat.com>
10533
10534         * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10535         * linux-low.c (struct simple_pid_list): New.
10536         (stopped_pids): New a struct simple_pid_list pointer.
10537         (add_to_pid_list, pull_pid_from_list): New.
10538         (handle_extended_wait): Don't assume the first signal new children
10539         report is SIGSTOP.  Adjust call to pull_pid_from_list.
10540         (linux_wait_for_lwp): Adjust.
10541
10542 2012-03-02  Yao Qi  <yao@codesourcery.com>
10543
10544         * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10545         debug log.
10546
10547 2012-03-02  Yao Qi  <yao@codesourcery.com>
10548
10549         * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10550         `stop_pc' and `tpoint'.  Update caller.
10551
10552 2012-03-01  Maciej W. Rozycki  <macro@codesourcery.com>
10553
10554         * linux-low.h (linux_target_ops): Add regset_bitmap member.
10555         * linux-low.c (use_linux_regsets): New macro.
10556         [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10557         [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10558         (linux_register_in_regsets): New function.
10559         (usr_fetch_inferior_registers): Skip registers covered by
10560         regsets.
10561         (usr_store_inferior_registers): Likewise.
10562         (usr_fetch_inferior_registers): New macro.
10563         (usr_store_inferior_registers): Likewise.
10564         (linux_fetch_registers): Handle mixed regset/non-regset targets.
10565         (linux_store_registers): Likewise.
10566         * linux-mips-low.c (init_registers_mips_dsp_linux): New
10567         prototype.
10568         (init_registers_mips64_dsp_linux): Likewise.
10569         (init_registers_mips_linux): New macro.
10570         (init_registers_mips_dsp_linux): Likewise.
10571         (mips_dsp_num_regs): Likewise.
10572         (DSP_BASE, DSP_CONTROL): New fallback macros.
10573         (mips_base_regs): New macro.
10574         (mips_regmap): Use it.  Fix the size.
10575         (mips_dsp_regmap): New variable.
10576         (mips_dsp_regset_bitmap): Likewise.
10577         (mips_arch_setup): New function.
10578         (mips_cannot_fetch_register): Use the_low_target.regmap rather
10579         than mips_regmap.
10580         (mips_cannot_store_register): Likewise.
10581         (the_low_target): Update .arch_setup, .num_regs and .regmap
10582         initializers.  Add .regset_bitmap initializer.
10583         * linux-arm-low.c (the_low_target): Add .regset_bitmap
10584         initializer.
10585         * linux-bfin-low.c (the_low_target): Likewise.
10586         * linux-cris-low.c (the_low_target): Likewise.
10587         * linux-crisv32-low.c (the_low_target): Likewise.
10588         * linux-ia64-low.c (the_low_target): Likewise.
10589         * linux-m32r-low.c (the_low_target): Likewise.
10590         * linux-m68k-low.c (the_low_target): Likewise.
10591         * linux-ppc-low.c (the_low_target): Likewise.
10592         * linux-s390-low.c (the_low_target): Likewise.
10593         * linux-sh-low.c (the_low_target): Likewise.
10594         * linux-sparc-low.c (the_low_target): Likewise.
10595         * linux-tic6x-low.c (the_low_target): Likewise.
10596         * linux-x86-low.c (the_low_target): Likewise.
10597         * linux-xtensa-low.c (the_low_target): Likewise.
10598         * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10599         mips64-dsp-linux.o to srv_regobj.  Add mips-dsp-linux.xml,
10600         mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10601         srv_xmlfiles.
10602         * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10603         (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10604
10605 2012-02-29  Yao Qi  <yao@codesourcery.com>
10606             Pedro Alves  <palves@redhat.com>
10607
10608         * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10609         `step_over_finished' is true.
10610
10611 2012-02-27  Pedro Alves  <palves@redhat.com>
10612
10613         * linux-low.c (pid_is_stopped): Delete, moved to common/.
10614         (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10615
10616 2012-02-27  Pedro Alves  <palves@redhat.com>
10617
10618         PR server/9684
10619         * linux-low.c (pid_is_stopped): New.
10620         (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10621
10622 2012-02-25  Luis Machado  <lgustavo@codesourcery.com>
10623
10624         * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10625         of conditions.
10626
10627 2012-02-24  Maciej W. Rozycki  <macro@codesourcery.com>
10628
10629         * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10630
10631 2012-02-24  Luis Machado  <lgustavo@codesourcery>
10632
10633         * server.c (handle_query): Advertise support for target-side
10634         breakpoint condition evaluation.
10635         (process_point_options): New function.
10636         (process_serial_event): When inserting a breakpoint, check for
10637         a target-side condition that should be evaluated.
10638
10639         * mem-break.c: Include regcache.h and ax.h.
10640         (point_cond_list_t): New data structure.
10641         (breakpoint) <cond_list>: New field.
10642         (find_gdb_breakpoint_at): Make non-static.
10643         (delete_gdb_breakpoint_at): Clear any target-side
10644         conditions.
10645         (clear_gdb_breakpoint_conditions): New function.
10646         (add_condition_to_breakpoint): Likewise.
10647         (add_breakpoint_condition): Likewise.
10648         (gdb_condition_true_at_breakpoint): Likewise.
10649         (gdb_breakpoint_here): Return result directly instead
10650         of going through a local variable.
10651
10652         * mem-break.h (find_gdb_breakpoint_at): New prototype.
10653         (clear_gdb_breakpoint_conditions): Likewise.
10654         (add_breakpoint_condition): Likewise.
10655         (gdb_condition_true_at_breakpoint): Likewise.
10656
10657         * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10658         (need_step_over_p): Take target-side breakpoint condition into
10659         consideration.
10660
10661 2012-02-24  Luis Machado  <lgustavo@codesourcery>
10662
10663         * server.h: Include tracepoint.h.
10664         (agent_mem_read, agent_get_trace_state_variable_value,
10665         agent_set_trace_state_variable_value,
10666         agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10667         get_set_tsv_func_addr): New prototypes.
10668
10669         * ax.h: New include file.
10670         * ax.c: New source file.
10671
10672         * tracepoint.c: Include ax.h.
10673         (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10674         agent_expr, eval_result_type): Move to ax.h.
10675         (parse_agent_expr): Rename to ...
10676         (gdb_parse_agent_expr): ... this, make it non-static and move
10677         to ax.h.
10678         (unparse_agent_expr) Rename to ...
10679         (gdb_unparse_agent_expr): ... this, make it non-static and move
10680         to ax.h.
10681         (eval_agent_expr): Rename to ...
10682         (eval_tracepoint_agent_expr): ... this.
10683         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10684         forward declarations.
10685         (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10686         (agent_get_trace_state_variable_value): New function.
10687         (agent_set_trace_state_variable_value): New function.
10688         (cmd_qtdp): Call gdb_parse_agent_expr (...).
10689         (response_tracepoint): Call gdb_unparse_agent_expr (...).
10690         (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10691         (condition_true_at_tracepoint): Likewise.
10692         (parse_agent_expr): Rename to ...
10693         (gdb_parse_agent_expr): ... this and move to ax.c.
10694         (unparse_agent_expr): Rename to ...
10695         (gdb_unparse_agent_expr): ... this and move to ax.c.
10696         (gdb_agent_op_name): Move to ax.c.
10697         (eval_agent_expr): Rename to ...
10698         (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10699         and move to ax.c.
10700         (eval_tracepoint_agent_expr): New function.
10701         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10702         non-static.
10703         (current_insn_ptr, emit_error, struct bytecode_address): Move to
10704         ax.c.
10705         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10706         emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10707         emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10708         emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10709         emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10710         emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10711         emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10712         emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10713         (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10714         (compile_bytecodes): Remove forward declaration.
10715         (is_goto_target): Move to ax.c.
10716         (compile_bytecodes): Move to ax.c and call
10717         agent_get_trace_state_variable_value (...) and
10718         agent_set_trace_state_variable_value (...).
10719
10720         * Makefile.in: Update ax.c and IPA dependencies.
10721
10722 2012-02-24  Pedro Alves  <palves@redhat.com>
10723
10724         * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10725         (cmd_bigqtbuffer_circular): ... this.  Only handle
10726         'QTBuffer:circular:'.
10727         (handle_tracepoint_general_set): Adjust.
10728
10729 2012-02-16  Yao Qi  <yao@codesourcery.com>
10730
10731         * inferiors.c: Move code to ...
10732         * dll.c: .... here.  New.
10733         * server.h: Declare clear_dlls.
10734         * Makefile.in (SFILES): Add dll.c.
10735         (OBS): Add dll.o
10736         (dll.o): New rule.
10737
10738 2012-02-11  Yao Qi  <yao@codesourcery.com>
10739
10740         * server.c: (handle_monitor_command): Add a new parameter
10741         `own_buf'.
10742         (handle_query): Update caller.
10743
10744 2012-02-09  Joel Brobecker  <brobecker@adacore.com>
10745
10746         * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10747         * configure, config.in: Regenerate.
10748         * hostio.c: Provide an alternate implementation if HAVE_READLINK
10749         is not defined.
10750
10751 2012-02-02  Pedro Alves  <palves@redhat.com>
10752
10753         Try SIGKILL first, then PTRACE_KILL.
10754         * linux-low.c (linux_kill_one_lwp): New.
10755         (linux_kill_one_lwp): Rename to ...
10756         (kill_one_lwp_callback): ... this.  Use the new
10757         linux_kill_one_lwp.
10758
10759 2012-02-02  Pedro Alves  <palves@redhat.com>
10760
10761         * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10762         inferior.
10763
10764 2012-01-27  Pedro Alves  <palves@redhat.com>
10765
10766         * linux-low.c (linux_child_pid_to_exec_file): Delete.
10767         (elf_64_file_p): Make static.
10768         (linux_pid_exe_is_elf_64_file): New.
10769         * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10770         Delete declarations.
10771         (linux_pid_exe_is_elf_64_file): Declare.
10772         * linux-x86-low.c (x86_arch_setup): Use
10773         linux_pid_exe_is_elf_64_file.
10774
10775 2012-01-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
10776
10777         * linux-low.c (linux_wait_for_event_1): Rename to ...
10778         (linux_wait_for_event): ... here and merge it with former
10779         linux_wait_for_event - new variable wait_ptid, use it.
10780         (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10781
10782 2012-01-23  Pedro Alves  <palves@redhat.com>
10783
10784         * server.c (main): Avoid yet another case of infinite loop while
10785         detaching/killing after a longjmp.
10786
10787 2012-01-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10788
10789         Code cleanup.
10790         * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10791
10792 2012-01-20  Ulrich Weigand  <ulrich.weigand@linaro.org>
10793
10794         * hostio.c (handle_readlink): New function.
10795         (handle_vFile): Call it to handle "vFile:readlink" packets.
10796
10797 2012-01-20  Pedro Alves  <palves@redhat.com>
10798             Ulrich Weigand  <ulrich.weigand@linaro.org>
10799
10800         * server.c (handle_v_requests): Only support vAttach and vRun to
10801         start multiple processes when in extended protocol mode.
10802
10803 2012-01-17  Pedro Alves  <palves@redhat.com>
10804
10805         * tracepoint.c (initialize_tracepoint): Use mmap instead of
10806         memalign plus mprotect to allocate the scratch buffer.
10807
10808 2012-01-13  Pedro Alves  <palves@redhat.com>
10809
10810         * server.c (attach_inferior): Clear `cont_thread'.
10811
10812 2012-01-13  Pedro Alves  <palves@redhat.com>
10813
10814         * server.c (main): Avoid infinite loop while detaching/killing
10815         after a longjmp.
10816
10817 2012-01-09  Doug Evans  <dje@google.com>
10818
10819         * server.c (start_inferior): Set last_ptid in --wrapper case.
10820
10821 2012-01-06  Yao Qi  <yao@codesourcery.com>
10822
10823         * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10824         defined.
10825         [IN_PROCESS_AGENT] (debug_agent): New global variable.
10826
10827 2012-01-04  Yao Qi  <yao@codesourcery.com>
10828
10829         * tracepoint.c (cmd_qtdp): Print debug message
10830         for static tracepoint.
10831
10832 2012-01-04  Yao Qi  <yao@codesourcery.com>
10833
10834         * tracepoint.c (trace_vdebug): Differentiate debug message
10835         between gdbserver and IPA.
10836
10837 2012-01-03  Yao Qi  <yao@codesourcery.com>
10838
10839         * tracepoint.c (tracepoint_was_hit): Don't collect for
10840         static tracepoint.
10841
10842 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
10843
10844         * terminal.h: Reformat copyright header.
10845
10846 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
10847
10848         * server.c (gdbserver_version): Update copyright year.
10849         * gdbreplay.c (gdbreplay_version): Likewise.
10850
10851 2011-12-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
10852
10853         * linux-low.c (linux_create_inferior): Put empty if clause for write.
10854
10855         Revert:
10856         2011-12-18  Hui Zhu  <teawater@gmail.com>
10857         * linux-low.c (linux_create_inferior): Save return value to ret.
10858
10859 2011-12-18  Hui Zhu  <teawater@gmail.com>
10860
10861         * linux-low.c (linux_create_inferior): Save return value to ret.
10862
10863 2011-12-16  Doug Evans  <dje@google.com>
10864
10865         * linux-low.c (linux_create_inferior): If stdio connection,
10866         redirect stdin from /dev/null, stdout to stderr.
10867         * remote-utils.c (remote_is_stdio): New static global.
10868         (remote_connection_is_stdio): New function.
10869         (remote_prepare): Handle stdio connection.
10870         (remote_open): Ditto.
10871         (remote_close): Don't close stdin for stdio connections.
10872         (read_prim,write_prim): New functions.  Replace all calls to
10873         read/write to these.
10874         * server.c (main): Watch for "-" argument.  Move call to
10875         remote_prepare before start_inferior.
10876         * server.h (STDIO_CONNECTION_NAME): New macro.
10877         (remote_connection_is_stdio): Declare.
10878
10879         * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10880         in debugging output.
10881
10882 2011-12-15  Yao Qi  <yao@codesourcery.com>
10883
10884         * tracepoint.c: Include sys/syscall.h.
10885         (gdb_ust_thread): Remove preprocessor conditional.
10886
10887 2011-12-14  Pedro Alves  <pedro@codesourcery.com>
10888
10889         * linux-low.c (linux_detach_one_lwp): Call
10890         the_low_target.prepare_to_resume before detaching.
10891
10892 2011-12-14  Yao Qi  <yao@codesourcery.com>
10893
10894         * tracepoint.c (gdb_ust_thread): Don't ignore return value
10895         of write.
10896
10897 2011-12-14  Yao Qi  <yao@codesourcery.com>
10898
10899         * i386-low.c (i386_low_stopped_data_address): Initialize local
10900         variable `control'.
10901
10902 2011-12-13  Pedro Alves  <pedro@codesourcery.com>
10903
10904         PR remote/13492
10905
10906         * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10907         DR_CONTROL unless necessary.  Extend comments.
10908         * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10909         DR0-3 if not used.  If any watchpoint was set, clear DR_STATUS.
10910
10911 2011-12-13  Yao Qi  <yao@codesourcery.com>
10912
10913         * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10914         macros.
10915         (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10916
10917 2011-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
10918
10919         * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10920         Print new debug message for such case.
10921
10922 2011-12-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
10923
10924         Fix overlapping memcpy.
10925         * mem-break.c (set_raw_breakpoint_at): New variable buf.  Use it for
10926         the read_inferior_memory transfer.
10927         (delete_fast_tracepoint_jump): New variable buf.  Use it for the
10928         write_inferior_memory transfer.
10929         (set_fast_tracepoint_jump): New variable buf.  Use it for the
10930         read_inferior_memory and write_inferior_memory transfers.
10931         (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10932         (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10933         Use it for the write_inferior_memory transfer.
10934         (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10935         buffers.
10936
10937 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
10938
10939         * linux-low.c (fetch_register, store_register): Make code
10940         consistent, fix formatting.
10941
10942 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
10943
10944         * linux-low.c (usr_store_inferior_registers): Factor out code
10945         to handle individual registers into...
10946         (store_register): ... this new function.
10947
10948 2011-12-06  Ulrich Weigand  <uweigand@de.ibm.com>
10949
10950         * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10951         (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10952         (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10953         (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10954         (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10955         (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10956         * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10957         (srv_xmlfiles): Add new XML files.
10958
10959         * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10960         and <sys/uio.h>.
10961         (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10962         (init_registers_s390_linux32v1): Add prototype.
10963         (init_registers_s390_linux32v2): Likewise.
10964         (init_registers_s390_linux64v1): Likewise.
10965         (init_registers_s390_linux64v2): Likewise.
10966         (init_registers_s390x_linux64v1): Likewise.
10967         (init_registers_s390x_linux64v2): Likewise.
10968         (s390_num_regs): Increment to 52.
10969         (s390_regmap): Add orig_r2 register.
10970         (s390_num_regs_3264): Increment to 68.
10971         (s390_regmap_3264): Add orig_r2 register.
10972         (s390_collect_ptrace_register): Handle orig_r2 register.
10973         (s390_supply_ptrace_register): Likewise.
10974         (s390_fill_last_break): New function.
10975         (s390_store_last_break): Likewise.
10976         (s390_fill_system_call): New function.
10977         (s390_store_system_call): Likewise.
10978         (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10979         register sets.
10980         (s390_check_regset): New function.
10981         (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10982         NT_S390_SYSTEM_CALL regsets and use appropriate description.
10983         Update target_regsets for available register sets.
10984
10985 2011-12-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
10986             Jan Kratochvil  <jan.kratochvil@redhat.com>
10987
10988         * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10989         (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10990         New.
10991         (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10992         * linux-low.h (struct process_info_private): New member r_debug.
10993         * server.c (handle_qxfer_libraries): Call
10994         the_target->qxfer_libraries_svr4.
10995         (handle_qxfer_libraries_svr4): New function.
10996         (qxfer_packets): New entry "libraries-svr4".
10997         (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10998         * target.h (struct target_ops): New member qxfer_libraries_svr4.
10999         * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11000         PACKET_qXfer_libraries_svr4.
11001
11002 2011-11-30  Ulrich Weigand  <uweigand@de.ibm.com>
11003
11004         * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11005         PSW address/mask between 8-byte and 16-byte formats.
11006         (s390_supply_ptrace_register): Likewise.
11007         (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11008         basic addressing mode bit.
11009
11010 2011-11-24  Stan Shebs  <stan@codesourcery.com>
11011
11012         * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11013
11014 2011-11-17  Stan Shebs  <stan@codesourcery.com>
11015
11016         * tracepoint.c (struct tracepoint): New field traceframe_usage.
11017         (tracing_start_time): New global.
11018         (tracing_stop_time): New global.
11019         (tracing_user_name): New global.
11020         (tracing_notes): New global.
11021         (tracing_stop_note): New global.
11022         (cmd_qtstart): Set traceframe_usage, start_time.
11023         (stop_tracing): Set stop_time.
11024         (cmd_qtstatus): Report additional status.
11025         (cmd_qtp): New function.
11026         (handle_tracepoint_query): Call it.
11027         (cmd_qtnotes): New function.
11028         (handle_tracepoint_general_set): Call it.
11029         (get_timestamp): Rename from tsv_get_timestamp.
11030
11031 2011-11-14  Stan Shebs  <stan@codesourcery.com>
11032             Kwok Cheung Yeung  <kcy@codesourcery.com>
11033
11034         * linux-x86-low.c (small_jump_insn): New.
11035         (i386_install_fast_tracepoint_jump_pad): Add arguments for
11036         trampoline and error message, build a trampoline and issue a small
11037         jump instruction to it.
11038         (x86_install_fast_tracepoint_jump_pad): Add arguments for
11039         trampoline and error message.
11040         (x86_get_min_fast_tracepoint_insn_len): New.
11041         (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11042         * linux-low.h (struct linux_target_ops): Add arguments to
11043         install_fast_tracepoint_jump_pad operation, add new operation.
11044         * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11045         arguments.
11046         (linux_get_min_fast_tracepoint_insn_len): New function.
11047         (linux_target_op): Add new operation.
11048         * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11049         (gdb_trampoline_buffer_end): Ditto.
11050         (gdb_trampoline_buffer_error): Ditto.
11051         (struct ipa_sym_addresses): Add fields for new IPA variables.
11052         (symbol_list): Add entries for new IPA variables.
11053         (struct tracepoint): Add fields to hold the address range of the
11054         trampoline used by the tracepoint.
11055         (trampoline_buffer_head): New static variable.
11056         (trampoline_buffer_tail): Ditto.
11057         (claim_trampoline_space): New function.
11058         (have_fast_tracepoint_trampoline_buffer): New function.
11059         (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11060         structure.
11061         (install_fast_tracepoint): Ditto, also add error buffer argument.
11062         (cmd_qtminftpilen): New function.
11063         (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11064         (fast_tracepoint_from_trampoline_address): New function.
11065         (fast_tracepoint_collecting): Handle trampoline as part of jump
11066         pad space.
11067         (set_trampoline_buffer_space): New function.
11068         (initialize_tracepoint): Initialize new IPA variables.
11069         * target.h (struct target_ops): Add arguments to
11070         install_fast_tracepoint_jump_pad operation, add new
11071         get_min_fast_tracepoint_insn_len operation.
11072         (target_get_min_fast_tracepoint_insn_len): New.
11073         (install_fast_tracepoint_jump_pad): Add arguments.
11074         * server.h (IPA_BUFSIZ): Define.
11075         * linux-i386-ipa.c: Include extra header files.
11076         (initialize_fast_tracepoint_trampoline_buffer): New function.
11077         (initialize_low_tracepoint): Call it.
11078         * server.h (set_trampoline_buffer_space): Declare.
11079         (claim_trampoline_space): Ditto.
11080         (have_fast_tracepoint_trampoline_buffer): Ditto.
11081
11082 2011-11-14  Yao Qi  <yao@codesourcery.com>
11083
11084         * server.c (handle_query): Handle InstallInTrace for qSupported.
11085         * tracepoint.c (add_tracepoint): Sort list.
11086         (install_tracepoint, download_tracepoint): New.
11087         (cmd_qtdp): Call them to install and download tracepoints.
11088         (sort_tracepoints): Removed.
11089         (cmd_qtstart): Update.
11090
11091 2011-11-14  Yao Qi  <yao@codesourcery.com>
11092
11093         * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11094         * mem-break.h: Declare.
11095         * tracepoint.c (cmd_qtstart): Move some code to ...
11096         (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11097         New.
11098         (download_tracepoints): Move some code to ...
11099         (download_tracepoint_1): ... here.  New.
11100
11101 2011-11-08  Yao Qi  <yao@codesourcery.com>
11102
11103         * remote-utils.c (relocate_instruction): A comment fix.
11104
11105 2011-11-07  Joel Brobecker  <brobecker@adacore.com>
11106
11107         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11108         (i386_dr_low_get_control, i386_dr_low_get_status): Use
11109         dr_status_mirror and dr_control_mirror from debug_reg_state.
11110         (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11111         (i386_initial_stuff): Remove use of deleted globals.
11112         (i386_get_thread_context, i386_set_thread_context,
11113         i386_thread_added): Use dr_status_mirror and dr_control_mirror
11114         from debug_reg_state.
11115
11116 2011-11-05  Yao Qi  <yao@codesourcery.com>
11117
11118         * tracepoint.c (gdb_collect): Loop over tracepoints of same
11119         address as TPOINT's.
11120
11121 2011-11-02  Stan Shebs  <stan@codesourcery.com>
11122
11123         * tracepoint.c (agent_mem_read_string): New function.
11124         (eval_agent_expr): Call it for tracenz.
11125         * server.c (handle_query): Report support for tracenz.
11126
11127 2011-11-02  Yao Qi  <yao@codesourcery.com>
11128
11129         * tracepoint.c (cmd_qtstart): Remove unused local variables.
11130
11131 2011-11-02  Yao Qi  <yao@codesourcery.com>
11132
11133         * target.h: Fix a typo in comment.
11134
11135 2011-10-31  Pedro Alves  <pedro@codesourcery.com>
11136
11137         * mem-break.c (check_mem_write): Add `myaddr' parameter.  Don't
11138         clobber the breakpoints' shadows with fast tracepoint jumps.
11139         * mem-break.h (check_mem_write): Add `myaddr' parameter.
11140         * target.c (write_inferior_memory): Also pass MYADDR down to
11141         check_mem_write.
11142
11143 2011-10-07  Ulrich Weigand  <ulrich.weigand@linaro.org>
11144
11145         * configure.ac: Check support for personality routine.
11146         * configure: Regenerate.
11147         * config.in: Likewise.
11148         * linux-low.c: Include <sys/personality.h>.
11149         Define ADDR_NO_RANDOMIZE if necessary.
11150         (linux_create_inferior): Disable address space randomization when
11151         forking inferior, if requested.
11152         (linux_supports_disable_randomization): New function.
11153         (linux_target_ops): Install it.
11154         * server.h (disable_randomization): Declare.
11155         * server.c (disable_randomization): New global variable.
11156         (handle_general_set): Handle QDisableRandomization.
11157         (handle_query): Likewise for qSupported.
11158         (main): Support --disable-randomization and --no-disable-randomization
11159         command line arguments.
11160         * target.h (struct target_ops): Add supports_disable_randomization.
11161         (target_supports_disable_randomization): New macro.
11162
11163 2011-09-29  Mike Frysinger  <vapier@gentoo.org>
11164
11165         * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11166         ifdef check.
11167         [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11168         [!PT_GETDSBT] (target_loadmap): New definition.
11169         (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11170         (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11171         LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11172         and PT_GETDSBT to LINUX_LOADMAP.
11173         [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11174         (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11175
11176 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
11177
11178         * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11179         (arm_linux_hwbp_cap): New static variable.
11180         (arm_linux_get_hwbp_cap): Replace by ...
11181         (arm_linux_init_hwbp_cap): ... this new function.
11182         (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11183         (arm_linux_get_hw_watchpoint_count): Likewise.
11184         (arm_linux_get_hw_watchpoint_max_length): Likewise.
11185         (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11186         (arm_prepare_to_resume): Use perror_with_name instead of error.
11187
11188 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
11189
11190         * linux-arm-low.c: Include <signal.h>.
11191         (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11192         (struct arm_linux_hwbp_cap): New data type.
11193         (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11194         (struct arm_linux_hw_breakpoint): New data type.
11195         (MAX_BPTS, MAX_WPTS): Define.
11196         (struct arch_process_info, struct arch_lwp_info): New data types.
11197         (arm_linux_get_hwbp_cap): New function.
11198         (arm_linux_get_hw_breakpoint_count): Likewise.
11199         (arm_linux_get_hw_watchpoint_count): Likewise.
11200         (arm_linux_get_hw_watchpoint_max_length): Likewise.
11201         (arm_hwbp_control_initialize): Likewise.
11202         (arm_hwbp_control_is_enabled): Likewise.
11203         (arm_hwbp_control_is_initialized): Likewise.
11204         (arm_hwbp_control_disable): Likewise.
11205         (arm_linux_hw_breakpoint_equal): Likewise.
11206         (arm_linux_hw_point_initialize): Likewise.
11207         (struct update_registers_data): New data structure.
11208         (update_registers_callback: New function.
11209         (arm_insert_point): Likewise.
11210         (arm_remove_point): Likewise.
11211         (arm_stopped_by_watchpoint): Likewise.
11212         (arm_stopped_data_address): Likewise.
11213         (arm_new_process): Likewise.
11214         (arm_new_thread): Likewise.
11215         (arm_prepare_to_resume): Likewise.
11216         (the_low_target): Register arm_insert_point, arm_remove_point,
11217         arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11218         arm_new_thread, and arm_prepare_to_resume.
11219
11220 2011-09-15  Stan Shebs  <stan@codesourcery.com>
11221
11222         * server.h (struct emit_ops): Add compare-goto fields.
11223         * tracepoint.c (gdb_agent_op_sizes): New table.
11224         (emit_eq_goto): New function.
11225         (emit_ne_goto): New function.
11226         (emit_lt_goto): New function.
11227         (emit_le_goto): New function.
11228         (emit_gt_goto): New function.
11229         (emit_ge_goto): New function.
11230         (is_goto_target): New function.
11231         (compile_bytecodes): Recognize special cases of compare-goto
11232         combinations and call specialized emitters for them.
11233         * linux-x86-low.c (amd64_emit_eq_goto): New function.
11234         (amd64_emit_ne_goto): New function.
11235         (amd64_emit_lt_goto): New function.
11236         (amd64_emit_le_goto): New function.
11237         (amd64_emit_gt_goto): New function.
11238         (amd64_emit_ge_goto): New function.
11239         (amd64_emit_ops): Add the new functions.
11240         (i386_emit_eq_goto): New function.
11241         (i386_emit_ne_goto): New function.
11242         (i386_emit_lt_goto): New function.
11243         (i386_emit_le_goto): New function.
11244         (i386_emit_gt_goto): New function.
11245         (i386_emit_ge_goto): New function.
11246         (i386_emit_ops): Add the new functions.
11247
11248 2011-09-08  Stan Shebs  <stan@codesourcery.com>
11249
11250         * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11251         (i386_emit_epilogue): Restore %ebx.
11252
11253 2011-08-31  Jie Zhang  <jzhang918@gmail.com>
11254
11255         * server.c (step_thread): Remove definition.
11256         (process_serial_event): Don't handle Hs.
11257         * server.h (step_thread): Remove declaration.
11258         * target.c (set_desired_inferior): Remove use of step_thread.
11259
11260 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
11261
11262         * linux-low.c: Include linux-procfs.h.
11263         (linux_attach_lwp_1): Update comments.
11264         (linux_attach): Scan for existing threads when attaching to a
11265         process that is the tgid.
11266         * Makefile.in: Update dependencies.
11267
11268 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
11269
11270         * configure.srv: Add linux-procfs.o dependencies.
11271
11272 2011-08-14  Yao Qi  <yao@codesourcery.com>
11273
11274         * target.h (struct target_ops): Fix indent.
11275         * win32-low.c (win32_target_ops): Fix comment.
11276
11277 2011-08-14  Andrew Jenner  <andrew@codesourcery.com>
11278             Yao Qi  <yao@codesourcery.com>
11279
11280         * Makefile.in (clean): Remove tic6x-*.c files.
11281         (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11282         (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11283         (tic6x-c64xp-linux.c): Likewise.
11284         * configure.srv: Add support for tic6x-*-uclinux.
11285         * linux-tic6x-low.c: New.
11286         * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11287
11288 2011-08-14  Andrew Stubbs <ams@codesourcery.com>
11289             Yao Qi  <yao@codesourcery.com>
11290
11291         * target.h (struct target_ops): Add read_loadmap.
11292         * linux-low.c (struct target_loadseg): New type.
11293         (struct target_loadmap): New type.
11294         (linux_read_loadmap): New function.
11295         (linux_target_ops): Add linux_read_loadmap.
11296         * server.c (handle_query): Support qXfer:fdpic:read packet.
11297         * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11298         to NULL.
11299
11300 2011-08-05  Eli Zaretskii  <eliz@gnu.org>
11301
11302         * win32-low.c: Include <stdint.h>.
11303
11304 2011-07-22  Pedro Alves  <pedro@codesourcery.com>
11305
11306         * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11307         to the inferior here.
11308         (i386_remove_aligned_watchpoint): Ditto.
11309         (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11310         fit part of the watchpoint in the debug registers.
11311         (i386_update_inferior_debug_regs): New.
11312         (i386_low_insert_watchpoint): Work on a local mirror of the debug
11313         registers, and only update the inferior on success.
11314         (i386_low_remove_watchpoint): Ditto.
11315
11316 2011-07-22  Kwok Cheung Yeung  <kcy@codesourcery.com>
11317
11318         * linux-low.c (compare_ints, unique, list_threads, show_process,
11319         linux_core_of_thread): Delete.
11320         (linux_target_ops): Change linux_core_of_thread to
11321         linux_common_core_of_thread.
11322         (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11323         * utils.c (malloc_failure): Change type of argument.
11324         (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11325         * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11326         common/linux-osdata.c, common/ptid.c and common/buffer.c.
11327         (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11328         (IPA_OBJS): Add common-utils-ipa.o.
11329         (ptid_h, linux_osdata_h): New macros.
11330         (server_h): Add common/common-utils.h, common/xml-utils.h,
11331         common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11332         common/ptid.h.
11333         (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11334         ptid.o, buffer.o): New rules.
11335         (linux-low.o): Add common/linux-osdata.h as a dependency.
11336         * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11337         * configure.ac: Add AC_HEADER_DIRENT check.
11338         * config.in: Regenerate.
11339         * configure: Regenerate.
11340         * remote-utils.c (xml_escape_text): Delete.
11341         (buffer_grow, buffer_free, buffer_init, buffer_finish,
11342         buffer_xml_printf): Move to common/buffer.c.
11343         * server.c (main): Remove call to initialize_inferiors.
11344         * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11345         ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11346         ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11347         internal_error, gdb_assert, gdb_assert_fail): Delete.
11348         (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11349         buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11350         common/buffer.h.
11351         * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11352         ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11353         initialize_inferiors): Delete.
11354
11355 2011-07-20  Pedro Alves  <pedro@codesourcery.com>
11356
11357         * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11358         symbol error.
11359
11360 2011-05-31  Pedro Alves  <pedro@codesourcery.com>
11361
11362         * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11363         assertion.
11364         * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11365
11366 2011-05-26  Yao Qi  <yao@codesourcery.com>
11367
11368         * Makefile.in (thread-db.o): Track dependence to
11369         common/gdb_thread_db.h.
11370         * thread-db.c: include gdb_thread_db.h from right place.
11371
11372 2011-05-16  Adrian Cornish  <gnu@bluedreamer.com>
11373
11374         * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11375         __FILE__ and __LINE__ to internal_error.
11376
11377 2011-05-13  Doug Evans  <dje@google.com>
11378
11379         * thread-db.c (try_thread_db_load_from_sdir): New function.
11380         (try_thread_db_load_from_dir): New function.
11381         (thread_db_load_search): Handle $sdir, ignore $pdir.
11382         Remove trying of system directories if search of
11383         libthread-db-search-path fails, that is now done via $sdir.
11384
11385 2011-05-12  Kwok Cheung Yeung  <kcy@codesourcery.com>
11386
11387         * server.c (handle_query): Add EnableDisableTracepoints to the list
11388         of supported features.
11389         * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11390         tracepoints.
11391         (cmd_qtenable_disable): New.
11392         (cmd_qtstart): Install tracepoints even if disabled.
11393         (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11394         receiving a QTEnable or QTDisable packet.
11395         (gdb_collect): Skip data collection if fast tracepoint is disabled.
11396         (ust_marker_to_static_tracepoint): Do not ignore disabled static
11397         tracepoints.
11398         (gdb_probe): Skip data collection if static tracepoint is disabled.
11399
11400 2011-05-10  Doug Evans  <dje@google.com>
11401
11402         * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11403
11404 2011-05-04  Doug Evans  <dje@google.com>
11405
11406         * linux-low.c (linux_join): Skip process lookup.
11407         * spu-low.c (spu_join): Ditto.
11408         * server.c (join_inferiors_callback): Delete.
11409         (process_serial_event): For 'D' packet (detach) call join_inferior
11410         directly.
11411
11412 2011-05-04  Joseph Myers  <joseph@codesourcery.com>
11413
11414         * README: Don't mention xscale*-*-linux*.
11415         * configure.srv (xscale*-*-linux*): Don't handle target.
11416
11417 2011-04-27  Nathan Froyd  <froydnj@codesourcery.com>
11418
11419         * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11420         casting pointers.
11421         (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11422         (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11423         (i386_emit_void_call_2): Likewise.
11424
11425 2011-04-26  Yao Qi  <yao@codesourcery.com>
11426
11427         * linux-low.c: Move common macros to linux-ptrace.h.
11428         Include linux-ptrace.h.
11429         * Makefile.in (linux_ptrace_h): New.
11430         (linux-low.o): Depends on linux-ptrace.h.
11431
11432 2011-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
11433
11434         * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11435         RUN_ONCE.  Comment for the LISTEN_DESC delete_file_handler call.
11436         (remote_prepare): New function with most of the TCP code from ...
11437         (remote_open): ... here.  Detect PORT here unconditionally.  Move also
11438         setting transport_is_reliable.
11439         * server.c (run_once): New variable.
11440         (gdbserver_usage): Document it.
11441         (main): Set run_once for `--once'.  Call remote_prepare.  Exit after
11442         the first run if RUN_ONCE.
11443         * server.h (run_once, remote_prepare): New declarations.
11444
11445 2011-04-19  Tom Tromey  <tromey@redhat.com>
11446
11447         * win32-low.c (handle_load_dll): Remove duplicate "the".
11448
11449 2011-04-07  Pierre Muller  <muller@ics.u-strasbg.fr>
11450
11451         Remove support for old Cygwin 1.5 versions.
11452         * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11453         function to avoid warning.
11454         (win32_add_one_solib): Use cygwin_conv_path function to avoid
11455         warning.
11456
11457 2011-03-18  Pierre Muller  <muller@ics.u-strasbg.fr>
11458
11459         * gdbserver/server.h (Macro _): Define it if not available.
11460
11461 2011-03-14  Michael Snyder  <msnyder@vmware.com>
11462
11463         * hostio.c (handle_close): Remove unnecessary null test.
11464
11465 2011-03-10  Joel Brobecker  <brobecker@adacore.com>
11466
11467         * Makefile.in (maintainer-clean realclean distclean): Remove
11468         "make ...  subdir_do" command.
11469
11470 2011-03-10  Michael Snyder  <msnyder@vmware.com>
11471
11472         * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11473
11474         * server.c (handle_v_run): Free alloced buffer on early return.
11475
11476 2011-03-09  Yao Qi  <yao@codesourcery.com>
11477
11478         Revert:
11479         2011-03-04  Yao Qi  <yao@codesourcery.com>
11480
11481         * Makefile.in: Remove GNU make feature --directory.
11482
11483         2011-03-05  Yao Qi  <yao@codesourcery.com>
11484
11485         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11486         (subdir_do): New make target.  Copied from gdb/Makefile.
11487         (maintainer-clean, realclean, distclean, clean): Call corresponding
11488         make targets in common/Makefile.
11489
11490         2011-02-11  Yao Qi  <yao@codesourcery.com>
11491
11492         * configure.ac: Call AC_PROG_RANLIB.
11493         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
11494         * configure: Regenerate.
11495
11496 2011-03-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
11497
11498         * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11499
11500 2011-03-06  Yao Qi  <yao@codesourcery.com>
11501
11502         * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11503
11504 2011-03-05  Yao Qi  <yao@codesourcery.com>
11505
11506         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11507         (subdir_do): New make target.  Copied from gdb/Makefile.
11508         (maintainer-clean, realclean, distclean, clean): Call corresponding
11509         make targets in common/Makefile.
11510
11511 2011-03-04  Yao Qi  <yao@codesourcery.com>
11512
11513         * Makefile.in: Remove GNU make feature --directory.
11514
11515 2011-03-04  Michael Snyder  <msnyder@vmware.com>
11516
11517         * server.c (queue_stop_reply): Call xmalloc not malloc.
11518
11519 2011-03-02  Michael Snyder  <msnyder@vmware.com>
11520
11521         * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11522
11523 2011-02-28  Michael Snyder  <msnyder@vmware.com>
11524
11525         * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11526         (cmd_qtframe): Ditto.
11527         (cmd_qtbuffer): Ditto.
11528         (cmd_bigqtbuffer): Ditto.
11529
11530         * utils.c (decimal2str): Initialize 'width' to nine, then
11531         don't mess with it.
11532
11533 2011-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11534
11535         * hostio.c (require_data): Free *data, not data.
11536
11537 2011-02-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
11538
11539         * hostio.c (require_data): Use free, not xfree.
11540
11541 2011-02-27  Michael Snyder  <msnyder@vmware.com>
11542
11543         * server.c (handle_query): Discard unused value.
11544
11545         * hostio.c (require_data): Free malloc memory before returning
11546         error.
11547
11548 2011-02-26  Michael Snyder  <msnyder@vmware.com>
11549
11550         * linux-low.c (list_threads): Call closedir for dirent.
11551
11552 2011-02-27  Michael Snyder  <msnyder@vmware.com>
11553
11554         * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11555         a case statement falls through.
11556
11557         * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11558
11559         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11560         in comparison.
11561
11562 2011-02-26  Michael Snyder  <msnyder@vmware.com>
11563
11564         * utils.c (decimal2str): Eliminate dead code and dead param.
11565         (pulongest): Drop dead param from call to decimal2str.
11566         (plongest): Ditto.
11567
11568 2011-02-24  Joel Brobecker  <brobecker@adacore.com>
11569
11570         Revert the following patch (not approved yet):
11571         2011-02-21  Hui Zhu  <teawater@gmail.com>
11572         * tracepoint.c (tp_printf): New function.
11573         (eval_agent_expr): Handle gdb_agent_op_printf.
11574
11575 2011-02-21  Hui Zhu  <teawater@gmail.com>
11576
11577         * tracepoint.c (tp_printf): New function.
11578         (eval_agent_expr): Handle gdb_agent_op_printf.
11579
11580 2011-02-18  Tom Tromey  <tromey@redhat.com>
11581
11582         * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11583         (tracepoint.o): Likewise.
11584         * tracepoint.c (enum gdb_agent_op): Use ax.def.
11585         (gdb_agent_op_names): Likewise.
11586
11587 2011-02-18  Tom Tromey  <tromey@redhat.com>
11588
11589         * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11590         gdb_agent_op_rot>: New constants.
11591         (gdb_agent_op_names): Add pick and roll.
11592         (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11593         cases.
11594
11595 2011-02-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
11596
11597         * aclocal.m4: Regenerated with aclocal-1.11.1.
11598
11599 2011-02-14  Pedro Alves  <pedro@codesourcery.com>
11600
11601         * server.c (handle_qxfer_traceframe_info): New.
11602         (qxfer_packets): Register "traceframe-info".
11603         (handle_query): Report support for qXfer:traceframe-info:read+.
11604         * tracepoint.c (match_blocktype): New.
11605         (traceframe_find_block_type): Rename to ...
11606         (traceframe_walk_blocks): ... this.  Add callback filter argument,
11607         and use it.
11608         (traceframe_find_block_type): New, reimplemented on top of
11609         traceframe_walk_blocks.
11610         (build_traceframe_info_xml): New.
11611         (traceframe_read_info): New.
11612         * server.h (traceframe_read_info): Declare.
11613
11614 2011-02-11  Yao Qi  <yao@codesourcery.com>
11615
11616         * configure.ac: Call AC_PROG_RANLIB.
11617         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
11618         * configure: Regenerate.
11619
11620 2011-02-07  Pedro Alves  <pedro@codesourcery.com>
11621
11622         * server.c (gdb_read_memory): Change return semantics to allow
11623         partial transfers.
11624         (handle_search_memory_1): Adjust.
11625         (process_serial_event) <'m' packet>: Handle partial transfers.
11626         * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11627
11628 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
11629
11630         * regcache.c (init_register_cache): Initialize
11631         regcache->register_status.
11632         (free_register_cache): Release regcache->register_status.
11633         (regcache_cpy): Copy register_status.
11634         (registers_to_string): Print 'x's for unavailable registers.
11635         (supply_register): Mark the register's status valid or
11636         unavailable, depending on whether a buffer was passed in or not.
11637         (supply_register_zeroed): New.
11638         (supply_regblock): Mark the registers' status valid or
11639         unavailable, depending on whether a buffer was passed in or not.
11640         * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11641         (struct regcache): New `register_status' field.
11642         (supply_register_zeroed): Declare.
11643         * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11644         supply_register_zeroed, rather than passing a NULL buffer to
11645         supply_register.
11646         * tracepoint.c (fetch_traceframe_registers): Update comment.
11647
11648 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
11649
11650         * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11651         buffer explicit.
11652
11653 2011-01-25  Pedro Alves  <pedro@codesourcery.com>
11654
11655         * server.h (decode_xfer_write): Change prototype.
11656         * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11657         and don't extract the annex here.
11658         * server.c (decode_xfer_read): Remove `annex' parameter,
11659         and don't extract the annex here.
11660         (decode_xfer): New.
11661         (struct qxfer): New.
11662         (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11663         (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11664         (handle_qxfer_statictrace): New functions, abstracted out from
11665         handle_query, and made to use the struct qxfer interface.
11666         (handle_threads_qxfer_proper): Rename to ...
11667         (handle_qxfer_threads_proper): ... this.
11668         (handle_threads_qxfer): Rename to ...
11669         (handle_qxfer_threads): ... this.  Adjust.
11670         (qxfer_packets): New array.
11671         (handle_qxfer): New function.
11672         (handle_query): Use handle_qxfer.
11673
11674 2011-01-05  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>
11675
11676         * gdbreplay.c: Shorten lines of >= 80 columns.
11677         * linux-low.c: Ditto.
11678         * linux-ppc-low.c: Ditto.
11679         * linux-s390-low.c: Ditto.
11680         * linux-sparc-low.c: Ditto.
11681         * linux-x86-low.c: Ditto.
11682         * linux-xtensa-low.c: Ditto.
11683         * mem-break.c: Ditto.
11684         * nto-low.c: Ditto.
11685         * regcache.h: Ditto.
11686         * remote-utils.c: Ditto.
11687         * server.c: Ditto.
11688         * server.h: Ditto.
11689         * thread-db.c: Ditto.
11690         * tracepoint.c: Ditto.
11691         * utils.c: Ditto.
11692         * win32-low.h: Ditto.
11693
11694 2011-01-05  Joel Brobecker  <brobecker@adacore.com>
11695
11696         * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11697         update.
11698
11699 2011-01-01  Joel Brobecker  <brobecker@adacore.com>
11700
11701         * server.c (gdbserver_version): Update copyright year in version
11702         output.
11703         * gdbreplay.c (gdbreplay_version): Ditto.
11704
11705 2010-12-29  Jie Zhang  <jie.zhang@analog.com>
11706
11707         * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11708         * linux-bfin-low.c: New file.
11709         * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11710         PT_DATA_ADDR for BFIN targets.
11711         * Makefile.in (SFILES): Add linux-bfin-low.c.
11712         (clean): Remove reg-bfin.c.
11713         (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11714         * README: Mention supported Blackfin targets.
11715
11716 2010-12-23  Mike Frysinger  <vapier@gentoo.org>
11717
11718         * .gitignore: New file.
11719
11720 2010-11-16  Mike Frysinger  <vapier@gentoo.org>
11721
11722         * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11723
11724 2010-10-22  Jie Zhang  <jie@codesourcery.com>
11725
11726         * Makefile.in: Add FLAGS_TO_PASS variable.
11727         (install): Remove dependency of install-only and recursively
11728         invoke make for install-only.
11729
11730 2010-10-04  Doug Evans  <dje@google.com>
11731
11732         * Makefile.in (uninstall): Use $(DESTDIR).
11733
11734 2010-09-24  Pedro Alves  <pedro@codesourcery.com>
11735
11736         PR gdb/11842
11737
11738         * linux-x86-low.c (compat_siginfo_from_siginfo)
11739         (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11740         si_code is < 0.  Check for si_code == SI_TIMER before checking for
11741         si_code < 0.
11742
11743 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
11744
11745         * lynx-i386-low.c: New file.
11746         * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11747
11748 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
11749
11750         * lynx-low.c (ptrace_request_to_str): Remove handling for
11751         request values that have been removed in LynxOS 5.x.
11752
11753 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
11754
11755         * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11756         <ptrace.h>
11757
11758 2010-09-09  Nathan Sidwell  <nathan@codesourcery.com>
11759
11760         * configure.ac: Add --enable-inprocess-agent option.
11761         * configure: Rebuilt.
11762
11763 2010-09-06  Yao Qi  <yao@codesourcery.com>
11764
11765         * linux-low.c (linux_kill): Remove unused variable.
11766         (linux_stabilize_threads): Likewise.
11767         * server.c (start_inferior): Likewise.
11768         (queue_stop_reply_callback): Likewise.
11769         * tracepoint.c (do_action_at_tracepoint): Likewise.
11770
11771 2010-09-06  Yao Qi  <yao@codesourcery.com>
11772
11773         * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11774         on return.
11775
11776 2010-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
11777
11778         * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11779
11780 2010-09-06  Pedro Alves  <pedro@codesourcery.com>
11781
11782         * Makefile.in (install-only): Replace $IPA_DEPFILES with
11783         "$(IPA_DEPFILES)".
11784
11785 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
11786
11787         * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11788         gdbserver/lynx-ppc-low.c: New files.
11789         * Makefile.in (lynx_low_h): New variable.
11790         (lynx-low.o, lynx-ppc-low.o): New rules.
11791         * configure.ac: On LynxOS, link with -lnetinet.
11792         * configure.srv: Add handling of powerpc-*-lynxos* targets.
11793         * configure: regenerate.
11794
11795 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
11796
11797         * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11798         * configure.ac: Add check for vasprintf and vsnprintf.
11799         * configure, config.in: Regenerate.
11800         * server.h (vasprintf, vsnprintf): Add conditional declarations.
11801
11802 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
11803
11804         * gdbreplay.c: Move include of alloca.h up, next to include of
11805         malloc.h.
11806         * server.h: Add include of malloc.h.
11807         * mem-break.c: Remove include of malloc.h.
11808         * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11809
11810 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
11811
11812         * Makefile.in (memmem.o): Build with -Wno-error.
11813
11814 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
11815
11816         * utils.c (xsnprintf): Make non-static.
11817         * server.h: Add xsnprintf declaration.
11818         * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11819         replace calls to snprintf by calls to xsnprintf throughout.
11820
11821 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
11822
11823         * configure.ac: Add configure check for alloca.
11824         * configure, config.in: Regenerate.
11825         * server.h: Include alloca.h if it exists.
11826         * gdbreplay.c: Include alloca.h if it exists.
11827
11828 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
11829
11830         * linux-low.c (__SIGRTMIN): Define if not already defined.
11831         (linux_create_inferior): Check for __ANDROID__ rather than
11832         __SIGRTMIN.
11833         (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11834         are already deferred.
11835         (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11836         (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11837         stopped and already has a pending signal to report.
11838         (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11839         a pending signal to report or is moving out of a jump pad.
11840         (linux_init_signals): Check for __ANDROID__ rather than
11841         __SIGRTMIN.
11842
11843 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
11844
11845         * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11846         debug_threads check.  Avoid a linear search when not doing debug
11847         output.
11848
11849 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
11850
11851         * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11852         (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11853         (struct file_handler) <fd>: Change type to gdb_fildes_t.
11854         (process_event): Change local fd's type to gdb_fildes_t.
11855         (create_file_handler): Adjust prototype.
11856         (delete_file_handler): Adjust prototype.
11857         (handle_file_event): Adjust prototype.  Use pfildes.
11858         (create_file_event): Adjsut prototype.
11859         * remote-utils.c (remote_desc, listen_desc): Change type to
11860         gdb_fildes_t.
11861         * server.h: New gdb_fildes_t typedef.
11862         [USE_WIN32API]: Include winsock2.h.
11863         (delete_file_handler, add_file_handler): Adjust prototypes.
11864         (pfildes): Declare.
11865         * utils.c (pfildes): New.
11866
11867 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
11868
11869         * configure.ac (build_warnings): Add -Wno-char-subscripts.
11870         * configure: Regenerate.
11871
11872 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
11873
11874         * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11875         (linux_done_accessing_memory): ... this.
11876         (linux_target_ops): Adjust.
11877         * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11878         * nto-low.c (nto_target_ops): Adjust comment.
11879         * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11880         * spu-low.c (spu_target_ops): Adjust comment.
11881         * target.h (target_ops): Rename unprepare_to_access_memory field
11882         to done_accessing_memory.
11883         (unprepare_to_access_memory): Rename to ...
11884         (done_accessing_memory): ... this.
11885
11886 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
11887
11888         * linux-low.c (linux_prepare_to_access_memory): New.
11889         (linux_unprepare_to_access_memory): New.
11890         (linux_target_ops): Install them.
11891         * server.c (read_memory): Rename to ...
11892         (gdb_read_memory): ... this.  Use
11893         prepare_to_access_memory/prepare_to_access_memory.
11894         (write_memory): Rename to ...
11895         (gdb_write_memory): ... this.  Use
11896         prepare_to_access_memory/prepare_to_access_memory.
11897         (handle_search_memory_1): Adjust.
11898         (process_serial_event): Adjust.
11899         * target.h (struct target_ops): New fields
11900         prepare_to_access_memory and unprepare_to_access_memory.
11901         (prepare_to_access_memory, unprepare_to_access_memory): New.
11902         * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11903         prepare_to_access_memory/prepare_to_access_memory.
11904         * nto-low.c (nto_target_ops): Adjust.
11905         * spu-low.c (spu_target_ops): Adjust.
11906         * win32-low.c (win32_target_ops): Adjust.
11907
11908 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
11909
11910         * Makefile.in (WARN_CFLAGS): Get it from configure.
11911         (WERROR_CFLAGS): New.
11912         (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11913         * configure.ac: Introduce --enable-werror, which adds -Werror to
11914         the compiler command line.  Enabled by default.  Disable with
11915         --disable-werror.  Add -Wdeclaration-after-statement
11916         Wpointer-arith and -Wformat-nonliteral to warning flags.
11917         * configure: Regenerate.
11918
11919 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
11920
11921         * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11922
11923 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
11924
11925         * gdbreplay.c (remote_error): New.
11926         (gdbchar): New.
11927         (expect): Use gdbchar.  Check for error reading from GDB.
11928         Clarify sync error output.
11929         (play): Check for errors writing to GDB.
11930         * linux-low.c (sigchld_handler): Really ignore `write' errors.
11931         * remote-utils.c (getpkt): Check for errors writing to the remote
11932         descriptor.
11933
11934 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
11935
11936         * linux-low.c (linux_wait_1): Move non-debugging code out of
11937         `debug_threads' control.
11938
11939 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
11940
11941         * linux-low.c (linux_wait_1): Don't set last_status here.
11942         * server.c (push_event, queue_stop_reply_callback): Assert we're
11943         not pushing a TARGET_WAITKIND_IGNORE event.
11944         (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11945         (myresume, handle_target_event): Set the thread's last_resume_kind
11946         and last_status from the target returned status.
11947
11948 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
11949
11950         PR threads/10729
11951
11952         * linux-x86-low.c (update_debug_registers_callback): New.
11953         (i386_dr_low_set_addr): Use it.
11954         (i386_dr_low_get_addr): New.
11955         (i386_dr_low_set_control): Use update_debug_registers_callback.
11956         (i386_dr_low_get_control): New.
11957         (i386_dr_low_get_status): Adjust.
11958         * linux-low.c (linux_stop_lwp): New.
11959         * linux-low.h (linux_stop_lwp): Declare.
11960
11961         * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11962         argument instead of a i386_debug_reg_state.
11963         (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11964         a i386_debug_reg_state.
11965         (i386_insert_aligned_watchpoint): Adjust.
11966         (i386_remove_aligned_watchpoint): Adjust.
11967         (i386_low_stopped_data_address): Read the debug registers from the
11968         inferior instead of from the mirrors.
11969         * i386-low.h (struct i386_debug_reg_state): Extend comment.
11970         (i386_dr_low_get_addr): Declare.
11971         (i386_dr_low_get_control): Declare.
11972         (i386_dr_low_get_status): Change prototype.
11973
11974         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11975         (i386_dr_low_get_addr): New.
11976         (i386_dr_low_get_control): New.
11977         (i386_dr_low_get_status): Adjust prototype.  Return
11978         dr_status_mirror.
11979         (i386_initial_stuff): Clear dr_status_mirror and
11980         dr_control_mirror.
11981         (i386_get_thread_context): Adjust.
11982         (i386_set_thread_context): Adjust.
11983         (i386_thread_added): Adjust.
11984
11985 2010-08-24  Pedro Alves  <pedro@codesourcery.com>
11986
11987         * linux-low.h (linux_thread_area): Delete declaration.
11988
11989 2010-08-11  Thomas Schwinge  <thomas@codesourcery.com>
11990
11991         * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11992         after its termination.
11993
11994 2010-08-09  Pedro Alves  <pedro@codesourcery.com>
11995
11996         * linux-low.c (gdb_wants_lwp_stopped): Delete.
11997         (gdb_wants_all_stopped): Delete.
11998         (linux_wait_1): Don't call them.
11999         * server.c (handle_v_cont): Tag all threads as want-stopped.
12000         (gdb_wants_thread_stopped): Fix comments.  Tag the thread that
12001         stopped as "client-wants-stopped".
12002
12003 2010-07-31  Pedro Alves  <pedro@codesourcery.com>
12004
12005         * Makefile.in (signals_h): New.
12006         (server_h): Depend on it.
12007         (server.o): Don't depend on $(signals_def).
12008         (signals.o): Depend on $(signals_def).
12009
12010 2010-07-31  Jan Kratochvil  <jan.kratochvil@redhat.com>
12011
12012         * Makefile.in (signals_def): New.
12013         (server_h): Append include/gdb/signals.h and signals_def.
12014         (server.o): Append signals_def.
12015
12016 2010-07-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
12017
12018         * server.c (handle_target_event): Use target_signal_to_host for
12019         resume_info.sig initialization.
12020         * target.h (struct thread_resume) <sig>: New comment.
12021
12022 2010-07-20  Ozkan Sezer  <sezeroz@gmail.com>
12023
12024         * server.c (handle_query): strcpy() the returned string from paddress()
12025         instead of sprintf().
12026         * utils.c (paddress): Return phex_nz().
12027
12028 2010-07-07  Joel Brobecker  <brobecker@adacore.com>
12029
12030         * server.c (handle_v_cont): Call mourn_inferior if process
12031         just exited.
12032         (myresume): Likewise.
12033
12034 2010-07-01  Pedro Alves  <pedro@codesourcery.com>
12035
12036         Static tracepoints, and integration with UST.
12037
12038         * configure.ac: Handle --with-ust.  substitute ustlibs and ustinc.
12039         * mem-break.c (uninsert_all_breakpoints)
12040         (reinsert_all_breakpoints): New.
12041         * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12042         * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12043         (gdb_agent_ust_loaded, helper_thread_id)
12044         (gdb_agent_helper_thread_id): New macros.
12045         (struct ipa_sym_addresses): Add addr_ust_loaded,
12046         addr_helper_thread_id, addr_cmd_buf.
12047         (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12048         (in_process_agent_loaded_ust): New.
12049         (write_e_ust_not_loaded): New.
12050         (maybe_write_ipa_ust_not_loaded): New.
12051         (struct collect_static_trace_data_action): New.
12052         (enum tracepoint_type) <static_tracepoint>: New.
12053         (struct tracepoint) <handle>: Mention static tracepoints.
12054         (struct static_tracepoint_ctx): New.
12055         (CMD_BUF_SIZE): New.
12056         (add_tracepoint_action): Handle static tracepoint actions.
12057         (unprobe_marker_at): New.
12058         (clear_installed_tracepoints): Handle static tracepoints.
12059         (cmd_qtdp): Handle static tracepoints.
12060         (probe_marker_at): New.
12061         (cmd_qtstart): Handle static tracepoints.
12062         (response_tracepoint): Handle static tracepoints.
12063         (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12064         (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12065         (get_context_regcache): Handle static tracepoints.
12066         (do_action_at_tracepoint): Handle static tracepoint actions.
12067         (traceframe_find_block_type): Handle static trace data blocks.
12068         (traceframe_read_sdata): New.
12069         (download_tracepoints): Download static tracepoint actions.
12070         [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12071         (GDB_PROBE_NAME): New.
12072         (ust_ops): New.
12073         (GET_UST_SYM): New.
12074         (USTF): New.
12075         (dlsym_ust): New.
12076         (ust_marker_to_static_tracepoint): New.
12077         (gdb_probe): New.
12078         (collect_ust_data_at_tracepoint): New.
12079         (gdb_ust_probe): New.
12080         (UNIX_PATH_MAX, SOCK_DIR): New.
12081         (gdb_ust_connect_sync_socket): New.
12082         (resume_thread, stop_thread): New.
12083         (run_inferior_command): New.
12084         (init_named_socket): New.
12085         (gdb_ust_socket_init): New.
12086         (cstr_to_hexstr): New.
12087         (next_st): New.
12088         (first_marker, next_marker): New.
12089         (response_ust_marker): New.
12090         (cmd_qtfstm, cmd_qtsstm): New.
12091         (unprobe_marker_at, probe_marker_at): New.
12092         (cmd_qtstmat, gdb_ust_thread): New.
12093         (gdb_ust_init): New.
12094         (initialize_tracepoint_ftlib): Call gdb_ust_init.
12095         * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12096         (ST_REGENTRY): New.
12097         (x86_64_st_collect_regmap): New.
12098         (X86_64_NUM_ST_COLLECT_GREGS): New.
12099         (AMD64_RIP_REGNUM): New.
12100         (supply_static_tracepoint_registers): New.
12101         * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12102         (ST_REGENTRY): New.
12103         (i386_st_collect_regmap): New.
12104         (i386_NUM_ST_COLLECT_GREGS): New.
12105         (supply_static_tracepoint_registers): New.
12106         * server.c (handle_query): Handle qXfer:statictrace:read.
12107         <qSupported>: Report support for StaticTracepoints, and
12108         qXfer:statictrace:read features.
12109         * server.h (traceframe_read_sdata)
12110         (supply_static_tracepoint_registers): Declare.
12111         * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12112         (unpack_varlen_hex): Include in IPA build.
12113         * Makefile.in (ustlibs, ustinc): New.
12114         (IPA_OBJS): Add remote-utils-ipa.o.
12115         ($(IPA_LIB)): Link -ldl and -lpthread.
12116         (UST_CFLAGS): New.
12117         (IPAGENT_CFLAGS): Add UST_CFLAGS.
12118         * config.in, configure: Regenerate.
12119
12120 2010-06-20  Ian Lance Taylor  <iant@google.com>
12121             Pedro Alves  <pedro@codesourcery.com>
12122
12123         * linux-x86-low.c (always_true): Delete.
12124         (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12125         trying to fool the compiler with always_true.
12126
12127 2010-06-20  Pedro Alves  <pedro@codesourcery.com>
12128
12129         * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12130         conditions in gdbserver.
12131
12132 2010-06-19  Ulrich Weigand  <uweigand@de.ibm.com>
12133
12134         * spu-low.c (spu_read_memory): Wrap around local store limit.
12135         (spu_write_memory): Likewise.
12136
12137 2010-06-15  Pedro Alves  <pedro@codesourcery.com>
12138
12139         * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12140         (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12141         LONGEST uses.
12142         * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12143         uses.
12144         * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12145         uses with LONGEST uses.
12146
12147 2010-06-14  Stan Shebs  <stan@codesourcery.com>
12148             Pedro Alves  <pedro@codesourcery.com>
12149
12150         Bytecode compiler.
12151
12152         * linux-x86-low.c: Include limits.h.
12153         (add_insns): New.
12154         (always_true): New.
12155         (EMIT_ASM): New.
12156         (EMIT_ASM32): New.
12157         (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12158         (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12159         (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12160         (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12161         (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12162         (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12163         (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12164         (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12165         (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12166         (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12167         (amd64_emit_void_call_2): New.
12168         (amd64_emit_ops): New.
12169         (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12170         (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12171         (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12172         (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12173         (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12174         (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12175         (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12176         (i386_emit_call, i386_emit_reg, i386_emit_pop)
12177         (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12178         (i386_emit_stack_adjust, i386_emit_int_call_1)
12179         (i386_emit_void_call_2): New.
12180         (i386_emit_ops): New.
12181         (x86_emit_ops): New.
12182         (the_low_target): Install x86_emit_ops.
12183         * server.h (struct emit_ops): New.
12184         (get_raw_reg_func_addr): Declare.
12185         (current_insn_ptr, emit_error): Declare.
12186         * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12187         (set_trace_state_variable_value): New defines.
12188         (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12189         addr_get_trace_state_variable_value and
12190         addr_set_trace_state_variable_value.
12191         (symbol_list): New fields for get_raw_reg,
12192         get_trace_state_variable_value and set_trace_state_variable_value.
12193         (condfn): New typedef.
12194         (struct tracepoint): New field `compiled_cond'.
12195         (do_action_at_tracepoint): Clear compiled_cond.
12196         (get_trace_state_variable_value, set_trace_state_variable_value):
12197         Export in the IPA.
12198         (condition_true_at_tracepoint): If there's a compiled condition,
12199         run that.
12200         (current_insn_ptr, emit_error): New globals.
12201         (struct bytecode_address): New.
12202         (get_raw_reg_func_addr): New.
12203         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12204         (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12205         (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12206         (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12207         (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12208         (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12209         (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12210         (compile_tracepoint_condition, compile_bytecodes): New.
12211         * target.h (emit_ops): Forward declare.
12212         (struct target_ops): New field emit_ops.
12213         (target_emit_ops): New.
12214         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12215         * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12216         * linux-low.c (linux_emit_ops): New.
12217         (linux_target_ops): Install it.
12218         * linux-low.h (struct linux_target_ops): New field emit_ops.
12219
12220 2010-06-14  Ulrich Weigand  <uweigand@de.ibm.com>
12221
12222         * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12223         * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12224
12225 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
12226             Stan Shebs  <stan@codesourcery.com>
12227
12228         * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12229         (all): Depend on $(extra_libraries).
12230         (install-only): Install the IPA.
12231         (IPA_OBJS, IPA_LIB): New.
12232         (clean): Remove the IPA lib.
12233         (IPAGENT_CFLAGS): New.
12234         (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12235         (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12236         (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12237         * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12238         * configure.ac: Check for atomic builtins support in the compiler.
12239         (IPA_DEPFILES, extra_libraries): Define.
12240         * configure.srv (ipa_obj): Add description.
12241         (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12242         (i[34567]86-*-linux*): Set ipa_obj.
12243         (x86_64-*-linux*): Set ipa_obj.
12244         * linux-low.c (stabilizing_threads): New.
12245         (supports_fast_tracepoints): New.
12246         (linux_detach): Stabilize threads before detaching.
12247         (handle_tracepoints): Handle internal tracing breakpoints.  Assert
12248         the lwp is either not stabilizing, or is moving out of a jump pad.
12249         (linux_fast_tracepoint_collecting): New.
12250         (maybe_move_out_of_jump_pad): New.
12251         (enqueue_one_deferred_signal): New.
12252         (dequeue_one_deferred_signal): New.
12253         (linux_wait_for_event_1): If moving out of a jump pad, defer
12254         pending signals to later.
12255         (linux_stabilize_threads): New.
12256         (linux_wait_1): Check if threads need moving out of jump pads, and
12257         do it if so.
12258         (stuck_in_jump_pad_callback): New.
12259         (move_out_of_jump_pad_callback): New.
12260         (lwp_running): New.
12261         (linux_resume_one_lwp): Handle moving out of jump pads.
12262         (linux_set_resume_request): Dequeue deferred signals.
12263         (need_step_over_p): Also step over fast tracepoint jumps.
12264         (start_step_over): Also uninsert fast tracepoint jumps.
12265         (finish_step_over): Also reinsert fast tracepoint jumps.
12266         (linux_install_fast_tracepoint_jump): New.
12267         (linux_target_ops): Install linux_stabilize_threads and
12268         linux_install_fast_tracepoint_jump_pad.
12269         * linux-low.h (linux_target_ops) <get_thread_area,
12270         install_fast_tracepoint_jump_pad>: New fields.
12271         (struct lwp_info) <collecting_fast_tracepoint,
12272         pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12273         (linux_get_thread_area): Declare.
12274         * linux-x86-low.c (jump_insn): New.
12275         (x86_get_thread_area): New.
12276         (append_insns): New.
12277         (push_opcode): New.
12278         (amd64_install_fast_tracepoint_jump_pad): New.
12279         (i386_install_fast_tracepoint_jump_pad): New.
12280         (x86_install_fast_tracepoint_jump_pad): New.
12281         (the_low_target): Install x86_get_thread_area and
12282         x86_install_fast_tracepoint_jump_pad.
12283         * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12284         (struct fast_tracepoint_jump): New.
12285         (fast_tracepoint_jump_insn): New.
12286         (fast_tracepoint_jump_shadow): New.
12287         (find_fast_tracepoint_jump_at): New.
12288         (fast_tracepoint_jump_here): New.
12289         (delete_fast_tracepoint_jump): New.
12290         (set_fast_tracepoint_jump): New.
12291         (uninsert_fast_tracepoint_jumps_at): New.
12292         (reinsert_fast_tracepoint_jumps_at): New.
12293         (set_breakpoint_at): Use write_inferior_memory.
12294         (uninsert_raw_breakpoint): Use write_inferior_memory.
12295         (check_mem_read): Mask out fast tracepoint jumps.
12296         (check_mem_write): Mask out fast tracepoint jumps.
12297         * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12298         (set_fast_tracepoint_jump): Declare.
12299         (delete_fast_tracepoint_jump)
12300         (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12301         (reinsert_fast_tracepoint_jumps_at): Declare.
12302         * regcache.c: Don't compile many functions when building the
12303         in-process agent library.
12304         (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12305         the register buffer in the heap.
12306         (free_register_cache): If the register buffer isn't owned by the
12307         regcache, don't free it.
12308         (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12309         pre-existing register caches.
12310         * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12311         type.
12312         (convert_ascii_to_int): : Constify `from' parameter type.
12313         (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12314         a `to_p' pointer to pointer parameter.  If TO_P is NULL, malloc
12315         the needed buffer in-place.
12316         (relocate_instruction): New.
12317         * server.c (handle_query) <qSymbols>: If the target supports
12318         tracepoints, give it a chance of looking up symbols.  Report
12319         support for fast tracepoints.
12320         (handle_status): Stabilize threads.
12321         (process_serial_event): Adjust.
12322         * server.h (struct fast_tracepoint_jump): Forward declare.
12323         (struct process_info) <fast_tracepoint_jumps>: New field.
12324         (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12325         (decode_X_packet, decode_M_packet): Adjust.
12326         (relocate_instruction): Declare.
12327         (in_process_agent_loaded): Declare.
12328         (tracepoint_look_up_symbols): Declare.
12329         (struct fast_tpoint_collect_status): Declare.
12330         (fast_tracepoint_collecting): Declare.
12331         (force_unlock_trace_buffer): Declare.
12332         (handle_tracepoint_bkpts): Declare.
12333         (initialize_low_tracepoint)
12334         (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12335         * target.h (struct target_ops) <stabilize_threads,
12336         install_fast_tracepoint_jump_pad>: New fields.
12337         (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12338         * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12339         [HAVE_STDINT_H]: Include stdint.h.
12340         (trace_debug_1): Rename to ...
12341         (trace_vdebug): ... this.
12342         (trace_debug): Rename to ...
12343         (trace_debug_1): ... this.  Add `level' parameter.
12344         (trace_debug): New.
12345         (ATTR_USED, ATTR_NOINLINE): New.
12346         (IP_AGENT_EXPORT): New.
12347         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12348         (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12349         (about_to_request_buffer_space, trace_buffer_is_full)
12350         (stopping_tracepoint, expr_eval_result, error_tracepoint)
12351         (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12352         (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12353         (traceframe_write_count, traceframes_created)
12354         (trace_state_variables)
12355         New renaming defines.
12356         (struct ipa_sym_addresses): New.
12357         (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12358         (symbol_list): New.
12359         (ipa_sym_addrs): New.
12360         (all_tracepoint_symbols_looked_up): New.
12361         (in_process_agent_loaded): New.
12362         (write_e_ipa_not_loaded): New.
12363         (maybe_write_ipa_not_loaded): New.
12364         (tracepoint_look_up_symbols): New.
12365         (debug_threads) [IN_PROCESS_AGENT]: New.
12366         (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12367         (UNKNOWN_SIDE_EFFECTS): New.
12368         (stop_tracing): New.
12369         (flush_trace_buffer): New.
12370         (stop_tracing_bkpt): New.
12371         (flush_trace_buffer_bkpt): New.
12372         (read_inferior_integer): New.
12373         (read_inferior_uinteger): New.
12374         (read_inferior_data_pointer): New.
12375         (write_inferior_data_pointer): New.
12376         (write_inferior_integer): New.
12377         (write_inferior_uinteger): New.
12378         (struct collect_static_trace_data_action): Delete.
12379         (enum tracepoint_type): New.
12380         (struct tracepoint) <type>: New field `type'.
12381         <actions_str, step_actions, step_actions_str>: Only include in
12382         GDBserver.
12383         <orig_size, obj_addr_on_target, adjusted_insn_addr>
12384         <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12385         (tracepoints): Use IP_AGENT_EXPORT.
12386         (last_tracepoint): Don't include in the IPA.
12387         (stopping_tracepoint): Use IP_AGENT_EXPORT.
12388         (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12389         (alloced_trace_state_variables): New.
12390         (trace_state_variables): Use IP_AGENT_EXPORT.
12391         (traceframe_t): Delete unused variable.
12392         (circular_trace_buffer): Don't include in the IPA.
12393         (trace_buffer_start): Delete.
12394         (struct trace_buffer_control): New.
12395         (trace_buffer_free): Delete.
12396         (struct ipa_trace_buffer_control): New.
12397         (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12398         (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12399         New.
12400         (trace_buffer_ctrl): New.
12401         (TRACE_BUFFER_CTRL_CURR): New.
12402         (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12403         Reimplement as macros.
12404         (trace_buffer_wrap): Delete.
12405         (traceframe_write_count, traceframe_read_count)
12406         (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12407         (struct tracepoint_hit_ctx) <type>: New field.
12408         (struct fast_tracepoint_ctx): New.
12409         (memory_barrier): New.
12410         (cmpxchg): New.
12411         (record_tracepoint_error): Update atomically in the IPA.
12412         (clear_inferior_trace_buffer): New.
12413         (about_to_request_buffer_space): New.
12414         (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12415         updating the same buffer.
12416         (add_tracepoint): Default the tracepoint's type to trap
12417         tracepoint, and orig_size to -1.
12418         (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12419         internal variables.
12420         (create_trace_state_variable): New parameter `gdb'.  Handle it.
12421         (clear_installed_tracepoints): Clear fast tracepoint jumps.
12422         (cmd_qtdp): Handle fast tracepoints.
12423         (cmd_qtdv): Adjust.
12424         (max_jump_pad_size): New.
12425         (gdb_jump_pad_head): New.
12426         (get_jump_space_head): New.
12427         (claim_jump_space): New.
12428         (sort_tracepoints): New.
12429         (MAX_JUMP_SIZE): New.
12430         (cmd_qtstart): Handle fast tracepoints.  Sync tracepoints with the
12431         IPA.
12432         (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12433         support.  Upload fast traceframes, and delete internal IPA
12434         breakpoints.
12435         (stop_tracing_handler): New.
12436         (flush_trace_buffer_handler): New.
12437         (cmd_qtstop): Upload fast tracepoints.
12438         (response_tracepoint): Handle fast tracepoints.
12439         (tracepoint_finished_step): Upload fast traceframes.  Set the
12440         tracepoint hit context's tracepoint type.
12441         (handle_tracepoint_bkpts): New.
12442         (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12443         type.  Add comment about fast tracepoints.
12444         (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12445         non-existing action_str field.
12446         (get_context_regcache): Handle fast tracepoints.
12447         (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12448         to the regcache.
12449         (fast_tracepoint_from_jump_pad_address): New.
12450         (fast_tracepoint_from_ipa_tpoint_address): New.
12451         (collecting_t): New.
12452         (force_unlock_trace_buffer): New.
12453         (fast_tracepoint_collecting): New.
12454         (collecting): New.
12455         (gdb_collect): New.
12456         (write_inferior_data_ptr): New.
12457         (target_tp_heap): New.
12458         (target_malloc): New.
12459         (download_agent_expr): New.
12460         (UALIGN): New.
12461         (download_tracepoints): New.
12462         (download_trace_state_variables): New.
12463         (upload_fast_traceframes): New.
12464         (IPA_FIRST_TRACEFRAME): New.
12465         (IPA_NEXT_TRACEFRAME_1): New.
12466         (IPA_NEXT_TRACEFRAME): New.
12467         [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12468         [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12469         (gdb_jump_pad_buffer_end): New.
12470         [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12471         (initialize_tracepoint): Adjust.
12472         [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12473         buffer.  Initialize the low module.
12474         * utils.c (PREFIX, TOOLNAME): New.
12475         (malloc_failure): Use PREFIX.
12476         (error): In the IPA, an error causes an exit.
12477         (fatal, warning): Use PREFIX.
12478         (internal_error): Use TOOLNAME.
12479         (NUMCELLS): Increase to 10.
12480         * configure, config.in: Regenerate.
12481
12482 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
12483
12484         * server.c (handle_query) <qSupported>: Do two passes over the
12485         qSupported string to avoid nesting strtok.
12486
12487 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
12488
12489         * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12490         (CDEPS): New.
12491         * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping.  Test also
12492         -Wl,--dynamic-list.
12493         * configure: Regenerate.
12494         * proc-service.list: New.
12495
12496 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
12497
12498         * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12499         New comment.
12500
12501 2010-05-26  Ozkan Sezer  <sezeroz@gmail.com>
12502
12503         * gdbreplay.c (remote_open): Check error return from socket() call by
12504         its equality to -1 not by it being negative.
12505         * remote-utils.c (remote_open): Likewise.
12506
12507 2010-05-23  Pedro Alves  <pedro@codesourcery.com>
12508
12509         * config.h: Regenerate.
12510
12511 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
12512
12513         * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12514         doesn't provide PTRACE_GET_THREAD_AREA.
12515
12516 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
12517
12518         * linux-m68k-low.c: Include <asm/ptrace.h>
12519         (ps_get_thread_area): Implement.
12520
12521 2010-05-03  Doug Evans  <dje@google.com>
12522
12523         * event-loop.c (struct callback_event): New struct.
12524         (callback_list): New global.
12525         (append_callback_event, delete_callback_event): New functions.
12526         (process_callback): New function.
12527         (start_event_loop): Call it.
12528         * remote-utils.c (NOT_SCHEDULED): Define.
12529         (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12530         moved out of readchar.
12531         (readchar): Rewrite.  Call reschedule before returning.
12532         (reset_readchar): New function.
12533         (remote_close): Call it.
12534         (process_remaining, reschedule): New functions.
12535         * server.h (callback_handler_func): New typedef.
12536         (append_callback_event, delete_callback_event): Declare.
12537
12538 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
12539
12540         * proc-service.c (ps_pglobal_lookup): Use
12541         thread_db_look_up_one_symbol.
12542         * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12543         parameter.  Use it instead of all_symbols_looked_up.
12544         * server.h (struct process_info) <all_symbols_looked_up>: Delete
12545         field.
12546         (all_symbols_looked_up): Don't declare.
12547         (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12548         * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12549         field.
12550         (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12551         Set all_symbols_looked_up here.
12552         (thread_db_look_up_one_symbol): New.
12553         (thread_db_get_tls_address): Adjust.
12554         (thread_db_load_search, try_thread_db_load_1): Always allocate the
12555         thread_db object on the heap, and tentatively set it in the
12556         process structure.
12557         (thread_db_init): Don't set all_symbols_looked_up here.
12558         * linux-low.h (thread_db_look_up_one_symbol): Declare.
12559
12560 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
12561
12562         * linux-low.c (linux_kill, linux_detach): Adjust.
12563         (status_pending_p_callback): Remove redundant statement.  Check
12564         for !TARGET_WAITIKIND_IGNORE, instead of
12565         TARGET_WAITKIND_STOPPED.
12566         (handle_tracepoints): Make sure LWP is locked.  Adjust.
12567         (linux_wait_for_event_1): Adjust.
12568         (linux_cancel_breakpoints): New.
12569         (unsuspend_one_lwp): New.
12570         (unsuspend_all_lwps): New.
12571         (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12572         (send_sigstop_callback): Change return type to int, add new
12573         `except' parameter and handle it.
12574         (suspend_and_send_sigstop_callback): New.
12575         (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12576         pass them down.  If SUSPEND, also increment the lwp's suspend
12577         count.
12578         (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12579         (need_step_over_p): Don't consider suspended LWPs.
12580         (start_step_over): Adjust.
12581         (proceed_one_lwp): Change return type to int, add new `except'
12582         parameter and handle it.
12583         (unsuspend_and_proceed_one_lwp): New.
12584         (proceed_all_lwps): Use find_inferior instead of
12585         for_each_inferior.
12586         (unstop_all_lwps): Add `unsuspend' parameter.  If UNSUSPEND, them
12587         also decrement the suspend count of LWPs.  Pass `except' down,
12588         instead of hacking its suspend count.
12589         (linux_pause_all): Add `freeze' parameter.  Adjust.
12590         (linux_unpause_all): New.
12591         (linux_target_ops): Install linux_unpause_all.
12592         * server.c (handle_status): Adjust.
12593         * target.h (struct target_ops): New fields `unpause_all' and
12594         `cancel_breakpoints'.  Add new parameter to `pause_all'.
12595         (pause_all): Add new `freeze' parameter.
12596         (unpause_all): New.
12597         (cancel_breakpoints): New.
12598         * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12599         cancel breakpoints.
12600         (cmd_qtstart): Pause threads.
12601         (stop_tracing): Pause threads, and cancel breakpoints.
12602         * win32-low.c (win32_target_ops): Adjust.
12603
12604 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
12605
12606         * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12607         the inferior right away from here...
12608         (linux_wait_1): ... to here, and adjust to check the thread's
12609         last_resume_kind instead of the lwp's step or stop_expected flags.
12610
12611 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
12612
12613         * README: Use consistent `GDB' and `GDBserver' spellings.
12614
12615 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
12616
12617         * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12618         (linux_kill): Stop all lwps here.  Don't delete the main lwp here.
12619         (linux_detach_one_lwp): Assume the lwp is stopped.
12620         (any_thread_of): Delete.
12621         (linux_detach): Stop all lwps here.  Don't blindly delete all
12622         breakpoints.
12623         (delete_lwp_callback): New.
12624         (linux_mourn): Delete all lwps of the process that is gone.
12625         (linux_wait_1): Don't delete the last lwp of the process here.
12626         * mem-break.h (mark_breakpoints_out): Declare.
12627         * mem-break.c (mark_breakpoints_out): New.
12628         (free_all_breakpoints): Use it.
12629         * server.c (handle_target_event): If the process is gone, mark
12630         breakpoints out.
12631         * thread-db.c (struct thread_db) <create_bp>: New field.
12632         (thread_db_enable_reporting): Fix prototype.  Store a thread event
12633         breakpoint reference in the thread_db struct.
12634         (thread_db_load_search): Clear the thread_db object.
12635         (try_thread_db_load_1): Ditto.
12636         (switch_to_process): New.
12637         (disable_thread_event_reporting): Use it.
12638         (remove_thread_event_breakpoints): New.
12639         (thread_db_detach, thread_db_mourn): Use it.
12640
12641 2010-05-01  Pedro Alves  <pedro@codesourcery.com>
12642
12643         * linux-low.c (linux_enable_event_reporting): New.
12644         (linux_wait_for_event_1, handle_extended_wait): Use it.
12645
12646 2010-04-30  Pedro Alves  <pedro@codesourcery.com>
12647
12648         * linux-low.c (linux_kill_one_lwp, linux_kill)
12649         (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12650         (send_sigstop): Take an lwp_info as parameter instead.  Queue a
12651         SIGSTOP even if the LWP is stopped.
12652         (send_sigstop_callback): New.
12653         (stop_all_lwps): Use send_sigstop_callback instead.
12654         (linux_resume_one_thread): Adjust.
12655         (proceed_one_lwp): Still proceed an LWP that the client has
12656         requested to stop, if we haven't reported it as stopped yet.  Make
12657         sure that LWPs the client want stopped, have a pending SIGSTOP.
12658
12659 2010-04-26  Doug Evans  <dje@google.com>
12660
12661         * server.c (handle_general_set): Make static.
12662
12663         * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12664         Print received char after testing for error/eof instead of before.
12665         (input_interrupt): Tweak comment.
12666
12667 2010-04-23  Doug Evans  <dje@google.com>
12668
12669         * server.c (start_inferior): Print inferior argv if --debug.
12670
12671 2010-04-21  Aleksandar Ristovski  <aristovski@qnx.com>
12672
12673         * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12674         * nto-x86-low.c: Include server.h
12675
12676 2010-04-20  Pierre Muller  <muller@ics.u-strasbg.fr>
12677
12678         * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12679         be consistent with other sources of this directory.
12680         (init_registers_amd64): Correct name of source file of this function
12681         in the comment.
12682
12683 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
12684
12685         * configure.srv (x86_64-*-mingw*): New configuration for Windows
12686         64-bit executables.
12687
12688 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
12689
12690         * win32-i386-low.c: Add 64-bit support.
12691         (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12692         (init_registers_amd64): Declare.
12693         (mappings): Add 64-bit version of array.
12694         (init_windows_x86): New function.
12695         (the_low_target): Change init_arch field to init_windows_x86.
12696
12697 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
12698
12699         * win32-low.c: Adapt to support also 64-bit architecture.
12700         (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12701         (get_image_name): Use SIZE_T type for local variable `done'.
12702         (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12703         (toolhelp_get_dll_name): Idem.
12704         (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12705         Use uintptr_t typecast to avoid warning.
12706         (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12707         (handle_exception): Use phex_nz to avoid warning.
12708         (win32_wait): Remove unused local variable `process'.
12709
12710 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
12711
12712         * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12713         `amd64-avx.o'.
12714
12715 2010-04-17  Pierre Muller  <muller@ics.u-strasbg.fr>
12716
12717         * configure.ac: Use `ws2_32' library for srv_mingw.
12718         * configure: Regenerate.
12719         * gdbreplay.c: Include winsock2.h instead of winsock.h.
12720         * remote-utils.c: Likewise.
12721
12722 2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>
12723
12724         * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12725         if __x86_64__ is defined.
12726
12727 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
12728
12729         * configure: Regenerate.
12730
12731 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
12732
12733         * server.c (handle_query): Handle 'qGetTIBAddr' query.
12734         * target.h (target_ops): New get_tib_address field.
12735         * win32-low.h (win32_thread_info): Add thread_local_base field.
12736         * win32-low.c (child_add_thread): Add tlb argument.
12737         Set thread_local_base field to TLB.
12738         (get_child_debug_event): Adapt to child_add_thread change.
12739         (win32_get_tib_address): New function.
12740         (win32_target_ops): Set get_tib_address field to
12741         win32_get_tib_address.
12742         * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12743
12744 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
12745
12746         * linux-low.c (linux_mourn): Also remove the process.
12747         * server.c (handle_target_event): Don't remove the process here.
12748         * nto-low.c (nto_mourn): New.
12749         (nto_target_ops): Install it.
12750         * spu-low.c (spu_mourn): New.
12751         (spu_target_ops): Install it.
12752         * win32-low.c (win32_mourn): New.
12753         (win32_target_ops): Install it.
12754
12755 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
12756
12757         * server.h (buffer_xml_printf): Remove redundant `;'.
12758
12759 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
12760
12761         * regcache.c (set_register_cache): Invalidate regcaches before
12762         changing the register cache layout.
12763         (regcache_invalidate_one): Allow a NULL regcache.
12764         * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12765         regcaches before changing the register cache layout or the target
12766         regsets.
12767
12768 2010-04-12  H.J. Lu  <hongjiu.lu@intel.com>
12769
12770         * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12771         variable warning on Linux/x86-64.
12772
12773 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
12774
12775         GDBserver disconnected tracing support.
12776
12777         * linux-low.c (linux_remove_process): Delete.
12778         (add_lwp): Don't set last_resume_kind here.
12779         (linux_kill): Use `mourn'.
12780         (linux_detach): Use `thread_db_detach', and `mourn'.
12781         (linux_mourn): New.
12782         (linux_attach_lwp_1): Adjust comment.
12783         (linux_attach): last_resume_kind moved the thread_info; adjust.
12784         (status_pending_p_callback): Adjust.
12785         (linux_wait_for_event_1): Adjust.
12786         (count_events_callback, select_singlestep_lwp_callback)
12787         (select_event_lwp_callback, cancel_breakpoints_callback)
12788         (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12789         (proceed_one_lwp): Adjust.
12790         (linux_async): Add debug output.
12791         (linux_thread_stopped): New.
12792         (linux_pause_all): New.
12793         (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12794         linux_pause_all.
12795         * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12796         (thread_db_free): Delete declaration.
12797         (thread_db_detach, thread_db_mourn): Declare.
12798         * thread-db.c (thread_db_init): Use thread_db_mourn.
12799         (thread_db_free): Delete, split in two.
12800         (disable_thread_event_reporting): New.
12801         (thread_db_detach): New.
12802         (thread_db_mourn): New.
12803
12804         * server.h (struct thread_info) <last_resume_kind>: New field.
12805         <attached>: Add comment.
12806         <gdb_detached>: New field.
12807         (handler_func): Change return type to int.
12808         (handle_serial_event, handle_target_event): Ditto.
12809         (gdb_connected): Declare.
12810         (tracing): Delete.
12811         (disconnected_tracing): Declare.
12812         (stop_tracing): Declare.
12813
12814         * server.c (handle_query) <qSupported>: Report support for
12815         disconnected tracing.
12816         (queue_stop_reply_callback): Account for running threads.
12817         (gdb_wants_thread_stopped): New.
12818         (gdb_wants_all_threads_stopped): New.
12819         (gdb_reattached_process): New.
12820         (handle_status): Clear the `gdb_detached' flag of all processes.
12821         In all-stop, stop all threads.
12822         (main): Be sure to leave tfind mode.  Handle disconnected tracing.
12823         (process_serial_event): If the remote connection breaks, or if an
12824         exit was forced with "monitor exit", force an event loop exit.
12825         Handle disconnected tracing on detach.
12826         (handle_serial_event): Adjust.
12827         (handle_target_event): If GDB isn't connected, forward events back
12828         to the inferior, unless the last process exited, in which case,
12829         exit gdbserver.  Adjust interface.
12830
12831         * remote-utils.c (remote_open): Don't block in accept.  Instead
12832         register an event loop source on the listen socket file
12833         descriptor.  Refactor bits into ...
12834         (listen_desc): ... this new global.
12835         (gdb_connected): ... this new function.
12836         (enable_async_notification): ... this new function.
12837         (handle_accept_event): ... this new function.
12838         (remote_close): Clear remote_desc.
12839
12840         * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12841
12842         * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12843         New fields.
12844         (mourn_inferior): Define.
12845         (target_process_qsupported): Avoid the dangling else problem.
12846         (thread_stopped): Define.
12847         (pause_all): Define.
12848         (target_waitstatus_to_string): Declare.
12849         * target.c (target_waitstatus_to_string): New.
12850
12851         * tracepoint.c (tracing): Make extern.
12852         (disconnected_tracing): New.
12853         (stop_tracing): Make extern.  Handle tracing stops due to GDB
12854         disconnecting.
12855         (cmd_qtdisconnected): New.
12856         (cmd_qtstatus): Report disconnected tracing status in trace reply.
12857         (handle_tracepoint_general_set): Handle QTDisconnected.
12858
12859         * event-loop.c (event_handler_func): Change return type to int.
12860         (process_event): Bail out if the event handler wants the event
12861         loop to stop.
12862         (handle_file_event): Ditto.
12863         (start_event_loop): Bail out if the event handler wants the event
12864         loop to stop.
12865
12866         * nto-low.c (nto_target_ops): Adjust.
12867         * spu-low.c (spu_wait): Don't remove the process here.
12868         (spu_target_ops): Adjust.
12869         * win32-low.c (win32_wait): Don't remove the process here.
12870         (win32_target_ops): Adjust.
12871
12872 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
12873
12874         * regcache.c (realloc_register_cache): Invalidate inferior's
12875         regcache before recreating it.
12876
12877 2010-04-09  Pedro Alves  <pedro@codesourcery.com>
12878
12879         * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12880
12881 2010-04-09  Stan Shebs  <stan@codesourcery.com>
12882             Pedro Alves  <pedro@codesourcery.com>
12883
12884         * server.h (LONGEST): New.
12885         (struct thread_info) <while_stepping>: New field.
12886         (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12887         Declare.
12888         (initialize_tracepoint, handle_tracepoint_general_set)
12889         (handle_tracepoint_query, tracepoint_finished_step)
12890         (tracepoint_was_hit, release_while_stepping_state_list):
12891         (current_traceframe): Declare.
12892         * server.c (handle_general_set): Handle tracepoint packets.
12893         (read_memory): New.
12894         (write_memory): New.
12895         (handle_search_memory_1): Use read_memory.
12896         (handle_query): Report support for conditional tracepoints, trace
12897         state variables, and tracepoint sources.  Handle tracepoint
12898         queries.
12899         (main): Initialize the tracepoints module.
12900         (process_serial_event): Handle traceframe reads/writes.
12901
12902         * linux-low.c (handle_tracepoints): New.
12903         (linux_wait_1): Call it.
12904         (linux_resume_one_lwp): Handle while-stepping.
12905         (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12906         (linux_target_ops): Install them.
12907         * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12908         New field.
12909         * linux-x86-low.c (x86_supports_tracepoints): New.
12910         (the_low_target). Install it.
12911
12912         * mem-break.h (delete_breakpoint): Declare.
12913         * mem-break.c (delete_breakpoint): Make external.
12914
12915         * target.h (struct target_ops): Add `supports_tracepoints',
12916         `read_pc', and `write_pc' fields.
12917         (target_supports_tracepoints): Define.
12918         * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12919         (phex_nz): New.
12920
12921         * regcache.h (struct regcache) <registers_owned>: New field.
12922         (init_register_cache, regcache_cpy): Declare.
12923         (regcache_read_pc, regcache_write_pc): Declare.
12924         (register_cache_size): Declare.
12925         (supply_regblock): Declare.
12926         * regcache.c (init_register_cache): New.
12927         (new_register_cache): Use it.
12928         (regcache_cpy): New.
12929         (register_cache_size): New.
12930         (supply_regblock): New.
12931         (regcache_read_pc, regcache_write_pc): New.
12932
12933         * tracepoint.c: New.
12934
12935         * Makefile.in (OBS): Add tracepoint.o.
12936         (tracepoint.o): New rule.
12937
12938 2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>
12939
12940         * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12941         (i386-mmx.o): New.
12942         (i386-mmx.c): Likewise.
12943         (i386-mmx-linux.o): Likewise.
12944         (i386-mmx-linux.c): Likewise.
12945
12946         * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12947         (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12948         (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12949         (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12950
12951         * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12952         (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12953         and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12954
12955 2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>
12956
12957         * Makefile.in (clean): Updated.
12958         (i386-avx.o): New.
12959         (i386-avx.c): Likewise.
12960         (i386-avx-linux.o): Likewise.
12961         (i386-avx-linux.c): Likewise.
12962         (amd64-avx.o): Likewise.
12963         (amd64-avx.c): Likewise.
12964         (amd64-avx-linux.o): Likewise.
12965         (amd64-avx-linux.c): Likewise.
12966
12967         * configure.srv (srv_i386_regobj): Add i386-avx.o.
12968         (srv_i386_linux_regobj): Add i386-avx-linux.o.
12969         (srv_amd64_regobj): Add amd64-avx.o.
12970         (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12971         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12972         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12973         (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12974         (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12975         (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12976         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12977
12978         * i387-fp.c: Include "i386-xstate.h".
12979         (i387_xsave): New.
12980         (i387_cache_to_xsave): Likewise.
12981         (i387_xsave_to_cache): Likewise.
12982         (x86_xcr0): Likewise.
12983
12984         * i387-fp.h (i387_cache_to_xsave): Likewise.
12985         (i387_xsave_to_cache): Likewise.
12986         (x86_xcr0): Likewise.
12987
12988         * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12989         * linux-crisv32-low.c (target_regsets): Likewise.
12990         * linux-m68k-low.c (target_regsets): Likewise.
12991         * linux-mips-low.c (target_regsets): Likewise.
12992         * linux-ppc-low.c (target_regsets): Likewise.
12993         * linux-s390-low.c (target_regsets): Likewise.
12994         * linux-sh-low.c (target_regsets): Likewise.
12995         * linux-sparc-low.c (target_regsets): Likewise.
12996         * linux-xtensa-low.c (target_regsets): Likewise.
12997
12998         * linux-low.c: Include <sys/uio.h>.
12999         (regsets_fetch_inferior_registers): Support nt_type.
13000         (regsets_store_inferior_registers): Likewise.
13001         (linux_process_qsupported): New.
13002         (linux_target_ops): Add linux_process_qsupported.
13003
13004         * linux-low.h (regset_info): Add nt_type.
13005         (linux_target_ops): Add process_qsupported.
13006
13007         * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13008         and <sys/uio.h>.
13009         (init_registers_i386_avx_linux): New.
13010         (init_registers_amd64_avx_linux): Likewise.
13011         (xmltarget_i386_linux_no_xml): Likewise.
13012         (xmltarget_amd64_linux_no_xml): Likewise.
13013         (PTRACE_GETREGSET): Likewise.
13014         (PTRACE_SETREGSET): Likewise.
13015         (x86_fill_xstateregset): Likewise.
13016         (x86_store_xstateregset): Likewise.
13017         (use_xml): Likewise.
13018         (x86_linux_update_xmltarget): Likewise.
13019         (x86_linux_process_qsupported): Likewise.
13020         (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13021         (x86_arch_setup): Don't call init_registers_amd64_linux nor
13022         init_registers_i386_linux here.  Call
13023         x86_linux_update_xmltarget.
13024         (the_low_target): Add x86_linux_process_qsupported.
13025
13026         * server.c (handle_query): Call target_process_qsupported.
13027
13028         * target.h (target_ops): Add process_qsupported.
13029         (target_process_qsupported): New.
13030
13031 2010-04-03  Pedro Alves  <pedro@codesourcery.com>
13032
13033         * inferiors.c (add_thread): Set last_status kind to
13034         TARGET_WAITKIND_IGNORE.
13035         * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13036         fetch.  Use ptid_of.  Avoid unnecessary get_lwp_thread calls.
13037         (linux_wait_1): Move `thread' local definition to block that uses
13038         it.  Don't NULL initialize `event_child'.
13039         (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13040         Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13041         * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13042
13043 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
13044
13045         * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13046         an extended waitstatus, or by a watchpoint.
13047         (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13048         thread was stepping or has been stopped by a watchpoint.
13049
13050 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
13051
13052         * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13053         (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13054         of another, then delete the previous, and validate all
13055         breakpoints.
13056         (validate_inserted_breakpoint): New.
13057         (delete_disabled_breakpoints): New.
13058         (validate_breakpoints): New.
13059         (check_mem_read): Validate breakpoints before trusting their
13060         shadow.  Delete disabled breakpoints.
13061         (check_mem_write): Validate breakpoints before trusting they
13062         should be inserted.  Delete disabled breakpoints.
13063         * mem-break.h (validate_breakpoints):
13064         * server.c (handle_query): Validate breakpoints when we see a
13065         qSymbol query.
13066
13067 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
13068
13069         * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13070         there's a GDB breakpoint at stop_pc.  Always report a trap to GDB
13071         if we could tell there's a GDB breakpoint at stop_pc.
13072         (need_step_over_p): Don't do a step over if we find a GDB
13073         breakpoint at the resume PC.
13074
13075         * mem-break.c (struct raw_breakpoint): New.
13076         (enum bkpt_type): New type `gdb_breakpoint'.
13077         (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13078         fields.  New field `raw'.
13079         (find_raw_breakpoint_at): New.
13080         (set_raw_breakpoint_at): Handle refcounting.  Create a raw
13081         breakpoint instead.
13082         (set_breakpoint_at): Adjust.
13083         (delete_raw_breakpoint): New.
13084         (release_breakpoint): New.
13085         (delete_breakpoint): Rename to...
13086         (delete_breakpoint_1): ... this.  Add proc parameter.  Use
13087         release_breakpoint.  Return ENOENT.
13088         (delete_breakpoint): Reimplement.
13089         (find_breakpoint_at): Delete.
13090         (find_gdb_breakpoint_at): New.
13091         (delete_breakpoint_at): Delete.
13092         (set_gdb_breakpoint_at): New.
13093         (delete_gdb_breakpoint_at): New.
13094         (gdb_breakpoint_here): New.
13095         (set_reinsert_breakpoint): Use release_breakpoint.
13096         (uninsert_breakpoint): Rename to ...
13097         (uninsert_raw_breakpoint): ... this.
13098         (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13099         (reinsert_raw_breakpoint): Change parameter type to
13100         raw_breakpoint.
13101         (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13102         instead.
13103         (check_breakpoints): Adjust.  Use release_breakpoint.
13104         (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13105         (breakpoint_inserted_here): Ditto.
13106         (check_mem_read): Adjust to iterate over raw breakpoints instead.
13107         Don't trust the breakpoint's shadow if it is not inserted.
13108         (check_mem_write): Adjust to iterate over raw breakpoints instead.
13109         (delete_all_breakpoints): Adjust.
13110         (free_all_breakpoints): Mark all breakpoints as uninserted, and
13111         use delete_breakpoint_1.
13112
13113         * mem-break.h (breakpoints_supported): Delete declaration.
13114         (set_gdb_breakpoint_at): Declare.
13115         (gdb_breakpoint_here): Declare.
13116         (delete_breakpoint_at): Delete.
13117         (delete_gdb_breakpoint_at): Declare.
13118
13119         * server.h (struct raw_breakpoint): Forward declare.
13120         (struct process_info): New field `raw_breakpoints'.
13121
13122         * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13123         breakpoints.
13124
13125 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
13126
13127         * linux-low.c (status_pending_p_callback): Fix comment.
13128         (linux_wait_for_event_1): Move most of the internal breakpoint
13129         handling from here...
13130         (linux_wait_1): ... to here.
13131         (count_events_callback): New.
13132         (select_singlestep_lwp_callback): New.
13133         (select_event_lwp_callback): New.
13134         (cancel_breakpoints_callback): New.
13135         (select_event_lwp): New.
13136         (linux_wait_1): Simplify internal breakpoint handling.  Give equal
13137         priority to all LWPs that have had events that should be reported
13138         to the client.  Cancel breakpoints when about to reporting the
13139         event to the client, not while stopping lwps.  No longer cancel
13140         finished single-steps here.
13141         (cancel_finished_single_step): Delete.
13142         (cancel_finished_single_steps): Delete.
13143
13144 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
13145
13146         * mem-break.c (enum bkpt_type): New.
13147         (struct breakpoint): New field `type'.
13148         (set_breakpoint_at): Change return type to struct breakpoint
13149         pointer.  Set type to `other_breakpoint' by default.
13150         (delete_breakpoint): Rewrite, supporting more than one breakpoint
13151         in the breakpoint list.
13152         (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13153         (reinsert_breakpoint): Rename to ...
13154         (reinsert_raw_breakpoint): ... this.
13155         (reinsert_breakpoints_at): Adjust.
13156         * mem-break.h (struct breakpoint): Declare.
13157         (set_breakpoint_at): Change return type to struct breakpoint
13158         pointer.
13159
13160 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
13161
13162         * server.c (handle_query): Assign, not compare.
13163
13164 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
13165
13166         Teach linux gdbserver to step-over-breakpoints.
13167
13168         * linux-low.c (can_hardware_single_step): New.
13169         (supports_breakpoints): New.
13170         (handle_extended_wait): If stopping threads, read the stop pc of
13171         the new cloned LWP.
13172         (get_pc): New.
13173         (get_stop_pc): Add `lwp' parameter.  Handle it.  Bail out if the
13174         low target doesn't support retrieving the PC.
13175         (add_lwp): Set last_resume_kind to resume_continue.
13176         (linux_attach_lwp_1): Adjust comments.  Always set stop_expected.
13177         (linux_attach): Don't clear stop_expected.  Set the lwp's
13178         last_resume_kind to resume_stop.
13179         (linux_detach_one_lwp): Don't check for removed breakpoints.
13180         (check_removed_breakpoint): Delete.
13181         (status_pending_p): Rename to ...
13182         (status_pending_p_callback): ... this.  Don't check for removed
13183         breakpoints.  Don't consider threads that are stopped from GDB's
13184         perspective.
13185         (linux_wait_for_lwp): Always read the stop_pc here.
13186         (cancel_breakpoint): New.
13187         (step_over_bkpt): New global.
13188         (linux_wait_for_event_1): Implement stepping over breakpoints.
13189         (gdb_wants_lwp_stopped): New.
13190         (gdb_wants_all_stopped): New.
13191         (linux_wait_1): Tag threads as gdb-wants-stopped.  Cancel finished
13192         single-step traps here.  Store the thread's last reported target
13193         wait status.
13194         (send_sigstop): Don't clear stop_expected.  Always set it,
13195         instead.
13196         (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13197         (cancel_finished_single_step): New.
13198         (cancel_finished_single_steps): New.
13199         (wait_for_sigstop): Don't cancel finished single-step traps here.
13200         (linux_resume_one_lwp): Don't check for removed breakpoints.
13201         Don't set `step' on non-hardware step archs.
13202         (linux_set_resume_request): Ignore resume_stop requests if already
13203         stopping or stopped.  Set the lwp's last_resume_kind.
13204         (resume_status_pending_p): Don't check for removed breakpoints.
13205         (need_step_over_p): New.
13206         (start_step_over): New.
13207         (finish_step_over): New.
13208         (linux_resume_one_thread): Always queue a sigstop for resume_stop
13209         requests.  Clear the thread's last reported target waitstatus.
13210         Don't use the `suspended' flag.  Don't consider pending breakpoints.
13211         (linux_resume): Start a step-over if necessary.
13212         (proceed_one_lwp): New.
13213         (proceed_all_lwps): New.
13214         (unstop_all_lwps): New.
13215         * linux-low.h (struct lwp_info): Rewrite comment for the
13216         `suspended' flag.  Add the `stop_pc' field.  Delete the
13217         `pending_stop_pc' field.  Tweak the `stepping' flag's comment.
13218         Add `'last_resume_kind' and `need_step_over' fields.
13219         * inferiors.c (struct thread_info): Delete, moved elsewhere.
13220         * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13221         Delete `breakpoint_to_reinsert' field.  New flag `inserted'.
13222         (set_raw_breakpoint_at): New.
13223         (set_breakpoint_at): Rewrite to use it.
13224         (reinsert_breakpoint_handler): Delete.
13225         (set_reinsert_breakpoint): New.
13226         (reinsert_breakpoint_by_bp): Delete.
13227         (delete_reinsert_breakpoints): New.
13228         (uninsert_breakpoint): Rewrite.
13229         (uninsert_breakpoints_at): New.
13230         (reinsert_breakpoint): Rewrite.
13231         (reinsert_breakpoints_at): New.
13232         (check_breakpoints): Rewrite.
13233         (breakpoint_here): New.
13234         (breakpoint_inserted_here): New.
13235         (check_mem_read): Adjust.
13236         * mem-break.h (breakpoints_supported, breakpoint_here)
13237         (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13238         (reinsert_breakpoint_by_bp): Delete declaration.
13239         (delete_reinsert_breakpoints): Declare.
13240         (reinsert_breakpoint): Delete declaration.
13241         (reinsert_breakpoints_at): Declare.
13242         (uninsert_breakpoint): Delete declaration.
13243         (uninsert_breakpoints_at): Declare.
13244         (check_breakpoints): Adjust prototype.
13245         * server.h: Adjust include order.
13246         (struct thread_info): Declare here.  Add a `last_status' field.
13247
13248 2010-03-23  Michael Snyder  <msnyder@vmware.com>
13249
13250         * server.c (crc32): New function.
13251         (handle_query): Add handling for 'qCRC:' request.
13252
13253 2010-03-23  Pedro Alves  <pedro@codesourcery.com>
13254
13255         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13256         lwp had been stopped by a watchpoint.
13257
13258 2010-03-16  Pedro Alves  <pedro@codesourcery.com>
13259
13260         * server.h (internal_error): Declare.
13261         (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13262         * utils.c (internal_error): New function.
13263
13264 2010-03-15  Andreas Schwab  <schwab@redhat.com>
13265
13266         * configure.srv: Fix typo setting srv_regobj.
13267
13268 2010-03-15  Pedro Alves  <pedro@codesourcery.com>
13269
13270         * linux-low.c (fetch_register): Avoid passing a non string literal
13271         format to `error'.
13272         (usr_store_inferior_registers): Ditto.
13273
13274 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
13275
13276         * linux-low.c (linux_write_memory): Bail out early if peeking
13277         memory failed.
13278
13279 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
13280
13281         * linux-low.h (struct lwp_info): New fields
13282         `stopped_by_watchpoint' and `stopped_data_address'.
13283         * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13284         here, and cache them in the lwp object.
13285         (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13286         directly.
13287         (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13288         field.
13289         (linux_stopped_by_watchpoint): Rewrite.
13290         (linux_stopped_data_address): Rewrite.
13291
13292 2010-03-06  Simo Melenius  <simo.melenius@iki.fi>
13293
13294         * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13295         switching the current inferior, not before.
13296
13297 2010-03-01  H.J. Lu  <hongjiu.lu@intel.com>
13298
13299         * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13300         reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13301         i386-linux.c and amd64-linux.c.
13302         (reg-i386.o): Removed.
13303         (reg-i386.c): Likewise.
13304         (reg-i386-linux.o): Likewise.
13305         (reg-i386-linux.c): Likewise.
13306         (reg-x86-64.o): Likewise.
13307         (reg-x86-64.c): Likewise.
13308         (reg-x86-64-linux.o): Likewise.
13309         (reg-x86-64-linux.c): Likewise.
13310         (i386.o): New.
13311         (i386.c): Likewise.
13312         (i386-linux.o): Likewise.
13313         (i386-linux.c): Likewise.
13314         (amd64.o): Likewise.
13315         (amd64.c): Likewise.
13316         (amd64-linux.o): Likewise.
13317         (amd64-linux.c): Likewise.
13318
13319         * configure.srv (srv_i386_regobj): New.
13320         (srv_i386_linux_regobj): Likewise.
13321         (srv_amd64_regobj): Likewise.
13322         (srv_amd64_linux_regobj): Likewise.
13323         (srv_i386_32bit_xmlfiles): Likewise.
13324         (srv_i386_64bit_xmlfiles): Likewise.
13325         (srv_i386_xmlfiles): Likewise.
13326         (srv_amd64_xmlfiles): Likewise.
13327         (srv_i386_linux_xmlfiles): Likewise.
13328         (srv_amd64_linux_xmlfiles): Likewise.
13329         (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj.  Set
13330         srv_xmlfiles to $srv_i386_xmlfiles.
13331         (i[34567]86-*-mingw32ce*): Likewise.
13332         (i[34567]86-*-mingw*): Likewise.
13333         (i[34567]86-*-nto*): Likewise.
13334         (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13335         and $srv_amd64_linux_regobj.  Set srv_xmlfiles to
13336         $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13337         (x86_64-*-linux*): Likewise.
13338
13339         * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13340         (init_registers_amd64_linux): New.
13341         (x86_arch_setup): Replace init_registers_x86_64_linux with
13342         init_registers_amd64_linux.
13343
13344 2010-02-23  Maxim Kuvyrkov  <maxim@codesourcery.com>
13345
13346         * configure.ac: Check for libdl.  If it is not available link against
13347         static libthread_db.
13348         * configure: Regenerate.
13349
13350 2010-02-22  Pedro Alves  <pedro@codesourcery.com>
13351
13352         PR9605
13353
13354         * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13355         handing a read watchpoint.
13356         (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13357
13358 2010-02-12  Doug Evans  <dje@google.com>
13359
13360         * linux-low.c (linux_supports_tracefork_flag): Document.
13361         (linux_look_up_symbols): Add comment.
13362
13363 2010-02-03  H.J. Lu  <hongjiu.lu@intel.com>
13364
13365         * regcache.c (supply_register): Clear regcache if buf is NULL.
13366
13367 2010-02-02  Nicolas Roche  <roche@sourceware.org>
13368             Joel Brobecker  <brobecker@adacore.com>
13369
13370         * inferiors.c (find_inferior): Add function documentation.
13371         (unloaded_dll): Handle the case where the unloaded dll has not
13372         been previously registered in the dll list.
13373
13374 2010-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
13375
13376         * linux-arm-low.c (thumb_breakpoint_len): Delete.
13377         (thumb2_breakpoint): New.
13378         (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13379
13380 2010-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
13381
13382         * linux-low.c (get_stop_pc): Check for SIGTRAP.
13383         (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13384         breakpoints.
13385
13386 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
13387
13388         * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13389
13390 2010-01-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13391
13392         * linux-s390-low.c (s390_collect_ptrace_register)
13393         (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13394
13395 2010-01-21  Doug Evans  <dje@google.com>
13396
13397         * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13398         (PTRACE_ARG4_TYPE): New macro.
13399         (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13400         (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13401         (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13402         (usr_store_inferior_registers): Ditto.
13403         (linux_read_memory, linux_write_memory): Ditto.
13404         (linux_test_for_tracefork): Ditto.
13405
13406         * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13407         Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13408
13409 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
13410
13411         * proc-service.c (ps_lgetregs): Don't refetch registers from the
13412         target.
13413
13414 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
13415
13416         * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13417         prototype to take a regcache.  Adjust.
13418
13419 2010-01-20  Pedro Alves  <pedro@codesourcery.com>
13420
13421         * regcache.h (struct thread_info): Forward declare.
13422         (struct regcache): New.
13423         (new_register_cache): Adjust prototype.
13424         (get_thread_regcache): Declare.
13425         (free_register_cache): Adjust prototype.
13426         (registers_to_string, registers_from_string): Ditto.
13427         (supply_register, supply_register_by_name, collect_register)
13428         (collect_register_as_string, collect_register_by_name): Ditto.
13429         * regcache.c (struct inferior_regcache_data): Delete.
13430         (get_regcache): Rename to ...
13431         (get_thread_regcache): ... this.  Adjust.  Switch inferior before
13432         fetching registers.
13433         (regcache_invalidate_one): Adjust.
13434         (regcache_invalidate): Fix prototype.
13435         (new_register_cache): Return the new register cache.
13436         (free_register_cache): Change prototype.
13437         (realloc_register_cache): Adjust.
13438         (registers_to_string): Change prototype to take a regcache.  Adjust.
13439         (registers_from_string): Ditto.
13440         (register_data): Ditto.
13441         (supply_register): Ditto.
13442         (supply_register_by_name): Ditto.
13443         (collect_register): Ditto.
13444         (collect_register_as_string): Ditto.
13445         (collect_register_by_name): Ditto.
13446         * server.c (process_serial_event): Adjust.
13447         * linux-low.h (regset_fill_func, regset_store_func): Change
13448         prototype.
13449         (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13450         Change prototype.
13451         * linux-low.c (get_stop_pc): Adjust.
13452         (check_removed_breakpoint): Adjust.
13453         (linux_wait_for_event): Adjust.
13454         (linux_resume_one_lwp): Adjust.
13455         (fetch_register): Add regcache parameter.  Adjust.
13456         (usr_store_inferior_registers): Ditto.
13457         (regsets_fetch_inferior_registers): Ditto.
13458         (regsets_store_inferior_registers): Ditto.
13459         (linux_fetch_registers, linux_store_registers): Ditto.
13460         * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13461         regcache.  Adjust.
13462         (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13463         Ditto.
13464         * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13465         prototype to take a regcache.
13466         (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13467         * remote-utils.c (convert_ascii_to_int, outreg)
13468         (prepare_resume_reply): Change prototype to take a regcache.
13469         Adjust.
13470         * target.h (struct target_ops) <fetch_registers, store_registers>:
13471         Change prototype to take a regcache.
13472         (fetch_inferior_registers, store_inferior_registers): Change
13473         prototype to take a regcache.  Adjust.
13474         * proc-service.c (ps_lgetregs): Adjust.
13475         * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13476         (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13477         (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13478         take a regcache.  Adjust.
13479         * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13480         (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13481         (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13482         (arm_breakpoint_at): Change prototype to take a regcache.  Adjust.
13483         * linux-cris-low.c (cris_get_pc, cris_set_pc)
13484         (cris_cannot_fetch_register):
13485         (cris_breakpoint_at): Change prototype to take a regcache.
13486         Adjust.
13487         * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13488         cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13489         to take a regcache.  Adjust.
13490         (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13491         Adjust.
13492         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13493         take a regcache.  Adjust.
13494         * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13495         (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13496         (m68k_set_pc): Change prototype to take a regcache.  Adjust.
13497         * linux-mips-low.c (mips_get_pc):
13498         (mips_set_pc): Change prototype to take a regcache.  Adjust.
13499         (mips_reinsert_addr): Adjust.
13500         (mips_collect_register): Change prototype to take a regcache.
13501         Adjust.
13502         (mips_supply_register):
13503         (mips_collect_register_32bit, mips_supply_register_32bit)
13504         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13505         (mips_store_fpregset): Ditto.
13506         * linux-ppc-low.c (ppc_supply_ptrace_register)
13507         (ppc_supply_ptrace_register): Ditto.
13508         (parse_spufs_run): Adjust.
13509         (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13510         (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13511         (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13512         take a regcache.  Adjust.
13513         * linux-s390-low.c (s390_collect_ptrace_register)
13514         (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13515         (s390_set_pc): Change prototype to take a regcache.  Adjust.
13516         (s390_arch_setup): Adjust.
13517         * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13518         (sh_fill_gregset): Change prototype to take a regcache.  Adjust.
13519         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13520         (sparc_fill_gregset, sparc_store_gregset_from_stack)
13521         (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13522         regcache.  Adjust.
13523         (sparc_breakpoint_at): Adjust.
13524         * linux-xtensa-low.c (xtensa_fill_gregset):
13525         (xtensa_store_gregset):
13526         (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13527         (xtensa_set_pc): Change prototype to take a regcache.  Adjust.
13528         * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13529         prototype to take a regcache.  Adjust.
13530         * win32-arm-low.c (arm_fetch_inferior_register)
13531         (arm_store_inferior_register): Change prototype to take a
13532         regcache.  Adjust.
13533         * win32-i386-low.c (i386_fetch_inferior_register)
13534         (i386_store_inferior_register): Change prototype to take a
13535         regcache.  Adjust.
13536         * win32-low.c (child_fetch_inferior_registers)
13537         (child_store_inferior_registers): Change prototype to take a
13538         regcache.  Adjust.
13539         (win32_wait): Adjust.
13540         (win32_fetch_inferior_registers): Change prototype to take a
13541         regcache.  Adjust.
13542         (win32_store_inferior_registers): Adjust.
13543         * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13544         store_inferior_register>: Change prototype to take a regcache.
13545
13546 2010-01-20  Doug Evans  <dje@google.com>
13547
13548         * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13549         #ifdef.
13550         (linux_wait_for_event1, linux_init_signals): Ditto.
13551         (W_STOPCODE): Provide definition if missing.
13552
13553 2010-01-13  Vladimir Prus  <vladimir@codesourcery.com>
13554
13555         * linux-low.c (linux_core_of_thread): New.
13556         (compare_ints, show_process, list_threads): New.
13557         (linux_qxfer_osdata): Report threads and cores.
13558         (linux_target_op): Register linux_core_of_thread.
13559         * remote-utils.c (prepare_resume_reply): Report the core.
13560         (buffer_xml_printf): Support %d specifier.
13561         * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13562         New.
13563         (handle_query): Handle qXfer:threads.  Announce availability
13564         thereof.
13565         * target.h (struct target_ops): New field core_of_thread.
13566
13567 2010-01-04  Ulrich Weigand  <uweigand@de.ibm.com>
13568
13569         * Makefile.in (clean): Remove new generated files.
13570         (reg-s390.o, reg-s390.c): Remove rules.
13571         (reg-s390x.o, reg-s390x.c): Likewise.
13572         (s390-linux32.o, s390-linux32.c): Add rules.
13573         (s390-linux64.o, s390-linux64.c): Likewise.
13574         (s390x-linux64.o, s390x-linux64.c): Likewise.
13575         * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13576         * linux-s390-low.c: Include <elf.h>.
13577         (HWCAP_S390_HIGH_GPRS): Define if undefined.
13578         (init_registers_s390): Remove prototype.
13579         (init_registers_s390x): Likewise.
13580         (init_registers_s390_linux32): Add prototype.
13581         (init_registers_s390_linux64): Likewise.
13582         (init_registers_s390x_linux64): Likewise.
13583         (s390_num_regs_3264): New define.
13584         (s390_regmap_3264): New global variable.
13585         (s390_cannot_fetch_register): Remove obsolete check.
13586         (s390_cannot_store_register): Likewise.
13587         (s390_collect_ptrace_register): Handle upper/lower register halves.
13588         (s390_supply_ptrace_register): Likewise.
13589         (s390_fill_gregset): Update to register number changes.
13590         (s390_get_hwcap): New routine.
13591         (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13592         Install appropriate regmap and register set.
13593
13594 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
13595
13596         * server.c (gdbserver_version): Update copyright year to 2010.
13597         * gdbreplay.c (gdbreplay_version): Likewise.
13598
13599 2009-12-28  Doug Evans  <dje@google.com>
13600
13601         * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13602         elf/external.h.  Include <elf.h> instead but only if necessary.
13603
13604 2009-12-28  Pedro Alves  <pedro@codesourcery.com>
13605
13606         * linux-low.c (linux_remove_process): Remove `detaching'
13607         parameter.  Don't release/detach from thread_db here.
13608         (linux_kill): Release/detach from thread_db here, ...
13609         (linux_detach): ... and here, before actually detaching.
13610         (linux_wait_1): ... and here, when a process exits.
13611         * thread-db.c (any_thread_of): New.
13612         (thread_db_free): Switch the current inferior to a thread of the
13613         passed in process.
13614
13615 2009-12-21  Doug Evans  <dje@google.com>
13616
13617         * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13618
13619         * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13620         Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13621         warning ifndef __NR_tkill.  Move setting of errno there too.
13622         Delete unnecessary resetting of errno after syscall.
13623         Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13624
13625         * configure.ac: Check for dladdr.
13626         * config.in: Regenerate.
13627         * configure: Regenerate.
13628         * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13629         (try_thread_db_load): Update.
13630
13631         * linux-low.c (my_waitpid): Delete unnecessary prototype.
13632
13633 2009-12-18  Doug Evans  <dje@google.com>
13634
13635         * event-loop.c: Include unistd.h if it exists.
13636
13637         * linux-low.c (my_waitpid): Move definition away from being in
13638         between linux_tracefork_child/linux_test_for_tracefork.
13639
13640         * gdb_proc_service.h (psaddr_t): Fix type.
13641         * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13642         signature to match glibc.
13643
13644 2009-12-16  Doug Evans  <dje@google.com>
13645
13646         * linux-low.c (linux_read_memory): Fix argument to read.
13647
13648 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
13649
13650         * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13651         events, don't leave current_inferior pointing at null.
13652
13653 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
13654
13655         * win32-low.c (LOG): Delete.
13656         (OUTMSG): Output to stderr.
13657         (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13658         on compile time LOG macro.
13659         (win32_wait): Fix debug output.
13660
13661 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
13662
13663         * win32-low.c (win32_add_one_solib): If the dll name is
13664         "ntdll.dll", prepend the system directory to the dll path.
13665
13666 2009-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
13667
13668         * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13669
13670 2009-11-17  Nathan Sidwell  <nathan@codesourcery.com>
13671             Vladimir Prus  <vladimir@codesourcery.com>
13672
13673         * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13674         * configure.ac: Check for __mcoldfire__ and set
13675         gdb_cv_m68k_is_coldfire.
13676         * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13677         reg-cf.o and reg-m68k.o.
13678         * configure: Regenerated.
13679
13680 2009-11-16  Pedro Alves  <pedro@codesourcery.com>
13681
13682         * linux-low.c (linux_remove_process): Add `detaching' parameter.
13683         Pass it to thread_db_free.
13684         (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13685         proper `detaching' argument to linux_remove_process.
13686         * linux-low.h (thread_db_free): Add `detaching' parameter.
13687         * thread-db.c (thread_db_init): Pass false as `detaching' argument
13688         to thread_db_free.
13689         (thread_db_free): Add `detaching' parameter.  Only
13690         call td_ta_clear_event if detaching from process.
13691
13692 2009-11-12  Maxim Kuvyrkov  <maxim@codesourcery.com>
13693
13694         * thread-db.c (thread_db_free): Fix typo.
13695
13696 2009-11-11  Paul Pluzhnikov  <ppluzhnikov@google.com>
13697
13698         PR gdb/10838
13699         * thread-db.c (thread_db_free): Call td_ta_clear_event.
13700
13701 2009-11-03  Nathan Sidwell  <nathan@codesourcery.com>
13702
13703         * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13704         with an i686 compiler.
13705         * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13706         needed.
13707         * configure: Rebuilt.
13708
13709 2009-10-29  Sandra Loosemore  <sandra@codesourcery.com>
13710
13711         PR gdb/10783
13712
13713         * server.c (handle_search_memory_1): Correct read_addr initialization
13714         in loop for searching subsequent chunks.
13715
13716 2009-10-29  Paul Pluzhnikov  <ppluzhnikov@google.com>
13717
13718         * configure.ac: New --with-libthread-db option.
13719         * thread-db.c: Allow direct dependence on libthread_db.
13720         (thread_db_free): Adjust.
13721         * config.in: Regenerate.
13722         * configure: Likewise.
13723
13724 2009-10-28  Paul Pluzhnikov  <ppluzhnikov@google.com>
13725
13726         PR gdb/10757
13727         * thread-db.c (attach_thread): New function.
13728         (maybe_attach_thread): Return success/failure.
13729         (find_new_threads_callback): Adjust.
13730         (thread_db_find_new_threads): Loop until no new threads.
13731
13732 2009-10-13  Pedro Alves  <pedro@codesourcery.com>
13733
13734         * proc-service.c (ps_lgetregs): Formatting.
13735
13736 2009-10-08  Paul Pluzhnikov  <ppluzhnikov@google.com>
13737
13738         * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13739         * configure.ac: Adjust.
13740         * linux-low.h (struct process_info_private): Move members to struct
13741         thread_db.
13742         (thread_db_free, thread_db_handle_monitor_command): New prototype.
13743         * linux-low.c (linux_remove_process): Adjust.
13744         (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13745         * server.c (handle_query): Move code ...
13746         (handle_monitor_command): ... here. New function.
13747         * target.h (struct target_ops): New member.
13748         * thread-db.c (struct thread_db): New.
13749         (libthread_db_search_path): New variable.
13750         (thread_db_create_event, thread_db_enable_reporting)
13751         (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13752         (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13753         (try_thread_db_load_1, dladdr_to_soname): New functions.
13754         (try_thread_db_load, thread_db_load_search): New functions.
13755         (thread_db_init): Search for libthread_db.
13756         (thread_db_free): New function.
13757         (thread_db_handle_monitor_command): Likewise.
13758         * config.in: Regenerate.
13759         * configure: Regenerate.
13760
13761 2009-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
13762
13763         * spu-low.c (spu_kill): Wait for inferior to terminate.
13764         Call clear_inferiors.
13765         (spu_detach): Call clear_inferiors.
13766
13767 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13768
13769         * aclocal.m4: Regenerate.
13770         * config.in: Likewise.
13771         * configure: Likewise.
13772
13773 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
13774
13775         * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13776         (parse_spufs_run): New function.
13777         (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13778         (ppc_breakpoint_at): Handle SPU breakpoints.
13779
13780 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
13781
13782         * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13783         (SPUFS_MAGIC): Define.
13784         (spu_enumerate_spu_ids): New function.
13785         (linux_qxfer_spu): New function.
13786         (linux_target_ops): Install linux_qxfer_spu.
13787
13788 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
13789
13790         * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13791         and powerpc-cell64l.o to srv_regobj.  Add rs6000/powerpc-cell32l.xml
13792         and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13793         * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13794         (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13795         (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13796         * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13797         (init_registers_powerpc_cell32l): Add prototype.
13798         (init_registers_powerpc_cell64l): Likewise.
13799         (ppc_arch_setup): Detect Cell/B.E. architecture.
13800
13801 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13802
13803         * Makefile.in (datarootdir): New variable.
13804
13805 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
13806
13807         * linux-low.c (linux_write_memory): Update debugging output.
13808         * Makefile.in (clean): Add new descriptions.
13809         (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13810         (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13811         * configure.srv: Add new files for arm*-*-linux*.
13812         * linux-arm-low.c: Add new declarations.
13813         (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13814         (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13815         (HWCAP_VFPv3D16): New.
13816         (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13817         instead of __IWMMXT__.
13818         (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13819         (arm_arch_setup): New.
13820         (target_regsets): Remove #ifdef.  Add VFP regset.
13821         (the_low_target): Use arm_arch_setup.
13822
13823 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
13824
13825         * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13826         the main thread again.
13827
13828 2009-07-06  Aleksandar Ristovski  <aristovski@qnx.com>
13829
13830         Adding Neutrino gdbserver.
13831         * configure: Regenerated.
13832         * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13833         * configure.srv (i[34567]86-*-nto*): New target.
13834         * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13835         * remote-utils.c [__QNX__]: Include sys/iomgr.h
13836         (nto_comctrl) [__QNX__]: New function.
13837         (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13838
13839 2009-07-05  Danny Backx  <dannybackx@users.sourceforge.net>
13840
13841         * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13842         srv_tgtobj.
13843
13844 2009-07-04  Danny Backx  <dannybackx@users.sourceforge.net>
13845             Pedro Alves  <pedro@codesourcery.com>
13846
13847         * win32-i386-low.c (i386_get_thread_context): Handle systems that
13848         don't support CONTEXT_EXTENDED_REGISTERS.
13849         (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13850         (the_low_target): Install them.
13851         * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13852         failing with ERROR_PIPE_NOT_CONNECTED.
13853
13854 2009-06-30  Doug Evans  <dje@google.com>
13855             Pierre Muller  <muller@ics.u-strasbg.fr>
13856
13857         Add h/w watchpoint support to x86-linux, win32-i386.
13858         * Makefile.in (SFILES): Add i386-low.c
13859         (i386_low_h): Define.
13860         (i386-low.o): Add dependencies.
13861         (linux-x86-low.o): Add i386-low.h dependency.
13862         (win32-i386-low.o): Ditto.
13863         * i386-low.c: New file.
13864         * i386-low.h: New file.
13865         * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13866         (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13867         * linux-low.c (linux_add_process): Initialize arch_private.
13868         (linux_remove_process): Free arch_private.
13869         (add_lwp): Initialize arch_private.
13870         (delete_lwp): Free arch_private.
13871         (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13872         provided.
13873         * linux-low.h (process_info_private): New member arch_private.
13874         (lwp_info): New member arch_private.
13875         (linux_target_ops): New members new_process, new_thread,
13876         prepare_to_resume.
13877         (ptid_of): New macro.
13878         * linux-x86-low.c: Include stddef.h, i386-low.h.
13879         (arch_process_info): New struct.
13880         (arch_lwp_info): New struct.
13881         (x86_linux_dr_get, x86_linux_dr_set): New functions.
13882         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13883         (i386_dr_low_get_status): New function.
13884         (x86_insert_point, x86_remove_point): New functions.
13885         (x86_stopped_by_watchpoint): New function.
13886         (x86_stopped_data_address): New function.
13887         (x86_linux_new_process, x86_linux_new_thread): New functions.
13888         (x86_linux_prepare_to_resume): New function.
13889         (the_low_target): Add entries for insert_point, remove_point,
13890         stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13891         prepare_to_resume.
13892         * server.c (debug_hw_points): New global.
13893         (monitor_show_help): Document set debug-hw-points.
13894         (handle_query): Process "set debug-hw-points".
13895         * server.h (debug_hw_points): Declare.
13896         (paddress): Declare.
13897         * utils.c (NUMCELLS, CELLSIZE): New macros.
13898         (get_sell, xsnprintf, paddress): New functions.
13899         * win32-arm-low.c (the_low_target): Add entries for insert_point,
13900         remove_point, stopped_by_watchpoint, stopped_data_address.
13901         * win32-i386-low.c: Include i386-low.h.
13902         (debug_reg_state): Replaces dr.
13903         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13904         (i386_dr_low_get_status): New function.
13905         (i386_insert_point, i386_remove_point): New functions.
13906         (i386_stopped_by_watchpoint): New function.
13907         (i386_stopped_data_address): New function.
13908         (i386_initial_stuff): Update.
13909         (get_thread_context,set_thread_context,i386_thread_added): Update.
13910         (the_low_target): Add entries for insert_point,
13911         remove_point, stopped_by_watchpoint, stopped_data_address.
13912         * win32-low.c (win32_insert_watchpoint): New function.
13913         (win32_remove_watchpoint): New function.
13914         (win32_stopped_by_watchpoint): New function.
13915         (win32_stopped_data_address): New function.
13916         (win32_target_ops): Add entries for insert_watchpoint,
13917         remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13918         * win32-low.h (win32_target_ops): New members insert_point,
13919         remove_point, stopped_by_watchpoint, stopped_data_address.
13920
13921 2009-06-25  Pedro Alves  <pedro@codesourcery.com>
13922
13923         * server.c (process_serial_event): Re-return unsupported, not
13924         error, if the type isn't recognized.  Re-allow supporting only
13925         insert or remove packets.  Also call require_running for
13926         breakpoints.  Add missing break statement to default case.  Tidy.
13927         * target.h (struct target_ops): Rename insert_watchpoint to
13928         insert_point, and remove_watchpoint to remove_point.
13929
13930         * linux-low.h (struct linux_target_ops): Likewise.
13931         * linux-low.c (linux_insert_watchpoint): Rename to ...
13932         (linux_insert_point): ... this.  Adjust.
13933         (linux_remove_watchpoint): Rename to ...
13934         (linux_remove_point): ... this.  Adjust.
13935         (linux_target_ops): Adjust.
13936         * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13937         (cris_insert_point): ... this.
13938         (cris_remove_watchpoint): Rename to ...
13939         (cris_remove_point): ... this.
13940         (the_low_target): Adjust.
13941
13942 2009-06-24  Pierre Muller  <muller@ics.u-strasbg.fr>
13943
13944         * server.c (handle_v_kill): Pass signal_pid to
13945         kill_inferior if multi_process is zero.
13946
13947 2009-06-23  Aleksandar Ristovski  <aristovski@qnx.com>
13948
13949         * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13950         * target.h (target_ops): Comment for *_watchpoint to make it clear
13951         the functions can get types '0' and '1'.
13952
13953 2009-06-22  Aleksandar Ristovski  <aristovski@qnx.com>
13954
13955         * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13956         * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13957         * regcache.c (get_regcache): Likewise.
13958         * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13959         * win32-low.c (child_fetch_inferior_registers): Remove check for
13960         regno 0.
13961
13962 2009-06-19  Aleksandar Ristovski  <aristovski@qnx.com>
13963             Pedro Alves <pedro@codesourcery.com>
13964
13965         * target.h (struct target_ops) <supports_multi_process>: New
13966         callback.
13967         (target_supports_multi_process): New.
13968         * server.c (handle_query): Even if GDB reports support, only
13969         enable multi-process if the target also supports it.  Report
13970         multi-process support only if the target backend supports it.
13971         * linux-low.c (linux_supports_multi_process): New function.
13972         (linux_target_ops): Install it as target_supports_multi_process
13973         callback.
13974
13975 2009-05-24  Doug Evans  <dje@google.com>
13976
13977         Global renaming of find_thread_pid to find_thread_ptid.
13978         * server.h (find_thread_ptid): Renamed from find_thread_pid.
13979         * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13980         All callers updated.
13981
13982         * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13983         to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13984         directly.
13985
13986         * linux-low.c (get_stop_pc): Print pc if debug_threads.
13987         (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13988         (linux_resume_one_lwp): Ditto.
13989
13990 2009-05-23  Doug Evans  <dje@google.com>
13991
13992         * linux-low.c (linux_resume_one_lwp): Change type of first arg
13993         from struct inferior_list_entry * to struct lwp_info *.
13994         All callers updated.
13995
13996 2009-05-13  Doug Evans  <dje@google.com>
13997
13998         * linux-x86-low.c: Don't include assert.h.
13999         (x86_siginfo_fixup): Use fatal, not assert.
14000         (x86_arch_setup): Fix comment.
14001
14002 2009-05-12  Doug Evans  <dje@google.com>
14003
14004         Biarch support for i386/amd64 gdbserver.
14005         * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14006         Add linux-x86-low.c.
14007         (linux-i386-low.o, linux-x86-64-low.o): Delete.
14008         (linux-x86-low.o): Add.
14009         * linux-x86-64-low.c: Delete.
14010         * linux-i386-low.c: Delete.
14011         * linux-x86-low.c: New file.
14012         * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14013         linux-x86-low.o.
14014         (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14015         linux-x86-low.o.
14016         (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14017         * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14018         (linux_child_pid_to_exec_file): New function.
14019         (elf_64_header_p, elf_64_file_p): New functions.
14020         (siginfo_fixup): New function.
14021         (linux_xfer_siginfo): New local inf_siginfo.  Call siginfo_fixup to
14022         give target a chance to convert layout.
14023         * linux-low.h (linux_target_ops): New member siginfo_fixup.
14024         (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14025
14026 2009-05-07  Doug Evans  <dje@google.com>
14027
14028         * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14029         (regsets_store_inferior_registers): Ditto.
14030
14031 2009-05-06  Pedro Alves  <pedro@codesourcery.com>
14032
14033         PR server/10048
14034
14035         * linux-low.c (must_set_ptrace_flags): Delete.
14036         (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14037         of the global.
14038         (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here.  Set
14039         `lwp->must_set_ptrace_flags' instead.
14040         (linux_wait_for_event_1): Set ptrace options here.
14041         (linux_wait_1): ... not here.
14042
14043 2009-04-30  Doug Evans  <dje@google.com>
14044
14045         * inferiors.c (started_inferior_callback): New function.
14046         (attached_inferior_callback): New function.
14047         (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14048         * server.c (print_started_pid, print_attached_pid): New functions.
14049         (detach_or_kill_for_exit): New function.
14050         (main): Call it instead of for_each_inferior (kill_inferior_callback).
14051         * server.h (have_started_inferiors_p): Declare.
14052         (have_attached_inferiors_p): Declare.
14053
14054         * inferiors.c (remove_process): Fix memory leak, free process.
14055         * linux-low.c (linux_remove_process): New function.
14056         (linux_kill): Call it instead of remove_process.
14057         (linux_detach, linux_wait_1): Ditto.
14058
14059 2009-04-19  Danny Backx  <dannybackx@users.sourceforge.net>
14060
14061         * configure.srv: Add x86 Windows CE target.
14062
14063 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
14064
14065         * inferiors.c (get_thread_process): Make global.
14066         * server.h (get_thread_process): Add prototype.
14067         * thread-db.c (find_one_thread): Use get_thread_process
14068         instead of current_process.
14069         (thread_db_get_tls_address): Do not crash if called when
14070         thread layer is not yet initialized.
14071
14072 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
14073
14074         * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14075         * spu-low.c (current_tid): Rename to ...
14076         (current_ptid): ... this.
14077         (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14078         spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14079         ptid_get_lwp (current_ptid) instead of current_tid.
14080         (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14081         instead of current_tid.  Use find_process_pid to verify pid
14082         argument is valid.  Pass proper argument to remove_process.
14083         (spu_thread_alive): Compare current_ptid instead of current_tid.
14084         (spu_resume): Likewise.
14085
14086 2009-04-02  Pedro Alves  <pedro@codesourcery.com>
14087
14088         * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14089         variable.
14090
14091 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
14092
14093         Implement the multiprocess extensions, and add linux multiprocess
14094         support.
14095
14096         * server.h (ULONGEST): Declare.
14097         (struct ptid, ptid_t): New.
14098         (minus_one_ptid, null_ptid): Declare.
14099         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14100         (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14101         (struct inferior_list_entry): Change `id' type from unsigned from
14102         to ptid_t.
14103         (struct sym_cache, struct breakpoint, struct
14104         process_info_private): Forward declare.
14105         (struct process_info): Declare.
14106         (current_process): Declare.
14107         (all_processes): Declare.
14108         (initialize_inferiors): Declare.
14109         (add_thread): Adjust to use ptid_t.
14110         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14111         (add_process, remove_process, find_thread_pid): Declare.
14112         (find_inferior_id): Adjust to use ptid_t.
14113         (cont_thread, general_thread, step_thread): Change type to ptid_t.
14114         (multi_process): Declare.
14115         (push_event): Adjust to use ptid_t.
14116         (read_ptid, write_ptid): Declare.
14117         (prepare_resume_reply): Adjust to use ptid_t.
14118         (clear_symbol_cache): Declare.
14119         * inferiors.c (all_processes): New.
14120         (null_ptid, minus_one_ptid): New.
14121         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14122         (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14123         (add_thread): Change unsigned long to ptid.  Remove gdb_id
14124         parameter.  Adjust.
14125         (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14126         (gdb_id_to_thread): Rename to ...
14127         (find_thread_pid): ... this.  Change unsigned long to ptid.
14128         (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14129         (loaded_dll, pull_pid_from_list): Adjust.
14130         (add_process, remove_process, find_process_pid)
14131         (get_thread_process, current_process, initialize_inferiors): New.
14132         * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14133         (struct target_waitstatus) <related_pid>: Ditto.
14134         (struct target_ops) <kill, detach>: Add `pid' argument.  Change
14135         return type to int.
14136         (struct target_ops) <join>: Add `pid' argument.
14137         (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14138         (struct target_ops) <wait>: Add `ptid' field.  Change return type
14139         to ptid.
14140         (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14141         (mywait): Add `ptid' argument.  Change return type to ptid_t.
14142         (target_pid_to_str): Declare.
14143         * target.c (set_desired_inferior): Adjust to use ptids.
14144         (mywait): Add new `ptid' argument.  Adjust.
14145         (target_pid_to_str): New.
14146         * mem-break.h (free_all_breakpoints): Declare.
14147         * mem-break.c (breakpoints): Delelete.
14148         (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14149         (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14150         to use per-process breakpoint list.
14151         (free_all_breakpoints): New.
14152         * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14153         (symbol_cache, all_symbols_looked_up): Delete.
14154         (hexchars): New.
14155         (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14156         read_ptid): New.
14157         (prepare_resume_reply): Change ptid argument's type from unsigned
14158         long to ptid_t.  Adjust.  Implement W;process and X;process.
14159         (free_sym_cache, clear_symbol_cache): New.
14160         (look_up_one_symbol): Adjust to per-process symbol cache.  *
14161         * server.c (cont_thread, general_thread, step_thread): Change type
14162         to ptid_t.
14163         (attached): Delete.
14164         (multi_process): New.
14165         (last_ptid): Change type to ptid_t.
14166         (struct vstop_notif) <ptid>: Change type to ptid_t.
14167         (queue_stop_reply, push_event): Change `ptid' argument's type to
14168         ptid_t.
14169         (discard_queued_stop_replies): Add `pid' argument.
14170         (start_inferior): Adjust to use ptids.  Adjust to mywait interface
14171         changes.  Don't reference the `attached' global.
14172         (attach_inferior): Adjust to mywait interface changes.
14173         (handle_query): Adjust to use ptids.  Parse GDB's qSupported
14174         features.  Handle and report "multiprocess+".  Handle
14175         "qAttached:PID".
14176         (handle_v_cont): Adjust to use ptids.  Adjust to mywait interface
14177         changes.
14178         (handle_v_kill): New.
14179         (handle_v_stopped): Adjust to use target_pid_to_str.
14180         (handle_v_requests): Allow multiple attaches and runs when
14181         multiprocess extensions are in effect.  Handle "vKill".
14182         (myresume): Adjust to use ptids.
14183         (queue_stop_reply_callback): Add `arg' parameter.  Handle it.
14184         (handle_status): Adjust to discard_queued_stop_replies interface
14185         change.
14186         (first_thread_of, kill_inferior_callback)
14187         (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14188         (main): Call initialize_inferiors.  Adjust to use ptids, killing
14189         and detaching from all inferiors.  Handle multiprocess packet
14190         variants.
14191         * linux-low.h: Include gdb_proc_service.h.
14192         (struct process_info_private): New.
14193         (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14194         <lwpid_of>: Use ptid_get_lwp.
14195         (get_lwp_thread): Adjust.
14196         (struct lwp_info): Add `dead' member.
14197         (find_lwp_pid): Declare.
14198         * linux-low.c (thread_db_active): Delete.
14199         (new_inferior): Adjust comment.
14200         (inferior_pid): Delete.
14201         (linux_add_process): New.
14202         (handle_extended_wait): Adjust.
14203         (add_lwp): Change unsigned long to ptid.
14204         (linux_create_inferior): Add process to processes table.  Adjust
14205         to use ptids.  Don't set new_inferior here.
14206         (linux_attach_lwp): Rename to ...
14207         (linux_attach_lwp_1): ... this.  Add `initial' argument.  Handle
14208         it.  Adjust to use ptids.
14209         (linux_attach_lwp): New.
14210         (linux_attach): Add process to processes table.  Don't set
14211         new_inferior here.
14212         (struct counter): New.
14213         (second_thread_of_pid_p, last_thread_of_process_p): New.
14214         (linux_kill_one_lwp): Add `args' parameter.  Handle it.  Adjust to
14215         multiple processes.
14216         (linux_kill): Add `pid' argument.  Handle it.  Adjust to multiple
14217         processes.  Remove process from process table.
14218         (linux_detach_one_lwp): Add `args' parameter.  Handle it.  Adjust
14219         to multiple processes.
14220         (any_thread_of): New.
14221         (linux_detach): Add `pid' argument, and handle it.  Remove process
14222         from processes table.
14223         (linux_join): Add `pid' argument.  Handle it.
14224         (linux_thread_alive): Change unsighed long argument to ptid_t.
14225         Consider dead lwps as not being alive.
14226         (status_pending_p): Rename `dummy' argument to `arg'.  Filter out
14227         threads we're not interested in.
14228         (same_lwp, find_lwp_pid): New.
14229         (linux_wait_for_lwp): Change `pid' argument's type from int to
14230         ptid_t.  Adjust.
14231         (linux_wait_for_event): Rename to ...
14232         (linux_wait_for_event_1): ... this.  Change `pid' argument's type
14233         from int to ptid_t.  Adjust.
14234         (linux_wait_for_event): New.
14235         (linux_wait_1): Add `ptid' argument.  Change return type to
14236         ptid_t.  Adjust.  Use last_thread_of_process_p.  Remove processes
14237         that exit from the process table.
14238         (linux_wait): Add `ptid' argument.  Change return type to ptid_t.
14239         Adjust.
14240         (mark_lwp_dead): New.
14241         (wait_for_sigstop): Adjust to use ptids.  If a process exits while
14242         stopping all threads, mark its main lwp as dead.
14243         (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14244         ptids.
14245         (fetch_register, usr_store_inferior_registers)
14246         (regsets_fetch_inferior_registers)
14247         (regsets_store_inferior_registers, linux_read_memory)
14248         (linux_write_memory): Inline `inferior_pid'.
14249         (linux_look_up_symbols): Adjust to use per-process
14250         `thread_db_active'.
14251         (linux_request_interrupt): Adjust to use ptids.
14252         (linux_read_auxv): Inline `inferior_pid'.
14253         (initialize_low): Don't reference thread_db_active.
14254         * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14255         * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14256         (ps_getpid): Return the pid of the current inferior.
14257         * thread-db.c (proc_handle, thread_agent): Delete.
14258         (thread_db_create_event, thread_db_enable_reporting): Adjust to
14259         per-process data.
14260         (find_one_thread): Change argument type to ptid_t.  Adjust to
14261         per-process data.
14262         (maybe_attach_thread): Adjust to per-process data and ptids.
14263         (thread_db_find_new_threads): Ditto.
14264         (thread_db_init): Ditto.
14265         * spu-low.c (spu_create_inferior, spu_attach): Add process to
14266         processes table.  Adjust to use ptids.
14267         (spu_kill, spu_detach): Adjust interface.  Remove process from
14268         processes table.
14269         (spu_join, spu_thread_alive): Adjust interface.
14270         (spu_wait): Adjust interface.  Remove process from processes
14271         table.  Adjust to use ptids.
14272         * win32-low.c (current_inferior_tid): Delete.
14273         (current_inferior_ptid): New.
14274         (debug_event_ptid): New.
14275         (thread_rec): Take a ptid.  Adjust.
14276         (child_add_thread): Add `pid' argument.  Adjust to use ptids.
14277         (child_delete_thread): Ditto.
14278         (do_initial_child_stuff): Add `attached' argument.  Add process to
14279         processes table.
14280         (child_fetch_inferior_registers, child_store_inferior_registers):
14281         Adjust.
14282         (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14283         (win32_attach): Pass 1 to do_initial_child_stuff.
14284         (win32_kill): Adjust interface.  Remove process from processes
14285         table.
14286         (win32_detach): Ditto.
14287         (win32_join): Adjust interface.
14288         (win32_thread_alive): Take a ptid.
14289         (win32_resume): Adjust to use ptids.
14290         (get_child_debug_event): Ditto.
14291         (win32_wait): Adjust interface.  Remove exiting process from
14292         processes table.
14293
14294 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
14295
14296         Non-stop mode support.
14297
14298         * server.h (non_stop): Declare.
14299         (gdb_client_data, handler_func): Declare.
14300         (delete_file_handler, add_file_handler, start_event_loop):
14301         Declare.
14302         (handle_serial_event, handle_target_event, push_event)
14303         (putpkt_notif): Declare.
14304         * target.h (enum resume_kind): New.
14305         (struct thread_resume): Replace `step' field by `kind' field.
14306         (TARGET_WNOHANG): Define.
14307         (struct target_ops) <wait>: Add `options' argument.
14308         <supports_non_stop, async, start_non_stop>: New fields.
14309         (target_supports_non_stop, target_async): New.
14310         (start_non_stop): Declare.
14311         (mywait): Add `options' argument.
14312         * target.c (mywait): Add `options' argument.  Print child exit
14313         notifications here.
14314         (start_non_stop): New.
14315         * server.c (non_stop, own_buf, mem_buf): New globals.
14316         (struct vstop_notif): New.
14317         (notif_queue): New global.
14318         (queue_stop_reply, push_event, discard_queued_stop_replies)
14319         (send_next_stop_reply): New.
14320         (start_inferior): Adjust to use resume_kind.  Adjust to mywait
14321         interface changes.
14322         (attach_inferior): In non-stop mode, don't wait for the target
14323         here.
14324         (handle_general_set): Handle QNonStop.
14325         (handle_query): When handling qC, return the current general
14326         thread, instead of the first thread of the list.
14327         (handle_query): If the backend supports non-stop mode, include
14328         QNonStop+ in the qSupported query response.
14329         (handle_v_cont): Adjust to use resume_kind.  Handle resume_stop
14330         and non-stop mode.
14331         (handle_v_attach, handle_v_run): Handle non-stop mode.
14332         (handle_v_stopped): New.
14333         (handle_v_requests): Report support for vCont;t.  Handle vStopped.
14334         (myresume): Adjust to use resume_kind.  Handle non-stop.
14335         (queue_stop_reply_callback): New.
14336         (handle_status): Handle non-stop mode.
14337         (main): Clear non_stop flag on reconnection.  Use the event-loop.
14338         Refactor serial protocol handling from here ...
14339         (process_serial_event): ... to this new function.  When GDB
14340         selects any thread, select one here.  In non-stop mode, wait until
14341         GDB acks all pending events before exiting.
14342         (handle_serial_event, handle_target_event): New.
14343         * remote-utils.c (remote_open): Install remote_desc in the event
14344         loop.
14345         (remote_close): Remove remote_desc from the event loop.
14346         (putpkt_binary): Rename to...
14347         (putpkt_binary_1): ... this.  Add `is_notic' argument.  Handle it.
14348         (putpkt_binary): New as wrapper around putpkt_binary_1.
14349         (putpkt_notif): New.
14350         (prepare_resume_reply): In non-stop mode, don't change the
14351         general_thread.
14352         * event-loop.c: New.
14353         * Makefile.in (OBJ): Add event-loop.o.
14354         (event-loop.o): New rule.
14355
14356         * linux-low.h (pid_of): Moved here.
14357         (lwpid_of): New.
14358         (get_lwp_thread): Use lwpid_of.
14359         (struct lwp_info): Delete `lwpid' field.  Add `suspended' field.
14360         * linux-low.c (pid_of): Delete.
14361         (inferior_pid): Use lwpid_of.
14362         (linux_event_pipe): New.
14363         (target_is_async_p): New.
14364         (delete_lwp): New.
14365         (handle_extended_wait): Use lwpid_of.
14366         (add_lwp): Don't set lwpid field.
14367         (linux_attach_lwp): Adjust debug output.  Use lwpid_of.
14368         (linux_kill_one_lwp): If killing a running lwp, stop it first.
14369         Use lwpid_of.  Adjust to linux_wait_for_event interface changes.
14370         (linux_detach_one_lwp): If detaching from a running lwp, stop it
14371         first.  Adjust to linux_wait_for_event interface changes.  Use
14372         lwpid_of.
14373         (linux_detach): Don't delete the main lwp here.
14374         (linux_join): Use my_waitpid.  Avoid signal_pid.  Use lwpid_of.
14375         (status_pending_p): Don't consider explicitly suspended lwps.
14376         (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14377         pointer.  Add OPTIONS argument.  Change return type to int.  Use
14378         my_waitpid instead of sleeping.  Handle WNOHANG.  Use lwpid_of.
14379         (linux_wait_for_event): Take an integer pid instead of a lwp_info
14380         pointer.  Add status pointer argument.  Return a pid instead of a
14381         status.  Use lwpid_of.  Adjust to linux_wait_for_lwp interface
14382         changes.  In non-stop mode, don't switch to a random thread.
14383         (linux_wait): Rename to...
14384         (linux_wait_1): ... this.  Add target_options argument, and handle
14385         it.  Adjust to use resume_kind.  Use lwpid_of.  In non-stop mode,
14386         don't handle the continue thread.  Handle TARGET_WNOHANG.  Merge
14387         clean exit and signal exit code.  Don't stop all threads in
14388         non-stop mode.  In all-stop mode, only stop all threads when
14389         reporting a stop to GDB.  Handle explicit thread stop requests.
14390         (async_file_flush, async_file_mark): New.
14391         (linux_wait): New.
14392         (send_sigstop): Use lwpid_of.
14393         (wait_for_sigstop): Use lwpid_of.  Adjust to linux_wait_for_event
14394         interface changes.  In non-stop mode, don't switch to a random
14395         thread.
14396         (linux_resume_one_lwp): Use lwpid_of.
14397         (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14398         (linux_resume_one_thread): ... this.  Handle resume_stop.  In
14399         non-stop mode, don't look for pending flag in all threads.
14400         (resume_status_pending_p): Don't consider explicitly suspended
14401         threads.
14402         (my_waitpid): Reimplement.  Emulate __WALL.
14403         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14404         Use lwpid_of.
14405         (sigchld_handler, linux_supports_non_stop, linux_async)
14406         (linux_start_non_stop): New.
14407         (linux_target_ops): Register linux_supports_non_stop, linux_async
14408         and linux_start_non_stop.
14409         (initialize_low): Install SIGCHLD handler.
14410         * thread-db.c (thread_db_create_event, find_one_thread)
14411         (thread_db_get_tls_address): Use lwpid_of.
14412         * win32-low.c (win32_detach): Adjust to use resume_kind.
14413         (win32_wait): Add `options' argument.
14414         * spu-low.c (spu_resume): Adjust to use resume_kind.
14415         (spu_wait): Add `options' argument.
14416
14417 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
14418
14419         Decouple target code from remote protocol.
14420
14421         * target.h (enum target_waitkind): New.
14422         (struct target_waitstatus): New.
14423         (struct target_ops) <wait>: Return an unsigned long.  Take a
14424         target_waitstatus pointer instead of a char pointer.
14425         (mywait): Likewise.
14426         * target.c (mywait): Change prototype to return an unsigned long.
14427         Take a target_waitstatus pointer instead of a char pointer.  Adjust.
14428         * server.h (thread_from_wait, old_thread_from_wait): Delete
14429         declarations.
14430         (prepare_resume_reply): Change prototype to take a
14431         target_waitstatus.
14432         * server.c (thread_from_wait, old_thread_from_wait): Delete.
14433         (last_status, last_ptid): New.
14434         (start_inferior): Remove "statusptr" argument.  Adjust.  Return a
14435         pid instead of a signal.
14436         (attach_inferior): Remove "status" and "signal" parameters.
14437         Adjust.
14438         (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14439         not as an address.
14440         (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14441         (handle_v_requests, myresume): Remove "status" and "signal"
14442         parameters.  Adjust.
14443         (handle_status): New.
14444         (main): Delete local `status'.  Adjust.
14445         * remote-utils.c: Include target.h.
14446         (prepare_resume_reply): Change prototype to take a
14447         target_waitstatus.  Adjust.
14448
14449         * linux-low.c (linux_wait): Adjust to new target_ops->wait
14450         interface.
14451         * spu-low.c (spu_wait): Adjust.
14452         * win32-low.c (enum target_waitkind, struct target_waitstatus):
14453         Delete.
14454         (win32_wait): Adjust.
14455
14456 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
14457
14458         * target.h (struct thread_resume): Delete leave_stopped member.
14459         (struct target_ops): Add a `n' argument to the `resume' callback.
14460         * server.c (start_inferior): Adjust.
14461         (handle_v_cont, myresume): Adjust.
14462         * linux-low.c (check_removed_breakpoint): Adjust to resume
14463         interface change, and to removed leave_stopped field.
14464         (resume_ptr): Delete.
14465         (struct thread_resume_array): New.
14466         (linux_set_resume_request): Add new `arg' parameter.  Adjust to
14467         resume interface change.
14468         (linux_continue_one_thread, linux_queue_one_thread)
14469         (resume_status_pending_p): Check if the resume field is NULL
14470         instead of checking the leave_stopped member.
14471         (linux_resume): Adjust to the target resume interface change.
14472         * spu-low.c (spu_resume): Adjust to the target resume interface
14473         change.
14474         * win32-low.c (win32_detach, win32_resume): Ditto.
14475
14476 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
14477
14478         * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14479         flag.
14480         (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14481         pending.
14482         (linux_continue_one_thread): Only preserve the stepping flag if
14483         there's a pending breakpoint.
14484
14485 2009-03-31  Pedro Alves  <pedro@codesourcery.com>
14486
14487         * server.c (main): After the inferior having exited, call
14488         remote_close before exiting gdbserver.
14489
14490 2009-03-25  Thiago Jung Bauermann  <bauerman@br.ibm.com>
14491
14492         Fix size of FPSCR in Power 7 processors.
14493         * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14494         (PPC_FEATURE_HAS_DFP): New #define.
14495         (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14496         size of the FPSCR.
14497
14498 2009-03-23  Pedro Alves  <pedro@codesourcery.com>
14499
14500         * server.c (handle_query) Whitespace and formatting.
14501
14502 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
14503
14504         * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14505         linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14506         linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14507         linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14508         regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14509         thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14510         Makefile.in, configure.ac: Fix whitespace throughout.
14511         * configure: Regenerate.
14512
14513 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
14514
14515         * inferiors.c (find_inferior): Make it safe for the callback
14516         function to delete the currently iterated inferior.
14517
14518 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
14519
14520         * Makefile.in (linuw_low_h): Move higher.
14521         (thread-db.o): Depend on $(linux_low_h).
14522
14523 2009-03-17  Pedro Alves  <pedro@codesourcery.com>
14524
14525         Rename "process" to "lwp" throughout.
14526
14527         * linux-low.c (all_processes): Rename to...
14528         (all_lwps): ... this.
14529         (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14530         (add_process): Rename to ...
14531         (add_lwp): ... this.  Adjust.
14532         (linux_create_inferior): Adjust.
14533         (linux_attach_lwp): Adjust.
14534         (linux_attach): Adjust.
14535         (linux_kill_one_process): Rename to ...
14536         (linux_kill_one_lwp): ... this.  Adjust.
14537         (linux_kill): Adjust.
14538         (linux_detach_one_process): Rename to ...
14539         (linux_detach_one_lwp): ... this.  Adjust.
14540         (linux_detach): Adjust.
14541         (check_removed_breakpoint): Adjust.
14542         (status_pending_p): Adjust.
14543         (linux_wait_for_process): Rename to ...
14544         (linux_wait_for_lwp): ... this.  Adjust.
14545         (linux_wait_for_event): Adjust.
14546         (send_sigstop): Adjust.
14547         (wait_for_sigstop): Adjust.
14548         (stop_all_processes): Rename to ...
14549         (stop_all_lwps): ... this.
14550         (linux_resume_one_process): Rename to ...
14551         (linux_resume_one_lwp): ... this.  Adjust.
14552         (linux_set_resume_request, linux_continue_one_thread)
14553         (linux_queue_one_thread, resume_status_pending_p)
14554         (usr_store_inferior_registers, regsets_store_inferior_registers)
14555         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14556         Adjust.
14557         * linux-low.h (get_process): Rename to ...
14558         (get_lwp): ... this.  Adjust.
14559         (get_thread_process): Rename to ...
14560         (get_thread_lwp): ... this.  Adjust.
14561         (get_process_thread): Rename to ...
14562         (get_lwp_thread): ... this.  Adjust.
14563         (struct process_info): Rename to ...
14564         (struct lwp_info): ... this.
14565         (all_processes): Rename to ...
14566         (all_lwps): ... this.
14567         * proc-service.c (ps_lgetregs): Adjust.
14568         * thread-db.c (thread_db_create_event, find_one_thread)
14569         (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14570
14571 2009-03-14  Pedro Alves  <pedro@codesourcery.com>
14572
14573         * server.c (handle_query): Handle "qAttached".
14574
14575 2009-03-13  Nathan Sidwell  <nathan@codesourcery.com>
14576
14577         * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14578         GPLv3, update license URL.
14579
14580 2009-03-01  Doug Evans  <dje@google.com>
14581
14582         * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14583         (server_h): Add gdb_signals.h.
14584         (signals.o): Update.
14585         * server.h (target_signal_from_host,target_signal_to_host_p)
14586         (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14587
14588 2009-02-14  Pierre Muller  <muller@ics.u-strasbg.fr>
14589
14590         * remote-utils.c (getpkt): Also generate remote-debug
14591         information if noack_mode is set.
14592
14593 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
14594
14595         * server.c (handle_query): Report qXfer:siginfo:read and
14596         qXfer:siginfo:write as supported and handle them.
14597         * target.h (struct target_ops) <qxfer_siginfo>: New field.
14598         * linux-low.c (linux_xfer_siginfo): New.
14599         (linux_target_ops): Set it.
14600
14601 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
14602
14603         * server.c (gdbserver_usage): Mention --remote-debug.
14604         (main): Accept '--remote-debug' switch.
14605
14606 2009-01-18  Doug Evans  <dje@google.com>
14607
14608         * regcache.c (new_register_cache): No need to check result of xcalloc.
14609         * server.c (handle_search_memory): Back out calls to xmalloc,
14610         result is checked and error is returned to user upon failure.
14611         (handle_query): Ditto.  Add more checks for result of malloc.
14612         (handle_v_cont): Check result of malloc, report error back to
14613         user upon failure.
14614         (handle_v_run): Ditto.  Call freeargv.
14615         * server.h (freeargv): Declare.
14616         * utils.c (freeargv): New fn.
14617
14618 2009-01-15  Doug Evans  <dje@google.com>
14619
14620         * gdbreplay.c (perror_with_name): Make arg const char *.
14621         * server.h (target_signal_to_name): Make return type const char *.
14622         * thread-db.c (thread_db_err_str): Make return type const char *.
14623         * utils.c (perror_with_name): Make arg const char *.
14624
14625 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
14626
14627         * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14628         when handling a EXIT_PROCESS_DEBUG_EVENT.
14629
14630 2009-01-06  Joel Brobecker  <brobecker@adacore.com>
14631
14632         * gdbreplay.c (gdbreplay_version): Update copyright year.
14633         * server.c (gdbserver_version): Likewise.
14634
14635 2009-01-05  Doug Evans  <dje@google.com>
14636
14637         * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14638         (handle_extended_wait): Improve comment.
14639
14640 2008-12-13  Doug Evans  <dje@google.com>
14641
14642         * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14643         * server.h (ATTR_MALLOC): New macro.
14644         (xmalloc,xcalloc,xstrdup): Declare.
14645         * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14646         * inferiors.c: Ditto.
14647         * linux-low.c: Ditto.
14648         * mem-break.c: Ditto.
14649         * regcache.c: Ditto.
14650         * remote-utils.c: Ditto.
14651         * server.c: Ditto.
14652         * target.c: Ditto.
14653         * win32-low.c: Ditto.
14654
14655 2008-12-12  Doug Evans  <dje@google.com>
14656
14657         * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14658         in debugging printf.
14659
14660         * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14661
14662 2008-12-09  Doug Evans  <dje@google.com>
14663
14664         * linux-low.h (struct process_info): Delete member tid, unused.
14665         * thread-db.c (find_one_thread): Update.
14666         (maybe_attach_thread): Update.
14667
14668 2008-12-02  Pedro Alves  <pedro@codesourcery.com>
14669
14670         * target.h (struct target_ops): Add qxfer_osdata member.
14671         * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14672         and dirent.h.
14673         (linux_qxfer_osdata): New functions.
14674         (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14675         callback.
14676         * server.c (handle_query): Handle "qXfer:osdata:read:".
14677         * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14678         (buffer_xml_printf): New functions.
14679         * server.h (struct buffer): New.
14680         (buffer_grow_str, buffer_grow_str0): New macros.
14681         (buffer_grow, buffer_free, buffer_init, buffer_finish)
14682         (buffer_xml_printf): Declare.
14683
14684 2008-11-24  Doug Evans  <dje@google.com>
14685
14686         * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14687
14688 2008-11-24  Daniel Jacobowitz  <dan@codesourcery.com>
14689
14690         * server.c (handle_v_run): Always use the supplied argument list.
14691
14692 2008-11-19  Bob Wilson  <bob.wilson@acm.org>
14693
14694         * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14695         (xtensa_regmap_table): Add entry for scompare1.
14696
14697 2008-11-18  Thiago Jung Bauermann  <bauerman@br.ibm.com>
14698
14699         * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14700         powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14701         powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14702         powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14703         powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14704         powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14705         * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14706         XML target descriptions.
14707         * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14708         when inferior is running on an ISA 2.05 or later processor.  Add
14709         special case to return offset for full 64-bit slot of FPSCR when
14710         in 32-bits.
14711
14712 2008-11-14  Daniel Gutson  <dgutson@codesourcery.com>
14713
14714         * Makefile.in (SFILES, clean): Added sparc64 files.
14715         (reg-sparc64.o, reg-sparc64.c): New.
14716         * configure.srv (sparc*-*-linux*): New configuration.
14717         * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14718         syscall arguments for SPARC.
14719         (regsets_store_inferior_registers): Likewise.
14720         * linux-sparc-low.c: New file.
14721
14722 2008-10-21  Doug Evans  <dje@google.com>
14723
14724         * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14725         (READLINE_DIR,READLINE_DEP): Delete.
14726         (INTERNAL_CFLAGS): Update.
14727         (LINTFLAGS): Update.
14728
14729 2008-10-10  Pedro Alves  <pedro@codesourcery.com>
14730
14731         * server.c (handle_v_run): If GDB didn't specify an argv, use the
14732         whole argv from the last run, not just argv[0].
14733
14734 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
14735
14736         * regcache.c (new_register_cache): Return NULL if the register
14737         cache size isn't known yet.
14738         (free_register_cache): Avoid dereferencing a NULL regcache.
14739
14740 2008-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
14741
14742         * configure.srv: Merge MIPS and MIPS64.
14743
14744 2008-08-24  Maciej W. Rozycki  <macro@linux-mips.org>
14745
14746         * Makefile.in (uninstall): Apply $(EXEEXT) too.
14747
14748 2008-08-18  Luis Machado  <luisgpm@br.ibm.com>
14749
14750         * Makefile.in: Add required vsx dependencies.
14751
14752         * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14753         Declare init_registers_powerpc_vsx32l.
14754         Declare init_registers_powerpc_vsx64l.
14755         Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14756         (ppc_arch_setup): Check for VSX in hwcap.
14757         (ppc_fill_vsxregset): New function.
14758         (ppc_store_vsxregset): New function.
14759         Add new VSX entry in regset_info target_regsets.
14760
14761         * configure.srv: Add new VSX dependencies.
14762
14763 2008-08-12  Pedro Alves  <pedro@codesourcery.com>
14764
14765         * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14766         (remote_open): Set or clear transport_is_reliable.
14767         (putpkt_binary): Don't expect acks in noack mode.
14768         (getpkt): Don't send ack/nac in noack mode.
14769         * server.c (handle_general_set): Handle QStartNoAckMode.
14770         (handle_query): If connected by tcp pass QStartNoAckMode+ in
14771         qSupported.
14772         (main): Reset noack_mode on every connection.
14773         * server.h (noack_mode): Declare.
14774
14775 2008-08-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14776
14777         * Makefile.in (GDBREPLAY_OBS): New variable.
14778         (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14779
14780 2008-08-05  Ulrich Weigand  <uweigand@de.ibm.com>
14781             Daniel Jacobowitz  <dan@codesourcery.com>
14782
14783         * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14784         (usr_store_inferior_registers): Likewise.
14785         (regsets_store_inferior_registers): Likewise.
14786
14787 2008-07-31  Rolf Jansen  <rj@surtec.com>
14788             Pedro Alves  <pedro@codesourcery.com>
14789
14790         * configure.ac: Check for memmem declaration.
14791         * server.c [HAVE_MALLOC_H]: Include malloc.h.
14792         (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14793         (disable_packet_qfThreadInfo): Unconditionally compile.
14794         * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14795         * configure, config.in: Regenerate.
14796
14797 2008-07-28  Doug Kwan  <dougkwan@google.com>
14798
14799         * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14800         (linux_write_memory): Remove declaration of errno.
14801
14802 2008-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
14803
14804         * linux-low.c (handle_extended_wait): Do not use "status"
14805         variable uninitialized.
14806
14807 2008-07-07  Pedro Alves  <pedro@codesourcery.com>
14808
14809         * server.c (handle_v_attach): Inhibit reporting dll changes.
14810
14811 2008-06-27  Pedro Alves  <pedro@codesourcery.com>
14812
14813         * remote-utils.c (prepare_resume_reply): If requested, don't
14814         output "thread:TID" in the T stop reply.
14815
14816         * server.c (disable_packet_vCont, disable_packet_Tthread)
14817         (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14818         (handle_query): If requested, disable support for qC, qfThreadInfo
14819         and qsThreadInfo.
14820         (handle_v_requests): If requested, disable support for vCont.
14821         (gdbserver_show_disableable): New.
14822         (main): Handle --disable-packet and --disable-packet=LIST.
14823
14824         * server.h (disable_packet_vCont, disable_packet_Tthread)
14825         (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14826
14827 2008-06-20  Carlos O'Donell  <carlos@codesourcery.com>
14828
14829         * server.c (gdbserver_usage): Mention --version.
14830
14831 2008-06-06  Daniel Jacobowitz  <dan@codesourcery.com>
14832
14833         * Makefile.in (gdbreplay.o): New rule.
14834
14835 2008-06-06  Joseph Myers  <joseph@codesourcery.com>
14836
14837         * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14838         message, not gdbserver.
14839
14840 2008-06-05  Vladimir Prus  <vladimir@codesourcery.com>
14841             Nathan Sidwell  <nathan@codesourcery.com>
14842             Joseph Myers  <joseph@codesourcery.com>
14843
14844         * acinclude.m4: Include ../../config/acx.m4.
14845         * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14846         * configure, config.in: Regenerate.
14847         * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14848         * server.c (gdbserver_version): Print PKGVERSION.
14849         (gdbsrever_usage): Add stream parameter.  Print REPORT_BUGS_TO.
14850         (main): Adjust gdbserver_usage calls.
14851         * gdbreplay.c (version, host_name): Add declarations.
14852         (gdbreplay_version, gdbreplay_usage): New.
14853         (main): Accept --version and --help options.
14854
14855 2008-06-04  Daniel Jacobowitz  <dan@codesourcery.com>
14856
14857         * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14858         (arm_breakpoint_at): Handle Thumb.
14859         (the_low_target): Add comment.
14860
14861 2008-05-29  Ulrich Weigand  <uweigand@de.ibm.com>
14862
14863         * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14864
14865 2008-05-09  Doug Evans  <dje@google.com>
14866
14867         * server.h (decode_search_memory_packet): Declare.
14868         * remote-utils.c (decode_search_memory_packet): New fn.
14869         * server.c (handle_search_memory_1): New fn.
14870         (handle_search_memory): New fn.
14871         (handle_query): Process qSearch:memory packets.
14872
14873 2008-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
14874
14875         * regcache.c (registers_length): Remove.
14876         (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14877         full register packet.
14878         * regcache.h (registers_length): Remove prototype.
14879         * server.h (PBUFSIZ): Define to 16384.
14880
14881 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
14882
14883         * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14884         powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14885         powerpc-64l.o, and powerpc-altivec64l.o.
14886         Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14887         rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14888         rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14889         rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14890         rs6000/power-linux.xml, and rs6000/power64-linux.xml
14891         to srv_xmlfiles.
14892
14893         * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14894         (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14895         (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14896         (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14897         (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14898         (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14899         (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14900         (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14901         (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14902         (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14903         (clean): Update.
14904
14905         * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14906         (init_registers_powerpc_32l): ... this new prototype.
14907         (init_registers_powerpc_32): Remove, replace by ...
14908         (init_registers_powerpc_altivec32l): ... this new prototype.
14909         (init_registers_powerpc_e500): Remove, replace by ...
14910         (init_registers_powerpc_e500l): ... this new prototype.
14911         (init_registers_ppc64): Remove, replace by ...
14912         (init_registers_powerpc_64l): ... this new prototype.
14913         (init_registers_powerpc_64): Remove, replace by ...
14914         (init_registers_powerpc_altivec64l): ... this new prototype.
14915         (ppc_num_regs): Set to 73.
14916         (PT_ORIG_R3, PT_TRAP): Define if necessary.
14917         (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14918         (ppc_cannot_store_register): Handle orig_r3 and trap.
14919         (ppc_arch_setup): Update init_registers_... calls.
14920         (ppc_fill_gregset): Handle orig_r3 and trap.
14921
14922         * inferiors.c (clear_inferiors): Reset current_inferior.
14923
14924 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
14925
14926         * acinclude.m4: Add override.m4.
14927         * configure: Regenerate.
14928
14929 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
14930
14931         * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14932         initial call to init_register_ppc64.
14933
14934 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
14935
14936         * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14937         single powerpc*-*-linux* case.
14938         (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14939
14940 2008-04-17  Ulrich Weigand  <uweigand@de.ibm.com>
14941
14942         * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14943         srv_regobj.  Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14944         from reg_xmlfiles.
14945         * linux-ppc-low.c: Include <elf.h>.
14946         (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14947         (ppc_hwcap): New global variable.
14948         (ppc_regmap): Remove __SPE__ #ifdef sections.
14949         (ppc_regmap_e500): New global variable.
14950         (ppc_cannot_store_register): Update __SPE__ special case.
14951         (ppc_get_hwcap): New function.
14952         (ppc_arch_setup): Use it to determine whether inferior supports
14953         AltiVec or SPE registers.  Set the_low_target.regmap if appropriate.
14954         (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14955         Do not access registers if target does not support AltiVec.
14956         (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14957         Do not access registers if target does not support SPE.
14958         (target_regsets): Unconditionally include AltiVec and SPE regsets.
14959
14960 2008-04-17  Daniel Jacobowitz  <dan@codesourcery.com>
14961
14962         * linux-low.c (disabled_regsets, num_regsets): New.
14963         (use_regsets_p): Delete.
14964         (linux_wait_for_process): Clear disabled_regsets.
14965         (regsets_fetch_inferior_registers): Check and set it.
14966         (regsets_store_inferior_registers): Likewise.
14967         (linux_fetch_registers, linux_store_registers): Do not use
14968         use_regsets_p.
14969         (initialize_low): Allocate disabled_regsets.
14970
14971 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
14972
14973         * Makefile.in (LIBOBJS): New.
14974         (OBS): Use LIBOBJS.
14975         (memmem.o): New rule.
14976         * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14977         * configure: Regenerated.
14978
14979 2008-04-04  Ulrich Weigand  <uweigand@de.ibm.com>
14980
14981         * server.c (handle_query): Never return "unsupported" for
14982         qXfer:features:read queries.
14983
14984 2008-03-27  Ulrich Weigand  <uweigand@de.ibm.com>
14985
14986         * server.c (get_features_xml): Fix inverted condition.
14987         (handle_query): Always support qXfer:feature:read.
14988
14989 2008-03-10  Daniel Jacobowitz  <dan@codesourcery.com>
14990
14991         * server.c (wrapper_argv): New.
14992         (start_inferior): Handle wrapper_argv.  If set, expect an extra
14993         trap.
14994         (gdbserver_usage): Document --wrapper.
14995         (main): Parse --wrapper.
14996
14997 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
14998
14999         * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15000         powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15001         * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15002         (ppc_set_pc): Likewise.
15003         (ppc_arch_setup): New function.
15004         (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15005         of collect_register.
15006         (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15007
15008 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
15009
15010         * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15011         instead of linux-ppc64-low.o.
15012         * linux-ppc64-low.c: Remove file.
15013         * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15014         (linux-ppc64-low.o): Remove rule.
15015
15016         * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15017         (init_registers_powerpc_64): Likewise.
15018         (ppc_regmap): Conditionally define depending on __powerpc64__.
15019         (ppc_cannot_store_register): Do not special-case "fpscr" when
15020         compiled on __powerpc64__.
15021         (ppc_collect_ptrace_register): New function.
15022         (ppc_supply_ptrace_register): New function.
15023         (ppc_breakpoint): Change type to "unsigned int".
15024         (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15025         (the_low_target): Conditionally provide initializers for the
15026         arch_setup member depending on __powerpc64__.  Install
15027         collect_ptrace_register and supply_ptrace_register members.
15028
15029 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
15030
15031         * regcache.h (gdbserver_xmltarget): Add extern declaration.
15032         * server.c (gdbserver_xmltarget): Define.
15033         (get_features_xml): Use it to replace "target.xml" and arch_string.
15034
15035         * configure.srv: Remove srv_xmltarget.  Add XML files that were
15036         mentioned there to srv_xmlfiles instead.  Remove conditional tests
15037         on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15038         srv_xmlfiles and srv_regobj to include all possible choices.
15039         * configure.ac (srv_xmltarget): Remove.
15040         (srv_xmlfiles): Do not add "target.xml".
15041         (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15042         checks for supplementary target information.
15043         * configure: Regenerate.
15044         * Makefile.in (XML_TARGET): Remove.
15045         (target.xml): Remove rule.
15046         (clean): Do not clean up target.xml.
15047         (.PRECIOUS): Do not mention target.xml.
15048
15049         * target.h (struct target_ops): Remove arch_string member.
15050         * linux-low.c (linux_arch_string): Remove.
15051         (linux_target_ops): Remove arch_string initializer.
15052         * linux-low.h (struct linux_target_ops): Remove arch_string member.
15053         * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15054         * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15055         * spu-low.c (spu_arch_string): Remove.
15056         (spu_target_ops): Remove arch_string initializer.
15057         * win32-low.c (win32_arch_string): Remove.
15058         (win32_target_ops): Remove arch_string initializer.
15059         * win32-low.h (struct win32_target_ops): Remove arch_string member.
15060         * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15061         * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15062
15063 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
15064
15065         * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15066         by collect_ptrace_register and supply_ptrace_register hooks.
15067         * linux-low.c (fetch_register): Use supply_ptrace_register callback
15068         instead of checking for the_low_target.left_pad_xfer.
15069         (usr_store_inferior_registers): Use collect_ptrace_register callback
15070         instead of checking for the_low_target.left_pad_xfer.
15071
15072         * linux-s390-low.c (s390_collect_ptrace_register): New function.
15073         (s390_supply_ptrace_register): Likewise.
15074         (s390_fill_gregset): Call s390_collect_ptrace_register.
15075         (the_low_target): Update.
15076
15077         * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15078         (ppc_supply_ptrace_register): Likewise.
15079         (the_low_target): Update.
15080
15081         * linux-i386-low.c (the_low_target): Update.
15082         * linux-x86-64-low.c (the_low_target): Update.
15083
15084 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
15085
15086         * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15087         reg-s390.o and reg-s390x.o.
15088
15089         * linux-low.c (new_inferior): New global variable.
15090         (linux_create_inferior, linux_attach): Set it.
15091         (linux_wait_for_process): Call the_low_target.arch_setup after the
15092         target has stopped for the first time.
15093         (initialize_low): Do not call the_low_target.arch_setup.
15094
15095         * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15096         (s390_set_pc): Likewise.
15097         (s390_arch_setup): New function.
15098         (the_low_target): Use s390_arch_setup as arch_setup routine.
15099
15100         * regcache.c (realloc_register_cache): New function.
15101         (set_register_cache): Call it for each existing regcache.
15102
15103 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
15104
15105         * server.h (init_registers): Remove prototype.
15106
15107         * linux-low.h (struct linux_target_ops): Add arch_setup field.
15108         * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15109         instead of init_registers ().
15110         * linux-arm-low.c (init_registers_arm): Add prototype.
15111         (init_registers_arm_with_iwmmxt): Likewise.
15112         (the_low_target): Add initializer for arch_setup field.
15113         * linux-cris-low.c (init_registers_cris): Add prototype.
15114         (the_low_target): Add initializer for arch_setup field.
15115         * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15116         (the_low_target): Add initializer for arch_setup field.
15117         * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15118         (the_low_target): Add initializer for arch_setup field.
15119         * linux-ia64-low.c (init_registers_ia64): Add prototype.
15120         (the_low_target): Add initializer for arch_setup field.
15121         * linux-m32r-low.c (init_registers_m32r): Add prototype.
15122         (the_low_target): Add initializer for arch_setup field.
15123         * linux-m68k-low.c (init_registers_m68k): Add prototype.
15124         (the_low_target): Add initializer for arch_setup field.
15125         * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15126         (init_registers_mips64_linux): Likewise.
15127         (the_low_target): Add initializer for arch_setup field.
15128         * linux-ppc-low.c (init_registers_ppc): Add prototype.
15129         (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15130         (the_low_target): Add initializer for arch_setup field.
15131         * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15132         (init_registers_powerpc_64): Likewise.
15133         (the_low_target): Add initializer for arch_setup field.
15134         * linux-s390-low.c (init_registers_s390): Add prototype.
15135         (init_registers_s390x): Likewise.
15136         (the_low_target): Add initializer for arch_setup field.
15137         * linux-sh-low.c (init_registers_sh): Add prototype.
15138         (the_low_target): Add initializer for arch_setup field.
15139         * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15140         (the_low_target): Add initializer for arch_setup field.
15141         * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15142         (the_low_target): Add initializer for arch_setup field.
15143
15144         * win32-low.h (struct win32_target_ops): Add arch_setup field.
15145         * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15146         instead of init_registers ().
15147         * win32-arm-low.c (init_registers_arm): Add prototype.
15148         (the_low_target): Add initializer for arch_setup field.
15149         * win32-i386-low.c (init_registers_i386): Add prototype.
15150         (the_low_target): Add initializer for arch_setup field.
15151
15152         * spu-low.c (init_registers_spu): Add prototype.
15153         (initialize_low): Call initialie_registers_spu () instead of
15154         initialize_registers ().
15155
15156 2008-02-19  Pedro Alves  <pedro@codesourcery.com>
15157
15158         * server.c (handle_v_requests): When handling the vRun and vAttach
15159         packets, if already debugging a process, don't kill it.  Return an
15160         error instead.
15161
15162 2008-02-17  Daniel Jacobowitz  <dan@codesourcery.com>
15163
15164         * server.c (handle_query): Correct length check.
15165
15166 2008-02-14  Pedro Alves  <pedro_alves@portugalmail.pt>
15167
15168         * win32-low.c (do_initial_child_stuff): Add process handle
15169         parameter.  Set current_process_handle and current_process_id from the
15170         parameters. Clear globals.
15171         (win32_create_inferior): Don't set current_process_handle and
15172         current_process_id here.  Instead pass them on the call to
15173         do_initial_child_stuff.
15174         (win32_attach): Likewise.
15175         (win32_clear_inferiors): New.
15176         (win32_kill): Don't close the current process handle or the
15177         current thread handle here.  Instead call win32_clear_inferiors.
15178         (win32_detach): Don't open a new handle to the process.  Call
15179         win32_clear_inferiors.
15180         (win32_join): Don't rely on current_process_handle; open a new
15181         handle using the process id.
15182         (win32_wait): Call win32_clear_inferiors when the inferior process
15183         has exited.
15184
15185 2008-02-14  Daniel Jacobowitz  <dan@codesourcery.com>
15186
15187         * server.c (monitor_show_help): Add "exit".
15188
15189 2008-02-11  Maxim Grigoriev  <maxim2405@gmail.com>
15190
15191         * Makefile.in (SFILES): Add linux-xtensa-low.c.
15192         (clean): Add reg-xtensa.c.
15193         (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15194         * configure.srv (xtensa*-*-linux*) New target.
15195         * linux-xtensa-low.c: New.
15196         * xtensa-xtregs.c: New.
15197
15198 2008-02-01  Pedro Alves  <pedro_alves@portugalmail.pt>
15199
15200         * hostio.c: Don't include errno.h.
15201         (errno_to_fileio_errno): Move to hostio-errno.
15202         * hostio.c: (hostio_error): Remove the error parameter.  Defer the
15203         error number outputting to the target->hostio_last_error callback.
15204         (hostio_packet_error): Use FILEIO_EINVAL directly.
15205         (handle_open, handle_pread, hostio_error, handle_unlink): Update
15206         calls to hostio_error.
15207         * hostio-errno.c: New.
15208         * server.h (hostio_last_error_from_errno): Declare.
15209         * target.h (target_ops): Add hostio_last_error member.
15210         * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15211         as hostio_last_error handler.
15212         * spu-low.c (spu_target_ops): Likewise.
15213         * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15214         (wince_hostio_last_error): New functions.
15215         (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15216         as hostio_last_error handler.
15217         (win32_target_ops) [!_WIN32_WCE]: Register
15218         hostio_last_error_from_errno as hostio_last_error handler.
15219         * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15220         (hostio-errno.o): New rule.
15221         * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15222         * configure.srv (srv_hostio_err_objs): New variable.  Default to
15223         hostio-errno.o.
15224         (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15225         * configure: Regenerate.
15226
15227 2008-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
15228
15229         * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15230         (linux_kill, linux_detach): Clean up the process list.
15231         * remote-utils.c (remote_open): Improve port number parsing.
15232         (putpkt_binary, input_interrupt): Only send interrupts if the target
15233         is running.
15234         * server.c (extended_protocol): Make static.
15235         (attached): Define earlier.
15236         (exit_requested, response_needed, program_argv): New variables.
15237         (target_running): New.
15238         (start_inferior): Clear attached here.
15239         (attach_inferior): Set attached here.
15240         (require_running): Define.
15241         (handle_query): Use require_running and target_running.  Implement
15242         "monitor exit".
15243         (handle_v_attach, handle_v_run): New.
15244         (handle_v_requests): Use require_running.  Handle vAttach and vRun.
15245         (gdbserver_usage): Update.
15246         (main): Redo argument parsing.  Handle --debug and --multi.  Handle
15247         --attach along with other options or after the port.  Save
15248         program_argv.  Support no initial program.  Resynchronize
15249         communication with GDB after an error.  Handle "monitor exit".
15250         Use require_running and target_running.  Always allow the extended
15251         protocol.  Do not error out for Hc0 or Hc-1.  Do not automatically
15252         restart in extended mode.
15253         * README: Refer to the GDB manual.  Update --attach usage.
15254
15255 2007-12-20  Andreas Schwab  <schwab@suse.de>
15256
15257         * linux-low.c (STACK_SIZE): Define.
15258         (linux_tracefork_child): Use it.  Use __clone2 on ia64.
15259         (linux_test_for_tracefork): Likewise.
15260
15261 2007-12-18  Daniel Jacobowitz  <dan@codesourcery.com>
15262
15263         * linux-low.c (linux_wait_for_event): Update messages.  Do not
15264         reinsert auto-delete breakpoints.
15265         * mem-break.c (struct breakpoint): Change return type of handler to
15266         int.
15267         (set_breakpoint_at): Update handler type.
15268         (reinsert_breakpoint_handler): Return 1 instead of calling
15269         delete_breakpoint.
15270         (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15271         setting a new one.
15272         (check_breakpoints): Delete auto-delete breakpoints and return 2.
15273         * mem-break.h (set_breakpoint_at): Update handler type.
15274         * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15275         * win32-low.c (auto_delete_breakpoint): New.
15276         (get_child_debug_event): Use it.
15277
15278 2007-12-16  Daniel Jacobowitz  <dan@codesourcery.com>
15279
15280         * configure.ac: Check for pread and pwrite.
15281         * hostio.c (handle_pread): Fall back to lseek and read.
15282         (handle_pwrite): Fall back to lseek and write.
15283         * config.in, configure: Regenerated.
15284
15285 2007-12-07  Daniel Jacobowitz  <dan@codesourcery.com>
15286
15287         * server.c (myresume): Add own_buf argument.
15288         (main): Update calls.
15289
15290 2007-12-06  Daniel Jacobowitz  <dan@codesourcery.com>
15291
15292         * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15293         * remote-utils.c (remote_open): Do not call disable_async_io.
15294         (block_async_io): Delete.
15295         (unblock_async_io): Make static.
15296         (initialize_async_io): New.
15297         * server.c (handle_v_cont): Handle async I/O here.
15298         (myresume): Likewise.  Move other common resume tasks here...
15299         (main): ... from here.  Call initialize_async_io.  Disable async
15300         I/O before the main loop.
15301         * server.h (initialize_async_io): Declare.
15302         (block_async_io, unblock_async_io): Delete prototypes.
15303         * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15304
15305 2007-12-06  Mick Davis  <mickd@goanna.iinet.net.au>
15306
15307         * remote-utils.c (readchar): Allow binary data in received messages.
15308
15309 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
15310
15311         * win32-low.c (attaching): New global.
15312         (win32_create_inferior): Clear the `attaching' global.
15313         (win32_attach): Set the `attaching' global.
15314         (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15315         attaching.  Only set a breakpoint at the entry point if not
15316         attaching.
15317
15318 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
15319
15320         * server.c (main): Don't report dll events on the initial
15321         connection on attaches.
15322
15323 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
15324
15325         * server.c (main): Relax numerical bases supported for the pid of
15326         the --attach command line argument.
15327
15328 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
15329
15330         * win32-low.c (win32_attach): Call OpenProcess before
15331         DebugActiveProcess, not after.  Add last error output to error
15332         call.
15333
15334 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
15335
15336         * win32-low.c (win32_get_thread_context)
15337         (win32_set_thread_context): New functions.
15338         (thread_rec): Use win32_get_thread_context.
15339         (continue_one_thread, win32_resume): Use win32_set_thread_context.
15340         * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15341         field.
15342
15343 2007-12-03  Leo Zayas
15344             Pedro Alves  <pedro_alves@portugalmail.pt>
15345
15346         * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15347         global variables.
15348         (child_add_thread): Minor cleanup.
15349         (child_continue): Resume artificially suspended threads before
15350         calling ContinueDebugEvent.
15351         (suspend_one_thread): New.
15352         (fake_breakpoint_event): New.
15353         (get_child_debug_event): Change return type to int.  Check here if
15354         gdb sent an interrupt request.  If a soft interrupt was requested,
15355         fake a breakpoint event.  Return 0 if there is no event to handle,
15356         and 1 otherwise.
15357         (win32_wait): Don't check here if gdb sent an interrupt request.
15358         Ensure there is a valid event to handle.
15359         (win32_request_interrupt): Add soft interruption method as last
15360         resort.
15361
15362 2007-12-03  Leo Zayas
15363             Pedro Alves  <pedro_alves@portugalmail.pt>
15364
15365         * win32-low.h (win32_thread_info): Add descriptions to the
15366         structure members.  Replace `suspend_count' counter by a
15367         `suspended' flag.
15368         * win32-low.c (thread_rec): Update condition of when to get the
15369         context from the inferior.  Rely on ContextFlags being set if it
15370         has already been retrieved.  Only suspend the inferior thread if
15371         we haven't already.  Warn if that fails.
15372         (continue_one_thread): s/suspend_count/suspended/.  Only call
15373         ResumeThread once.  Warn if that fails.
15374
15375 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
15376
15377         * win32-low.c (win32_wait): Don't read from the inferior when it
15378         has already exited.
15379
15380 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
15381
15382         * Makefile.in (win32_low_h): New variable.
15383         (win32-low.o): Add dependency on $(win32_low_h).
15384         (win32-arm-low.o, win32-i386-low.o): New rules.
15385
15386 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
15387
15388         * hostio.c: Correct copyright year.
15389
15390 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
15391
15392         * Makefile.in (OBS): Add hostio.o.
15393         (hostio.o): New rule.
15394         * server.h (handle_vFile): Declare.
15395         * hostio.c: New file.
15396         * server.c (handle_v_requests): Take packet_len and new_packet_len
15397         for binary packets.  Call handle_vFile.
15398         (main): Update call to handle_v_requests.
15399
15400 2007-11-05  Daniel Jacobowitz  <dan@codesourcery.com>
15401
15402         * linux-low.c: Include <sched.h>.
15403
15404 2007-11-01  Daniel Jacobowitz  <dan@codesourcery.com>
15405
15406         * linux-low.c (linux_tracefork_grandchild): New.
15407         (linux_tracefork_child): Use clone.
15408         (linux_test_for_tracefork): Use clone; allocate and free a stack.
15409
15410 2007-10-31  Joel Brobecker  <brobecker@adacore.com>
15411
15412         * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15413
15414 2007-10-24  Daniel Jacobowitz  <dan@codesourcery.com>
15415
15416         * linux-low.c (handle_extended_wait): Handle unexpected signals.
15417
15418 2007-10-23  Daniel Jacobowitz  <dan@codesourcery.com>
15419
15420         * inferiors.c (change_inferior_id): Delete.
15421         (add_pid_to_list, pull_pid_from_list): New.
15422         * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15423         (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15424         (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15425         (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15426         (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15427         (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15428         (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15429         (using_threads): Always set to 1.
15430         (handle_extended_wait): New.
15431         (add_process): Do not set TID.
15432         (linux_create_inferior): Set must_set_ptrace_flags.
15433         (linux_attach_lwp): Remove TID argument.  Do not check using_threads.
15434         Use PTRACE_SETOPTIONS.  Call new_thread_notify.  Update all callers.
15435         (linux_thread_alive): Rename TID argument to LWPID.
15436         (linux_wait_for_process): Handle unknown processes.  Do not use TID.
15437         (linux_wait_for_event): Do not use TID or check using_threads.  Update
15438         call to dead_thread_notify.  Call handle_extended_wait.
15439         (linux_create_inferior): Use PTRACE_SETOPTIONS.
15440         (send_sigstop): Delete sigstop_sent.
15441         (wait_for_sigstop): Avoid TID.
15442         (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15443         (linux_test_for_tracefork): New.
15444         (linux_lookup_signals): Use thread_db_active and
15445         linux_supports_tracefork_flag.
15446         (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15447         * linux-low.h (get_process_thread): Avoid TID.
15448         (struct process_ifo): Move thread_known and tid to the end.  Remove
15449         sigstop_sent.
15450         (linux_attach_lwp, thread_db_init): Update prototypes.
15451         * server.h (change_inferior_id): Delete prototype.
15452         (add_pid_to_list, pull_pid_from_list): New prototypes.
15453         * thread-db.c (thread_db_use_events): New.
15454         (find_first_thread): Rename to...
15455         (find_one_thread): ...this.  Update callers and messages.  Do not
15456         call fatal.  Check thread_db_use_events.  Do not call
15457         change_inferior_id or new_thread_notify.
15458         (maybe_attach_thread): Update.  Do not call new_thread_notify.
15459         (thread_db_init): Set thread_db_use_events.  Check use_events.
15460         * utils.c (fatal, warning): Correct message prefix.
15461
15462 2007-10-15  Daniel Jacobowitz  <dan@codesourcery.com>
15463
15464         * Makefile.in (clean): Remove new files.
15465         (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15466         (powerpc-64.o, powerpc-64.c): New rules.
15467         * configure.srv: Use alternate register sets for powerpc64-*-linux*
15468         with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15469         with SPE.
15470         * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15471         SPE targets.
15472         (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15473         (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15474         (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15475         (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15476         (target_regsets): Add AltiVec and SPE register sets.
15477         * configure.ac: Check for AltiVec and SPE.
15478         * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15479         (ppc_fill_vrregset, ppc_store_vrregset): New.
15480         (target_regsets): Add AltiVec register set.
15481         * configure: Regenerated.
15482
15483 2007-09-19  Daniel Jacobowitz  <dan@codesourcery.com>
15484
15485         * linux-low.c (O_LARGEFILE): Define.
15486         (linux_read_memory): Use /proc/PID/mem.
15487         * configure.ac: Use AC_GNU_SOURCE.  Check for pread64.
15488         * configure, config.in: Regenerated.
15489
15490 2007-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
15491
15492         * linux-low.c (linux_wait_for_event): Do not pass signals while
15493         single-stepping.
15494
15495 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
15496
15497         * win32-low.c (create_process): New.
15498         (win32_create_inferior): Use create_process instead of
15499         CreateProcess.  If create_process failed retry appending an ".exe"
15500         suffix.  Store the GetLastError result immediatelly after
15501         create_process calls and use it on the call to error.
15502
15503 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
15504
15505         * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15506
15507 2007-08-23  Joel Brobecker  <brobecker@adacore.com>
15508
15509         * configure.ac: Switch license to GPLv3.
15510
15511 2007-08-01  Michael Snyder  <msnyder@access-company.com>
15512
15513         * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15514
15515 2007-07-31  Pedro Alves  <pedro_alves@portugalmail.pt>
15516
15517         * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15518         typedef.
15519         (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15520         (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL.  Get
15521         CloseToolhelp32Snapshot.
15522         (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15523         CloseToolhelp32Snapshot.
15524
15525 2007-07-27  Michael Snyder  <michael.snyder@access-company.com>
15526
15527         * server.c (main): Check for inferior exit before main loop.
15528
15529 2007-07-18  Pedro Alves  <pedro_alves@portugalmail.pt>
15530
15531         * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15532         instead of on tmp_desc.
15533
15534 2007-07-17  Pedro Alves  <pedro_alves@portugalmail.pt>
15535             Daniel Jacobowitz  <dan@codesourcery.com>
15536
15537         * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15538         (add_thread): Minor cleanups.
15539         (clear_inferiors): Move lower in the file.  Clear the DLL
15540         list.
15541         (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15542         * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15543         (xml_escape_text): New.
15544         * server.c (handle_query): Handle qXfer:libraries:read.  Report it
15545         for qSupported.
15546         (handle_v_cont): Report errors.
15547         (gdbserver_version): Update.
15548         (main): Correct size of own_buf.  Do not report initial DLL events.
15549         * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15550         (unloaded_dll, xml_escape_text): New.
15551         * win32-low.c (enum target_waitkind): Update comments.
15552         (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15553         (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15554         (win32_EnumProcessModules, win32_GetModuleInformation)
15555         (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15556         (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15557         (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15558         (win32_Module32First, win32_Module32Next, load_toolhelp)
15559         (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15560         (get_child_debug_event): Handle DLL events.
15561         (win32_wait): Likewise.
15562
15563 2007-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
15564
15565         * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15566         * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15567
15568 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
15569
15570         * win32-low.c (handle_output_debug_string): Ignore event if not
15571         waiting.
15572
15573 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
15574
15575         * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15576
15577 2007-07-03  Daniel Jacobowitz  <dan@codesourcery.com>
15578
15579         * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15580
15581 2007-07-02  Daniel Jacobowitz  <dan@codesourcery.com>
15582
15583         * inferiors.c (change_inferior_id): Add comment.
15584         * linux-low.c (check_removed_breakpoint): Add an early
15585         prototype.  Improve debug output.
15586         (linux_attach): Doc update.
15587         (linux_detach_one_process, linux_detach): Clean up before releasing
15588         each process.
15589         (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15590         * linux-low.h (struct process_info): Doc improvement.
15591         * mem-break.c (delete_all_breakpoints): New.
15592         * mem-break.h (delete_all_breakpoints): New prototype.
15593         * thread-db.c (find_first_thread): New.
15594         (thread_db_create_event): Call it instead of
15595         thread_db_find_new_threads.  Clean up unused variables.
15596         (maybe_attach_thread): Remove first thread handling.
15597         (thread_db_find_new_threads): Use find_first_thread.
15598         (thread_db_get_tls_address): Likewise.
15599
15600 2007-06-27  Daniel Jacobowitz  <dan@codesourcery.com>
15601
15602         * thread-db.c (thread_db_find_new_threads): Add prototype.
15603         (thread_db_create_event): Check for the main thread before adding
15604         a new thread.
15605         (maybe_attach_thread): Only enable event reporting if TID == 0.
15606         (thread_db_get_tls_address): Check for new threads.
15607
15608 2007-06-20  Daniel Jacobowitz  <dan@codesourcery.com>
15609
15610         * linux-low.c (linux_create_inferior): Try execv before execvp.
15611         * spu-low.c (spu_create_inferior): Likewise.
15612
15613 2007-06-13  Mike Frysinger  <vapier@gentoo.org>
15614
15615         * linux-low.c (linux_create_inferior): Change execv to execvp.
15616         * spu-low.c (spu_create_inferior): Likewies.
15617
15618 2007-06-13  Daniel Jacobowitz  <dan@codesourcery.com>
15619
15620         * Makefile.in (clean): Clean new files instead of deleted ones.
15621         (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15622         (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15623         rules.
15624         * configure.srv: Specify XML files and new regformats for MIPS and
15625         MIPS64 GNU/Linux.
15626         * linux-mips-low.c (mips_num_regs): Set to only used registers.
15627         (mips_regmap): Do not fetch $0.  Remove unused registers.  Add
15628         an entry for the restart register.
15629         (mips_cannot_fetch_register, mips_cannot_store_register)
15630         (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15631         register names to match the XML descriptions.
15632         (mips_fill_gregset, mips_store_gregset): Likewise.  Handle the
15633         restart register instead of $0.
15634
15635 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
15636             Markus Deuling  <deuling@de.ibm.com>
15637
15638         * remote-utils.c (decode_xfer_write): New function.
15639         * server.h (decode_xfer_write): Add prototype.
15640         * server.c (handle_query): Add PACKET_LEN argument.  Support
15641         qXfer:spu:read and qXfer:spu:write packets.
15642         (main): Pass packet_len to handle_query.
15643         * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15644         * target.h (target_ops): Add qxfer_spu.
15645
15646 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
15647
15648         * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15649         accessing non-seekable spufs files.
15650
15651 2007-05-16  Markus Deuling  <deuling@de.ibm.com>
15652
15653         * server.c (handle_query): Add reply for qC packet.
15654
15655 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
15656             Leo Zayas  <lerele@champenstudios@com>
15657
15658         * server.h (check_remote_input_interrupt_request): New function.
15659         * remote_utils.c (INVALID_DESCRIPTOR): New define.
15660         (remote_desc): Initialize with INVALID_DESCRIPTOR.
15661         (input_interrupt): Expose on USE_WIN32API too.  Fix whitespace.
15662         (check_remote_input_interrupt_request): New function.
15663         * server.h (check_remote_input_interrupt_request): Declare.
15664         * win32-low.c (winapi_DebugBreakProcess,
15665         winapi_GenerateConsoleCtrlEvent): New typedefs.
15666         (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15667         to 250 ms.
15668         (win32_wait): Check for remote interrupt request
15669         with check_remote_input_interrupt_request.
15670         (win32_request_interrupt): New function.
15671         (win32_target_op): Set request_interrupt to win32_request_interrupt.
15672
15673 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
15674
15675         * win32-low.c (debug_registers_changed,
15676         debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15677         CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15678         CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15679         (thread_rec): Get context using the low target.
15680         (child_add_thread): Call thread_added on the low target,
15681         which does the same thing.
15682         (regptr): Delete.
15683         (do_initial_child_stuff): Remove debug registers references.
15684         Set context using the low target.  Resume threads after
15685         setting the contexts.
15686         (child_continue): Remove dead variable.  Remove debug
15687         registers references.
15688         (child_fetch_inferior_registers): Go through the low target.
15689         (do_child_store_inferior_registers): Remove.
15690         (child_store_inferior_registers): Go through the low target.
15691         (win32_resume): Remove debug registers references.
15692         Set context using the low target.
15693         (handle_exception): Change return type to void.  Don't record
15694         context here.  Set status to TARGET_WAITKIND_SPURIOUS on a
15695         first chance exception.
15696         (get_child_debug_event): Change return type to void.  Remove
15697         goto loop.  Always return after waiting for debug event.
15698         (win32_wait): Convert to switch statement.  Handle spurious
15699         events.
15700
15701         * win32-i386-low.c (debug_registers_changed,
15702         debug_registers_used): New.
15703         (initial_stuff): Rename to ...
15704         (i386_initial_stuff): ... this.  Clear debug registers
15705         state variables.
15706         (store_debug_registers): Delete.
15707         (i386_get_thread_context): New.
15708         (load_debug_registers): Delete.
15709         (i386_set_thread_context): New.
15710         (i386_thread_added): New.
15711         (single_step): Rename to ...
15712         (i386_single_step): ... this.
15713         (do_fetch_inferior_registers): Rename to ...
15714         (i386_fetch_inferior_register): ... this.
15715         (i386_store_inferior_register): New.
15716         (the_low_target): Adapt to new interface.
15717
15718         * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15719         (arm_get_thread_context): New.
15720         (arm_set_thread_context): New.
15721         (regptr): New.
15722         (do_fetch_inferior_registers): Rename to ...
15723         (arm_fetch_inferior_register): ... this.
15724         (arm_store_inferior_register): New.
15725         (arm_wince_breakpoint): Reimplement as unsigned long.
15726         (arm_wince_breakpoint_len): Define.
15727         (the_low_target): Adapt to new interface.
15728
15729         * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15730         load_debug_registers.  Add get_thread_context, set_thread_context,
15731         thread_added and store_inferior_register.  Rename
15732         fetch_inferior_registers to fetch_inferior_register.
15733         (regptr): Remove declaration.
15734
15735 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
15736
15737         * linux-low.c (linux_detach): Change return type to int.  Return 0.
15738         * spu-low.c (spu_detach): Likewise.
15739
15740 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
15741
15742         * target.h (target_ops): Change return type of detach to int.
15743         Add join.
15744         (join_inferior): New.
15745         * server.c (main): Don't skip detach support on mingw32.
15746         If the inferior doesn't support detaching return error.
15747         Call join_inferior instead of using waitpid.
15748         * linux-low.c (linux_join): New.
15749         (linux_target_op): Add linux_join.
15750         * spu-low.c (spu_join): New.
15751         (spu_target_ops): Add spu_join.
15752         * win32-low.c (win32_detach): Adapt to new interface.
15753         Reopen current_process_handle before detaching.  Issue a child
15754         resume before detaching.
15755         (win32_join): New.
15756         (win32_target_op): Add win32_join.
15757
15758 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
15759
15760         * win32-low.c (win32-attach): Fix return value.
15761         * target.h (target_ops): Describe ATTACH return values.
15762
15763 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
15764
15765         * win32-low.c (GETPROCADDRESS): Define.
15766         (winapi_DebugActiveProcessStop): Add WINAPI.  typedef as pointer.
15767         (winapi_DebugSetProcessKillOnExit): Likewise.
15768         (win32_create_inferior): Force usage of ansi CreateProcessA.
15769         (win32_attach): Use GETPROCADDRESS.
15770         (win32_detach): Likewise.
15771
15772 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
15773
15774         * win32-low.c (win32_wait): Don't use WSTOPSIG.
15775
15776 2007-03-30  Pedro Alves  <pedro_alves@portugalmail.pt>
15777
15778         * win32-low.c: Commit leftover changes from 2007-03-29.
15779
15780 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
15781
15782         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15783         fields short instead of int.  Add explicit padding.
15784         (i387_cache_to_fsave): Remove unnecessary casts.
15785         (i387_fsave_to_cache): Doc fix.
15786         (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15787
15788 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
15789
15790         * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15791         (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15792
15793 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
15794
15795         * configure.srv (arm*-*-mingw32ce*): Move near the other
15796         arm targets.
15797
15798 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
15799
15800         * configure.ac: Add errno checking.
15801         (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15802         sys/file.h and malloc.h.
15803         (AC_CHECK_DECLS): Add perror.
15804         (srv_mingwce): Handle.
15805         * configure.srv (i[34567]86-*-cygwin*): Add
15806         win32-i386-low.o to srv_tgtobj.
15807         (i[34567]86-*-mingw*): Likewise.
15808         (arm*-*-mingw32ce*): Add case.
15809         * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15810         HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15811         [__MINGW32CE__] (strerror): New function.
15812         [__MINGW32CE__] (errno): Define to GetLastError.
15813         [__MINGW32CE__] (COUNTOF): New macro.
15814         (remote_open): Remove extra close call.
15815         * mem-break.c (delete_breakpoint_at): New function.
15816         * mem-break.h (delete_breakpoint_at): Declare.
15817         * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15818         HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15819         [USE_WIN32API] (read, write): Add char* casts.
15820         * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15821         * server.h: Include wincecompat.h on Windows CE.
15822         [HAVE_ERRNO_H]: Check.
15823         (perror): Declare if not declared.
15824         * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15825         (perror_with_name): Remove errno declaration.
15826         * wincecompat.h: New.
15827         * wincecompat.c: New.
15828         * win32-low.h: New.
15829         * win32-arm-low.c: New.
15830         * win32-i386-low.c: New.
15831         (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15832         (OUTMSG2): Make it safe.
15833         (_T): New macro.
15834         (COUNTOF): New macro.
15835         (NUM_REGS): Get it from the low target.
15836         (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15837         CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15838         (thread_rec): Let low target handle debug registers.
15839         (child_add_thread): Likewise.
15840         (child_init_thread_list): Likewise.
15841         (continue_one_thread): Likewise.
15842         (regptr): New.
15843         (do_child_fetch_inferior_registers): Move to ...
15844         * win32-i386-low.c: ... here, and rename to ...
15845         (do_fetch_inferior_registers): ... this.
15846         * win32-low.c (child_fetch_inferior_registers):
15847         Go through the low target.
15848         (do_child_store_inferior_registers): Use regptr.
15849         (strwinerror): New function.
15850         (win32_create_inferior): Handle Windows CE.
15851         Use strwinerror instead of strerror on Windows error
15852         codes.  Add program to the error output.
15853         Don't close the main thread handle on Windows CE.
15854         (win32_attach): Use coredll.dll on Windows CE.
15855         (win32_kill): Close current process and current
15856         thread handles.
15857         (win32_detach): Use coredll.dll on Windows CE.
15858         (win32_resume): Let low target handle debug registers, and
15859         step request.
15860         (handle_exception): Add/Remove initial breakpoint.  Avoid
15861         non-existant WSTOPSIG on Windows CE.
15862         (win32_read_inferior_memory): Cast to remove warning.
15863         (win32_arch_string): Go through the low target.
15864         (initialize_low): Call set_breakpoint_data with the low
15865         target's breakpoint.
15866         * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15867         FOP_REGNUM, mappings): Move to ...
15868         * win32-i386-low.c: ... here.
15869         * win32-low.c (win32_thread_info): Move to ...
15870         * win32-low.h: ... here.
15871         * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15872         win32-arm-low.c and wincecompat.c.
15873         (all:): Add $EXEEXT.
15874         (install-only:): Likewise.
15875         (gdbserver:): Likewise.
15876         (gdbreplay:): Likewise.
15877         * config.in: Regenerate.
15878         * configure: Regenerate.
15879
15880 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
15881
15882         * win32-low.c: Rename typedef thread_info to
15883         win32_thread_info throughout.
15884
15885 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
15886
15887         * win32-i386-low.c: Rename to ...
15888         * win32-low.c: ... this.
15889         * configure.srv: Replace win32-i386-low.o with win32-low.o.
15890         * Makefile.in: Likewise.
15891
15892 2007-03-27  Pedro Alves  <pedro_alves@portugalmail.pt>
15893
15894         * remote-utils.c (monitor_output): Constify msg parameter.
15895         * server.h (monitor_output): Likewise.
15896         * win32-i386-low.c (handle_output_debug_string): New.
15897         (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15898         handle_output_debug_string.
15899         (get_child_debug_event): Likewise.
15900
15901 2007-03-27  Mat Hostetter  <mat@lcs.mit.edu>
15902
15903         * server.c (main): Correct strtoul check.
15904
15905 2007-03-27  Jon Ringle  <jon@ringle.org>
15906
15907         * linux-low.c: Check __ARCH_HAS_MMU__ also.
15908
15909 2007-03-27  Brooks Moses  <brooks.moses@codesourcery.com>
15910
15911         * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15912
15913 2007-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
15914
15915         * terminal.h: Check HAVE_SGTTY_H.
15916
15917 2007-02-27  Mat Hostetter  <mat@lcs.mit.edu>
15918
15919         * remote-utils.c (remote_open): Print out the assigned port number.
15920
15921 2007-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
15922
15923         * remote-utils.c (monitor_output): New function.
15924         * server.c (debug_threads): Define here.
15925         (monitor_show_help): New function.
15926         (handle_query): Handle qRcmd.
15927         (main): Do not handle 'd' packet.
15928         * server.h (debug_threads, remote_debug, monitor_output): Declare.
15929         * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15930         of debug_threads.
15931
15932 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
15933
15934         * Makefile.in (EXEEXT): New.
15935         (clean): Use $(EXEEXT).
15936
15937 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
15938
15939         * target.h (target_ops): Rename send_signal to request_interrupt,
15940         and remove enum target_signal parameter.
15941         * linux-low.c (linux_request_interrupt): Rename from
15942         linux_send_signal, and always send SIGINT.
15943         * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15944         and always send SIGINT.
15945         * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15946         of send_signal.
15947         (input_interrupt): Likewise.
15948
15949 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
15950
15951         * server.c (get_features_xml): Check if target implemented
15952         arch_string.
15953         * win32-i386-low.c (win32_arch_string): New.
15954         (win32_target_ops): Add win32_arch_string as arch_string member.
15955
15956 2007-02-22  Markus Deuling  <deuling@de.ibm.com>
15957
15958         * spu-low.c (spu_arch_string): New.
15959         (spu_target_ops): Add spu_arch_string.
15960
15961 2007-02-16  Daniel Jacobowitz  <dan@codesourcery.com>
15962
15963         * remote-utils.c: Remove HAVE_TERMINAL_H check.
15964         * configure.ac: Do not check for terminal.h.
15965         * configure, config.in: Regenerated.
15966
15967 2007-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
15968
15969         * Makefile.in (OBS): Add $(XML_BUILTIN).
15970         (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15971         (clean): Update.
15972         (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15973         (arm-with-iwmmxt.c): New.
15974         * config.in, configure: Regenerate.
15975         * configure.ac: Check for iWMMXt.  Handle srv_xmltarget,
15976         srv_xmlbuiltin, and srv_xmlfiles.  Define USE_XML.
15977         * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15978         (arm*-*-linux*): Add iWMMXt and regset support.
15979         * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15980         (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15981         (arm_store_wmmxregset, target_regsets): New.
15982         * server.c (get_features_xml): Take annex argument.  Check builtin
15983         XML documents.
15984         (handle_query): Handle multiple annexes.
15985
15986 2007-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
15987
15988         * remote-utils.c [USE_WIN32API] (read, write): Define.
15989         (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15990         write.
15991
15992 2007-01-09  Daniel Jacobowitz  <dan@codesourcery.com>
15993
15994         * linux-i386-low.c (the_low_target): Set arch_string.
15995         * linux-x86-64-low.c (the_low_target): Likewise.
15996         * linux-low.c (linux_arch_string): New.
15997         (linux_target_ops): Add it.
15998         * linux-low.h (struct linux_target_ops): Add arch_string.
15999         * server.c (write_qxfer_response): Use const void * for DATA.
16000         (get_features_xml): New.
16001         (handle_query): Handle qXfer:features:read.  Report it for qSupported.
16002         * target.h (struct target_ops): Add arch_string method.
16003
16004 2007-01-03  Denis Pilat  <denis.pilat@st.com>
16005             Daniel Jacobowitz  <dan@codesourcery.com>
16006
16007         * linux-low.c (linux_kill): Handle being called with no threads.
16008         * win32-i386-low.c (win32_kill): Likewise.
16009         (get_child_debug_event): Clear current_process_handle.
16010
16011 2006-12-30  Denis PILAT  <denis.pilat@st.com>
16012             Daniel Jacobowitz  <dan@codesourcery.com>
16013
16014         * remote-utils.c (remote_open): Check the type of specified
16015         serial port devices before opening them.
16016         * server.c (main): Kill the inferior if an error occurs during
16017         the first remote_open.
16018
16019 2006-12-05  Markus Deuling  <deuling@de.ibm.com>
16020
16021         * README: Update supported targets.
16022
16023 2006-11-28  Daniel Jacobowitz  <dan@codesourcery.com>
16024
16025         * Makefile.in (clean): Remove reg-mips64.c.
16026         (reg-mips64.c, reg-mips64.o): New rules.
16027         * configure.srv: Handle mips64.  Include regset support for mips.
16028         * linux-mips-low.c (union mips_register): New.
16029         (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16030         (mips_breakpoint, mips_breakpoint_at): Use int.
16031         (mips_collect_register, mips_supply_register)
16032         (mips_collect_register_32bit, mips_supply_register_32bit)
16033         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16034         (mips_store_fpregset, target_regsets): New.
16035         * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16036
16037 2006-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
16038
16039         * configure.srv: Add target "spu*-*-*".
16040         * Makefile.in (clean): Remove reg-spu.c.
16041         (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16042         * spu-low.c: New file.
16043
16044 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
16045
16046         * configure.ac: Correct td_thr_tls_get_addr test.
16047         * configure: Regenerated.
16048
16049 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
16050
16051         * linux-low.c (linux_wait_for_event): Reformat.  Use the
16052         pass_signals array.
16053         * remote-utils.c (decode_address_to_semicolon): New.
16054         * server.c (pass_signals, handle_general_set): New.
16055         (handle_query): Mention QPassSignals for qSupported.
16056         (main): Call handle_general_set.
16057         * server.h (pass_signals, decode_address_to_semicolon): New.
16058
16059 2006-11-06  Daniel Jacobowitz  <dan@codesourcery.com>
16060
16061         * server.c (handle_query): Correct error handling for read_auxv.
16062
16063 2005-10-19  Ulrich Weigand  <uweigand@de.ibm.com>
16064
16065         * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16066         and srv_linux_thread_db to yes.
16067         * linux-s390-low.c (s390_fill_gregset): New function.
16068         (target_regsets): Define data structure.
16069
16070 2006-10-17  Daniel Jacobowitz  <dan@codesourcery.com>
16071
16072         * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16073         * configure.ac: Use it.  Define HAVE_TD_THR_TLS_GET_ADDR.
16074         * config.in, configure: Regenerated.
16075         * inferiors.c (gdb_id_to_thread): New function.
16076         (gdb_id_to_thread_id): Use it.
16077         * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16078         * linux-low.h (struct process_info): Add th member.
16079         (thread_db_get_tls_address): New prototype.
16080         * remote-utils.c (decode_address): Make non-static.
16081         * server.c (handle_query): Handle qGetTLSAddr.
16082         * server.h (gdb_id_to_thread, decode_address): New prototypes.
16083         * target.h (struct target_ops): Add get_tls_address.
16084         * thread-db.c (maybe_attach_thread): Save the thread handle.
16085         (thread_db_get_tls_address): New.
16086
16087 2006-09-28  Daniel Jacobowitz  <dan@codesourcery.com>
16088
16089         * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16090         (linux_resume_one_process): Take a siginfo_t *.  Update all
16091         callers.  Queue it if necessary.  Use PTRACE_SETSIGINFO.
16092         (struct pending_signals): Add a siginfo_t.
16093         (linux_wait_for_process): Always set last_status.
16094         (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16095         (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16096         * linux-low.h (struct process_info): Add last_status.
16097
16098 2006-09-21  Daniel Jacobowitz  <dan@codesourcery.com>
16099
16100         * remote-utils.c (try_rle): New function.
16101         (putpkt_binary): Use it.
16102
16103 2006-08-19  Daniel Jacobowitz  <dan@codesourcery.com>
16104
16105         * Makefile.in (clean): Clean reg-x86-64-linux.c.
16106         (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16107         * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16108         * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16109         (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16110         point registers.
16111
16112 2006-08-08  Richard Sandiford  <richard@codesourcery.com>
16113
16114         * server.c (terminal_fd): New variable.
16115         (old_foreground_pgrp): Likewise.
16116         (restore_old_foreground_pgrp): New function.
16117         (start_inferior): Record the terminal file descriptor in terminal_fd
16118         and its original foreground group in old_foreground_pgrp.  Register
16119         restore_old_foreground_pgrp with atexit().
16120
16121 2006-07-26  Daniel Jacobowitz  <dan@codesourcery.com>
16122
16123         * server.c (handle_query): Correct qPart to qXfer.
16124
16125 2006-07-22  Daniel Jacobowitz  <dan@codesourcery.com>
16126
16127         * configure.ac: Check for more headers which are missing on
16128         Windows.  Automatically supply -lwsock32 and USE_WIN32API.
16129         * configure.srv: Add Cygwin and mingw32.
16130         * remote-utils.c: Don't include headers unconditionally which
16131         are missing on mingw32.  Include <winsock.h> for mingw32.
16132         (remote_open): Adjust for mingw32 support.  Flush
16133         standard error after writing to it.
16134         (remote_close, putpkt_binary, input_interrupt, block_async_io)
16135         (unblock_async_io, enable_async_io, disable_async_io)
16136         (readchar, getpkt): Update for Winsock support.
16137         (prepare_resume_reply): Expect a protocol signal number.
16138         * server.c: Disable <sys/wait.h> on mingw32.
16139         (start_inferior): Adjust for mingw32 support.  Flush
16140         standard error after writing to it.
16141         (attach_inferior): Likewise.  Use protocol signal
16142         numbers.
16143         (main): Skip 'D' packet on mingw32.  Use protocol signal numbers
16144         and names.
16145         * win32-i386-low.c: New file.
16146         * Makefile.in (XM_CLIBS): Set.
16147         (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16148         (win32-i386-low.o): New dependency rule.
16149         * linux-low.c (linux_wait): Use target signal numbers.
16150         * target.h (struct target_ops): Doc fix.
16151         * server.h (target_signal_to_name): New prototype.
16152         * gdbreplay.c: Don't include headers unconditionally which
16153         are missing on mingw32.  Include <winsock.h> for mingw32.
16154         (remote_close, remote_open): Adjust for Winsock support.
16155         * configure, config.in: Regenerated.
16156
16157 2006-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
16158
16159         * server.c (decode_xfer_read, write_qxfer_response): New.
16160         (handle_query): Take a packet length argument.  Handle
16161         qXfer:auxv:read instead of qPart:auxv:read.  Mention it in
16162         the qSupported response.
16163         (main): Update call to handle_query.
16164
16165 2006-06-22  Daniel Jacobowitz  <dan@codesourcery.com>
16166
16167         * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16168         (putpkt_binary): Renamed from putpkt and adjusted for binary
16169         data.
16170         (putpkt): New wrapper for putpkt_binary.
16171         (readchar): Don't mask off the high bit.
16172         (decode_X_packet): New function.
16173         * server.c (main): Call putpkt_binary if a handler sets the packet
16174         length.  Save the length of the incoming packet.  Handle 'X'.
16175         * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16176
16177 2006-06-21  Daniel Jacobowitz  <dan@codesourcery.com>
16178
16179         * server.c (handle_query): Handle qSupported.
16180
16181 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
16182
16183         * remote-utils.c (all_symbols_looked_up): New variable.
16184         (look_up_one_symbol): Check it.
16185         * server.h (look_up_one_symbol): New declaration.
16186         * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16187
16188 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
16189
16190         * Makefile.in (linux-arm-low.o): Update dependencies.
16191         * linux-arm-low.c: Include "gdb_proc_service.h".
16192         (PTRACE_GET_THREAD_AREA): Define.
16193         (ps_get_thread_area): New function.
16194
16195 2006-05-09  Nathan Sidwell  <nathan@codesourcery.com>
16196
16197         * configure.srv (m68k*-*-uclinux*): New target.
16198         * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16199         (linux_resume_one_process): Remove extraneous cast.
16200         (linux_read_offsets): New.
16201         (linux_target_op): Add linux_read_offsets on mmuless systems.
16202         * server.c (handle_query): Add qOffsets logic.
16203         * target.h (struct target_ops): Add read_offsets.
16204
16205 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
16206
16207         * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16208         (PTRACE_GET_THREAD_AREA): Define.
16209         (ps_get_thread_area): New function.
16210         * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16211         (linux-x86-64-low.o): Update.
16212
16213 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
16214
16215         * configure.ac: Remove checks for prfpregset_t.
16216         * gdb_proc_service.h: New file.
16217         * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16218         new "gdb_proc_service.h".
16219         * proc-service.c: Likewise.
16220         (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16221         (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16222         * Makefile.in (gdb_proc_service_h): Updated.
16223         * configure, config.in: Regenerated.
16224
16225 2006-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
16226
16227         * remote-utils.c (prepare_resume_reply): Move declaration
16228         of gdb_id_from_wait to the top of the block.
16229
16230 2006-02-15  Daniel Jacobowitz  <dan@codesourcery.com>
16231
16232         * linux-low.c (regsets_store_inferior_registers): Read the regset
16233         from the target before filling it.
16234
16235 2006-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
16236
16237         * server.c (attach_inferior): Return SIGTRAP for a successful
16238         attach.
16239
16240 2006-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
16241
16242         * Makefile.in (OBS): Add version.o.
16243         (STAGESTUFF): Delete.
16244         (version.o): Add dependencies.
16245         (version.c): Replace rule.
16246         (clean): Remove version.c.
16247         * server.c (gdbserver_version): New.
16248         (gdbserver_usage): Use printf.
16249         (main): Handle --version and --help.
16250         * server.h (version, host_name): Add declarations.
16251
16252 2005-12-23  Eli Zaretskii  <eliz@gnu.org>
16253
16254         * linux-arm-low.c:
16255         * linux-arm-low.c:
16256         * inferiors.c:
16257         * i387-fp.h:
16258         * i387-fp.c:
16259         * gdbreplay.c:
16260         * regcache.c:
16261         * proc-service.c:
16262         * mem-break.h:
16263         * mem-break.c:
16264         * linux-x86-64-low.c:
16265         * linux-sh-low.c:
16266         * linux-s390-low.c:
16267         * linux-ppc64-low.c:
16268         * linux-ppc-low.c:
16269         * linux-mips-low.c:
16270         * linux-m68k-low.c:
16271         * linux-m32r-low.c:
16272         * linux-low.h:
16273         * linux-low.c:
16274         * linux-ia64-low.c:
16275         * linux-i386-low.c:
16276         * linux-crisv32-low.c:
16277         * thread-db.c:
16278         * terminal.h:
16279         * target.h:
16280         * target.c:
16281         * server.h:
16282         * server.c:
16283         * remote-utils.c:
16284         * regcache.h:
16285         * utils.c:
16286         * Makefile.in:
16287         * configure.ac:
16288         * gdbserver.1: Add (C) after Copyright.  Update the FSF
16289         address.
16290
16291 2005-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
16292
16293         * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16294         (arm_breakpoint_at): Recognize both breakpoints.
16295         (the_low_target): Use the correct breakpoint instruction.
16296
16297 2005-11-02  Daniel Jacobowitz  <dan@codesourcery.com>
16298
16299         * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16300         * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16301         (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16302         (the_low_target): Update.
16303
16304 2005-10-25  Andreas Schwab  <schwab@suse.de>
16305
16306         * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16307
16308         * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16309         (ia64_num_regs): Reduce to 462.
16310
16311 2005-09-17  Daniel Jacobowitz  <dan@codesourcery.com>
16312
16313         * acinclude.m4: Correct quoting.
16314         * aclocal.m4: Regenerated.
16315
16316         Suggested by SZOKOVACS Robert <szo@ies.hu>:
16317         * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16318         (thread_db_init): Call thread_db_err_str.
16319         * configure.ac: Check for TD_VERSION.
16320         * config.in, configure: Regenerated.
16321
16322 2005-07-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16323
16324         * server.h (error, fatal, warning): Add ATTR_FORMAT.
16325
16326 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
16327
16328         * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16329         is not available.  Define HAVE_PTRACE_GETREGS if it is.
16330         * config.in, configure: Regenerated.
16331         * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16332         * linux-i386-low.c, linux-m68k-low.c: Update to use
16333         HAVE_PTRACE_GETREGS.
16334         * linux-low.c (regsets_fetch_inferior_registers)
16335         (regsets_store_inferior_registers): Only return 0 if we processed
16336         GENERAL_REGS.
16337         * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16338         * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16339
16340 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
16341
16342         * inferiors.c (struct thread_info): Add gdb_id.
16343         (add_thread): Add gdb_id argument.
16344         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16345         * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16346         calls to add_thread.
16347         * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16348         * server.c (handle_query): Use thread_to_gdb_id.
16349         (handle_v_cont, main): Use gdb_id_to_thread_id.
16350         * server.h (add_thread): Update prototype.
16351         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16352         prototypes.
16353
16354 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
16355
16356         * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16357         left-padded registers.
16358         * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16359         * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16360
16361 2005-07-01  Steve Ellcey  <sje@cup.hp.com>
16362
16363         * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16364         * configure: Regenerate.
16365         * config.in: Regenerate.
16366         * server.h (NEED_DECLARATION_STRERROR):
16367         Replace with !HAVE_DECL_STRERROR.
16368
16369 2005-06-16  Daniel Jacobowitz  <dan@codesourcery.com>
16370
16371         * linux-low.c (linux_wait, linux_send_signal): Don't test
16372         an unsigned long variable for > 0 if it could be MAX_ULONG.
16373         * server.c (myresume): Likewise.
16374         * target.c (set_desired_inferior): Likewise.
16375
16376 2005-06-13  Mark Kettenis  <kettenis@gnu.org>
16377
16378         * configure.ac: Simplify and improve check for socklen_t.
16379         * configure, config.in: Regenerate.
16380
16381 2005-06-12  Daniel Jacobowitz  <dan@codesourcery.com>
16382
16383         * acconfig.h: Remove.
16384         * configure.ac: Add a test for socklen_t.  Use three-argument
16385         AC_DEFINE throughout.
16386         * config.in: Regenerated using autoheader 2.59.
16387         * configure: Regenerated.
16388
16389         * gdbreplay.c (socklen_t): Provide a default.
16390         (remote_open): Use socklen_t.
16391         * remote-utils.c (socklen_t): Provide a default.
16392         (remote_open): Use socklen_t.
16393         (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16394         unsigned char.
16395
16396         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16397         char for buffers.
16398         * linux-low.c (linux_read_memory, linux_write_memory)
16399         (linux_read_auxv): Likewise.
16400         * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16401         (check_mem_write): Likewise.
16402         * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16403         Likewise.
16404         * regcache.c (struct inferior_rgcache_data, registers_to_string)
16405         (registers_from_string, register_data): Likewise.
16406         * server.c (handle_query, main): Likewise.
16407         * server.h (convert_ascii_to_int, convert_int_to_ascii)
16408         (decode_M_packet): Likewise.
16409         * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16410         * target.h (struct target_ops): Update read_memory, write_memory,
16411         and read_auxv.
16412         (read_inferior_memory, write_inferior_memory): Update.
16413         * linux-low.h (struct linux_target_ops): Change type of breakpoint
16414         to unsigned char *.
16415         * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16416         linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16417         linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16418         linux-s390-low.c, linux-sh-low.c: Update for changes in
16419         read_inferior_memory and the_low_target->breakpoint.
16420
16421 2005-05-28  Daniel Jacobowitz  <dan@codesourcery.com>
16422
16423         * Makefile.in (SFILES): Add linux-ppc64-low.c.
16424         (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16425         * configure.srv: Add powerpc64-*-linux*.
16426         * linux-ppc64-low.c: New file.
16427
16428 2005-05-23  Orjan Friberg  <orjanf@axis.com>
16429
16430         * linux-cris-low.c: New file with support for CRIS.
16431         * linux-crisv32-low.c: Ditto for CRISv32.
16432         * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16433         (clean): Add reg-cris.c and reg-crisv32.c.
16434         Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16435         reg-crisv32.o, and reg-crisv32.c to make rules.
16436         * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16437         recognized targets.
16438
16439 2005-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
16440
16441         * linux-low.c (fetch_register): Ensure buffer size is a multiple
16442         of sizeof (PTRACE_XFER_TYPE).
16443         (usr_store_inferior_registers): Likewise.  Zero out excess bytes.
16444
16445 2005-05-12  Orjan Friberg  <orjanf@axis.com>
16446
16447         * target.h (struct target_ops): Add insert_watchpoint,
16448         remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16449         pointers for hardware watchpoint support.
16450         * linux-low.h (struct linux_target_ops): Ditto.
16451         * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16452         (linux_stopped_by_watchpoint, linux_stopped_data_address): New.  Add
16453         to linux_target_ops.
16454         * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16455         reply packet.
16456         * server.c (main): Recognize 'Z' and 'z' packets.
16457
16458 2005-05-10  Ulrich Weigand  <uweigand@de.ibm.com>
16459
16460         * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16461         (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16462         (the_low_target): Add new members.
16463
16464 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
16465
16466         * proc-service.c (ps_lgetregs): Search all_processes instead of
16467         all_threads.
16468
16469 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
16470
16471         * server.c (start_inferior): Change return type to int.
16472         (attach_inferior): Change sigptr to int *.
16473         (handle_v_cont, handle_v_requests): Change signal to int *.
16474         (main): Change signal to int.
16475
16476 2005-04-15  Kei Sakamoto  <sakamoto.kei@renesas.com>
16477
16478         * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16479         * configure.srv: Add m32r*-*-linux*.
16480         * linux-m32r-low.c: New file.
16481
16482 2005-03-04  Daniel Jacobowitz  <dan@codesourcery.com>
16483
16484         * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16485
16486 2005-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
16487
16488         * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16489         Take unsigned long arguments for PIDs.
16490         * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16491         (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16492         (wait_for_sigstop, linux_resume_one_process)
16493         (regsets_fetch_inferior_registers, linux_send_signal)
16494         (linux_read_auxv): Likewise.  Update the types of variables holding
16495         PIDs.  Update format string specifiers.
16496         * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16497         * remote-utils.c (prepare_resume_reply): Likewise.
16498         * server.c (cont_thread, general_thread, step_thread)
16499         (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16500         unsigned long.
16501         (handle_query): Update format specifiers.
16502         (handle_v_cont, main): Use strtoul for thread IDs.
16503         * server.h (struct inferior_list_entry): Use unsigned long for ID.
16504         (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16505         (general_thread, step_thread, thread_from_wait)
16506         (old_thread_from_wait): Update.
16507         * target.h (struct thread_resume): Use unsigned long for THREAD.
16508         (struct target_ops): Use unsigned long for arguments to attach and
16509         thread_alive.
16510
16511 2005-02-24  Daniel Jacobowitz  <dan@codesourcery.com>
16512
16513         * acinclude.m4: Include bfd/bfd.m4 directly.
16514         * configure.ac: Use AC_ARG_PROGRAM.  Suggested by Aron Griffis
16515         <agriffis@toolchain.org>.
16516         * aclocal.m4, configure: Regenerated.
16517
16518 2005-01-07  Andrew Cagney  <cagney@gnu.org>
16519
16520         * configure.ac: Rename configure.in, require autoconf 2.59.
16521         * configure: Re-generate.
16522
16523 2004-12-08  Daniel Jacobowitz  <dan@debian.org>
16524
16525         * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area.  Reset
16526         LIBS when finished.
16527         * aclocal.m4: Regenerated.
16528         * configure: Regenerated.
16529
16530 2004-11-21  Andreas Schwab  <schwab@suse.de>
16531
16532         * linux-m68k-low.c (m68k_num_gregs): Define.
16533         (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16534         (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16535         (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16536         (m68k_breakpoint_at): New.  Add to the_low_target.
16537
16538         * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16539         srv_linux_thread_db to yes.
16540
16541 2004-10-20  Joel Brobecker  <brobecker@gnat.com>
16542
16543         * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16544         (ARCH_SET_FS): Likewise.
16545         (ARCH_GET_FS): Likewise.
16546         (ARCH_GET_GS): Likewise.
16547
16548 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
16549
16550         * linux-i386-low.c (ps_get_thread_area): New.
16551         * linux-x86-64-low.c (ps_get_thread_area): New.
16552         * linux-low.c: Include <sys/syscall.h>.
16553         (linux_kill_one_process): Don't kill the first thread here.
16554         (linux_kill): Kill the first thread here.
16555         (kill_lwp): New function.
16556         (send_sigstop, linux_send_signal): Use it.
16557         * proc-service.c: Clean up #ifdefs.
16558         (fpregset_info): Delete.
16559         (ps_lgetregs): Update and enable implementation.
16560         (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16561         implementations.
16562         * remote-utils.c (struct sym_cache, symbol_cache): New.
16563         (input_interrupt): Print a clearer message.
16564         (async_io_enabled): New variable.
16565         (enable_async_io, disable_async_io): Use it.  Update comments.
16566         (look_up_one_symbol): Use the symbol cache.
16567         * thread-db.c (thread_db_look_up_symbols): New function.
16568         (thread_db_init): Update comments.  Call thread_db_look_up_symbols.
16569
16570 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
16571
16572         * configure.in: Test for -rdynamic.
16573         * configure: Regenerated.
16574         * Makefile (INTERNAL_LDFLAGS): New.
16575         (gdbserver, gdbreplay): Use it.
16576
16577 2004-09-02  Andrew Cagney  <cagney@gnu.org>
16578
16579         * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16580
16581 2004-03-23  Daniel Jacobowitz  <drow@mvista.com>
16582
16583         * linux-low.c (linux_wait): Clear all_processes list also.
16584
16585 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
16586
16587         * linux-low.c: Include <errno.h>.  Remove extern declaration of
16588         errno.
16589
16590 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
16591
16592         * gdbreplay.c, server.h, utils.c: Update copyright years.
16593
16594 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
16595
16596         * server.c (main): Print child status or termination signal from
16597         variable 'signal', not 'sig'.
16598
16599 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
16600
16601         * linux-low.c (linux_read_memory): Change return type to
16602         int.  Check for and return error from ptrace().
16603         * target.c (read_inferior_memory): Change return type to int.  Pass
16604         back return status from the_target->read_memory().
16605         * target.h (struct target_ops): Adapt *read_memory() prototype.
16606         Update comment.
16607         (read_inferior_memory): Adapt prototype.
16608         * server.c (main): Return an error packet if
16609         read_inferior_memory() returns an error.
16610
16611 2004-03-04  Daniel Jacobowitz  <drow@mvista.com>
16612
16613         * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16614         Unify with other clean targets.
16615
16616 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
16617
16618         * server.c (handle_v_cont): Call set_desired_inferior.
16619
16620 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
16621
16622         * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16623
16624 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
16625
16626         * linux-low.c (linux_wait): Unblock async I/O.
16627         (linux_resume): Block and enable async I/O.
16628         * remote-utils.c (block_async_io, unblock_async_io): New functions.
16629         * server.h (block_async_io, unblock_async_io): Add prototypes.
16630
16631 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
16632
16633         * remote-utils.c (remote_open): Print a status notice after
16634         opening a TCP port.
16635         * server.c (attach_inferior): Print a status notice after
16636         attaching.
16637
16638 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
16639
16640         * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16641
16642 2004-02-26  Daniel Jacobowitz  <drow@mvista.com>
16643
16644         * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16645         error packet.
16646         * server.c, target.h: Update copyright years.
16647
16648 2004-02-25  Roland McGrath  <roland@redhat.com>
16649
16650         * target.h (struct target_ops): New member `read_auxv'.
16651         * server.c (handle_query): Handle qPart:auxv:read: query using that.
16652         * linux-low.c (linux_read_auxv): New function.
16653         (linux_target_ops): Initialize `read_auxv' member to that.
16654
16655 2004-02-17  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16656
16657         Committed by Jim Blandy  <jimb@redhat.com>.
16658
16659         * linux-s390-low.c (s390_num_regs): Update.
16660         (s390_regmap): Remove control registers.  Use __s390x__ predefine
16661         instead of GPR_SIZE to distiguish s390 and s390x targets.
16662
16663 2004-01-31  Daniel Jacobowitz  <drow@mvista.com>
16664
16665         * linux-low.c: Update copyright year.
16666         (check_removed_breakpoint): Clear pending_is_breakpoint.
16667         (linux_set_resume_request, linux_queue_one_thread)
16668         (resume_status_pending_p): New functions.
16669         (linux_continue_one_thread): Use process->resume.
16670         (linux_resume): Only resume threads if there are no pending events.
16671         * linux-low.h (struct process_info): Add resume request
16672         pointer.
16673
16674 2004-01-30  Daniel Jacobowitz  <drow@mvista.com>
16675
16676         * regcache.c (new_register_cache): Clear the allocated register
16677         buffer.  Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16678
16679 2003-10-13  Daniel Jacobowitz  <drow@mvista.com>
16680
16681         * linux-low.c (linux_resume): Take a struct thread_resume *
16682         argument.
16683         (linux_wait): Update call.
16684         (resume_ptr): New static variable.
16685         (linux_continue_one_thread): Renamed from
16686         linux_continue_one_process.  Use resume_ptr.
16687         (linux_resume): Use linux_continue_one_thread.
16688         * server.c (handle_v_cont, handle_v_requests): New functions.
16689         (myresume): New function.
16690         (main): Handle 'v' case.
16691         * target.h (struct thread_resume): New type.
16692         (struct target_ops): Change argument of "resume" to struct
16693         thread_resume *.
16694         (myresume): Delete macro.
16695
16696 2003-08-08  H.J. Lu  <hongjiu.lu@intel.com>
16697
16698         * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16699         (uninstall): Support DESTDIR.
16700
16701 Mon Jul 21 20:09:34 UTC 2003  Brendan Conoboy  <blc@redhat.com>
16702
16703         * configure.srv: Add xscale*linux copy of arm*linux entry.
16704
16705 2003-07-24  Daniel Jacobowitz  <drow@mvista.com>
16706
16707         * linux-arm-low.c (arm_reinsert_addr): New function.
16708         (the_low_target): Add arm_reinsert_addr.
16709
16710 2003-07-08  Mark Kettenis  <kettenis@gnu.org>
16711
16712         * mem-break.c: Remove whitespace at end of file.
16713
16714 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
16715
16716         * configure.in: Check whether we need to prototype strerror.
16717         * server.h: Optionally prototype strerror.
16718         * gdbreplay.c (perror_with_name): Use strerror.
16719         * linux-low.c (linux_attach_lwp): Use strerror.
16720         * utils.c (perror_with_name): Use strerror.
16721         * config.in, configure: Regenerated.
16722
16723 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
16724
16725         * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16726         SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16727
16728 2003-06-20  Daniel Jacobowitz  <drow@mvista.com>
16729
16730         * Makefile.in (SFILES): Update.
16731         * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16732         low-sun3.c: Remove files.
16733
16734 2003-06-17  Daniel Jacobowitz  <drow@mvista.com>
16735
16736         * linux-low.c: Move comment to linux_thread_alive where it belonged.
16737         (linux_detach_one_process, linux_detach): New functions.
16738         (linux_target_ops): Add linux_detach.
16739         * server.c (main): Handle 'D' packet.
16740         * target.h (struct target_ops): Add "detach" member.
16741         (detach_inferior): Define.
16742
16743 2003-06-13  Mark Kettenis  <kettenis@gnu.org>
16744
16745         From Kelley Cook  <kelleycook@wideopenwest.com>:
16746         * configure.srv: Accept i[34567]86 variants.
16747
16748 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
16749
16750         * linux-low.c (linux_wait_for_event): Correct comment typos.
16751         (linux_resume_one_process): Call check_removed_breakpoint.
16752         (linux_send_signal): New function.
16753         (linux_target_ops): Add linux_send_signal.
16754         * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16755         of kill.
16756         * target.h (struct target_ops): Add send_signal.
16757
16758 2003-05-29  Jim Blandy  <jimb@redhat.com>
16759
16760         * linux-low.c (usr_store_inferior_registers): Transfer buf in
16761         PTRACE_XFER_TYPE-sized chunks, not int-sized chunks.  Otherwise,
16762         if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16763         away part of the register's value.
16764
16765 2003-03-26  Daniel Jacobowitz  <drow@mvista.com>
16766
16767         * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16768         (linux_wait_for_event, linux_init_signals): Likewise.
16769
16770 2003-03-17  Daniel Jacobowitz  <drow@mvista.com>
16771
16772         * configure.in: Check for stdlib.h.
16773         * configure: Regenerated.
16774         * config.in: Regenerated.
16775
16776 2003-01-04  Andreas Schwab  <schwab@suse.de>
16777
16778         * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16779
16780 2003-01-02  Andrew Cagney  <ac131313@redhat.com>
16781
16782         * Makefile.in: Remove obsolete code.
16783
16784 2002-11-20  Daniel Jacobowitz  <drow@mvista.com>
16785
16786         * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16787         defined(PT_FPR0_HI).
16788
16789 2002-11-17  Stuart Hughes  <seh@zee2.com>
16790
16791         * linux-arm-low.c (arm_num_regs): Increase.
16792         (arm_regmap): Include status register.
16793
16794 2002-11-17  Daniel Jacobowitz  <drow@mvista.com>
16795
16796         * linux-low.c (register_addr): Remove incorrect -1 check.
16797
16798 2002-08-29  Daniel Jacobowitz  <drow@mvista.com>
16799
16800         * linux-low.c (linux_create_inferior): Call setpgid.  Return
16801         the new PID.
16802         (unstopped_p, linux_signal_pid): Remove.
16803         (linux_target_ops): Remove linux_signal_pid.
16804         * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16805         global instead of target method.
16806         * target.h (struct target_ops): Remove signal_pid.  Update comment
16807         for create_inferior.
16808         * server.c (signal_pid): New variable.
16809         (create_inferior): Set signal_pid.  Block SIGTTOU and SIGTTIN in
16810         gdbserver.  Set the child to be the foreground process group.
16811         (attach_inferior): Set signal_pid.
16812
16813 2002-08-23  Daniel Jacobowitz  <drow@mvista.com>
16814
16815         * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16816
16817 2002-08-20  Jim Blandy  <jimb@redhat.com>
16818
16819         * Makefile.in (LDFLAGS): Allow the configure script to establish a
16820         default for this.
16821
16822 2002-08-01  Andrew Cagney  <cagney@redhat.com>
16823
16824         * Makefile.in: Make chill references obsolete.
16825
16826 2002-07-24  Kevin Buettner  <kevinb@redhat.com>
16827
16828         * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16829         * configure: Regenerate.
16830         * config.in: Regenerate.
16831
16832 2002-07-09  David O'Brien  <obrien@FreeBSD.org>
16833
16834         * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16835         (perror_with_name, remote_close, remote_open, expect, play): Static.
16836
16837 2002-07-04  Michal Ludvig  <mludvig@suse.cz>
16838
16839         * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16840         byte offsets instead of an array of indexes.
16841         (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16842
16843 2002-06-13  Daniel Jacobowitz  <drow@mvista.com>
16844
16845         * regcache.c: Add comment.
16846
16847 2002-06-11  Daniel Jacobowitz  <drow@mvista.com>
16848
16849         * thread-db.c: New file.
16850         * proc-service.c: New file.
16851         * acinclude.m4: New file.
16852         * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16853         proc-service.o, and thread-db.o.
16854         (linux-low.o): Add USE_THREAD_DB.
16855         * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16856         HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16857         * aclocal.m4: Regenerated.
16858         * config.in: Regenerated.
16859         * configure: Regenerated.
16860         * configure.in: Check for proc_service.h, sys/procfs.h,
16861         thread_db.h, and linux/elf.h headrs.
16862         Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16863         PRFPREGSET_T_BROKEN.  Introduce srv_thread_depfiles and USE_THREAD_DB.
16864         Check for -lthread_db and thread support.
16865         * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16866         PowerPC, and SuperH.
16867         * i387-fp.c: Constify arguments.
16868         * i387-fp.h: Likewise.
16869         * inferiors.c: (struct thread_info): Renamed from
16870         `struct inferior_info'.  Remove PID member.  Use generic inferior
16871         list header.  All uses updated.
16872         (inferiors, signal_pid): Removed.
16873         (all_threads): New variable.
16874         (get_thread): Define.
16875         (add_inferior_to_list): New function.
16876         (for_each_inferior): New function.
16877         (change_inferior_id): New function.
16878         (add_inferior): Removed.
16879         (remove_inferior): New function.
16880         (add_thread): New function.
16881         (free_one_thread): New function.
16882         (remove_thread): New function.
16883         (clear_inferiors): Use for_each_inferior and free_one_thread.
16884         (find_inferior): New function.
16885         (find_inferior_id): New function.
16886         (inferior_target_data): Update argument type.
16887         (set_inferior_target_data): Likewise.
16888         (inferior_regcache_data): Likewise.
16889         (set_inferior_regcache_data): Likewise.
16890         * linux-low.c (linux_bp_reinsert): Remove.
16891         (all_processes, stopping_threads, using_thrads)
16892         (struct pending_signals, debug_threads, pid_of): New.
16893         (inferior_pid): Replace with macro.
16894         (struct inferior_linux_data): Remove.
16895         (get_stop_pc, add_process): New functions.
16896         (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16897         Use add_process and add_thread.
16898         (linux_attach_lwp): New function, based on old linux_attach.  Use
16899         add_process and add_thread.  Set stop_expected for new threads.
16900         (linux_attach): New function.
16901         (linux_kill_one_process): New function.
16902         (linux_kill): Kill all LWPs.
16903         (linux_thread_alive): Use find_inferior_id.
16904         (check_removed_breakpoints, status_pending_p): New functions.
16905         (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16906         Update.  Use WNOHANG.  Wait for cloned processes also.  Update process
16907         struct for the found process.
16908         (linux_wait_for_event): New function.
16909         (linux_wait): Use it.  Support LWPs.
16910         (send_sigstop, wait_for_sigstop, stop_all_processes)
16911         (linux_resume_one_process, linux_continue_one_process): New functions.
16912         (linux_resume): Support LWPs.
16913         (REGISTER_RAW_SIZE): Remove.
16914         (fetch_register): Use register_size instead.  Call supply_register.
16915         (usr_store_inferior_registers): Likewise.  Call collect_register.
16916         Fix recursive case.
16917         (regsets_fetch_inferior_registers): Improve error message.
16918         (regsets_store_inferior_registers): Add debugging.
16919         (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16920         (unstopped_p, linux_signal_pid): New functions.
16921         (linux_target_ops): Add linux_signal_pid.
16922         (linux_init_signals): New function.
16923         (initialize_low): Call it.  Initialize using_threads.
16924         * regcache.c (inferior_regcache_data): Add valid
16925         flag.
16926         (get_regcache): Fetch registers lazily.  Add fetch argument
16927         and update all callers.
16928         (regcache_invalidate_one, regcache_invalidate): New
16929         functions.
16930         (new_register_cache): Renamed from create_register_cache.
16931         Return the new regcache.
16932         (free_register_cache): Change argument to a void *.
16933         (registers_to_string, registers_from_string): Call get_regcache
16934         with fetch flag set.
16935         (register_data): Make static.  Pass fetch flag to get_regcache.
16936         (supply_register): Call get_regcache with fetch flag clear.
16937         (collect_register): Call get_regcache with fetch flag set.
16938         (collect_register_as_string): New function.
16939         * regcache.h: Update.
16940         * remote-utils.c (putpkt): Flush after debug output and use
16941         stderr.
16942         Handle input interrupts while waiting for an ACK.
16943         (input_interrupt): Use signal_pid method.
16944         (getpkt): Flush after debug output and use stderr.
16945         (outreg): Use collect_register_as_string.
16946         (new_thread_notify, dead_thread_notify): New functions.
16947         (prepare_resume_reply): Check using_threads.  Set thread_from_wait
16948         and general_thread.
16949         (look_up_one_symbol): Flush after debug output.
16950         * server.c (step_thread, server_waiting): New variables.
16951         (start_inferior): Don't use signal_pid.  Update call to mywait.
16952         (attach_inferior): Update call to mywait.
16953         (handle_query): Handle qfThreadInfo and qsThreadInfo.
16954         (main): Don't fetch/store registers explicitly.  Use
16955         set_desired_inferior.  Support proposed ``Hs'' packet.  Update
16956         calls to mywait.
16957         * server.h: Update.
16958         (struct inferior_list, struct_inferior_list_entry): New.
16959         * target.c (set_desired_inferior): New.
16960         (write_inferior_memory): Constify.
16961         (mywait): New function.
16962         * target.h: Update.
16963         (struct target_ops): New signal_pid method.
16964         (mywait): Removed macro, added prototype.
16965
16966         * linux-low.h (regset_func): Removed.
16967         (regset_fill_func, regset_store_func): New.
16968         (enum regset_type): New.
16969         (struct regset_info): Add type field.  Use new operation types.
16970         (struct linux_target_ops): stop_pc renamed to get_pc.
16971         Add decr_pc_after_break and breakpoint_at.
16972         (get_process, get_thread_proess, get_process_thread)
16973         (strut process_info, all_processes, linux_attach_lwp)
16974         (thread_db_init): New.
16975
16976         * linux-arm-low.c (arm_get_pc, arm_set_pc,
16977         arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16978         (the_low_target): Add new members.
16979         * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16980         (i386_store_fpxregset): Constify.
16981         (target_regsets): Add new kind identifier.
16982         (i386_get_pc): Renamed from i386_stop_pc.  Simplify.
16983         (i386_set_pc): Add debugging.
16984         (i386_breakpoint_at): New function.
16985         (the_low_target): Add new members.
16986         * linux-mips-low.c (mips_get_pc, mips_set_pc)
16987         (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16988         (mips_breakpoint_at): New.
16989         (the_low_target): Add new members.
16990         * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16991         (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16992         (the_low_target): Add new members.
16993         * linux-sh-low.c (sh_get_pc, sh_set_pc)
16994         (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16995         (the_low_target): Add new members.
16996         * linux-x86-64-low.c (target_regsets): Add new kind
16997         identifier.
16998
16999 2002-05-15  Daniel Jacobowitz  <drow@mvista.com>
17000
17001         From Martin Pool <mbp@samba.org>:
17002         * server.c (gdbserver_usage): New function.
17003         (main): Call it.
17004
17005 2002-05-14  Daniel Jacobowitz  <drow@mvista.com>
17006
17007         * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17008         stop_at -> stop_pc.
17009
17010 2002-05-04  Andrew Cagney  <ac131313@redhat.com>
17011
17012         * Makefile.in: Remove obsolete code.
17013
17014 2002-04-24  Michal Ludvig  <mludvig@suse.cz>
17015
17016         * linux-low.c (regsets_fetch_inferior_registers),
17017         (regsets_store_inferior_registers): Removed cast to int from
17018         ptrace() calls.
17019         * regcache.h: Added declaration of struct inferior_info.
17020
17021 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
17022
17023         * inferiors.c (struct inferior_info): Add regcache_data.
17024         (add_inferior): Call create_register_cache.
17025         (clear_inferiors): Call free_register_cache.
17026         (inferior_regcache_data, set_inferior_regcache_data): New functions.
17027         * regcache.c (struct inferior_regcache_data): New.
17028         (registers): Remove.
17029         (get_regcache): New function.
17030         (create_register_cache, free_register_cache): New functions.
17031         (set_register_cache): Don't initialize the register cache here.
17032         (registers_to_string, registers_from_string, register_data): Call
17033         get_regcache.
17034         * regcache.h: Add prototypes.
17035         * server.h: Likewise.
17036
17037 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
17038
17039         * mem-break.c: New file.
17040         * mem-break.h: New file.
17041         * Makefile.in: Add mem-break.o rule; update server.h
17042         dependencies.
17043         * inferiors.c (struct inferior_info): Add target_data
17044         member.
17045         (clear_inferiors): Free target_data member if set.
17046         (inferior_target_data, set_inferior_target_data): New functions.
17047         * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17048         (i386_stop_pc, i386_set_pc): New.  Add to the_low_target.
17049         * linux-low.c (linux_bp_reinsert): New variable.
17050         (struct inferior_linux_data): New.
17051         (linux_create_inferior): Use set_inferior_target_data.
17052         (linux_attach): Likewise.  Call add_inferior.
17053         (linux_wait_for_one_inferior): New function.
17054         (linux_wait): Call it.
17055         (linux_write_memory): Add const.
17056         (initialize_low): Call set_breakpoint_data.
17057         * linux-low.h (struct linux_target_ops): Add breakpoint
17058         handling members.
17059         * server.c (attach_inferior): Remove extra add_inferior
17060         call.
17061         * server.h: Include mem-break.h.  Update inferior.c
17062         prototypes.
17063         * target.c (read_inferior_memory)
17064         (write_inferior_memory): New functions.
17065         * target.h (read_inferior_memory)
17066         (write_inferior_memory): Change macros to prototypes.
17067         (struct target_ops): Update comments.  Add const to write_memory
17068         definition.
17069
17070 2002-04-11  Daniel Jacobowitz  <drow@mvista.com>
17071
17072         * linux-low.c (usr_store_inferior_registers): Support
17073         registers which are allowed to fail to store.
17074         * linux-low.h (linux_target_ops): Likewise.
17075         * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17076         (ppc_cannot_store_register): FPSCR may not be storable.
17077
17078 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
17079
17080         * server.h: Include <string.h> if HAVE_STRING_H.
17081         * ChangeLog: Correct paths in last ChangeLog entry.
17082
17083 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
17084
17085         * linux-low.h: Remove obsolete prototypes.
17086         (struct linux_target_ops): New.
17087         (extern the_low_target): New.
17088         * linux-low.c (num_regs, regmap): Remove declarations.
17089         (register_addr): Use the_low_target explicitly.
17090         (fetch_register): Likewise.
17091         (usr_fetch_inferior_registers): Likewise.
17092         (usr_store_inferior_registers): Likewise.
17093         * linux-arm-low.c (num_regs): Remove.
17094         (arm_num_regs): Define.
17095         (arm_regmap): Renamed from regmap, made static.
17096         (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17097         made static.
17098         (arm_cannot_store_register): Renamed from cannot_store_register,
17099         made static.
17100         (the_low_target): New.
17101         * linux-i386-low.c (num_regs): Remove.
17102         (i386_num_regs): Define.
17103         (i386_regmap): Renamed from regmap, made static.
17104         (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17105         made static.
17106         (i386_cannot_store_register): Renamed from cannot_store_register,
17107         made static.
17108         (the_low_target): New.
17109         * linux-ia64-low.c (num_regs): Remove.
17110         (ia64_num_regs): Define.
17111         (ia64_regmap): Renamed from regmap, made static.
17112         (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17113         made static.
17114         (ia64_cannot_store_register): Renamed from cannot_store_register,
17115         made static.
17116         (the_low_target): New.
17117         * linux-m68k-low.c (num_regs): Remove.
17118         (m68k_num_regs): Define.
17119         (m68k_regmap): Renamed from regmap, made static.
17120         (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17121         made static.
17122         (m68k_cannot_store_register): Renamed from cannot_store_register,
17123         made static.
17124         (the_low_target): New.
17125         * linux-mips-low.c (num_regs): Remove.
17126         (mips_num_regs): Define.
17127         (mips_regmap): Renamed from regmap, made static.
17128         (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17129         made static.
17130         (mips_cannot_store_register): Renamed from cannot_store_register,
17131         made static.
17132         (the_low_target): New.
17133         * linux-ppc-low.c (num_regs): Remove.
17134         (ppc_num_regs): Define.
17135         (ppc_regmap): Renamed from regmap, made static.
17136         (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17137         made static.
17138         (ppc_cannot_store_register): Renamed from cannot_store_register,
17139         made static.
17140         (the_low_target): New.
17141         * linux-s390-low.c (num_regs): Remove.
17142         (s390_num_regs): Define.
17143         (s390_regmap): Renamed from regmap, made static.
17144         (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17145         made static.
17146         (s390_cannot_store_register): Renamed from cannot_store_register,
17147         made static.
17148         (the_low_target): New.
17149         * linux-sh-low.c (num_regs): Remove.
17150         (sh_num_regs): Define.
17151         (sh_regmap): Renamed from regmap, made static.
17152         (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17153         made static.
17154         (sh_cannot_store_register): Renamed from cannot_store_register,
17155         made static.
17156         (the_low_target): New.
17157         * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17158         (the_low_target): New.
17159
17160 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
17161
17162         * Makefile.in: Add stamp-h target.
17163         * configure.in: Create stamp-h.
17164         * configure: Regenerated.
17165
17166 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
17167
17168         * inferiors.c: New file.
17169         * target.c: New file.
17170         * target.h: New file.
17171         * Makefile.in:  Add target.o and inferiors.o.  Update
17172         dependencies.
17173         * linux-low.c (inferior_pid): New static variable,
17174         moved from server.c.
17175         (linux_create_inferior): Renamed from create_inferior.
17176         Call add_inferior.  Return 0 on success instead of a PID.
17177         (linux_attach): Renamed from myattach.
17178         (linux_kill): Renamed from kill_inferior.  Call clear_inferiors ().
17179         (linux_thread_alive): Renamed from mythread_alive.
17180         (linux_wait): Renamed from mywait.  Call clear_inferiors () if the
17181         child dies.
17182         (linux_resume): Renamed from myresume.  Add missing ``return 0''.
17183         (regsets_store_inferior_registers): Correct error message.
17184         Add missing ``return 0''.
17185         (linux_fetch_registers): Renamed from fetch_inferior_registers.
17186         (linux_store_registers): Renamed from store_inferior_registers.
17187         (linux_read_memory): Renamed from read_inferior_memory.
17188         (linux_write_memory): Renamed from write_inferior_memory.
17189         (linux_target_ops): New structure.
17190         (initialize_low): Call set_target_ops ().
17191         * remote-utils.c (unhexify): New function.
17192         (hexify): New function.
17193         (input_interrupt): Send signals to ``signal_pid''.
17194         * server.c (inferior_pid): Remove.
17195         (start_inferior): Update create_inferior call.
17196         (attach_inferior): Call add_inferior.
17197         (handle_query): New function.
17198         (main): Call handle_query for `q' packets.
17199         * server.h: Include "target.h".  Remove obsolete prototypes.
17200         Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17201
17202 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
17203
17204         * Makefile.in: Add WARN_CFLAGS.  Update configury
17205         dependencies.
17206         * configure.in: Check for <string.h>
17207         * configure: Regenerate.
17208         * config.in: Regenerate.
17209         * gdbreplay.c: Include needed system headers.
17210         (remote_open): Remove strchr prototype.
17211         * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17212         * regcache.c (supply_register): Change buf argument to const void *.
17213         (supply_register_by_name): Likewise.
17214         (collect_register): Change buf argument to void *.
17215         (collect_register_by_name): Likewise.
17216         * regcache.h: Add missing prototypes.
17217         * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17218         * server.c (handle_query): New function.
17219         (attached): New static variable, moved out of main.
17220         (main): Quiet longjmp clobber warnings.
17221         * server.h: Add ATTR_NORETURN and ATTR_FORMAT.  Update prototypes.
17222         * utils.c (error): Remove NORETURN.
17223         (fatal): Likewise.