gdbserver/Makefile.in: Remove ADD_DEPS
[external/binutils.git] / gdb / gdbserver / ChangeLog
1 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
2
3         * Makefile.in: Remove references to $(ADD_DEPS).
4
5 2018-09-16  Tom Tromey  <tom@tromey.com>
6
7         * remote-utils.c (remote_open): Use GNU style for metasyntactic
8         variables.
9         * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
10         variables.
11
12 2018-09-05  Tom Tromey  <tom@tromey.com>
13
14         * configure: Rebuild.
15
16 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
17
18         PR build/23399
19         * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
20
21 2018-08-27  Tom Tromey  <tom@tromey.com>
22
23         PR build/23087:
24         * configure: Rebuild.
25
26 2018-08-27  Tom Tromey  <tom@tromey.com>
27
28         * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
29         (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
30         (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
31         (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
32         (s390x_emit_stack_adjust): Add casts to unsigned char.
33
34 2018-08-22  Simon Marchi  <simon.marchi@ericsson.com>
35
36         PR gdb/23374
37         PR gdb/23375
38         * server.h (struct client_state) <disable_randomization>:
39         Initialize to 1.
40
41 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
42
43         * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
44         variable.
45         (mips_supply_ptrace_register): Likewise.
46
47 2018-07-22  Tom Tromey  <tom@tromey.com>
48
49         * configure: Rebuild.
50
51 2018-07-22  Tom Tromey  <tom@tromey.com>
52
53         * win32-low.c (win32_create_inferior): Remove unused variables.
54         * gdbreplay.c (remote_open): Remove unused variable.
55         * remote-utils.c (remote_prepare): Remove unused variable.
56         * x86-tdesc.h (X86_TDESC_H): Define.
57         (amd64_expedite_regs): Define conditionally.
58         (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
59         * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
60         * remote-utils.c (readchar): Remove unused variable.
61
62 2018-07-13  Pedro Alves  <palves@redhat.com>
63
64         * linux-low.c (linux_kill): Change parameter to process_info
65         pointer instead of pid.  Adjust.
66         * lynx-low.c (lynx_kill): Likewise.
67         * nto-low.c (nto_kill): Likewise.
68         * spu-low.c (spu_kill): Likewise.
69         * win32-low.c (win32_kill): Likewise.
70         * server.c (handle_v_kill, kill_inferior_callback)
71         (detach_or_kill_for_exit): Adjust.
72         * target.c (kill_inferior): Change parameter to process_info
73         pointer instead of pid.  Adjust.
74         * target.h (struct target_ops) <kill>: Change parameter to
75         process_info pointer instead of pid.  Adjust all implementations
76         and callers.
77         (kill_inferior): Likewise.
78
79 2018-07-13  Pedro Alves  <palves@redhat.com>
80
81         * linux-low.c (linux_detach, linux_join): Change parameter to
82         process_info pointer instead of pid.  Adjust.
83         * lynx-low.c (lynx_detach, lynx_join): Likewise.
84         * nto-low.c (nto_detach): Likewise.
85         * spu-low.c (spu_detach, spu_join): Likewise.
86         * win32-low.c (win32_detach, win32_join): Likewise.
87         * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
88         * target.h (struct target_ops) <detach, join>: Change parameter to
89         process_info pointer instead of pid.  Adjust all implementations
90         and callers.
91         (detach_inferior, join_inferior): Rename 'pid' parameter to
92         'proc'.
93
94 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
95             Jan Kratochvil  <jan.kratochvil@redhat.com>
96             Paul Fertser  <fercerpav@gmail.com>
97             Tsutomu Seki  <sekiriki@gmail.com>
98
99         * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
100         (OBS): Add 'common/netstuff.o'.
101         (GDBREPLAY_OBS): Likewise.
102         * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
103         (remote_open): Implement support for IPv6
104         connections.
105         * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
106         and 'wspiapi.h'.
107         (handle_accept_event): Accept connections from IPv6 sources.
108         (remote_prepare): Handle IPv6-style hostnames; implement
109         support for IPv6 connections.
110         (remote_open): Implement support for printing connections from
111         IPv6 sources.
112
113 2018-07-11  Pedro Alves  <palves@redhat.com>
114
115         PR gdb/23377
116         * mem-break.c (any_persistent_commands): Add process_info
117         parameter and use it instead of relying on the current process.
118         Change return type to bool.
119         * mem-break.h (any_persistent_commands): Add process_info
120         parameter and change return type to bool.
121         * server.c (handle_detach): Remove require_running_or_return call.
122         Look up the process_info for the process we're about to detach.
123         If not found, return back error to GDB.  Adjust
124         any_persistent_commands call to pass down a process pointer.
125
126 2018-07-11  Pedro Alves  <palves@redhat.com>
127
128         * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
129         (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
130         instead of collect_register_by_name.
131         * regcache.c (regcache_raw_get_unsigned_by_name): New.
132         * regcache.h (regcache_raw_get_unsigned_by_name): New.
133
134 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
135             Pedro Alves  <palves@redhat.com>
136
137         * linux-low.c (initialize_low): Call linux_proc_init_warnings.
138
139 2018-07-03  Tom Tromey  <tom@tromey.com>
140
141         * linux-low.c: Update.
142         * lynx-low.c: Update.
143         * mem-break.c: Update.
144         * nto-low.c: Update.
145         * remote-utils.c: Update.
146         * server.c: Update.
147         * spu-low.c: Update.
148         * target.c: Update.
149         * win32-low.c: Update.
150
151 2018-07-03  Tom Tromey  <tom@tromey.com>
152
153         * server.c: Update.
154
155 2018-07-03  Tom Tromey  <tom@tromey.com>
156
157         * linux-low.c: Update.
158
159 2018-07-03  Tom Tromey  <tom@tromey.com>
160
161         * target.c: Update.
162
163 2018-07-03  Tom Tromey  <tom@tromey.com>
164
165         * linux-low.c: Update.
166         * linux-mips-low.c: Update.
167         * lynx-low.c: Update.
168         * nto-low.c: Update.
169         * remote-utils.c: Update.
170         * server.c: Update.
171         * spu-low.c: Update.
172         * target.c: Update.
173         * thread-db.c: Update.
174
175 2018-07-03  Tom Tromey  <tom@tromey.com>
176
177         * linux-low.c: Update.
178         * linux-mips-low.c: Update.
179         * lynx-low.c: Update.
180         * mem-break.c: Update.
181         * nto-low.c: Update.
182         * remote-utils.c: Update.
183         * server.c: Update.
184         * spu-low.c: Update.
185         * target.c: Update.
186         * tracepoint.c: Update.
187
188 2018-07-03  Tom Tromey  <tom@tromey.com>
189
190         * linux-low.c: Update.
191         * linux-ppc-low.c: Update.
192         * linux-x86-low.c: Update.
193         * proc-service.c: Update.
194         * server.c: Update.
195         * spu-low.c: Update.
196         * thread-db.c: Update.
197         * win32-low.c: Update.
198
199 2018-07-03  Tom Tromey  <tom@tromey.com>
200
201         * linux-low.c: Update.
202         * lynx-low.c: Update.
203         * nto-low.c: Update.
204         * remote-utils.c: Update.
205         * spu-low.c: Update.
206         * thread-db.c: Update.
207         * win32-low.c: Update.
208
209 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
210
211         * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
212         parameter in call to 'amd64_create_target_description'.
213
214 2018-06-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
215
216         * x86-tdesc.h: Remove executable permission flag.
217
218 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
219
220         * configure.ac: Remove AC_PREREQ, add missing quoting.
221         * configure: Re-generate.
222         * config.in: Re-generate.
223         * aclocal.m4: Re-generate.
224
225 2018-06-18  Simon Marchi  <simon.marchi@ericsson.com>
226
227         * tracepoint.h (current_traceframe): Remove declaration.
228
229 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
230
231         * linux-aarch64-low.c (is_sve_tdesc): New function.
232         (aarch64_sve_regs_copy_to_regcache): Likewise.
233         (aarch64_sve_regs_copy_from_regcache): Likewise.
234         (aarch64_regs_info): Add SVE checks.
235         (initialize_low_arch): Initialize SVE.
236
237 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
238
239         * Makefile.in: Add aarch64-sve-linux-ptrace.c.
240
241 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
242
243         * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
244         (initialize_low_tracepoint): Likewise
245         * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
246         * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
247         param.
248         * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
249         checks.
250         * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
251
252 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
253
254         * server.h (PBUFSIZ): Increase size
255
256 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
257
258         * regcache.c (regcache::raw_compare): New function.
259         * regcache.h (regcache::raw_compare): New declaration.
260
261 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
262
263         * regcache.c (new_register_cache): Use new.
264         (free_register_cache): Use delete.
265         (register_data): Use const.
266         (supply_register): Move body inside regcache.
267         (regcache::raw_supply): New override function.
268         (collect_register): Move body inside regcache.
269         (regcache::raw_collect): New override function.
270         (regcache::get_register_status): New override function.
271         * regcache.h (struct regcache): Inherit from reg_buffer_common.
272
273 2018-06-09  Tom Tromey  <tom@tromey.com>
274
275         * event-loop.c (gdb_event, gdb_event_p): Remove typedefs.  Don't
276         declare queue.
277         (event_queue): Use std::queue.
278         (gdb_event_xfree): Remove.
279         (initialize_event_loop, process_event, wait_for_event): Update.
280
281 2018-06-08  Stan Cox  <scox@redhat.com>
282
283         * win32-low.c (win32_create_inferior):  last_ptid and last_status
284         moved to client_state.
285
286 2018-06-08  Pedro Alves  <palves@redhat.com>
287
288         * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
289         common/common-exceptions.o, common/common-utils.o,
290         common/errors.o, common/print-utils.o and utils.o.
291         * gdbreplay.c: Include "common-defs.h" instead of the two
292         'config.h's here.  Don't include stdio.h, errno.h, stdlib.h,
293         string.h or alloca.h.
294         (perror_with_name): Delete.
295         (remote_open): Use xstrdup instead of strdup.
296         (main): Rename to ...
297         (captured_main): ... this.
298         (main): New.
299
300 2018-06-08  Tom Tromey  <tom@tromey.com>
301
302         * linux-low.c (linux_low_read_btrace): Update.
303
304 2018-06-04  Stan Cox  <scox@redhat.com>
305
306         * server.h (struct client_state): New.
307         * server.c (cont_thread, general_thread, multi_process)
308         (report_fork_events, report_vfork_events, report_exec_events)
309         (report_thread_events, swbreak_feature, hwbreak_feature)
310         (vCont_supported, disable_randomization, pass_signals)
311         (program_signals, program_signals_p, last_status, last_ptid, own_buf):
312         Moved to client_state.
313         * remote-utils.c (remote_debug, noack_mode)
314         (transport_is_reliable): Moved to client_state.
315         * tracepoint.c (current_traceframe): Moved to client_state.
316
317         Update all callers.
318         * server.c, remote-utils.c, tracepoint.c, fork-child.c,
319         linux-low.c, remote-utils.h, target.c: Use client_state.
320
321 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
322
323         * configure.srv: Add new c/h file.
324
325 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
326
327         * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
328         null VQ.
329
330 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
331
332         * gdb.arch/mips-fpregset-core.exp: New test.
333         * gdb.arch/mips-fpregset-core.c: New test source.
334
335 2018-05-23  Erik Kurzinger  <ekurzinger@nvidia.com>
336
337         PR server/23198
338         * hostio.c (require_int): Do not report overflow for integers
339         between 0xfffffff and 0x7fffffff.
340
341 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
342
343         * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
344         (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
345         (mips_collect_ptrace_register, mips_supply_ptrace_register): New
346         functions.
347         (the_low_target): Wire them.
348
349 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
350
351         * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
352         Set vscr_offset to 0 in little-endian mode and 12 in big-endian
353         mode. Call collect_register_by_name with vscr using
354         vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
355         (ppc_store_vrregset): Add and set vscr_offset variable as in
356         ppc_fill_vrregset. Call supply_register_by_name with vscr using
357         vscr_offset.
358
359 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
360
361         * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
362         (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
363         PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
364
365 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
366
367         * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
368         (ppc_store_vsxregset): Likewise.
369         (ppc_fill_vrregset): Likewise.
370         (ppc_store_vrregset): Likewise.
371         (ppc_fill_evrregset): Likewise.
372         (ppc_store_evrregset): Likewise.
373         (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
374         (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
375         needed.
376
377 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
378
379         * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
380         wordsize of the inferior. Call ppc_linux_target_wordsize.
381
382 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
383
384         * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
385         * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
386         * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
387         * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
388         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
389         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
390         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
391         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
392         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
393         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
394         (tdesc_powerpc_e500l): Remove.
395         * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
396         linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
397         * linux-ppc-low.c: Include arch/ppc-linux-common.h,
398         arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
399         linux-ppc-tdesc.h.
400         (ppc_arch_setup): Remove target description matching code. Fill a
401         ppc_linux_features struct and call ppc_linux_match_description
402         with it.
403
404 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
405
406         * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
407         width of the requested register exceeds the width of the
408         `ptrace' data type.
409         (mips_cannot_store_register): Likewise.
410
411 2018-05-21  Maciej W. Rozycki  <macro@mips.com>
412
413         * linux-mips-low.c (mips_fetch_register): New function.  Update
414         preceding comment.
415         (mips_store_gregset): Supply 0 rather than $restart for $zero.
416         (the_low_target): Wire `mips_fetch_register'.
417
418 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
419
420         * lynx-i386-low.c (LYNXOS_178): New macro.
421         [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
422         the layout on LynxOS-178.
423         (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
424         handle floating point registers that are not supported by
425         LynxOS-178.
426
427 2018-05-10  Tom Tromey  <tom@tromey.com>
428
429         * configure: Rebuild.
430
431 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
432
433         PR server/23158:
434         * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
435         * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
436         Use it to set the expedite_regs field in the given tdesc.
437         * x86-tdesc.h: New file.
438         * linux-aarch64-tdesc.c (aarch64_linux_read_description):
439         Adjust following the addition of the new expedite_regs parameter
440         to init_target_desc.
441         * linux-tic6x-low.c (tic6x_read_description): Likewise.
442         * linux-x86-tdesc.c: #include "x86-tdesc.h".
443         (i386_linux_read_description, amd64_linux_read_description):
444         Adjust following the addition of the new expedite_regs parameter
445         to init_target_desc.
446         * lynx-i386-low.c: #include "x86-tdesc.h".
447         (lynx_i386_arch_setup): Adjust following the addition of the new
448         expedite_regs parameter to init_target_desc.
449         * nto-x86-low.c: #include "x86-tdesc.h".
450         (nto_x86_arch_setup): Adjust following the addition of the new
451         expedite_regs parameter to init_target_desc.
452         * win32-i386-low.c: #include "x86-tdesc.h".
453         (i386_arch_setup): Adjust following the addition of the new
454         expedite_regs parameter to init_target_desc.
455
456 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
457
458         PR server/23158:
459         * win32-low.c (win32_create_inferior): Add call to my_wait
460         setting last_status global.
461
462 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
463
464         PR server/23158:
465         * win32-low.c (create_process): Only call gdb_tilde_expand if
466         inferior_cwd is not NULL.
467
468 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
469
470         * i387-fp.c (i387_cache_to_xsave): Only write x87 control
471         registers to the cache if their values have changed.
472         (i387_xsave_to_cache): Provide default values for x87 control
473         registers when these features are available, but disabled.
474         * regcache.c (supply_register_by_name_zeroed): New function.
475         * regcache.h (supply_register_by_name_zeroed): Declare new
476         function.
477
478 2018-05-07  Tom Tromey  <tom@tromey.com>
479
480         * configure: Rebuild.
481
482 2018-05-04  Tom Tromey  <tom@tromey.com>
483
484         * configure: Rebuild.
485
486 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
487             Pedro Alves <palves@redhat.com>
488
489         * linux-aarch64-low.c (aarch64_stopped_data_address):
490         Likewise.
491
492 2018-04-27  Tom Tromey  <tom@tromey.com>
493
494         * configure: Rebuild.
495
496 2018-04-23  Tom Tromey  <tom@tromey.com>
497
498         * configure: Rebuild.
499
500 2018-04-19  Simon Marchi  <simon.marchi@ericsson.com>
501
502         * Makefile.in (depcomp): Add "..".
503         (all_deps_files): New and use it.
504
505 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
506
507         * configure.srv (aarch64*-*-linux*): Don't include xml.
508         (i[34567]86-*-cygwin*): Likewise.
509         (i[34567]86-*-linux*): Likewise.
510         (i[34567]86-*-lynxos*): Likewise.
511         (i[34567]86-*-mingw32ce*): Likewise.
512         (i[34567]86-*-mingw*): Likewise.
513         (i[34567]86-*-nto*): Likewise.
514         (tic6x-*-uclinux): Likewise.
515         (x86_64-*-linux*): Likewise.
516         (x86_64-*-mingw*): Likewise.
517         (x86_64-*-cygwin*): Likewise.
518
519 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
520
521         * tdesc.c: Remove xml parameter.
522
523 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
524
525         * server.c (get_features_xml): Remove cast.
526         * tdesc.c (void target_desc::accept): Fill in function.
527         (tdesc_get_features_xml): Remove old xml creation.
528         (print_xml_feature::visit_pre): Add xml vistor.
529         * tdesc.h (struct target_desc): Make xmltarget mutable.
530         (tdesc_get_features_xml): Remove declaration.
531
532 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
533
534         * tdesc.c (tdesc_architecture_name): Add new function.
535         (tdesc_osabi_name): Likewise.
536         (tdesc_get_features_xml): Use new functions.
537
538 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
539
540         * tdesc.c (tdesc_create_flags): Remove.
541         (tdesc_add_flag): Likewise.
542         (tdesc_named_type): Likewise.
543         (tdesc_create_union): Likewise.
544         (tdesc_create_struct): Likewise.
545         (tdesc_create_vector): Likewise.
546         (tdesc_add_bitfield): Likewise.
547         (tdesc_add_field): Likewise.
548         (tdesc_set_struct_size): Likewise.
549
550 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
551
552         * tdesc.c (~target_desc): Remove implictly deleted items.
553         (init_target_desc): Iterate all features.
554         (tdesc_get_features_xml): Use vector.
555         (tdesc_create_feature): Create feature.
556         * tdesc.h (tdesc_feature) Remove
557         (target_desc): Add features.
558
559 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
560
561         * Makefile.in: Add common/tdesc.c
562         * tdesc.c (init_target_desc): init all reg_defs from register
563         vector.
564         (tdesc_create_reg): Create tdesc_reg.
565         * tdesc.h (tdesc_feature): Add register vector.
566
567 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
568
569         * tdesc.h (struct target_desc) <features>: Change type to
570         std::vector<std::string>.
571         * tdesc.c (target_desc::~target_desc): Adjust to std::vector
572         changes.
573         (tdesc_get_features_xml): Likewise.
574         (tdesc_create_feature): Likewise.
575
576 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
577
578         * regcache.c (find_register_by_number): Return a ref.
579         (find_regno): Use references.
580         (register_size): Likewise.
581         (register_data): Likewise.
582         * tdesc.c (target_desc::~target_desc): Remove free calls.
583         (target_desc::operator==): Use std::vector compare.
584         (init_target_desc): Use reference.
585         (tdesc_create_reg): Use reg constructors.
586         * tdesc.h (struct target_desc): Replace pointer with object.
587
588 2018-03-23  Alan Hayward  <alan.hayward@arm.com>
589
590         * regcache.c (find_register_by_number): Make static.
591         (find_regno): Use find_register_by_number
592         * regcache.h (struct reg): Remove declaration.
593
594 2018-03-23  Alan Hayward  <alan.hayward@arm.com>
595
596         * tdesc.c (target_desc::~target_desc): Move to here.
597         (target_desc::operator==): Likewise.
598         * tdesc.h (target_desc::~target_desc): Move from here.
599         (target_desc::operator==): Likewise.
600
601 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
602
603         * linux-s390-low.c (s390_get_wordsize): Correct brace style.
604
605 2018-03-21  Andreas Arnez  <arnez@linux.vnet.ibm.com>
606
607         * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
608         S390_TDESC_GS.
609         * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
610         (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
611         and init_registers_s390_gs_linux64.
612
613 2018-03-21  Andreas Arnez  <arnez@linux.vnet.ibm.com>
614
615         * linux-s390-low.c (s390_fill_gs): Remove function.
616         (s390_fill_gsbc): Remove function.
617         (s390_regsets): Set fill functions for the guarded storage regsets
618         to NULL.
619
620 2018-03-21  Andreas Arnez  <arnez@linux.vnet.ibm.com>
621
622         * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
623         the word size.  Add comment.
624         (s390_get_wordsize): New function.
625         (s390_arch_setup): No longer select a temporary tdesc to fetch the
626         pswm with it.  Instead, use s390_get_wordsize to determine the
627         word size first and derive the correct tdesc from that directly.
628
629 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
630
631         * Makefile.in: Include silent-rules.mk.
632         (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
633         (COMPILE): Add ECHO_CXX.
634         (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
635         (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
636         ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
637         (version-generated.c): Add ECHO_GEN.
638         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
639         (IPAGENT_COMPILE): Add ECHO_CXX.
640         (%-generated.c): Add ECHO_REGDAT.
641
642 2018-03-14  Tom Tromey  <tom@tromey.com>
643
644         PR cli/14977:
645         * ax.c (ax_printf): Special case for NULL.
646
647 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
648
649         * linux-low.c (linux_qxfer_libraries_svr4): Use
650         xml_escape_text_append.
651
652 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
653
654         * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
655
656 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
657
658         * server.c (handle_general_set): Remove unnecessary xstrdup.
659
660 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
661
662         * server.c (parse_debug_format_options): Adjust to
663         delim_string_to_char_ptr_vec changes.
664         * thread-db.c (thread_db_load_search): Adjust to
665         dirnames_to_char_ptr_vec changes.
666
667 2018-03-01  Markus Metzger  <markus.t.metzger@intel.com>
668
669         * target.h (target_enable_btrace, target_disable_btrace)
670         (target_read_btrace, target_read_btrace_conf): Turn macro into
671         inline function.  Throw error if target method is not defined.
672         * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
673         check for btrace target method.  Be prepared to handle exceptions
674         from btrace target methods.
675
676 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
677
678         * server.c (captured_main): Change order of error message printed
679         when the current working directory cannot be found.
680
681 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
682
683         * server.c: Include "filenames.h" and "pathstuff.h".
684         (program_name): Delete variable.
685         (program_path): New anonymous class.
686         (get_exec_wrapper): Use "program_path" instead of
687         "program_name".
688         (handle_v_run): Likewise.
689         (captured_main): Likewise.
690         (process_serial_event): Likewise.
691
692 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
693
694         * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
695         (OBJS): Add "pathstuff.o".
696         * server.c (current_directory): New global variable.
697         (captured_main): Initialize "current_directory".
698
699 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
700
701         * tdesc.c: Use common/tdesc.h.
702         * tdesc.h: Likewise.
703
704 2018-02-20  Alan Hayward  <alan.hayward@arm.com>
705             Simon Marchi  <simon.marchi@ericsson.com>
706
707         * Makefile.in: Switch order of make rules.
708
709 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
710
711         * Makefile.in: Add common directory in build.
712         * configure.ac: Add common reference.
713         * configure: Regenerate.
714
715 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
716
717         * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
718         * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
719         * spu-low.c (spu_target_ops): Likewise.
720         * win32-low.c (win32_target_ops): Likewise.
721         * server.c (supported_btrace_packets): Report packets unconditionally.
722         * target.h (target_ops) <supports_btrace>: Remove.
723         (target_supports_btrace): Remove.
724
725 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
726
727         * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
728         (handle_btrace_disable): Change return type to void.  Use exceptions
729         to report errors.
730         (handle_btrace_general_set): Catch exception and copy message to
731         return message.
732
733 2018-02-08  Tom Tromey  <tom@tromey.com>
734
735         * linux-low.c (install_software_single_step_breakpoints): Use
736         make_scoped_restore.
737         * inferiors.c (make_cleanup_restore_current_thread): Remove.
738         (do_restore_current_thread_cleanup): Remove.
739         * gdbthread.h (make_cleanup_restore_current_thread): Don't
740         declare.
741
742 2018-02-08  Tom Tromey  <tom@tromey.com>
743
744         * mem-break.c (set_raw_breakpoint_at): Use
745         gdb::unique_xmalloc_ptr.
746
747 2018-01-30  Pedro Alves  <palves@redhat.com>
748
749         PR gdb/13211
750         * target.c (target_terminal::terminal_state): Rename to ...
751         (target_terminal::m_terminal_state): ... this.
752
753 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
754
755         * linux-low.c (handle_extended_wait): Surround call to
756         thread_db_notice_clone with #ifdef USE_THREAD_DB.
757
758 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
759
760         * linux-low.c (attach_proc_task_lwp_callback): Adjust to
761         linux_ptrace_attach_fail_reason_string now returning an
762         std::string.
763         (linux_attach): Likewise.
764         * thread-db.c (attach_thread): Likewise.
765
766 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
767
768         PR gdb/21559
769         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
770         checking for fs_base/gs_base fields in struct user_regs_struct.
771         * configure: Regenerate.
772
773 2018-01-16  Yao Qi  <yao.qi@linaro.org>
774
775         PR gdb/18749
776         * linux-low.c (fetch_register): Call supply_register instead of
777         error.
778
779 2018-01-08  Yao Qi  <yao.qi@linaro.org>
780             Simon Marchi  <simon.marchi@ericsson.com>
781
782         * Makefile.in (OBS): Remove selftest.o.
783         * configure.ac: Set srv_selftest_objs if $development is true.
784         (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
785         * configure: Re-generated.
786         * server.c (captured_main): Wrap variable selftest_filter with
787         GDB_SELF_TEST.
788
789 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
790
791         * server.c (parse_debug_format_options): Return std::string.
792         (handle_monitor_command, captured_main): Adjust.
793
794 2018-01-05  Pedro Alves  <palves@redhat.com>
795
796         PR gdb/18653
797         * server.c (captured_main): Pass quiet=false to
798         save_original_signals_state.
799
800 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
801
802         * gdbreplay.c (gdbreplay_version): Update copyright year in
803         version message.
804         * server.c (gdbserver_version): Likewise.
805
806 2017-12-08  Tom Tromey  <tom@tromey.com>
807
808         * ax.c (ax_printf): Update.
809
810 2017-12-07  Yao Qi  <yao.qi@linaro.org>
811
812         * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
813         aarch64_linux_read_description.
814         * linux-amd64-ipa.c (idx2mask): New array.
815         (get_ipa_tdesc): Move idx2mask out.
816         (initialize_low_tracepoint): Initialize target descriptions.
817         * linux-i386-ipa.c (idx2mask): New array.
818         (get_ipa_tdesc): Move idx2mask out.
819         (initialize_low_tracepoint): Initialize target descriptions.
820
821 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
822
823         * tdesc.c (struct tdesc_type): Change return type.
824         (tdesc_add_flag): Change parameter type.
825         (tdesc_add_bitfield): Likewise.
826         (tdesc_add_field): Likewise.
827         (tdesc_set_struct_size): Likewise.
828
829 2017-12-05  Simon Marchi  <simon.marchi@ericsson.com>
830
831         * regcache.c (registers_to_string): Remove unused variable.
832
833 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
834
835         * inferiors.c (for_each_inferior_with_data): Remove.
836         * inferiors.h (for_each_inferior_with_data): Remove.
837         * server.c (handle_qxfer_threads_worker): Change parameter type.
838         (handle_qxfer_threads_proper): Use for_each_thread.
839
840 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
841
842         * inferiors.c (for_each_inferior): Remove.
843         (clear_inferiors): Use for_each_thread.
844         * inferiors.h (for_each_inferior): Remove.
845         * linux-low.c (linux_wait_for_event_filtered): Use
846         for_each_thread.
847         (linux_stabilize_threads): Likewise.
848         * regcache.c (regcache_release): Likewise.
849         * server.c (gdb_wants_all_threads_stopped): Likewise.
850         (clear_pending_status_callback): Remove.
851         (handle_status): Use for_each_thread.
852         (captured_main): Likewise.
853         * win32-low.c (child_init_thread_list): Likewise.
854         (win32_clear_inferiors): Likewise.
855         (fake_breakpoint_event): Likewise.
856
857 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
858
859         * inferiors.h (find_inferior): Remove.
860         * inferiors.c (find_inferior): Remove.
861
862 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
863
864         * linux-low.c (resume_status_pending_p): Update comment.
865         (need_step_over_p): Update comment.
866
867 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
868
869         * linux-low.c (proceed_one_lwp): Return void, change parameter
870         type.
871         (unsuspend_and_proceed_one_lwp): Likewise.
872         (proceed_all_lwps): Use for_each_thread.
873         (unstop_all_lwps): Likewise.
874
875 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
876
877         * linux-low.c (linux_resume_one_thread): Return void, take
878         parameter directly.
879         (linux_resume): Use for_each_thread.
880
881 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
882
883         * linux-low.c (send_sigstop_callback): Return void, change
884         parameter type.  Rename to...
885         (send_sigstop): ... this.
886         (suspend_and_send_sigstop_callback): Return void, change parameter
887         type.  Rename to...
888         (suspend_and_send_sigstop): ... this.
889         (stop_all_lwps): Use for_each_thread.
890
891 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
892
893         * linux-low.c (lwp_running): Return bool, remove unused
894         argument.
895         (linux_stabilize_threads): Use find_thread.
896
897 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
898
899         * linux-low.c (select_singlestep_lwp_callback): Remove.
900         (count_events_callback): Remove.
901         (select_event_lwp_callback): Remove.
902         (select_event_lwp): Use find_thread/for_each_thread.
903
904 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
905
906         * linux-low.c (not_stopped_callback): Return bool, take filter
907         argument directly.
908         (linux_wait_for_event_filtered): Use find_thread.
909         (linux_wait_1): Likewise.
910
911 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
912
913         * linux-low.c (same_lwp): Remove.
914         (find_lwp_pid): Use find_thread.
915
916 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
917
918         * linux-low.c (delete_lwp_callback): Remove.
919         (linux_mourn): Use for_each_thread.
920
921 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
922
923         * linux-low.c (linux_detach_lwp_callback): Return void, remove
924         args parameter, don't check for pid.
925         (linux_detach): Use for_each_thread.
926
927 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
928
929         * linux-low.c (struct counter): Remove.
930         (second_thread_of_pid_p): Remove.
931         (last_thread_of_process_p): Use find_thread.
932
933 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
934
935         * inferiors.c (find_inferior_in_random): Remove.
936         * inferiors.h (find_inferior_in_random): Remove.
937         * linux-low.c (status_pending_p_callback): Return bool, accept
938         parameter ptid directly.
939         (linux_wait_for_event_filtered): Use find_thread_in_random.
940         (linux_wait_1): Likewise.
941
942 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
943
944         * inferiors.c (find_inferior_id): Remove.
945         (find_thread_ptid): Move implemention from find_inferior_id to
946         here.
947         * inferiors.h (find_inferior_id): Remove.
948         * server.c (handle_status): Use find_thread_ptid.
949         (process_serial_event): Likewise.
950         * thread-db.c (find_one_thread): Likewise.
951         (thread_db_thread_handle): Likewise.
952         * win32-low.c (thread_rec): Likewise.
953         (child_delete_thread): Likewise.
954         (win32_thread_alive): Likewise.
955         (get_child_debug_event): Likewise.
956
957 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
958
959         * linux-mips-low.c (update_watch_registers_callback): Return
960         void, remove pid_p parameter, don't check for pid.
961         (mips_insert_point, mips_remove_point): Use for_each_thread.
962
963 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
964
965         * lynx.low (lynx_delete_thread_callback): Remove.
966         (lynx_mourn): Use for_each_thread.
967
968 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
969
970         * regcache.c (regcache_invalidate_one): Remove.
971         (regcache_invalidate_pid): use for_each_thread.
972
973 2017-11-26  Tom Tromey  <tom@tromey.com>
974
975         * linux-low.c (linux_create_inferior): Update.
976
977 2017-11-24  Ulrich Weigand  <uweigand@de.ibm.com>
978
979         * spu-low.c (spu_create_inferior): Fix typo in argument name.
980
981 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
982
983         * configure.srv: Add linux-aarch64-tdesc-selftest.o.
984         * linux-aarch64-low.c (initialize_low_arch): Call init func.
985         * linux-aarch64-tdesc-selftest.c: New file.
986         * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
987
988 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
989
990         * configure.srv: Add new file.
991         * linux-aarch64-low.c (initialize_low_arch): Call init func.
992         * linux-aarch64-tdesc-selftest.c: New file.
993         * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
994
995 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
996
997         * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
998         * linux-aarch64-low.c (initialize_low_arch): Remove init.
999         * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1000
1001 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
1002
1003         * configure.srv: Add new files.
1004         * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1005         aarch64_linux_read_description.
1006         * linux-aarch64-low.c (aarch64_linux_read_description):
1007         Merge with aarch64_arch_setup.
1008         (aarch64_arch_setup): Call aarch64_linux_read_description.
1009         * linux-aarch64-tdesc.c: New file.
1010         * linux-aarch64-tdesc.h: New file.
1011
1012 2017-11-24  Yao Qi  <yao.qi@linaro.org>
1013
1014         * configure.srv: Set $srv_regobj for tic6x-linux.
1015         * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1016         (tic6x_read_description): Move some code to tic6x_arch_setup.
1017         (tic6x_tdesc_test): New function.
1018         (initialize_low_arch): Call selftests::register_test.
1019
1020 2017-11-22  Yao Qi  <yao.qi@linaro.org>
1021
1022         * remote-utils.c (prepare_resume_reply): Use memcpy.
1023
1024 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1025
1026         * linux-low.c (kill_one_lwp_callback): Return void, take
1027         argument directly, don't filter on pid.
1028         (linux_kill): Use for_each_thread.
1029
1030 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1031
1032         * linux-low.c (need_step_over_p): Return bool, remove dummy
1033         argument.
1034         (linux_resume, proceed_all_lwps): Use find_thread.
1035
1036 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1037
1038         * linux-low.c (resume_status_pending_p): Return bool, remove
1039         flag_p argument.
1040         (linux_resume): Use find_thread.
1041
1042 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1043
1044         * linux-low.c (struct thread_resume_array): Remove.
1045         (linux_set_resume_request): Return void, take arguments
1046         directly.
1047         (linux_resume): Use for_each_thread.
1048
1049 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1050
1051         * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1052         return bool, remove data argument.
1053         (linux_stabilize_threads): Use find_thread.
1054
1055 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1056
1057         * linux-low.c (unsuspend_one_lwp): Remove.
1058         (unsuspend_all_lwps): Use for_each_thread, inline code from
1059         unsuspend_one_lwp.
1060
1061 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1062
1063         * gdbthread.h (find_thread): Add overload with ptid_t filter.
1064         * linux-low.c (struct iterate_over_lwps_args): Remove.
1065         (iterate_over_lwps_filter): Remove.
1066         (iterate_over_lwps): Use find_thread.
1067
1068 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1069
1070         * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1071         (linux_handle_new_gdb_connection): Use for_each_thread, inline
1072         code from reset_lwp_ptrace_options_callback.
1073
1074 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1075
1076         * linux-arm-low.c (struct update_registers_data): Remove.
1077         (update_registers_callback): Return void, take arguments
1078         directly, don't check thread's pid.
1079         (arm_insert_point, arm_remove_point): Use for_each_thread.
1080
1081 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1082
1083         * win32-low.c (continue_one_thread): Return void, take argument
1084         directly.
1085         (child_continue): Use for_each_thread.
1086
1087 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1088
1089         * win32-i386-low.c (update_debug_registers_callback): Rename
1090         to ...
1091         (update_debug_registers): ... this, return void, remove pid_p arg.
1092         (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1093
1094 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
1095
1096         * inferiors.h (struct process_info): Add constructor, initialize
1097         fields..
1098         <syscalls_to_catch>: Change type to std::vector<int>.
1099         * inferiors.c (add_process): Allocate process_info with new.
1100         (remove_process): Free process_info with delete.
1101         * linux-low.c (handle_extended_wait): Adjust.
1102         (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1103         * server.c (handle_general_set): Adjust.
1104
1105 2017-11-16  Pedro Alves  <palves@redhat.com>
1106
1107         * remote-utils.c (remote_close): Block SIGIO signals instead of
1108         uninstalling the SIGIO handler.
1109
1110 2017-11-16  Alan Hayward  <alan.hayward@arm.com>
1111
1112         * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1113
1114 2017-11-16  Yao Qi  <yao.qi@linaro.org>
1115
1116         * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1117         (tic6x_store_gregset): Likewise.
1118         (tic6x_usrregs_info): Move it up.
1119
1120 2017-11-15  Alan Hayward  <alan.hayward@arm.com>
1121
1122         * Makefile.in: Update arch rules.
1123         * configure.srv: Explicitly mark arch/ files.
1124
1125 2017-11-13  Andreas Schwab  <schwab@suse.de>
1126
1127         * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1128         function.
1129         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1130
1131 2017-11-06  Pedro Alves  <palves@redhat.com>
1132
1133         * config.in, configure: Regenerate.
1134
1135 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1136
1137         * target.c (struct thread_search): Remove.
1138         (thread_search_callback): Remove.
1139         (prepare_to_access_memory): Use for_each_thread instead of
1140         find_inferior.  Inline code from thread_search_callback.
1141
1142 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1143
1144         * server.c (struct visit_actioned_threads_data): Remove.
1145         (visit_actioned_threads): Change prototype to take arguments
1146         directly.
1147         (resume): Use find_thread instead of find_inferior.
1148
1149 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1150
1151         * server.c (queue_stop_reply_callback): Change prototype, return
1152         void.
1153         (find_status_pending_thread_callback): Remove.
1154         (handle_status): Replace find_inferior with find_thread and
1155         for_each_thread.
1156
1157 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
1158
1159         * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1160         with REGNO.
1161         (aarch64_store_gregset): Likewise.
1162         (aarch64_fill_fpregset): Likewise.
1163         (aarch64_store_fpregset): Likewise.
1164
1165 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1166
1167         * gdbthread.h (find_thread, for_each_thread): New functions.
1168         * inferiors.c (thread_of_pid): Remove.
1169         (find_any_thread_of_pid): Use find_thread.
1170         * linux-low.c (num_lwps): Use for_each_thread.
1171
1172 2017-10-17  Yao Qi  <yao.qi@linaro.org>
1173
1174         * Makefile.in: Remove one rule.
1175         * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1176
1177 2017-10-17  Yao Qi  <yao.qi@linaro.org>
1178
1179         * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1180         Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1181
1182 2017-10-17  Yao Qi  <yao.qi@linaro.org>
1183
1184         * configure.srv: Rename arm.o with arch/arm.o.
1185
1186 2017-10-17  Yao Qi  <yao.qi@linaro.org>
1187
1188         * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1189         (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1190         (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1191         (arch-i386.o, arch-amd64.o): Remove rules.
1192         (arch/%.o): New rule.
1193         Update POSTCOMPILE and COMPILE.pre.
1194         * configure.ac: Invoke AC_CONFIG_COMMANDS.
1195         * configure: Re-generated.
1196         * configure.srv: Replace arch-i386.o with arch/i386.o.
1197         Replace arch-amd64.o with arch/amd64.o.
1198
1199 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1200
1201         * configure: Regenerated.
1202
1203 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1204
1205         * inferiors.h: (struct inferior_list): Remove.
1206         (struct inferior_list_entry); Remove.
1207         (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1208         A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1209         get_first_inferior): Remove.
1210         (for_each_inferior, for_each_inferior_with_data, find_inferior,
1211         find_inferior_id, find_inferior_in_random): Change signature.
1212         * inferiors.c (all_threads): Change type to
1213         std::list<thread_info *>.
1214         (get_thread): Remove macro.
1215         (find_inferior, find_inferior_id): Change signature, implement
1216         using find_thread.
1217         (find_inferior_in_random): Change signature, implement using
1218         find_thread_in_random.
1219         (for_each_inferior, for_each_inferior_with_data): Change
1220         signature, implement using for_each_thread.
1221         (add_inferior_to_list, remove_inferior): Remove.
1222         (add_thread, get_first_thread, thread_of_pid,
1223         find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1224         (get_first_inferior, one_inferior_p, clear_inferior_list):
1225         Remove.
1226         (clear_inferiors, get_thread_process): Update.
1227         * gdbthread.h: Include <list>.
1228         (struct thread_info) <entry>: Remove field.
1229         <id>: New field.
1230         (all_threads): Change type to std::list<thread_info *>.
1231         (get_first_inferior): Add doc.
1232         (find_thread, for_each_thread, find_thread_in_random): New
1233         functions.
1234         (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1235         * linux-arm-low.c (update_registers_callback): Update.
1236         * linux-low.c (second_thread_of_pid_p): Update.
1237         (kill_one_lwp_callback, linux_detach_lwp_callback,
1238         delete_lwp_callback, status_pending_p_callback, same_lwp,
1239         find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1240         iterate_over_lwps, not_stopped_callback,
1241         resume_stopped_resumed_lwps, count_events_callback,
1242         select_singlestep_lwp_callback, select_event_lwp_callback,
1243         unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1244         suspend_and_send_sigstop_callback, wait_for_sigstop,
1245         stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1246         lwp_running, linux_set_resume_request, resume_status_pending_p,
1247         need_step_over_p, start_step_over, linux_resume_one_thread,
1248         proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1249         reset_lwp_ptrace_options_callback): Update.
1250         * linux-mips-low.c (update_watch_registers_callback): Update.
1251         * regcache.c (regcache_invalidate_one, regcache_invalidate):
1252         Update.
1253         (free_register_cache_thread_one): Remove.
1254         (regcache_release): Update.
1255         * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1256         handle_qxfer_threads_worker): Update.
1257         (handle_query): Update, use list iterator.
1258         (visit_actioned_threads, handle_pending_status,
1259         queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1260         clear_pending_status_callback, set_pending_status_callback,
1261         find_status_pending_thread_callback, handle_status,
1262         process_serial_event): Update.
1263         * target.c (thread_search_callback): Update.
1264         * thread-db.c (thread_db_get_tls_address): Update.
1265         * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1266         Update.
1267         * win32-i386-low.c (update_debug_registers_callback): Update.
1268         * win32-low.c (delete_thread_info, child_delete_thread,
1269         continue_one_thread, suspend_one_thread,
1270         get_child_debug_event): Adjust.
1271
1272 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1273
1274         * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1275         * inferiors.h: Include <list>.
1276         (struct process_info) <entry>: Remove field.
1277         <pid>: New field.
1278         (pid_of): Change macro to function.
1279         (ptid_of, lwpid_of): Remove macro.
1280         (all_processes): Change type to std::list<process_info *>.
1281         (ALL_PROCESSES): Remove macro.
1282         (for_each_process, find_process): New function.
1283         * inferiors.c (all_processes): Change type to
1284         std::list<process_info *>.
1285         (find_thread_process): Adjust.
1286         (add_process): Likewise.
1287         (remove_process): Likewise.
1288         (find_process_pid): Likewise.
1289         (get_first_process): Likewise.
1290         (started_inferior_callback): Remove.
1291         (have_started_inferiors_p): Adjust.
1292         (attached_inferior_callback): Remove.
1293         (have_attached_inferiors_p): Adjust.
1294         * linux-low.c (check_zombie_leaders): Likewise.
1295         * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1296         (x86_linux_update_xmltarget): Adjust.
1297         * server.c (handle_query): Likewise.
1298         (gdb_reattached_process): Remove.
1299         (handle_status): Adjust.
1300         (kill_inferior_callback): Likewise.
1301         (detach_or_kill_inferior): Remove.
1302         (print_started_pid): Likewise.
1303         (print_attached_pid): Likewise.
1304         (detach_or_kill_for_exit): Update.
1305         (process_serial_event): Likewise.
1306         * linux-arm-low.c (arm_new_fork): Likewise.
1307
1308 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1309
1310         * dll.h: Include <list>.
1311         (struct dll_info): Add constructor.
1312         <entry>: Remove field.
1313         (all_dlls): Change type to std::list<dll_info>.
1314         * dll.c: Include <algorithm>.
1315         (get_dll): Remove macro.
1316         (all_dlls): Change type to std::list<dll_info *>.
1317         (free_one_dll): Remove.
1318         (match_dll): Likewise.
1319         (loaded_dll): Adjust.
1320         (unloaded_dll): Adjust to all_dlls type change, use
1321         std::find_if.  Inline code from match_dll.
1322         (clear_dlls): Adjust to all_dlls type change.
1323         * server.c (emit_dll_description): Remove.
1324         (handle_qxfer_libraries): Adjust to all_dlls type change,
1325         integrate emit_dll_description's functionality.
1326
1327 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1328
1329         * linux-low.h (struct linux_target_ops) <delete_process>: New
1330         field.
1331         * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1332         * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1333         (struct linux_target_ops): Add delete_process callback.
1334         * linux-arm-low.c (arm_delete_process): New.
1335         (struct linux_target_ops): Add delete_process callback.
1336         * linux-bfin-low.c (struct linux_target_ops): Likewise.
1337         * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1338         * linux-m32r-low.c (struct linux_target_ops): Likewise.
1339         * linux-mips-low.c (mips_linux_delete_process): New.
1340         (struct linux_target_ops): Add delete_process callback.
1341         * linux-ppc-low.c (struct linux_target_ops): Likewise.
1342         * linux-s390-low.c (struct linux_target_ops): Likewise.
1343         * linux-sh-low.c (struct linux_target_ops): Likewise.
1344         * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1345         * linux-tile-low.c (struct linux_target_ops): Likewise.
1346         * linux-x86-low.c (x86_linux_delete_process): New.
1347         (struct linux_target_ops): Add delete_process callback.
1348         * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1349
1350 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1351
1352         * linux-aarch64-low.c (the_low_target): Add thread delete
1353         callback.
1354         * linux-arm-low.c (arm_delete_thread): New function.
1355         (the_low_target): Add thread delete callback.
1356         * linux-bfin-low.c (the_low_target): Likewise.
1357         * linux-crisv32-low.c (the_low_target): Likewise.
1358         * linux-low.c (delete_lwp): Invoke delete_thread callback if
1359         set.
1360         * linux-low.h (struct linux_target_ops) <delete_thread>: New
1361         field.
1362         * linux-m32r-low.c (the_low_target): Add thread delete callback.
1363         * linux-mips-low.c (mips_linux_delete_thread): New function.
1364         (the_low_target): Add thread delete callback.
1365         * linux-ppc-low.c (the_low_target): Likewise.
1366         * linux-s390-low.c (the_low_target): Likewise.
1367         * linux-sh-low.c (the_low_target): Likewise.
1368         * linux-tic6x-low.c (the_low_target): Likewise.
1369         * linux-tile-low.c (the_low_target): Likewise.
1370         * linux-x86-low.c (the_low_target): Likewise.
1371         * linux-xtensa-low.c (the_low_target): Likewise.
1372
1373 2017-10-06  Yuanhui Zhang  <asmwarrior@gmail.com>
1374
1375         * win32-low.c: Include "common-inferior.h".
1376
1377 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1378
1379         * inferiors.c (set_inferior_cwd): New function.
1380         * server.c (handle_general_set): Handle QSetWorkingDir packet.
1381         (handle_query): Inform that QSetWorkingDir is supported.
1382         * win32-low.c (create_process): Pass the inferior's cwd to
1383         CreateProcess.
1384
1385 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1386
1387         * inferiors.c (current_inferior_cwd): New global variable.
1388         (get_inferior_cwd): New function.
1389         * inferiors.h (struct process_info) <cwd>: New field.
1390
1391 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1392
1393         * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1394         (OBS): Add gdb_tilde_expand.o.
1395
1396 2017-10-02  Simon Marchi  <simon.marchi@ericsson.com>
1397
1398         * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1399         * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1400
1401 2017-09-29  Pedro Alves  <palves@redhat.com>
1402
1403         * ax.c (gdb_parse_agent_expr): Constify.
1404         * ax.h (gdb_parse_agent_expr): Constify.
1405         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1406         Constify.
1407         * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1408         * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1409         * remote-utils.h (read_ptid): Constify.
1410         * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1411         (process_point_options, process_serial_event): Constify.
1412         * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1413         (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1414         (cmd_qtbuffer): Constify.
1415
1416 2017-09-29  Pedro Alves  <palves@redhat.com>
1417
1418         * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1419         fails.
1420
1421 2017-09-29  Pedro Alves  <palves@redhat.com>
1422
1423         * linux-low.c (handle_extended_wait): Pass parent thread instead
1424         of process to thread_db_notice_clone.
1425         * linux-low.h (thread_db_notice_clone): Replace parent process
1426         parameter with parent thread parameter.
1427         * thread-db.c (find_one_thread): Add comment.
1428         (thread_db_notice_clone): Replace parent process parameter with
1429         parent thread parameter.  Temporarily switch to the parent thread.
1430
1431 2017-09-26  Sergio Durigan Junior  <sergiodj@redhat.com>
1432
1433         * gdbthread.h: Include "common-gdbthread.h".
1434         * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1435         "if" when validating the ptid.
1436         * remote-utils.c: Include "gdbthread.h".
1437         (prepare_resume_reply): Use "switch_to_thread".
1438         * target.c (done_accessing_memory): Likewise.
1439
1440 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1441
1442         * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1443         s390x-gs-linux64.o to srv_regobj.  Add s390-gs-linux64.xml,
1444         s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1445         srv_xmlfiles.  Add s390-gs-linux64-ipa.o and
1446         s390x-gs-linux64-ipa.o to ipa_obj.
1447         * linux-s390-low.c (HWCAP_S390_GS): New define.
1448         (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1449         New functions.
1450         (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1451         (s390_arch_setup): Check for guarded-storage support and choose
1452         appropriate tdesc.
1453         (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1454         init_registers_s390x_gs_linux64.
1455         * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1456         enum value.
1457         (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1458         (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1459
1460 2017-09-22  Simon Marchi  <simon.marchi@ericsson.com>
1461
1462         * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1463
1464 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1465
1466         * linux-low.h (struct lwp_info): Add new field, thread_handle.
1467         (thread_db_thread_handle): Declare.
1468         * linux-low.c (linux_target_ops): Initialize thread_handle.
1469         * server.c (handle_qxfer_threads_worker): Add support for
1470         "handle" attribute.
1471         * target.h (struct target_ops): Add new function pointer,
1472         thread_handle.
1473         (target_thread_handle): Define.
1474         * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1475         field in lwp.
1476         (thread_db_thread_handle): New function.
1477
1478 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1479
1480         * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1481         * linux-low.h (thread_db_notice_clone): Declare.
1482         * thread-db.c (thread_db_notice_clone): New function.
1483
1484 2017-09-21  Pedro Alves  <palves@redhat.com>
1485
1486         * server.c (gdb_read_memory, handle_status, process_serial_event)
1487         (handle_serial_event, handle_target_event): Adjust to
1488         set_desired_thread prototype change.
1489         * target.c (set_desired_thread): Remove 'use_general' parameter
1490         and adjust.
1491         * target.h (set_desired_thread): Remove 'use_general' parameter.
1492
1493 2017-09-20  Tom Tromey  <tom@tromey.com>
1494
1495         * target.c (target_terminal::terminal_state): Define.
1496         (target_terminal::init): Rename from target_terminal_init.
1497         (target_terminal::inferior): Rename from
1498         target_terminal_inferior.
1499         (target_terminal::ours): Rename from target_terminal_ours.
1500         (target_terminal::ours_for_output, target_terminal::info): New.
1501
1502 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1503
1504         * server.c (accumulate_file_name_length): Remove.
1505         (emit_dll_description): Adjust to std::string change.
1506         (handle_qxfer_libraries): Use std::string to hold document.
1507
1508 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1509
1510         * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1511         return type of xml_escape_text.
1512         * server.c (emit_dll_description): Likewise.
1513
1514 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1515
1516         * server.c (captured_main): Accept argument for --selftest.
1517         Update run_tests call.
1518         * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1519         when registering selftests.
1520
1521 2017-09-16  Sergio Durigan Junior  <sergiodj@redhat.com>
1522
1523         * regcache.c (get_thread_regcache): Update code to use "std::vector"
1524         instead of "VEC" for "target_desc.reg_defs".
1525         (regcache_cpy): Likewise.
1526         (registers_to_string): Likewise.
1527         (registers_from_string): Likewise.
1528         (find_regno): Likewise.
1529         (supply_regblock): Likewise.
1530         (regcache_raw_read_unsigned): Likewise.
1531         * tdesc.c (init_target_desc): Likewise.
1532         (tdesc_create_reg): Likewise.
1533         * tdesc.h: Remove declaration of "tdesc_reg_p".  Include <vector>.
1534         (struct target_desc) <reg_defs>: Convert to "std::vector".
1535         (target_desc): Do not initialize "reg_defs".
1536         (~target_desc): Update code to use "std::vector" instead of "VEC"
1537         for "target_desc.reg_defs".
1538         (operator==): Likewise.
1539
1540 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1541
1542         * inferiors.h (thread_to_gdb_id): Remove.
1543         * inferiors.c (thread_to_gdb_id): Remove.
1544         * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1545         * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1546         lynx_store_registers, lynx_read_memory, lynx_write_memory):
1547         Likewise.
1548         * nto-low.c (nto_fetch_registers, nto_store_registers,
1549         nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1550
1551 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1552
1553         * inferiors.h (gdb_id_to_thread_id): Remove.
1554         * inferiors.c (gdb_id_to_thread_id): Remove.
1555         * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1556         removal.  Move pid declaration closer to where it's used.
1557
1558 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1559
1560         * server.c (handle_detach): New function.
1561         (process_serial_event): Move code out, call handle_detach.
1562
1563 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1564
1565         * server.c (require_running): Rename to ...
1566         (require_running_or_return): ... this ...
1567         (require_running_or_break): ... and this.
1568         (handle_query, process_serial_event): Adjust.
1569
1570 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1571
1572         * linux-low.c (linux_set_resume_request): Remove unused
1573         variables.
1574
1575 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1576
1577         * server.c (first_thread_of): Remove.
1578         (process_serial_event): Replace usage of first_thread_of with
1579         find_any_thread_of_pid.
1580         * tracepoint.c (same_process_p): Remove.
1581         (gdb_agent_about_to_close): Replace usage of same_process_p with
1582         find_any_thread_of_pid.
1583         * linux-x86-low.c (same_process_callback): Remove.
1584         (x86_arch_setup_process_callback): Replace usage of
1585         same_process_callback with find_any_thread_of_pid.
1586         * thread-db.c (any_thread_of): Remove.
1587         (switch_to_process): Replace usage of any_thread_of with
1588         find_any_thread_of_pid.
1589         * inferiors.c (thread_pid_matches_callback): Remove.
1590         (find_thread_process): Adjust to use find_any_thread_of_pid.
1591
1592 2017-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1593
1594         * regcache.c (get_thread_regcache): Guard calls to "memset"
1595           with "!VEC_empty".
1596
1597 2017-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1598
1599         * linux-low.c (handle_extended_wait): Use
1600         "allocate_target_description" instead of "XNEW".
1601         * linux-x86-low.c (initialize_low_arch): Likewise.
1602
1603 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1604
1605         * configure.srv (srv_i386_regobj): Remove.
1606         (srv_amd64_regobj): Remove.
1607         (srv_regobj): Set it to "" for x86 non-linux targets.
1608         * linux-x86-tdesc.c (i386_linux_read_description):
1609         * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1610         (init_registers_i386): Remove the declaration.
1611         (tdesc_i386): Remove the declaration.
1612         (lynx_i386_arch_setup): Call i386_create_target_description.
1613         * nto-x86-low.c: Likewise.
1614         * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1615         [!__x86_64__]: include arch/i386.h.
1616         (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1617
1618 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1619
1620         * configure.srv (srv_amd64_linux_xmlfiles): Remove
1621         i386/amd64-XXX-linux from it.
1622
1623 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1624
1625         * configure.srv: Empty srv_amd64_linux_regobj if $development is
1626         false.
1627         (ipa_amd64_linux_regobj): Remove.
1628         (ipa_x32_linux_regobj): Remove.
1629
1630 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1631
1632         * Makefile.in (arch-amd64.o): New rule.
1633         * configure.srv: Append arch-amd64.o.
1634         * linux-amd64-ipa.c: Include common/x86-xstate.h.
1635         (get_ipa_tdesc): Call amd64_linux_read_description.
1636         (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1637         and init_registers_amd64_XXX.
1638         * linux-x86-low.c (x86_linux_read_description): Call
1639         amd64_linux_read_description.
1640         (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1641         (initialize_low_arch): Don't call init_registers_x32_XXX and
1642         init_registers_amd64_XXX.
1643         * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1644         and tdesc_amd64_XXX.
1645         [__x86_64__] (amd64_tdesc_test): New function.
1646         (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1647         and init_registers_amd64_XXX.
1648         * linux-x86-tdesc.c: Include arch/amd64.h.
1649         (xcr0_to_tdesc_idx): New function.
1650         (i386_linux_read_description): New function.
1651         (amd64_get_ipa_tdesc_idx): New function.
1652         * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1653         (amd64_get_ipa_tdesc): Declare.
1654
1655 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1656
1657         * configure.srv (srv_i386_linux_xmlfiles): Remove
1658         i386/i386-XXX-linux.xml from it.
1659
1660 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1661
1662         * configure.srv: Set srv_i386_linux_regobj empty if $development
1663         is false.
1664         * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1665         initialize_low_tdesc.
1666         * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1667         with #if initialize_low_tdesc.
1668         * linux-x86-tdesc-selftest.c: New file.
1669         * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1670
1671 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1672
1673         * Makefile.in (arch-i386.o): New rule.
1674         * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1675         (x86_64-*-linux*): Likewise.
1676         * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1677         include arch/i386.h.
1678         (i386_linux_read_description): Remove code and call
1679         i386_create_target_description.
1680         * tdesc.c (allocate_target_description): New function.
1681         * tdesc.h (set_tdesc_architecture): Remove declaration.
1682         (set_tdesc_osabi): Likewise.
1683
1684 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1685
1686         * linux-x86-tdesc.c: Don't include <inttypes.h>.
1687         (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1688         set_tdesc_architecture and set_tdesc_osabi.  Remove code setting
1689         .xmltarget.
1690         * server.c (get_features_xml): Call tdesc_get_features_xml.
1691         * tdesc.c (set_tdesc_architecture): New function.
1692         (set_tdesc_osabi): New function.
1693         (tdesc_get_features_xml): New function.
1694         (tdesc_create_feature): Add an argument.
1695         * tdesc.h (struct target_desc) <features>: New field.
1696         <arch, osabi>: New field.
1697         (~target_desc): xfree features, arch, and osabi.
1698         (target_desc::oerator==): Don't compare .xmltarget.
1699         [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1700         (set_tdesc_osabi): Likewise.
1701         (tdesc_get_features_xml): Likewise.
1702
1703 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1704
1705         * linux-x86-tdesc.c: Include selftest.h.
1706         (i386_tdesc_test): New function.
1707         (initialize_low_tdesc): Call selftests::register_test.
1708         * tdesc.h: Include regdef.h.
1709         (target_desc): Override operator == and !=.
1710
1711 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1712
1713         * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1714         (ipa_obj): Likewise.
1715         * linux-i386-ipa.c: Include common/x86-xstate.h
1716         (get_ipa_tdesc): Call i386_linux_read_description.
1717         (initialize_low_tracepoint): Don't call  init_registers_XXX
1718         functions, call initialize_low_tdesc instead.
1719         * linux-x86-low.c (x86_linux_read_description): Call
1720         i386_linux_read_description.
1721         (initialize_low_arch): Don't call init_registers_i386_XXX
1722         functions, call initialize_low_tdesc.
1723         * linux-x86-tdesc.c: New file.
1724         * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1725         (i386_get_ipa_tdesc_idx): Declare.
1726         (i386_get_ipa_tdesc): Declare.
1727         (initialize_low_tdesc): Declare.
1728
1729 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1730
1731         * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1732         instead of 0.
1733
1734 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1735
1736         * Makefile.in (IPA_OBJS): Add vec-ipa.o
1737         * regcache.c (get_thread_regcache): Use VEC_length.
1738         (init_register_cache): Likewise.
1739         (regcache_cpy): Likewise.
1740         (registers_to_string): Iterate reg_defs via VEC_iterate.
1741         (find_regno): Likewise.
1742         (find_register_by_number): Use VEC_index.
1743         (register_size): Call find_register_by_number.
1744         (register_data): Call find_register_by_number.
1745         (supply_regblock): Use VEC_length.
1746         (regcache_raw_read_unsigned): Likewise.
1747         * tdesc.c (init_target_desc): Iterate reg_defs via
1748         VEC_iterate.
1749         (default_description): Update initializer.
1750         (copy_target_description): Don't update field num_registers.
1751         * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1752         <num_registers>: Remove.
1753
1754 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
1755
1756         * Makefile.in (.SECONDARY): Define target.
1757
1758 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
1759
1760         * linux-low.c (linux_wait_1): Adjust.
1761         * server.c (queue_stop_reply_callback): Adjust.
1762
1763 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1764
1765         * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1766         QEnvironmentUnset and QEnvironmentReset packets.
1767         (handle_query): Inform remote that QEnvironmentHexEncoded,
1768         QEnvironmentUnset and QEnvironmentReset are supported.
1769
1770 2017-08-25  Simon Marchi  <simon.marchi@ericsson.com>
1771
1772         * inferiors.h (inferior_target_data): Rename to ...
1773         (thread_target_data): ... this.
1774         (inferior_regcache_data): Rename to ...
1775         (thread_regcache_data): ... this.
1776         (set_inferior_regcache_data): Rename to ...
1777         (set_thread_regcache_data): ... this.
1778         * inferiors.c (inferior_target_data): Rename to ...
1779         (thread_target_data): ... this.
1780         (inferior_regcache_data): Rename to ...
1781         (thread_regcache_data): ... this.
1782         (set_inferior_regcache_data): Rename to ...
1783         (set_thread_regcache_data): ... this.
1784         (free_one_thread): Update.
1785         * linux-low.h (get_thread_lwp): Update.
1786         * regcache.c (get_thread_regcache): Update.
1787         (regcache_invalidate_thread): Update.
1788         (free_register_cache_thread): Update.
1789         * win32-i386-low.c (update_debug_registers_callback): Update.
1790         (win32_get_current_dr): Update.
1791         * win32-low.c (thread_rec): Update.
1792         (delete_thread_info): Update.
1793         (continue_one_thread): Update.
1794         (suspend_one_thread): Update.
1795
1796 2017-08-24  Simon Marchi  <simon.marchi@ericsson.com>
1797
1798         * inferiors.c (set_inferior_target_data): Remove.
1799         * inferiors.h (set_inferior_target_data): Remove.
1800
1801 2017-08-18  Yao Qi  <yao.qi@linaro.org>
1802
1803         * Makefile.in (OBS): Add selftest.o.
1804         * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1805         * configure, config.in: Re-generated.
1806         * server.c: Include common/sefltest.h.
1807         (captured_main): Handle option --selftest.
1808
1809 2017-08-09  Yao Qi  <yao.qi@linaro.org>
1810
1811         * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1812         i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1813         i386-avx-mpx.o and i386-mmx.o.
1814         (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1815         amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1816         (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1817         i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1818         i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1819         (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1820         i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1821         i386/amd64-avx-mpx.xml.
1822
1823 2017-08-09  Yao Qi  <yao.qi@linaro.org>
1824
1825         * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1826         and x32-avx-avx512.o.
1827         (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1828         i386/x32-avx-avx512.xml.
1829
1830 2017-07-26  Simon Marchi  <simon.marchi@ericsson.com>
1831
1832         * tracepoint.h (enum class fast_tpoint_collect_result): New
1833         enumeration.
1834         (fast_tracepoint_collecting): Change return type to
1835         fast_tpoint_collect_result.
1836         * tracepoint.c (fast_tracepoint_collecting): Likewise.
1837         * linux-low.h: Include tracepoint.h.
1838         (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1839         fast_tpoint_collect_result.
1840         * linux-low.c (handle_tracepoints): Adjust.
1841         (linux_fast_tracepoint_collecting): Change return type to
1842         fast_tpoint_collect_result.
1843         (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1844         linux_wait_1, stuck_in_jump_pad_callback,
1845         lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1846         proceed_one_lwp): Adjust to type change.
1847
1848 2017-07-10  Yao Qi  <yao.qi@linaro.org>
1849
1850         * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1851
1852 2017-06-29  Yao Qi  <yao.qi@linaro.org>
1853
1854         * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1855         Remove.
1856         [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1857
1858 2017-06-20  Simon Marchi  <simon.marchi@ericsson.com>
1859
1860         * Makefile.in (IPA_OBJS): Sort and format one item per line.
1861
1862 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
1863
1864         * linux-low.c (linux_create_inferior): Adjust code to access the
1865         environment information via 'gdb_environ' class.
1866         * lynx-low.c (lynx_create_inferior): Likewise.
1867         * server.c (our_environ): Make it an instance of 'gdb_environ'.
1868         (get_environ): Return a pointer to 'our_environ'.
1869         (captured_main): Initialize 'our_environ'.
1870         * server.h (get_environ): Adjust prototype.
1871         * spu-low.c (spu_create_inferior): Adjust code to access the
1872         environment information via 'gdb_environ' class.
1873
1874 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
1875
1876         * linux-low.c (linux_read_memory, linux_write_memory): Remove
1877         usage of "register" keyword.
1878
1879 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
1880
1881         * configure: Re-generate.
1882
1883 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
1884
1885         * configure: Re-generate.
1886
1887 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
1888
1889         * Makefile.in (COMPILE.pre): Add "-x c++".
1890
1891 2017-06-09  Sergio Durigan Junior  <sergiodj@redhat.com>
1892
1893         * fork-child.c: Conditionally include <signal.h>.
1894
1895 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
1896
1897         * server.c (handle_general_set): Handle new packet
1898         "QStartupWithShell".
1899         (handle_query): Add "QStartupWithShell" to the list of supported
1900         packets.
1901         (gdbserver_usage): Add help text explaining the
1902         new "--startup-with-shell" and "--no-startup-with-shell" CLI
1903         options.
1904         (captured_main): Recognize and act upon the presence of the new
1905         CLI options.
1906
1907 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
1908             Pedro Alves  <palves@redhat.com>
1909
1910         * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1911         * configure: Regenerate.
1912         * configure.srv (srv_linux_obj): Add "fork-child.o" and
1913         "fork-inferior.o".
1914         (i[34567]86-*-lynxos*): Likewise.
1915         (spu*-*-*): Likewise.
1916         * fork-child.c: New file.
1917         * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1918         and "environ.h".
1919         (linux_ptrace_fun): New function.
1920         (linux_create_inferior): Adjust function prototype to reflect
1921         change on "target.h".  Adjust function code to use
1922         "fork_inferior".
1923         (linux_request_interrupt): Delete "signal_pid".
1924         * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1925         (lynx_ptrace_fun): New function.
1926         (lynx_create_inferior): Adjust function prototype to reflect
1927         change on "target.h".  Adjust function code to use
1928         "fork_inferior".
1929         * nto-low.c (nto_create_inferior): Adjust function prototype and
1930         code to reflect change on "target.h".  Update comments.
1931         * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1932         "common-terminal.h" and "environ.h".
1933         (terminal_fd): Moved to fork-child.c.
1934         (old_foreground_pgrp): Likewise.
1935         (restore_old_foreground_pgrp): Likewise.
1936         (last_status): Make it global.
1937         (last_ptid): Likewise.
1938         (our_environ): New variable.
1939         (startup_with_shell): Likewise.
1940         (program_name): Likewise.
1941         (program_argv): Rename to...
1942         (program_args): ...this.
1943         (wrapper_argv): New variable.
1944         (start_inferior): Delete function.
1945         (get_exec_wrapper): New function.
1946         (get_exec_file): Likewise.
1947         (get_environ): Likewise.
1948         (prefork_hook): Likewise.
1949         (post_fork_inferior): Likewise.
1950         (postfork_hook): Likewise.
1951         (postfork_child_hook): Likewise.
1952         (handle_v_run): Update code to deal with arguments coming from the
1953         remote host.  Update calls from "start_inferior" to
1954         "create_inferior".
1955         (captured_main): Likewise.  Initialize environment variable.  Call
1956         "have_job_control".
1957         * server.h (post_fork_inferior): New prototype.
1958         (get_environ): Likewise.
1959         (last_status): Declare.
1960         (last_ptid): Likewise.
1961         (signal_pid): Likewise.
1962         * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1963         (spu_ptrace_fun): New function.
1964         (spu_create_inferior): Adjust function prototype to reflect change
1965         on "target.h".  Adjust function code to use "fork_inferior".
1966         * target.c (target_terminal_init): New function.
1967         (target_terminal_inferior): Likewise.
1968         (target_terminal_ours): Likewise.
1969         * target.h: Include <vector>.
1970         (struct target_ops) <create_inferior>: Update prototype.
1971         (create_inferior): Update macro.
1972         * utils.c (gdb_flush_out_err): New function.
1973         * win32-low.c (win32_create_inferior): Adjust function prototype
1974         and code to reflect change on "target.h".
1975
1976 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
1977
1978         * inferiors.c (switch_to_thread): New function.
1979
1980 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
1981
1982         * Makefile.in (SFILE): Add "common/job-control.c".
1983         (OBS): Add "job-control.o".
1984
1985 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
1986
1987         * Makefile: Remove "@host_makefile_frag@".
1988
1989 2017-05-05  Pedro Alves  <palves@redhat.com>
1990
1991         * configure: Regenerate.
1992
1993 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
1994
1995         * configure: Regenerate.
1996
1997 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
1998
1999         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2000         software_single_step change of return type to
2001         std::vector<CORE_ADDR>.
2002         * linux-low.c (install_software_single_step_breakpoints):
2003         Likewise.
2004         * linux-low.h (install_software_single_step_breakpoints):
2005         Likewise.
2006
2007 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2008
2009         * remote-utils.c: Include "gdb_termios.h" instead of
2010         "terminal.h".
2011         * terminal.h: Delete file.
2012
2013 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2014
2015         * server.c: Include <vector>.
2016         <program_argv, wrapper_argv>: Convert to std::vector.
2017         (start_inferior): Rewrite function to use C++.
2018         (handle_v_run): Likewise.  Update code that calculates the argv
2019         based on the vRun packet; use C++.
2020         (captured_main): Likewise.
2021
2022 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
2023
2024         * server.c (handle_v_cont): Initialize thread_resume::thread
2025         with null_ptid.
2026
2027 2017-04-05  Pedro Alves  <palves@redhat.com>
2028
2029         * configure: Regenerate.
2030
2031 2017-04-05  Pedro Alves  <palves@redhat.com>
2032
2033         * gdbreplay.c (sync_error): Constify.
2034         * linux-x86-low.c (push_opcode): Constify.
2035
2036 2017-04-05  Pedro Alves  <palves@redhat.com>
2037
2038         * win32-low.c (get_child_debug_event)
2039         <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2040         Report TARGET_WAITKIND_SPURIOUS instead.
2041
2042 2017-04-05  Pedro Alves  <palves@redhat.com>
2043
2044         * remote-utils.c (remote_prepare, remote_open): Constify.
2045         * remote-utils.h (remote_prepare, remote_open): Constify.
2046         * server.c (captured_main): Constify 'port' handling.
2047
2048 2017-04-04  Simon Marchi  <simon.marchi@ericsson.com>
2049
2050         * Makefile.in (clean): Clear .deps.
2051
2052 2017-03-31  Simon Marchi  <simon.marchi@polymtl.ca>
2053
2054         * .gitignore: Remove generated files, replace with wildcard.
2055         * (clean): Replace removal of generated files with wildcard.
2056         (version.c): Replace with...
2057         (version-generated.c): ...this.
2058         (xml-builtin.c): Replace with...
2059         (xml-builtin-generated.c): ...this.
2060         (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2061         (%.c: *regformats*): Replace with...
2062         (%-generated.c: *regformats*): ...this.
2063
2064 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
2065
2066         * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2067         (xtensa_fill_gregset): Call collect_register_by_name for
2068         threadptr register.
2069         (xtensa_store_gregset): Call supply_register_by_name for
2070         threadptr register.
2071
2072 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
2073
2074         * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2075         for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2076         (xtensa_store_gregset): Call supply_register for all registers in
2077         a0_regnum..a0_regnum + C0_NREGS range.
2078
2079 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
2080
2081         * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2082         (ax-ipa.o: ax.c): Remove.
2083         (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2084         (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2085         (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2086         (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2087         (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2088
2089 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
2090
2091         * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2092         (print-utils-ipa.o: ../common/print-utils.c): Remove.
2093         (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2094         (errors-ipa.o: ../common/errors.c): Remove.
2095         (format-ipa.o: ../common/format.c): Remove.
2096         (common-utils-ipa.o: ../common/common-utils.c): Remove.
2097
2098 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
2099
2100         * Makefile.in (%-ipa.o: %.c): New rule.
2101         (tracepoint-ipa.o: tracepoint.c): Remove.
2102         (utils-ipa.o: utils.c): Remove.
2103         (remote-utils-ipa.o: remote-utils.c): Remove.
2104         (regcache-ipa.o: regcache.c): Remove.
2105         (i386-linux-ipa.o: i386-linux.c): Remove.
2106         (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2107         (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2108         (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2109         (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2110         (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2111         (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2112         (amd64-linux-ipa.o: amd64-linux.c): Remove.
2113         (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2114         (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2115         (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2116         (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2117         (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2118         (aarch64-ipa.o: aarch64.c): Remove.
2119         (s390-linux32-ipa.o: s390-linux32.c): Remove.
2120         (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2121         (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2122         (s390-linux64-ipa.o: s390-linux64.c): Remove.
2123         (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2124         (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2125         (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2126         (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2127         (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2128         (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2129         (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2130         (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2131         (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2132         (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2133         (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2134         (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2135         (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2136         (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2137         (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2138         (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2139         (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2140         (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2141         (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2142         (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2143         (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2144         (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2145         (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2146         (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2147         (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2148         (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2149         (tdesc-ipa.o: tdesc.c): Remove.
2150         (x32-linux-ipa.o: x32-linux.c): Remove.
2151         (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2152         (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2153
2154 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
2155
2156         * Makefile.in (%.o: ../arch/%.c): New rule.
2157         (arm.o: ../arch/arm.c): Remove.
2158         (arm-linux.o: ../arch/arm-linux.c): Remove.
2159         (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2160         (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2161
2162 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
2163
2164         * Makefile.in (%.o: ../nat/%.c): New rule.
2165         (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2166         (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2167         (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2168         (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2169         (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2170         (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2171         (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2172         (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2173         (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2174         (linux-personality.o: ../nat/linux-personality.c): Remove.
2175         (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2176         (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2177         (x86-linux.o: ../nat/x86-linux.c): Remove.
2178         (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2179         (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2180
2181 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
2182
2183         * Makefile.in (%.o: ../common/%.c): New rule.
2184         (signals.o: ../common/signals.c): Remove.
2185         (print-utils.o: ../common/print-utils.c): Remove.
2186         (rsp-low.o: ../common/rsp-low.c): Remove.
2187         (common-utils.o: ../common/common-utils.c): Remove.
2188         (posix-strerror.o: ../common/posix-strerror.c): Remove.
2189         (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2190         (vec.o: ../common/vec.c): Remove.
2191         (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2192         (xml-utils.o: ../common/xml-utils.c): Remove.
2193         (ptid.o: ../common/ptid.c): Remove.
2194         (buffer.o: ../common/buffer.c): Remove.
2195         (format.o: ../common/format.c): Remove.
2196         (filestuff.o: ../common/filestuff.c): Remove.
2197         (agent.o: ../common/agent.c): Remove.
2198         (errors.o: ../common/errors.c): Remove.
2199         (environ.o: ../common/environ.c): Remove.
2200         (common-debug.o: ../common/common-debug.c): Remove.
2201         (cleanups.o: ../common/cleanups.c): Remove.
2202         (common-exceptions.o: ../common/common-exceptions.c): Remove.
2203         (fileio.o: ../common/fileio.c): Remove.
2204         (common-regcache.o: ../common/common-regcache.c): Remove.
2205         (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2206         (new-op.o: ../common/new-op.c): Remove.
2207         (btrace-common.o: ../common/btrace-common.c): Remove.
2208
2209 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
2210
2211         * Makefile.in (%.o: ../target/%.c): New rule.
2212         (waitstatus.o: ../target/waitstatus.c): Remove.
2213
2214 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
2215
2216         * Makefile.in
2217         (%.c: ../regformats/%.dat,
2218         (%.c: ../regformats/arm/%.dat,
2219         (%.c: ../regformats/i386/%.dat,
2220         (%.c: ../regformats/rs6000/%.dat): New rules.
2221         (aarch64.c): Remove.
2222         (reg-arm.c): Remove.
2223         (arm-with-iwmmxt.c): Remove.
2224         (arm-with-vfpv2.c): Remove.
2225         (arm-with-vfpv3.c): Remove.
2226         (arm-with-neon.c): Remove.
2227         (reg-bfin.c): Remove.
2228         (reg-cris.c): Remove.
2229         (reg-crisv32.c): Remove.
2230         (i386.c): Remove.
2231         (i386-linux.c): Remove.
2232         (i386-avx.c): Remove.
2233         (i386-avx-linux.c): Remove.
2234         (i386-avx-avx512.c): Remove.
2235         (i386-avx-avx512-linux.c): Remove.
2236         (i386-mpx.c): Remove.
2237         (i386-mpx-linux.c): Remove.
2238         (i386-avx-mpx-avx512-pku.c): Remove.
2239         (i386-avx-mpx-avx512-pku-linux.c): Remove.
2240         (i386-avx-mpx.c): Remove.
2241         (i386-avx-mpx-linux.c): Remove.
2242         (i386-mmx.c): Remove.
2243         (i386-mmx-linux.c): Remove.
2244         (reg-ia64.c): Remove.
2245         (reg-m32r.c): Remove.
2246         (reg-m68k.c): Remove.
2247         (reg-cf.c): Remove.
2248         (mips-linux.c): Remove.
2249         (mips-dsp-linux.c): Remove.
2250         (mips64-linux.c): Remove.
2251         (mips64-dsp-linux.c): Remove.
2252         (nios2-linux.c): Remove.
2253         (powerpc-32.c): Remove.
2254         (powerpc-32l.c): Remove.
2255         (powerpc-altivec32l.c): Remove.
2256         (powerpc-cell32l.c): Remove.
2257         (powerpc-vsx32l.c): Remove.
2258         (powerpc-isa205-32l.c): Remove.
2259         (powerpc-isa205-altivec32l.c): Remove.
2260         (powerpc-isa205-vsx32l.c): Remove.
2261         (powerpc-e500l.c): Remove.
2262         (powerpc-64l.c): Remove.
2263         (powerpc-altivec64l.c): Remove.
2264         (powerpc-cell64l.c): Remove.
2265         (powerpc-vsx64l.c): Remove.
2266         (powerpc-isa205-64l.c): Remove.
2267         (powerpc-isa205-altivec64l.c): Remove.
2268         (powerpc-isa205-vsx64l.c): Remove.
2269         (s390-linux32.c): Remove.
2270         (s390-linux32v1.c): Remove.
2271         (s390-linux32v2.c): Remove.
2272         (s390-linux64.c): Remove.
2273         (s390-linux64v1.c): Remove.
2274         (s390-linux64v2.c): Remove.
2275         (s390-te-linux64.c): Remove.
2276         (s390-vx-linux64.c): Remove.
2277         (s390-tevx-linux64.c): Remove.
2278         (s390x-linux64.c): Remove.
2279         (s390x-linux64v1.c): Remove.
2280         (s390x-linux64v2.c): Remove.
2281         (s390x-te-linux64.c): Remove.
2282         (s390x-vx-linux64.c): Remove.
2283         (s390x-tevx-linux64.c): Remove.
2284         (tic6x-c64xp-linux.c): Remove.
2285         (tic6x-c64x-linux.c): Remove.
2286         (tic6x-c62x-linux.c): Remove.
2287         (reg-sh.c): Remove.
2288         (reg-sparc64.c): Remove.
2289         (reg-spu.c): Remove.
2290         (amd64.c): Remove.
2291         (amd64-linux.c): Remove.
2292         (amd64-avx.c): Remove.
2293         (amd64-avx-linux.c): Remove.
2294         (amd64-avx-avx512.c): Remove.
2295         (amd64-avx-avx512-linux.c): Remove.
2296         (amd64-mpx.c): Remove.
2297         (amd64-mpx-linux.c): Remove.
2298         (amd64-avx-mpx-avx512-pku.c): Remove.
2299         (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2300         (amd64-avx-mpx.c): Remove.
2301         (amd64-avx-mpx-linux.c): Remove.
2302         (x32.c): Remove.
2303         (x32-linux.c): Remove.
2304         (x32-avx.c): Remove.
2305         (x32-avx-linux.c): Remove.
2306         (x32-avx-avx512.c): Remove.
2307         (x32-avx-avx512-linux.c): Remove.
2308         (reg-xtensa.c): Remove.
2309         (reg-tilegx.c): Remove.
2310         (reg-tilegx32.c): Remove.
2311
2312 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
2313
2314         * Makefile.in (SFILES): Add "common/environ.c".
2315         (OBJS): Add "common/environ.h".
2316
2317 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2318
2319         * configure.ac: Check if the fs_base and gs_base members of
2320         `struct user_regs_struct' exist.
2321         * config.in: Regenerated.
2322         * configure: Likewise.
2323
2324 2017-01-09  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2325
2326         * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2327         target_read_memory.
2328         * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2329         (get_next_pcs_syscall_next_pc): Likewise.
2330
2331 2016-12-23  Luis Machado  <lgustavo@codesourcery.com>
2332
2333         * win32-i386-low.c: Fix incorrect reference to a couple source files.
2334         * nto-x86-low.c: Likewise.
2335
2336 2016-11-30  Simon Marchi  <simon.marchi@polymtl.ca>
2337
2338         * Makefile.in: Include disable-implicit-rules.mk.
2339
2340 2016-11-23  Pedro Alves  <palves@redhat.com>
2341
2342         * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2343         (debug_vprintf): Use std::chrono::steady_clock instead of
2344         gettimeofday.  Use '.' instead of ':'.
2345         * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2346         (get_timestamp): Use std::chrono::steady_clock instead of
2347         gettimeofday.
2348
2349 2016-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
2350
2351         * Makefile.in: Fix whitespace formatting.
2352
2353 2016-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
2354
2355         * Makefile.in (SFILES, OBS): Flatten list and order
2356         alphabetically.
2357
2358 2016-11-23  Pedro Alves  <palves@redhat.com>
2359
2360         * event-loop.c (handle_file_event): Use warning.
2361         * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2362         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2363         Use warning.
2364
2365 2016-11-23  Pedro Alves  <palves@redhat.com>
2366
2367         * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2368         output.
2369         * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2370         * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2371         debug_printf and debug_flush for debug output.
2372         * server.c (handle_general_set): Likewise.
2373         * thread-db.c (try_thread_db_load): Use debug_printf for debug
2374         output.
2375
2376 2016-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
2377
2378         * Makefile.in (.c.o): Replace rule with ...
2379         (%.o: %.c): ... this one.
2380
2381 2016-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
2382
2383         * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2384         prefixed with @GMAKE_FALSE@.  Update comment related to non-GNU
2385         make.
2386         * configure.ac: Remove checks for the make program.
2387         * configure: Re-generate.
2388
2389 2016-10-28  Pedro Alves  <palves@redhat.com>
2390
2391         * Makefile.in (CXX_DIALECT): Get from configure.
2392         (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2393         * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2394         * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2395         * config.in: Regenerate.
2396         * configure: Regenerate.
2397
2398 2016-10-27  Yao Qi  <yao.qi@linaro.org>
2399
2400         * linux-low.c (linux_supports_range_stepping): Return true if
2401         can_software_single_step return true.
2402
2403 2016-10-27  Yao Qi  <yao.qi@linaro.org>
2404
2405         * inferiors.c (find_inferior_in_random): New function.
2406         * inferiors.h (find_inferior_in_random): Declare.
2407         * linux-low.c (linux_wait_for_event_filtered): Call
2408         find_inferior_in_random instead of find_inferior.
2409
2410 2016-10-27  Yao Qi  <yao.qi@linaro.org>
2411
2412         * linux-low.c (linux_wait_1): If single-step breakpoints are
2413         inserted, remove them.
2414
2415 2016-10-26  Pedro Alves  <palves@redhat.com>
2416
2417         * linux-low.c (handle_extended_wait): Link parent/child fork
2418         threads.
2419         (linux_wait_1): Unlink them.
2420         (linux_set_resume_request): Ignore resume requests for
2421         already-resumed and unhandled fork child threads.
2422         * linux-low.h (struct lwp_info) <fork_relative>: New field.
2423         * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2424         New functions.
2425         (handle_v_requests) <vCont>: Don't call require_running.
2426         * server.h (in_queued_stop_replies): New declaration.
2427
2428 2016-10-24  Yao Qi  <yao.qi@linaro.org>
2429
2430         PR server/20733
2431         * linux-aarch64-low.c (append_insns): Cast the return value to
2432         'uint32_t *'.
2433
2434 2016-10-10  Yao Qi  <yao.qi@linaro.org>
2435
2436         * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2437
2438 2016-10-06  Sergio Durigan Junior  <sergiodj@redhat.com>
2439
2440         * target.c (target_supports_multi_process): New function, moved
2441         from...
2442         * target.h (target_supports_multi_process): ... here.  Remove
2443         macro.
2444
2445 2016-10-05  Tom Tromey  <tom@tromey.com>
2446
2447         PR remote/20655:
2448         * tracepoint.c (handle_tracepoint_bkpts): Check
2449         ipa_error_tracepoint, not ipa_stopping_tracepoint.
2450
2451 2016-10-05  Yao Qi  <yao.qi@linaro.org>
2452
2453         * configure.srv: Update the path of arm-*.xml files.
2454
2455 2016-10-05  Terry Guo  <terry.guo@arm.com>
2456             Yao Qi  <yao.qi@linaro.org>
2457
2458         * Makefile.in: Adjust the path of rules.
2459         * configure.srv: Update the path of xml files.
2460         * regformats/arm-with-iwmmxt.dat: Regenerated.
2461         * regformats/arm-with-neon.dat: Likewise.
2462         * regformats/arm-with-vfpv2.dat: Likewise.
2463         * regformats/arm-with-vfpv3.dat Likewise.
2464
2465 2016-09-30  Yao Qi  <yao.qi@linaro.org>
2466
2467         PR gdbserver/20627
2468         * target.c (target_stop_and_wait): Don't call
2469         target_continue_no_signal, use resume_stop instead.
2470
2471 2016-09-26  Yao Qi  <yao.qi@linaro.org>
2472
2473         * linux-low.c (linux_wait_1): Call debug_exit.
2474
2475 2016-09-23  Pedro Alves  <palves@redhat.com>
2476
2477         * Makefile.in (SFILES): Add common/new-op.c.
2478         (OBS): Add common/new-op.o.
2479         (new-op.o): New rule.
2480
2481 2016-09-21  Simon Marchi  <simon.marchi@ericsson.com>
2482
2483         * .gitinore: Ignore more files.
2484
2485 2016-09-21  Yao Qi  <yao.qi@linaro.org>
2486
2487         * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2488         23.
2489
2490 2016-09-19  Sergio Durigan Junior  <sergiodj@redhat.com>
2491
2492         * server.c (start_inferior): Call target_mourn_inferior instead of
2493         mourn_inferior; pass ptid_t argument to it.
2494         (resume): Likewise.
2495         (handle_target_event): Likewise.
2496         * target.c (target_mourn_inferior): New function.
2497         * target.h (mourn_inferior): Delete macro.
2498
2499 2016-09-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2500
2501         * linux-low.c (lwp_is_stepping): New function.
2502
2503 2016-09-06  Carl Love  <cel@us.ibm.com>
2504
2505         * server.c (start_inferior):  Fixed comment, requested comment change
2506         didn't get updated correctly.  Removed reference to ptrace () call as
2507         it is only true on Linux systems.
2508
2509 2016-09-06  Carl Love  <cel@us.ibm.com>
2510
2511         * server.c (start_inferior):  Do not call
2512         function target_post_create_inferior () if the
2513         inferior process has already exited.
2514
2515 2016-09-05  Pedro Alves  <palves@redhat.com>
2516
2517         * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2518         (COMPILE.pre, CC_LD): Use CXX directly.
2519         (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2520         * acinclude.m4: Don't include build-with-cxx.m4.
2521         * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2522         * configure: Regenerate.
2523
2524 2016-09-02  Akash Trehan  <akash.trehan123@gmail.com>
2525
2526         PR gdb/19495
2527         * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2528         call writing data to own_buf.
2529
2530 2016-09-01  Sergio Durigan Junior  <sergiodj@redhat.com>
2531
2532         * target.c (mywait): Call target_wait instead of
2533         the_target->wait.
2534         (target_wait): New function.
2535
2536 2016-09-01  Sergio Durigan Junior  <sergiodj@redhat.com>
2537
2538         * server.c (start_inferior): New variable 'ptid'.  Replace calls
2539         to the_target->resume by target_continue{,_no_signal}, depending
2540         on the case.
2541         * target.c (target_stop_and_wait): Call target_continue_no_signal
2542         instead of the_target->resume.
2543         (target_continue): New function.
2544
2545 2016-08-31  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2546
2547         * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2548
2549 2016-08-25  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2550
2551         PR server/20491
2552         * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2553         ps_prochandle.
2554         * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2555         * linux-arm-low.c (ps_get_thread_area): Likewise.
2556         * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2557         * linux-m68k-low.c (ps_get_thread_area): Likewise.
2558         * linux-mips-low.c (ps_get_thread_area): Likewise.
2559         * linux-nios2-low.c (ps_get_thread_area): Likewise.
2560         * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2561         * linux-x86-low.c (ps_get_thread_area): Likewise.
2562         * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2563
2564 2016-08-19  Pedro Alves  <palves@redhat.com>
2565
2566         * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2567
2568 2016-08-19  Pedro Alves  <palves@redhat.com>
2569
2570         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2571         comment.  Use memcpy instead of casting through unsigned long.
2572
2573 2016-08-19  Pedro Alves  <palves@redhat.com>
2574
2575         * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2576         allocating around 0x80000000.
2577
2578 2016-08-19  Pedro Alves  <palves@redhat.com>
2579
2580         PR gdb/20415
2581         * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2582         (x32-avx512-linux-ipa.o): New rules.
2583         * configure.ac (x86_64-*-linux*): New x32 check.
2584         * configure.srv (ipa_x32_linux_regobj): New.
2585         (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2586         * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2587         descriptions.
2588         (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2589         descriptions.
2590         * configure: Regenerate.
2591
2592 2016-08-09  Pedro Alves  <palves@redhat.com>
2593
2594         PR gdb/18653
2595         * Makefile.in (OBS): Add signals-state-save-restore.o.
2596         (signals-state-save-restore.o): New rule.
2597         * config.in: Regenerate.
2598         * configure: Regenerate.
2599         * linux-low.c: Include "signals-state-save-restore.h".
2600         (linux_create_inferior): Call
2601         restore_original_signals_state.
2602         * server.c: Include "dispositions-save-restore.h".
2603         (captured_main): Call save_original_signals_state.
2604
2605 2016-08-05  Pedro Alves  <palves@redhat.com>
2606
2607         * configure: Regenerate.
2608
2609 2016-08-04  Yao Qi  <yao.qi@linaro.org>
2610
2611         * linux-low.c (regsets_fetch_inferior_registers): Check
2612         errno is ESRCH or not.
2613
2614 2016-08-02  Yao Qi  <yao.qi@linaro.org>
2615
2616         * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2617         <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2618         (thread_db_load_search): Update.
2619         (try_thread_db_load_1): Don't look for td_ta_event_addr,
2620         td_ta_set_event and td_ta_event_getmsg.
2621
2622 2016-07-26  Pedro Alves  <palves@redhat.com>
2623
2624         PR server/20414
2625         * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2626         of unsigned long for 64-bit registers and use uint32_t instead of
2627         unsigned int for 32-bit registers.
2628
2629 2016-07-26  Pedro Alves  <palves@redhat.com>
2630
2631         * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2632         to 'ptrace'.
2633
2634 2016-07-21  Tom Tromey  <tom@tromey.com>
2635
2636         * configure: Rebuild.
2637
2638 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2639
2640         * mem-break.c (find_gdb_breakpoint): Cast bp to
2641         'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2642
2643 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2644
2645         * server.c (handle_v_requests): Support s and S actions
2646         if target_supports_software_single_step return true.
2647
2648 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2649
2650         * linux-low.c (resume_stopped_resumed_lwps): If resume request
2651         is resume_step, call maybe_hw_step.
2652         (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2653         and unstop them.
2654         (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2655         breakpoints or not.
2656         (proceed_one_lwp): If resume request is resume_step, install
2657         reinsert breakpoints and call maybe_hw_step.
2658
2659 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2660
2661         * linux-low.c (proceed_one_lwp): Declare.
2662         (linux_resume_one_thread): Remove local variable 'step'.
2663         Lift code enqueue signal.  Call proceed_one_lwp instead of
2664         linux_resume_one_lwp.
2665
2666 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2667
2668         * linux-low.c (linux_resume_one_thread): Call
2669         enqueue_pending_signal.
2670
2671 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2672
2673         * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2674         * inferiors.c (do_restore_current_thread_cleanup): New function.
2675         (make_cleanup_restore_current_thread): Likewise.
2676         * linux-low.c (install_software_single_step_breakpoints): Call
2677         make_cleanup_restore_current_thread.  Switch current_thread to
2678         thread.
2679
2680 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2681
2682         * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2683         (set_reinsert_breakpoint): New parameter ptid.  Callers updated.
2684         (clone_one_breakpoint): Likewise.
2685         (delete_reinsert_breakpoints): Change parameter to thread.
2686         Callers updated.
2687         (has_reinsert_breakpoints): Likewise.
2688         (uninsert_reinsert_breakpoints): Likewise.
2689         (reinsert_reinsert_breakpoints): Likewise.
2690         * mem-break.h (set_reinsert_breakpoint): Update declaration.
2691         (delete_reinsert_breakpoints): Likewise.
2692         (reinsert_reinsert_breakpoints): Likewise.
2693         (uninsert_reinsert_breakpoints): Likewise.
2694         (has_reinsert_breakpoints): Likewise.
2695
2696 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2697
2698         * inferiors.c (get_thread_process): Make parameter const.
2699         * inferiors.h (get_thread_process): Update declaration.
2700         * mem-break.c (clone_all_breakpoints): Remove all parameters.
2701         Add new parameters child_thread and parent_thread.  Callers
2702         updated.
2703         * mem-break.h (clone_all_breakpoints): Update declaration.
2704
2705 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2706
2707         * mem-break.c (struct breakpoint) <cond_list>: Remove.
2708         <command_list, handler>: Remove.
2709         (struct gdb_breakpoint): New.
2710         (struct other_breakpoint): New.
2711         (struct reinsert_breakpoint): New.
2712         (is_gdb_breakpoint): New function.
2713         (any_persistent_commands): Update command_list if
2714         is_gdb_breakpoint returns true.
2715         (set_breakpoint): Create breakpoints according to their types.
2716         (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2717         (set_gdb_breakpoint_1): Likewise.
2718         (set_gdb_breakpoint): Likewise.
2719         (clear_breakpoint_conditions): Change parameter type to
2720         'struct gdb_breakpoint *'.
2721         (clear_breakpoint_commands): Likewise.
2722         (clear_breakpoint_conditions_and_commands): Likewise.
2723         (add_condition_to_breakpoint): Likewise.
2724         (add_breakpoint_condition): Likewise.
2725         (add_commands_to_breakpoint): Likewise.
2726         (check_breakpoints): Check other_breakpoint.
2727         (clone_one_breakpoint): Clone breakpopint according to its type.
2728         * mem-break.h (struct gdb_breakpoint): Declare.
2729         (set_gdb_breakpoint): Update declaration.
2730         (clear_breakpoint_conditions_and_commands): Likewise.
2731         (add_breakpoint_condition): Likewise.
2732         (add_breakpoint_commands): Likewise.
2733         * server.c (process_point_options): Change parameter type to
2734         'struct gdb_breakpoint *'.
2735
2736 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2737
2738         * mem-break.c (set_breakpoint_at): Rename it to ...
2739         (set_breakpoint_type_at): ... it.
2740         (set_breakpoint_at): Call set_breakpoint_type_at.
2741         (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2742         * mem-break.h (set_breakpoint_at): Update comments.
2743
2744 2016-07-12  Chung-Lin Tang  <cltang@codesourcery.com>
2745
2746         * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2747         to buf parameter.
2748         (nios2_store_gregset): Likewise.
2749
2750 2016-07-01  Pedro Alves  <palves@redhat.com>
2751             Antoine Tremblay  <antoine.tremblay@ericsson.com>
2752
2753         * linux-low.c: Change interface to take the target lwp_info
2754         pointer directly and return void.  Handle detaching from a zombie
2755         thread.
2756         (linux_detach_lwp_callback): New function.
2757         (linux_detach): Detach from the leader thread after detaching from
2758         the clone threads.
2759
2760 2016-06-28  Yao Qi  <yao.qi@linaro.org>
2761
2762         * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2763         for variable new_offset.
2764         (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2765         (aarch64_ftrace_insn_reloc_cb): Likewise.
2766         (aarch64_ftrace_insn_reloc_tb): Likewise.
2767         (aarch64_install_fast_tracepoint_jump_pad): Likewise.  Use
2768         PRIx64 instead of PRIx32.
2769
2770 2016-06-28  Yao Qi  <yao.qi@linaro.org>
2771
2772         * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2773         (the_low_target): Install arm_get_syscall_trapinfo.
2774
2775 2016-06-28  Yao Qi  <yao.qi@linaro.org>
2776
2777         * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2778         function.
2779         (the_low_target): Install aarch64_get_syscall_trapinfo.
2780
2781 2016-06-28  Yao Qi  <yao.qi@linaro.org>
2782
2783         * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2784         Callers updated.
2785         * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2786         Remove parameter sysno.
2787         * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2788         sysret.
2789
2790 2016-06-21  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2791
2792         * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2793         (s390_emit_ne_goto): Likewise.
2794         (s390_emit_lt_goto): Likewise.
2795         (s390_emit_le_goto): Likewise.
2796         (s390_emit_gt_goto): Likewise.
2797         (s390_emit_ge_goto): Likewise.
2798         (s390x_emit_eq_goto): Likewise.
2799         (s390x_emit_ne_goto): Likewise.
2800         (s390x_emit_lt_goto): Likewise.
2801         (s390x_emit_le_goto): Likewise.
2802         (s390x_emit_gt_goto): Likewise.
2803         (s390x_emit_ge_goto): Likewise.
2804         (s390_emit_ops_impl): Mark variable static.
2805         (s390x_emit_ops): Likewise.
2806
2807 2016-06-17  Yao Qi  <yao.qi@linaro.org>
2808
2809         * linux-low.c (handle_extended_wait): Call
2810         uninsert_reinsert_breakpoints for the parent process.  Remove
2811         reinsert breakpoints from the child process.  Reinsert them to
2812         the parent process when vfork is done.
2813         * mem-break.c (uninsert_reinsert_breakpoints): New function.
2814         (reinsert_reinsert_breakpoints): New function.
2815         * mem-break.h (uninsert_reinsert_breakpoints): Declare
2816         (reinsert_reinsert_breakpoints): Declare.
2817
2818 2016-06-17  Yao Qi  <yao.qi@linaro.org>
2819
2820         * linux-low.c (handle_extended_wait): If the parent is doing
2821         step-over, remove the reinsert breakpoints from the forked child.
2822
2823 2016-06-17  Yao Qi  <yao.qi@linaro.org>
2824
2825         * linux-low.c (unsuspend_all_lwps): Declare.
2826         (linux_low_filter_event): If thread exited, call finish_step_over.
2827         If step-over is finished, unsuspend other threads.
2828
2829 2016-06-17  Yao Qi  <yao.qi@linaro.org>
2830
2831         * linux-low.c (linux_resume_one_lwp_throw): Assert
2832         has_reinsert_breakpoints returns false.
2833         * mem-break.c (delete_disabled_breakpoints): Assert
2834         bp type isn't reinsert_breakpoint.
2835
2836 2016-06-17  Yao Qi  <yao.qi@linaro.org>
2837
2838         * linux-low.c (maybe_hw_step): New function.
2839         (linux_resume_one_lwp_throw): Call maybe_hw_step.
2840         (finish_step_over): Switch current_thread to lwp temporarily,
2841         and assert has_reinsert_breakpoints returns true.
2842         (proceed_one_lwp): Call maybe_hw_step.
2843         * mem-break.c (has_reinsert_breakpoints): New function.
2844         * mem-break.h (has_reinsert_breakpoints): Declare.
2845
2846 2016-06-02  Jon Turney  <jon.turney@dronecode.org.uk>
2847
2848         * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2849
2850 2016-05-17  Yao Qi  <yao.qi@linaro.org>
2851
2852         * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2853         instead of find_inferior.
2854
2855 2016-05-05  Yao Qi  <yao.qi@linaro.org>
2856
2857         * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2858         Initialize res to zero.
2859
2860 2016-05-05  Yao Qi  <yao.qi@linaro.org>
2861
2862         * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2863         to uint32_t.
2864
2865 2016-05-04  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2866
2867         * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2868         used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2869         (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2870
2871 2016-04-28  Par Olsson  <par.olsson@windriver.com>
2872             Simon Marchi  <simon.marchi@ericsson.com>
2873
2874         * tracepoint.c (write_inferior_int8): New function.
2875         (cmd_qtenable_disable): Write enable flag using
2876         write_inferior_int8.
2877
2878 2016-04-25  Yao Qi  <yao.qi@linaro.org>
2879
2880         * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2881         (need_step_over_p): Return zero if the LWP has pending signals
2882         can be delivered on software single step target.
2883
2884 2016-04-25  Yao Qi  <yao.qi@linaro.org>
2885
2886         * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2887         return instead of error.
2888
2889 2016-04-22  Yao Qi  <yao.qi@linaro.org>
2890
2891         * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2892         to 23.
2893
2894 2016-04-22  Yao Qi  <yao.qi@linaro.org>
2895
2896         * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2897         signal when stepping over breakpoint with software single
2898         step.
2899
2900 2016-04-21  Pedro Alves  <palves@redhat.com>
2901
2902         * linux-s390-low.c (s390_collect_ptrace_register)
2903         (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2904         add casts.
2905         (s390_check_regset): Use void * instead of gdb_byte *.
2906
2907 2016-04-20  Pedro Alves  <palves@redhat.com>
2908
2909         * configure: Renegerate.
2910
2911 2016-04-20  Yao Qi  <yao.qi@linaro.org>
2912
2913         * linux-aarch32-low.c: Include "arch/arm-linux.h".
2914         (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2915         number 16.
2916         (arm_store_gregset): Likewise.
2917
2918 2016-04-16  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2919
2920         * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2921         i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2922         (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2923         (amd64-avx-mpx-linux.c): New rules.
2924         (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2925         * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2926         (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2927         (srv_amd64_regobj): Add amd64-avx-mpx.o.
2928         (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2929         (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2930         (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2931         (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2932         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2933         (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2934         (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2935         * linux-x86-low.c (x86_linux_read_description): Add case for
2936         X86_XSTATE_AVX_MPX_MASK.
2937         (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2938         (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2939         init_registers_i386_avx_mpx_linux.
2940         * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2941         (initialize_low_tracepoint): Call
2942         init_registers_i386_avx_mpx_linux.
2943         * linux-amd64-ipa.c (get_ipa_tdesc):  Add case for avx_mpx.
2944         (initialize_low_tracepoint): Call
2945         init_registers_amd64_avx_mpx_linux.
2946         * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2947         (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2948         (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2949         declarations.
2950
2951 2016-04-18  Pedro Alves  <palves@redhat.com>
2952
2953         * configure: Regenerate.
2954
2955 2016-04-13  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2956
2957         * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2958         (aarch64_emit_sub): Likewise.
2959
2960 2016-04-12  Pedro Alves  <palves@redhat.com>
2961
2962         * utils.c (prepare_to_throw_exception): Delete.
2963
2964 2016-04-05  Simon Marchi  <simon.marchi@ericsson.com>
2965
2966         * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2967
2968 2016-04-05  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2969
2970         * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2971
2972 2016-04-03  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2973
2974         * linux-aarch64-ipa.c: Add <elf.h> include.
2975         * linux-ppc-ipa.c: Add <elf.h> include.
2976         * linux-s390-ipa.c: Add <elf.h> include.
2977
2978 2016-03-31  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2979
2980         * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2981         (get_raw_reg_ptr): Likewise.
2982         (get_trace_state_variable_value_ptr): Likewise.
2983         (set_trace_state_variable_value_ptr): Likewise.
2984         (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2985         char *.
2986
2987 2016-03-31  Wei-cheng Wang  <cole945@gmail.com>
2988             Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2989
2990         PR/17221
2991         * linux-ppc-low.c (emit_insns): New function.
2992         (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2993         (ppc_emit_prologue): New function.
2994         (ppc_emit_epilogue): New function.
2995         (ppc_emit_add): New function.
2996         (ppc_emit_sub): New function.
2997         (ppc_emit_mul): New function.
2998         (ppc_emit_lsh): New function.
2999         (ppc_emit_rsh_signed): New function.
3000         (ppc_emit_rsh_unsigned): New function.
3001         (ppc_emit_ext): New function.
3002         (ppc_emit_zero_ext): New function.
3003         (ppc_emit_log_not): New function.
3004         (ppc_emit_bit_and): New function.
3005         (ppc_emit_bit_or): New function.
3006         (ppc_emit_bit_xor): New function.
3007         (ppc_emit_bit_not): New function.
3008         (ppc_emit_equal): New function.
3009         (ppc_emit_less_signed): New function.
3010         (ppc_emit_less_unsigned): New function.
3011         (ppc_emit_ref): New function.
3012         (ppc_emit_const): New function.
3013         (ppc_emit_reg): New function.
3014         (ppc_emit_pop): New function.
3015         (ppc_emit_stack_flush): New function.
3016         (ppc_emit_swap): New function.
3017         (ppc_emit_stack_adjust): New function.
3018         (ppc_emit_call): New function.
3019         (ppc_emit_int_call_1): New function.
3020         (ppc_emit_void_call_2): New function.
3021         (ppc_emit_if_goto): New function.
3022         (ppc_emit_goto): New function.
3023         (ppc_emit_eq_goto): New function.
3024         (ppc_emit_ne_goto): New function.
3025         (ppc_emit_lt_goto): New function.
3026         (ppc_emit_le_goto): New function.
3027         (ppc_emit_gt_goto): New function.
3028         (ppc_emit_ge_goto): New function.
3029         (ppc_write_goto_address): New function.
3030         (ppc_emit_ops_impl): New static variable.
3031         (ppc64v1_emit_prologue): New function.
3032         (ppc64v2_emit_prologue): New function.
3033         (ppc64_emit_epilogue): New function.
3034         (ppc64_emit_add): New function.
3035         (ppc64_emit_sub): New function.
3036         (ppc64_emit_mul): New function.
3037         (ppc64_emit_lsh): New function.
3038         (ppc64_emit_rsh_signed): New function.
3039         (ppc64_emit_rsh_unsigned): New function.
3040         (ppc64_emit_ext): New function.
3041         (ppc64_emit_zero_ext): New function.
3042         (ppc64_emit_log_not): New function.
3043         (ppc64_emit_bit_and): New function.
3044         (ppc64_emit_bit_or): New function.
3045         (ppc64_emit_bit_xor): New function.
3046         (ppc64_emit_bit_not): New function.
3047         (ppc64_emit_equal): New function.
3048         (ppc64_emit_less_signed): New function.
3049         (ppc64_emit_less_unsigned): New function.
3050         (ppc64_emit_ref): New function.
3051         (ppc64_emit_const): New function.
3052         (ppc64v1_emit_reg): New function.
3053         (ppc64v2_emit_reg): New function.
3054         (ppc64_emit_pop): New function.
3055         (ppc64_emit_stack_flush): New function.
3056         (ppc64_emit_swap): New function.
3057         (ppc64v1_emit_call): New function.
3058         (ppc64v2_emit_call): New function.
3059         (ppc64v1_emit_int_call_1): New function.
3060         (ppc64v2_emit_int_call_1): New function.
3061         (ppc64v1_emit_void_call_2): New function.
3062         (ppc64v2_emit_void_call_2): New function.
3063         (ppc64_emit_if_goto): New function.
3064         (ppc64_emit_eq_goto): New function.
3065         (ppc64_emit_ne_goto): New function.
3066         (ppc64_emit_lt_goto): New function.
3067         (ppc64_emit_le_goto): New function.
3068         (ppc64_emit_gt_goto): New function.
3069         (ppc64_emit_ge_goto): New function.
3070         (ppc64v1_emit_ops_impl): New static variable.
3071         (ppc64v2_emit_ops_impl): New static variable.
3072         (ppc_emit_ops): New function.
3073         (linux_low_target): Wire in ppc_emit_ops.
3074
3075 2016-03-31  Wei-cheng Wang  <cole945@gmail.com>
3076             Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3077
3078         PR/17221
3079         * Makefile.in: Add powerpc-*-ipa.o
3080         * configure.srv: Add ipa_obj for powerpc*-linux.
3081         * linux-ppc-ipa.c: New file.
3082         * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3083         includes.
3084         (PPC_FIELD): New macro.
3085         (PPC_SEXT): New macro.
3086         (PPC_OP6): New macro.
3087         (PPC_BO): New macro.
3088         (PPC_LI): New macro.
3089         (PPC_BD): New macro.
3090         (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3091         (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3092         (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3093         (ppc_get_thread_area): New function.
3094         (is_elfv2_inferior): New function.
3095         (gen_ds_form): New function.
3096         (GEN_STD): New macro.
3097         (GEN_STDU): New macro.
3098         (GEN_LD): New macro.
3099         (GEN_LDU): New macro.
3100         (gen_d_form): New function.
3101         (GEN_ADDI): New macro.
3102         (GEN_ADDIS): New macro.
3103         (GEN_LI): New macro.
3104         (GEN_LIS): New macro.
3105         (GEN_ORI): New macro.
3106         (GEN_ORIS): New macro.
3107         (GEN_LWZ): New macro.
3108         (GEN_STW): New macro.
3109         (GEN_STWU): New macro.
3110         (gen_xfx_form): New function.
3111         (GEN_MFSPR): New macro.
3112         (GEN_MTSPR): New macro.
3113         (GEN_MFCR): New macro.
3114         (GEN_MTCR): New macro.
3115         (GEN_SYNC): New macro.
3116         (GEN_LWSYNC): New macro.
3117         (gen_x_form): New function.
3118         (GEN_OR): New macro.
3119         (GEN_MR): New macro.
3120         (GEN_LWARX): New macro.
3121         (GEN_STWCX): New macro.
3122         (GEN_CMPW): New macro.
3123         (gen_md_form): New function.
3124         (GEN_RLDICL): New macro.
3125         (GEN_RLDICR): New macro.
3126         (gen_i_form): New function.
3127         (GEN_B): New macro.
3128         (GEN_BL): New macro.
3129         (gen_b_form): New function.
3130         (GEN_BNE): New macro.
3131         (GEN_LOAD): New macro.
3132         (GEN_STORE): New macro.
3133         (gen_limm): New function.
3134         (gen_atomic_xchg): New function.
3135         (gen_call): New function.
3136         (ppc_relocate_instruction): New function.
3137         (ppc_install_fast_tracepoint_jump_pad): New function.
3138         (ppc_get_min_fast_tracepoint_insn_len): New function.
3139         (ppc_get_ipa_tdesc_idx): New function.
3140         (the_low_target): Wire in the new functions.
3141         (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3142         tdescs.
3143         * linux-ppc-tdesc.h: New file.
3144
3145 2016-03-31  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3146
3147         * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3148         (alloc_jump_pad_buffer): New function.
3149         * linux-amd64-ipa.c: Add <sys/mman.h> include.
3150         (alloc_jump_pad_buffer): New function.
3151         * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3152         * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3153         (alloc_jump_pad_buffer): New function.
3154         * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3155         (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3156         * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3157         (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3158
3159 2016-03-30  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3160
3161         * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3162         * linux-amd64-ipa.c: Likewise.
3163         * linux-i386-ipa.c: Likewise.
3164         * linux-s390-ipa.c: Likewise.
3165         * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3166         ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3167         set_trace_state_variable_value_ptr.
3168         (struct ipa_sym_addresses): Likewise.
3169         (symbol_list): Likewise.
3170         (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3171         accessing gdb_collect directly.
3172         (gdb_collect_ptr_type): New typedef.
3173         (get_raw_reg_ptr_type): New typedef.
3174         (get_trace_state_variable_value_ptr_type): New typedef.
3175         (set_trace_state_variable_value_ptr_type): New typedef.
3176         (gdb_collect_ptr): New global.
3177         (get_raw_reg_ptr): New global.
3178         (get_trace_state_variable_value_ptr): New global.
3179         (set_trace_state_variable_value_ptr): New global.
3180         (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3181         accessing get_raw_reg directly.
3182         (get_get_tsv_func_addr): Likewise for
3183         get_trace_state_variable_value_ptr.
3184         (get_set_tsv_func_addr): Likewise for
3185         set_trace_state_variable_value_ptr.
3186         * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3187
3188 2016-03-30  Simon Marchi  <simon.marchi@ericsson.com>
3189
3190         * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3191
3192 2016-03-30  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3193
3194         * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3195         packets.
3196         (relocate_instruction): Remove own_buf.
3197         * server.c (own_buf): Make global.
3198         (handle_v_requests): Make global.
3199         * server.h (own_buf): New declaration.
3200         (handle_v_requests): New prototype.
3201
3202 2016-03-29  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3203
3204         PR 18377
3205         * linux-s390-low.c (add_insns): New function.
3206         (s390_emit_prologue): New function.
3207         (s390_emit_epilogue): New function.
3208         (s390_emit_add): New function.
3209         (s390_emit_sub): New function.
3210         (s390_emit_mul): New function.
3211         (s390_emit_lsh): New function.
3212         (s390_emit_rsh_signed): New function.
3213         (s390_emit_rsh_unsigned): New function.
3214         (s390_emit_ext): New function.
3215         (s390_emit_log_not): New function.
3216         (s390_emit_bit_and): New function.
3217         (s390_emit_bit_or): New function.
3218         (s390_emit_bit_xor): New function.
3219         (s390_emit_bit_not): New function.
3220         (s390_emit_equal): New function.
3221         (s390_emit_less_signed): New function.
3222         (s390_emit_less_unsigned): New function.
3223         (s390_emit_ref): New function.
3224         (s390_emit_if_goto): New function.
3225         (s390_emit_goto): New function.
3226         (s390_write_goto_address): New function.
3227         (s390_emit_litpool): New function.
3228         (s390_emit_const): New function.
3229         (s390_emit_call): New function.
3230         (s390_emit_reg): New function.
3231         (s390_emit_pop): New function.
3232         (s390_emit_stack_flush): New function.
3233         (s390_emit_zero_ext): New function.
3234         (s390_emit_swap): New function.
3235         (s390_emit_stack_adjust): New function.
3236         (s390_emit_set_r2): New function.
3237         (s390_emit_int_call_1): New function.
3238         (s390_emit_void_call_2): New function.
3239         (s390_emit_eq_goto): New function.
3240         (s390_emit_ne_goto): New function.
3241         (s390_emit_lt_goto): New function.
3242         (s390_emit_le_goto): New function.
3243         (s390_emit_gt_goto): New function.
3244         (s390_emit_ge_goto): New function.
3245         (s390x_emit_prologue): New function.
3246         (s390x_emit_epilogue): New function.
3247         (s390x_emit_add): New function.
3248         (s390x_emit_sub): New function.
3249         (s390x_emit_mul): New function.
3250         (s390x_emit_lsh): New function.
3251         (s390x_emit_rsh_signed): New function.
3252         (s390x_emit_rsh_unsigned): New function.
3253         (s390x_emit_ext): New function.
3254         (s390x_emit_log_not): New function.
3255         (s390x_emit_bit_and): New function.
3256         (s390x_emit_bit_or): New function.
3257         (s390x_emit_bit_xor): New function.
3258         (s390x_emit_bit_not): New function.
3259         (s390x_emit_equal): New function.
3260         (s390x_emit_less_signed): New function.
3261         (s390x_emit_less_unsigned): New function.
3262         (s390x_emit_ref): New function.
3263         (s390x_emit_if_goto): New function.
3264         (s390x_emit_const): New function.
3265         (s390x_emit_call): New function.
3266         (s390x_emit_reg): New function.
3267         (s390x_emit_pop): New function.
3268         (s390x_emit_stack_flush): New function.
3269         (s390x_emit_zero_ext): New function.
3270         (s390x_emit_swap): New function.
3271         (s390x_emit_stack_adjust): New function.
3272         (s390x_emit_int_call_1): New function.
3273         (s390x_emit_void_call_2): New function.
3274         (s390x_emit_eq_goto): New function.
3275         (s390x_emit_ne_goto): New function.
3276         (s390x_emit_lt_goto): New function.
3277         (s390x_emit_le_goto): New function.
3278         (s390x_emit_gt_goto): New function.
3279         (s390x_emit_ge_goto): New function.
3280         (s390_emit_ops): New function.
3281         (struct linux_target_ops): Fill in emit_ops hook.
3282
3283 2016-03-29  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3284
3285         PR 18377
3286         * Makefile.in: Add s390 IPA files.
3287         * configure.srv: Build IPA for s390.
3288         * linux-s390-ipa.c: New file.
3289         * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3290         (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3291         (tdesc_s390_linux32): Likewise.
3292         (init_registers_s390_linux32v1): Likewise.
3293         (tdesc_s390_linux32v1): Likewise.
3294         (init_registers_s390_linux32v2): Likewise.
3295         (tdesc_s390_linux32v2): Likewise.
3296         (init_registers_s390_linux64): Likewise.
3297         (tdesc_s390_linux64): Likewise.
3298         (init_registers_s390_linux64v1): Likewise.
3299         (tdesc_s390_linux64v1): Likewise.
3300         (init_registers_s390_linux64v2): Likewise.
3301         (tdesc_s390_linux64v2): Likewise.
3302         (init_registers_s390_te_linux64): Likewise.
3303         (tdesc_s390_te_linux64): Likewise.
3304         (init_registers_s390_vx_linux64): Likewise.
3305         (tdesc_s390_vx_linux64): Likewise.
3306         (init_registers_s390_tevx_linux64): Likewise.
3307         (tdesc_s390_tevx_linux64): Likewise.
3308         (init_registers_s390x_linux64): Likewise.
3309         (tdesc_s390x_linux64): Likewise.
3310         (init_registers_s390x_linux64v1): Likewise.
3311         (tdesc_s390x_linux64v1): Likewise.
3312         (init_registers_s390x_linux64v2): Likewise.
3313         (tdesc_s390x_linux64v2): Likewise.
3314         (init_registers_s390x_te_linux64): Likewise.
3315         (tdesc_s390x_te_linux64): Likewise.
3316         (init_registers_s390x_vx_linux64): Likewise.
3317         (tdesc_s390x_vx_linux64): Likewise.
3318         (init_registers_s390x_tevx_linux64): Likewise.
3319         (tdesc_s390x_tevx_linux64): Likewise.
3320         (have_hwcap_s390_vx): New static variable.
3321         (s390_arch_setup): Fill have_hwcap_s390_vx.
3322         (s390_get_thread_area): New function.
3323         (s390_ft_entry_gpr_esa): New const.
3324         (s390_ft_entry_gpr_zarch): New const.
3325         (s390_ft_entry_misc): New const.
3326         (s390_ft_entry_fr): New const.
3327         (s390_ft_entry_vr): New const.
3328         (s390_ft_main_31): New const.
3329         (s390_ft_main_64): New const.
3330         (s390_ft_exit_fr): New const.
3331         (s390_ft_exit_vr): New const.
3332         (s390_ft_exit_misc): New const.
3333         (s390_ft_exit_gpr_esa): New const.
3334         (s390_ft_exit_gpr_zarch): New const.
3335         (append_insns): New function.
3336         (s390_relocate_instruction): New function.
3337         (s390_install_fast_tracepoint_jump_pad): New function.
3338         (s390_get_min_fast_tracepoint_insn_len): New function.
3339         (s390_get_ipa_tdesc_idx): New function.
3340         (struct linux_target_ops): Wire in the above functions.
3341         (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3342         * linux-s390-tdesc.h: New file.
3343
3344 2016-03-29  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3345
3346         * linux-s390-low.c (s390_supports_tracepoints): New function.
3347         (struct linux_target_ops): Fill supports_tracepoints hook.
3348
3349 2016-03-18  Yao Qi  <yao.qi@linaro.org>
3350
3351         * linux-low.c (lwp_signal_can_be_delivered): New function.
3352         (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3353
3354 2016-03-18  Yao Qi  <yao.qi@linaro.org>
3355
3356         * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3357         0 if signal is enqueued.  Remove 'signal' from one debugging
3358         message.  Move one debugging message to some lines below.
3359         Remove code setting 'signal' to 0.
3360
3361 2016-03-18  Yao Qi  <yao.qi@linaro.org>
3362
3363         * linux-low.c (linux_low_filter_event): Remove redundant
3364         WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3365
3366 2016-03-09  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3367
3368         * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3369         (struct linux_target_ops): Wire in the above.
3370
3371 2016-03-03  Yao Qi  <yao.qi@linaro.org>
3372
3373         * linux-low.c: Update comments to start_step_over.
3374
3375 2016-03-03  Yao Qi  <yao.qi@linaro.org>
3376
3377         PR server/19736
3378         * linux-low.c (handle_extended_wait): Set child suspended
3379         if event_lwp->bp_reinsert isn't zero.
3380
3381 2016-03-02  Yao Qi  <yao.qi@linaro.org>
3382
3383         * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3384         enqueue_pending_signal.
3385
3386 2016-03-02  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3387
3388         * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3389         is actually loaded.
3390
3391 2016-02-25  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3392
3393         * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3394         (s390_regmap_3264) [!__s390x__]: New global.
3395         (s390_collect_ptrace_register): Skip map entries containing -1.
3396         (s390_supply_ptrace_register): Ditto.
3397         (s390_fill_gprs_high): New function.
3398         (s390_store_gprs_high): New function.
3399         (s390_regsets): Add NT_S390_HIGH_GPRS.
3400         (s390_get_hwcap): Enable on 31-bit.
3401         (have_hwcap_s390_high_gprs): Enable on 31-bit.
3402         (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3403         Detect NT_S390_HIGH_GPRS.
3404         (s390_usrregs_info_3264): Enable on 31-bit.
3405         (s390_regs_info): Enable regs_info_3264 on 31-bit.
3406         (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3407
3408 2016-02-25  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3409
3410         PR gdb/13808
3411         * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3412         * configure.srv: Ditto.
3413         * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3414         (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3415         * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3416         (init_registers_amd64_linux): Remove prototype.
3417         (tdesc_amd64_linux): Remove declaration.
3418         (get_ipa_tdesc): New function.
3419         (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3420         initialize remaining tdescs.
3421         * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3422         (init_registers_i386_linux): Remove prototype.
3423         (tdesc_i386_linux): Remove declaration.
3424         (get_ipa_tdesc): New function.
3425         (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3426         initialize remaining tdescs.
3427         * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3428         (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3429         * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3430         * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3431         (x86_get_ipa_tdesc_idx): New function.
3432         (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3433         * linux-x86-tdesc.h: New file.
3434         * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3435         (target_get_ipa_tdesc_idx): New macro.
3436         * tracepoint.c (ipa_tdesc_idx): New macro.
3437         (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3438         (symbol_list): Add ipa_tdesc_idx.
3439         (cmd_qtstart): Write ipa_tdesc_idx in the target.
3440         (ipa_tdesc): Remove.
3441         (ipa_tdesc_idx): New variable.
3442         (get_context_regcache): Use get_ipa_tdesc.
3443         (gdb_collect): Ditto.
3444         (gdb_probe): Ditto.
3445         * tracepoint.h (get_ipa_tdesc): New prototype.
3446         (ipa_tdesc): Remove.
3447
3448 2016-02-24  Pedro Alves  <palves@redhat.com>
3449
3450         * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3451         (save_stop_reason): ... this.  Use GDB_ARCH_IS_TRAP_HWBKPT and
3452         handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3453         Factor out common code between the USE_SIGTRAP_SIGINFO and
3454         !USE_SIGTRAP_SIGINFO blocks.
3455         (linux_low_filter_event): Call save_stop_reason instead of
3456         check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3457         Update comments.
3458         (linux_wait_1): Update comments.
3459
3460 2016-02-24  Wei-cheng Wang  <cole945@gmail.com>
3461
3462         * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3463         (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3464         (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3465         ppc_insert_point, ppc_remove_point.
3466
3467 2016-02-17  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3468
3469         * linux-s390-low.c (s390_supports_z_point_type): New function.
3470         (struct linux_target_ops): Wire s390_supports_z_point_type in.
3471
3472 2016-02-16  Yao Qi  <yao.qi@linaro.org>
3473
3474         * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3475         PC.  Get pc from regcache_read_pc.
3476
3477 2016-02-12  Yao Qi  <yao.qi@linaro.org>
3478
3479         * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3480         or linux_get_pc_32bit.
3481         (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3482
3483 2016-02-12  Yao Qi  <yao.qi@linaro.org>
3484
3485         * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3486         arm_linux_get_next_pcs_fixup.
3487
3488 2016-02-12  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3489
3490         * tracepoint.c (x_tracepoint_action_download): Change
3491         write_inferior_data_ptr to write_inferior_data_pointer.
3492         (cmd_qtstart): Likewise.
3493         (write_inferior_data_ptr): Remove.
3494         (download_agent_expr): Change write_inferior_data_ptr to
3495         write_inferior_data_pointer.
3496         (download_tracepoint_1): Likewise.
3497         (download_tracepoint): Likewise.
3498         (download_trace_state_variables): Likewise.
3499
3500 2016-02-11  Wei-cheng Wang  <cole945@gmail.com>
3501             Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3502
3503         * tracepoint.c (struct tracepoint_action_ops): Remove.
3504         (struct tracepoint_action): Remove ops.
3505         (m_tracepoint_action_download, r_tracepoint_action_download)
3506         (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3507         size and offset accordingly.
3508         (m_tracepoint_action_ops, r_tracepoint_action_ops)
3509         (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3510         (tracepoint_action_send, tracepoint_action_download): New functions.
3511         Helpers for trace action handlers.
3512         (add_tracepoint_action): Remove setup actions ops.
3513         (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3514
3515 2016-02-10  Yao Qi  <yao.qi@linaro.org>
3516
3517         * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3518
3519 2016-02-09  Simon Marchi  <simon.marchi@ericsson.com>
3520
3521         * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3522         to AC_OUTPUT.
3523         * configure: Regenerate.
3524
3525 2016-02-09  Simon Marchi  <simon.marchi@ericsson.com>
3526
3527         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3528         void * to gdb_byte *.
3529         * linux-low.c (siginfo_fixup): Likewise.
3530         (linux_xfer_siginfo): Likewise.
3531         * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3532         Likewise.
3533         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3534
3535 2016-02-02  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3536
3537         * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3538         to srv_tgtobj.
3539         (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3540         to srv_tgtobj.
3541         * linux-x86-low.c [__x86_64__]: Include
3542         "nat/amd64-linux-siginfo.h".
3543         (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3544         (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3545         (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3546         (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3547         (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3548         (cpt_si_fd, si_timerid, si_overrun): Move from
3549         nat/amd64-linux-siginfo.c.
3550         * Makefile.in (amd64-linux-siginfo.o:): New rule.
3551
3552 2016-01-28  Simon Marchi  <simon.marchi@ericsson.com>
3553
3554         * server.c (skip_to_semicolon):  Remove.
3555         (process_point_options): Use strchrnul instead of
3556         skip_to_semicolon.
3557
3558 2016-01-26  Yao Qi  <yao.qi@linaro.org>
3559
3560         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3561         * linux-low.c (install_software_single_step_breakpoints): Don't
3562         call regcache_read_pc.
3563         * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3564         argument pc.
3565
3566 2016-01-26  Yao Qi  <yao.qi@linaro.org>
3567
3568         * linux-low.c (install_software_single_step_breakpoints): Call
3569         regcache_read_pc instead of get_pc.
3570
3571 2016-01-26  Yao Qi  <yao.qi@linaro.org>
3572
3573         * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3574         (unblock_async_io): Rename to ...
3575         (block_unblock_async_io): ... it.  New function.
3576         (enable_async_io): Don't install SIGIO handler.  Unblock it
3577         instead.
3578         (disable_async_io): Don't ignore SIGIO.  Block it instead.
3579         (initialize_async_io): Install SIGIO handler.  Don't call
3580         unblock_async_io.
3581
3582 2016-01-26  Yao Qi  <yao.qi@linaro.org>
3583
3584         * remote-utils.c (getpkt): If the buffer isn't empty, and the
3585         first character is '\003', call *the_target->request_interrupt.
3586
3587 2016-01-25  Yao Qi  <yao.qi@linaro.org>
3588
3589         * remote-utils.c (new_thread_notify): Remove.
3590         (dead_thread_notify): Likewise.
3591         * remote-utils.h (new_thread_notify): Remove declaration.
3592         (dead_thread_notify): Likewise.
3593
3594 2016-01-23  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3595
3596         * gdb.trace/pending.exp: Fix expected message on continue.
3597
3598 2016-01-22  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3599
3600         * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3601         it works properly on big-endian machines where sizeof (CORE_ADDR)
3602         != sizeof (void *).
3603
3604 2016-01-21  Pedro Alves  <palves@redhat.com>
3605
3606         * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3607         (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3608         * configure: Regenerate.
3609
3610 2016-01-21  Yao Qi  <yao.qi@linaro.org>
3611
3612         * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3613         is_thumb and set it according to CPSR saved on the stack.
3614         (get_next_pcs_syscall_next_pc): Pass is_thumb to
3615         arm_sigreturn_next_pc.
3616
3617 2016-01-18  Yao Qi  <yao.qi@linaro.org>
3618
3619         * linux-low.c (linux_set_pc_64bit): New function.
3620         (linux_get_pc_64bit): New function.
3621         * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3622         Declare.
3623         * linux-sparc-low.c (debug_threads): Remove declaration.
3624         (sparc_get_pc): Remove.
3625         (the_low_target): Use linux_get_pc_64bit instead of
3626         sparc_get_pc.
3627         * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3628         (the_low_target): Use linux_get_pc_64bit and
3629         linux_set_pc_64bit.
3630
3631 2016-01-18  Yao Qi  <yao.qi@linaro.org>
3632
3633         * linux-arm-low.c (debug_threads): Remove declaration.
3634         (arm_get_pc, arm_set_pc): Remove.
3635         (the_low_target): Use linux_get_pc_32bit and
3636         linux_set_pc_32bit.
3637         * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3638         (the_low_target): Use linux_get_pc_32bit and
3639         linux_set_pc_32bit.
3640         * linux-cris-low.c (debug_threads): Remove declaration.
3641         (cris_get_pc, cris_set_pc,): Remove.
3642         (the_low_target): Use linux_get_pc_32bit and
3643         linux_set_pc_32bit.
3644         * linux-crisv32-low.c (debug_threads): Remove declaration.
3645         (cris_get_pc, cris_set_pc): Remove.
3646         (the_low_target): Use linux_get_pc_32bit and
3647         linux_set_pc_32bit.
3648         * linux-low.c: Include inttypes.h.
3649         (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3650         * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3651         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3652         (the_low_target): Use linux_get_pc_32bit and
3653         linux_set_pc_32bit.
3654         * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3655         (the_low_target): Use linux_get_pc_32bit and
3656         linux_set_pc_32bit.
3657         * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3658         (the_low_target): Use linux_get_pc_32bit and
3659         linux_set_pc_32bit.
3660         * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3661         (the_low_target): Use linux_get_pc_32bit and
3662         linux_set_pc_32bit.
3663         * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3664         (the_low_target): Use linux_get_pc_32bit and
3665         linux_set_pc_32bit.
3666
3667 2016-01-18  Gary Benson  <gbenson@redhat.com>
3668
3669         * configure.ac (AC_FUNC_FORK): New check.
3670         * config.in: Regenerate.
3671         * configure: Likewise.
3672
3673 2016-01-14  Yao Qi  <yao.qi@linaro.org>
3674
3675         * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3676         * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3677         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3678         arm_get_next_pcs_ctor.
3679
3680 2016-01-12  Josh Stone  <jistone@redhat.com>
3681             Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3682
3683         * inferiors.h: Include "gdb_vecs.h".
3684         (struct process_info): Add syscalls_to_catch.
3685         * inferiors.c (remove_process): Free syscalls_to_catch.
3686         * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3687         syscall_return stops.
3688         * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3689         * server.c (handle_general_set): Handle QCatchSyscalls.
3690         (handle_query): Report support for QCatchSyscalls.
3691         * target.h (struct target_ops): Add supports_catch_syscall.
3692         (target_supports_catch_syscall): New macro.
3693         * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3694         (struct lwp_info): Add syscall_state.
3695         * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3696         Maintain syscall_state and syscalls_to_catch across exec.
3697         (get_syscall_trapinfo): New function, proxy to the_low_target.
3698         (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3699         (linux_low_filter_event): Toggle syscall_state entry/return for
3700         syscall traps, and set it ignored for all others.
3701         (gdb_catching_syscalls_p): New function.
3702         (gdb_catch_this_syscall_p): New function.
3703         (linux_wait_1): Handle SYSCALL_SIGTRAP.
3704         (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3705         (linux_supports_catch_syscall): New function.
3706         (linux_target_ops): Install it.
3707         * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3708         (the_low_target): Install it.
3709
3710 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
3711
3712         * acinclude.m4: Include new ../warning.m4 file.
3713         * configure: Regenerated.
3714         * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3715
3716 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
3717
3718         * ax.c (is_goto_target): Mark static.
3719         * linux-low.c (register_addr): Likewise.
3720         (linux_fetch_registers, linux_store_registers): Likewise.
3721         * mem-break.c (any_persistent_commands): Fix old prototype.
3722         (add_commands_to_breakpoint): Mark static.
3723         * regcache.c (find_register_by_name): Delete unused func.
3724         * remote-utils.c (hex_or_minus_one): Mark static.
3725         * server.c (monitor_show_help): Mark static.
3726         (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3727         handle_v_requests): Likewise.
3728
3729 2016-01-12  Pedro Alves  <palves@redhat.com>
3730
3731         Remove use of the registered trademark symbol throughout.
3732
3733 2016-01-08  Yao Qi  <yao.qi@linaro.org>
3734
3735         * remote-utils.c (getpkt): If c is '\003', call target hook
3736         request_interrupt.
3737
3738 2016-01-06  Yao Qi  <yao.qi@linaro.org>
3739
3740         * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3741         linux-aarch32-low.c.
3742         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3743         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3744         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3745         (thumb2_breakpoint): Declare.
3746         * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3747         linux-aarch32-low.h.
3748         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3749         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3750         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3751
3752 2016-01-01  Joel Brobecker  <brobecker@adacore.com>
3753
3754         * gdbreplay.c (gdbreplay_version): Change copyright year in
3755         version message.
3756         * server.c (gdbserver_version): Likewise.
3757
3758 2015-12-28  Patrick Palka  <patrick@parcs.ath.cx>
3759
3760         * server.c (crc32_table): Delete.
3761         (crc32): Use libiberty's xcrc32 function.
3762
3763 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
3764
3765         * lynx-low.c (lynx_delete_thread_callback): New function.
3766         (lynx_mourn): Properly delete our process and all of its
3767         threads.  Remove call to clear_inferiors.
3768
3769 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
3770
3771         * target.c (thread_search_callback): Add check that
3772         the thread_stopped target callback is not NULL before
3773         calling it.
3774
3775 2015-12-21  Yao Qi  <yao.qi@linaro.org>
3776
3777         * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3778         arm breakpoint.
3779
3780 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3781
3782         * server.c (handle_query): Call target_supports_software_single_step.
3783
3784 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3785
3786         * linux-low.c (single_step): New function.
3787         (linux_resume_one_lwp_throw): Call single_step.
3788         (start_step_over): Likewise.
3789
3790 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3791
3792         * Makefile.in (SFILES): Append arch/arm-linux.c,
3793         arch/arm-get-next-pcs.c.
3794         (arm-linux.o): New rule.
3795         (arm-get-next-pcs.o): New rule.
3796         * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3797         arm-linux.o.
3798         * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro.  Moved
3799         to linux-aarch32-low.c.
3800         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3801         (arm_breakpoint_len, thumb_breakpoint): Likewise.
3802         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3803         (thumb2_breakpoint_len): Likewise.
3804         (arm_is_thumb_mode): Make non-static.
3805         * linux-aarch32-low.h (arm_abi_breakpoint): New macro.  Moved
3806         from linux-aarch32-low.c.
3807         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3808         (arm_breakpoint_len, thumb_breakpoint): Likewise.
3809         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3810         (thumb2_breakpoint_len): Likewise.
3811         (arm_is_thumb_mode): New declaration.
3812         * linux-arm-low.c: Include arch/arm-linux.h
3813         aarch/arm-get-next-pcs.h, sys/syscall.h.
3814         (get_next_pcs_ops): New struct.
3815         (get_next_pcs_addr_bits_remove): New function.
3816         (get_next_pcs_is_thumb): New function.
3817         (get_next_pcs_read_memory_unsigned_integer): Likewise.
3818         (arm_sigreturn_next_pc): Likewise.
3819         (get_next_pcs_syscall_next_pc): Likewise.
3820         (arm_gdbserver_get_next_pcs): Likewise.
3821         (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3822         Initialize.
3823         * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3824         * server.h: Include gdb_vecs.h.
3825
3826 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3827
3828         * Makefile.in (SFILES): Append common/common-regcache.c.
3829         (OBS): Append common-regcache.o.
3830         (common-regcache.o): New rule.
3831         * regcache.c (init_register_cache): Initialize cache to
3832         REG_UNAVAILABLE.
3833         (regcache_raw_read_unsigned): New function.
3834         * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3835         register_status enum.
3836
3837 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3838
3839         * linux-aarch64-low.c (the_low_targets): Rename
3840         breakpoint_reinsert_addr to get_next_pcs.
3841         * linux-arm-low.c (the_low_targets): Likewise.
3842         * linux-bfin-low.c (the_low_targets): Likewise.
3843         * linux-cris-low.c (the_low_targets): Likewise.
3844         * linux-crisv32-low.c (the_low_targets): Likewise.
3845         * linux-low.c (can_software_single_step): Likewise.
3846         (install_software_single_step_breakpoints): New function.
3847         (start_step_over): Use install_software_single_step_breakpoints.
3848         * linux-low.h: New CORE_ADDR vector.
3849         (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3850         get_next_pcs.
3851         * linux-mips-low.c (the_low_targets): Likewise.
3852         * linux-nios2-low.c (the_low_targets): Likewise.
3853         * linux-sparc-low.c (the_low_targets): Likewise.
3854
3855 2015-12-17  Pedro Alves  <palves@redhat.com>
3856
3857         * linux-low.c (linux_kill_one_lwp): Remove references to
3858         LinuxThreads.
3859         (kill_lwp): Remove HAVE_TKILL_SYSCALL check.  No longer fall back
3860         to 'kill'.
3861         (linux_init_signals): Delete.
3862         (initialize_low): Adjust.
3863         * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3864
3865 2015-12-16  Pedro Alves  <palves@redhat.com>
3866
3867         * configure.ac (compiler warning flags): When testing a
3868         -Wno-foo option, check whether -Wfoo works instead.
3869         * configure: Regenerate.
3870
3871 2015-12-11  Don Breazeal  <donb@codesourcery.com>
3872
3873         * server.c (process_serial_event): Don't exit from gdbserver
3874         in remote mode if there are still active inferiors.
3875
3876 2015-12-11  Yao Qi  <yao.qi@linaro.org>
3877
3878         * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3879         arm_breakpoint_at if the process is 32-bit.
3880
3881 2015-12-11  Yao Qi  <yao.qi@linaro.org>
3882
3883         * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3884         arm breakpoint.
3885
3886 2015-12-07  Yao Qi  <yao.qi@linaro.org>
3887
3888         * configure.srv: Append arm.o to srv_tgtobj for
3889         aarch64*-*-linux* target.
3890         * linux-aarch32-low.c (arm_abi_breakpoint): New macro.  Moved
3891         from linux-arm-low.c.
3892         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3893         (arm_breakpoint_len, thumb_breakpoint): Likewise.
3894         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3895         (thumb2_breakpoint_len): Likewise.
3896         (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3897         (arm_breakpoint_kinds): Likewise.
3898         (arm_breakpoint_kind_from_pc): Likewise.
3899         (arm_sw_breakpoint_from_kind): Likewise.
3900         (arm_breakpoint_kind_from_current_state): Likewise.
3901         * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3902         (arm_sw_breakpoint_from_kind): Declare.
3903         (arm_breakpoint_kind_from_current_state): Declare.
3904         (arm_breakpoint_at): Declare.
3905         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3906         arm_sw_breakpoint_from_kind if process is 32-bit.
3907         (aarch64_breakpoint_kind_from_pc): New function.
3908         (aarch64_breakpoint_kind_from_current_state): New function.
3909         (the_low_target): Initialize fields breakpoint_kind_from_pc
3910         and breakpoint_kind_from_current_state.
3911         * linux-arm-low.c (arm_breakpoint_kinds): Move to
3912         linux-aarch32-low.c.
3913         (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3914         (arm_breakpoint, arm_breakpoint_len): Likewise.
3915         (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3916         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3917         (arm_is_thumb_mode): Likewise.
3918         (arm_breakpoint_at): Likewise.
3919         (arm_breakpoint_kind_from_pc): Likewise.
3920         (arm_sw_breakpoint_from_kind): Likewise.
3921         (arm_breakpoint_kind_from_current_state): Likewise.
3922
3923         Revert:
3924         2015-08-04  Yao Qi  <yao.qi@linaro.org>
3925
3926         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3927         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3928         * server.c (extended_protocol): Remove "static".
3929         * server.h (extended_protocol): Declare it.
3930
3931 2015-12-04  Josh Stone  <jistone@redhat.com>
3932
3933         * target.h (struct target_ops) <arch_setup>: Rename to ...
3934         (struct target_ops) <post_create_inferior>: ... this.
3935         (target_arch_setup): Rename to ...
3936         (target_post_create_inferior): ... this, calling post_create_inferior.
3937         * server.c (start_inferior): Update target_arch_setup calls to
3938         target_post_create_inferior.
3939         * linux-low.c (linux_low_ptrace_options): Forward declare.
3940         (linux_arch_setup): Update its comment for general use.
3941         (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3942         (struct linux_target_ops): Use linux_post_create_inferior.
3943         * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3944         to post_create_inferior.
3945         * nto-low.c (struct nto_target_ops): Likewise.
3946         * spu-low.c (struct spu_target_ops): Likewise.
3947         * win32-low.c (struct win32_target_ops): Likewise.
3948
3949 2015-12-03  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3950
3951         * linux-arm-low.c: Remove duplicate arch/arm.h include.
3952
3953 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3954
3955         * linux-arm-low.c (arm_reinsert_addr): Remove function.
3956         (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3957         * linux-cris-low.c (cris_reinsert_addr> Remove function.
3958         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3959         * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3960         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3961         * linux-mips-low.c (mips_reinsert_addr): Remove function.
3962         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3963         * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3964         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3965         * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3966         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3967
3968 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3969
3970         * linux-low.c (linux_look_up_symbols): Don't call
3971         linux_supports_traceclone.
3972         * linux-low.h (thread_db_init): Remove use_events argument.
3973         * thread-db.c (thread_db_use_event): Remove global variable.
3974         (struct thread_db) <td_thr_event_enable_p>: Remove field.
3975         (struct thread_db) <td_create_bp>: Remove field.
3976         (thread_db_create_event): Remove function.
3977         (thread_db_enable_reporting): Likewise.
3978         (find_one_thread): Don't check for thread_db_use_events.
3979         (attach_thread): Likewise.
3980         (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3981         (try_thread_db_load_1): Don't check for thread_db_use_events.
3982         (thread_db_init): Remove use_events argument and thread events
3983         handling.
3984         (remove_thread_event_breakpoints): Remove function.
3985         (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3986
3987 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3988
3989         * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3990         New function.
3991         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3992         * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3993         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3994         * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3995         (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3996         Initialize.
3997         * linux-crisv32-low.c (cris_supports_hardware_single_step):
3998         New function.
3999         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4000         * linux-low.c (can_hardware_single_step): Use
4001         supports_hardware_single_step.
4002         (can_software_single_step): New function.
4003         (start_step_over): Call can_software_single_step.
4004         (linux_supports_hardware_single_step): New function.
4005         (struct target_ops) <supports_software_single_step>: Initialize.
4006         * linux-low.h (struct linux_target_ops)
4007         <supports_hardware_single_step>: Initialize.
4008         * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4009         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4010         * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4011         (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4012         * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4013         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4014         * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4015         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4016         * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4017         (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4018         Initialize.
4019         * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4020         (struct linux_target_ops) <tile_supports_hardware_single_step>:
4021         Initialize.
4022         * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4023         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4024         * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4025         New function.
4026         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4027         * target.h (struct target_ops): <supports_software_single_step>:
4028         New field.
4029         (target_supports_software_single_step): New macro.
4030
4031 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4032
4033         * linux-low.c (linux_wait_1): Fix pc advance condition.
4034         * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4035         * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4036
4037 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4038
4039         * linux-arm-low.c (arm_is_thumb_mode): New function.
4040         (arm_breakpoint_at): Use arm_is_thumb_mode.
4041         (arm_breakpoint_kind_from_current_state): New function.
4042         (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4043         Initialize.
4044         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4045         (linux_breakpoint_kind_from_current_state): New function.
4046         (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4047         * linux-low.h (struct linux_target_ops)
4048         <breakpoint_kind_from_current_state>: New field.
4049         * target.h (struct target_ops): Likewise.
4050         (target_breakpoint_kind_from_current_state): New macro.
4051
4052 2015-11-30  Pedro Alves  <palves@redhat.com>
4053
4054         * linux-low.c (linux_resume): Wake up the event loop before
4055         returning.
4056
4057 2015-11-30  Pedro Alves  <palves@redhat.com>
4058
4059         * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4060         check.
4061         (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4062         to -1.
4063         * target.c (struct thread_search): New structure.
4064         (thread_search_callback): New function.
4065         (prev_general_thread): New global.
4066         (prepare_to_access_memory, done_accessing_memory): New functions.
4067         * target.h (prepare_to_access_memory, done_accessing_memory):
4068         Replace macros with function declarations.
4069
4070 2015-11-30  Pedro Alves  <palves@redhat.com>
4071
4072         PR 14618
4073         * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4074         report TARGET_WAITKIND_NO_RESUMED.
4075         * remote-utils.c (prepare_resume_reply): Handle
4076         TARGET_WAITKIND_NO_RESUMED.
4077         * server.c (report_no_resumed): New global.
4078         (handle_query) <qSupported>: Handle "no-resumed+".  Report
4079         "no-resumed+" support.
4080         (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4081         return error if the client doesn't support no-resumed events.
4082         (push_stop_notification): New function.
4083         (handle_target_event): Use it.  Report TARGET_WAITKIND_NO_RESUMED
4084         events if the client supports them.
4085
4086 2015-11-30  Pedro Alves  <palves@redhat.com>
4087
4088         * linux-low.c (thread_still_has_status_pending_p): Don't check
4089         vCont;t here.
4090         (lwp_resumed): New function.
4091         (status_pending_p_callback): Return early if the LWP is not
4092         supposed to be resumed.
4093
4094 2015-11-30  Pedro Alves  <palves@redhat.com>
4095
4096         * linux-low.c (handle_extended_wait): Assert that the LWP's
4097         waitstatus is TARGET_WAITKIND_IGNORE.  If GDB wants to hear about
4098         thread create events, leave the new child's status pending.
4099         (linux_low_filter_event): If GDB wants to hear about thread exit
4100         events, leave the LWP marked dead and don't delete it.
4101         (linux_wait_for_event_filtered): Don't check for thread exit.
4102         (filter_exit_event): New function.
4103         (linux_wait_1): Use it, when returning an exit event.
4104         (linux_resume_one_lwp_throw): Assert that the LWP's
4105         waitstatus is TARGET_WAITKIND_IGNORE.
4106         * remote-utils.c (prepare_resume_reply): Handle
4107         TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4108         * server.c (report_thread_events): New global.
4109         (handle_general_set): Handle QThreadEvents.
4110         (handle_query) <qSupported>: Handle and report QThreadEvents+;
4111         (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4112         TARGET_WAITKIND_THREAD_EXITED.
4113         * server.h (report_thread_events): Declare.
4114
4115 2015-11-30  Pedro Alves  <palves@redhat.com>
4116
4117         * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4118         the thread's last_resume_kind was resume_stop.
4119
4120 2015-11-30  Pedro Alves  <palves@redhat.com>
4121
4122         * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4123         before returning.
4124
4125 2015-11-30  Pedro Alves  <palves@redhat.com>
4126
4127         * server.c (handle_v_requests): Handle vCtrlC.
4128
4129 2015-11-30  Pedro Alves  <palves@redhat.com>
4130
4131         * gdbthread.h (find_any_thread_of_pid): Declare.
4132         * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4133         functions.
4134         * server.c (handle_query): If current_thread is NULL, look for
4135         another thread of the selected process.
4136
4137 2015-11-26  Daniel Colascione  <dancol@dancol.org>
4138             Simon Marchi  <simon.marchi@ericsson.com>
4139
4140         * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4141         * server.c (handle_qxfer_threads_worker): Refactor to include thread
4142         name in reply.
4143         * target.h (struct target_ops) <thread_name>: New field.
4144         (target_thread_name): New macro.
4145
4146 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
4147
4148         * regcache.h (regcache_invalidate_pid): Add declaration.
4149         * regcache.c (regcache_invalidate_pid): New function, extracted
4150         from regcache_invalidate.
4151         (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4152         Add trivial documentation comment.
4153         * lynx-low.c: Use regcache_invalidate_pid instead of
4154         regcache_invalidate.
4155
4156 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
4157
4158         * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4159         and Elf64_auxv_t if the target is Android.
4160
4161 2015-11-22  Doug Evans  <xdje42@gmail.com>
4162
4163         * target.h: #include <sys/types.h>.
4164
4165 2015-11-19  Pedro Alves  <palves@redhat.com>
4166
4167         * linux-low.c (linux_process_qsupported): Change prototype.
4168         Adjust.
4169         * linux-low.h (struct linux_target_ops) <process_qsupported>:
4170         Change prototype.
4171         * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4172         and adjust to loop over all features.
4173         * server.c (handle_query) <qSupported>: Adjust to call
4174         target_process_qsupported once, passing it a vector of unprocessed
4175         features.
4176         * target.h (struct target_ops) <process_qsupported>: Change
4177         prototype.
4178         (target_process_qsupported): Adjust.
4179
4180 2015-11-19  Pedro Alves  <palves@redhat.com>
4181
4182         * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4183         mode.
4184         * configure: Regenerate.
4185
4186 2015-11-19  Pedro Alves  <palves@redhat.com>
4187
4188         * configure: Regenerate.
4189
4190 2015-11-19  Yao Qi  <yao.qi@linaro.org>
4191
4192         * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4193         type to uint32_t.
4194
4195 2015-11-19  Yao Qi  <yao.qi@linaro.org>
4196
4197         * linux-aarch64-low.c (enum aarch64_operand_type): New.
4198         (struct aarch64_operand): Move enum out.
4199
4200 2015-11-19  Yao Qi  <yao.qi@linaro.org>
4201
4202         * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4203         struct user_fpsimd_state *.
4204         (aarch64_store_fpregset): Likewise.
4205
4206 2015-11-19  Yao Qi  <yao.qi@linaro.org>
4207
4208         * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4209         struct user_pt_regs *.
4210         (aarch64_store_gregset): Likewise.
4211
4212 2015-11-18  Pedro Alves  <palves@redhat.com>
4213
4214         * Makefile.in (all_object_files): Add $IPA_OBJS.
4215
4216 2015-11-17  Pedro Alves  <palves@redhat.com>
4217
4218         * win32-low.c (win32_resume): Use gdb_signal_from_host,
4219         GDB_SIGNAL_0 and gdb_signal_to_string.
4220
4221 2015-11-17  Pedro Alves  <palves@redhat.com>
4222
4223         * win32-low.c (handle_output_debug_string): Remove parameter.
4224         (win32_kill): Remove our_status local and adjust call to
4225         handle_output_debug_string.
4226         (get_child_debug_event): Adjust call to
4227         handle_output_debug_string.
4228
4229 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
4230
4231         * linux-mips-low.c (mips_fill_gregset): Add cast.
4232         (mips_store_gregset): Likewise.
4233         (mips_fill_fpregset): Likewise.
4234         (mips_store_fpregset): Likewise.
4235
4236 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
4237
4238         * linux-mips-low.c (mips_add_watchpoint): Rename private to
4239         priv.
4240
4241 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
4242
4243         * linux-mips-low.c (mips_linux_new_thread): Change type of
4244         watch_type to enum target_hw_bp_type.
4245
4246 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
4247
4248                 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4249                 Change return type to arm_hwbp_type.
4250
4251 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
4252
4253         * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4254         (arm_store_gregset): Likewise.
4255         * linux-arm-low.c (arm_get_hwcap): Likewise.
4256         (arm_read_description): Likewise.
4257
4258 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
4259
4260         * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4261
4262 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
4263
4264         * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4265         (ppc_fill_vsxregset): Likewise.
4266         (ppc_store_vsxregset): Likewise.
4267         (ppc_fill_vrregset): Likewise.
4268         (ppc_store_vrregset): Likewise.
4269         (ppc_fill_evrregset): Likewise.
4270         (ppc_store_evrregset): Likewise.
4271
4272 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
4273
4274         * linux-ppc-low.c (ppc_usrregs_info): Remove
4275         forward-declaration.
4276         (ppc_arch_setup): Move lower in file.
4277
4278 2015-10-30  Simon Marchi  <simon.marchi@ericsson.com>
4279
4280         * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4281         (ps_pdwrite): Likewise.
4282
4283 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4284
4285         * linux-arm-low.c (arm_new_thread): Move pointer dereference
4286         to after assert checks.
4287
4288 2015-10-29  Simon Marchi  <simon.marchi@ericsson.com>
4289
4290         * proc-service.c (ps_pdread): Add/adjust casts.
4291         (ps_pdwrite): Add/adjust casts.
4292
4293 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
4294
4295         * server.c (handle_search_memory_1): Cast return value of
4296         memmem.
4297
4298 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
4299
4300         * server.c (write_qxfer_response): Change type of data to
4301         gdb_byte *.
4302
4303 2015-10-29  Pedro Alves  <palves@redhat.com>
4304
4305         * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4306
4307 2015-10-29  Pedro Alves  <palves@redhat.com>
4308
4309         * tracepoint.c (clear_installed_tracepoints): Add casts.
4310
4311 2015-10-29  Pedro Alves  <palves@redhat.com>
4312
4313         * server.c (handle_v_cont, process_serial_event): Add enum
4314         gdb_signal casts to signal parsing code.
4315
4316 2015-10-29  Pedro Alves  <palves@redhat.com>
4317
4318         * linux-low.h (NULL_REGSET): Define.
4319         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4320         * linux-arm-low.c (arm_regsets): Likewise.
4321         * linux-crisv32-low.c (cris_regsets): Likewise.
4322         * linux-m68k-low.c (m68k_regsets): Likewise.
4323         * linux-mips-low.c (mips_regsets): Likewise.
4324         * linux-nios2-low.c (nios2_regsets): Likewise.
4325         * linux-ppc-low.c (ppc_regsets): Likewise.
4326         * linux-s390-low.c (s390_regsets): Likewise.
4327         * linux-sh-low.c (sh_regsets): Likewise.
4328         * linux-sparc-low.c (sparc_regsets): Likewise.
4329         * linux-tic6x-low.c (tic6x_regsets): Likewise.
4330         * linux-tile-low.c (tile_regsets): Likewise.
4331         * linux-x86-low.c (x86_regsets): Likewise.
4332         * linux-xtensa-low.c (xtensa_regsets): Likewise.
4333
4334 2015-10-29  Pedro Alves  <palves@redhat.com>
4335
4336         * linux-low.h (NULL_REGSET): Define.
4337         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4338         * linux-arm-low.c (arm_regsets): Likewise.
4339         * linux-crisv32-low.c (cris_regsets): Likewise.
4340         * linux-m68k-low.c (m68k_regsets): Likewise.
4341         * linux-mips-low.c (mips_regsets): Likewise.
4342         * linux-nios2-low.c (nios2_regsets): Likewise.
4343         * linux-ppc-low.c (ppc_regsets): Likewise.
4344         * linux-s390-low.c (s390_regsets): Likewise.
4345         * linux-sh-low.c (sh_regsets): Likewise.
4346         * linux-sparc-low.c (sparc_regsets): Likewise.
4347         * linux-tic6x-low.c (tic6x_regsets): Likewise.
4348         * linux-tile-low.c (tile_regsets): Likewise.
4349         * linux-x86-low.c (x86_regsets): Likewise.
4350         * linux-xtensa-low.c (xtensa_regsets): Likewise.
4351
4352 2015-10-26  Doug Evans  <dje@google.com>
4353
4354         * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4355
4356 2015-10-26  Doug Evans  <dje@google.com>
4357
4358         * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4359
4360 2015-10-26  Doug Evans  <dje@google.com>
4361
4362         * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4363         for debug_printf.
4364         (attach_thread, find_new_threads_callback): Ditto.
4365
4366 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4367
4368         * mem-break.h (set_breakpoint_data): Remove.
4369
4370 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4371
4372         * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4373         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4374         (initialize_low): Remove set_breakpoint_data call.
4375         * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4376         (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4377         (initialize_low): Remove set_breakpoint_data call.
4378         * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4379         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4380         (initialize_low): Remove set_breakpoint_data call.
4381
4382 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4383
4384         * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4385         * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4386         * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4387         * target.h (target_breakpoint_kind_from_pc): New macro.
4388
4389 2015-10-22  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4390
4391         * linux-low.c (default_breakpoint_kind_from_pc): New function.
4392         (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4393         the default breakpoint kind.
4394
4395 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4396
4397         * linux-arm-low.c (arm_supports_z_point_type): Add software
4398         breakpoint support.
4399
4400 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4401
4402         * linux-arm-low.c: Refactor breakpoint definitions.
4403         (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4404         (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4405
4406 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4407
4408         * Makefile.in: Add arm.c/o.
4409         * configure.srv: Likewise.
4410         * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4411         (arm_breakpoint_kind_from_pc): New function.
4412         (arm_sw_breakpoint_from_kind): Return proper kind.
4413         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4414
4415 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4416
4417         * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4418         removal.
4419         * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4420         (struct raw_breakpoint) <size>: Remove.
4421         (struct raw_breakpoint) <kind>: Add.
4422         (bp_size): New function.
4423         (bp_opcode): Likewise.
4424         (find_raw_breakpoint_at): Adjust for kind.
4425         (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4426         (remove_memory_breakpoint): Adjust for kind call bp_size.
4427         (set_raw_breakpoint_at): Adjust for kind.
4428         (set_breakpoint): Likewise.
4429         (set_breakpoint_at): Call breakpoint_kind_from_pc.
4430         (delete_raw_breakpoint): Adjust for kind.
4431         (delete_breakpoint): Likewise.
4432         (find_gdb_breakpoint): Likewise.
4433         (set_gdb_breakpoint_1): Likewise.
4434         (set_gdb_breakpoint): Likewise.
4435         (delete_gdb_breakpoint_1): Likewise.
4436         (delete_gdb_breakpoint): Likewise.
4437         (uninsert_raw_breakpoint): Likewise.
4438         (reinsert_raw_breakpoint): Likewise.
4439         (set_breakpoint_data): Remove.
4440         (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4441         (check_mem_read): Adjust for kind call bp_size.
4442         (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4443         (clone_one_breakpoint): Adjust for kind.
4444         * mem-break.h (set_gdb_breakpoint): Likewise.
4445         (delete_gdb_breakpoint): Likewise.
4446         * server.c (process_serial_event): Likewise.
4447
4448 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4449
4450         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4451         (struct linux_target_ops) <breakpoint>: Remove.
4452         (struct linux_target_ops) <breakpoint_len>: Remove.
4453         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4454         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4455         * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4456         (arm_sw_breakpoint_from_kind): New function.
4457         * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4458         (struct linux_target_ops) <breakpoint>: Remove.
4459         (struct linux_target_ops) <breakpoint_len>: Remove.
4460         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4461         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4462         * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4463         (struct linux_target_ops) <breakpoint>: Remove.
4464         (struct linux_target_ops) <breakpoint_len>: Remove.
4465         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4466         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4467         * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4468         (struct linux_target_ops) <breakpoint>: Remove.
4469         (struct linux_target_ops) <breakpoint_len>: Remove.
4470         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4471         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4472         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4473         and sw_breakpoint_from_kind to increment the pc.
4474         (linux_breakpoint_kind_from_pc): New function.
4475         (linux_sw_breakpoint_from_kind): New function.
4476         (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4477         (initialize_low): Call breakpoint_kind_from_pc and
4478         sw_breakpoint_from_kind to replace breakpoint_data/len.
4479         * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4480         New field.
4481         (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4482         * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4483         (struct linux_target_ops) <breakpoint>: Remove.
4484         (struct linux_target_ops) <breakpoint_len>: Remove.
4485         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4486         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4487         * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4488         (struct linux_target_ops) <breakpoint>: Remove.
4489         (struct linux_target_ops) <breakpoint_len>: Remove.
4490         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4491         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4492         * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4493         (struct linux_target_ops) <breakpoint>: Remove.
4494         (struct linux_target_ops) <breakpoint_len>: Remove.
4495         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4496         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4497         * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4498         (struct linux_target_ops) <breakpoint>: Remove.
4499         (struct linux_target_ops) <breakpoint_len>: Remove.
4500         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4501         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4502         * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4503         (struct linux_target_ops) <breakpoint>: Remove.
4504         (struct linux_target_ops) <breakpoint_len>: Remove.
4505         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4506         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4507         * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4508         (struct linux_target_ops) <breakpoint>: Remove.
4509         (struct linux_target_ops) <breakpoint_len>: Remove.
4510         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4511         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4512         * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4513         (struct linux_target_ops) <breakpoint>: Remove.
4514         (struct linux_target_ops) <breakpoint_len>: Remove.
4515         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4516         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4517         * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4518         (struct linux_target_ops) <breakpoint>: Remove.
4519         (struct linux_target_ops) <breakpoint_len>: Remove.
4520         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4521         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4522         * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4523         (struct linux_target_ops) <breakpoint>: Remove.
4524         (struct linux_target_ops) <breakpoint_len>: Remove.
4525         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4526         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4527         * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4528         * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4529         (struct linux_target_ops) <breakpoint>: Remove.
4530         (struct linux_target_ops) <breakpoint_len>: Remove.
4531         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4532         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4533         * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4534         (struct linux_target_ops) <breakpoint>: Remove.
4535         (struct linux_target_ops) <breakpoint_len>: Remove.
4536         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4537         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4538
4539 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4540
4541         * linux-cris-low.c (cris_get_pc): Remove void arg.
4542
4543 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
4544
4545         * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4546         variable name.
4547
4548 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
4549
4550         * inferiors.c (thread_pid_matches_callback): New function.
4551         (find_thread_process): New function.
4552         (remove_thread): Reset current_thread.
4553         (remove_process): Assert threads have been removed first.
4554
4555 2015-10-15  Yao Qi  <yao.qi@linaro.org>
4556
4557         * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4558         if it is 3.
4559         (aarch64_remove_point): Likewise.
4560         * regcache.c (regcache_register_size): New function.
4561
4562 2015-10-12  Yao Qi  <yao.qi@linaro.org>
4563
4564         * linux-aarch64-low.c: Update all callers as emit_load_store
4565         is renamed to aarch64_emit_load_store.
4566
4567 2015-10-12  Yao Qi  <yao.qi@linaro.org>
4568
4569         * linux-aarch64-low.c: Update all callers of function renaming
4570         from emit_insn to aarch64_emit_insn.
4571
4572 2015-10-12  Yao Qi  <yao.qi@linaro.org>
4573
4574         * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4575         arch/aarch64-insn.h.
4576         (struct aarch64_memory_operand): Likewise.
4577         (ENCODE): Likewise.
4578         (emit_insn): Move to arch/aarch64-insn.c.
4579         (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4580         (emit_load_store): Move to arch/aarch64-insn.c.
4581         (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4582         (can_encode_int32): Remove.
4583
4584 2015-10-12  Yao Qi  <yao.qi@linaro.org>
4585
4586         * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4587         (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4588         (aarch64_relocate_instruction): Likewise.
4589         (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4590         (struct aarch64_insn_visitor): Likewise.
4591
4592 2015-10-12  Yao Qi  <yao.qi@linaro.org>
4593
4594         * linux-aarch64-low.c (struct aarch64_insn_data): New.
4595         (struct aarch64_insn_visitor): New.
4596         (struct aarch64_insn_relocation_data): New.
4597         (aarch64_ftrace_insn_reloc_b): New function.
4598         (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4599         (aarch64_ftrace_insn_reloc_cb): Likewise.
4600         (aarch64_ftrace_insn_reloc_tb): Likewise.
4601         (aarch64_ftrace_insn_reloc_adr): Likewise.
4602         (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4603         (aarch64_ftrace_insn_reloc_others): Likewise.
4604         (visitor): New.
4605         (aarch64_relocate_instruction): Use visitor.
4606
4607 2015-10-12  Yao Qi  <yao.qi@linaro.org>
4608
4609         * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4610         int.  Add argument buf.
4611         (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4612         aarch64_relocate_instruction.
4613
4614 2015-10-12  Yao Qi  <yao.qi@linaro.org>
4615
4616         * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4617         argument insn.  Remove local variable insn.  Don't call
4618         target_read_uint32.
4619         (aarch64_install_fast_tracepoint_jump_pad): Call
4620         target_read_uint32.
4621
4622 2015-09-30  Yao Qi  <yao.qi@linaro.org>
4623
4624         * linux-aarch64-low.c (emit_movk): Shorten a long line.
4625         (emit_load_store_pair): Likewise.
4626
4627 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
4628
4629         * dll.c (match_dll): Add cast(s).
4630         (unloaded_dll): Likewise.
4631         * linux-low.c (second_thread_of_pid_p): Likewise.
4632         (delete_lwp_callback): Likewise.
4633         (count_events_callback): Likewise.
4634         (select_event_lwp_callback): Likewise.
4635         (linux_set_resume_request): Likewise.
4636         * server.c (accumulate_file_name_length): Likewise.
4637         (emit_dll_description): Likewise.
4638         (handle_qxfer_threads_worker): Likewise.
4639         (visit_actioned_threads): Likewise.
4640         * thread-db.c (any_thread_of): Likewise.
4641         * tracepoint.c (same_process_p): Likewise.
4642         (match_blocktype): Likewise.
4643         (build_traceframe_info_xml): Likewise.
4644
4645 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
4646
4647         * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4648         assignment.
4649         (gdb_unparse_agent_expr): Likewise.
4650         * hostio.c (require_data): Likewise.
4651         (handle_pread): Likewise.
4652         * linux-low.c (disable_regset): Likewise.
4653         (fetch_register): Likewise.
4654         (store_register): Likewise.
4655         (get_dynamic): Likewise.
4656         (linux_qxfer_libraries_svr4): Likewise.
4657         * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4658         (set_fast_tracepoint_jump): Likewise.
4659         (uninsert_fast_tracepoint_jumps_at): Likewise.
4660         (reinsert_fast_tracepoint_jumps_at): Likewise.
4661         (validate_inserted_breakpoint): Likewise.
4662         (clone_agent_expr): Likewise.
4663         * regcache.c (init_register_cache): Likewise.
4664         * remote-utils.c (putpkt_binary_1): Likewise.
4665         (decode_M_packet): Likewise.
4666         (decode_X_packet): Likewise.
4667         (look_up_one_symbol): Likewise.
4668         (relocate_instruction): Likewise.
4669         (monitor_output): Likewise.
4670         * server.c (handle_search_memory): Likewise.
4671         (handle_qxfer_exec_file): Likewise.
4672         (handle_qxfer_libraries): Likewise.
4673         (handle_qxfer): Likewise.
4674         (handle_query): Likewise.
4675         (handle_v_cont): Likewise.
4676         (handle_v_run): Likewise.
4677         (captured_main): Likewise.
4678         * target.c (write_inferior_memory): Likewise.
4679         * thread-db.c (try_thread_db_load_from_dir): Likewise.
4680         * tracepoint.c (init_trace_buffer): Likewise.
4681         (add_tracepoint_action): Likewise.
4682         (add_traceframe): Likewise.
4683         (add_traceframe_block): Likewise.
4684         (cmd_qtdpsrc): Likewise.
4685         (cmd_qtdv): Likewise.
4686         (cmd_qtstatus): Likewise.
4687         (response_source): Likewise.
4688         (response_tsv): Likewise.
4689         (cmd_qtnotes): Likewise.
4690         (gdb_collect): Likewise.
4691         (initialize_tracepoint): Likewise.
4692
4693 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
4694
4695         * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4696         (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4697         <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4698         <NOP>: New.
4699         (enum aarch64_condition_codes): New enum.
4700         (w0): New static global.
4701         (fp): Likewise.
4702         (lr): Likewise.
4703         (struct aarch64_memory_operand) <type>: New
4704         MEMORY_OPERAND_POSTINDEX type.
4705         (postindex_memory_operand): New helper function.
4706         (emit_ret): New function.
4707         (emit_load_store_pair): New function, factored out of emit_stp
4708         with support for MEMORY_OPERAND_POSTINDEX.
4709         (emit_stp): Rewrite using emit_load_store_pair.
4710         (emit_ldp): New function.
4711         (emit_load_store): Likewise.
4712         (emit_ldr): Mention post-index instruction in comment.
4713         (emit_ldrh): New function.
4714         (emit_ldrb): New function.
4715         (emit_ldrsw): Mention post-index instruction in comment.
4716         (emit_str): Likewise.
4717         (emit_subs): New function.
4718         (emit_cmp): Likewise.
4719         (emit_and): Likewise.
4720         (emit_orr): Likewise.
4721         (emit_orn): Likewise.
4722         (emit_eor): Likewise.
4723         (emit_mvn): Likewise.
4724         (emit_lslv): Likewise.
4725         (emit_lsrv): Likewise.
4726         (emit_asrv): Likewise.
4727         (emit_mul): Likewise.
4728         (emit_sbfm): Likewise.
4729         (emit_sbfx): Likewise.
4730         (emit_ubfm): Likewise.
4731         (emit_ubfx): Likewise.
4732         (emit_csinc): Likewise.
4733         (emit_cset): Likewise.
4734         (emit_nop): Likewise.
4735         (emit_ops_insns): New helper function.
4736         (emit_pop): Likewise.
4737         (emit_push): Likewise.
4738         (aarch64_emit_prologue): New function.
4739         (aarch64_emit_epilogue): Likewise.
4740         (aarch64_emit_add): Likewise.
4741         (aarch64_emit_sub): Likewise.
4742         (aarch64_emit_mul): Likewise.
4743         (aarch64_emit_lsh): Likewise.
4744         (aarch64_emit_rsh_signed): Likewise.
4745         (aarch64_emit_rsh_unsigned): Likewise.
4746         (aarch64_emit_ext): Likewise.
4747         (aarch64_emit_log_not): Likewise.
4748         (aarch64_emit_bit_and): Likewise.
4749         (aarch64_emit_bit_or): Likewise.
4750         (aarch64_emit_bit_xor): Likewise.
4751         (aarch64_emit_bit_not): Likewise.
4752         (aarch64_emit_equal): Likewise.
4753         (aarch64_emit_less_signed): Likewise.
4754         (aarch64_emit_less_unsigned): Likewise.
4755         (aarch64_emit_ref): Likewise.
4756         (aarch64_emit_if_goto): Likewise.
4757         (aarch64_emit_goto): Likewise.
4758         (aarch64_write_goto_address): Likewise.
4759         (aarch64_emit_const): Likewise.
4760         (aarch64_emit_call): Likewise.
4761         (aarch64_emit_reg): Likewise.
4762         (aarch64_emit_pop): Likewise.
4763         (aarch64_emit_stack_flush): Likewise.
4764         (aarch64_emit_zero_ext): Likewise.
4765         (aarch64_emit_swap): Likewise.
4766         (aarch64_emit_stack_adjust): Likewise.
4767         (aarch64_emit_int_call_1): Likewise.
4768         (aarch64_emit_void_call_2): Likewise.
4769         (aarch64_emit_eq_goto): Likewise.
4770         (aarch64_emit_ne_goto): Likewise.
4771         (aarch64_emit_lt_goto): Likewise.
4772         (aarch64_emit_le_goto): Likewise.
4773         (aarch64_emit_gt_goto): Likewise.
4774         (aarch64_emit_ge_got): Likewise.
4775         (aarch64_emit_ops_impl): New static global variable.
4776         (aarch64_emit_ops): New target function, return
4777         &aarch64_emit_ops_impl.
4778         (struct linux_target_ops): Install it.
4779
4780 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
4781
4782         * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4783         * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4784         aarch64-ipa.o.
4785         * linux-aarch64-ipa.c: New file.
4786         * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4787         and endian.h.
4788         (aarch64_get_thread_area): New target method.
4789         (extract_signed_bitfield): New helper function.
4790         (aarch64_decode_ldr_literal): New function.
4791         (enum aarch64_opcodes): New enum.
4792         (struct aarch64_register): New struct.
4793         (struct aarch64_operand): New struct.
4794         (x0): New static global.
4795         (x1): Likewise.
4796         (x2): Likewise.
4797         (x3): Likewise.
4798         (x4): Likewise.
4799         (w2): Likewise.
4800         (ip0): Likewise.
4801         (sp): Likewise.
4802         (xzr): Likewise.
4803         (aarch64_register): New helper function.
4804         (register_operand): Likewise.
4805         (immediate_operand): Likewise.
4806         (struct aarch64_memory_operand): New struct.
4807         (offset_memory_operand): New helper function.
4808         (preindex_memory_operand): Likewise.
4809         (enum aarch64_system_control_registers): New enum.
4810         (ENCODE): New macro.
4811         (emit_insn): New helper function.
4812         (emit_b): New function.
4813         (emit_bcond): Likewise.
4814         (emit_cb): Likewise.
4815         (emit_tb): Likewise.
4816         (emit_blr): Likewise.
4817         (emit_stp): Likewise.
4818         (emit_ldp_q_offset): Likewise.
4819         (emit_stp_q_offset): Likewise.
4820         (emit_load_store): Likewise.
4821         (emit_ldr): Likewise.
4822         (emit_ldrsw): Likewise.
4823         (emit_str): Likewise.
4824         (emit_ldaxr): Likewise.
4825         (emit_stxr): Likewise.
4826         (emit_stlr): Likewise.
4827         (emit_data_processing_reg): Likewise.
4828         (emit_data_processing): Likewise.
4829         (emit_add): Likewise.
4830         (emit_sub): Likewise.
4831         (emit_mov): Likewise.
4832         (emit_movk): Likewise.
4833         (emit_mov_addr): Likewise.
4834         (emit_mrs): Likewise.
4835         (emit_msr): Likewise.
4836         (emit_sevl): Likewise.
4837         (emit_wfe): Likewise.
4838         (append_insns): Likewise.
4839         (can_encode_int32_in): New helper function.
4840         (aarch64_relocate_instruction): New function.
4841         (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4842         (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4843         (struct linux_target_ops): Install aarch64_get_thread_area,
4844         aarch64_install_fast_tracepoint_jump_pad and
4845         aarch64_get_min_fast_tracepoint_insn_len.
4846
4847 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
4848
4849         * Makefile.in (aarch64-insn.o): New rule.
4850         * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4851
4852 2015-09-21  Yao Qi  <yao.qi@linaro.org>
4853
4854         * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4855
4856 2015-09-21  Yao Qi  <yao.qi@linaro.org>
4857
4858         * tracepoint.c (max_jump_pad_size): Remove.
4859
4860 2015-09-18  Yao Qi  <yao.qi@linaro.org>
4861
4862         * linux-aarch64-low.c: Don't include sys/uio.h.
4863         (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4864
4865 2015-09-16  Wei-cheng Wang  <cole945@gmail.com>
4866
4867         * tracepoint.c (eval_result_type): Change prototype.
4868         (condition_true_at_tracepoint): Fix argument to compiled_cond.
4869
4870 2015-09-15  Pedro Alves  <palves@redhat.com>
4871
4872         * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4873         Check whether to report exec events instead of checking whether
4874         multiprocess is enabled.
4875
4876 2015-09-15  Pedro Alves  <palves@redhat.com>
4877
4878         PR remote/18965
4879         * remote-utils.c (prepare_resume_reply): Merge
4880         TARGET_WAITKIND_VFORK_DONE switch case with the
4881         TARGET_WAITKIND_FORKED case.
4882
4883 2015-09-15  Yao Qi  <yao.qi@linaro.org>
4884
4885         * server.c (handle_query): Check string comparison using
4886         "else if" instead of "if".
4887
4888 2015-09-15  Yao Qi  <yao.qi@linaro.org>
4889
4890         * server.c (vCont_supported): New global variable.
4891         (handle_query): Set vCont_supported to 1 if "vContSupported+"
4892         matches.  Append ";vContSupported+" to own_buf.
4893         (handle_v_requests): Append ";s;S" to own_buf if target supports
4894         hardware single step or vCont_supported is false.
4895         (capture_main): Set vCont_supported to zero.
4896
4897 2015-09-15  Yao Qi  <yao.qi@linaro.org>
4898
4899         * linux-low.c (linux_supports_conditional_breakpoints): Rename
4900         it to ...
4901         (linux_supports_hardware_single_step): ... New function.
4902         (linux_target_ops): Update.
4903         * lynx-low.c (lynx_target_ops): Set field
4904         supports_hardware_single_step to target_can_do_hardware_single_step.
4905         * nto-low.c (nto_target_ops): Likewise.
4906         * spu-low.c (spu_target_ops): Likewise.
4907         * win32-low.c (win32_target_ops): Likewise.
4908         * target.c (target_can_do_hardware_single_step): New function.
4909         * target.h (struct target_ops) <supports_conditional_breakpoints>:
4910         Remove.  <supports_hardware_single_step>: New field.
4911         (target_supports_conditional_breakpoints): Remove.
4912         (target_supports_hardware_single_step): New macro.
4913         (target_can_do_hardware_single_step): Declare.
4914         * server.c (handle_query): Use target_supports_hardware_single_step
4915         instead of target_supports_conditional_breakpoints.
4916
4917 2015-09-15  Yao Qi  <yao.qi@linaro.org>
4918
4919         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4920         function.
4921         (struct linux_target_ops the_low_target): Install
4922         aarch64_linux_siginfo_fixup.
4923
4924 2015-09-11  Don Breazeal  <donb@codesourcery.com>
4925             Luis Machado  <lgustavo@codesourcery.com>
4926
4927         * linux-low.c (linux_mourn): Static declaration.
4928         (linux_arch_setup): Move in front of
4929         handle_extended_wait.
4930         (linux_arch_setup_thread): New function.
4931         (handle_extended_wait): Handle exec events.  Call
4932         linux_arch_setup_thread.  Make event_lwp argument a
4933         pointer-to-a-pointer.
4934         (check_zombie_leaders): Do not check stopped threads.
4935         (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4936         (linux_low_filter_event): Add lwp and thread for exec'ing
4937         non-leader thread if leader thread has been deleted.
4938         Refactor code into linux_arch_setup_thread and call it.
4939         Pass child lwp pointer by reference to handle_extended_wait.
4940         (linux_wait_for_event_filtered): Update comment.
4941         (linux_wait_1): Prevent clobbering exec event status.
4942         (linux_supports_exec_events): New function.
4943         (linux_target_ops) <supports_exec_events>: Initialize new member.
4944         * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4945         new member.
4946         * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4947         * server.c (report_exec_events): New global variable.
4948         (handle_query): Handle qSupported query for exec-events feature.
4949         (captured_main): Initialize report_exec_events.
4950         * server.h (report_exec_events): Declare new global variable.
4951         * target.h (struct target_ops) <supports_exec_events>: New
4952         member.
4953         (target_supports_exec_events): New macro.
4954         * win32-low.c (win32_target_ops) <supports_exec_events>:
4955         Initialize new member.
4956
4957 2015-09-09  Markus Metzger  <markus.t.metzger@intel.com>
4958
4959         * linux-low.c (linux_low_enable_btrace): Remove.
4960         (linux_target_ops): Replace linux_low_enable_btrace with
4961         linux_enable_btrace.
4962
4963 2015-09-03  Yao Qi  <yao.qi@linaro.org>
4964
4965         * linux-aarch64-low.c (aarch64_insert_point): Call
4966         aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4967         returns true.
4968
4969 2015-08-27  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4970
4971         * linux-low.c (check_stopped_by_breakpoint): Use
4972         GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4973
4974 2015-08-27  Pedro Alves  <palves@redhat.com>
4975
4976         * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4977
4978 2015-08-26  Simon Marchi  <simon.marchi@ericsson.com>
4979
4980         * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4981         the XNEW-family equivalent.
4982         (compile_bytecodes): Likewise.
4983         * dll.c (loaded_dll): Likewise.
4984         * event-loop.c (append_callback_event): Likewise.
4985         (create_file_handler): Likewise.
4986         (create_file_event): Likewise.
4987         * hostio.c (handle_open): Likewise.
4988         * inferiors.c (add_thread): Likewise.
4989         (add_process): Likewise.
4990         * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4991         * linux-arm-low.c (arm_new_process): Likewise.
4992         (arm_new_thread): Likewise.
4993         * linux-low.c (add_to_pid_list): Likewise.
4994         (linux_add_process): Likewise.
4995         (handle_extended_wait): Likewise.
4996         (add_lwp): Likewise.
4997         (enqueue_one_deferred_signal): Likewise.
4998         (enqueue_pending_signal): Likewise.
4999         (linux_resume_one_lwp_throw): Likewise.
5000         (linux_resume_one_thread): Likewise.
5001         (linux_read_memory): Likewise.
5002         (linux_write_memory): Likewise.
5003         * linux-mips-low.c (mips_linux_new_process): Likewise.
5004         (mips_linux_new_thread): Likewise.
5005         (mips_add_watchpoint): Likewise.
5006         * linux-x86-low.c (initialize_low_arch): Likewise.
5007         * lynx-low.c (lynx_add_process): Likewise.
5008         * mem-break.c (set_raw_breakpoint_at): Likewise.
5009         (set_breakpoint): Likewise.
5010         (add_condition_to_breakpoint): Likewise.
5011         (add_commands_to_breakpoint): Likewise.
5012         (clone_agent_expr): Likewise.
5013         (clone_one_breakpoint): Likewise.
5014         * regcache.c (new_register_cache): Likewise.
5015         * remote-utils.c (look_up_one_symbol): Likewise.
5016         * server.c (queue_stop_reply): Likewise.
5017         (start_inferior): Likewise.
5018         (queue_stop_reply_callback): Likewise.
5019         (handle_target_event): Likewise.
5020         * spu-low.c (fetch_ppc_memory): Likewise.
5021         (store_ppc_memory): Likewise.
5022         * target.c (set_target_ops): Likewise.
5023         * thread-db.c (thread_db_load_search): Likewise.
5024         (try_thread_db_load_1): Likewise.
5025         * tracepoint.c (add_tracepoint): Likewise.
5026         (add_tracepoint_action): Likewise.
5027         (create_trace_state_variable): Likewise.
5028         (cmd_qtdpsrc): Likewise.
5029         (cmd_qtro): Likewise.
5030         (add_while_stepping_state): Likewise.
5031         * win32-low.c (child_add_thread): Likewise.
5032         (get_image_name): Likewise.
5033
5034 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5035
5036         * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5037
5038 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5039
5040         * Makefile.in (aarch64-linux.o): New rule.
5041         * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5042         srv_tgtobj.
5043         * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5044         (aarch64_init_debug_reg_state): Make it extern.
5045         (aarch64_linux_prepare_to_resume): Remove.
5046
5047 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5048
5049         * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5050         lwp_arch_private_info and ptid_of_lwp.
5051
5052 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5053
5054         * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5055         Find proc_info by find_process_pid.  All callers updated.
5056
5057 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5058
5059         * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5060         Remove.
5061         (debug_reg_change_callback): Remove.
5062         (aarch64_notify_debug_reg_change): Remove.
5063
5064 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5065
5066         * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5067         Call current_lwp_ptid.
5068
5069 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5070
5071         * linux-aarch64-low.c (debug_reg_change_callback): Use
5072         debug_printf.
5073
5074 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5075
5076         * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5077
5078 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5079
5080         * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5081
5082 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5083
5084         * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5085         the code.
5086
5087 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5088
5089         * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5090         Remove.
5091         (debug_reg_change_callback): Remove argument entry and add argument
5092         lwp.  Remove local variable thread.  Don't print thread id in the
5093         debugging output.  Don't check whether pid of thread equals to pid.
5094         (aarch64_notify_debug_reg_change): Don't set param.pid.  Call
5095         iterate_over_lwps instead find_inferior.
5096
5097 2015-08-24  Pedro Alves  <palves@redhat.com>
5098
5099         * inferiors.c (get_first_process): New function.
5100         * inferiors.h (get_first_process): New declaration.
5101         * remote-utils.c (read_ptid): Default to the first process in the
5102         list, instead of to the current thread's process.
5103
5104 2015-08-24  Pedro Alves  <palves@redhat.com>
5105
5106         * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5107         * event-loop.c: Likewise.
5108         * remote-utils.c: Likewise.
5109         * tracepoint.c: Likewise.
5110
5111 2015-08-24  Pedro Alves  <palves@redhat.com>
5112
5113         * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5114         ptid_get_lwp.
5115
5116 2015-08-21  Pedro Alves  <palves@redhat.com>
5117
5118         * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5119         instead of literal 1.
5120
5121 2015-08-21  Pedro Alves  <palves@redhat.com>
5122
5123         * tdesc.c (default_description): Explicitly zero-initialize.
5124
5125 2015-08-21  Pedro Alves  <palves@redhat.com>
5126
5127         PR gdb/18749
5128         * inferiors.c (remove_thread): Discard any pending stop reply for
5129         this thread.
5130         * server.c (remove_all_on_match_pid): Rename to ...
5131         (remove_all_on_match_ptid): ... this.  Work with a filter ptid
5132         instead of a pid.
5133         (discard_queued_stop_replies): Change parameter to a ptid.  Now
5134         extern.
5135         (handle_v_kill, kill_inferior_callback, captured_main)
5136         (process_serial_event): Adjust.
5137         * server.h (discard_queued_stop_replies): Declare.
5138
5139 2015-08-21  Pedro Alves  <palves@redhat.com>
5140
5141         * linux-low.c (wait_for_sigstop): Always switch to no thread
5142         selected if the previously current thread dies.
5143         * lynx-low.c (lynx_request_interrupt): Use the first thread's
5144         process instead of the current thread's.
5145         * remote-utils.c (input_interrupt): Don't check if there's no
5146         current thread.
5147         * server.c (gdb_read_memory, gdb_write_memory): If setting the
5148         current thread to the general thread fails, error out.
5149         (handle_qxfer_auxv, handle_qxfer_libraries)
5150         (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5151         (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5152         (handle_query): Check if there's a thread selected instead of
5153         checking whether there's any thread in the thread list.
5154         (handle_qxfer_threads, handle_qxfer_btrace)
5155         (handle_qxfer_btrace_conf): Don't error out early if there's no
5156         thread in the thread list.
5157         (handle_v_cont, myresume): Don't set the current thread to the
5158         continue thread.
5159         (process_serial_event) <Hg handling>: Also set thread_id if the
5160         previous general thread is still alive.
5161         (process_serial_event) <g/G handling>: If setting the current
5162         thread to the general thread fails, error out.
5163         * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5164         thread's lwp instead of the current thread's.
5165         * target.c (set_desired_thread): If the desired thread was not
5166         found, leave the current thread pointing to NULL.  Return an int
5167         (boolean) indicating success.
5168         * target.h (set_desired_thread): Change return type to int.
5169
5170 2015-08-20  Max Filippov  <jcmvbkbc@gmail.com>
5171
5172         * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5173         * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5174         #includes.
5175         (ps_get_thread_area): New function.
5176
5177 2015-08-19  Gary Benson  <gbenson@redhat.com>
5178
5179         * hostio.c (handle_pread): Do not attempt to read more data
5180         than hostio_reply_with_data can fit in a packet.
5181
5182 2015-08-18  Joel Brobecker  <brobecker@adacore.com>
5183
5184         * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5185
5186 2015-08-14  Matthew Fortune  <matthew.fortune@imgtec.com>
5187
5188         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5189
5190 2015-08-06  Pedro Alves  <palves@redhat.com>
5191
5192         * tracepoint.c (expr_eval_result): Now an int.
5193
5194 2015-08-06  Pedro Alves  <palves@redhat.com>
5195
5196         * gdbthread.h (struct regcache): Forward declare.
5197         (struct thread_info) <regcache_data>: Now a struct regcache
5198         pointer.
5199         * inferiors.c (inferior_regcache_data)
5200         (set_inferior_regcache_data): Now work with struct regcache
5201         pointers.
5202         * inferiors.h (struct regcache): Forward declare.
5203         (inferior_regcache_data, set_inferior_regcache_data): Now work
5204         with struct regcache pointers.
5205         * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5206         (free_register_cache_thread): Remove struct regcache pointer
5207         casts.
5208
5209 2015-08-06  Pedro Alves  <palves@redhat.com>
5210
5211         * server.c (captured_main): On error, print the exception message
5212         to stderr, and if run_once is set, throw a quit.
5213
5214 2015-08-06  Pedro Alves  <palves@redhat.com>
5215
5216         * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5217         the current thread.
5218
5219 2015-08-06  Pedro Alves  <palves@redhat.com>
5220
5221         * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5222         reading beyond the passed in buffer length.
5223
5224 2015-08-06  Pierre Langlois  <pierre.langlois@arm.com>
5225
5226         * tracepoint.c (symbol_list) <required>: Remove.
5227
5228 2015-08-06  Pedro Alves  <palves@redhat.com>
5229
5230         * linux-low.c (handle_extended_wait): Set the fork child's suspend
5231         count if stopping and suspending threads.
5232         (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5233         stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5234         (linux_detach): Complete an ongoing step-over.
5235         (lwp_suspended_inc, lwp_suspended_decr): New functions.  Use
5236         throughout.
5237         (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5238         (linux_wait_1): If passing a signal to the inferior after
5239         finishing a step-over, unsuspend and re-resume all lwps.  If we
5240         see a single-step event but the thread should be continuing, don't
5241         pass the trap to gdb.
5242         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5243         internal_error instead of gdb_assert.
5244         (enqueue_pending_signal): New function.
5245         (check_ptrace_stopped_lwp_gone): Add debug output.
5246         (start_step_over): Use internal_error instead of gdb_assert.
5247         (complete_ongoing_step_over): New function.
5248         (linux_resume_one_thread): Don't resume a suspended thread.
5249         (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5250         it stepping.
5251
5252 2015-08-06  Pedro Alves  <palves@redhat.com>
5253
5254         * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5255         (linux_thread_alive): Use lwp_is_marked_dead.
5256         (extended_event_reported): Delete.
5257         (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5258         instead of extended_event_reported.
5259         (mark_lwp_dead): Don't set the 'dead' flag.  Store the waitstatus
5260         as well.
5261         (lwp_is_marked_dead): New function.
5262         (lwp_running): Use lwp_is_marked_dead.
5263         * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5264         comment.
5265
5266 2015-08-06  Pedro Alves  <palves@redhat.com>
5267
5268         * linux-low.c (linux_wait_1): Move fork event output out of the
5269         !report_to_gdb check.  Pass event_child->waitstatus to
5270         target_waitstatus_to_string instead of ourstatus.
5271
5272 2015-08-04  Yao Qi  <yao.qi@linaro.org>
5273
5274         * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5275         if current_thread is 32 bit.
5276
5277 2015-08-04  Yao Qi  <yao.qi@linaro.org>
5278
5279         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5280         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5281         * server.c (extended_protocol): Remove "static".
5282         * server.h (extended_protocol): Declare it.
5283
5284 2015-08-04  Yao Qi  <yao.qi@linaro.org>
5285
5286         * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5287         both aarch64 and aarch32.
5288         (aarch64_set_pc): Likewise.
5289
5290 2015-08-04  Yao Qi  <yao.qi@linaro.org>
5291
5292         * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5293         to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5294         arm-with-neon.xml to srv_xmlfiles.
5295         * linux-aarch64-low.c: Include linux-aarch32-low.h.
5296         (is_64bit_tdesc): New function.
5297         (aarch64_linux_read_description): New function.
5298         (aarch64_arch_setup): Call aarch64_linux_read_description.
5299         (regs_info): Rename to regs_info_aarch64.
5300         (aarch64_regs_info): Return right regs_info.
5301         (initialize_low_arch): Call initialize_low_arch_aarch32.
5302
5303 2015-08-04  Yao Qi  <yao.qi@linaro.org>
5304
5305         * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5306         * linux-aarch32-low.c: New file.
5307         * linux-aarch32-low.h: New file.
5308         * linux-arm-low.c (arm_fill_gregset): Move it to
5309         linux-aarch32-low.c.
5310         (arm_store_gregset): Likewise.
5311         (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5312         (arm_store_vfpregset): Call arm_store_vfpregset_num.
5313         (arm_arch_setup): Check if PTRACE_GETREGSET works.
5314         (regs_info): Rename to regs_info_arm.
5315         (arm_regs_info): Return regs_info_aarch32 if
5316         have_ptrace_getregset is 1 and target description is
5317         arm_with_neon or arm_with_vfpv3.
5318         (initialize_low_arch): Don't call init_registers_arm_with_neon.
5319         Call initialize_low_arch_aarch32 instead.
5320
5321 2015-08-04  Yao Qi  <yao.qi@linaro.org>
5322
5323         * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5324         * linux-low.c: ... here.
5325         * linux-low.h (have_ptrace_getregset): Declare it.
5326
5327 2015-08-04  Pedro Alves  <palves@redhat.com>
5328
5329         * thread-db.c (struct thread_db): Use new typedefs.
5330         (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5331         CHK calls.
5332         (disable_thread_event_reporting): Cast result of dlsym to
5333         destination function pointer type.
5334         (thread_db_mourn): Use td_ta_delete_ftype.
5335
5336 2015-08-03  Sandra Loosemore  <sandra@codesourcery.com>
5337
5338         * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5339         arch variant.
5340         (CDX_BREAKPOINT): Define for R2.
5341         (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5342         (the_low_target): Add comments.
5343
5344 2015-07-30  Yao Qi  <yao.qi@linaro.org>
5345
5346         * linux-arm-low.c (arm_hwcap): Remove it.
5347         (arm_read_description): New local variable arm_hwcap.  Don't
5348         set arm_hwcap to zero.
5349
5350 2015-07-30  Yao Qi  <yao.qi@linaro.org>
5351
5352         * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5353         Use regcache->tdesc instead.
5354         (arm_store_wmmxregset): Likewise.
5355         (arm_fill_vfpregset): Likewise.
5356         (arm_store_vfpregset): Likewise.
5357
5358 2015-07-30  Yao Qi  <yao.qi@linaro.org>
5359
5360         * linux-arm-low.c: Include arch/arm.h.
5361         (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5362         (arm_store_gregset): Likewise.
5363
5364 2015-07-29  Simon Marchi  <simon.marchi@ericsson.com>
5365
5366         * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5367         ptrace's 4th parameter.
5368
5369 2015-07-27  Yao Qi  <yao.qi@linaro.org>
5370
5371         * configure.srv (case aarch64*-*-linux*): Don't set
5372         srv_linux_usrregs.
5373
5374 2015-07-24  Pedro Alves  <palves@redhat.c: Likewise.om>
5375
5376         * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5377         sys/ptrace.h.
5378         * linux-arm-low.c: Likewise.
5379         * linux-cris-low.c: Likewise.
5380         * linux-crisv32-low.c: Likewise.
5381         * linux-low.c: Likewise.
5382         * linux-m68k-low.c: Likewise.
5383         * linux-mips-low.c: Likewise.
5384         * linux-nios2-low.c: Likewise.
5385         * linux-s390-low.c: Likewise.
5386         * linux-sparc-low.c: Likewise.
5387         * linux-tic6x-low.c: Likewise.
5388         * linux-tile-low.c: Likewise.
5389         * linux-x86-low.c: Likewise.
5390
5391 2015-07-24  Pedro Alves  <palves@redhat.com>
5392
5393         * config.in: Regenerate.
5394         * configure: Regenerate.
5395
5396 2015-07-24  Pedro Alves  <palves@redhat.com>
5397
5398         * acinclude.m4: Include ../ptrace.m4.
5399         * configure.ac: Call GDB_AC_PTRACE.
5400         * config.in, configure: Regenerate.
5401
5402 2015-07-24  Yao Qi  <yao.qi@linaro.org>
5403
5404         * linux-low.c (linux_create_inferior): Remove setting to
5405         proc->priv->new_inferior.
5406         (linux_attach): Likewise.
5407         (linux_low_filter_event): Likewise.
5408         * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5409
5410 2015-07-24  Yao Qi  <yao.qi@linaro.org>
5411
5412         * linux-low.c (linux_arch_setup): New function.
5413         (linux_low_filter_event): If proc->tdesc is NULL and
5414         proc->attached is true, call the_low_target.arch_setup.
5415         Otherwise, keep status pending, and return.
5416         (linux_resume_one_lwp_throw): Don't call get_pc if
5417         thread->while_stepping isn't NULL.  Don't call
5418         get_thread_regcache if proc->tdesc is NULL.
5419         (need_step_over_p): Return 0 if proc->tdesc is NULL.
5420         (linux_target_ops): Install arch_setup.
5421         * server.c (start_inferior): Call the_target->arch_setup.
5422         * target.h (struct target_ops) <arch_setup>: New field.
5423         (target_arch_setup): New marco.
5424         * lynx-low.c (lynx_target_ops): Update.
5425         * nto-low.c (nto_target_ops): Update.
5426         * spu-low.c (spu_target_ops): Update.
5427         * win32-low.c (win32_target_ops): Update.
5428
5429 2015-07-24  Yao Qi  <yao.qi@linaro.org>
5430
5431         * linux-low.c (linux_add_process): Don't set
5432         proc->priv->new_inferior.
5433         (linux_create_inferior): Set proc->priv->new_inferior to 1.
5434         (linux_attach): Likewise.
5435
5436 2015-07-24  Yao Qi  <yao.qi@linaro.org>
5437
5438         * server.c (start_inferior): Code refactor.
5439
5440 2015-07-24  Yao Qi  <yao.qi@linaro.org>
5441
5442         * server.c (process_serial_event): Set general_thread.
5443
5444 2015-07-21  Yao Qi  <yao.qi@linaro.org>
5445
5446         * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5447         aarch64_linux_get_debug_reg_capacity.
5448
5449 2015-07-17  Yao Qi  <yao.qi@linaro.org>
5450
5451         * Makefile.in (aarch64-linux-hw-point.o): New rule.
5452         * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5453         * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5454         (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5455         (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5456         (AARCH64_HWP_ALIGNMENT): Likewise.
5457         (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5458         (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5459         (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5460         (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5461         (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5462         (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5463         (struct aarch64_debug_reg_state): Likewise.
5464         (struct arch_lwp_info): Likewise.
5465         (aarch64_align_watchpoint): Likewise.
5466         (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5467         (aarch64_watchpoint_length): Likewise.
5468         (aarch64_point_encode_ctrl_reg): Likewise
5469         (aarch64_point_is_aligned): Likewise.
5470         (aarch64_align_watchpoint): Likewise.
5471         (aarch64_linux_set_debug_regs):
5472         (aarch64_dr_state_insert_one_point): Likewise.
5473         (aarch64_dr_state_remove_one_point): Likewise.
5474         (aarch64_handle_breakpoint): Likewise.
5475         (aarch64_handle_aligned_watchpoint): Likewise.
5476         (aarch64_handle_unaligned_watchpoint): Likewise.
5477         (aarch64_handle_watchpoint): Likewise.
5478
5479 2015-07-17  Yao Qi  <yao.qi@linaro.org>
5480
5481         * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5482         and don't aarch64_get_debug_reg_state.  All callers update.
5483         (aarch64_handle_aligned_watchpoint): Likewise.
5484         (aarch64_handle_unaligned_watchpoint): Likewise.
5485         (aarch64_handle_watchpoint): Likewise.
5486         (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5487         (aarch64_remove_point): Likewise.
5488
5489 2015-07-17  Yao Qi  <yao.qi@linaro.org>
5490
5491         * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5492         debug_printf.
5493         (aarch64_handle_unaligned_watchpoint): Likewise.
5494
5495 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
5496
5497         Revert the previous 3 commits:
5498         Move gdb_regex* to common/
5499         Move linux_find_memory_regions_full & co.
5500         gdbserver build-id attribute generator
5501
5502 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
5503             Jan Kratochvil  <jan.kratochvil@redhat.com>
5504
5505         gdbserver build-id attribute generator.
5506         * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5507         (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5508         (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5509         (find_phdr): New.
5510         (get_dynamic): Use find_pdhr to traverse program headers.
5511         (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5512         (compare_mapping_entry_range, struct find_memory_region_callback_data)
5513         (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5514         (get_hex_build_id): New.
5515         (linux_qxfer_libraries_svr4): Add optional build-id attribute
5516         to reply XML document.
5517
5518 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
5519             Jan Kratochvil  <jan.kratochvil@redhat.com>
5520
5521         * target.c: Include target/target-utils.h and fcntl.h.
5522         (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5523         (target_fileio_read_stralloc): New functions.
5524
5525 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
5526
5527         * Makefile.in (OBS): Add gdb_regex.o.
5528         (gdb_regex.o): New.
5529         * config.in: Rebuilt.
5530         * configure: Rebuilt.
5531
5532 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
5533             Jan Kratochvil  <jan.kratochvil@redhat.com>
5534
5535         Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5536         * Makefile.in (OBS): Add target-utils.o.
5537         (linux-maps.o, target-utils.o): New.
5538         * configure.srv (srv_linux_obj): Add linux-maps.o.
5539
5540 2015-07-15  Pierre Langlois  <pierre.langlois@arm.com>
5541
5542         * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5543         function, return 1.
5544         (the_low_target): Install it.
5545
5546 2015-07-14  Pedro Alves  <palves@redhat.com>
5547
5548         * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5549         Instead, ignore ECHILD, and throw an error for other errnos.
5550
5551 2015-07-10  Pedro Alves  <palves@redhat.com>
5552
5553         * event-loop.c (struct callback_event) <data>: Change type to
5554         gdb_client_data instance instead of gdb_client_data pointer.
5555         (append_callback_event): Adjust.
5556
5557 2015-07-10  Pierre Langlois  <pierre.langlois@arm.com>
5558
5559         * linux-aarch64-low.c: Add comments for each linux_target_ops
5560         method.  Remove comments already covered in target_ops and
5561         linux_target_ops definitions.
5562         (the_low_target): Add comments for each unimplemented method.
5563
5564 2015-07-09  Yao Qi  <yao.qi@linaro.org>
5565
5566         * linux-aarch64-low.c (aarch64_regmap): Remove.
5567         (aarch64_usrregs_info): Remove.
5568         (regs_info): Set field usrregs to NULL.
5569
5570 2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
5571
5572         * linux-low.c: Include "rsp-low.h"
5573         (linux_low_encode_pt_config, linux_low_encode_raw): New.
5574         (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5575         (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5576         (handle_btrace_enable_pt): New.
5577         (handle_btrace_general_set): Support "pt".
5578         (handle_btrace_conf_general_set): Support "pt:size".
5579
5580 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
5581
5582         * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5583         Z_PACKET_SW_BP.
5584
5585 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
5586
5587         * linux-aarch64-low.c: Remove comment about endianness.
5588         (aarch64_breakpoint): Change type to gdb_byte[].  Set to "brk #0".
5589         (aarch64_breakpoint_at): Change type of insn to gdb_byte[].  Use
5590         memcmp.
5591
5592 2015-06-24  Gary Benson  <gbenson@redhat.com>
5593
5594         * linux-i386-ipa.c (stdint.h): Do not include.
5595         * lynx-i386-low.c (stdint.h): Likewise.
5596         * lynx-ppc-low.c (stdint.h): Likewise.
5597         * mem-break.c (stdint.h): Likewise.
5598         * thread-db.c (stdint.h): Likewise.
5599         * tracepoint.c (stdint.h): Likewise.
5600         * win32-low.c (stdint.h): Likewise.
5601
5602 2015-06-18  Simon Marchi  <simon.marchi@ericsson.com>
5603
5604         * server.c (write_qxfer_response): Update call to
5605         remote_escape_output.
5606
5607 2015-06-15  Aleksandar Ristovski  <aristovski@qnx.com
5608             Jan Kratochvil  <jan.kratochvil@redhat.com>
5609
5610         Merge multiple hex conversions.
5611         * gdbreplay.c (tohex): Rename to 'fromhex'.
5612         (logchar): Use fromhex.
5613
5614 2015-06-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
5615
5616         * server.c (handle_qxfer_libraries): Set `version' attribute for
5617         <library-list>.
5618
5619 2015-06-10  Gary Benson  <gbenson@redhat.com>
5620
5621         * target.h (struct target_ops) <multifs_open>: New field.
5622         <multifs_unlink>: Likewise.
5623         <multifs_readlink>: Likewise.
5624         * linux-low.c (nat/linux-namespaces.h): New include.
5625         (linux_target_ops): Initialize the_target->multifs_open,
5626         the_target->multifs_unlink and the_target->multifs_readlink.
5627         * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5628         * hostio.c (hostio_fs_pid): New static variable.
5629         (hostio_handle_new_gdb_connection): New function.
5630         (handle_setfs): Likewise.
5631         (handle_open): Use the_target->multifs_open as appropriate.
5632         (handle_unlink): Use the_target->multifs_unlink as appropriate.
5633         (handle_readlink): Use the_target->multifs_readlink as
5634         appropriate.
5635         (handle_vFile): Handle vFile:setfs packets.
5636         * server.c (handle_query): Call hostio_handle_new_gdb_connection
5637         after target_handle_new_gdb_connection.
5638
5639 2015-06-10  Gary Benson  <gbenson@redhat.com>
5640
5641         * configure.ac (AC_CHECK_FUNCS): Add setns.
5642         * config.in: Regenerate.
5643         * configure: Likewise.
5644         * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5645         (linux-namespaces.o): New rule.
5646         * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5647
5648 2015-06-09  Gary Benson <gbenson@redhat.com>
5649
5650         * hostio.c (handle_open): Process mode argument with
5651         fileio_to_host_mode.
5652
5653 2015-06-01  Yao Qi  <yao.qi@linaro.org>
5654
5655         * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5656         * linux-x86-low.c: Likewise.
5657
5658 2015-05-28  Don Breazeal  <donb@codesourcery.com>
5659
5660         * linux-low.c (handle_extended_wait): Initialize
5661         thread_info.last_resume_kind for new fork children.
5662
5663 2015-05-15  Pedro Alves  <palves@redhat.com>
5664
5665         * target.h (target_handle_new_gdb_connection): Rewrite using if
5666         wrapped in do/while.
5667
5668 2015-05-14  Joel Brobecker  <brobecker@adacore.com>
5669
5670         * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5671         * configure, config.in: Regenerate.
5672         * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5673         Declare typedef.
5674
5675 2015-05-12  Don Breazeal  <donb@codesourcery.com>
5676
5677         * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5678         PTRACE_EVENT_VFORK_DONE.
5679         (linux_low_ptrace_options, extended_event_reported): Add vfork
5680         events.
5681         * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5682         and "vforkdone" for RSP 'T' Stop Reply Packet.
5683         * server.h (report_vfork_events): Declare
5684         global variable.
5685
5686 2015-05-12  Don Breazeal  <donb@codesourcery.com>
5687
5688         * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5689         (the_low_target) <new_fork>: Initialize new member.
5690         * linux-arm-low.c (arm_new_fork): New function.
5691         (the_low_target) <new_fork>: Initialize new member.
5692         * linux-low.c (handle_extended_wait): Call new target function
5693         new_fork.
5694         * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5695         * linux-mips-low.c (mips_add_watchpoint): New function
5696         extracted from mips_insert_point.
5697         (the_low_target) <new_fork>: Initialize new member.
5698         (mips_linux_new_fork): New function.
5699         (mips_insert_point): Call mips_add_watchpoint.
5700         * linux-x86-low.c (x86_linux_new_fork): New function.
5701         (the_low_target) <new_fork>: Initialize new member.
5702
5703 2015-05-12  Don Breazeal  <donb@codesourcery.com>
5704
5705         * linux-low.c (handle_extended_wait): Implement return value,
5706         rename argument 'event_child' to 'event_lwp', handle
5707         PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5708         (linux_low_ptrace_options): New function.
5709         (linux_low_filter_event): Call linux_low_ptrace_options,
5710         use different argument fo linux_enable_event_reporting,
5711         use return value from handle_extended_wait.
5712         (extended_event_reported): New function.
5713         (linux_wait_1): Call extended_event_reported and set
5714         status to report fork events.
5715         (linux_write_memory): Add pid to debug message.
5716         (reset_lwp_ptrace_options_callback): New function.
5717         (linux_handle_new_gdb_connection): New function.
5718         (linux_target_ops): Initialize new structure member.
5719         * linux-low.h (struct lwp_info) <waitstatus>: New member.
5720         * lynx-low.c: Initialize new structure member.
5721         * remote-utils.c (prepare_resume_reply): Implement stop reason
5722         "fork" for "T" stop message.
5723         * server.c (handle_query): Call handle_new_gdb_connection.
5724         * server.h (report_fork_events): Declare global flag.
5725         * target.h (struct target_ops) <handle_new_gdb_connection>:
5726         New member.
5727         (target_handle_new_gdb_connection): New macro.
5728         * win32-low.c: Initialize new structure member.
5729
5730 2015-05-12  Don Breazeal  <donb@codesourcery.com>
5731
5732         * mem-break.c (APPEND_TO_LIST): Define macro.
5733         (clone_agent_expr): New function.
5734         (clone_one_breakpoint): New function.
5735         (clone_all_breakpoints): New function.
5736         * mem-break.h: Declare new functions.
5737
5738 2015-05-12  Don Breazeal  <donb@codesourcery.com>
5739
5740         * linux-low.c (linux_supports_fork_events): New function.
5741         (linux_supports_vfork_events): New function.
5742         (linux_target_ops): Initialize new structure members.
5743         (initialize_low): Call linux_check_ptrace_features.
5744         * lynx-low.c (lynx_target_ops): Initialize new structure
5745         members.
5746         * server.c (report_fork_events, report_vfork_events):
5747         New global flags.
5748         (handle_query): Add new features to qSupported packet and
5749         response.
5750         (captured_main): Initialize new global variables.
5751         * target.h (struct target_ops) <supports_fork_events>:
5752         New member.
5753         <supports_vfork_events>: New member.
5754         (target_supports_fork_events): New macro.
5755         (target_supports_vfork_events): New macro.
5756         * win32-low.c (win32_target_ops): Initialize new structure
5757         members.
5758
5759 2015-05-12  Gary Benson <gbenson@redhat.com>
5760
5761         * server.c (handle_qxfer_exec_file): Use current process
5762         if annex is empty.
5763
5764 2015-05-08  Sandra Loosemore  <sandra@codesourcery.com>
5765
5766         * linux-nios2-low.c: Include elf/common.h.  Adjust comments.
5767         Remove HAVE_PTRACE_GETREGS conditionals.
5768         (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5769         instead of PTRACE_GETREGS and PTRACE_SETREGS.
5770
5771 2015-05-08  Yao Qi  <yao.qi@linaro.org>
5772
5773         * linux-low.c (linux_supports_conditional_breakpoints): New
5774         function.
5775         (linux_target_ops): Install new target method.
5776         * lynx-low.c (lynx_target_ops): Install NULL hook for
5777         supports_conditional_breakpoints.
5778         * nto-low.c (nto_target_ops): Likewise.
5779         * spu-low.c (spu_target_ops): Likewise.
5780         * win32-low.c (win32_target_ops): Likewise.
5781         * server.c (handle_query): Check
5782         target_supports_conditional_breakpoints.
5783         * target.h (struct target_ops) <supports_conditional_breakpoints>:
5784         New field.
5785         (target_supports_conditional_breakpoints): New macro.
5786
5787 2015-05-06  Pedro Alves  <palves@redhat.com>
5788
5789         PR server/18081
5790         * server.c (start_inferior): If the process exits, mourn it.
5791
5792 2015-04-21  Gary Benson <gbenson@redhat.com>
5793
5794         * hostio.c (fileio_open_flags_to_host): Factored out to
5795         fileio_to_host_openflags in common/fileio.c.  Single use
5796         updated.
5797
5798 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
5799
5800         * linux-xtensa-low.c (xtensa_fill_gregset)
5801         (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5802         XCHAL_HAVE_LOOP.
5803
5804 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
5805
5806         * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5807         (regs_info): Replace usrregs pointer with NULL.
5808
5809 2015-04-17  Gary Benson  <gbenson@redhat.com>
5810
5811         * target.h (struct target_ops) <pid_to_exec_file>: New field.
5812         * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5813         * server.c (handle_qxfer_exec_file): New function.
5814         (qxfer_packets): Add exec-file entry.
5815         (handle_query): Report qXfer:exec-file:read as supported packet.
5816
5817 2015-04-14  Romain Naour <romain.naour@openwide.fr>  (tiny change)
5818
5819         * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5820
5821 2015-04-09  Gary Benson <gbenson@redhat.com>
5822
5823         * hostio-errno.c (errno_to_fileio_error): Remove function.
5824         Update caller to use remote_fileio_to_fio_error.
5825
5826 2015-04-09  Yao Qi  <yao.qi@linaro.org>
5827
5828         * linux-low.c (linux_insert_point): Call
5829         insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5830         (linux_remove_point): Call remove_memory_breakpoint if type is
5831         raw_bkpt_type_sw.
5832         * linux-x86-low.c (x86_insert_point): Don't call
5833         insert_memory_breakpoint.
5834         (x86_remove_point): Don't call remove_memory_breakpoint.
5835
5836 2015-04-01  Pedro Alves  <palves@redhat.com>
5837             Cleber Rosa  <crosa@redhat.com>
5838
5839         * server.c (gdbserver_usage): Reorganize and extend the usage
5840         message.
5841
5842 2015-03-24  Pedro Alves  <palves@redhat.com>
5843
5844         * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5845         output.  Also dump TRAP_TRACE.
5846         (linux_low_filter_event): In debug output, distinguish a
5847         resume_stop SIGSTOP from a delayed SIGSTOP.
5848
5849 2015-03-24  Gary Benson  <gbenson@redhat.com>
5850
5851         * linux-x86-low.c (x86_linux_new_thread): Moved to
5852         nat/x86-linux.c.
5853         (x86_linux_prepare_to_resume): Likewise.
5854
5855 2015-03-24  Gary Benson  <gbenson@redhat.com>
5856
5857         * Makefile.in (x86-linux-dregs.o): New rule.
5858         * configure.srv: Add x86-linux-dregs.o to relevant targets.
5859         * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5860         (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5861         (x86_linux_dr_get): Likewise.
5862         (x86_linux_dr_set): Likewise.
5863         (update_debug_registers_callback): Likewise.
5864         (x86_linux_dr_set_addr): Likewise.
5865         (x86_linux_dr_get_addr): Likewise.
5866         (x86_linux_dr_set_control): Likewise.
5867         (x86_linux_dr_get_control): Likewise.
5868         (x86_linux_dr_get_status): Likewise.
5869         (x86_linux_update_debug_registers): Likewise.
5870
5871 2015-03-24  Gary Benson  <gbenson@redhat.com>
5872
5873         * linux-x86-low.c (x86_linux_update_debug_registers):
5874         New function, factored out from...
5875         (x86_linux_prepare_to_resume): ...this.
5876
5877 2015-03-24  Gary Benson  <gbenson@redhat.com>
5878
5879         * linux-x86-low.c (x86_linux_dr_get): Update comments.
5880         (x86_linux_dr_set): Likewise.
5881         (update_debug_registers_callback): Likewise.
5882         (x86_linux_dr_set_addr): Likewise.
5883         (x86_linux_dr_get_addr): Likewise.
5884         (x86_linux_dr_set_control): Likewise.
5885         (x86_linux_dr_get_control): Likewise.
5886         (x86_linux_dr_get_status): Likewise.
5887         (x86_linux_prepare_to_resume): Likewise.
5888
5889 2015-03-24  Gary Benson  <gbenson@redhat.com>
5890
5891         * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5892         Use perror_with_name.  Pass string through gettext.
5893         (x86_linux_dr_set): Likewise.
5894
5895 2015-03-24  Gary Benson  <gbenson@redhat.com>
5896
5897         * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5898         (x86_linux_dr_set_addr): ...this.
5899         (x86_dr_low_get_addr): Rename to...
5900         (x86_linux_dr_get_addr): ...this.
5901         (x86_dr_low_set_control): Rename to...
5902         (x86_linux_dr_set_control): ...this.
5903         (x86_dr_low_get_control): Rename to...
5904         (x86_linux_dr_get_control): ...this.
5905         (x86_dr_low_get_status): Rename to...
5906         (x86_linux_dr_get_status): ...this.
5907         (x86_dr_low): Update with new function names.
5908
5909 2015-03-24  Gary Benson  <gbenson@redhat.com>
5910
5911         * Makefile.in (x86-linux.o): New rule.
5912         * configure.srv: Add x86-linux.o to relevant targets.
5913         * linux-low.c (lwp_set_arch_private_info): New function.
5914         (lwp_arch_private_info): Likewise.
5915         * linux-x86-low.c: Include nat/x86-linux.h.
5916         (arch_lwp_info): Removed structure.
5917         (update_debug_registers_callback):
5918         Use lwp_set_debug_registers_changed.
5919         (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5920         and lwp_set_debug_registers_changed.
5921         (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5922
5923 2015-03-24  Gary Benson  <gbenson@redhat.com>
5924
5925         * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5926         * linux-arm-low.c (arm_new_thread): Likewise.
5927         * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5928         * linux-mips-low.c (mips_linux_new_thread): Likewise.
5929         * linux-x86-low.c (x86_linux_new_thread): Likewise.
5930         * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5931
5932 2015-03-24  Gary Benson  <gbenson@redhat.com>
5933
5934         * linux-low.c (ptid_of_lwp): New function.
5935         (lwp_is_stopped): Likewise.
5936         (lwp_stop_reason): Likewise.
5937         * linux-x86-low.c (update_debug_registers_callback):
5938         Use lwp_is_stopped.
5939         (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5940         lwp_stop_reason.
5941
5942 2015-03-24  Gary Benson  <gbenson@redhat.com>
5943
5944         * linux-low.h (linux_stop_lwp): Remove declaration.
5945
5946 2015-03-24  Gary Benson  <gbenson@redhat.com>
5947
5948         * linux-low.h: Include nat/linux-nat.h.
5949         * linux-low.c (iterate_over_lwps_args): New structure.
5950         (iterate_over_lwps_filter): New function.
5951         (iterate_over_lwps): Likewise.
5952         * linux-x86-low.c (update_debug_registers_callback):
5953         Update signature to what iterate_over_lwps expects.
5954         Remove PID check that iterate_over_lwps now performs.
5955         (x86_dr_low_set_addr): Use iterate_over_lwps.
5956         (x86_dr_low_set_control): Likewise.
5957
5958 2015-03-24  Gary Benson  <gbenson@redhat.com>
5959
5960         * linux-x86-low.c (x86_debug_reg_state): New function.
5961         (x86_linux_prepare_to_resume): Use the above.
5962
5963 2015-03-24  Gary Benson  <gbenson@redhat.com>
5964
5965         * linux-low.c (current_lwp_ptid): New function.
5966         * linux-x86-low.c: Include nat/linux-nat.h.
5967         (x86_dr_low_get_addr): Use current_lwp_ptid.
5968         (x86_dr_low_get_control): Likewise.
5969         (x86_dr_low_get_status): Likewise.
5970
5971 2015-03-20  Pedro Alves  <palves@redhat.com>
5972
5973         * tracepoint.c (cmd_qtstatus): Make "str" const.
5974
5975 2015-03-20  Pedro Alves  <palves@redhat.com>
5976
5977         * server.c (handle_general_set): Make "req_str" const.
5978
5979 2015-03-19  Pedro Alves  <palves@redhat.com>
5980
5981         * linux-low.c (linux_resume_one_lwp): Rename to ...
5982         (linux_resume_one_lwp_throw): ... this.  Don't handle ESRCH here,
5983         instead call perror_with_name.
5984         (check_ptrace_stopped_lwp_gone): New function.
5985         (linux_resume_one_lwp): Reimplement as wrapper around
5986         linux_resume_one_lwp_throw that swallows errors if the LWP is
5987         gone.
5988
5989 2015-03-19  Pedro Alves  <palves@redhat.com>
5990
5991         * linux-low.c (count_events_callback, select_event_lwp_callback):
5992         No longer check whether the thread has resume_stop as last resume
5993         kind.
5994
5995 2015-03-19 Pedro Alves  <palves@redhat.com>
5996
5997         * linux-low.c (count_events_callback, select_event_lwp_callback):
5998         Use the lwp's status_pending_p field, not the thread's.
5999
6000 2015-03-19  Pedro Alves  <palves@redhat.com>
6001
6002         * linux-low.c (select_event_lwp_callback): Update comments to
6003         no longer mention SIGTRAP.
6004
6005 2015-03-18  Gary Benson  <gbenson@redhat.com>
6006
6007         * server.c (handle_query): Do not report vFile:fstat as supported.
6008
6009 2015-03-11  Gary Benson  <gbenson@redhat.com>
6010
6011         * hostio.c (sys/types.h): New include.
6012         (sys/stat.h): Likewise.
6013         (common-remote-fileio.h): Likewise.
6014         (handle_fstat): New function.
6015         (handle_vFile): Handle vFile:fstat packets.
6016
6017 2015-03-11  Gary Benson  <gbenson@redhat.com>
6018
6019         * configure.ac (AC_CHECK_MEMBERS): Add checks for
6020         struct stat.st_blocks and struct stat.st_blksize.
6021         * configure: Regenerate.
6022         * config.in: Likewise.
6023         * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6024         (OBS): Add common-remote-fileio.o.
6025         (common-remote-fileio.o): New rule.
6026
6027 2015-03-09  Pedro Alves  <palves@redhat.com>
6028
6029         * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6030         'struct sockaddr' pointer in 'accept' call.
6031
6032 2015-03-09  Pedro Alves  <palves@redhat.com>
6033
6034         Revert:
6035         2015-03-07  Pedro Alves  <palves@redhat.com>
6036         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6037         or <winsock2.h> here.  Instead include "gdb_socket.h".
6038         (remote_open): Use union gdb_sockaddr_u.
6039         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6040         or <winsock2.h> here.  Instead include "gdb_socket.h".
6041         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6042         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6043         or <sys/un.h>.
6044         (init_named_socket, gdb_agent_helper_thread): Use union
6045         gdb_sockaddr_u.
6046
6047 2015-03-07  Pedro Alves  <palves@redhat.com>
6048
6049         * configure.ac (build_warnings): Move
6050         -Wdeclaration-after-statement to the C-specific set.
6051         * configure: Regenerate.
6052
6053 2015-03-07  Pedro Alves  <palves@redhat.com>
6054
6055         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6056         or <winsock2.h> here.  Instead include "gdb_socket.h".
6057         (remote_open): Use union gdb_sockaddr_u.
6058         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6059         or <winsock2.h> here.  Instead include "gdb_socket.h".
6060         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6061         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6062         or <sys/un.h>.
6063         (init_named_socket, gdb_agent_helper_thread): Use union
6064         gdb_sockaddr_u.
6065
6066 2015-03-07  Pedro Alves  <palves@redhat.com>
6067
6068         Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6069         instead.
6070
6071 2015-03-06  Yao Qi  <yao.qi@linaro.org>
6072
6073         * linux-aarch64-low.c (aarch64_insert_point): Use
6074         show_debug_regs as a boolean.
6075         (aarch64_remove_point): Likewise.
6076
6077 2015-03-05  Pedro Alves  <palves@redhat.com>
6078
6079         * lynx-low.c (lynx_target_ops): Install NULL hooks for
6080         stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6081         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6082         * nto-low.c (nto_target_ops): Likewise.
6083         * spu-low.c (spu_target_ops): Likewise.
6084         * win32-low.c (win32_target_ops): Likewise.
6085
6086 2015-03-04  Pedro Alves  <palves@redhat.com>
6087
6088         * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6089         Decide whether a breakpoint triggered based on the SIGTRAP's
6090         siginfo.si_code.
6091         (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6092         breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6093         (linux_low_filter_event): Check for breakpoints before checking
6094         watchpoints.
6095         (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6096         siginfo.si_code.
6097         (linux_stopped_by_sw_breakpoint)
6098         (linux_supports_stopped_by_sw_breakpoint)
6099         (linux_stopped_by_hw_breakpoint)
6100         (linux_supports_stopped_by_hw_breakpoint): New functions.
6101         (linux_target_ops): Install new target methods.
6102
6103 2015-03-04  Pedro Alves  <palves@redhat.com>
6104
6105         * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6106         * server.c (swbreak_feature, hwbreak_feature): New globals.
6107         (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6108         (captured_main): Clear swbreak_feature and hwbreak_feature.
6109         * server.h (swbreak_feature, hwbreak_feature): Declare.
6110         * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6111         supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6112         supports_stopped_by_hw_breakpoint>: New fields.
6113         (target_supports_stopped_by_sw_breakpoint)
6114         (target_stopped_by_sw_breakpoint)
6115         (target_supports_stopped_by_hw_breakpoint)
6116         (target_stopped_by_hw_breakpoint): Declare.
6117
6118 2015-03-04  Pedro Alves  <palves@redhat.com>
6119
6120         enum lwp_stop_reason -> enum target_stop_reason
6121         * linux-low.c (check_stopped_by_breakpoint): Adjust.
6122         (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6123         (linux_wait_1, stuck_in_jump_pad_callback)
6124         (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6125         (linux_stopped_by_watchpoint):
6126         * linux-low.h (enum lwp_stop_reason): Delete.
6127         (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6128         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6129
6130 2015-03-04  Yao Qi  <yao.qi@linaro.org>
6131
6132         * Makefile.in (SFILES): Add linux-aarch64-low.c.
6133
6134 2015-03-03  Gary Benson  <gbenson@redhat.com>
6135
6136         * hostio.c (handle_vFile): Fix prefix lengths.
6137
6138 2015-03-03  Markus Metzger  <markus.t.metzger@intel.com>
6139
6140         * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6141         ptr_bits.
6142
6143 2015-03-02  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6144
6145         * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6146         (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6147         (clean): Add "rm -f" for above C files.
6148         * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6149         s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6150         (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6151         s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6152         * linux-s390-low.c (HWCAP_S390_VX): New macro.
6153         (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6154         (init_registers_s390x_vx_linux64)
6155         (init_registers_s390x_tevx_linux64)
6156         (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6157         (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6158         declarations.
6159         (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6160         (s390_store_vxrs_high): New functions.
6161         (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6162         NT_S390_VXRS_HIGH.
6163         (s390_arch_setup): Add logic for selecting one of the new target
6164         descriptions.  Activate the new vector regsets if applicable.
6165         (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6166         init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6167         and init_registers_s390x_tevx_linux64.
6168
6169 2015-03-01  Pedro Alves  <palves@redhat.com>
6170
6171         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6172         parameter.
6173
6174 2015-02-27  Pedro Alves  <palves@redhat.com>
6175
6176         * linux-x86-low.c (u_debugreg_offset): New function.
6177         (x86_linux_dr_get, x86_linux_dr_set): Use it.
6178
6179 2015-02-27  Pedro Alves  <palves@redhat.com>
6180
6181         * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6182         [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6183         [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6184         ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6185         (ps_lsetfpregs, ps_getpid)
6186         (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6187         (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6188         (ps_lsetxregs, ps_plog): Declare.
6189
6190 2015-02-27  Pedro Alves  <palves@redhat.com>
6191
6192         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6193         IP_AGENT_EXPORT_FUNC.
6194         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6195         IP_AGENT_EXPORT_FUNC.
6196         * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6197         (IP_AGENT_EXPORT): Delete.
6198         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6199         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6200         (gdb_trampoline_buffer_error, collecting, gdb_collect)
6201         (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6202         (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6203         (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6204         (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6205         (traceframe_read_count, traceframe_write_count)
6206         (traceframes_created, trace_state_variables, get_raw_reg)
6207         (get_trace_state_variable_value, set_trace_state_variable_value)
6208         (ust_loaded, helper_thread_id, cmd_buf): Use
6209         IPA_SYM_EXPORTED_NAME.
6210         (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6211         (tracepoints) Use IP_AGENT_EXPORT_VAR.
6212         (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6213         IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6214         (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6215         (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6216         EXTERN_C_PUSH/EXTERN_C_POP.
6217         (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6218         (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6219         wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6220         (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6221         (traceframe_write_count, traceframe_read_count)
6222         (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6223         (about_to_request_buffer_space, get_trace_state_variable_value)
6224         (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6225         (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6226         EXTERN_C_PUSH/EXTERN_C_POP.
6227         (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6228         (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6229         (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6230         and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6231         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6232         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6233         (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6234         * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6235         Define.
6236         (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6237         (IP_AGENT_EXPORT_VAR_DECL): Define.
6238         (tracing): Declare.
6239         (gdb_agent_get_raw_reg): Declare.
6240
6241 2015-02-27  Tom Tromey  <tromey@redhat.com>
6242             Pedro Alves  <palves@redhat.com>
6243
6244         Rename symbols whose names are reserved C++ keywords throughout.
6245
6246 2015-02-27  Pedro Alves  <palves@redhat.com>
6247
6248         * Makefile.in (COMPILER): New, get it from autoconf.
6249         (CXX): Get from autoconf instead.
6250         (COMPILE.pre): Use COMPILER.
6251         (CC-LD): Rename to ...
6252         (CC_LD): ... this.  Use COMPILER.
6253         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6254         (CXX_FOR_TARGET): Default to g++ instead of gcc.
6255         * acinclude.m4: Include build-with-cxx.m4.
6256         * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6257         Disable -Werror by default if building in C++ mode.
6258         (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6259         -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6260         the C++ compiler.  Save/restore CXXFLAGS too.
6261         * configure: Regenerate.
6262
6263 2015-02-27  Pedro Alves  <palves@redhat.com>
6264
6265         * acinclude.m4: Include libiberty.m4.
6266         * configure.ac: Call libiberty_INIT.
6267         * config.in, configure: Regenerate.
6268
6269 2015-02-26  Pedro Alves  <palves@redhat.com>
6270
6271         * linux-low.c (linux_wait_1): When incrementing the PC past a
6272         program breakpoint always use the_low_target.breakpoint_len as
6273         increment, rather than the maximum between that and
6274         the_low_target.decr_pc_after_break.
6275
6276 2015-02-23  Pedro Alves  <palves@redhat.com>
6277
6278         * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6279         thread was doing a step-over; always adjust the PC if
6280         we stepped over a permanent breakpoint.
6281         (linux_wait_1): If we stepped over breakpoint that was on top of a
6282         permanent breakpoint, manually advance the PC past it.
6283
6284 2015-02-23  Pedro Alves  <palves@redhat.com>
6285
6286         * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6287         modes.
6288         (x86_fill_gregset, x86_store_gregset): Use it when handling
6289         $orig_eax.
6290
6291 2015-02-20  Pedro Alves  <palves@redhat.com>
6292
6293         * thread-db.c: Include "nat/linux-procfs.h".
6294         (thread_db_init): Skip listing new threads if the kernel supports
6295         PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6296
6297 2015-02-20  Pedro Alves  <palves@redhat.com>
6298
6299         * linux-low.c (status_pending_p_callback): Use ptid_match.
6300
6301 2015-02-19  Antoine Tremblay  <antoine.tremblay@ericsson.com>
6302
6303         PR breakpoints/16812
6304         * linux-low.c (wstatus_maybe_breakpoint): Remove.
6305         (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6306         (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6307
6308 2015-02-10  Antoine Tremblay <antoine.tremblay@ericsson.com>
6309
6310         PR breakpoints/15956
6311         * tracepoint.c (cmd_qtinit): Add check for current_thread.
6312
6313 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
6314
6315         * linux-low.c (linux_low_btrace_conf): Print size.
6316         * server.c (handle_btrace_conf_general_set): New.
6317         (hanle_general_set): Call handle_btrace_conf_general_set.
6318         (handle_query): Report Qbtrace-conf:bts:size as supported.
6319
6320 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
6321
6322         * linux-low.c (linux_low_enable_btrace): Update parameters.
6323         (linux_low_btrace_conf): New.
6324         (linux_target_ops)<to_btrace_conf>: Initialize.
6325         * server.c (current_btrace_conf): New.
6326         (handle_btrace_enable): Rename to ...
6327         (handle_btrace_enable_bts): ... this.  Pass &current_btrace_conf
6328         to target_enable_btrace.  Update comment.  Update users.
6329         (handle_qxfer_btrace_conf): New.
6330         (qxfer_packets): Add btrace-conf entry.
6331         (handle_query): Report qXfer:btrace-conf:read as supported packet.
6332         * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6333         (target_ops)<read_btrace_conf>: New.
6334         (target_enable_btrace): Update parameters.
6335         (target_read_btrace_conf): New.
6336
6337 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
6338
6339         * server.c (handle_btrace_general_set): Remove call to
6340         target_supports_btrace.
6341         (supported_btrace_packets): New.
6342         (handle_query): Call supported_btrace_packets.
6343         * target.h: include btrace-common.h.
6344         (btrace_target_info): Removed.
6345         (supports_btrace, target_supports_btrace): Update parameters.
6346
6347 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
6348
6349         * Makefile.in (SFILES): Add common/btrace-common.c.
6350         (OBS): Add common/btrace-common.o.
6351         (btrace-common.o): Add build rules.
6352         * linux-low: Include btrace-common.h.
6353         (linux_low_read_btrace): Use struct btrace_data.  Call
6354         btrace_data_init and btrace_data_fini.
6355
6356 2015-02-06  Pedro Alves  <palves@redhat.com>
6357
6358         * thread-db.c (find_new_threads_callback): Add debug output.
6359
6360 2015-02-04  Pedro Alves  <palves@redhat.com>
6361
6362         * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6363         (resume_stopped_resumed_lwps): New function.
6364         (linux_wait_for_event_filtered): Use it.
6365
6366 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
6367
6368         * Makefile.in (SFILES): Add linux-personality.c.
6369         (linux-personality.o): New rule.
6370         * configure.srv (srv_linux_obj): Add linux-personality.o to the
6371         list of objects to be built.
6372         * linux-low.c: Include nat/linux-personality.h.
6373         (linux_create_inferior): Remove code to disable address space
6374         randomization (moved to ../nat/linux-personality.c).  Create
6375         cleanup to disable address space randomization.
6376
6377 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
6378
6379         * Makefile.in (posix-strerror.o): New rule.
6380         (mingw-strerror.o): Likewise.
6381         * configure: Regenerated.
6382         * configure.ac: Source file ../common/common.host.  Initialize new
6383         variable srv_host_obs.  Add srv_host_obs to GDBSERVER_DEPFILES.
6384
6385 2015-01-14  Yao Qi  <yao@codesourcery.com>
6386
6387         * Makefile.in (SFILES): Add nat/ppc-linux.c.
6388         (ppc-linux.o): New rule.
6389         * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6390         * configure.ac: AC_CHECK_FUNCS(getauxval).
6391         * config.in: Re-generated.
6392         * configure: Re-generated.
6393         * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6394         ppc64_64bit_inferior_p
6395
6396 2015-01-14  Yao Qi  <yao@codesourcery.com>
6397
6398         * linux-ppc-low.c: Include "nat/ppc-linux.h".
6399          (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6400         (PPC_FEATURE_HAS_ALTIVEC,  PPC_FEATURE_HAS_SPE): Likewise.
6401         (PT_ORIG_R3, PT_TRAP): Likewise.
6402         (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6403         (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6404         (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6405
6406 2015-01-10  Joel Brobecker  <brobecker@adacore.com>
6407
6408         * i387-fp.c (i387_cache_to_xsave): In look over
6409         num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6410         zmmh_low_space field by use of zmmh_high_space.
6411
6412 2015-01-09  Pedro Alves  <palves@redhat.com>
6413
6414         * linux-low.c (step_over_bkpt): Move higher up in the file.
6415         (handle_extended_wait): Don't store the stop_pc here.
6416         (get_stop_pc): Adjust comments and rename to ...
6417         (check_stopped_by_breakpoint): ... this.  Record whether the LWP
6418         stopped for a software breakpoint or hardware breakpoint.
6419         (thread_still_has_status_pending_p): New function.
6420         (status_pending_p_callback): Use
6421         thread_still_has_status_pending_p.  If the event is no longer
6422         interesting, resume the LWP.
6423         (handle_tracepoints): Add assert.
6424         (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6425         (wstatus_maybe_breakpoint): New function.
6426         (cancel_breakpoint): Delete function.
6427         (check_stopped_by_watchpoint): New function, factored out from
6428         linux_low_filter_event.
6429         (lp_status_maybe_breakpoint): Delete function.
6430         (linux_low_filter_event): Remove filter_ptid argument.
6431         Leave thread group exits pending here.  Store the LWP's stop PC.
6432         Always leave events pending.
6433         (linux_wait_for_event_filtered): Pull all events out of the
6434         kernel, and leave them all pending.
6435         (count_events_callback, select_event_lwp_callback): Consider all
6436         events.
6437         (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6438         (select_event_lwp): Only give preference to the stepping LWP in
6439         all-stop mode.  Adjust comments.
6440         (ignore_event): New function.
6441         (linux_wait_1): Delete 'retry' label.  Use ignore_event.  Remove
6442         references to cancel_breakpoints.  Adjust to renames.  Also give
6443         equal priority to all LWPs that have had events in non-stop mode.
6444         If reporting a software breakpoint event, unadjust the LWP's PC.
6445         (linux_wait): If linux_wait_1 returned an ignored event, retry.
6446         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6447         Adjust.
6448         (linux_resume_one_lwp): Store the LWP's PC.  Adjust.
6449         (resume_status_pending_p): Use thread_still_has_status_pending_p.
6450         (linux_stopped_by_watchpoint): Adjust.
6451         (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6452         * linux-low.h (enum lwp_stop_reason): New.
6453         (struct lwp_info) <stop_pc>: Adjust comment.
6454         <stopped_by_watchpoint>: Delete field.
6455         <stop_reason>: New field.
6456         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6457         * mem-break.c (software_breakpoint_inserted_here)
6458         (hardware_breakpoint_inserted_here): New function.
6459         * mem-break.h (software_breakpoint_inserted_here)
6460         (hardware_breakpoint_inserted_here): Declare.
6461         * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6462         (cancel_breakpoints): Delete.
6463         * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6464         (upload_fast_traceframes): Remove references to
6465         cancel_breakpoints.
6466
6467 2015-01-09  Pedro Alves  <palves@redhat.com>
6468
6469         * thread-db.c (find_new_threads_callback): Ignore thread if the
6470         kernel thread ID is -1.
6471
6472 2015-01-09  Pedro Alves  <palves@redhat.com>
6473
6474         * linux-low.c (linux_attach_fail_reason_string): Move to
6475         nat/linux-ptrace.c, and rename.
6476         (linux_attach_lwp): Update comment.
6477         (attach_proc_task_lwp_callback): New function.
6478         (linux_attach): Adjust to rename and use
6479         linux_proc_attach_tgid_threads.
6480         (linux_attach_fail_reason_string): Delete declaration.
6481
6482 2015-01-01  Joel Brobecker  <brobecker@adacore.com>
6483
6484         * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6485         * server.c (gdbserver_version): Likewise.
6486
6487 2014-12-29  Sergio Durigan Junior  <sergiodj@redhat.com>
6488
6489         * remote-utils.c: Include ctype.h.
6490         (input_interrupt): Explicitly handle the case when the char
6491         received is the NUL byte.  Improve the printing of non-ASCII
6492         characters.
6493
6494 2014-12-16  Joel Brobecker  <brobecker@adacore.com>
6495
6496         * linux-low.c (linux_low_filter_event): Update call to
6497         linux_enable_event_reporting following the addition of
6498         a new parameter to that function.
6499
6500 2014-12-16  Catalin Udma  <catalin.udma@freescale.com>
6501
6502         PR server/17457
6503         * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6504         (AARCH64_FPCR_REGNO): Likewise.
6505         (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6506         (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6507         (aarch64_store_fpregset): Likewise.
6508
6509 2014-12-15  Joel Brobecker  <brobecker@adacore.com>
6510
6511         * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6512         Remove FIXME comment about assumption about N.
6513
6514 2014-12-13  Joel Brobecker  <brobecker@adacore.com>
6515
6516         * configure.ac: If large-file support is disabled in GDBserver,
6517         pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6518         * configure: Regenerate.
6519
6520 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6521
6522         * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6523         warning upon ENODATA from ptrace.
6524         * linux-s390-low.c (s390_store_tdb): New.
6525         (s390_regsets): Add regset for NT_S390_TDB.
6526
6527 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6528
6529         * linux-low.c (regsets_store_inferior_registers): Skip regsets
6530         without a fill_function.
6531         * linux-s390-low.c (s390_fill_last_break): Remove.
6532         (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6533         (s390_arch_setup): Use regset's size instead of fill_function for
6534         loop end condition.
6535
6536 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6537
6538         * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6539         the regset's store function when ptrace returned an error.
6540         * regcache.c (get_thread_regcache): Invalidate register cache
6541         before fetching inferior's registers.
6542
6543 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6544
6545         * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6546         while-loop as for-loop.
6547         (regsets_store_inferior_registers): Likewise.
6548
6549 2014-11-28  Yao Qi  <yao@codesourcery.com>
6550
6551         * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6552         * config.in, configure: Re-generate.
6553         * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6554         is defined.
6555
6556 2014-11-21  Yao Qi  <yao@codesourcery.com>
6557
6558         * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6559         (AC_CHECK_HEADERS): Remove malloc.h.
6560         * configure: Re-generated.
6561         * config.in: Re-generated.
6562         * server.h: Don't include alloca.h and malloc.h.
6563         * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6564         Don't include malloc.h.
6565
6566 2014-11-17  Joel Brobecker  <brobecker@adacore.com>
6567
6568         * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6569         corresponding ERRNO check in same block.
6570
6571 2014-11-12  Pedro Alves  <palves@redhat.com>
6572
6573         * server.c (cont_thread): Update comment.
6574         (start_inferior, attach_inferior): No longer clear cont_thread.
6575         (handle_v_cont): No longer set cont_thread.
6576         (captured_main): Clear cont_thread each time a GDB connects.
6577
6578 2014-11-12  Pedro Alves  <palves@redhat.com>
6579
6580         * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6581         thread, and don't resume all threads if the Hc thread has exited.
6582
6583 2014-11-12  Pedro Alves  <palves@redhat.com>
6584
6585         * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6586         the process group instead of to a specific LWP.
6587
6588 2014-10-15  Pedro Alves  <palves@redhat.com>
6589
6590         PR server/17487
6591         * win32-arm-low.c (arm_set_thread_context): Remove current_event
6592         parameter.
6593         (arm_set_thread_context): Delete.
6594         (the_low_target): Adjust.
6595         * win32-i386-low.c (debug_registers_changed)
6596         (debug_registers_used): Delete.
6597         (update_debug_registers_callback): New function.
6598         (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6599         needing to update their debug registers.
6600         (win32_get_current_dr): New function.
6601         (x86_dr_low_get_addr, x86_dr_low_get_control)
6602         (x86_dr_low_get_status): Fetch the debug register from the thread
6603         record's context.
6604         (i386_initial_stuff): Adjust.
6605         (i386_get_thread_context): Remove current_event parameter.  Don't
6606         clear debug_registers_changed nor copy DR values to
6607         debug_reg_state.
6608         (i386_set_thread_context): Delete.
6609         (i386_prepare_to_resume): New function.
6610         (i386_thread_added): Mark the thread as needing to update irs
6611         debug registers.
6612         (the_low_target): Remove i386_set_thread_context and install
6613         i386_prepare_to_resume.
6614         * win32-low.c (win32_get_thread_context): Adjust.
6615         (win32_set_thread_context): Use SetThreadContext
6616         directly.
6617         (win32_prepare_to_resume): New function.
6618         (win32_require_context): New function, factored out from ...
6619         (thread_rec): ... this.
6620         (continue_one_thread): Call win32_prepare_to_resume on each thread
6621         we're about to continue.
6622         (win32_resume): Call win32_prepare_to_resume on the event thread.
6623         * win32-low.h (struct win32_thread_info)
6624         <debug_registers_changed>: New field.
6625         (struct win32_target_ops): Change prototype of set_thread_context,
6626         delete set_thread_context and add prepare_to_resume.
6627         (win32_require_context): New declaration.
6628
6629 2014-10-08  Gary Benson  <gbenson@redhat.com>
6630
6631         * server.h: Do not include common-exceptions.h.
6632
6633 2014-10-08  Gary Benson  <gbenson@redhat.com>
6634
6635         * server.h: Do not include cleanups.h.
6636
6637 2014-09-30  James Hogan  <james.hogan@imgtec.com>
6638
6639         * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6640         mips64-dsp-linux.c.
6641
6642 2014-09-23  Yao Qi  <yao@codesourcery.com>
6643
6644         * linux-low.c (lp_status_maybe_breakpoint): New function.
6645         (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6646         (count_events_callback): Likewise.
6647         (select_event_lwp_callback): Likewise.
6648         (cancel_breakpoints_callback): Likewise.
6649
6650 2014-09-19  Don Breazeal  <donb@codesourcery.com>
6651
6652         * linux-low.c (handle_extended_wait): Call
6653         linux_ptrace_get_extended_event.
6654         (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6655         linux_is_extended_waitstatus.
6656
6657 2014-09-16  Joel Brobecker  <brobecker@adacore.com>
6658
6659         * Makefile.in (CPPFLAGS): Define.
6660         (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6661         (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6662
6663 2014-09-16  Gary Benson  <gbenson@redhat.com>
6664
6665         * inferiors.h (current_inferior): Renamed as...
6666         (current_thread): New variable.  All uses updated.
6667         * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6668         (maybe_move_out_of_jump_pad): Likewise.
6669         (cancel_breakpoint): Likewise.
6670         (linux_low_filter_event): Likewise.
6671         (wait_for_sigstop): Likewise.
6672         (linux_resume_one_lwp): Likewise.
6673         (need_step_over_p): Likewise.
6674         (start_step_over): Likewise.
6675         (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6676         * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6677         * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6678         and save_inferior as saved_thread.
6679         * regcache.c (get_thread_regcache): Renamed saved_inferior as
6680         saved_thread.
6681         (regcache_invalidate_thread): Likewise.
6682         * remote-utils.c (prepare_resume_reply): Likewise.
6683         * thread-db.c (thread_db_get_tls_address): Likewise.
6684         (disable_thread_event_reporting): Likewise.
6685         (remove_thread_event_breakpoints): Likewise.
6686         * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6687         as saved_thread.
6688         * target.h (set_desired_inferior): Renamed as...
6689         (set_desired_thread): New declaration.  All uses updated.
6690         * server.c (myresume): Updated comment to reference thread instead
6691         of inferior.
6692         (handle_serial_event): Likewise.
6693         (handle_target_event): Likewise.
6694
6695 2014-09-12  Tom Tromey  <tromey@redhat.com>
6696             Gary Benson  <gbenson@redhat.com>
6697
6698         * regcache.h: Include common-regcache.h.
6699         (regcache_read_pc): Don't declare.
6700         * regcache.c (get_thread_regcache_for_ptid): New function.
6701
6702 2014-09-11  Tom Tromey  <tromey@redhat.com>
6703             Gary Benson  <gbenson@redhat.com>
6704
6705         * symbol.c: New file.
6706         * Makefile.in (SFILES): Add symbol.c.
6707         (OBS): Add symbol.o.
6708
6709 2014-09-11  Gary Benson  <gbenson@redhat.com>
6710
6711         * target.c (target_stop_ptid, target_continue_ptid): New
6712         functions.
6713
6714 2014-09-11  Tom Tromey  <tromey@redhat.com>
6715             Gary Benson  <gbenson@redhat.com>
6716
6717         * target.h: Include target/target.h.
6718         * target.c (target_read_memory, target_read_uint32)
6719         (target_write_memory): New functions.
6720
6721 2014-09-11  Gary Benson  <gbenson@redhat.com>
6722
6723         * server.h (debug_hw_points): Don't declare.
6724         * server.c (debug_hw_points): Don't define.  Replace all uses
6725         with show_debug_regs.
6726         * linux-aarch64-low.c (debug_hw_points): Don't define.  Replace
6727         all uses with show_debug_regs.
6728
6729 2014-09-08  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
6730
6731         * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6732         endianness into account.
6733         (ppc_supply_ptrace_register): Likewise.
6734
6735 2014-09-03  James Hogan  <james.hogan@imgtec.com>
6736
6737         * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6738         to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6739
6740 2014-09-03  Gary Benson  <gbenson@redhat.com>
6741
6742         * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6743         ALL_DEBUG_ADDRESS_REGISTERS.
6744
6745 2014-09-02  Gary Benson  <gbenson@redhat.com>
6746
6747         * i386-low.h: Renamed as...
6748         * x86-low.h: New file.  All type, function and variable name
6749         prefixes changed from "i386_" to "x86_".  All references updated.
6750         * i386-low.c: Renamed as...
6751         * x86-low.c: New file.  All type, function and variable name
6752         prefixes changed from "i386_" to "x86_".  All references updated.
6753
6754 2014-09-02  Gary Benson  <gbenson@redhat.com>
6755
6756         * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6757         (x86_linux_new_thread): Likewise.
6758
6759 2014-08-29  Gary Benson  <gbenson@redhat.com>
6760
6761         * server.h (setjmp.h): Do not include.
6762         (toplevel): Do not declare.
6763         (common-exceptions.h): Include.
6764         (cleanups.h): Likewise.
6765         * server.c (toplevel): Do not define.
6766         (exit_code): New static global.
6767         (detach_or_kill_for_exit_cleanup): New function.
6768         (main): New function.  Original main renamed to...
6769         (captured_main): New function.
6770         * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6771
6772 2014-08-29  Gary Benson  <gbenson@redhat.com>
6773
6774         * Makefile.in (SFILES): Add common/common-exceptions.c.
6775         (OBS): Add common-exceptions.o.
6776         (common-exceptions.o): New rule.
6777         * utils.c (prepare_to_throw_exception): New function.
6778
6779 2014-08-29  Gary Benson  <gbenson@redhat.com>
6780
6781         * config.in: Regenerate.
6782         * configure: Likewise.
6783
6784 2014-08-29  Gary Benson  <gbenson@redhat.com>
6785
6786         * Makefile.in (SFILES): Add common/cleanups.c.
6787         (OBS): cleanups.o.
6788         (cleanups.o): New rule.
6789
6790 2014-08-29  Gary Benson  <gbenson@redhat.com>
6791
6792         * utils.c (internal_vwarning): New function.
6793
6794 2014-08-28  Gary Benson  <gbenson@redhat.com>
6795
6796         * utils.h (fatal): Remove declaration.
6797         * utils.c (fatal): Remove function.
6798
6799 2014-08-28  Gary Benson  <gbenson@redhat.com>
6800
6801         * tracepoint.c (gdb_agent_init): Replace fatal with
6802         perror_with_name.
6803         (initialize_tracepoint): Likewise.
6804
6805 2014-08-28  Gary Benson  <gbenson@redhat.com>
6806
6807         * remote-utils.c (remote_prepare): Replace fatal with error.
6808
6809 2014-08-28  Gary Benson  <gbenson@redhat.com>
6810
6811         * linux-low.c (linux_async): Replace fatal with warning.
6812         Tidy up and return.
6813         (linux_start_non_stop): Return -1 if linux_async failed.
6814
6815 2014-08-28  Gary Benson  <gbenson@redhat.com>
6816
6817         * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6818         gdb_assert.
6819         (i386_dr_low_get_addr): Remove vague comment.
6820         * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6821         gdb_assert.
6822
6823 2014-08-28  Gary Benson  <gbenson@redhat.com>
6824
6825         * inferiors.c (get_thread_process): Replace check with gdb_assert.
6826         * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6827         internal_error.
6828         (linux_resume_one_lwp): Likewise.
6829         * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6830         gdb_assert.
6831         * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6832         with internal_error.
6833         * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6834         (init_register_cache): Replace fatal with gdb_assert_not_reached.
6835         (find_register_by_name): Replace fatal with internal_error.
6836         (find_regno): Likewise.
6837         * tdesc.c (init_target_desc): Replace check with gdb_assert.
6838         * thread-db.c (thread_db_create_event): Likewise.
6839         (thread_db_load_search): Likewise.
6840         (try_thread_db_load_1): Likewise.
6841         * tracepoint.c (get_jump_space_head): Replace fatal with
6842         internal_error.
6843         (claim_trampoline_space): Likewise.
6844         (have_fast_tracepoint_trampoline_buffer): Likewise.
6845         (cmd_qtstart): Likewise.
6846         (stop_tracing): Likewise.
6847         (fast_tracepoint_collecting): Likewise.
6848         (target_malloc): Likewise.
6849         (download_tracepoint): Likewise.
6850         (download_trace_state_variables): Replace check with gdb_assert.
6851         (upload_fast_traceframes): Replace fatal with internal_error.
6852
6853 2014-08-19  Tom Tromey  <tromey@redhat.com>
6854             Gary Benson  <gbenson@redhat.com>
6855
6856         * Makefile.in (SFILES): Add common/common-debug.c.
6857         (OBS): Add common-debug.o.
6858         (common-debug.o): New rule.
6859         * debug.h (debug_printf): Don't declare.
6860         * debug.c (debug_printf): Renamed and rewritten as...
6861         (debug_vprintf): New function.
6862
6863 2014-08-19  Gary Benson  <gbenson@redhat.com>
6864
6865         * utils.h: Do not include print-utils.h.
6866
6867 2014-08-19  Tom Tromey  <tromey@redhat.com>
6868             Gary Benson  <gbenson@redhat.com>
6869
6870         * server.h: Add static assertion.
6871         (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6872
6873 2014-08-19  Tom Tromey  <tromey@redhat.com>
6874             Gary Benson  <gbenson@redhat.com>
6875
6876         * Makefile.in (SFILES): Add common/errors.c.
6877         (OBS): Add errors.o.
6878         (IPA_OBS): Add errors-ipa.o.
6879         (errors.o): New rule.
6880         (errors-ipa.o): Likewise.
6881         * utils.h (perror_with_name, error, warning): Don't declare.
6882         * utils.c (warning): Renamed and rewritten as...
6883         (vwarning): New function.
6884         (error): Renamed and rewritten as...
6885         (verror): New function.
6886         (internal_error): Renamed and rewritten as...
6887         (internal_verror): New function.
6888
6889 2014-08-07  Gary Benson  <gbenson@redhat.com>
6890
6891         * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6892         * configure: Regenerate.
6893         * config.in: Likewise.
6894         * server.h: Do not include errno.h.
6895         * event-loop.c: Likewise.
6896         * hostio-errno.c: Likewise.
6897         * linux-low.c: Likewise.
6898         * remote-utils.c: Likewise.
6899         * spu-low.c: Likewise.
6900         * utils.c: Likewise.
6901         * gdbreplay.c: Unconditionally include errno.h.
6902
6903 2014-08-07  Gary Benson  <gbenson@redhat.com>
6904
6905         * server.h: Do not include string.h.
6906         * event-loop.c: Likewise.
6907         * linux-low.c: Likewise.
6908         * regcache.c: Likewise.
6909         * remote-utils.c: Likewise.
6910         * spu-low.c: Likewise.
6911         * utils.c: Likewise.
6912
6913 2014-08-07  Gary Benson  <gbenson@redhat.com>
6914
6915         * server.h: Do not include gdb_assert.h.
6916
6917 2014-08-07  Gary Benson  <gbenson@redhat.com>
6918
6919         * server.h: Do not include common-utils.h.
6920
6921 2014-08-07  Gary Benson  <gbenson@redhat.com>
6922
6923         * server.h: Do not include ptid.h.
6924         * notif.h: Likewise.
6925
6926 2014-08-07  Gary Benson  <gbenson@redhat.com>
6927
6928         * server.h: Do not include gdb_locale.h.
6929
6930 2014-08-07  Gary Benson  <gbenson@redhat.com>
6931
6932         * server.h: Do not include gdb/signals.h.
6933         * win32-low.c: Likewise.
6934
6935 2014-08-07  Gary Benson  <gbenson@redhat.com>
6936
6937         * server.h: Do not include pathmax.h.
6938
6939 2014-08-07  Gary Benson  <gbenson@redhat.com>
6940
6941         * server.h: Do not include libiberty.h.
6942         * linux-bfin-low.c: Likewise.
6943
6944 2014-08-07  Gary Benson  <gbenson@redhat.com>
6945
6946         * server.h: Do not include ansidecl.h.
6947
6948 2014-08-07  Gary Benson  <gbenson@redhat.com>
6949
6950         * linux-x86-low.c: Do not include stddef.h.
6951         * lynx-ppc-low.c: Likewise.
6952         * tracepoint.c: Likewise.
6953
6954 2014-08-07  Gary Benson  <gbenson@redhat.com>
6955
6956         * server.h: Do not include stdarg.h.
6957         * nto-low.c: Likewise.
6958
6959 2014-08-07  Gary Benson  <gbenson@redhat.com>
6960
6961         * server.h: Do not include stdlib.h.
6962         * inferiors.c: Likewise.
6963         * linux-low.c: Likewise.
6964         * regcache.c: Likewise.
6965         * spu-low.c: Likewise.
6966         * tracepoint.c: Likewise.
6967         * utils.c: Likewise.
6968
6969 2014-08-07  Gary Benson  <gbenson@redhat.com>
6970
6971         * server.h: Do not include stdio.h.
6972         * linux-low.c: Likewise.
6973         * remote-utils.c: Likewise.
6974         * spu-low.c: Likewise.
6975         * utils.c: Likewise.
6976         * wincecompat.c: Likewise.
6977
6978 2014-08-06  Gary Benson  <gbenson@redhat.com>
6979
6980         * regcache.c (init_register_cache): Move conditionals inside if.
6981
6982 2014-08-06  Gary Benson  <gbenson@redhat.com>
6983
6984         * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6985
6986 2014-07-31  Gary Benson  <gbenson@redhat.com>
6987
6988         * ax.h: Do not include server.h.
6989         * gdbthread.h: Likewise.
6990         * lynx-low.h: Likewise.
6991         * notif.h: Likewise.
6992
6993 2014-07-30  Gary Benson  <gbenson@redhat.com>
6994
6995         * server.h: Include common-defs.h.
6996         Do not include config.h or build-gnulib-gdbserver/config.h.
6997
6998 2014-07-30  Gary Benson  <gbenson@redhat.com>
6999
7000         * hostio-errno.c: Move server.h to top of includes list.
7001         * inferiors.c: Likewise.
7002         * linux-x86-low.c: Likewise.
7003         * notif.c: Include server.h.
7004
7005 2014-07-24  Tom Tromey  <tromey@redhat.com>
7006             Gary Benson  <gbenson@redhat.com>
7007
7008         * server.h (CORE_ADDR): Now unsigned.
7009
7010 2014-07-16  Pedro Alves  <palves@redhat.com>
7011
7012         * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7013
7014 2014-07-15  Pedro Alves  <palves@redhat.com>
7015
7016         * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7017         copy.
7018
7019 2014-07-11  Pedro Alves  <palves@redhat.com>
7020
7021         * linux-low.c (kill_wait_lwp): New function, based on
7022         kill_one_lwp_callback, but use my_waitpid directly.
7023         (kill_one_lwp_callback, linux_kill): Use it.
7024
7025 2014-06-23  Pedro Alves  <palves@redhat.com>
7026
7027         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7028         before setting DR0..DR3.
7029
7030 2014-06-20  Gary Benson  <gbenson@redhat.com>
7031
7032         * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7033         * configure: Regenerated.
7034         * config.in: Likewise.
7035
7036 2014-06-20  Gary Benson  <gbenson@redhat.com>
7037
7038         * Makefile.in (SFILES): Update locations for files moved
7039         from common to nat.
7040         (object file files): Reordered.
7041
7042 2014-06-20  Gary Benson  <gbenson@redhat.com>
7043
7044         * i386-low.h (i386_dr_low_can_set_addr): Removed.
7045         (i386_dr_low_set_addr): Likewise.
7046         (i386_dr_low_get_addr): Likewise.
7047         (i386_dr_low_can_set_control): Likewise.
7048         (i386_dr_low_set_control): Likewise.
7049         (i386_dr_low_get_control): Likewise.
7050         (i386_dr_low_get_status): Likewise.
7051         (i386_get_debug_register_length): Likewise.
7052         * linux-x86-low.c (i386_dr_low_set_addr):
7053         Changed signature.  Made static.
7054         (i386_dr_low_get_addr): Likewise.
7055         (i386_dr_low_set_control): Likewise.
7056         (i386_dr_low_get_control): Likewise.
7057         (i386_dr_low_get_status): Likewise.
7058         (i386_dr_low): New global variable.
7059         * win32-i386-low.c (i386_dr_low_set_addr):
7060         Changed signature.  Made static.
7061         (i386_dr_low_get_addr): Likewise.
7062         (i386_dr_low_set_control): Likewise.
7063         (i386_dr_low_get_control): Likewise.
7064         (i386_dr_low_get_status): Likewise.
7065         (i386_dr_low): New global variable.
7066
7067 2014-06-20  Marcus Shawcroft  <marcus.shawcroft@arm.com>
7068
7069         * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7070         * Makefile.in (AR, AR_FLAGS): Define.
7071         * configure: Regenerate.
7072
7073 2014-06-19  Gary Benson  <gbenson@redhat.com>
7074
7075         * Makefile.in (i386-dregs.o): New rule.
7076         * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7077         * i386-low.c (target.h): Remove include.
7078         (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7079         (DR_CONTROL_SHIFT): Likewise.
7080         (DR_CONTROL_SIZE): Likewise.
7081         (DR_RW_EXECUTE): Likewise.
7082         (DR_RW_WRITE): Likewise.
7083         (DR_RW_READ): Likewise.
7084         (DR_RW_IORW): Likewise.
7085         (DR_LEN_1): Likewise.
7086         (DR_LEN_2): Likewise.
7087         (DR_LEN_4): Likewise.
7088         (DR_LEN_8): Likewise.
7089         (DR_LOCAL_ENABLE_SHIFT): Likewise.
7090         (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7091         (DR_ENABLE_SIZE): Likewise.
7092         (DR_LOCAL_SLOWDOWN): Likewise.
7093         (DR_GLOBAL_SLOWDOWN): Likewise.
7094         (DR_CONTROL_RESERVED): Likewise.
7095         (I386_DR_CONTROL_MASK): Likewise.
7096         (I386_DR_VACANT): Likewise.
7097         (I386_DR_LOCAL_ENABLE): Likewise.
7098         (I386_DR_GLOBAL_ENABLE): Likewise.
7099         (I386_DR_DISABLE): Likewise.
7100         (I386_DR_SET_RW_LEN): Likewise.
7101         (I386_DR_GET_RW_LEN): Likewise.
7102         (I386_DR_WATCH_HIT): Likewise.
7103         (i386_wp_op_t): Likewise.
7104         (i386_show_dr): Likewise.
7105         (i386_length_and_rw_bits): Likewise.
7106         (i386_insert_aligned_watchpoint): Likewise.
7107         (i386_remove_aligned_watchpoint): Likewise.
7108         (i386_handle_nonaligned_watchpoint): Likewise.
7109         i386_update_inferior_debug_regs(): Likewise.
7110         (i386_dr_insert_watchpoint): Likewise.
7111         (i386_dr_remove_watchpoint): Likewise.
7112         (i386_dr_region_ok_for_watchpoint): Likewise.
7113         (i386_dr_stopped_data_address): Likewise.
7114         (i386_dr_stopped_by_watchpoint): Likewise.
7115
7116 2014-06-19  Gary Benson  <gbenson@redhat.com>
7117
7118         * i386-low.c (i386_dr_show): Renamed to
7119         i386_show_dr and made static.  All uses updated.
7120         (i386_dr_length_and_rw_bits): Renamed to
7121         i386_length_and_rw_bits and made static.
7122         All uses updated.
7123         (i386_dr_insert_aligned_watchpoint): Renamed to
7124         i386_insert_aligned_watchpoint and made static.
7125         All uses updated.
7126         (i386_dr_remove_aligned_watchpoint): Renamed to
7127         i386_remove_aligned_watchpoint and made static.
7128         All uses updated.
7129         (i386_dr_update_inferior_debug_regs): Renamed to
7130         i386_update_inferior_debug_regs and made static.
7131         All uses updated.
7132
7133 2014-06-18  Gary Benson  <gbenson@redhat.com>
7134
7135         * i386-low.h (i386_dr_low_can_set_addr): New macro.
7136         (i386_dr_low_can_set_control): Likewise.
7137         (i386_get_debug_register_length): Likewise.
7138         * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7139         (i386_dr_low_can_set_control): Likewise.
7140         (i386_get_debug_register_length): Likewise.
7141
7142 2014-06-17  Gary Benson  <gbenson@redhat.com>
7143
7144         * i386-low.h (i386-dregs.h): New include.
7145         (DR_FIRSTADDR): Now in i386-dregs.h.
7146         (DR_LASTADDR): Likewise.
7147         (DR_NADDR): Likewise.
7148         (DR_STATUS): Likewise.
7149         (DR_CONTROL): Likewise.
7150         (i386_debug_reg_state): Likewise.
7151         (i386_dr_insert_watchpoint): Likewise.
7152         (i386_dr_remove_watchpoint): Likewise.
7153         (i386_dr_region_ok_for_watchpoint): Likewise.
7154         (i386_dr_stopped_data_address): Likewise.
7155         (i386_dr_stopped_by_watchpoint): Likewise.
7156         * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7157
7158 2014-06-18  Gary Benson  <gbenson@redhat.com>
7159
7160         * i386-low.h (i386_low_insert_watchpoint): Renamed to
7161         i386_dr_insert_watchpoint.
7162         (i386_low_remove_watchpoint): Renamed to
7163         i386_dr_remove_watchpoint.
7164         (i386_low_region_ok_for_watchpoint): Renamed to
7165         i386_dr_region_ok_for_watchpoint.
7166         (i386_low_stopped_data_address): Renamed to
7167         i386_dr_stopped_data_address.
7168         (i386_low_stopped_by_watchpoint): Renamed to
7169         i386_dr_stopped_by_watchpoint.
7170         * i386-low.c (i386_show_dr): Renamed to
7171         i386_dr_show and made nonstatic.  All uses updated.
7172         (i386_length_and_rw_bits): Renamed to
7173         i386_dr_length_and_rw_bits and made nonstatic.
7174         All uses updated.
7175         (i386_insert_aligned_watchpoint): Renamed to
7176         i386_dr_insert_aligned_watchpoint and made nonstatic.
7177         All uses updated.
7178         (i386_remove_aligned_watchpoint): Renamed to
7179         i386_dr_remove_aligned_watchpoint and made nonstatic.
7180         All uses updated.
7181         (i386_update_inferior_debug_regs): Renamed to
7182         i386_dr_update_inferior_debug_regs and made nonstatic.
7183         All uses updated.
7184         (i386_low_insert_watchpoint): Renamed to
7185         i386_dr_insert_watchpoint.  All uses updated.
7186         (i386_low_remove_watchpoint): Renamed to
7187         i386_dr_remove_watchpoint.  All uses updated.
7188         (i386_low_region_ok_for_watchpoint): Renamed to
7189         i386_dr_region_ok_for_watchpoint.  All uses updated.
7190         (i386_low_stopped_data_address): Renamed to
7191         i386_dr_stopped_data_address.  All uses updated.
7192         (i386_low_stopped_by_watchpoint): Renamed to
7193         i386_dr_stopped_by_watchpoint.  All uses updated.
7194
7195 2014-06-18  Gary Benson  <gbenson@redhat.com>
7196
7197         * i386-low.c (i386_dr_low_can_set_addr): New macro.
7198         (i386_dr_low_can_set_control): Likewise.
7199         (i386_insert_aligned_watchpoint): New check.
7200
7201 2014-06-18  Gary Benson  <gbenson@redhat.com>
7202
7203         * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7204         Renamed to state.
7205
7206 2014-06-18  Gary Benson  <gbenson@redhat.com>
7207
7208         * i386-low.c (i386_length_and_rw_bits): Use internal_error
7209         instead of fatal and error.
7210         (i386_handle_nonaligned_watchpoint): Likewise.
7211
7212 2014-06-18  Gary Benson  <gbenson@redhat.com>
7213
7214         * i386-low.c (i386_get_debug_register_length): New macro.
7215         (TARGET_HAS_DR_LEN_8): Remove conditional.  Use above macro.
7216         (i386_show_dr): Use debug_printf instead of fprintf.  Use
7217         phex to format values.
7218
7219 2014-06-18  Gary Benson  <gbenson@redhat.com>
7220
7221         * i386-low.h: Comment changes.
7222         * i386-low.c: Likewise.
7223
7224 2014-06-18  Gary Benson  <gbenson@redhat.com>
7225
7226         * i386-low.c: Whitespace changes.
7227
7228 2014-06-12  Tom Tromey  <tromey@redhat.com>
7229
7230         * utils.c (freeargv): Remove.
7231
7232 2014-06-12  Tom Tromey  <tromey@redhat.com>
7233
7234         * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7235         * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7236         (parse_debug_format_options): Likewise.
7237         (gdbserver_usage): Likewise.
7238         * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7239         (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7240         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7241         against libiberty.
7242         ($(LIBGNU)): Depend on libiberty.
7243         (all-lib): Recurse into all subdirs.
7244         (install-only): Invoke "install" target in subdirs.
7245         (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7246         targets.
7247         * configure: Rebuild.
7248         * configure.ac: Add ACX_CONFIGURE_DIR for libiberty.  Don't check
7249         for vasprintf, vsnprintf, or gettimeofday.
7250         * configure.srv: Don't add safe-ctype.o or lbasename.o to
7251         srv_tgtobj.
7252
7253 2014-06-05  Joel Brobecker  <brobecker@adacore.com>
7254
7255         * development.sh: Delete.
7256         * Makefile.in (config.status): Adjust dependency on development.sh.
7257         * configure.ac: Adjust development.sh source call.
7258         * configure: Regenerate.
7259
7260 2014-06-02  Pedro Alves  <palves@redhat.com>
7261
7262         * ax.c (gdb_free_agent_expr): New function.
7263         * ax.h (gdb_free_agent_expr): New declaration.
7264         * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7265         list.
7266         (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7267         static.
7268         (clear_breakpoint_conditions_and_commands): New function.
7269         * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7270         (clear_breakpoint_conditions_and_commands): New declaration.
7271
7272 2014-05-23  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
7273
7274         * linux-aarch64-low.c (asm/ptrace.h): Include.
7275
7276 2014-05-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
7277
7278         Fix TLS access for -static -pthread.
7279         * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7280         (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7281         (thread_db_load_search, try_thread_db_load_1): Initialize it.
7282
7283 2014-05-20  Pedro Alves  <palves@redhat.com>
7284
7285         * linux-aarch64-low.c (aarch64_insert_point)
7286         (aarch64_remove_point): No longer check whether the type is
7287         supported here.  Adjust to new interface.
7288         (the_low_target): Install aarch64_supports_z_point_type as
7289         supports_z_point_type method.
7290         * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7291         (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7292         instead of a Z packet char.  Adjust.
7293         (arm_supports_z_point_type): New function.
7294         (arm_insert_point, arm_remove_point): Adjust to new interface.
7295         (the_low_target): Install arm_supports_z_point_type.
7296         * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7297         (cris_insert_point, cris_remove_point): Adjust to new interface.
7298         Don't check whether the type is supported here.
7299         (the_low_target): Install cris_supports_z_point_type.
7300         * linux-low.c (linux_supports_z_point_type): New function.
7301         (linux_insert_point, linux_remove_point): Adjust to new interface.
7302         * linux-low.h (struct linux_target_ops) <insert_point,
7303         remove_point>: Take an enum raw_bkpt_type instead of a char.  Add
7304         raw_breakpoint pointer parameter.
7305         <supports_z_point_type>: New method.
7306         * linux-mips-low.c (mips_supports_z_point_type): New function.
7307         (mips_insert_point, mips_remove_point): Adjust to new interface.
7308         Use mips_supports_z_point_type.
7309         (the_low_target): Install mips_supports_z_point_type.
7310         * linux-ppc-low.c (the_low_target): Install NULL as
7311         supports_z_point_type method.
7312         * linux-s390-low.c (the_low_target): Install NULL as
7313         supports_z_point_type method.
7314         * linux-sparc-low.c (the_low_target): Install NULL as
7315         supports_z_point_type method.
7316         * linux-x86-low.c (x86_supports_z_point_type): New function.
7317         (x86_insert_point): Adjust to new insert_point interface.  Use
7318         insert_memory_breakpoint.  Adjust to new
7319         i386_low_insert_watchpoint interface.
7320         (x86_remove_point): Adjust to remove_point interface.  Use
7321         remove_memory_breakpoint.  Adjust to new
7322         i386_low_remove_watchpoint interface.
7323         (the_low_target): Install x86_supports_z_point_type.
7324         * lynx-low.c (lynx_target_ops): Install NULL as
7325         supports_z_point_type callback.
7326         * nto-low.c (nto_supports_z_point_type): New.
7327         (nto_insert_point, nto_remove_point): Adjust to new interface.
7328         (nto_target_ops): Install nto_supports_z_point_type.
7329         * mem-break.c: Adjust intro comment.
7330         (struct raw_breakpoint) <raw_type, size>: New fields.
7331         <inserted>: Update comment.
7332         <shlib_disabled>: Delete field.
7333         (enum bkpt_type) <gdb_breakpoint>: Delete value.
7334         <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7335         gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7336         (raw_bkpt_type_to_target_hw_bp_type): New function.
7337         (find_enabled_raw_code_breakpoint_at): New function.
7338         (find_raw_breakpoint_at): New type and size parameters.  Use them.
7339         (insert_memory_breakpoint): New function, based off
7340         set_raw_breakpoint_at.
7341         (remove_memory_breakpoint): New function.
7342         (set_raw_breakpoint_at): Reimplement.
7343         (set_breakpoint): New, based on set_breakpoint_at.
7344         (set_breakpoint_at): Reimplement.
7345         (delete_raw_breakpoint): Go through the_target->remove_point
7346         instead of assuming memory breakpoints.
7347         (find_gdb_breakpoint_at): Delete.
7348         (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7349         (find_gdb_breakpoint): New function.
7350         (set_gdb_breakpoint_at): Delete.
7351         (z_type_supported): New function.
7352         (set_gdb_breakpoint_1): New function, loosely based off
7353         set_gdb_breakpoint_at.
7354         (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7355         (delete_gdb_breakpoint_at): Delete.
7356         (delete_gdb_breakpoint_1): New function, loosely based off
7357         delete_gdb_breakpoint_at.
7358         (delete_gdb_breakpoint): New function.
7359         (clear_gdb_breakpoint_conditions): Rename to ...
7360         (clear_breakpoint_conditions): ... this.  Don't handle a NULL
7361         breakpoint.
7362         (add_condition_to_breakpoint): Make static.
7363         (add_breakpoint_condition): Take a struct breakpoint pointer
7364         instead of an address.  Adjust.
7365         (gdb_condition_true_at_breakpoint): Rename to ...
7366         (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7367         z_type parameter.
7368         (gdb_condition_true_at_breakpoint): Reimplement.
7369         (add_breakpoint_commands): Take a struct breakpoint pointer
7370         instead of an address.  Adjust.
7371         (gdb_no_commands_at_breakpoint): Rename to ...
7372         (gdb_no_commands_at_breakpoint_z_type): ... this.  Add z_type
7373         parameter.  Return true if no breakpoint was found.  Change debug
7374         output.
7375         (gdb_no_commands_at_breakpoint): Reimplement.
7376         (run_breakpoint_commands): Rename to ...
7377         (run_breakpoint_commands_z_type): ... this.  Add z_type parameter,
7378         and change return type to boolean.
7379         (run_breakpoint_commands): New function.
7380         (gdb_breakpoint_here): Also check for Z1 breakpoints.
7381         (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7382         breakpoint.  Go through the_target->remove_point instead of
7383         assuming memory breakpoint.
7384         (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7385         software and hardware breakpoints.
7386         (reinsert_raw_breakpoint): Go through the_target->insert_point
7387         instead of assuming memory breakpoint.
7388         (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7389         software and hardware breakpoints.
7390         (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7391         Check both software and hardware breakpoints.
7392         (validate_inserted_breakpoint): Assert the breakpoint is a
7393         software breakpoint.  Set the inserted flag to -1 instead of
7394         setting shlib_disabled.
7395         (delete_disabled_breakpoints): Adjust.
7396         (validate_breakpoints): Only validate software breakpoints.
7397         Adjust to inserted flag change.
7398         (check_mem_read, check_mem_write): Skip breakpoint types other
7399         than software breakpoints.  Adjust to inserted flag change.
7400         * mem-break.h (enum raw_bkpt_type): New enum.
7401         (raw_breakpoint, struct process_info): Forward declare.
7402         (Z_packet_to_target_hw_bp_type): Delete declaration.
7403         (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7404         (set_gdb_breakpoint, delete_gdb_breakpoint)
7405         (clear_breakpoint_conditions): New declarations.
7406         (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7407         (breakpoint_inserted_here): Update comment.
7408         (add_breakpoint_condition, add_breakpoint_commands): Replace
7409         address parameter with a breakpoint pointer parameter.
7410         (gdb_breakpoint_here): Update comment.
7411         (delete_gdb_breakpoint_at): Delete.
7412         (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7413         * server.c (process_point_options): Take a struct breakpoint
7414         pointer instead of an address.  Adjust.
7415         (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7416         delete_gdb_breakpoint.
7417         * spu-low.c (spu_target_ops): Install NULL as
7418         supports_z_point_type method.
7419         * target.h: Include mem-break.h.
7420         (struct target_ops) <prepare_to_access_memory>: Update comment.
7421         <supports_z_point_type>: New field.
7422         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7423         instead of a char.  Also take a raw breakpoint pointer.
7424         * win32-arm-low.c (the_low_target): Install NULL as
7425         supports_z_point_type.
7426         * win32-i386-low.c (i386_supports_z_point_type): New function.
7427         (i386_insert_point, i386_remove_point): Adjust to new interface.
7428         (the_low_target): Install i386_supports_z_point_type.
7429         * win32-low.c (win32_supports_z_point_type): New function.
7430         (win32_insert_point, win32_remove_point): Adjust to new interface.
7431         (win32_target_ops): Install win32_supports_z_point_type.
7432         * win32-low.h (struct win32_target_ops):
7433         <supports_z_point_type>: New method.
7434         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7435         instead of a char.  Also take a raw breakpoint pointer.
7436
7437 2014-05-20  Pedro Alves  <palves@redhat.com>
7438
7439         * mem-break.h: Include break-common.h.
7440         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7441         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7442         (Z_packet_to_target_hw_bp_type): New declaration.
7443         * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7444         * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7445         (Z_PACKET_ACCESS_WP): Delete macros.
7446         (Z_packet_to_hw_type): Delete function.
7447         * i386-low.h: Don't include break-common.h here.
7448         (Z_packet_to_hw_type): Delete declaration.
7449         * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7450         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7451         * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7452         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7453         * linux-aarch64-low.c: Don't include break-common.h here.
7454         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7455         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7456         (Z_packet_to_target_hw_bp_type): Delete function.
7457         * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7458         function.
7459         (mips_insert_point, mips_remove_point): Use
7460         Z_packet_to_target_hw_bp_type.
7461
7462 2014-05-20  Pedro Alves  <palves@redhat.com>
7463
7464         * linux-aarch64-low.c: Include break-common.h.
7465         (enum target_point_type): Delete.
7466         (Z_packet_to_point_type): Rename to ...
7467         (Z_packet_to_target_hw_bp_type): ... this, and return a
7468         target_hw_bp_type instead.
7469         (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7470         instead of an enum target_point_type.
7471         (aarch64_point_encode_ctrl_reg): Likewise.  Compute type mask from
7472         breakpoint type.
7473         (aarch64_dr_state_insert_one_point)
7474         (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7475         (aarch64_handle_aligned_watchpoint)
7476         (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7477         Take an enum target_hw_bp_type instead of an enum
7478         target_point_type.
7479         (aarch64_supports_z_point_type): New function.
7480         (aarch64_insert_point, aarch64_remove_point): Use it.  Adjust to
7481         use Z_packet_to_target_hw_bp_type.
7482
7483 2014-05-20  Joel Brobecker  <brobecker@adacore.com>
7484
7485         * configure.ac: Only use -Werror by default when DEVELOPMENT
7486         is true.
7487         * configure: Regenerate.
7488
7489 2014-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
7490
7491         Fix gdbserver qGetTLSAddr for x86_64 -m32.
7492         * linux-x86-low.c (X86_64_USER_REGS): New.
7493         (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7494
7495 2014-04-28  Yao Qi  <yao@codesourcery.com>
7496
7497         * Makefile.in (i386-avx512.c): Fix the typo of generated file
7498         name.
7499
7500 2014-04-25  Pedro Alves  <palves@redhat.com>
7501
7502         PR server/16255
7503         * linux-low.c (linux_attach_fail_reason_string): New function.
7504         (linux_attach_lwp): Delete.
7505         (linux_attach_lwp_1): Rename to ...
7506         (linux_attach_lwp): ... this.  Take a ptid instead of a pid as
7507         argument.  Remove "initial" parameter.  Return int instead of
7508         void.  Don't error or warn here.
7509         (linux_attach): Adjust to call linux_attach_lwp.  Call error on
7510         failure to attach to the tgid.  Call warning when failing to
7511         attach to an lwp.
7512         * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7513         argument.  Remove "initial" parameter.  Return int instead of
7514         void.  Don't error or warn here.
7515         (linux_attach_fail_reason_string): New declaration.
7516         * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7517         interface change.  Use linux_attach_fail_reason_string.
7518
7519 2014-04-24  Michael Sturm  <michael.sturm@mintel.com>
7520             Walfred Tedeschi  <walfred.tedeschi@intel.com>
7521
7522         * Makefile.in: Added rules to handle new files
7523         i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7524         amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7525         * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7526         (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7527         (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7528         (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7529         x32-avx512-linux.o.
7530         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7531         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7532         (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7533         i386/x32-avx512.xml.
7534         (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7535         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7536         i386/x32-avx512-linux.xml.
7537         * i387-fp.c (num_avx512_k_registers): New constant for number
7538         of K registers.
7539         (num_avx512_zmmh_low_registers): New constant for number of
7540         lower ZMM registers (0-15).
7541         (num_avx512_zmmh_high_registers): New constant for number of
7542         higher ZMM registers (16-31).
7543         (num_avx512_ymmh_registers): New contant for number of higher
7544         YMM registers (ymm16-31 added by avx521 on x86_64).
7545         (num_avx512_xmm_registers): New constant for number of higher
7546         XMM registers (xmm16-31 added by AVX512 on x86_64).
7547         (struct i387_xsave): Add space for AVX512 registers.
7548         (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7549         Add code to handle AVX512 registers.
7550         (i387_xsave_to_cache): Add code to handle AVX512 registers.
7551         * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7552         prototypei from generated file.
7553         (tdesc_amd64_avx512_linux): Likewise.
7554         (init_registers_x32_avx512_linux): Likewise.
7555         (tdesc_x32_avx512_linux): Likewise.
7556         (init_registers_i386_avx512_linux): Likewise.
7557         (tdesc_i386_avx512_linux): Likewise.
7558         (x86_64_regmap): Add AVX512 registers.
7559         (x86_linux_read_description): Add code to handle AVX512 XSTATE
7560         mask.
7561         (initialize_low_arch): Add code to initialize AVX512 registers.
7562
7563 2014-04-23  Pedro Alves  <palves@redhat.com>
7564
7565         * mem-break.c (find_gdb_breakpoint_at): Make static.
7566         * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7567
7568 2014-04-23  Pedro Alves  <palves@redhat.com>
7569
7570         * i386-low.c: Don't include break-common.h here.
7571         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7572         prototype to take target_hw_bp_type as argument instead of a Z
7573         packet char.
7574         * i386-low.h: Include break-common.h here.
7575         (Z_packet_to_hw_type): Declare.
7576         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7577         prototypes.
7578         * linux-x86-low.c (x86_insert_point): Convert the packet number to
7579         a target_hw_bp_type before calling i386_low_insert_watchpoint.
7580         (x86_remove_point): Convert the packet number to a
7581         target_hw_bp_type before calling i386_low_remove_watchpoint.
7582         * win32-i386-low.c (i386_insert_point): Convert the packet number
7583         to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7584         (i386_remove_point): Convert the packet number to a
7585         target_hw_bp_type before calling i386_low_remove_watchpoint.
7586
7587 2014-04-23  Pedro Alves  <palves@redhat.com>
7588
7589         * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7590
7591 2014-04-10  Pedro Alves  <palves@redhat.com>
7592
7593         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7594         Check if the condition or command is NULL before checking if the
7595         breakpoint is known.  On success, return true.
7596         * mem-break.h (add_breakpoint_condition): Document return.
7597         (add_breakpoint_commands): Add describing comment.
7598         * server.c (skip_to_semicolon): New function.
7599         (process_point_options): Use it.
7600
7601 2014-04-09  Pedro Alves  <palves@redhat.com>
7602
7603         * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7604         to lwpid_of.
7605
7606 2014-02-27  Pedro Alves  <palves@redhat.com>
7607
7608         PR 12702
7609         * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7610         macros.
7611         * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7612         output.
7613         (last_thread_of_process_p): Take a PID argument instead of a
7614         thread pointer.
7615         (linux_wait_for_lwp): Delete.
7616         (num_lwps, check_zombie_leaders, not_stopped_callback): New
7617         functions.
7618         (linux_low_filter_event): New function, party factored out from
7619         linux_wait_for_event.
7620         (linux_wait_for_event): Rename to ...
7621         (linux_wait_for_event_filtered): ... this.  Add new filter ptid
7622         argument.  Partly rewrite.  Always use waitpid(-1, WNOHANG) and
7623         sigsuspend.  Check for zombie leaders.
7624         (linux_wait_for_event): Reimplement as wrapper around
7625         linux_wait_for_event_filtered.
7626         (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED.  Assume that if
7627         a normal or signal exit is seen, it's the whole process exiting.
7628         (wait_for_sigstop): No longer a for_each_inferior callback.
7629         Rewrite on top of linux_wait_for_event_filtered.
7630         (stop_all_lwps): Call wait_for_sigstop directly.
7631         * server.c (resume, handle_target_event): Handle
7632         TARGET_WAITKIND_NO_RESUMED.
7633
7634 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
7635
7636         * win32-low.c (psapi_get_dll_name,
7637         * win32_CreateToolhelp32Snapshot): Delete.
7638         (win32_CreateToolhelp32Snapshot, win32_Module32First)
7639         (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7640         Delete.
7641         (handle_load_dll): Add function description.
7642         Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7643
7644 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
7645
7646         * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7647         Add comment.
7648         (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7649         base address when calling win32_add_one_solib.
7650         (handle_load_dll): Delete local variable load_addr.
7651         Remove 0x1000 offset applied to DLL base address when calling
7652         win32_add_one_solib.
7653         (handle_unload_dll): Add comment.
7654
7655 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
7656
7657         * win32-low.c (win32_add_all_dlls): Renames
7658         win32_ensure_ntdll_loaded.  Rewrite function documentation.
7659         Adjust implementation to always load all DLLs.
7660         Add 0x1000 offset to DLL base address when calling
7661         win32_add_one_solib.
7662         (child_initialization_done): New static global.
7663         (do_initial_child_stuff): Set child_initialization_done to
7664         zero during child initialization, and 1 after.  Replace call
7665         to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7666         Add comment.
7667         (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7668         (handle_unload_dll): Add function documentation.
7669         (get_child_debug_event): Ignore load and unload DLL events
7670         during child initialization.
7671
7672 2014-02-20  Doug Evans  <dje@google.com>
7673
7674         Remove global all_lwps.
7675         * inferiors.h (ptid_of): Move here from linux-low.h.
7676         (pid_of, lwpid_of): Ditto.
7677         * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7678         parameter is a struct thread_info * now.
7679         (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7680         directly.  Pass &all_threads to find_inferior instead of &all_lwps.
7681         (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7682         directly.
7683         (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7684         (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7685         * linux-arm-low.c (update_registers_callback): Update, "entry"
7686         parameter is a struct thread_info * now.
7687         Fetch lwpid from current_inferior directly.
7688         (arm_insert_point): Pass &all_threads to find_inferior instead of
7689         &all_lwps.
7690         (arm_remove_point): Ditto.
7691         (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7692         (arm_prepare_to_resume): Fetch pid from thread.
7693         (arm_read_description): Fetch lwpid from current_inferior directly.
7694         * linux-low.c (all_lwps): Delete.
7695         (delete_lwp): Delete call to remove_inferior.
7696         (handle_extended_wait): Fetch lwpid from thread.
7697         (add_lwp): Don't set lwp->entry.id.  Remove call to
7698         add_inferior_to_list.
7699         (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7700         (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7701         (kill_one_lwp_callback): Ditto.
7702         (linux_kill): Don't dereference NULL pointer.
7703         Fetch ptid,lwpid from thread.
7704         (get_detach_signal): Fetch ptid from thread.
7705         (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7706         Simplify call to regcache_invalidate_thread.
7707         (delete_lwp_callback): Update, "entry" parameter is a
7708         struct thread_info * now.  Fetch pid from thread.
7709         (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7710         (status_pending_p_callback): Update, "entry" parameter is a
7711         struct thread_info * now.  Fetch ptid from thread.
7712         (find_lwp_pid): Update, "entry" parameter is a
7713         struct thread_info * now.
7714         (linux_wait_for_lwp): Fetch pid from thread.
7715         (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7716         (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7717         (enqueue_one_deferred_signal): Fetch lwpid from thread.
7718         (dequeue_one_deferred_signal): Ditto.
7719         (cancel_breakpoint): Fetch ptid from current_inferior.
7720         (linux_wait_for_event): Pass &all_threads to find_inferior,
7721         not &all_lwps.  Fetch ptid, lwpid from thread.
7722         (count_events_callback): Update, "entry" parameter is a
7723         struct thread_info * now.
7724         (select_singlestep_lwp_callback): Ditto.
7725         (select_event_lwp_callback): Ditto.
7726         (cancel_breakpoints_callback): Ditto.
7727         (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7728         not &all_lwps.
7729         (select_event_lwp): Ditto.  Fetch ptid from event_thread.
7730         (unsuspend_one_lwp): Update, "entry" parameter is a
7731         struct thread_info * now.
7732         (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7733         not &all_lwps.
7734         (linux_stabilize_threads): Ditto.  And for for_each_inferior.
7735         Fetch lwpid from thread, not lwp.
7736         (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7737         Pass &all_threads to find_inferior, not &all_lwps.
7738         (send_sigstop): Fetch lwpid from thread, not lwp.
7739         (send_sigstop_callback): Update, "entry" parameter is a
7740         struct thread_info * now.
7741         (suspend_and_send_sigstop_callback): Ditto.
7742         (wait_for_sigstop): Ditto.  Fetch ptid, lwpid from thread, lwp.
7743         (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7744         struct thread_info * now.
7745         (move_out_of_jump_pad_callback): Ditto.  Fetch ptid, lwpid
7746         from thread, lwp.
7747         (lwp_running): Update, "entry" parameter is a
7748         struct thread_info * now.
7749         (stop_all_lwps): Fetch ptid from thread.
7750         Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7751         (linux_resume_one_lwp): Fetch lwpid from thread.
7752         (linux_set_resume_request): Update, "entry" parameter is a
7753         struct thread_info * now.  Fetch pid, lwpid from thread.
7754         (resume_status_pending_p): Update, "entry" parameter is a
7755         struct thread_info * now.
7756         (need_step_over_p): Ditto.  Fetch lwpid from thread.
7757         (start_step_over): Fetch lwpid from thread.
7758         (linux_resume_one_thread): Update, "entry" parameter is a
7759         struct thread_info * now.  Fetch lwpid from thread.
7760         (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7761         (proceed_one_lwp): Update, "entry" parameter is a
7762         struct thread_info * now.  Fetch lwpid from thread.
7763         (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7764         struct thread_info * now.
7765         (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7766         (unstop_all_lwps): Ditto.  Fetch lwpid from thread.
7767         (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7768         directly.
7769         (regsets_store_inferior_registers): Ditto.
7770         (fetch_register, store_register): Ditto.
7771         (linux_read_memory, linux_write_memory): Ditto.
7772         (linux_request_interrupt): Ditto.
7773         (linux_read_auxv): Ditto.
7774         (linux_xfer_siginfo): Ditto.
7775         (linux_qxfer_spu): Ditto.
7776         (linux_qxfer_libraries_svr4): Ditto.
7777         * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7778         moved to inferiors.h.
7779         (get_lwp): Delete.
7780         (get_thread_lwp): Update.
7781         (struct lwp_info): Delete member "entry".  Simplify comment for
7782         member "thread".
7783         (all_lwps): Delete.
7784         * linux-mips-low.c (mips_read_description): Fetch lwpid from
7785         current_inferior directly.
7786         (update_watch_registers_callback): Update, "entry" parameter is a
7787         struct thread_info * now.  Fetch pid from thread.
7788         (mips_linux_prepare_to_resume): Fetch ptid from thread.
7789         (mips_insert_point): Fetch lwpid from current_inferior.
7790         Pass &all_threads to find_inferior, not &all_lwps.
7791         (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7792         (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7793         directly.
7794         (mips_stopped_data_address): Ditto.
7795         * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7796         directly.
7797         * linux-tile-low.c (tile_arch_setup): Ditto.
7798         * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7799         (update_debug_registers_callback): Update, "entry" parameter is a
7800         struct thread_info * now.  Fetch pid from thread.
7801         (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7802         Pass &all_threads to find_inferior, not &all_lwps.
7803         (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7804         (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7805         Pass &all_threads to find_inferior, not &all_lwps.
7806         (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7807         (i386_dr_low_get_status): Ditto.
7808         (x86_linux_prepare_to_resume): Fetch ptid from thread.
7809         (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7810         (x86_linux_read_description): Ditto.
7811         * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7812
7813 2014-02-20  Doug Evans  <dje@google.com>
7814
7815         * inferiors.c (get_first_inferior): Fix buglet.
7816
7817 2014-02-19  Doug Evans  <dje@google.com>
7818
7819         * gdbthread.h (add_thread): Change result type to struct thread_info *.
7820         * inferiors.c (add_thread): Change result type to struct thread_info *.
7821         All callers updated.
7822         (add_lwp): Call add_thread here instead of in callers.
7823         All callers updated.
7824         * linux-low.h (get_lwp_thread): Rewrite.
7825         (struct lwp_info): New member "thread".
7826
7827 2014-02-19  Doug Evans  <dje@google.com>
7828
7829         * linux-low.c (add_lwp): Change result to struct lwp_info *.
7830         All callers updated.
7831
7832 2014-02-19  Doug Evans  <dje@google.com>
7833
7834         * inferiors.c (add_thread): Fix whitespace.
7835
7836 2014-02-19  Doug Evans  <dje@google.com>
7837
7838         * dll.c (clear_dlls): Replace accessing list implemention details
7839         with API function.
7840         * gdbthread.h (get_first_thread): Declare.
7841         * inferiors.c (for_each_inferior_with_data): New function.
7842         (get_first_thread): New function.
7843         (find_thread_ptid): Simplify.
7844         (get_first_inferior): New function.
7845         (clear_list): Delete.
7846         (one_inferior_p): New function.
7847         (clear_inferior_list): New function.
7848         (clear_inferiors): Update.
7849         * inferiors.h (for_each_inferior_with_data): Declare.
7850         (clear_inferior_list): Declare.
7851         (one_inferior_p): Declare.
7852         (get_first_inferior): Declare.
7853         * linux-low.c (linux_wait_for_event): Replace accessing list
7854         implemention details with API function.
7855         * server.c (target_running): Ditto.
7856         (accumulate_file_name_length): New function.
7857         (emit_dll_description): New function.
7858         (handle_qxfer_libraries): Replace accessing list implemention
7859         details with API function.
7860         (handle_qxfer_threads_worker): New function.
7861         (handle_qxfer_threads_proper): Replace accessing list implemention
7862         details with API function.
7863         (handle_query): Ditto.
7864         (visit_actioned_threads_callback_ftype): New typedef.
7865         (visit_actioned_threads_data): New struct.
7866         (visit_actioned_threads): Rewrite to be find_inferior callback.
7867         (resume): Call find_inferior.
7868         (handle_status): Replace accessing list implemention
7869         details with API function.
7870         (process_serial_event): Replace accessing list implemention details
7871         with API function.
7872         * target.c (set_desired_inferior): Replace accessing list implemention
7873         details with API function.
7874         * tracepoint.c (same_process_p): New function.
7875         (gdb_agent_about_to_close): Replace accessing list implemention
7876         details with API function.
7877         * win32-low.c (child_delete_thread): Replace accessing list
7878         implemention details with API function.
7879         (match_dll_by_basename): New function.
7880         (dll_is_loaded_by_basename): New function.
7881         (win32_ensure_ntdll_loaded): Replace accessing list implemention
7882         details call to dll_is_loaded_by_basename.
7883
7884 2014-02-19  Doug Evans  <dje@google.com>
7885
7886         * dll.h (struct dll_info): Add comment.
7887         * gdbthread.h (struct thread_info): Add comment.
7888         (current_ptid): Simplify.
7889         * inferiors.c (add_process): Update.
7890         (remove_process): Update.
7891         * inferiors.h (struct process_info): Rename member "head" to "entry".
7892         * linux-low.c (delete_lwp): Update.
7893         (add_lwp): Update.
7894         (last_thread_of_process_p): Update.
7895         (kill_one_lwp_callback, linux_kill): Update.
7896         (status_pending_p_callback): Update.
7897         (wait_for_sigstop): Update.  Simplify read of ptid.
7898         (start_step_over): Update.
7899         * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7900         (get_lwp_thread): Update.
7901         (struct lwp_info): Rename member "head" to "entry".
7902         * regcache.h (inferior_list_entry): Delete.
7903         * server.c (kill_inferior_callback): Update.
7904         (detach_or_kill_inferior_callback): Update.
7905         (print_started_pid): Update.
7906         (print_attached_pid): Update.
7907         (process_serial_event): Simplify read of ptid.
7908         * thread-db.c (thread_db_create_event): Update.
7909         (thread_db_get_tls_address): Update.
7910         * win32-low.c (current_inferior_ptid): Simplify.
7911
7912 2014-02-19  Tom Tromey  <tromey@redhat.com>
7913
7914         * target.h (struct target_ops) <supports_btrace>: Add target_ops
7915         argument.
7916         (target_supports_btrace): Update.
7917
7918 2014-02-14  Yao Qi  <yao@codesourcery.com>
7919
7920         * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7921         (rsp-low-ipa.o): New target.
7922
7923 2014-02-12  Tom Tromey  <tromey@redhat.com>
7924
7925         * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7926         convert_ascii_to_int.
7927         * regcache.c (registers_to_string): Likewise.
7928         * remote-utils.c (decode_M_packet): Likewise.
7929         * server.c (process_serial_event): Likewise.
7930
7931 2014-02-12  Tom Tromey  <tromey@redhat.com>
7932
7933         * server.c (handle_query, handle_v_run): Use hex2bin, not
7934         unhexify.
7935         * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7936
7937 2014-02-12  Tom Tromey  <tromey@redhat.com>
7938
7939         * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7940         convert_int_to_ascii.
7941         * regcache.c (registers_to_string, collect_register_as_string):
7942         Likewise.
7943         * remote-utils.c (look_up_one_symbol, relocate_instruction):
7944         Likewise.
7945         * server.c (process_serial_event): Likewise.
7946         * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7947         (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7948
7949 2014-02-12  Tom Tromey  <tromey@redhat.com>
7950
7951         * remote-utils.c (look_up_one_symbol, monitor_output): Use
7952         bin2hex, not hexify.
7953         * tracepoint.c (cmd_qtstatus): Likewise.
7954
7955 2014-02-12  Tom Tromey  <tromey@redhat.com>
7956
7957         * remote-utils.c (monitor_output): Pass explicit length to
7958         hexify.
7959
7960 2014-02-12  Tom Tromey  <tromey@redhat.com>
7961
7962         * tracepoint.c: Include rsp-low.h.
7963         * server.c: Include rsp-low.h.
7964         * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7965         (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7966         declare.
7967         * remote-utils.c: Include rsp-low.h.
7968         (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7969         (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7970         (convert_int_to_ascii, convert_ascii_to_int): Move to
7971         common/rsp-low.c.
7972         * regcache.c: Include rsp-low.h.
7973         * ax.c: Include rsp-low.h.
7974         * Makefile.in (SFILES): Add common/rsp-low.c.
7975         (OBS): Add rsp-low.o.
7976         (rsp-low.o): New target.
7977
7978 2014-02-12  Tom Tromey  <tromey@redhat.com>
7979
7980         * utils.h (pulongest, plongest, phex_nz): Don't declare.
7981         Include print-utils.h.
7982         * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7983         (plongest, thirty_two, phex_nz): Remove.
7984         * Makefile.in (SFILES): Add common/print-utils.c.
7985         (OBS): Add print-utils.o.
7986         (print-utils-ipa.o): New target.
7987         (print-utils.o): New target.
7988         (IPA_OBJS): Add print-utils-ipa.o.
7989
7990 2014-02-06  Tom Tromey  <tromey@redhat.com>
7991
7992         * Makefile.in (SFILES): Fix indentation.
7993
7994 2014-02-05  Doug Evans  <dje@google.com>
7995
7996         * linux-low.c (linux_wait_for_event): Improve comment.
7997         (linux_wait_1): Keep current_inferior in sync with event_child.
7998
7999 2014-01-22  Doug Evans  <dje@google.com>
8000
8001         * gdbthread.h (gdb_id_to_thread): Delete, unused.
8002
8003 2014-01-22  Doug Evans  <dje@google.com>
8004
8005         * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8006         * configure: Regenerate.
8007         * config.in: Regenerate.
8008         * Makefile.in (SFILES): Add debug.c.
8009         (OBS): Add debug.o.
8010         * debug.c: New file.
8011         * debug.h: New file.
8012         * linux-aarch64-low.c (*): Update all debugging printfs to use
8013         debug_printf instead of fprintf.
8014         * linux-arm-low.c (*): Ditto.
8015         * linux-cris-low.c (*): Ditto.
8016         * linux-crisv32-low.c (*): Ditto.
8017         * linux-m32r-low.c (*): Ditto.
8018         * linux-sparc-low.c (*): Ditto.
8019         * linux-x86.c (*): Ditto.
8020         * linux-low.c (*): Ditto.
8021         (linux_wait_1): Add calls to debug_enter, debug_exit.
8022         (linux_wait): Remove redundant debugging printf.
8023         (stop_all_lwps): Add calls to debug_enter, debug_exit.
8024         (linux_resume, unstop_all_lwps): Ditto.
8025         * mem-break.c (*): Update all debugging printfs to use
8026         debug_printf instead of fprintf.
8027         * remote-utils.c (*): Ditto.
8028         * thread-db.c (*): Ditto.
8029         * server.c #include <ctype.h>, "gdb_vecs.h".
8030         (debug_threads): Moved to debug.c.
8031         (*): Update all debugging printfs to use debug_printf instead of
8032         fprintf.
8033         (start_inferior): Replace call to fflush with call to debug_flush.
8034         (monitor_show_help): Mention set debug-format.
8035         (parse_debug_format_options): New function.
8036         (handle_monitor_command): Handle "monitor set debug-format".
8037         (gdbserver_usage): Mention --debug-format.
8038         (main): Parse --debug-format.
8039         * server.h (debug_threads): Declaration moved to debug.h.
8040         #include "debug.h".
8041         * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8042         trace_debug_1 that uses debug_printf.
8043         (tracepoint_look_up_symbols): Update all debugging printfs to use
8044         debug_printf instead of fprintf.
8045
8046 2014-01-20  Baruch Siach  <baruch@tkos.co.il>
8047
8048         * linux-xtensa-low.c: Include asm/ptrace.h instead of
8049         sys/ptrace.h.
8050
8051 2014-01-17  Pedro Alves  <palves@redhat.com>
8052
8053         PR build/16445
8054         * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8055         defined after including gdb_proc_service.h.
8056
8057 2014-01-16  Doug Evans  <dje@google.com>
8058
8059         * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8060         (match_dll): Use it.
8061
8062 2014-01-16  Markus Metzger  <markus.t.metzger@intel.com>
8063
8064         * target.h (target_ops) <read_btrace>: Change parameters and
8065         return type to allow error reporting.
8066         * server.c (handle_qxfer_btrace): Support delta reads.  Pass
8067         trace reading errors on.
8068         * linux-low.c (linux_low_read_btrace): Pass trace reading
8069         errors on.
8070         (linux_low_disable_btrace): New.
8071
8072 2014-01-15  Doug Evans  <dje@google.com>
8073
8074         * inferiors.c (thread_id_to_gdb_id): Delete.
8075         * inferiors.h (thread_id_to_gdb_id): Delete.
8076
8077 2014-01-13  Eli Zaretskii  <eliz@gnu.org>
8078
8079         * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8080         "-I$(srcdir)/../".  Fixes MinGW compilation errors with old GCC
8081         versions.
8082
8083 2014-01-08  Pedro Alves  <palves@redhat.com>
8084
8085         * server.c (handle_status): Don't discard previous queued stop
8086         replies or thread's pending status here.
8087         (main) <disconnection>: Do it here instead.
8088
8089 2014-01-08  Pedro Alves  <palves@redhat.com>
8090
8091         * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8092         * server.c (visit_actioned_threads, handle_pending_status): New
8093         function.
8094         (handle_v_cont): Factor out parts to ...
8095         (resume): ... this new function.  If in all-stop, and a thread
8096         being resumed has a pending status, report it without actually
8097         resuming.
8098         (myresume): Adjust to use the new 'resume' function.
8099         (clear_pending_status_callback, set_pending_status_callback)
8100         (find_status_pending_thread_callback): New functions.
8101         (handle_status): Handle the case of multiple threads having
8102         interesting statuses to report.  Report threads' real last signal
8103         instead of always reporting GDB_SIGNAL_TRAP.  Look for a thread
8104         with an interesting thread to report the status for, instead of
8105         always reporting the status of the first thread.
8106
8107 2014-01-01  Joel Brobecker  <brobecker@adacore.com>
8108
8109         * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8110         * gdbreplay.c (gdbreplay_version): Likewise.
8111
8112 2013-12-18  Yufeng Zhang  <yufeng.zhang@arm.com>
8113
8114         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8115         iov.iov_len with the real length in use.
8116
8117 2013-12-13  Joel Brobecker  <brobecker@adacore.com>
8118
8119         * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8120         * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8121         for all targets that use win32-low.c.
8122         * win32-low.c (win32_ensure_ntdll_loaded): New function.
8123         (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8124
8125 2013-12-13  Pedro Alves  <palves@redhat.com>
8126
8127         * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8128         if equal to TARGET_WAITKIND_LOADED.
8129         * win32-low.c (cached_status): New static global.
8130         (win32_wait): Add declaration.
8131         (do_initial_child_stuff): Flush all initial pending debug events
8132         up to the initial breakpoint.
8133         (win32_wait): If CACHED_STATUS was set, return that instead
8134         of doing a real wait.  Remove the code resuming the execution
8135         of the inferior after receiving a TARGET_WAITKIND_LOADED event
8136         during the initial phase.  Also remove the code changing
8137         OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8138         TARGET_WAITKIND_STOPPED.
8139
8140 2013-12-11  Yao Qi  <yao@codesourcery.com>
8141
8142         * notif.c (handle_notif_ack): Return 0 if no notification
8143         matches.
8144
8145 2013-11-20  Doug Evans  <dje@google.com>
8146
8147         * linux-low.c (linux_set_resume_request): Fix comment.
8148
8149 2013-11-20  Doug Evans  <dje@google.com>
8150
8151         * linux-low.c (resume_status_pending_p): Tweak comment.
8152
8153 2013-11-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
8154
8155         * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8156         amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8157         * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8158         (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8159         (srv_amd64_regobj): Add amd64-mpx.o.
8160         (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8161         (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8162         (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8163         * i387-fp.c (num_pl_bnd_register) Added constant.
8164         (num_pl_bnd_cfg_registers) Added constant.
8165         (struct i387_xsave) Added reserved area and MPX fields.
8166         (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8167         * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8168         function.
8169         (tdesc_i386_mpx_linux): Add MPX amd64 target.
8170         (init_registers_amd64_mpx_linux): Declare new function.
8171         (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8172         (x86_64_regmap): Add MPX registers.
8173         (x86_linux_read_description): Add MPX case.
8174         (initialize_low_arch): Initialize MPX targets.
8175
8176 2013-11-18  Tom Tromey  <tromey@redhat.com>
8177
8178         * configure: Rebuild.
8179         * configure.ac: Don't check for stdlib.h.
8180         * gdbreplay.c: Unconditionally include stdlib.h.
8181
8182 2013-11-18  Tom Tromey  <tromey@redhat.com>
8183
8184         * config.in: Rebuild.
8185         * configure: Rebuild.
8186         * configure.ac: Don't use AC_HEADER_DIRENT.
8187
8188 2013-11-18  Tom Tromey  <tromey@redhat.com>
8189
8190         * server.h: Don't check HAVE_STRING_H.
8191         * gdbreplay.c: Don't check HAVE_STRING_H.
8192         * configure: Rebuild.
8193
8194 2013-11-18  Tom Tromey  <tromey@redhat.com>
8195
8196         * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8197         LIBGNU.
8198
8199 2013-11-08  Tom Tromey  <tromey@redhat.com>
8200
8201         * configure, config.in: Rebuild.
8202         * configure.ac: Remove unused configury.
8203
8204 2013-11-08  Tom Tromey  <tromey@redhat.com>
8205
8206         * acinclude.m4: Include common.m4, codeset.m4.
8207         * configure, config.in: Rebuild.
8208         * configure.ac: Use GDB_AC_COMMON.
8209
8210 2013-11-06  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8211
8212         * linux-s390-low.c (HWCAP_S390_TE): New define.
8213         (s390_arch_setup): Consider the TE field in the HWCAP for
8214         determining 'have_regset_tdb'.
8215
8216 2013-10-16  Sergio Durigan Junior  <sergiodj@redhat.com>
8217
8218         PR gdb/16014
8219         * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8220         call to sizeof.
8221
8222 2013-10-02  Pedro Alves  <palves@redhat.com>
8223
8224         * server.c (process_serial_event): Don't output "GDBserver
8225         exiting" if GDB is connected through stdio.
8226         * target.c (mywait): Likewise, be silent if GDB is connected
8227         through stdio.
8228
8229 2013-10-01  Joel Brobecker  <brobecker@adacore.com>
8230
8231         * lynx-low.c (lynx_add_threads_after_attach): New function.
8232         (lynx_attach): Remove call to add_thread.  Add call to
8233         lynx_add_threads_after_attach instead.
8234
8235 2013-09-28  Mike Frysinger  <vapier@gentoo.org>
8236
8237         * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8238         * config.in, configure: Regenerated.
8239
8240 2013-09-18  Yao Qi  <yao@codesourcery.com>
8241
8242         PR server/15959
8243         * server.c (start_inferior): Clear 'resume_info'.
8244
8245 2013-09-16  Jiong Wang  <jiwang@tilera.com>
8246
8247         * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8248         for each register.
8249
8250 2013-09-16  Jiong Wang  <jiwang@tilera.com>
8251
8252         * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8253         linux-tile-low.o to srv_tgtobj.
8254
8255 2013-09-16  Will Newton  <will.newton@linaro.org>
8256
8257         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8258         out regs.
8259
8260 2013-09-06  Pedro Alves  <palves@redhat.com>
8261
8262         * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8263         (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8264         (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8265         (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8266         (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8267         (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8268
8269 2013-09-06  Pedro Alves  <palves@redhat.com>
8270
8271         * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8272         explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8273
8274 2013-09-06  Pedro Alves  <palves@redhat.com>
8275
8276         * linux-amd64-ipa.c: Include tracepoint.h.
8277         * linux-i386-ipa.c: Include tracepoint.h.
8278
8279 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
8280
8281         * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8282         (ps_get_thread_area): New function.
8283
8284 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
8285
8286         * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8287         (initialize_low_arch): Call init_registers_crisv32 rather than
8288         init_register_crisv32.
8289
8290 2013-09-05  Pedro Alves  <palves@redhat.com>
8291
8292         * server.h (handle_vFile, hostio_last_error_from_errno): Move
8293         to ...
8294         * hostio.h: ... this new file.
8295         * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8296         win32-low.c: Include hostio.h.
8297
8298 2013-09-05  Pedro Alves  <palves@redhat.com>
8299
8300         * server.h (gdb_client_data, handler_func, callback_handler_func)
8301         (delete_file_handler, add_file_handler, append_callback_event)
8302         (delete_callback_event, start_event_loop, initialize_event_loop):
8303         Move to event-loop.h and include it.
8304         * event-loop.h: New file.
8305
8306 2013-09-05  Pedro Alves  <palves@redhat.com>
8307
8308         * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8309         * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8310         (loaded_dll, unloaded_dll): Move to ...
8311         * dll.h: ... this new file.
8312         * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8313
8314 2013-09-05  Pedro Alves  <palves@redhat.com>
8315
8316         * server.h (current_process, get_thread_process, all_processes)
8317         (add_inferior_to_list, for_each_inferior, current_inferior)
8318         (remove_inferior, add_process, remove_process, find_process_pid)
8319         (have_started_inferiors_p, have_attached_inferiors_p)
8320         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8321         (clear_inferiors, find_inferior, find_inferior_id)
8322         (inferior_target_data, set_inferior_target_data)
8323         (inferior_regcache_data, set_inferior_regcache_data): Move to
8324         inferiors.h, and include it.
8325         * inferiors.h: New file.
8326
8327 2013-09-05  Pedro Alves  <palves@redhat.com>
8328
8329         * server.h (struct emit_ops, current_insn_ptr, emit_error):
8330         Move ...
8331         * ax.h: ... here.
8332
8333 2013-09-05  Pedro Alves  <palves@redhat.com>
8334
8335         * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8336         tracepoint.h.
8337         * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8338         (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8339         (handle_tracepoint_general_set, handle_tracepoint_query)
8340         (tracepoint_finished_step, tracepoint_was_hit)
8341         (release_while_stepping_state_list, current_traceframe)
8342         (in_readonly_region, traceframe_read_mem)
8343         (fetch_traceframe_registers, traceframe_read_sdata)
8344         (traceframe_read_info, struct fast_tpoint_collect_status)
8345         (fast_tracepoint_collecting, force_unlock_trace_buffer)
8346         (handle_tracepoit_bkpts, initialize_low_tracepoint)
8347         (supply_fast_tracepoint_registers)
8348         (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8349         (ipa_tdesc, claim_trampoline_space)
8350         (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8351         (agent_mem_read, agent_get_trace_state_variable_value)
8352         (agent_set_trace_state_variable_value, agent_tsv_read)
8353         (agent_mem_read_string, get_raw_reg_func_addr)
8354         (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8355         * tracepoint.h: ... this new file.
8356
8357 2013-09-05  Pedro Alves  <palves@redhat.com>
8358
8359         * server.h (perror_with_name, error, fatal, warning, paddress)
8360         (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8361         include it.
8362         * utils.h: New file.
8363
8364 2013-09-05  Pedro Alves  <palves@redhat.com>
8365
8366         * server.h (remote_debug, noack_mode, transport_is_reliable)
8367         (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8368         (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8369         (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8370         (write_enn, initialize_async_io, enable_async_io)
8371         (disable_async_io, check_remote_input_interrupt_request)
8372         (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8373         (dead_thread_notify, prepare_resume_reply)
8374         (decode_address_to_semicolon, decode_address, decode_m_packet)
8375         (decode_M_packet, decode_X_packet, decode_xfer_write)
8376         (decode_search_memory_packet, unhexify, hexify)
8377         (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8378         (look_up_one_symbol, relocate_instruction)
8379         (monitor_output): Move to remote-utils.h, and include it.
8380         * remote-utils.h: New file.
8381
8382 2013-09-05  Pedro Alves  <palves@redhat.com>
8383
8384         * server.h (_): Delete.
8385
8386 2013-09-02  Pedro Alves  <palves@redhat.com>
8387
8388         * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8389         (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8390         allocated.
8391         (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8392
8393 2013-09-02  Pierre Muller  <muller@sourceware.org>
8394
8395         * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8396         or WriteProcessMemory complete successfully and handle
8397         ERROR_PARTIAL_COPY error.
8398
8399 2013-09-02  Pedro Alves  <palves@redhat.com>
8400
8401         * server.c (gdb_read_memory): Return -1 on traceframe memory read
8402         error instead of EIO.
8403
8404 2013-08-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
8405
8406         PR server/15604
8407         * linux-low.c: Include filestuff.h.
8408         (linux_create_inferior) <pid == 0>: Call close_most_fds.
8409         * lynx-low.c: Include filestuff.h.
8410         (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8411         * server.c: Include filestuff.h.
8412         (main): Call notice_open_fds.
8413         * spu-low.c: Include filestuff.h.
8414         (spu_create_inferior) <pid == 0>: Call close_most_fds.
8415
8416 2013-08-22  Luis Machado  <lgustavo@codesourcery.com>
8417
8418         * Makefile.in: Explain why ../target and ../nat are not
8419         listed as include file search paths.
8420         (linux-waitpid.o): New object file rule.
8421         * configure.srv (srv_native_linux_obj): New variable.
8422         Replace all occurrences of linux native object files with
8423         $srv_native_linux_obj.
8424         * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8425         (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8426         (linux_enable_event_reporting): Remove declaration.
8427         (my_waitpid): Moved to common/linux-waitpid.c.
8428         (linux_wait_for_event): Pass ptid when calling
8429         linux_enable_event_reporting.
8430         (linux_supports_tracefork_flag): Remove.
8431         (linux_enable_event_reporting): Likewise.
8432         (linux_tracefork_grandchild): Remove.
8433         (STACK_SIZE): Moved to common/linux-ptrace.c.
8434         (linux_tracefork_child): Remove.
8435         (linux_test_for_tracefork): Remove.
8436         (linux_look_up_symbols): Call linux_supports_traceclone.
8437         (initialize_low): Remove call to linux_test_for_tracefork.
8438         * linux-low.h (PTRACE_TYPE_ARG3): Move to
8439         common/linux-ptrace.h.
8440         (PTRACE_TYPE_ARG4): Likewise.
8441         Include linux-ptrace.h.
8442
8443 2013-08-21  Pedro Alves  <palves@redhat.com>
8444
8445         * config.in: Renegerate.
8446
8447 2013-08-19  Luis Machado  <lgustavo@codesourcery.com>
8448
8449         * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8450         (SFILES): Remove $(srcdir)/common/target-common.c and
8451         add $(srcdir)/target/waitstatus.c.
8452         (OBS): Remove target-common.o and add waitstatus.o.
8453         (server_h): Remove $(srcdir)/../common/target-common.h and
8454         add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8455         and $(srcdir)/../target/waitstatus.h.
8456         (target-common.o): Remove.
8457         (waitstatus.o): New target object file.
8458         * target.h: Do not include target-common.h and
8459         include target/resume.h, target/wait.h and
8460         target/waitstatus.h.
8461
8462 2013-08-13  Luis Machado  <lgustavo@codesourcery.com>
8463
8464         * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8465         to PTRACE_TYPE_ARG3.
8466         * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8467         to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8468         PTRACE_TYPE_ARG4.
8469         * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8470         (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8471
8472 2013-07-27  Jie Zhang  <jie@codesourcery.com>
8473             Daniel Jacobowitz  <dan@codesourcery.com>
8474             Yao Qi  <yao@codesourcery.com>
8475
8476         * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8477         (mips-linux-watch.o): New rule.
8478         (mips_linux_watch_h): New variable.
8479         * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8480         srv_tgtobj.
8481         * linux-mips-low.c: Include mips-linux-watch.h.
8482         (struct arch_process_info, struct arch_lwp_info): New.
8483         (update_watch_registers_callback): New function.
8484         (mips_linux_new_process, mips_linux_new_thread) New functions.
8485         (mips_linux_prepare_to_resume, mips_insert_point): New
8486         functions.
8487         (mips_remove_point, mips_stopped_by_watchpoint): New
8488         functions.
8489         (rsp_bp_type_to_target_hw_bp_type): New function.
8490         (mips_stopped_data_address): New function.
8491         (the_low_target): Add watchpoint support functions.
8492
8493 2013-07-27  Yao Qi  <yao@codesourcery.com>
8494
8495         * i386-low.c: Include break-common.h.
8496         (enum target_hw_bp_type): Remove.
8497
8498 2013-07-24  Luis Machado  <lgustavo@codesourcery.com>
8499
8500         * Makefile.in (SFILES): /common/target-common.c.
8501         (OBS): Add target-common.o.
8502         (server_h): Add $(srcdir)/../common/target-common.h.
8503         (target-common.o): New target.
8504         * server.c (queue_stop_reply_callback): Free
8505         status string after use.
8506         * target.c (target_waitstatus_to_string): Remove.
8507         * target.h: Include target-common.h.
8508         (resume_kind): Likewise.
8509         (target_waitkind): Likewise.
8510         (target_waitstatus): Likewise.
8511         (TARGET_WNOHANG): Likewise.
8512
8513 2013-07-04  Yao Qi  <yao@codesourcery.com>
8514
8515         * Makefile.in (host_alias): Use @host_noncanonical@.
8516         (target_alias): Use @target_noncanonical@.
8517         * configure.ac: Use ACX_NONCANONICAL_TARGET and
8518         ACX_NONCANONICAL_HOST.
8519         * configure: Regenerated.
8520
8521         Revert:
8522         2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
8523
8524         * configure.ac (version_host, version_target): Set and AC_SUBST them.
8525         * configure: Rebuild.
8526         * Makefile.in (version_host, version_target): Get from configure.
8527         (version.c): Use $(version_host) and $(version_target).
8528
8529 2013-07-03  Pedro Alves  <palves@redhat.com>
8530
8531         * Makefile.in (config.status): Depend on development.sh.
8532         * acinclude.m4: Include libmcheck.m4.
8533         * configure: Regenerate.
8534
8535 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
8536
8537         * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8538         attribute inside the parentheses.
8539         (winapi_DebugSetProcessKillOnExit): Ditto.
8540         (winapi_DebugBreakProcess): Ditto.
8541         (winapi_GenerateConsoleCtrlEvent): Ditto.
8542
8543 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
8544
8545         * notif.h (notif_event): Add a dummy member to avoid compiler
8546         errors.
8547
8548 2013-07-01  Pedro Alves  <palves@redhat.com>
8549
8550         * hostio.c (HOSTIO_PATH_MAX): Define.
8551         (require_filename, handle_open, handle_unlink, handle_readlink):
8552         Use it.
8553
8554 2013-07-01  Pedro Alves  <palves@redhat.com>
8555
8556         * server.h: Include "pathmax.h".
8557         * linux-low.c: Don't include sys/param.h.
8558         (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8559         MAXPATHLEN.
8560         * win32-low.c: Don't include sys/param.h.
8561         (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8562
8563 2013-07-01  Pedro Alves  <palves@redhat.com>
8564
8565         * event-loop.c: Don't check HAVE_UNISTD_H before including
8566         <unistd.h>.
8567         * gdbreplay.c: Likewise.
8568         * remote-utils.c: Likewise.
8569         * server.c: Likewise.
8570         * configure.ac: Don't check for unistd.h.
8571         * configure: Regenerate.
8572
8573 2013-06-28  Tom Tromey  <tromey@redhat.com>
8574
8575         * Makefile.in (version.c): Use version.in, not
8576         common/version.in.
8577
8578 2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
8579
8580         * configure.ac (version_host, version_target): Set and AC_SUBST them.
8581         * configure: Rebuild.
8582         * Makefile.in (version_host, version_target): Get from configure.
8583         (version.c): Use $(version_host) and $(version_target).
8584
8585 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
8586
8587         Fix trace-status to output user name without trailing colon.
8588         * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8589
8590 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
8591
8592         Fix trace-status to output proper start-time and stop-time.
8593         * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8594         output start time and stop time in hex as gdb expects.
8595
8596 2013-06-26  Pedro Alves  <pedro@codesourcery.com>
8597
8598         * tracepoint.c (build_traceframe_info_xml): Output trace state
8599         variables present in the trace buffer.
8600
8601 2013-06-24  Tom Tromey  <tromey@redhat.com>
8602
8603         * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8604         create-version.sh.
8605         (version.o): Remove.
8606         * gdbreplay.c: Include version.h.
8607         (version, host_name): Don't declare.
8608         * server.h: Include version.h.
8609         (version, host_name): Don't declare.
8610
8611 2013-06-12  Pedro Alves  <palves@redhat.com>
8612
8613         * linux-x86-low.c (linux_is_elf64): Delete global.
8614         (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8615         with local linux_pid_exe_is_elf_64_file use.
8616
8617 2013-06-11  Pedro Alves  <palves@redhat.com>
8618
8619         * linux-low.c (regset_disabled, disable_regset): New functions.
8620         (regsets_fetch_inferior_registers)
8621         (regsets_store_inferior_registers): Use them.
8622         (initialize_regsets_info); Don't allocate the disabled_regsets
8623         array here.
8624         * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8625         comment.
8626
8627 2013-06-11  Pedro Alves  <palves@redhat.com>
8628
8629         * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8630         xmalloc.
8631
8632 2013-06-11  Pedro Alves  <palves@redhat.com>
8633
8634         * linux-x86-low.c (initialize_low_arch): Call
8635         init_registers_x32_avx_linux.
8636
8637 2013-06-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
8638
8639         Fix compatibility with Android Bionic.
8640         * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8641         it is not empty.
8642
8643 2013-06-07  Pedro Alves  <palves@redhat.com>
8644
8645         PR server/14823
8646         * Makefile.in (OBS): Add tdesc.o.
8647         (IPA_OBJS): Add tdesc-ipa.o.
8648         (tdesc-ipa.o): New rule.
8649         * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8650         interface.
8651         * linux-low.c (new_inferior): Delete.
8652         (disabled_regsets, num_regsets): Delete.
8653         (linux_add_process): Adjust to set the new per-process
8654         new_inferior flag.
8655         (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8656         (linux_wait_for_lwp): Adjust.  Only call arch_setup if the event
8657         was a stop.  When calling arch_setup, switch the current inferior
8658         to the thread that got an event.
8659         (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8660         (regsets_fetch_inferior_registers)
8661         (regsets_store_inferior_registers): New regsets_info parameter.
8662         Adjust to use it.
8663         (linux_register_in_regsets): New regs_info parameter.  Adjust to
8664         use it.
8665         (register_addr, fetch_register, store_register): New usrregs_info
8666         parameter.  Adjust to use it.
8667         (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8668         parameter regs_info.  Adjust to use it.
8669         (linux_fetch_registers): Get the current inferior's regs_info, and
8670         adjust to use it.
8671         (linux_store_registers): Ditto.
8672         [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8673         (initialize_low): Don't initialize the target_regsets here.  Call
8674         initialize_low_arch.
8675         * linux-low.h (target_regsets): Delete declaration.
8676         (struct regsets_info): New.
8677         (struct usrregs_info): New.
8678         (struct regs_info): New.
8679         (struct process_info_private) <new_inferior>: New field.
8680         (struct linux_target_ops): Delete the num_regs, regmap, and
8681         regset_bitmap fields.  New field regs_info.
8682         [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8683         * i387-fp.c (num_xmm_registers): Delete.
8684         (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8685         calls to new interface.
8686         (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8687         (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8688         Infer the number of xmm registers from the regcache's target
8689         description.
8690         * i387-fp.h (num_xmm_registers): Delete.
8691         * inferiors.c (add_thread): Don't install the thread's regcache
8692         here.
8693         * proc-service.c (gregset_info): Fetch the current inferior's
8694         regs_info.  Adjust to use it.
8695         * regcache.c: Include tdesc.h.
8696         (register_bytes, reg_defs, num_registers)
8697         (gdbserver_expedite_regs): Delete.
8698         (get_thread_regcache): If the thread doesn't have a regcache yet,
8699         create one, instead of aborting gdbserver.
8700         (regcache_invalidate_one): Rename to ...
8701         (regcache_invalidate_thread): ... this.
8702         (regcache_invalidate_one): New.
8703         (regcache_invalidate): Only invalidate registers of the current
8704         process.
8705         (init_register_cache): Add target_desc parameter, and use it.
8706         (new_register_cache): Ditto.  Assert the target description has a
8707         non zero registers_size.
8708         (regcache_cpy): Add assertions.  Adjust.
8709         (realloc_register_cache, set_register_cache): Delete.
8710         (registers_to_string, registers_from_string): Adjust.
8711         (find_register_by_name, find_regno, find_register_by_number)
8712         (register_cache_size): Add target_desc parameter, and use it.
8713         (free_register_cache_thread, free_register_cache_thread_one)
8714         (regcache_release, register_cache_size): New.
8715         (register_size): Add target_desc parameter, and use it.
8716         (register_data, supply_register, supply_register_zeroed)
8717         (supply_regblock, supply_register_by_name, collect_register)
8718         (collect_register_as_string, collect_register_by_name): Adjust.
8719         * regcache.h (struct target_desc): Forward declare.
8720         (struct regcache) <tdesc>: New field.
8721         (init_register_cache, new_register_cache): Add target_desc
8722         parameter.
8723         (regcache_invalidate_thread): Declare.
8724         (regcache_invalidate_one): Delete declaration.
8725         (regcache_release): Declare.
8726         (find_register_by_number, register_cache_size, register_size)
8727         (find_regno): Add target_desc parameter.
8728         (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8729         declarations.
8730         * remote-utils.c: Include tdesc.h.
8731         (outreg, prepare_resume_reply): Adjust.
8732         * server.c: Include tdesc.h.
8733         (gdbserver_xmltarget): Delete declaration.
8734         (get_features_xml, process_serial_event): Adjust.
8735         * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8736         declare.
8737         (struct process_info) <tdesc>: New field.
8738         (ipa_tdesc): Declare.
8739         * tdesc.c: New file.
8740         * tdesc.h: New file.
8741         * tracepoint.c: Include tdesc.h.
8742         [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8743         (get_context_regcache): Adjust to pass ipa_tdesc down.
8744         (do_action_at_tracepoint): Adjust to get the register cache size
8745         from the context regcache's description.
8746         (traceframe_walk_blocks): Adjust to get the register cache size
8747         from the current trace frame's description.
8748         (traceframe_get_pc): Adjust to get current trace frame's
8749         description and pass it down.
8750         (gdb_collect): Adjust to get the register cache size from the
8751         IPA's description.
8752         * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8753         (gdbserver_xmltarget): Delete.
8754         (initialize_low_tracepoint): Set the ipa's target description.
8755         * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8756         (initialize_low_tracepoint): Set the ipa's target description.
8757         * linux-x86-low.c: Include tdesc.h.
8758         [__x86_64__] (is_64bit_tdesc): New.
8759         (ps_get_thread_area, x86_get_thread_area): Use it.
8760         (i386_cannot_store_register): Rename to ...
8761         (x86_cannot_store_register): ... this.  Use is_64bit_tdesc.
8762         (i386_cannot_fetch_register): Rename to ...
8763         (x86_cannot_fetch_register): ... this.  Use is_64bit_tdesc.
8764         (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8765         to new interface.
8766         (target_regsets): Rename to ...
8767         (x86_regsets): ... this.
8768         (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8769         interface.
8770         (x86_siginfo_fixup): Use is_64bit_tdesc.
8771         [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8772         (tdesc_x32_avx_linux, tdesc_x32_linux)
8773         (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8774         Declare.
8775         (x86_linux_update_xmltarget): Delete.
8776         (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8777         (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8778         (AMD64_LINUX_USER64_CS): New.
8779         (x86_linux_read_description): New, based on
8780         x86_linux_update_xmltarget.
8781         (same_process_callback): New.
8782         (x86_arch_setup_process_callback): New.
8783         (x86_linux_update_xmltarget): New.
8784         (x86_regsets_info): New.
8785         (amd64_linux_regs_info): New.
8786         (i386_linux_usrregs_info): New.
8787         (i386_linux_regs_info): New.
8788         (x86_linux_regs_info): New.
8789         (x86_arch_setup): Reimplement.
8790         (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8791         (x86_emit_ops): Ditto.
8792         (the_low_target): Adjust.  Install x86_linux_regs_info,
8793         x86_cannot_fetch_register, and x86_cannot_store_register.
8794         (initialize_low_arch): New.
8795         * linux-ia64-low.c (tdesc_ia64): Declare.
8796         (ia64_fetch_register): Adjust.
8797         (ia64_usrregs_info, regs_info): New globals.
8798         (ia64_regs_info): New function.
8799         (the_low_target): Adjust.
8800         (initialize_low_arch): New function.
8801         * linux-sparc-low.c (tdesc_sparc64): Declare.
8802         (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8803         Adjust.
8804         (sparc_arch_setup): New function.
8805         (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8806         (the_low_target): Adjust.
8807         (initialize_low_arch): New function.
8808         * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8809         (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8810         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8811         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8812         (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8813         (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8814         (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8815         (tdesc_powerpc_isa205_vsx64l): Declare.
8816         (ppc_cannot_store_register, ppc_collect_ptrace_register)
8817         (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8818         (ppc_set_pc, ppc_get_hwcap): Adjust.
8819         (ppc_usrregs_info): Forward declare.
8820         (!__powerpc64__) ppc_regmap_adjusted: New global.
8821         (ppc_arch_setup): Adjust to the current process'es target
8822         description.
8823         (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8824         (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8825         (ppc_store_evrregset): Adjust.
8826         (target_regsets): Rename to ...
8827         (ppc_regsets): ... this, and make static.
8828         (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8829         (ppc_regs_info): New function.
8830         (the_low_target): Adjust.
8831         (initialize_low_arch): New function.
8832         * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8833         (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8834         (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8835         (tdesc_s390x_linux64v2): Declare.
8836         (s390_collect_ptrace_register, s390_supply_ptrace_register)
8837         (s390_fill_gregset, s390_store_last_break): Adjust.
8838         (target_regsets): Rename to ...
8839         (s390_regsets): ... this, and make static.
8840         (s390_get_pc, s390_set_pc): Adjust.
8841         (s390_get_hwcap): New target_desc parameter, and use it.
8842         [__s390x__] (have_hwcap_s390_high_gprs): New global.
8843         (s390_arch_setup): Adjust to set the current process'es target
8844         description.  Don't adjust the regmap.
8845         (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8846         [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8847         (regs_info_3264): New globals.
8848         (s390_regs_info): New function.
8849         (the_low_target): Adjust.
8850         (initialize_low_arch): New function.
8851         * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8852         (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8853         [__mips64] (init_registers_mips_linux)
8854         (init_registers_mips_dsp_linux): Delete defines.
8855         [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8856         (have_dsp): New global.
8857         (mips_read_description): New, based on mips_arch_setup.
8858         (mips_arch_setup): Reimplement.
8859         (get_usrregs_info): New function.
8860         (mips_cannot_fetch_register, mips_cannot_store_register)
8861         (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8862         (mips_fill_fpregset, mips_store_fpregset): Adjust.
8863         (target_regsets): Rename to ...
8864         (mips_regsets): ... this, and make static.
8865         (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8866         (dsp_regs_info, regs_info): New globals.
8867         (mips_regs_info): New function.
8868         (the_low_target): Adjust.
8869         (initialize_low_arch): New function.
8870         * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8871         (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8872         Declare.
8873         (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8874         (arm_read_description): New, with bits factored from
8875         arm_arch_setup.
8876         (arm_arch_setup): Reimplement.
8877         (target_regsets): Rename to ...
8878         (arm_regsets): ... this, and make static.
8879         (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8880         (arm_regs_info): New function.
8881         (the_low_target): Adjust.
8882         (initialize_low_arch): New function.
8883         * linux-m68k-low.c (tdesc_m68k): Declare.
8884         (target_regsets): Rename to ...
8885         (m68k_regsets): ... this, and make static.
8886         (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8887         (m68k_regs_info): New function.
8888         (m68k_arch_setup): New function.
8889         (the_low_target): Adjust.
8890         (initialize_low_arch): New function.
8891         * linux-sh-low.c (tdesc_sharch): Declare.
8892         (target_regsets): Rename to ...
8893         (sh_regsets): ... this, and make static.
8894         (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8895         (sh_regs_info, sh_arch_setup): New functions.
8896         (the_low_target): Adjust.
8897         (initialize_low_arch): New function.
8898         * linux-bfin-low.c (tdesc_bfin): Declare.
8899         (bfin_arch_setup): New function.
8900         (bfin_usrregs_info, regs_info): New globals.
8901         (bfin_regs_info): New function.
8902         (the_low_target): Adjust.
8903         (initialize_low_arch): New function.
8904         * linux-cris-low.c (tdesc_cris): Declare.
8905         (cris_arch_setup): New function.
8906         (cris_usrregs_info, regs_info): New globals.
8907         (cris_regs_info): New function.
8908         (the_low_target): Adjust.
8909         (initialize_low_arch): New function.
8910         * linux-cris-low.c (tdesc_crisv32): Declare.
8911         (cris_arch_setup): New function.
8912         (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8913         (cris_regs_info): New function.
8914         (the_low_target): Adjust.
8915         (initialize_low_arch): New function.
8916         * linux-m32r-low.c (tdesc_m32r): Declare.
8917         (m32r_arch_setup): New function.
8918         (m32r_usrregs_info, regs_info): New globals.
8919         (m32r_regs_info): Adjust.
8920         (initialize_low_arch): New function.
8921         * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8922         (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8923         (tic6x_usrregs_info): Forward declare.
8924         (tic6x_read_description): New function, based on ...
8925         (tic6x_arch_setup): ... this.  Reimplement.
8926         (target_regsets): Rename to ...
8927         (tic6x_regsets): ... this, and make static.
8928         (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8929         (tic6x_regs_info): New function.
8930         (the_low_target): Adjust.
8931         (initialize_low_arch): New function.
8932         * linux-xtensa-low.c (tdesc_xtensa): Declare.
8933         (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8934         (target_regsets): Rename to ...
8935         (xtensa_regsets): ... this, and make static.
8936         (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8937         globals.
8938         (xtensa_arch_setup, xtensa_regs_info): New functions.
8939         (the_low_target): Adjust.
8940         (initialize_low_arch): New function.
8941         * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8942         (nios2_arch_setup): Set the current process'es tdesc.
8943         (target_regsets): Rename to ...
8944         (nios2_regsets): ... this.
8945         (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8946         (nios2_regs_info): New function.
8947         (the_low_target): Adjust.
8948         (initialize_low_arch): New function.
8949         * linux-aarch64-low.c (tdesc_aarch64): Declare.
8950         (aarch64_arch_setup): Set the current process'es tdesc.
8951         (target_regsets): Rename to ...
8952         (aarch64_regsets): ... this.
8953         (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8954         (aarch64_regs_info): New function.
8955         (the_low_target): Adjust.
8956         (initialize_low_arch): New function.
8957         * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8958         globals.
8959         (target_regsets): Rename to ...
8960         (tile_regsets): ... this.
8961         (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8962         (tile_regs_info): New function.
8963         (tile_arch_setup): Set the current process'es tdesc.
8964         (the_low_target): Adjust.
8965         (initialize_low_arch): New function.
8966         * spu-low.c (tdesc_spu): Declare.
8967         (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8968         * win32-arm-low.c (tdesc_arm): Declare.
8969         (arm_arch_setup): New function.
8970         (the_low_target): Install arm_arch_setup instead of
8971         init_registers_arm.
8972         * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8973         (init_windows_x86): Rename to ...
8974         (i386_arch_setup): ... this.  Set `win32_tdesc'.
8975         (the_low_target): Adjust.
8976         * win32-low.c (win32_tdesc): New global.
8977         (child_add_thread): Don't create the thread cache here.
8978         (do_initial_child_stuff): Set the new process'es tdesc.
8979         * win32-low.h (struct target_desc): Forward declare.
8980         (win32_tdesc): Declare.
8981         * lynx-i386-low.c (tdesc_i386): Declare global.
8982         (lynx_i386_arch_setup): Set `lynx_tdesc'.
8983         * lynx-low.c (lynx_tdesc): New global.
8984         (lynx_add_process): Set the new process'es tdesc.
8985         * lynx-low.h (struct target_desc): Forward declare.
8986         (lynx_tdesc): Declare global.
8987         * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8988         (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8989         * nto-low.c (nto_tdesc): New global.
8990         (do_attach): Set the new process'es tdesc.
8991         * nto-low.h (struct target_desc): Forward declare.
8992         (nto_tdesc): Declare.
8993         * nto-x86-low.c (tdesc_i386): Declare.
8994         (nto_x86_arch_setup): Set `nto_tdesc'.
8995
8996 2013-06-04  Gary Benson  <gbenson@redhat.com>
8997
8998         * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8999         to qSupported response when appropriate.
9000         (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9001         with nonzero-length annex.
9002         * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9003         arguments supplied in annex.
9004
9005 2013-05-31  Doug Evans  <dje@google.com>
9006
9007         PR server/15594
9008         * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9009         64 bits in 64-cross-32 environment.
9010
9011 2013-05-28  Pedro Alves  <palves@redhat.com>
9012
9013         * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9014         (aarch64-without-fpu.c): Delete rule.
9015         * configure.srv (aarch64*-*-linux*): Remove references to
9016         aarch64-without-fpu.o and aarch64-without-fpu.xml.
9017         * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9018         declaration.
9019
9020 2013-05-24  Pedro Alves  <palves@redhat.com>
9021
9022         * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9023         instead of strchr/decode_address.  Error if the range isn't split
9024         with a ','.  Don't assume there's be a ':' in the action.
9025
9026 2013-05-23  Yao Qi  <yao@codesourcery.com>
9027             Pedro Alves  <palves@redhat.com>
9028
9029         * linux-low.c (lwp_in_step_range): New function.
9030         (linux_wait_1): If the thread was range stepping and stopped
9031         outside the stepping range, report the stop to GDB.  Otherwise,
9032         continue stepping.  Add range stepping debug output.
9033         (linux_set_resume_request): Copy the step range from the resume
9034         request to the lwp.
9035         (linux_supports_range_stepping): New.
9036         (linux_target_ops) <supports_range_stepping>: Set to
9037         linux_supports_range_stepping.
9038         * linux-low.h (struct linux_target_ops)
9039         <supports_range_stepping>: New field.
9040         (struct lwp_info) <step_range_start, step_range_end>: New fields.
9041         * linux-x86-low.c (x86_supports_range_stepping): New.
9042         (the_low_target) <supports_range_stepping>: Set to
9043         x86_supports_range_stepping.
9044         * server.c (handle_v_cont): Handle 'r' action.
9045         (handle_v_requests): Append ";r" if the target supports range
9046         stepping.
9047         * target.h (struct thread_resume) <step_range_start,
9048         step_range_end>: New fields.
9049         (struct target_ops) <supports_range_stepping>:
9050         New field.
9051         (target_supports_range_stepping): New macro.
9052
9053 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
9054
9055         * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9056         confusion in comment.
9057
9058 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
9059
9060         * lynx-low.c (struct process_info_private): New type.
9061         (lynx_add_process): New function.
9062         (lynx_create_inferior, lynx_attach): Replace calls to
9063         add_process by calls to lynx_add_process.
9064         (lynx_resume): If PTID is null, then try using
9065         current_process()->private->last_wait_event_ptid.
9066         Add comments.
9067         (lynx_clear_inferiors): Delete.  The contents of that function
9068         has been inlined in lynx_mourn;
9069         (lynx_wait_1): Save the ptid in the process's private data.
9070         (lynx_mourn): Free the process' private data.  Replace call
9071         to lynx_clear_inferiors by call to clear_inferiors.
9072
9073 2013-05-17  Yao Qi  <yao@codesourcery.com>
9074
9075         * i386-low.c (i386_length_and_rw_bits): Move the comment to
9076         the right place.
9077
9078 2013-05-16  Luis Machado  <lgustavo@codesourcery.com>
9079
9080         * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9081         PT_DATA_ADDR and PT_TEXT_END_ADDR.  Update comments.
9082         (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9083         PT_TEXT_END_ADDR guards.  Update comments.
9084         (linux_target_op) <read_offsets>: Conditionally define to
9085         linux_read_offsets if the target is UCLIBC and if it defines
9086         PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9087
9088 2013-05-06  Sandra Loosemore  <sandra@codesourcery.com>
9089             Andrew Jenner  <andrew@codesourcery.com>
9090
9091         * Makefile.in (SFILES): Add linux-nios2-low.c.
9092         (clean): Add action to delete nios2-linux.c.
9093         (nios2-linux.c): New rule.
9094         * configure.srv: Add nios2*-*-linux*.
9095         * linux-nios2-low.c: New.
9096
9097 2013-05-03  Hafiz Abid Qadeer  <abidh@codesourcery.com>
9098
9099         * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9100
9101 2013-04-25  Hui Zhu  <hui@codesourcery.com>
9102
9103         PR gdb/15186
9104         * ax.c (ax_printf): Add fflush.
9105
9106 2013-04-22  Tom Tromey  <tromey@redhat.com>
9107
9108         * Makefile.in (SFILES): Add filestuff.c.
9109         (OBS): Add filestuff.o.
9110         (filestuff.o): New target.
9111         * config.in, configure: Rebuild.
9112         * configure.ac: Check for fdwalk, pipe2.
9113
9114 2013-04-17  Pedro Alves  <palves@redhat.com>
9115
9116         * configure.ac (USE_THREAD_DB): Delete variable.
9117         (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9118         Don't AC_SUBST USE_THREAD_DB.
9119         * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9120         * config.in, configure: Regenerate.
9121
9122 2013-04-16  Pedro Alves  <palves@redhat.com>
9123
9124         * linux-low.h (struct lwp_info) <thread_known>: Move under
9125         the USE_THREAD_DB #ifdef.
9126
9127 2013-04-16  Pedro Alves  <palves@redhat.com>
9128
9129         * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9130         (linux-low.o): Delete rule.
9131         * linux-low.h: Always include "gdb_thread_db.h" instead of
9132         conditionally including thread_db.h.
9133         (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9134         HAVE_THREAD_DB_H.
9135
9136 2013-04-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
9137
9138         * Makefile.in (install-only): Fix make install regression.
9139
9140 2013-04-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
9141
9142         Convert man pages to texinfo, new gdbinit.5 texinfo page.
9143         * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9144         installation.
9145         * gdbserver.1: Remove.
9146
9147 2013-03-22  Pedro Alves  <palves@redhat.com>
9148
9149         * linux-low.c (handle_extended_wait): Don't call
9150         linux_enable_event_reporting.
9151
9152 2013-03-15  Tony Theodore  <tonyt@logyst.com>
9153
9154         PR build/9098:
9155         * Makefile.in (SHELL): Use @SHELL@.
9156
9157 2013-03-14  Sergio Durigan Junior  <sergiodj@redhat.com>
9158
9159         * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9160         compiler warning.
9161
9162 2013-03-13  Joel Brobecker  <brobecker@adacore.com>
9163
9164         * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9165         Remove extraneous NULL element.
9166
9167 2013-03-13  Yao Qi  <yao@codesourcery.com>
9168
9169         * tracepoint.c (traceframe_read_tsv): Look for the last matched
9170         'V' block in trace frame.
9171
9172 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
9173
9174         * target.h (struct target_ops): Add btrace ops.
9175         (target_supports_btrace): New macro.
9176         (target_enable_btrace): New macro.
9177         (target_disable_btrace): New macro.
9178         (target_read_btrace): New macro.
9179         * gdbthread.h (struct thread_info): Add btrace field.
9180         * server.c: Include btrace-common.h.
9181         (handle_btrace_general_set): New function.
9182         (handle_btrace_enable): New function.
9183         (handle_btrace_disable): New function.
9184         (handle_general_set): Call handle_btrace_general_set.
9185         (handle_qxfer_btrace): New function.
9186         (struct qxfer qxfer_packets[]): Add btrace entry.
9187         * inferiors.c (remove_thread): Disable btrace.
9188         * linux-low: Include linux-btrace.h.
9189         (linux_low_enable_btrace): New function.
9190         (linux_low_read_btrace): New function.
9191         (linux_target_ops): Add btrace ops.
9192         * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9193         Add srv_linux_btrace=yes.
9194         (x86_64-*-linux*): Add linux-btrace.o.
9195         Add srv_linux_btrace=yes.
9196         * configure.ac: Define HAVE_LINUX_BTRACE.
9197         * config.in: Regenerated.
9198         * configure: Regenerated.
9199
9200 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
9201
9202         * server.c (handle_qxfer): Preserve error message if -3 is
9203         returned.
9204         (qxfer): Document the -3 return value.
9205
9206 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
9207
9208         * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9209         (linux_btrace_h): New variable.
9210         (linux-btrace.o): New rule.
9211
9212 2013-03-08  Stan Shebs  <stan@codesourcery.com>
9213             Hafiz Abid Qadeer  <abidh@codesourcery.com>
9214
9215         * tracepoint.c (trace_buffer_size): New global.
9216         (DEFAULT_TRACE_BUFFER_SIZE): New define.
9217         (init_trace_buffer): Change to one-argument function. Allocate
9218         trace buffer memory.
9219         (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9220         handle QTBuffer:size packet.
9221         (cmd_bigqtbuffer_size): New function.
9222         (initialize_tracepoint): Call init_trace_buffer with
9223         DEFAULT_TRACE_BUFFER_SIZE.
9224         * server.c (handle_query): Add QTBuffer:size in the
9225         supported packets.
9226
9227 2013-03-07  Yao Qi  <yao@codesourcery.com>
9228
9229         * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9230         (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9231         of -1.
9232         (cmd_qtsp): Adjust condition.  Do post increment.
9233         Set cur_action and cur_step_action back to 0.
9234
9235 2013-03-07  Jeremy Bennett  <jeremy.bennett@embecosm.com>
9236
9237         PR server/15236
9238         * linux-low.c (linux_write_memory): Return early success if LEN is
9239         zero.
9240
9241 2013-03-05  Corinna Vinschen  <vinschen@redhat.de>
9242
9243         * configure.srv: Add x86_64-*-cygwin* as target.
9244
9245 2013-02-28  Tom Tromey  <tromey@redhat.com>
9246
9247         * configure.ac: Invoke AC_SYS_LARGEFILE.
9248         * configure, config.in: Rebuild.
9249
9250 2013-02-28  Corinna Vinschen  <vinschen@redhat.com>
9251
9252         * win32-low.c: Throughout, fix format strings and casts of
9253         printf-like functions to avoid type related warnings on all
9254         platforms.
9255         (get_child_debug_event): Print dwDebugEventCode as hex since
9256         that's how it's usually documented.
9257
9258 2013-02-28  Yao Qi  <yao@codesourcery.com>
9259
9260         * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9261         pulongest.
9262
9263 2013-02-27  Jiong Wang  <jiwang@tilera.com>
9264
9265         * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9266         (reg-tilegx32.c): New rule.
9267         * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9268         * linux-tile-low.c (tile_arch_setup): New function.  Invoke
9269         different register info initializer according to elf class.
9270         (init_registers_tilgx32): New function.  The tilegx32 register info
9271         initializer.
9272         (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9273         (tile_store_gregset): Likewise.
9274
9275 2013-02-27  Yao Qi  <yao@codesourcery.com>
9276
9277         * server.c (process_point_options): Print debug message when
9278         debug_threads is true.
9279
9280 2013-02-26  Yao Qi  <yao@codesourcery.com>
9281
9282         * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9283
9284 2013-02-19  Pedro Alves  <palves@redhat.com>
9285             Kai Tietz <ktietz@redhat.com>
9286
9287         PR gdb/15161
9288
9289         * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9290         instead of strtoul to extract address from packet.
9291         (process_serial_event) <'z'>: Likewise.
9292
9293 2013-02-18  Yao Qi  <yao@codesourcery.com>
9294
9295         * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9296
9297 2013-02-14  Pedro Alves  <palves@redhat.com>
9298
9299         Plug memory leak.
9300
9301         * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9302         TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9303
9304 2013-02-14  Pedro Alves  <palves@redhat.com>
9305
9306         * tracepoint.c (cmd_qtdpsrc): Use savestring.
9307
9308 2013-02-14  Pedro Alves  <palves@redhat.com>
9309
9310         * tracepoint.c (save_string): Delete.
9311         (add_tracepoint_action): Use savestring instead of save_string.
9312
9313 2013-02-12  Pedro Alves  <palves@redhat.com>
9314
9315         * linux-xtensa-low.c: Ditto.
9316         * xtensa-xtregs.c: Ditto.
9317
9318 2013-02-12  Sanimir Agovic  <sanimir.agovic@intel.com>
9319
9320         * thread-db.c (thread_db_get_tls_address): NULL pointer check
9321         thread_db.
9322
9323 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
9324
9325         * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9326         aarch64_num_wp_regs and aarch64_num_bp_regs to
9327         AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9328
9329 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
9330
9331         * linux-aarch64-low.c (ps_get_thread_area): Replace
9332         PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9333
9334 2013-02-04  Jim MacArthur  <jim.macarthur@arm.com>
9335             Marcus Shawcroft  <marcus.shawcroft@arm.com>
9336             Nigel Stephens  <nigel.stephens@arm.com>
9337             Yufeng Zhang  <yufeng.zhang@arm.com>
9338
9339         * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9340         (aarch64.c, aarch64-without-fpu.c): New targets.
9341         * configure.srv (aarch64*-*-linux*): New.
9342         * linux-aarch64-low.c: New file.
9343
9344 2013-02-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
9345
9346         * linux-low.c (handle_extended_wait, linux_create_inferior)
9347         (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9348         (dequeue_one_deferred_signal, linux_resume_one_thread)
9349         (fetch_register, linux_write_memory, linux_enable_event_reporting)
9350         (linux_tracefork_grandchild, linux_test_for_tracefork)
9351         (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9352         PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9353         where the argument is 0.
9354
9355 2013-01-25  Yao Qi  <yao@codesourcery.com>
9356
9357         * event-loop.c: Include "queue.h".
9358         (gdb_event_p): New typedef.
9359         (struct gdb_event) <next_event>: Remove.
9360         (event_queue): Change to QUEUE(gdb_event_p).
9361         (async_queue_event): Remove.
9362         (gdb_event_xfree): New.
9363         (initialize_event_loop): New.
9364         (process_event): Use API from QUEUE.
9365         (wait_for_event): Likewise.
9366         * server.c (main): Call initialize_event_loop.
9367         * server.h (initialize_event_loop): Declare.
9368
9369 2013-01-18  Yao Qi  <yao@codesourcery.com>
9370
9371         * ax.h (struct eval_agent_expr_context): New.
9372         (gdb_eval_agent_expr): Update declaration.
9373         * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9374         TFRAME.  Add new argument CTX.
9375         * server.h (struct eval_agent_expr_context): Declare.
9376         (agent_mem_read, agent_tsv_read): Update declaration.
9377         (agent_mem_read_string): Likewise.
9378         * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9379         (add_traceframe_block): Add new argument TPOINT.
9380         Increase TPOINT->traceframe_usage.
9381         (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9382         eval_tracepoint_agent_expr.
9383         (condition_true_at_tracepoint): Likewise.
9384         (agent_mem_read): Remove argument TFRAME.  Add argument CTX.
9385         (agent_mem_read_string, agent_tsv_read): Likewise.
9386
9387 2013-01-16  Yao Qi  <yao@codesourcery.com>
9388
9389         * linux-low.c (linux_resume_one_lwp): Don't check
9390         'lwp->bp_reinsert != 0'.
9391
9392 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
9393             Pedro Alves  <palves@redhat.com>
9394
9395         * lynx-low.c (ptrace_request_to_str): Define a temporary
9396         macro and use it to simplify this function's implementation.
9397
9398 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
9399
9400         * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9401         sets errno.
9402
9403 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
9404
9405         * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9406
9407 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
9408
9409         * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9410
9411 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
9412
9413         * lynx-low.c (lynx_resume): Use the resume_info parameter
9414         to determine the ptid for the lynx_ptrace call, unless
9415         it is equal to minus_one_ptid, in which case we use the
9416         ptid of the current_inferior.
9417         (lynx_wait_1): After having received a thread create/exit
9418         event, resume the inferior's execution using the signaling
9419         thread's ptid, rather than the old ptid.
9420
9421 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
9422
9423         * lynx-low.c (lynx_resume): Delete variable ret.
9424
9425 2013-01-01  Joel Brobecker  <brobecker@adacore.com>
9426
9427         * gdbreplay.c (gdbreplay_version): Update copyright year.
9428         * server.c (gdbserver_version): Likewise.
9429
9430 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
9431
9432         * lynx-low.c (lynx_wait_1): Add debug trace before adding
9433         new thread.
9434
9435 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
9436
9437         * lynx-low.c (ptrace_request_to_str): Add handling for
9438         PTRACE_GETTRACESIG.
9439
9440 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
9441
9442         * lynx-low.c (lynx_attach): Delete variable new_process.
9443
9444 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
9445
9446         * lynx-low.c (lynx_create_inferior): Delete variable
9447         new_process.
9448
9449 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
9450
9451         * lynx-low.c (ptrace_request_to_str): Do not handle
9452         PTRACE_GETTHREADLIST if this macro does not exist.
9453
9454 2012-12-15  Yao Qi  <yao@codesourcery.com>
9455
9456         * Makefile.in (OBS): Add notif.o.
9457         * notif.c, notif.h: New.
9458         * server.c: Include "notif.h".
9459         (struct vstop_notif) <next>: Remove.
9460         <base>: New field.
9461         (queue_stop_reply): Update.
9462         (push_event, send_next_stop_reply): Remove.
9463         (discard_queued_stop_replies): Update.
9464         (notif_stop): New variable.
9465         (handle_v_stopped): Remove.
9466         (handle_v_requests): Don't call handle_v_stopped.  Call
9467         handle_ack_notif instead.
9468         (queue_stop_reply_callback): Call notif_event_enque instead
9469         of queue_stop_reply.
9470         (handle_status): Don't call send_next_stop_reply, call
9471         notif_write_event instead.
9472         (kill_inferior_callback): Likewise.
9473         (detach_or_kill_inferior_callback): Likewise.
9474         (main): Call initialize_notif.
9475         (process_serial_event): Call QUEUE_is_empty.
9476         (handle_target_event): Call notif_push instead of push event.
9477         * server.h (push_event): Remove declaration.
9478
9479 2012-12-10  Tom Tromey  <tromey@redhat.com>
9480
9481         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9482         (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9483         macros.
9484         (.c.o): Rewrite.
9485         (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9486         (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9487         (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9488         (amd64-linux-ipa.o, ax.o): Rewrite.
9489         (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9490         (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9491         (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9492         (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9493         (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9494         (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9495         (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9496         (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9497         (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9498         (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9499         (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9500         (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9501         (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9502         (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9503         (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9504         (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9505         (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9506         (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9507         (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9508         (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9509         (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9510         (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9511         (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9512         (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9513         (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9514         (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9515         (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9516         (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9517         (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9518         (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9519         (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9520         (reg-tilegx.o): Remove.
9521         (all_object_files): New macro.
9522         Include .deps files.
9523         * aclocal.m4, configure: Rebuild.
9524         * acinclude.m4: Include depstand.m4, lead-dot.m4.
9525         * configure.ac: Invoke ZW_CREATE_DEPDIR,
9526         ZW_PROG_COMPILER_DEPENDENCIES.  Compute GMAKE condition.
9527
9528 2012-12-05  Tom Tromey  <tromey@redhat.com>
9529
9530         PR gdb/14917:
9531         * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9532
9533 2012-11-28  Markus Metzger  <markus.t.metzger@intel.com>
9534
9535         * configure.ac: Check for linux/perf_event.h.
9536         * config.in: Regenerated.
9537         * configure: Regenerated.
9538
9539 2012-11-26  Maxime Villard  <rustyBSD@gmx.fr>
9540
9541         * hostio.c (handle_readlink): Decrease buffer size
9542         parameter passed to readlink by one byte.
9543
9544 2012-11-26  Yao Qi  <yao@codesourcery.com>
9545
9546         * configure.ac (build_warnings): Append '-Wempty-body'.
9547         * configure: Regenerated.
9548         * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9549         body.
9550
9551 2012-11-15  Pierre Muller  <muller@sourceware.org>
9552
9553         * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9554         * config.in: Regenerate.
9555         * configure: Regenerate.
9556         * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9557         Use "gdb_wait.h" header instead of <sys/wait.h> header.
9558         * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9559         * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9560         header.
9561         * server.c: Remove HAVE_WAIT_H conditional.  Use "gdb_wait.h" header
9562         instead of <sys/wait.h> header.
9563         * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9564
9565 2012-11-13 Markus Metzger  <markus.t.metzger@intel.com>
9566
9567         * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9568         (various make rules): Remove -DGDBSERVER
9569
9570 2012-11-09  Yao Qi  <yao@codesourcery.com>
9571
9572         * spu-low.c (current_ptid): Move it to ..
9573         * gdbthread.h: ... here.  New.
9574         * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9575         * server.c (myresume, process_serial_event): Likewise.
9576         * thread-db.c (thread_db_find_new_threads): Likewise.
9577         * tracepoint.c (run_inferior_command): Likewise.
9578
9579 2012-10-01  Andrew Burgess  <aburgess@broadcom.com>
9580
9581         * server.c (handle_search_memory_1): Include access length in
9582         warning message.
9583
9584 2012-09-05  Michael Brandt  <michael.brandt@axis.com>
9585
9586         * linux-crisv32-low.c: Fix compile errors.
9587
9588 2012-09-04  Yao Qi  <yao@codesourcery.com>
9589
9590         * tracepoint.c (cmd_qtsv): Adjust debug message.
9591         Don't check CUR_TPOINT.
9592
9593 2012-08-28  Yao Qi  <yao@codesourcery.com>
9594
9595         * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9596         * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9597         (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9598         Remove declarations of xmalloc, xreallloc, xstrdup and
9599         freeargv.
9600         * Makefile.in (libiberty_h): New.
9601         (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9602         (linux-bfin-low.o): Append dependency 'libiberty.h'.
9603
9604 2012-08-23  Yao Qi  <yao@codesourcery.com>
9605
9606         * server.h: Remove declaration of 'xsnprintf'.
9607
9608 2012-08-22  Keith Seitz  <keiths@redhat.com>
9609
9610         * server.h: Include build-gnulib-gbserver/config.h.
9611         * gdbreplay.c: Likewise.
9612
9613 2012-08-08  Doug Evans  <dje@google.com>
9614
9615         * Makefile.in (SFILES): Add gdb_vecs.c.
9616         (OBS): Add gdb_vecs.o.
9617         (gdb_vecs_h, host_defs_h): New variables.
9618         (thread-db.o): Add $(gdb_vecs_h) dependency.
9619         (gdb_vecs.o): New rule.
9620         * thread-db.c: #include "gdb_vecs.h".
9621         (thread_db_load_search): Use a vector to iterate over path elements.
9622         Handle text appearing after "$pdir".
9623
9624         * configure.ac: Add check for strstr.
9625         * config.in: Regenerate.
9626         * configure: Regenerate.
9627
9628 2012-08-02  Ulrich Weigand  <ulrich.weigand@linaro.org>
9629
9630         * hostio.c (handle_pread): If pread fails, fall back to attempting
9631         lseek/read.
9632         (handle_pwrite): Likewise for pwrite.
9633
9634 2012-08-01  Ulrich Weigand  <ulrich.weigand@linaro.org>
9635
9636         * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9637         between unsupported TYPE and unimplementable ADDR/LEN combination.
9638         (arm_insert_point): Act on new return value.
9639
9640 2012-07-31  Pedro Alves  <palves@redhat.com>
9641
9642         * server.c (process_point_options): Only skip tokens if we find
9643         one that is unrecognized.  Don't treat 'X' specially while
9644         skipping unrecognized tokens.
9645
9646 2012-07-30  Ulrich Weigand  <ulrich.weigand@linaro.org>
9647
9648         * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9649         to 4-byte-align HW breakpoint addresses for Thumb.
9650
9651 2012-07-27  Yao Qi  <yao@codesourcery.com>
9652
9653         PR remote/14161.
9654
9655         * server.h: Declare gdb_agent_about_to_close.
9656         * target.c (kill_inferior): Include "agent.h".
9657         New.  Send command 'kill'.
9658         * target.h (kill_inferior): Removed macro.
9659         * tracepoint.c (gdb_agent_about_to_close): New.
9660         (gdb_agent_helper_thread): Handle command 'close'.
9661         Wait endlessly until the inferior stops.
9662         Install gdb_agent_remove_socket to atexit hook.
9663         (agent_socket_name): New static variable.
9664         (gdb_agent_socket_init): Replace local variable 'name' with
9665         'agent_socket_name'.
9666         (gdb_agent_remove_socket): New.
9667
9668 2012-07-27  Yao Qi  <yao@codesourcery.com>
9669
9670         * server.c (process_point_options): Stop at 'X' when parsing.
9671
9672 2012-07-19  Michael Eager  <eager@eagercon.com>
9673
9674         * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9675         to hw_execute.
9676         * linux-x86-low.c (x86_insert_point, x86_remove_point):
9677         Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9678         hardware breakpoint.
9679
9680 2012-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
9681
9682         * gdbserver/linux-low.c (initialize_low): Call
9683         linux_ptrace_init_warnings.
9684
9685 2012-07-02  Doug Evans  <dje@google.com>
9686
9687         * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9688         pointer to int.
9689
9690 2012-07-02  Stan Shebs  <stan@codesourcery.com>
9691
9692         * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9693         (ax.o): Add it to build rule.
9694         (ax-ipa.o): Ditto.
9695         (OBS): Add format.o.
9696         (IPA_OBS): Add format.o.
9697         * server.c (handle_query): Claim support for breakpoint commands.
9698         (process_point_options): Add command case.
9699         (process_serial_event): Leave running if there are printfs in
9700         effect.
9701         * mem-break.h (any_persistent_commands): Declare.
9702         (add_breakpoint_commands): Declare.
9703         (gdb_no_commands_at_breakpoint): Declare.
9704         (run_breakpoint_commands): Declare.
9705         * mem-break.c (struct point_command_list): New struct.
9706         (struct breakpoint): New field command_list.
9707         (any_persistent_commands): New function.
9708         (add_commands_to_breakpoint): New function.
9709         (add_breakpoint_commands): New function.
9710         (gdb_no_commands_at_breakpoint): New function.
9711         (run_breakpoint_commands): New function.
9712         * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9713         locally.
9714         * ax.c: Include format.h.
9715         (ax_printf): New function.
9716         (gdb_eval_agent_expr): Add printf opcode.
9717
9718 2012-06-13  Yao Qi  <yao@codesourcery.com>
9719
9720         * server.c (start_inferior): Remove duplicated writes to fields
9721         'last_resume_kind' and 'last_status' of 'current_inferior'.
9722
9723 2012-06-12  Yao Qi  <yao@codesourcery.com>
9724             Pedro Alves  <palves@redhat.com>
9725
9726         * linux-low.c (linux_set_resume_request): Simplify predicate.  Add
9727         comment.
9728         * server.c (handle_v_cont): Extend comment.
9729
9730 2012-06-11  Yao Qi  <yao@codesourcery.com>
9731
9732         * linux-low.c (linux_attach): Add 'static'.
9733
9734 2012-06-06  Yao Qi  <yao@codesourcery.com>
9735
9736         * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9737
9738 2012-06-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
9739
9740         Fix gcc -flto compilation warning.
9741         * server.c (main): Make variable multi_mode and attach volatile.
9742
9743 2012-05-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
9744
9745         * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9746         if the platform doesn't know about it.
9747
9748 2012-05-30  Jeff Kenton  <jkenton@tilera.com>
9749
9750         * Makefile.in (SFILES): Add linux-tile-low.c.
9751         (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9752         * configure.srv: Handle tilegx-*-linux*.
9753         * linux-tile-low.c: New file.
9754
9755 2012-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
9756
9757         * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9758
9759 2012-05-24  Pedro Alves  <palves@redhat.com>
9760
9761         PR gdb/7205
9762
9763         Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9764
9765 2012-05-24  Pedro Alves  <palves@redhat.com>
9766
9767         PR gdb/7205
9768
9769         Replace target_signal with gdb_signal throughout.
9770
9771 2012-05-22  Maciej W. Rozycki  <macro@codesourcery.com>
9772
9773         * linux-low.c (linux_store_registers): Avoid the copying sequence
9774         when no data has been retrieved by ptrace.
9775
9776 2012-05-22  Will Deacon  <will.deacon@arm.com>
9777
9778         * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9779         Include asm/ptrace.h.
9780         (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9781         already defined.
9782
9783 2012-05-21  Maciej W. Rozycki  <macro@codesourcery.com>
9784
9785         * linux-low.c (linux_store_registers): Don't re-retrieve data
9786         with ptrace that has already been obtained from /proc.  Always
9787         copy any data retrieved with ptrace to the buffer supplied.
9788
9789 2012-05-11  Yao Qi  <yao@codesourcery.com>
9790             Pedro Alves  <palves@redhat.com>
9791
9792         * linux-low.c (enum stopping_threads_kind): New.
9793         (stopping_threads): Change type to `enum stopping_threads_kind'.
9794         (handle_extended_wait): If stopping and suspending threads, leave
9795         the new_lwp suspended too.
9796         (linux_wait_for_event): Adjust.
9797         (stop_all_lwps): Set `stopping_threads' to
9798         STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9799         whether we're suspending threads or just stopping them.  Assert no
9800         recursion happens.
9801
9802 2012-04-29  Yao Qi  <yao@codesourcery.com>
9803
9804         * server.h: Move some code to ...
9805         * gdbthread.h: ... here.  New.
9806         * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9807         (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9808         (nto-low.o, win32-low.o): Likewise.
9809         * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9810         * regcache.c, remote-utils.c, server.c: Likewise.
9811         * target.c, tracepoint.c, win32-low.c: Likewise.
9812
9813 2012-04-24  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
9814
9815         * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9816         (PTRACE_ARG4_TYPE): Likewise.
9817         (PTRACE_XFER_TYPE): Likewise.
9818         * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9819         ptrace to PTRACE_ARG3_TYPE.
9820         * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9821         (PTRACE_ARG4_TYPE): Likewise.
9822         (PTRACE_XFER_TYPE): Likewise.
9823         (linux_detach_one_lwp): Cast fourth argument of
9824         ptrace to long then PTRACE_ARG4_TYPE.
9825         (regsets_fetch_inferior_registers): Cast third argument of
9826         ptrace to long then PTRACE_ARG3_TYPE.
9827         (regsets_store_inferior_registers): Likewise.
9828
9829 2012-04-20  Pedro Alves  <palves@redhat.com>
9830
9831         * configure: Regenerate.
9832
9833 2012-04-19  Pedro Alves  <palves@redhat.com>
9834
9835         * Makefile.in (GNULIB_BUILDDIR): New.
9836         (LIBGNU, INCGNU, GNULIB_H): Adjust.
9837         (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9838         (all, install-only, uninstall, clean-info, all-lib, clean): No
9839         longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
9840         (maintainer-clean realclean distclean): Use subdir_do.
9841         (subdir_do): New.
9842         (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
9843         $(GNULIB_BUILDDIR).  Don't pass argument to config.status.
9844         * acinclude.m4: Include acx_configure_dir.m4.
9845         * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9846         calls.  Call AC_PROG_RANLIB.  Configure gnulib using
9847         ACX_CONFIGURE_DIR.
9848         (GNULIB): New.
9849         (GNULIB_STDINT_H): Adjust.
9850         (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9851         * gdbreplay.c: Include build-gnulib/config.h.
9852         * server.h: Likewise.
9853         * aclocal.m4: Regenerate.
9854         * config.in: Regenerate.
9855         * configure: Regenerate.
9856
9857 2012-04-19  Pedro Alves  <palves@redhat.com>
9858
9859         * Makefile.in (LIBGNU, INCGNU): Adjust.
9860         (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9861         (all, install-only, uninstall, clean-info, all-lib, clean)
9862         (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9863         * configure.ac: Adjust AC_OUTPUT output.
9864         * aclocal.m4: Regenerate.
9865         * configure: Regenerate.
9866
9867 2012-04-19  Pedro Alves  <palves@redhat.com>
9868
9869         * Makefile.in (generated_files): New.
9870         (server_h): Remove the explicit dependency on config.h, and depend
9871         on $generated_files.
9872
9873 2012-04-19  Pedro Alves  <palves@redhat.com>
9874
9875         * Makefile.in (INCGNU): Add -Ignulib.
9876
9877 2012-04-19  Pedro Alves  <palves@redhat.com>
9878
9879         * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9880         (INCGNU): ... this, and spell out -I here.
9881         (GNULIB_LIB): Rename to ...
9882         (LIBGNU): ... this.
9883         (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9884
9885 2012-04-19  Pedro Alves  <palves@redhat.com>
9886
9887         * config.in: Regenerate.
9888
9889 2012-04-19  Pedro Alves  <palves@redhat.com>
9890
9891         * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9892         * server.h (memmem): Remove declaration.
9893         * config.in: Regenerate.
9894         * configure: Regenerate.
9895
9896 2012-04-19  Yao Qi  <yao@codesourcery.com>
9897
9898         * Makefile.in (SFILES): Add common/vec.c.
9899         (OBS): Add vec.o.
9900         (vec.o): New rule.
9901
9902 2012-04-19  Yao Qi  <yao@codesourcery.com>
9903
9904         * remote-utils.c (prepare_resume_reply): Replace with macro
9905         target_core_of_thread.
9906         * server.c (handle_qxfer_threads_proper): Likewise.
9907         * target.h (traget_core_of_thread): New macro.
9908
9909 2012-04-18  Pedro Alves  <palves@redhat.com>
9910
9911         * aclocal.m4: Regenerate.
9912         * configure: Regenerate.
9913
9914 2012-04-16  Yao Qi  <yao@codesourcery.com>
9915
9916         * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9917         duplicated on address.
9918
9919 2012-04-16  Yao Qi  <yao@codesourcery.com>
9920
9921         * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9922         (struct tracepoint_action_ops) <send>: New field.
9923         (m_tracepoint_action_send, r_tracepoint_action_send): New.
9924         (agent_expr_send, x_tracepoint_action_send): New.
9925         (l_tracepoint_action_send): New.
9926         (cmd_qtdp): Download and install tracepoint
9927         according to `use_agent'.
9928         (run_inferior_command): Add one more parameter `len'.
9929         Update callers.
9930         (tracepoint_send_agent): New.
9931         (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9932
9933 2012-04-16  Yao Qi  <yao@codesourcery.com>
9934
9935         * tracepoint.c (download_tracepoints): Moved to ...
9936         (cmd_qtstart): ... here.
9937
9938 2012-04-14  Yao Qi  <yao@codesourcery.com>
9939
9940         * tracepoint.c: Include inttypes.h.
9941         (struct collect_memory_action): Use sized types.
9942         (struct tracepoint): Likewise.
9943         (cmd_qtdp, stop_tracing): Update print specifiers.
9944         (cmd_qtp, response_tracepoint): Likewise.
9945         (collect_data_at_tracepoint): Likewise.
9946         (collect_data_at_step): Likewise.
9947
9948 2012-04-14  Yao Qi  <yao@codesourcery.com>
9949
9950         Import gnulib module inttypes.
9951         * aclocal.m4, config.in, configure: Regenerated.
9952
9953 2012-04-14  Yao Qi  <yao@codesourcery.com>
9954
9955         * Makefile.in (maintainer-clean, realclean, distclean): Remove
9956         Makefile and config.status at last.
9957
9958 2012-04-13  Yao Qi  <yao@codesourcery.com>
9959
9960         * tracepoint.c: Include stdint.h unconditionally.
9961
9962 2012-04-13  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
9963
9964         * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9965         on BFD_HAVE_SYS_PROCFS_TYPE.
9966         * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9967         * configure: Regenerate.
9968         * config.in: Likewise.
9969
9970 2012-04-13  H.J. Lu  <hongjiu.lu@intel.com>
9971
9972         * Makefile.in (clean): Also remove x32.c x32-linux.c
9973         x32-avx.c x32-avx-linux.c.
9974         (x32.o): New target.
9975         (x32.c): Likewise.
9976         (x32-linux.o): Likewise.
9977         (x32-linux.c): Likewise.
9978         (x32-avx.o): Likewise.
9979         (x32-avx.c): Likewise.
9980         (x32-avx-linux.o): Likewise.
9981         (x32-avx-linux.c): Likewise.
9982
9983         * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9984         (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9985         (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9986         (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9987         (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9988         i386/x32-avx-linux.xml.
9989
9990         * linux-x86-low.c (init_registers_x32_linux): New prototype.
9991         (init_registers_x32_avx_linux): Likwise.
9992         (x86_linux_update_xmltarget): Call init_registers_x32_linux
9993         or init_registers_x32_avx_linux if linux_is_elf64 is false.
9994
9995 2012-04-13  Pedro Alves  <palves@redhat.com>
9996
9997         * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9998         (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9999         (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10000         (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10001         the sub-make.
10002
10003 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
10004
10005         * linux-x86-low.c (compat_x32_clock_t): New.
10006         (compat_x32_siginfo_t): Likewise.
10007         (compat_x32_siginfo_from_siginfo): Likewise.
10008         (siginfo_from_compat_x32_siginfo): Likewise.
10009         (linux_is_elf64): Likewise.
10010         (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10011         and siginfo_from_compat_x32_siginfo for x32.
10012         (x86_arch_setup): Set linux_is_elf64.
10013
10014 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
10015
10016         PR gdb/13969
10017         * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10018         e_machine field.
10019         (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10020         * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10021         * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10022         compatible with process.
10023
10024 2012-04-12  Yao Qi  <yao@codesourcery.com>
10025
10026         * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10027         (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10028         (install-only, install-info, clean): Handle sub dir gnulib.
10029         (all-lib, am--refresh): New targets.
10030         (memmem.o): Remove target.
10031         * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10032         Invoke gl_EARLY.  Invoke AC_CHECK_PROGS for make.
10033         (AC_REPLACE_FUNCS): Remove memmem.
10034         Invoke gl_INIT and AM_INIT_AUTOMAKE.
10035         (AC_OUTPUT): Generate Makefile in gnulib/.
10036         * aclocal.m4, config.in, configure: Regenerated.
10037
10038 2012-04-10  Maciej W. Rozycki  <macro@codesourcery.com>
10039
10040         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10041
10042 2012-04-05  Pedro Alves  <palves@redhat.com>
10043
10044         -Werror=strict-aliasing
10045
10046         * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10047         pointer.
10048
10049 2012-04-04  Pedro Alves  <palves@redhat.com>
10050
10051         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10052         (sparc_store_gregset_from_stack, sparc_store_gregset)
10053         (sparc_breakpoint_at): Fix formatting.
10054
10055 2012-03-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
10056
10057         * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10058         are available.
10059         * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10060         [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10061         * config.in: Regenerate.
10062         * configure: Likewise.
10063
10064 2012-03-29  Pedro Alves  <palves@redhat.com>
10065
10066         * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10067         Correct ptrace arguments.
10068
10069 2012-03-28  Pedro Alves  <palves@redhat.com>
10070
10071         * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10072         (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10073         (IA64_FR1_REGNUM): New defines.
10074         (ia64_fetch_register): New.
10075         (the_low_target): Install it.
10076         * linux-low.h (struct linux_target_ops) <fetch_register>: New
10077         field.
10078         * linux-low.c (linux_fetch_registers): Try the
10079         the_low_target.fetch_register hook first.
10080
10081         * linux-arm-low.c (the_low_target): Adjust.
10082         * linux-bfin-low.c (the_low_target): Adjust.
10083         * linux-cris-low.c (the_low_target): Adjust.
10084         * linux-crisv32-low.c (the_low_target): Adjust.
10085         * linux-m32r-low.c (the_low_target): Adjust.
10086         * linux-m68k-low.c (the_low_target): Adjust.
10087         * linux-mips-low.c (the_low_target): Adjust.
10088         * linux-ppc-low.c (the_low_target): Adjust.
10089         * linux-s390-low.c (the_low_target): Adjust.
10090         * linux-sh-low.c (the_low_target): Adjust.
10091         * linux-sparc-low.c (the_low_target): Adjust.
10092         * linux-tic6x-low.c (the_low_target): Adjust.
10093         * linux-x86-low.c (the_low_target): Adjust.
10094         * linux-xtensa-low.c (the_low_target): Adjust.
10095
10096 2012-03-26  Pedro Alves  <palves@redhat.com>
10097
10098         * server.c (handle_qxfer_libraries): Don't bail early if
10099         the_target->qxfer_libraries_svr4 is not NULL.
10100
10101 2012-03-26  Pedro Alves  <palves@redhat.com>
10102
10103         * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10104
10105 2012-03-23  Pedro Alves  <palves@redhat.com>
10106
10107         * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10108         "library-list-svr4" element's start tag when the the DSO list is
10109         empty.
10110
10111 2012-03-23  Pedro Alves  <palves@redhat.com>
10112
10113         * linux-low.c (read_one_ptr): Read the inferior's pointer through
10114         a variable whose type size is the same as the inferior's pointer
10115         size.
10116
10117 2012-03-21  Thomas Schwinge  <thomas@codesourcery.com>
10118
10119         * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10120         struct siginfo.
10121         * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10122         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10123         * linux-low.h: Include <signal.h>.
10124         (struct siginfo): Remove forward declaration.
10125         (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10126         struct siginfo.
10127
10128 2012-03-21  Mike Frysinger  <vapier@gentoo.org>
10129
10130         * .gitignore: Ignore more files.
10131
10132 2012-03-19  Pedro Alves  <palves@redhat.com>
10133             Jan Kratochvil  <jan.kratochvil@redhat.com>
10134
10135         * server.c (cont_thread, general_thread): Add describing comments.
10136         (start_inferior): Clear `cont_thread'.
10137         (handle_v_cont): Don't set `cont_thread' if resuming all threads
10138         of a process.
10139
10140 2012-03-15  Yao Qi  <yao@codesourcery.com>
10141
10142         * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10143         handling to ...
10144         (cmd_qtdp): ... here.
10145
10146 2012-03-15  Yao Qi  <yao@codesourcery.com>
10147
10148         * tracepoint.c (struct tracepoint_action_ops): New.
10149         (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10150         (m_tracepoint_action_download): New.
10151         (r_tracepoint_action_download): New.
10152         (x_tracepoint_action_download): New.
10153         (l_tracepoint_action_download): New.
10154         (add_tracepoint_action): Install `action->ops' according type.
10155         (download_tracepoint_1): Move code `download' function pointer
10156         of various tracepoint_action_ops.
10157
10158 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
10159
10160         * linux-low.c (linux_attach_lwp_1): New variable buffer.  Call
10161         linux_ptrace_attach_warnings.
10162
10163 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
10164
10165         * Makefile.in (linux-ptrace.o): New.
10166         * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10167         (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10168         (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10169         (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10170         (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10171         of these targets.
10172         * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10173
10174 2012-03-08  Yao Qi  <yao@codesourcery.com>
10175             Pedro Alves  <palves@redhat.com>
10176
10177         Fix PR server/13392.
10178         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10179         offset of JMP insn.
10180         * tracepoint.c (remove_tracepoint): New.
10181         (cmd_qtdp): Call remove_tracepoint when failed to install.
10182
10183 2012-03-07  Pedro Alves  <palves@redhat.com>
10184
10185         * linux-low.c (get_detach_signal): New.
10186         (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10187         Pass on pending signals to PTRACE_DETACH.  Check the result of the
10188         ptrace call.
10189         * server.c (program_signals, program_signals_p): New.
10190         (handle_general_set): Handle QProgramSignals.
10191         * server.h (program_signals, program_signals_p): Declare.
10192
10193 2012-03-05  Pedro Alves  <palves@redhat.com>
10194             Jan Kratochvil  <jan.kratochvil@redhat.com>
10195
10196         * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10197         New comment why.
10198
10199 2012-03-03  Yao Qi  <yao@codesourcery.com>
10200
10201         * tracepoint.c (tracepoint_look_up_symbols): Update call to
10202         agent_look_up_symbols.
10203
10204 2012-03-03  Yao Qi  <yao@codesourcery.com>
10205
10206         * Makefile.in (linux-low.o): Keep dependence on agent.h.
10207         (linux-x86-low.o): Likewise.
10208         * server.h: Remove in_process_agent_loaded.
10209         * tracepoint.c (in_process_agent_loaded): Removed.  Moved it
10210         common/agent.c.
10211         Update callers.
10212
10213 2012-03-03  Yao Qi  <yao@codesourcery.com>
10214
10215         * tracepoint.c (gdb_agent_capability): New global.
10216         (in_process_agent_loaded_ust): Renamed to
10217         `in_process_agent_supports_ust'.
10218         Update callers.
10219         (in_process_agent_supports_ust): Call agent_capability_check.
10220         (clear_installed_tracepoints): Assert that agent supports
10221         agent.
10222
10223 2012-03-03  Yao Qi  <yao@codesourcery.com>
10224
10225         * linux-low.c (linux_supports_agent): New.
10226         (linux_target_ops): Initialize field `supports_agent' with
10227         linux_supports_agent.
10228         * target.h (struct target_ops) <supports_agent>: New.
10229         (target_supports_agent): New macro.
10230         * server.c (handle_general_set): Handle packet 'QAgent'.
10231         (handle_query): Send `QAgent+'.
10232         * Makefile.in (server.o): Depends on agent.h.
10233
10234 2012-03-03  Yao Qi  <yao@codesourcery.com>
10235
10236         * Makefile.in (OBS): Add agent.o.
10237         Add new rule for agent.o.
10238         Track dependence of tracepoint.c on agent.h.
10239         * tracepoint.c (run_inferior_command_1):
10240         (run_inferior_command): Call agent_run_command.
10241         (gdb_ust_connect_sync_socket): Deleted.  Move it to
10242         common/agent.c.
10243         (resume_thread, stop_thread): Likewise.
10244         (gdb_ust_socket_init): Renamed to ...
10245         (gdb_agent_socket_init): ... New.
10246         (gdb_ust_thread): Renamed to ...
10247         (gdb_agent_helper_thread): ... New.
10248         (gdb_ust_init): Move some code to ...
10249         (gdb_agent_init): ... here.  New.
10250         [HAVE_UST]: Call gdb_ust_init.
10251         (initialize_tracepoint_ftlib):  Call gdb_agent_init.
10252         * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10253         * config.in, configure: Regenerated.
10254
10255 2012-03-02  Pedro Alves  <palves@redhat.com>
10256
10257         * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10258         * linux-low.c (struct simple_pid_list): New.
10259         (stopped_pids): New a struct simple_pid_list pointer.
10260         (add_to_pid_list, pull_pid_from_list): New.
10261         (handle_extended_wait): Don't assume the first signal new children
10262         report is SIGSTOP.  Adjust call to pull_pid_from_list.
10263         (linux_wait_for_lwp): Adjust.
10264
10265 2012-03-02  Yao Qi  <yao@codesourcery.com>
10266
10267         * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10268         debug log.
10269
10270 2012-03-02  Yao Qi  <yao@codesourcery.com>
10271
10272         * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10273         `stop_pc' and `tpoint'.  Update caller.
10274
10275 2012-03-01  Maciej W. Rozycki  <macro@codesourcery.com>
10276
10277         * linux-low.h (linux_target_ops): Add regset_bitmap member.
10278         * linux-low.c (use_linux_regsets): New macro.
10279         [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10280         [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10281         (linux_register_in_regsets): New function.
10282         (usr_fetch_inferior_registers): Skip registers covered by
10283         regsets.
10284         (usr_store_inferior_registers): Likewise.
10285         (usr_fetch_inferior_registers): New macro.
10286         (usr_store_inferior_registers): Likewise.
10287         (linux_fetch_registers): Handle mixed regset/non-regset targets.
10288         (linux_store_registers): Likewise.
10289         * linux-mips-low.c (init_registers_mips_dsp_linux): New
10290         prototype.
10291         (init_registers_mips64_dsp_linux): Likewise.
10292         (init_registers_mips_linux): New macro.
10293         (init_registers_mips_dsp_linux): Likewise.
10294         (mips_dsp_num_regs): Likewise.
10295         (DSP_BASE, DSP_CONTROL): New fallback macros.
10296         (mips_base_regs): New macro.
10297         (mips_regmap): Use it.  Fix the size.
10298         (mips_dsp_regmap): New variable.
10299         (mips_dsp_regset_bitmap): Likewise.
10300         (mips_arch_setup): New function.
10301         (mips_cannot_fetch_register): Use the_low_target.regmap rather
10302         than mips_regmap.
10303         (mips_cannot_store_register): Likewise.
10304         (the_low_target): Update .arch_setup, .num_regs and .regmap
10305         initializers.  Add .regset_bitmap initializer.
10306         * linux-arm-low.c (the_low_target): Add .regset_bitmap
10307         initializer.
10308         * linux-bfin-low.c (the_low_target): Likewise.
10309         * linux-cris-low.c (the_low_target): Likewise.
10310         * linux-crisv32-low.c (the_low_target): Likewise.
10311         * linux-ia64-low.c (the_low_target): Likewise.
10312         * linux-m32r-low.c (the_low_target): Likewise.
10313         * linux-m68k-low.c (the_low_target): Likewise.
10314         * linux-ppc-low.c (the_low_target): Likewise.
10315         * linux-s390-low.c (the_low_target): Likewise.
10316         * linux-sh-low.c (the_low_target): Likewise.
10317         * linux-sparc-low.c (the_low_target): Likewise.
10318         * linux-tic6x-low.c (the_low_target): Likewise.
10319         * linux-x86-low.c (the_low_target): Likewise.
10320         * linux-xtensa-low.c (the_low_target): Likewise.
10321         * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10322         mips64-dsp-linux.o to srv_regobj.  Add mips-dsp-linux.xml,
10323         mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10324         srv_xmlfiles.
10325         * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10326         (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10327
10328 2012-02-29  Yao Qi  <yao@codesourcery.com>
10329             Pedro Alves  <palves@redhat.com>
10330
10331         * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10332         `step_over_finished' is true.
10333
10334 2012-02-27  Pedro Alves  <palves@redhat.com>
10335
10336         * linux-low.c (pid_is_stopped): Delete, moved to common/.
10337         (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10338
10339 2012-02-27  Pedro Alves  <palves@redhat.com>
10340
10341         PR server/9684
10342         * linux-low.c (pid_is_stopped): New.
10343         (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10344
10345 2012-02-25  Luis Machado  <lgustavo@codesourcery.com>
10346
10347         * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10348         of conditions.
10349
10350 2012-02-24  Maciej W. Rozycki  <macro@codesourcery.com>
10351
10352         * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10353
10354 2012-02-24  Luis Machado  <lgustavo@codesourcery>
10355
10356         * server.c (handle_query): Advertise support for target-side
10357         breakpoint condition evaluation.
10358         (process_point_options): New function.
10359         (process_serial_event): When inserting a breakpoint, check for
10360         a target-side condition that should be evaluated.
10361
10362         * mem-break.c: Include regcache.h and ax.h.
10363         (point_cond_list_t): New data structure.
10364         (breakpoint) <cond_list>: New field.
10365         (find_gdb_breakpoint_at): Make non-static.
10366         (delete_gdb_breakpoint_at): Clear any target-side
10367         conditions.
10368         (clear_gdb_breakpoint_conditions): New function.
10369         (add_condition_to_breakpoint): Likewise.
10370         (add_breakpoint_condition): Likewise.
10371         (gdb_condition_true_at_breakpoint): Likewise.
10372         (gdb_breakpoint_here): Return result directly instead
10373         of going through a local variable.
10374
10375         * mem-break.h (find_gdb_breakpoint_at): New prototype.
10376         (clear_gdb_breakpoint_conditions): Likewise.
10377         (add_breakpoint_condition): Likewise.
10378         (gdb_condition_true_at_breakpoint): Likewise.
10379
10380         * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10381         (need_step_over_p): Take target-side breakpoint condition into
10382         consideration.
10383
10384 2012-02-24  Luis Machado  <lgustavo@codesourcery>
10385
10386         * server.h: Include tracepoint.h.
10387         (agent_mem_read, agent_get_trace_state_variable_value,
10388         agent_set_trace_state_variable_value,
10389         agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10390         get_set_tsv_func_addr): New prototypes.
10391
10392         * ax.h: New include file.
10393         * ax.c: New source file.
10394
10395         * tracepoint.c: Include ax.h.
10396         (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10397         agent_expr, eval_result_type): Move to ax.h.
10398         (parse_agent_expr): Rename to ...
10399         (gdb_parse_agent_expr): ... this, make it non-static and move
10400         to ax.h.
10401         (unparse_agent_expr) Rename to ...
10402         (gdb_unparse_agent_expr): ... this, make it non-static and move
10403         to ax.h.
10404         (eval_agent_expr): Rename to ...
10405         (eval_tracepoint_agent_expr): ... this.
10406         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10407         forward declarations.
10408         (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10409         (agent_get_trace_state_variable_value): New function.
10410         (agent_set_trace_state_variable_value): New function.
10411         (cmd_qtdp): Call gdb_parse_agent_expr (...).
10412         (response_tracepoint): Call gdb_unparse_agent_expr (...).
10413         (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10414         (condition_true_at_tracepoint): Likewise.
10415         (parse_agent_expr): Rename to ...
10416         (gdb_parse_agent_expr): ... this and move to ax.c.
10417         (unparse_agent_expr): Rename to ...
10418         (gdb_unparse_agent_expr): ... this and move to ax.c.
10419         (gdb_agent_op_name): Move to ax.c.
10420         (eval_agent_expr): Rename to ...
10421         (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10422         and move to ax.c.
10423         (eval_tracepoint_agent_expr): New function.
10424         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10425         non-static.
10426         (current_insn_ptr, emit_error, struct bytecode_address): Move to
10427         ax.c.
10428         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10429         emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10430         emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10431         emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10432         emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10433         emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10434         emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10435         emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10436         (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10437         (compile_bytecodes): Remove forward declaration.
10438         (is_goto_target): Move to ax.c.
10439         (compile_bytecodes): Move to ax.c and call
10440         agent_get_trace_state_variable_value (...) and
10441         agent_set_trace_state_variable_value (...).
10442
10443         * Makefile.in: Update ax.c and IPA dependencies.
10444
10445 2012-02-24  Pedro Alves  <palves@redhat.com>
10446
10447         * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10448         (cmd_bigqtbuffer_circular): ... this.  Only handle
10449         'QTBuffer:circular:'.
10450         (handle_tracepoint_general_set): Adjust.
10451
10452 2012-02-16  Yao Qi  <yao@codesourcery.com>
10453
10454         * inferiors.c: Move code to ...
10455         * dll.c: .... here.  New.
10456         * server.h: Declare clear_dlls.
10457         * Makefile.in (SFILES): Add dll.c.
10458         (OBS): Add dll.o
10459         (dll.o): New rule.
10460
10461 2012-02-11  Yao Qi  <yao@codesourcery.com>
10462
10463         * server.c: (handle_monitor_command): Add a new parameter
10464         `own_buf'.
10465         (handle_query): Update caller.
10466
10467 2012-02-09  Joel Brobecker  <brobecker@adacore.com>
10468
10469         * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10470         * configure, config.in: Regenerate.
10471         * hostio.c: Provide an alternate implementation if HAVE_READLINK
10472         is not defined.
10473
10474 2012-02-02  Pedro Alves  <palves@redhat.com>
10475
10476         Try SIGKILL first, then PTRACE_KILL.
10477         * linux-low.c (linux_kill_one_lwp): New.
10478         (linux_kill_one_lwp): Rename to ...
10479         (kill_one_lwp_callback): ... this.  Use the new
10480         linux_kill_one_lwp.
10481
10482 2012-02-02  Pedro Alves  <palves@redhat.com>
10483
10484         * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10485         inferior.
10486
10487 2012-01-27  Pedro Alves  <palves@redhat.com>
10488
10489         * linux-low.c (linux_child_pid_to_exec_file): Delete.
10490         (elf_64_file_p): Make static.
10491         (linux_pid_exe_is_elf_64_file): New.
10492         * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10493         Delete declarations.
10494         (linux_pid_exe_is_elf_64_file): Declare.
10495         * linux-x86-low.c (x86_arch_setup): Use
10496         linux_pid_exe_is_elf_64_file.
10497
10498 2012-01-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
10499
10500         * linux-low.c (linux_wait_for_event_1): Rename to ...
10501         (linux_wait_for_event): ... here and merge it with former
10502         linux_wait_for_event - new variable wait_ptid, use it.
10503         (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10504
10505 2012-01-23  Pedro Alves  <palves@redhat.com>
10506
10507         * server.c (main): Avoid yet another case of infinite loop while
10508         detaching/killing after a longjmp.
10509
10510 2012-01-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10511
10512         Code cleanup.
10513         * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10514
10515 2012-01-20  Ulrich Weigand  <ulrich.weigand@linaro.org>
10516
10517         * hostio.c (handle_readlink): New function.
10518         (handle_vFile): Call it to handle "vFile:readlink" packets.
10519
10520 2012-01-20  Pedro Alves  <palves@redhat.com>
10521             Ulrich Weigand  <ulrich.weigand@linaro.org>
10522
10523         * server.c (handle_v_requests): Only support vAttach and vRun to
10524         start multiple processes when in extended protocol mode.
10525
10526 2012-01-17  Pedro Alves  <palves@redhat.com>
10527
10528         * tracepoint.c (initialize_tracepoint): Use mmap instead of
10529         memalign plus mprotect to allocate the scratch buffer.
10530
10531 2012-01-13  Pedro Alves  <palves@redhat.com>
10532
10533         * server.c (attach_inferior): Clear `cont_thread'.
10534
10535 2012-01-13  Pedro Alves  <palves@redhat.com>
10536
10537         * server.c (main): Avoid infinite loop while detaching/killing
10538         after a longjmp.
10539
10540 2012-01-09  Doug Evans  <dje@google.com>
10541
10542         * server.c (start_inferior): Set last_ptid in --wrapper case.
10543
10544 2012-01-06  Yao Qi  <yao@codesourcery.com>
10545
10546         * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10547         defined.
10548         [IN_PROCESS_AGENT] (debug_agent): New global variable.
10549
10550 2012-01-04  Yao Qi  <yao@codesourcery.com>
10551
10552         * tracepoint.c (cmd_qtdp): Print debug message
10553         for static tracepoint.
10554
10555 2012-01-04  Yao Qi  <yao@codesourcery.com>
10556
10557         * tracepoint.c (trace_vdebug): Differentiate debug message
10558         between gdbserver and IPA.
10559
10560 2012-01-03  Yao Qi  <yao@codesourcery.com>
10561
10562         * tracepoint.c (tracepoint_was_hit): Don't collect for
10563         static tracepoint.
10564
10565 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
10566
10567         * terminal.h: Reformat copyright header.
10568
10569 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
10570
10571         * server.c (gdbserver_version): Update copyright year.
10572         * gdbreplay.c (gdbreplay_version): Likewise.
10573
10574 2011-12-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
10575
10576         * linux-low.c (linux_create_inferior): Put empty if clause for write.
10577
10578         Revert:
10579         2011-12-18  Hui Zhu  <teawater@gmail.com>
10580         * linux-low.c (linux_create_inferior): Save return value to ret.
10581
10582 2011-12-18  Hui Zhu  <teawater@gmail.com>
10583
10584         * linux-low.c (linux_create_inferior): Save return value to ret.
10585
10586 2011-12-16  Doug Evans  <dje@google.com>
10587
10588         * linux-low.c (linux_create_inferior): If stdio connection,
10589         redirect stdin from /dev/null, stdout to stderr.
10590         * remote-utils.c (remote_is_stdio): New static global.
10591         (remote_connection_is_stdio): New function.
10592         (remote_prepare): Handle stdio connection.
10593         (remote_open): Ditto.
10594         (remote_close): Don't close stdin for stdio connections.
10595         (read_prim,write_prim): New functions.  Replace all calls to
10596         read/write to these.
10597         * server.c (main): Watch for "-" argument.  Move call to
10598         remote_prepare before start_inferior.
10599         * server.h (STDIO_CONNECTION_NAME): New macro.
10600         (remote_connection_is_stdio): Declare.
10601
10602         * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10603         in debugging output.
10604
10605 2011-12-15  Yao Qi  <yao@codesourcery.com>
10606
10607         * tracepoint.c: Include sys/syscall.h.
10608         (gdb_ust_thread): Remove preprocessor conditional.
10609
10610 2011-12-14  Pedro Alves  <pedro@codesourcery.com>
10611
10612         * linux-low.c (linux_detach_one_lwp): Call
10613         the_low_target.prepare_to_resume before detaching.
10614
10615 2011-12-14  Yao Qi  <yao@codesourcery.com>
10616
10617         * tracepoint.c (gdb_ust_thread): Don't ignore return value
10618         of write.
10619
10620 2011-12-14  Yao Qi  <yao@codesourcery.com>
10621
10622         * i386-low.c (i386_low_stopped_data_address): Initialize local
10623         variable `control'.
10624
10625 2011-12-13  Pedro Alves  <pedro@codesourcery.com>
10626
10627         PR remote/13492
10628
10629         * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10630         DR_CONTROL unless necessary.  Extend comments.
10631         * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10632         DR0-3 if not used.  If any watchpoint was set, clear DR_STATUS.
10633
10634 2011-12-13  Yao Qi  <yao@codesourcery.com>
10635
10636         * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10637         macros.
10638         (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10639
10640 2011-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
10641
10642         * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10643         Print new debug message for such case.
10644
10645 2011-12-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
10646
10647         Fix overlapping memcpy.
10648         * mem-break.c (set_raw_breakpoint_at): New variable buf.  Use it for
10649         the read_inferior_memory transfer.
10650         (delete_fast_tracepoint_jump): New variable buf.  Use it for the
10651         write_inferior_memory transfer.
10652         (set_fast_tracepoint_jump): New variable buf.  Use it for the
10653         read_inferior_memory and write_inferior_memory transfers.
10654         (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10655         (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10656         Use it for the write_inferior_memory transfer.
10657         (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10658         buffers.
10659
10660 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
10661
10662         * linux-low.c (fetch_register, store_register): Make code
10663         consistent, fix formatting.
10664
10665 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
10666
10667         * linux-low.c (usr_store_inferior_registers): Factor out code
10668         to handle individual registers into...
10669         (store_register): ... this new function.
10670
10671 2011-12-06  Ulrich Weigand  <uweigand@de.ibm.com>
10672
10673         * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10674         (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10675         (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10676         (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10677         (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10678         (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10679         * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10680         (srv_xmlfiles): Add new XML files.
10681
10682         * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10683         and <sys/uio.h>.
10684         (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10685         (init_registers_s390_linux32v1): Add prototype.
10686         (init_registers_s390_linux32v2): Likewise.
10687         (init_registers_s390_linux64v1): Likewise.
10688         (init_registers_s390_linux64v2): Likewise.
10689         (init_registers_s390x_linux64v1): Likewise.
10690         (init_registers_s390x_linux64v2): Likewise.
10691         (s390_num_regs): Increment to 52.
10692         (s390_regmap): Add orig_r2 register.
10693         (s390_num_regs_3264): Increment to 68.
10694         (s390_regmap_3264): Add orig_r2 register.
10695         (s390_collect_ptrace_register): Handle orig_r2 register.
10696         (s390_supply_ptrace_register): Likewise.
10697         (s390_fill_last_break): New function.
10698         (s390_store_last_break): Likewise.
10699         (s390_fill_system_call): New function.
10700         (s390_store_system_call): Likewise.
10701         (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10702         register sets.
10703         (s390_check_regset): New function.
10704         (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10705         NT_S390_SYSTEM_CALL regsets and use appropriate description.
10706         Update target_regsets for available register sets.
10707
10708 2011-12-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
10709             Jan Kratochvil  <jan.kratochvil@redhat.com>
10710
10711         * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10712         (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10713         New.
10714         (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10715         * linux-low.h (struct process_info_private): New member r_debug.
10716         * server.c (handle_qxfer_libraries): Call
10717         the_target->qxfer_libraries_svr4.
10718         (handle_qxfer_libraries_svr4): New function.
10719         (qxfer_packets): New entry "libraries-svr4".
10720         (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10721         * target.h (struct target_ops): New member qxfer_libraries_svr4.
10722         * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10723         PACKET_qXfer_libraries_svr4.
10724
10725 2011-11-30  Ulrich Weigand  <uweigand@de.ibm.com>
10726
10727         * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10728         PSW address/mask between 8-byte and 16-byte formats.
10729         (s390_supply_ptrace_register): Likewise.
10730         (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10731         basic addressing mode bit.
10732
10733 2011-11-24  Stan Shebs  <stan@codesourcery.com>
10734
10735         * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10736
10737 2011-11-17  Stan Shebs  <stan@codesourcery.com>
10738
10739         * tracepoint.c (struct tracepoint): New field traceframe_usage.
10740         (tracing_start_time): New global.
10741         (tracing_stop_time): New global.
10742         (tracing_user_name): New global.
10743         (tracing_notes): New global.
10744         (tracing_stop_note): New global.
10745         (cmd_qtstart): Set traceframe_usage, start_time.
10746         (stop_tracing): Set stop_time.
10747         (cmd_qtstatus): Report additional status.
10748         (cmd_qtp): New function.
10749         (handle_tracepoint_query): Call it.
10750         (cmd_qtnotes): New function.
10751         (handle_tracepoint_general_set): Call it.
10752         (get_timestamp): Rename from tsv_get_timestamp.
10753
10754 2011-11-14  Stan Shebs  <stan@codesourcery.com>
10755             Kwok Cheung Yeung  <kcy@codesourcery.com>
10756
10757         * linux-x86-low.c (small_jump_insn): New.
10758         (i386_install_fast_tracepoint_jump_pad): Add arguments for
10759         trampoline and error message, build a trampoline and issue a small
10760         jump instruction to it.
10761         (x86_install_fast_tracepoint_jump_pad): Add arguments for
10762         trampoline and error message.
10763         (x86_get_min_fast_tracepoint_insn_len): New.
10764         (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10765         * linux-low.h (struct linux_target_ops): Add arguments to
10766         install_fast_tracepoint_jump_pad operation, add new operation.
10767         * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10768         arguments.
10769         (linux_get_min_fast_tracepoint_insn_len): New function.
10770         (linux_target_op): Add new operation.
10771         * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10772         (gdb_trampoline_buffer_end): Ditto.
10773         (gdb_trampoline_buffer_error): Ditto.
10774         (struct ipa_sym_addresses): Add fields for new IPA variables.
10775         (symbol_list): Add entries for new IPA variables.
10776         (struct tracepoint): Add fields to hold the address range of the
10777         trampoline used by the tracepoint.
10778         (trampoline_buffer_head): New static variable.
10779         (trampoline_buffer_tail): Ditto.
10780         (claim_trampoline_space): New function.
10781         (have_fast_tracepoint_trampoline_buffer): New function.
10782         (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10783         structure.
10784         (install_fast_tracepoint): Ditto, also add error buffer argument.
10785         (cmd_qtminftpilen): New function.
10786         (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10787         (fast_tracepoint_from_trampoline_address): New function.
10788         (fast_tracepoint_collecting): Handle trampoline as part of jump
10789         pad space.
10790         (set_trampoline_buffer_space): New function.
10791         (initialize_tracepoint): Initialize new IPA variables.
10792         * target.h (struct target_ops): Add arguments to
10793         install_fast_tracepoint_jump_pad operation, add new
10794         get_min_fast_tracepoint_insn_len operation.
10795         (target_get_min_fast_tracepoint_insn_len): New.
10796         (install_fast_tracepoint_jump_pad): Add arguments.
10797         * server.h (IPA_BUFSIZ): Define.
10798         * linux-i386-ipa.c: Include extra header files.
10799         (initialize_fast_tracepoint_trampoline_buffer): New function.
10800         (initialize_low_tracepoint): Call it.
10801         * server.h (set_trampoline_buffer_space): Declare.
10802         (claim_trampoline_space): Ditto.
10803         (have_fast_tracepoint_trampoline_buffer): Ditto.
10804
10805 2011-11-14  Yao Qi  <yao@codesourcery.com>
10806
10807         * server.c (handle_query): Handle InstallInTrace for qSupported.
10808         * tracepoint.c (add_tracepoint): Sort list.
10809         (install_tracepoint, download_tracepoint): New.
10810         (cmd_qtdp): Call them to install and download tracepoints.
10811         (sort_tracepoints): Removed.
10812         (cmd_qtstart): Update.
10813
10814 2011-11-14  Yao Qi  <yao@codesourcery.com>
10815
10816         * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10817         * mem-break.h: Declare.
10818         * tracepoint.c (cmd_qtstart): Move some code to ...
10819         (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10820         New.
10821         (download_tracepoints): Move some code to ...
10822         (download_tracepoint_1): ... here.  New.
10823
10824 2011-11-08  Yao Qi  <yao@codesourcery.com>
10825
10826         * remote-utils.c (relocate_instruction): A comment fix.
10827
10828 2011-11-07  Joel Brobecker  <brobecker@adacore.com>
10829
10830         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10831         (i386_dr_low_get_control, i386_dr_low_get_status): Use
10832         dr_status_mirror and dr_control_mirror from debug_reg_state.
10833         (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10834         (i386_initial_stuff): Remove use of deleted globals.
10835         (i386_get_thread_context, i386_set_thread_context,
10836         i386_thread_added): Use dr_status_mirror and dr_control_mirror
10837         from debug_reg_state.
10838
10839 2011-11-05  Yao Qi  <yao@codesourcery.com>
10840
10841         * tracepoint.c (gdb_collect): Loop over tracepoints of same
10842         address as TPOINT's.
10843
10844 2011-11-02  Stan Shebs  <stan@codesourcery.com>
10845
10846         * tracepoint.c (agent_mem_read_string): New function.
10847         (eval_agent_expr): Call it for tracenz.
10848         * server.c (handle_query): Report support for tracenz.
10849
10850 2011-11-02  Yao Qi  <yao@codesourcery.com>
10851
10852         * tracepoint.c (cmd_qtstart): Remove unused local variables.
10853
10854 2011-11-02  Yao Qi  <yao@codesourcery.com>
10855
10856         * target.h: Fix a typo in comment.
10857
10858 2011-10-31  Pedro Alves  <pedro@codesourcery.com>
10859
10860         * mem-break.c (check_mem_write): Add `myaddr' parameter.  Don't
10861         clobber the breakpoints' shadows with fast tracepoint jumps.
10862         * mem-break.h (check_mem_write): Add `myaddr' parameter.
10863         * target.c (write_inferior_memory): Also pass MYADDR down to
10864         check_mem_write.
10865
10866 2011-10-07  Ulrich Weigand  <ulrich.weigand@linaro.org>
10867
10868         * configure.ac: Check support for personality routine.
10869         * configure: Regenerate.
10870         * config.in: Likewise.
10871         * linux-low.c: Include <sys/personality.h>.
10872         Define ADDR_NO_RANDOMIZE if necessary.
10873         (linux_create_inferior): Disable address space randomization when
10874         forking inferior, if requested.
10875         (linux_supports_disable_randomization): New function.
10876         (linux_target_ops): Install it.
10877         * server.h (disable_randomization): Declare.
10878         * server.c (disable_randomization): New global variable.
10879         (handle_general_set): Handle QDisableRandomization.
10880         (handle_query): Likewise for qSupported.
10881         (main): Support --disable-randomization and --no-disable-randomization
10882         command line arguments.
10883         * target.h (struct target_ops): Add supports_disable_randomization.
10884         (target_supports_disable_randomization): New macro.
10885
10886 2011-09-29  Mike Frysinger  <vapier@gentoo.org>
10887
10888         * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10889         ifdef check.
10890         [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10891         [!PT_GETDSBT] (target_loadmap): New definition.
10892         (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10893         (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10894         LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10895         and PT_GETDSBT to LINUX_LOADMAP.
10896         [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10897         (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10898
10899 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
10900
10901         * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10902         (arm_linux_hwbp_cap): New static variable.
10903         (arm_linux_get_hwbp_cap): Replace by ...
10904         (arm_linux_init_hwbp_cap): ... this new function.
10905         (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10906         (arm_linux_get_hw_watchpoint_count): Likewise.
10907         (arm_linux_get_hw_watchpoint_max_length): Likewise.
10908         (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10909         (arm_prepare_to_resume): Use perror_with_name instead of error.
10910
10911 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
10912
10913         * linux-arm-low.c: Include <signal.h>.
10914         (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10915         (struct arm_linux_hwbp_cap): New data type.
10916         (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10917         (struct arm_linux_hw_breakpoint): New data type.
10918         (MAX_BPTS, MAX_WPTS): Define.
10919         (struct arch_process_info, struct arch_lwp_info): New data types.
10920         (arm_linux_get_hwbp_cap): New function.
10921         (arm_linux_get_hw_breakpoint_count): Likewise.
10922         (arm_linux_get_hw_watchpoint_count): Likewise.
10923         (arm_linux_get_hw_watchpoint_max_length): Likewise.
10924         (arm_hwbp_control_initialize): Likewise.
10925         (arm_hwbp_control_is_enabled): Likewise.
10926         (arm_hwbp_control_is_initialized): Likewise.
10927         (arm_hwbp_control_disable): Likewise.
10928         (arm_linux_hw_breakpoint_equal): Likewise.
10929         (arm_linux_hw_point_initialize): Likewise.
10930         (struct update_registers_data): New data structure.
10931         (update_registers_callback: New function.
10932         (arm_insert_point): Likewise.
10933         (arm_remove_point): Likewise.
10934         (arm_stopped_by_watchpoint): Likewise.
10935         (arm_stopped_data_address): Likewise.
10936         (arm_new_process): Likewise.
10937         (arm_new_thread): Likewise.
10938         (arm_prepare_to_resume): Likewise.
10939         (the_low_target): Register arm_insert_point, arm_remove_point,
10940         arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10941         arm_new_thread, and arm_prepare_to_resume.
10942
10943 2011-09-15  Stan Shebs  <stan@codesourcery.com>
10944
10945         * server.h (struct emit_ops): Add compare-goto fields.
10946         * tracepoint.c (gdb_agent_op_sizes): New table.
10947         (emit_eq_goto): New function.
10948         (emit_ne_goto): New function.
10949         (emit_lt_goto): New function.
10950         (emit_le_goto): New function.
10951         (emit_gt_goto): New function.
10952         (emit_ge_goto): New function.
10953         (is_goto_target): New function.
10954         (compile_bytecodes): Recognize special cases of compare-goto
10955         combinations and call specialized emitters for them.
10956         * linux-x86-low.c (amd64_emit_eq_goto): New function.
10957         (amd64_emit_ne_goto): New function.
10958         (amd64_emit_lt_goto): New function.
10959         (amd64_emit_le_goto): New function.
10960         (amd64_emit_gt_goto): New function.
10961         (amd64_emit_ge_goto): New function.
10962         (amd64_emit_ops): Add the new functions.
10963         (i386_emit_eq_goto): New function.
10964         (i386_emit_ne_goto): New function.
10965         (i386_emit_lt_goto): New function.
10966         (i386_emit_le_goto): New function.
10967         (i386_emit_gt_goto): New function.
10968         (i386_emit_ge_goto): New function.
10969         (i386_emit_ops): Add the new functions.
10970
10971 2011-09-08  Stan Shebs  <stan@codesourcery.com>
10972
10973         * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10974         (i386_emit_epilogue): Restore %ebx.
10975
10976 2011-08-31  Jie Zhang  <jzhang918@gmail.com>
10977
10978         * server.c (step_thread): Remove definition.
10979         (process_serial_event): Don't handle Hs.
10980         * server.h (step_thread): Remove declaration.
10981         * target.c (set_desired_inferior): Remove use of step_thread.
10982
10983 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
10984
10985         * linux-low.c: Include linux-procfs.h.
10986         (linux_attach_lwp_1): Update comments.
10987         (linux_attach): Scan for existing threads when attaching to a
10988         process that is the tgid.
10989         * Makefile.in: Update dependencies.
10990
10991 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
10992
10993         * configure.srv: Add linux-procfs.o dependencies.
10994
10995 2011-08-14  Yao Qi  <yao@codesourcery.com>
10996
10997         * target.h (struct target_ops): Fix indent.
10998         * win32-low.c (win32_target_ops): Fix comment.
10999
11000 2011-08-14  Andrew Jenner  <andrew@codesourcery.com>
11001             Yao Qi  <yao@codesourcery.com>
11002
11003         * Makefile.in (clean): Remove tic6x-*.c files.
11004         (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11005         (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11006         (tic6x-c64xp-linux.c): Likewise.
11007         * configure.srv: Add support for tic6x-*-uclinux.
11008         * linux-tic6x-low.c: New.
11009         * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11010
11011 2011-08-14  Andrew Stubbs <ams@codesourcery.com>
11012             Yao Qi  <yao@codesourcery.com>
11013
11014         * target.h (struct target_ops): Add read_loadmap.
11015         * linux-low.c (struct target_loadseg): New type.
11016         (struct target_loadmap): New type.
11017         (linux_read_loadmap): New function.
11018         (linux_target_ops): Add linux_read_loadmap.
11019         * server.c (handle_query): Support qXfer:fdpic:read packet.
11020         * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11021         to NULL.
11022
11023 2011-08-05  Eli Zaretskii  <eliz@gnu.org>
11024
11025         * win32-low.c: Include <stdint.h>.
11026
11027 2011-07-22  Pedro Alves  <pedro@codesourcery.com>
11028
11029         * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11030         to the inferior here.
11031         (i386_remove_aligned_watchpoint): Ditto.
11032         (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11033         fit part of the watchpoint in the debug registers.
11034         (i386_update_inferior_debug_regs): New.
11035         (i386_low_insert_watchpoint): Work on a local mirror of the debug
11036         registers, and only update the inferior on success.
11037         (i386_low_remove_watchpoint): Ditto.
11038
11039 2011-07-22  Kwok Cheung Yeung  <kcy@codesourcery.com>
11040
11041         * linux-low.c (compare_ints, unique, list_threads, show_process,
11042         linux_core_of_thread): Delete.
11043         (linux_target_ops): Change linux_core_of_thread to
11044         linux_common_core_of_thread.
11045         (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11046         * utils.c (malloc_failure): Change type of argument.
11047         (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11048         * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11049         common/linux-osdata.c, common/ptid.c and common/buffer.c.
11050         (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11051         (IPA_OBJS): Add common-utils-ipa.o.
11052         (ptid_h, linux_osdata_h): New macros.
11053         (server_h): Add common/common-utils.h, common/xml-utils.h,
11054         common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11055         common/ptid.h.
11056         (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11057         ptid.o, buffer.o): New rules.
11058         (linux-low.o): Add common/linux-osdata.h as a dependency.
11059         * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11060         * configure.ac: Add AC_HEADER_DIRENT check.
11061         * config.in: Regenerate.
11062         * configure: Regenerate.
11063         * remote-utils.c (xml_escape_text): Delete.
11064         (buffer_grow, buffer_free, buffer_init, buffer_finish,
11065         buffer_xml_printf): Move to common/buffer.c.
11066         * server.c (main): Remove call to initialize_inferiors.
11067         * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11068         ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11069         ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11070         internal_error, gdb_assert, gdb_assert_fail): Delete.
11071         (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11072         buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11073         common/buffer.h.
11074         * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11075         ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11076         initialize_inferiors): Delete.
11077
11078 2011-07-20  Pedro Alves  <pedro@codesourcery.com>
11079
11080         * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11081         symbol error.
11082
11083 2011-05-31  Pedro Alves  <pedro@codesourcery.com>
11084
11085         * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11086         assertion.
11087         * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11088
11089 2011-05-26  Yao Qi  <yao@codesourcery.com>
11090
11091         * Makefile.in (thread-db.o): Track dependence to
11092         common/gdb_thread_db.h.
11093         * thread-db.c: include gdb_thread_db.h from right place.
11094
11095 2011-05-16  Adrian Cornish  <gnu@bluedreamer.com>
11096
11097         * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11098         __FILE__ and __LINE__ to internal_error.
11099
11100 2011-05-13  Doug Evans  <dje@google.com>
11101
11102         * thread-db.c (try_thread_db_load_from_sdir): New function.
11103         (try_thread_db_load_from_dir): New function.
11104         (thread_db_load_search): Handle $sdir, ignore $pdir.
11105         Remove trying of system directories if search of
11106         libthread-db-search-path fails, that is now done via $sdir.
11107
11108 2011-05-12  Kwok Cheung Yeung  <kcy@codesourcery.com>
11109
11110         * server.c (handle_query): Add EnableDisableTracepoints to the list
11111         of supported features.
11112         * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11113         tracepoints.
11114         (cmd_qtenable_disable): New.
11115         (cmd_qtstart): Install tracepoints even if disabled.
11116         (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11117         receiving a QTEnable or QTDisable packet.
11118         (gdb_collect): Skip data collection if fast tracepoint is disabled.
11119         (ust_marker_to_static_tracepoint): Do not ignore disabled static
11120         tracepoints.
11121         (gdb_probe): Skip data collection if static tracepoint is disabled.
11122
11123 2011-05-10  Doug Evans  <dje@google.com>
11124
11125         * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11126
11127 2011-05-04  Doug Evans  <dje@google.com>
11128
11129         * linux-low.c (linux_join): Skip process lookup.
11130         * spu-low.c (spu_join): Ditto.
11131         * server.c (join_inferiors_callback): Delete.
11132         (process_serial_event): For 'D' packet (detach) call join_inferior
11133         directly.
11134
11135 2011-05-04  Joseph Myers  <joseph@codesourcery.com>
11136
11137         * README: Don't mention xscale*-*-linux*.
11138         * configure.srv (xscale*-*-linux*): Don't handle target.
11139
11140 2011-04-27  Nathan Froyd  <froydnj@codesourcery.com>
11141
11142         * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11143         casting pointers.
11144         (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11145         (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11146         (i386_emit_void_call_2): Likewise.
11147
11148 2011-04-26  Yao Qi  <yao@codesourcery.com>
11149
11150         * linux-low.c: Move common macros to linux-ptrace.h.
11151         Include linux-ptrace.h.
11152         * Makefile.in (linux_ptrace_h): New.
11153         (linux-low.o): Depends on linux-ptrace.h.
11154
11155 2011-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
11156
11157         * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11158         RUN_ONCE.  Comment for the LISTEN_DESC delete_file_handler call.
11159         (remote_prepare): New function with most of the TCP code from ...
11160         (remote_open): ... here.  Detect PORT here unconditionally.  Move also
11161         setting transport_is_reliable.
11162         * server.c (run_once): New variable.
11163         (gdbserver_usage): Document it.
11164         (main): Set run_once for `--once'.  Call remote_prepare.  Exit after
11165         the first run if RUN_ONCE.
11166         * server.h (run_once, remote_prepare): New declarations.
11167
11168 2011-04-19  Tom Tromey  <tromey@redhat.com>
11169
11170         * win32-low.c (handle_load_dll): Remove duplicate "the".
11171
11172 2011-04-07  Pierre Muller  <muller@ics.u-strasbg.fr>
11173
11174         Remove support for old Cygwin 1.5 versions.
11175         * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11176         function to avoid warning.
11177         (win32_add_one_solib): Use cygwin_conv_path function to avoid
11178         warning.
11179
11180 2011-03-18  Pierre Muller  <muller@ics.u-strasbg.fr>
11181
11182         * gdbserver/server.h (Macro _): Define it if not available.
11183
11184 2011-03-14  Michael Snyder  <msnyder@vmware.com>
11185
11186         * hostio.c (handle_close): Remove unnecessary null test.
11187
11188 2011-03-10  Joel Brobecker  <brobecker@adacore.com>
11189
11190         * Makefile.in (maintainer-clean realclean distclean): Remove
11191         "make ...  subdir_do" command.
11192
11193 2011-03-10  Michael Snyder  <msnyder@vmware.com>
11194
11195         * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11196
11197         * server.c (handle_v_run): Free alloced buffer on early return.
11198
11199 2011-03-09  Yao Qi  <yao@codesourcery.com>
11200
11201         Revert:
11202         2011-03-04  Yao Qi  <yao@codesourcery.com>
11203
11204         * Makefile.in: Remove GNU make feature --directory.
11205
11206         2011-03-05  Yao Qi  <yao@codesourcery.com>
11207
11208         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11209         (subdir_do): New make target.  Copied from gdb/Makefile.
11210         (maintainer-clean, realclean, distclean, clean): Call corresponding
11211         make targets in common/Makefile.
11212
11213         2011-02-11  Yao Qi  <yao@codesourcery.com>
11214
11215         * configure.ac: Call AC_PROG_RANLIB.
11216         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
11217         * configure: Regenerate.
11218
11219 2011-03-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
11220
11221         * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11222
11223 2011-03-06  Yao Qi  <yao@codesourcery.com>
11224
11225         * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11226
11227 2011-03-05  Yao Qi  <yao@codesourcery.com>
11228
11229         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11230         (subdir_do): New make target.  Copied from gdb/Makefile.
11231         (maintainer-clean, realclean, distclean, clean): Call corresponding
11232         make targets in common/Makefile.
11233
11234 2011-03-04  Yao Qi  <yao@codesourcery.com>
11235
11236         * Makefile.in: Remove GNU make feature --directory.
11237
11238 2011-03-04  Michael Snyder  <msnyder@vmware.com>
11239
11240         * server.c (queue_stop_reply): Call xmalloc not malloc.
11241
11242 2011-03-02  Michael Snyder  <msnyder@vmware.com>
11243
11244         * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11245
11246 2011-02-28  Michael Snyder  <msnyder@vmware.com>
11247
11248         * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11249         (cmd_qtframe): Ditto.
11250         (cmd_qtbuffer): Ditto.
11251         (cmd_bigqtbuffer): Ditto.
11252
11253         * utils.c (decimal2str): Initialize 'width' to nine, then
11254         don't mess with it.
11255
11256 2011-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11257
11258         * hostio.c (require_data): Free *data, not data.
11259
11260 2011-02-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
11261
11262         * hostio.c (require_data): Use free, not xfree.
11263
11264 2011-02-27  Michael Snyder  <msnyder@vmware.com>
11265
11266         * server.c (handle_query): Discard unused value.
11267
11268         * hostio.c (require_data): Free malloc memory before returning
11269         error.
11270
11271 2011-02-26  Michael Snyder  <msnyder@vmware.com>
11272
11273         * linux-low.c (list_threads): Call closedir for dirent.
11274
11275 2011-02-27  Michael Snyder  <msnyder@vmware.com>
11276
11277         * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11278         a case statement falls through.
11279
11280         * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11281
11282         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11283         in comparison.
11284
11285 2011-02-26  Michael Snyder  <msnyder@vmware.com>
11286
11287         * utils.c (decimal2str): Eliminate dead code and dead param.
11288         (pulongest): Drop dead param from call to decimal2str.
11289         (plongest): Ditto.
11290
11291 2011-02-24  Joel Brobecker  <brobecker@adacore.com>
11292
11293         Revert the following patch (not approved yet):
11294         2011-02-21  Hui Zhu  <teawater@gmail.com>
11295         * tracepoint.c (tp_printf): New function.
11296         (eval_agent_expr): Handle gdb_agent_op_printf.
11297
11298 2011-02-21  Hui Zhu  <teawater@gmail.com>
11299
11300         * tracepoint.c (tp_printf): New function.
11301         (eval_agent_expr): Handle gdb_agent_op_printf.
11302
11303 2011-02-18  Tom Tromey  <tromey@redhat.com>
11304
11305         * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11306         (tracepoint.o): Likewise.
11307         * tracepoint.c (enum gdb_agent_op): Use ax.def.
11308         (gdb_agent_op_names): Likewise.
11309
11310 2011-02-18  Tom Tromey  <tromey@redhat.com>
11311
11312         * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11313         gdb_agent_op_rot>: New constants.
11314         (gdb_agent_op_names): Add pick and roll.
11315         (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11316         cases.
11317
11318 2011-02-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
11319
11320         * aclocal.m4: Regenerated with aclocal-1.11.1.
11321
11322 2011-02-14  Pedro Alves  <pedro@codesourcery.com>
11323
11324         * server.c (handle_qxfer_traceframe_info): New.
11325         (qxfer_packets): Register "traceframe-info".
11326         (handle_query): Report support for qXfer:traceframe-info:read+.
11327         * tracepoint.c (match_blocktype): New.
11328         (traceframe_find_block_type): Rename to ...
11329         (traceframe_walk_blocks): ... this.  Add callback filter argument,
11330         and use it.
11331         (traceframe_find_block_type): New, reimplemented on top of
11332         traceframe_walk_blocks.
11333         (build_traceframe_info_xml): New.
11334         (traceframe_read_info): New.
11335         * server.h (traceframe_read_info): Declare.
11336
11337 2011-02-11  Yao Qi  <yao@codesourcery.com>
11338
11339         * configure.ac: Call AC_PROG_RANLIB.
11340         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
11341         * configure: Regenerate.
11342
11343 2011-02-07  Pedro Alves  <pedro@codesourcery.com>
11344
11345         * server.c (gdb_read_memory): Change return semantics to allow
11346         partial transfers.
11347         (handle_search_memory_1): Adjust.
11348         (process_serial_event) <'m' packet>: Handle partial transfers.
11349         * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11350
11351 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
11352
11353         * regcache.c (init_register_cache): Initialize
11354         regcache->register_status.
11355         (free_register_cache): Release regcache->register_status.
11356         (regcache_cpy): Copy register_status.
11357         (registers_to_string): Print 'x's for unavailable registers.
11358         (supply_register): Mark the register's status valid or
11359         unavailable, depending on whether a buffer was passed in or not.
11360         (supply_register_zeroed): New.
11361         (supply_regblock): Mark the registers' status valid or
11362         unavailable, depending on whether a buffer was passed in or not.
11363         * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11364         (struct regcache): New `register_status' field.
11365         (supply_register_zeroed): Declare.
11366         * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11367         supply_register_zeroed, rather than passing a NULL buffer to
11368         supply_register.
11369         * tracepoint.c (fetch_traceframe_registers): Update comment.
11370
11371 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
11372
11373         * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11374         buffer explicit.
11375
11376 2011-01-25  Pedro Alves  <pedro@codesourcery.com>
11377
11378         * server.h (decode_xfer_write): Change prototype.
11379         * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11380         and don't extract the annex here.
11381         * server.c (decode_xfer_read): Remove `annex' parameter,
11382         and don't extract the annex here.
11383         (decode_xfer): New.
11384         (struct qxfer): New.
11385         (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11386         (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11387         (handle_qxfer_statictrace): New functions, abstracted out from
11388         handle_query, and made to use the struct qxfer interface.
11389         (handle_threads_qxfer_proper): Rename to ...
11390         (handle_qxfer_threads_proper): ... this.
11391         (handle_threads_qxfer): Rename to ...
11392         (handle_qxfer_threads): ... this.  Adjust.
11393         (qxfer_packets): New array.
11394         (handle_qxfer): New function.
11395         (handle_query): Use handle_qxfer.
11396
11397 2011-01-05  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>
11398
11399         * gdbreplay.c: Shorten lines of >= 80 columns.
11400         * linux-low.c: Ditto.
11401         * linux-ppc-low.c: Ditto.
11402         * linux-s390-low.c: Ditto.
11403         * linux-sparc-low.c: Ditto.
11404         * linux-x86-low.c: Ditto.
11405         * linux-xtensa-low.c: Ditto.
11406         * mem-break.c: Ditto.
11407         * nto-low.c: Ditto.
11408         * regcache.h: Ditto.
11409         * remote-utils.c: Ditto.
11410         * server.c: Ditto.
11411         * server.h: Ditto.
11412         * thread-db.c: Ditto.
11413         * tracepoint.c: Ditto.
11414         * utils.c: Ditto.
11415         * win32-low.h: Ditto.
11416
11417 2011-01-05  Joel Brobecker  <brobecker@adacore.com>
11418
11419         * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11420         update.
11421
11422 2011-01-01  Joel Brobecker  <brobecker@adacore.com>
11423
11424         * server.c (gdbserver_version): Update copyright year in version
11425         output.
11426         * gdbreplay.c (gdbreplay_version): Ditto.
11427
11428 2010-12-29  Jie Zhang  <jie.zhang@analog.com>
11429
11430         * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11431         * linux-bfin-low.c: New file.
11432         * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11433         PT_DATA_ADDR for BFIN targets.
11434         * Makefile.in (SFILES): Add linux-bfin-low.c.
11435         (clean): Remove reg-bfin.c.
11436         (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11437         * README: Mention supported Blackfin targets.
11438
11439 2010-12-23  Mike Frysinger  <vapier@gentoo.org>
11440
11441         * .gitignore: New file.
11442
11443 2010-11-16  Mike Frysinger  <vapier@gentoo.org>
11444
11445         * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11446
11447 2010-10-22  Jie Zhang  <jie@codesourcery.com>
11448
11449         * Makefile.in: Add FLAGS_TO_PASS variable.
11450         (install): Remove dependency of install-only and recursively
11451         invoke make for install-only.
11452
11453 2010-10-04  Doug Evans  <dje@google.com>
11454
11455         * Makefile.in (uninstall): Use $(DESTDIR).
11456
11457 2010-09-24  Pedro Alves  <pedro@codesourcery.com>
11458
11459         PR gdb/11842
11460
11461         * linux-x86-low.c (compat_siginfo_from_siginfo)
11462         (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11463         si_code is < 0.  Check for si_code == SI_TIMER before checking for
11464         si_code < 0.
11465
11466 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
11467
11468         * lynx-i386-low.c: New file.
11469         * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11470
11471 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
11472
11473         * lynx-low.c (ptrace_request_to_str): Remove handling for
11474         request values that have been removed in LynxOS 5.x.
11475
11476 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
11477
11478         * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11479         <ptrace.h>
11480
11481 2010-09-09  Nathan Sidwell  <nathan@codesourcery.com>
11482
11483         * configure.ac: Add --enable-inprocess-agent option.
11484         * configure: Rebuilt.
11485
11486 2010-09-06  Yao Qi  <yao@codesourcery.com>
11487
11488         * linux-low.c (linux_kill): Remove unused variable.
11489         (linux_stabilize_threads): Likewise.
11490         * server.c (start_inferior): Likewise.
11491         (queue_stop_reply_callback): Likewise.
11492         * tracepoint.c (do_action_at_tracepoint): Likewise.
11493
11494 2010-09-06  Yao Qi  <yao@codesourcery.com>
11495
11496         * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11497         on return.
11498
11499 2010-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
11500
11501         * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11502
11503 2010-09-06  Pedro Alves  <pedro@codesourcery.com>
11504
11505         * Makefile.in (install-only): Replace $IPA_DEPFILES with
11506         "$(IPA_DEPFILES)".
11507
11508 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
11509
11510         * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11511         gdbserver/lynx-ppc-low.c: New files.
11512         * Makefile.in (lynx_low_h): New variable.
11513         (lynx-low.o, lynx-ppc-low.o): New rules.
11514         * configure.ac: On LynxOS, link with -lnetinet.
11515         * configure.srv: Add handling of powerpc-*-lynxos* targets.
11516         * configure: regenerate.
11517
11518 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
11519
11520         * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11521         * configure.ac: Add check for vasprintf and vsnprintf.
11522         * configure, config.in: Regenerate.
11523         * server.h (vasprintf, vsnprintf): Add conditional declarations.
11524
11525 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
11526
11527         * gdbreplay.c: Move include of alloca.h up, next to include of
11528         malloc.h.
11529         * server.h: Add include of malloc.h.
11530         * mem-break.c: Remove include of malloc.h.
11531         * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11532
11533 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
11534
11535         * Makefile.in (memmem.o): Build with -Wno-error.
11536
11537 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
11538
11539         * utils.c (xsnprintf): Make non-static.
11540         * server.h: Add xsnprintf declaration.
11541         * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11542         replace calls to snprintf by calls to xsnprintf throughout.
11543
11544 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
11545
11546         * configure.ac: Add configure check for alloca.
11547         * configure, config.in: Regenerate.
11548         * server.h: Include alloca.h if it exists.
11549         * gdbreplay.c: Include alloca.h if it exists.
11550
11551 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
11552
11553         * linux-low.c (__SIGRTMIN): Define if not already defined.
11554         (linux_create_inferior): Check for __ANDROID__ rather than
11555         __SIGRTMIN.
11556         (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11557         are already deferred.
11558         (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11559         (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11560         stopped and already has a pending signal to report.
11561         (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11562         a pending signal to report or is moving out of a jump pad.
11563         (linux_init_signals): Check for __ANDROID__ rather than
11564         __SIGRTMIN.
11565
11566 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
11567
11568         * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11569         debug_threads check.  Avoid a linear search when not doing debug
11570         output.
11571
11572 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
11573
11574         * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11575         (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11576         (struct file_handler) <fd>: Change type to gdb_fildes_t.
11577         (process_event): Change local fd's type to gdb_fildes_t.
11578         (create_file_handler): Adjust prototype.
11579         (delete_file_handler): Adjust prototype.
11580         (handle_file_event): Adjust prototype.  Use pfildes.
11581         (create_file_event): Adjsut prototype.
11582         * remote-utils.c (remote_desc, listen_desc): Change type to
11583         gdb_fildes_t.
11584         * server.h: New gdb_fildes_t typedef.
11585         [USE_WIN32API]: Include winsock2.h.
11586         (delete_file_handler, add_file_handler): Adjust prototypes.
11587         (pfildes): Declare.
11588         * utils.c (pfildes): New.
11589
11590 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
11591
11592         * configure.ac (build_warnings): Add -Wno-char-subscripts.
11593         * configure: Regenerate.
11594
11595 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
11596
11597         * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11598         (linux_done_accessing_memory): ... this.
11599         (linux_target_ops): Adjust.
11600         * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11601         * nto-low.c (nto_target_ops): Adjust comment.
11602         * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11603         * spu-low.c (spu_target_ops): Adjust comment.
11604         * target.h (target_ops): Rename unprepare_to_access_memory field
11605         to done_accessing_memory.
11606         (unprepare_to_access_memory): Rename to ...
11607         (done_accessing_memory): ... this.
11608
11609 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
11610
11611         * linux-low.c (linux_prepare_to_access_memory): New.
11612         (linux_unprepare_to_access_memory): New.
11613         (linux_target_ops): Install them.
11614         * server.c (read_memory): Rename to ...
11615         (gdb_read_memory): ... this.  Use
11616         prepare_to_access_memory/prepare_to_access_memory.
11617         (write_memory): Rename to ...
11618         (gdb_write_memory): ... this.  Use
11619         prepare_to_access_memory/prepare_to_access_memory.
11620         (handle_search_memory_1): Adjust.
11621         (process_serial_event): Adjust.
11622         * target.h (struct target_ops): New fields
11623         prepare_to_access_memory and unprepare_to_access_memory.
11624         (prepare_to_access_memory, unprepare_to_access_memory): New.
11625         * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11626         prepare_to_access_memory/prepare_to_access_memory.
11627         * nto-low.c (nto_target_ops): Adjust.
11628         * spu-low.c (spu_target_ops): Adjust.
11629         * win32-low.c (win32_target_ops): Adjust.
11630
11631 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
11632
11633         * Makefile.in (WARN_CFLAGS): Get it from configure.
11634         (WERROR_CFLAGS): New.
11635         (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11636         * configure.ac: Introduce --enable-werror, which adds -Werror to
11637         the compiler command line.  Enabled by default.  Disable with
11638         --disable-werror.  Add -Wdeclaration-after-statement
11639         Wpointer-arith and -Wformat-nonliteral to warning flags.
11640         * configure: Regenerate.
11641
11642 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
11643
11644         * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11645
11646 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
11647
11648         * gdbreplay.c (remote_error): New.
11649         (gdbchar): New.
11650         (expect): Use gdbchar.  Check for error reading from GDB.
11651         Clarify sync error output.
11652         (play): Check for errors writing to GDB.
11653         * linux-low.c (sigchld_handler): Really ignore `write' errors.
11654         * remote-utils.c (getpkt): Check for errors writing to the remote
11655         descriptor.
11656
11657 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
11658
11659         * linux-low.c (linux_wait_1): Move non-debugging code out of
11660         `debug_threads' control.
11661
11662 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
11663
11664         * linux-low.c (linux_wait_1): Don't set last_status here.
11665         * server.c (push_event, queue_stop_reply_callback): Assert we're
11666         not pushing a TARGET_WAITKIND_IGNORE event.
11667         (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11668         (myresume, handle_target_event): Set the thread's last_resume_kind
11669         and last_status from the target returned status.
11670
11671 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
11672
11673         PR threads/10729
11674
11675         * linux-x86-low.c (update_debug_registers_callback): New.
11676         (i386_dr_low_set_addr): Use it.
11677         (i386_dr_low_get_addr): New.
11678         (i386_dr_low_set_control): Use update_debug_registers_callback.
11679         (i386_dr_low_get_control): New.
11680         (i386_dr_low_get_status): Adjust.
11681         * linux-low.c (linux_stop_lwp): New.
11682         * linux-low.h (linux_stop_lwp): Declare.
11683
11684         * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11685         argument instead of a i386_debug_reg_state.
11686         (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11687         a i386_debug_reg_state.
11688         (i386_insert_aligned_watchpoint): Adjust.
11689         (i386_remove_aligned_watchpoint): Adjust.
11690         (i386_low_stopped_data_address): Read the debug registers from the
11691         inferior instead of from the mirrors.
11692         * i386-low.h (struct i386_debug_reg_state): Extend comment.
11693         (i386_dr_low_get_addr): Declare.
11694         (i386_dr_low_get_control): Declare.
11695         (i386_dr_low_get_status): Change prototype.
11696
11697         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11698         (i386_dr_low_get_addr): New.
11699         (i386_dr_low_get_control): New.
11700         (i386_dr_low_get_status): Adjust prototype.  Return
11701         dr_status_mirror.
11702         (i386_initial_stuff): Clear dr_status_mirror and
11703         dr_control_mirror.
11704         (i386_get_thread_context): Adjust.
11705         (i386_set_thread_context): Adjust.
11706         (i386_thread_added): Adjust.
11707
11708 2010-08-24  Pedro Alves  <pedro@codesourcery.com>
11709
11710         * linux-low.h (linux_thread_area): Delete declaration.
11711
11712 2010-08-11  Thomas Schwinge  <thomas@codesourcery.com>
11713
11714         * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11715         after its termination.
11716
11717 2010-08-09  Pedro Alves  <pedro@codesourcery.com>
11718
11719         * linux-low.c (gdb_wants_lwp_stopped): Delete.
11720         (gdb_wants_all_stopped): Delete.
11721         (linux_wait_1): Don't call them.
11722         * server.c (handle_v_cont): Tag all threads as want-stopped.
11723         (gdb_wants_thread_stopped): Fix comments.  Tag the thread that
11724         stopped as "client-wants-stopped".
11725
11726 2010-07-31  Pedro Alves  <pedro@codesourcery.com>
11727
11728         * Makefile.in (signals_h): New.
11729         (server_h): Depend on it.
11730         (server.o): Don't depend on $(signals_def).
11731         (signals.o): Depend on $(signals_def).
11732
11733 2010-07-31  Jan Kratochvil  <jan.kratochvil@redhat.com>
11734
11735         * Makefile.in (signals_def): New.
11736         (server_h): Append include/gdb/signals.h and signals_def.
11737         (server.o): Append signals_def.
11738
11739 2010-07-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
11740
11741         * server.c (handle_target_event): Use target_signal_to_host for
11742         resume_info.sig initialization.
11743         * target.h (struct thread_resume) <sig>: New comment.
11744
11745 2010-07-20  Ozkan Sezer  <sezeroz@gmail.com>
11746
11747         * server.c (handle_query): strcpy() the returned string from paddress()
11748         instead of sprintf().
11749         * utils.c (paddress): Return phex_nz().
11750
11751 2010-07-07  Joel Brobecker  <brobecker@adacore.com>
11752
11753         * server.c (handle_v_cont): Call mourn_inferior if process
11754         just exited.
11755         (myresume): Likewise.
11756
11757 2010-07-01  Pedro Alves  <pedro@codesourcery.com>
11758
11759         Static tracepoints, and integration with UST.
11760
11761         * configure.ac: Handle --with-ust.  substitute ustlibs and ustinc.
11762         * mem-break.c (uninsert_all_breakpoints)
11763         (reinsert_all_breakpoints): New.
11764         * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11765         * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11766         (gdb_agent_ust_loaded, helper_thread_id)
11767         (gdb_agent_helper_thread_id): New macros.
11768         (struct ipa_sym_addresses): Add addr_ust_loaded,
11769         addr_helper_thread_id, addr_cmd_buf.
11770         (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11771         (in_process_agent_loaded_ust): New.
11772         (write_e_ust_not_loaded): New.
11773         (maybe_write_ipa_ust_not_loaded): New.
11774         (struct collect_static_trace_data_action): New.
11775         (enum tracepoint_type) <static_tracepoint>: New.
11776         (struct tracepoint) <handle>: Mention static tracepoints.
11777         (struct static_tracepoint_ctx): New.
11778         (CMD_BUF_SIZE): New.
11779         (add_tracepoint_action): Handle static tracepoint actions.
11780         (unprobe_marker_at): New.
11781         (clear_installed_tracepoints): Handle static tracepoints.
11782         (cmd_qtdp): Handle static tracepoints.
11783         (probe_marker_at): New.
11784         (cmd_qtstart): Handle static tracepoints.
11785         (response_tracepoint): Handle static tracepoints.
11786         (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11787         (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11788         (get_context_regcache): Handle static tracepoints.
11789         (do_action_at_tracepoint): Handle static tracepoint actions.
11790         (traceframe_find_block_type): Handle static trace data blocks.
11791         (traceframe_read_sdata): New.
11792         (download_tracepoints): Download static tracepoint actions.
11793         [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11794         (GDB_PROBE_NAME): New.
11795         (ust_ops): New.
11796         (GET_UST_SYM): New.
11797         (USTF): New.
11798         (dlsym_ust): New.
11799         (ust_marker_to_static_tracepoint): New.
11800         (gdb_probe): New.
11801         (collect_ust_data_at_tracepoint): New.
11802         (gdb_ust_probe): New.
11803         (UNIX_PATH_MAX, SOCK_DIR): New.
11804         (gdb_ust_connect_sync_socket): New.
11805         (resume_thread, stop_thread): New.
11806         (run_inferior_command): New.
11807         (init_named_socket): New.
11808         (gdb_ust_socket_init): New.
11809         (cstr_to_hexstr): New.
11810         (next_st): New.
11811         (first_marker, next_marker): New.
11812         (response_ust_marker): New.
11813         (cmd_qtfstm, cmd_qtsstm): New.
11814         (unprobe_marker_at, probe_marker_at): New.
11815         (cmd_qtstmat, gdb_ust_thread): New.
11816         (gdb_ust_init): New.
11817         (initialize_tracepoint_ftlib): Call gdb_ust_init.
11818         * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11819         (ST_REGENTRY): New.
11820         (x86_64_st_collect_regmap): New.
11821         (X86_64_NUM_ST_COLLECT_GREGS): New.
11822         (AMD64_RIP_REGNUM): New.
11823         (supply_static_tracepoint_registers): New.
11824         * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11825         (ST_REGENTRY): New.
11826         (i386_st_collect_regmap): New.
11827         (i386_NUM_ST_COLLECT_GREGS): New.
11828         (supply_static_tracepoint_registers): New.
11829         * server.c (handle_query): Handle qXfer:statictrace:read.
11830         <qSupported>: Report support for StaticTracepoints, and
11831         qXfer:statictrace:read features.
11832         * server.h (traceframe_read_sdata)
11833         (supply_static_tracepoint_registers): Declare.
11834         * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11835         (unpack_varlen_hex): Include in IPA build.
11836         * Makefile.in (ustlibs, ustinc): New.
11837         (IPA_OBJS): Add remote-utils-ipa.o.
11838         ($(IPA_LIB)): Link -ldl and -lpthread.
11839         (UST_CFLAGS): New.
11840         (IPAGENT_CFLAGS): Add UST_CFLAGS.
11841         * config.in, configure: Regenerate.
11842
11843 2010-06-20  Ian Lance Taylor  <iant@google.com>
11844             Pedro Alves  <pedro@codesourcery.com>
11845
11846         * linux-x86-low.c (always_true): Delete.
11847         (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11848         trying to fool the compiler with always_true.
11849
11850 2010-06-20  Pedro Alves  <pedro@codesourcery.com>
11851
11852         * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11853         conditions in gdbserver.
11854
11855 2010-06-19  Ulrich Weigand  <uweigand@de.ibm.com>
11856
11857         * spu-low.c (spu_read_memory): Wrap around local store limit.
11858         (spu_write_memory): Likewise.
11859
11860 2010-06-15  Pedro Alves  <pedro@codesourcery.com>
11861
11862         * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11863         (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11864         LONGEST uses.
11865         * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11866         uses.
11867         * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11868         uses with LONGEST uses.
11869
11870 2010-06-14  Stan Shebs  <stan@codesourcery.com>
11871             Pedro Alves  <pedro@codesourcery.com>
11872
11873         Bytecode compiler.
11874
11875         * linux-x86-low.c: Include limits.h.
11876         (add_insns): New.
11877         (always_true): New.
11878         (EMIT_ASM): New.
11879         (EMIT_ASM32): New.
11880         (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11881         (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11882         (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11883         (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11884         (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11885         (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11886         (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11887         (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11888         (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11889         (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11890         (amd64_emit_void_call_2): New.
11891         (amd64_emit_ops): New.
11892         (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11893         (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11894         (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11895         (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11896         (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11897         (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11898         (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11899         (i386_emit_call, i386_emit_reg, i386_emit_pop)
11900         (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11901         (i386_emit_stack_adjust, i386_emit_int_call_1)
11902         (i386_emit_void_call_2): New.
11903         (i386_emit_ops): New.
11904         (x86_emit_ops): New.
11905         (the_low_target): Install x86_emit_ops.
11906         * server.h (struct emit_ops): New.
11907         (get_raw_reg_func_addr): Declare.
11908         (current_insn_ptr, emit_error): Declare.
11909         * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11910         (set_trace_state_variable_value): New defines.
11911         (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11912         addr_get_trace_state_variable_value and
11913         addr_set_trace_state_variable_value.
11914         (symbol_list): New fields for get_raw_reg,
11915         get_trace_state_variable_value and set_trace_state_variable_value.
11916         (condfn): New typedef.
11917         (struct tracepoint): New field `compiled_cond'.
11918         (do_action_at_tracepoint): Clear compiled_cond.
11919         (get_trace_state_variable_value, set_trace_state_variable_value):
11920         Export in the IPA.
11921         (condition_true_at_tracepoint): If there's a compiled condition,
11922         run that.
11923         (current_insn_ptr, emit_error): New globals.
11924         (struct bytecode_address): New.
11925         (get_raw_reg_func_addr): New.
11926         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11927         (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11928         (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11929         (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11930         (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11931         (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11932         (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11933         (compile_tracepoint_condition, compile_bytecodes): New.
11934         * target.h (emit_ops): Forward declare.
11935         (struct target_ops): New field emit_ops.
11936         (target_emit_ops): New.
11937         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11938         * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11939         * linux-low.c (linux_emit_ops): New.
11940         (linux_target_ops): Install it.
11941         * linux-low.h (struct linux_target_ops): New field emit_ops.
11942
11943 2010-06-14  Ulrich Weigand  <uweigand@de.ibm.com>
11944
11945         * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11946         * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11947
11948 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
11949             Stan Shebs  <stan@codesourcery.com>
11950
11951         * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11952         (all): Depend on $(extra_libraries).
11953         (install-only): Install the IPA.
11954         (IPA_OBJS, IPA_LIB): New.
11955         (clean): Remove the IPA lib.
11956         (IPAGENT_CFLAGS): New.
11957         (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11958         (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11959         (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11960         * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11961         * configure.ac: Check for atomic builtins support in the compiler.
11962         (IPA_DEPFILES, extra_libraries): Define.
11963         * configure.srv (ipa_obj): Add description.
11964         (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11965         (i[34567]86-*-linux*): Set ipa_obj.
11966         (x86_64-*-linux*): Set ipa_obj.
11967         * linux-low.c (stabilizing_threads): New.
11968         (supports_fast_tracepoints): New.
11969         (linux_detach): Stabilize threads before detaching.
11970         (handle_tracepoints): Handle internal tracing breakpoints.  Assert
11971         the lwp is either not stabilizing, or is moving out of a jump pad.
11972         (linux_fast_tracepoint_collecting): New.
11973         (maybe_move_out_of_jump_pad): New.
11974         (enqueue_one_deferred_signal): New.
11975         (dequeue_one_deferred_signal): New.
11976         (linux_wait_for_event_1): If moving out of a jump pad, defer
11977         pending signals to later.
11978         (linux_stabilize_threads): New.
11979         (linux_wait_1): Check if threads need moving out of jump pads, and
11980         do it if so.
11981         (stuck_in_jump_pad_callback): New.
11982         (move_out_of_jump_pad_callback): New.
11983         (lwp_running): New.
11984         (linux_resume_one_lwp): Handle moving out of jump pads.
11985         (linux_set_resume_request): Dequeue deferred signals.
11986         (need_step_over_p): Also step over fast tracepoint jumps.
11987         (start_step_over): Also uninsert fast tracepoint jumps.
11988         (finish_step_over): Also reinsert fast tracepoint jumps.
11989         (linux_install_fast_tracepoint_jump): New.
11990         (linux_target_ops): Install linux_stabilize_threads and
11991         linux_install_fast_tracepoint_jump_pad.
11992         * linux-low.h (linux_target_ops) <get_thread_area,
11993         install_fast_tracepoint_jump_pad>: New fields.
11994         (struct lwp_info) <collecting_fast_tracepoint,
11995         pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11996         (linux_get_thread_area): Declare.
11997         * linux-x86-low.c (jump_insn): New.
11998         (x86_get_thread_area): New.
11999         (append_insns): New.
12000         (push_opcode): New.
12001         (amd64_install_fast_tracepoint_jump_pad): New.
12002         (i386_install_fast_tracepoint_jump_pad): New.
12003         (x86_install_fast_tracepoint_jump_pad): New.
12004         (the_low_target): Install x86_get_thread_area and
12005         x86_install_fast_tracepoint_jump_pad.
12006         * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12007         (struct fast_tracepoint_jump): New.
12008         (fast_tracepoint_jump_insn): New.
12009         (fast_tracepoint_jump_shadow): New.
12010         (find_fast_tracepoint_jump_at): New.
12011         (fast_tracepoint_jump_here): New.
12012         (delete_fast_tracepoint_jump): New.
12013         (set_fast_tracepoint_jump): New.
12014         (uninsert_fast_tracepoint_jumps_at): New.
12015         (reinsert_fast_tracepoint_jumps_at): New.
12016         (set_breakpoint_at): Use write_inferior_memory.
12017         (uninsert_raw_breakpoint): Use write_inferior_memory.
12018         (check_mem_read): Mask out fast tracepoint jumps.
12019         (check_mem_write): Mask out fast tracepoint jumps.
12020         * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12021         (set_fast_tracepoint_jump): Declare.
12022         (delete_fast_tracepoint_jump)
12023         (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12024         (reinsert_fast_tracepoint_jumps_at): Declare.
12025         * regcache.c: Don't compile many functions when building the
12026         in-process agent library.
12027         (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12028         the register buffer in the heap.
12029         (free_register_cache): If the register buffer isn't owned by the
12030         regcache, don't free it.
12031         (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12032         pre-existing register caches.
12033         * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12034         type.
12035         (convert_ascii_to_int): : Constify `from' parameter type.
12036         (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12037         a `to_p' pointer to pointer parameter.  If TO_P is NULL, malloc
12038         the needed buffer in-place.
12039         (relocate_instruction): New.
12040         * server.c (handle_query) <qSymbols>: If the target supports
12041         tracepoints, give it a chance of looking up symbols.  Report
12042         support for fast tracepoints.
12043         (handle_status): Stabilize threads.
12044         (process_serial_event): Adjust.
12045         * server.h (struct fast_tracepoint_jump): Forward declare.
12046         (struct process_info) <fast_tracepoint_jumps>: New field.
12047         (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12048         (decode_X_packet, decode_M_packet): Adjust.
12049         (relocate_instruction): Declare.
12050         (in_process_agent_loaded): Declare.
12051         (tracepoint_look_up_symbols): Declare.
12052         (struct fast_tpoint_collect_status): Declare.
12053         (fast_tracepoint_collecting): Declare.
12054         (force_unlock_trace_buffer): Declare.
12055         (handle_tracepoint_bkpts): Declare.
12056         (initialize_low_tracepoint)
12057         (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12058         * target.h (struct target_ops) <stabilize_threads,
12059         install_fast_tracepoint_jump_pad>: New fields.
12060         (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12061         * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12062         [HAVE_STDINT_H]: Include stdint.h.
12063         (trace_debug_1): Rename to ...
12064         (trace_vdebug): ... this.
12065         (trace_debug): Rename to ...
12066         (trace_debug_1): ... this.  Add `level' parameter.
12067         (trace_debug): New.
12068         (ATTR_USED, ATTR_NOINLINE): New.
12069         (IP_AGENT_EXPORT): New.
12070         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12071         (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12072         (about_to_request_buffer_space, trace_buffer_is_full)
12073         (stopping_tracepoint, expr_eval_result, error_tracepoint)
12074         (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12075         (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12076         (traceframe_write_count, traceframes_created)
12077         (trace_state_variables)
12078         New renaming defines.
12079         (struct ipa_sym_addresses): New.
12080         (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12081         (symbol_list): New.
12082         (ipa_sym_addrs): New.
12083         (all_tracepoint_symbols_looked_up): New.
12084         (in_process_agent_loaded): New.
12085         (write_e_ipa_not_loaded): New.
12086         (maybe_write_ipa_not_loaded): New.
12087         (tracepoint_look_up_symbols): New.
12088         (debug_threads) [IN_PROCESS_AGENT]: New.
12089         (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12090         (UNKNOWN_SIDE_EFFECTS): New.
12091         (stop_tracing): New.
12092         (flush_trace_buffer): New.
12093         (stop_tracing_bkpt): New.
12094         (flush_trace_buffer_bkpt): New.
12095         (read_inferior_integer): New.
12096         (read_inferior_uinteger): New.
12097         (read_inferior_data_pointer): New.
12098         (write_inferior_data_pointer): New.
12099         (write_inferior_integer): New.
12100         (write_inferior_uinteger): New.
12101         (struct collect_static_trace_data_action): Delete.
12102         (enum tracepoint_type): New.
12103         (struct tracepoint) <type>: New field `type'.
12104         <actions_str, step_actions, step_actions_str>: Only include in
12105         GDBserver.
12106         <orig_size, obj_addr_on_target, adjusted_insn_addr>
12107         <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12108         (tracepoints): Use IP_AGENT_EXPORT.
12109         (last_tracepoint): Don't include in the IPA.
12110         (stopping_tracepoint): Use IP_AGENT_EXPORT.
12111         (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12112         (alloced_trace_state_variables): New.
12113         (trace_state_variables): Use IP_AGENT_EXPORT.
12114         (traceframe_t): Delete unused variable.
12115         (circular_trace_buffer): Don't include in the IPA.
12116         (trace_buffer_start): Delete.
12117         (struct trace_buffer_control): New.
12118         (trace_buffer_free): Delete.
12119         (struct ipa_trace_buffer_control): New.
12120         (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12121         (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12122         New.
12123         (trace_buffer_ctrl): New.
12124         (TRACE_BUFFER_CTRL_CURR): New.
12125         (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12126         Reimplement as macros.
12127         (trace_buffer_wrap): Delete.
12128         (traceframe_write_count, traceframe_read_count)
12129         (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12130         (struct tracepoint_hit_ctx) <type>: New field.
12131         (struct fast_tracepoint_ctx): New.
12132         (memory_barrier): New.
12133         (cmpxchg): New.
12134         (record_tracepoint_error): Update atomically in the IPA.
12135         (clear_inferior_trace_buffer): New.
12136         (about_to_request_buffer_space): New.
12137         (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12138         updating the same buffer.
12139         (add_tracepoint): Default the tracepoint's type to trap
12140         tracepoint, and orig_size to -1.
12141         (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12142         internal variables.
12143         (create_trace_state_variable): New parameter `gdb'.  Handle it.
12144         (clear_installed_tracepoints): Clear fast tracepoint jumps.
12145         (cmd_qtdp): Handle fast tracepoints.
12146         (cmd_qtdv): Adjust.
12147         (max_jump_pad_size): New.
12148         (gdb_jump_pad_head): New.
12149         (get_jump_space_head): New.
12150         (claim_jump_space): New.
12151         (sort_tracepoints): New.
12152         (MAX_JUMP_SIZE): New.
12153         (cmd_qtstart): Handle fast tracepoints.  Sync tracepoints with the
12154         IPA.
12155         (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12156         support.  Upload fast traceframes, and delete internal IPA
12157         breakpoints.
12158         (stop_tracing_handler): New.
12159         (flush_trace_buffer_handler): New.
12160         (cmd_qtstop): Upload fast tracepoints.
12161         (response_tracepoint): Handle fast tracepoints.
12162         (tracepoint_finished_step): Upload fast traceframes.  Set the
12163         tracepoint hit context's tracepoint type.
12164         (handle_tracepoint_bkpts): New.
12165         (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12166         type.  Add comment about fast tracepoints.
12167         (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12168         non-existing action_str field.
12169         (get_context_regcache): Handle fast tracepoints.
12170         (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12171         to the regcache.
12172         (fast_tracepoint_from_jump_pad_address): New.
12173         (fast_tracepoint_from_ipa_tpoint_address): New.
12174         (collecting_t): New.
12175         (force_unlock_trace_buffer): New.
12176         (fast_tracepoint_collecting): New.
12177         (collecting): New.
12178         (gdb_collect): New.
12179         (write_inferior_data_ptr): New.
12180         (target_tp_heap): New.
12181         (target_malloc): New.
12182         (download_agent_expr): New.
12183         (UALIGN): New.
12184         (download_tracepoints): New.
12185         (download_trace_state_variables): New.
12186         (upload_fast_traceframes): New.
12187         (IPA_FIRST_TRACEFRAME): New.
12188         (IPA_NEXT_TRACEFRAME_1): New.
12189         (IPA_NEXT_TRACEFRAME): New.
12190         [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12191         [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12192         (gdb_jump_pad_buffer_end): New.
12193         [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12194         (initialize_tracepoint): Adjust.
12195         [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12196         buffer.  Initialize the low module.
12197         * utils.c (PREFIX, TOOLNAME): New.
12198         (malloc_failure): Use PREFIX.
12199         (error): In the IPA, an error causes an exit.
12200         (fatal, warning): Use PREFIX.
12201         (internal_error): Use TOOLNAME.
12202         (NUMCELLS): Increase to 10.
12203         * configure, config.in: Regenerate.
12204
12205 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
12206
12207         * server.c (handle_query) <qSupported>: Do two passes over the
12208         qSupported string to avoid nesting strtok.
12209
12210 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
12211
12212         * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12213         (CDEPS): New.
12214         * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping.  Test also
12215         -Wl,--dynamic-list.
12216         * configure: Regenerate.
12217         * proc-service.list: New.
12218
12219 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
12220
12221         * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12222         New comment.
12223
12224 2010-05-26  Ozkan Sezer  <sezeroz@gmail.com>
12225
12226         * gdbreplay.c (remote_open): Check error return from socket() call by
12227         its equality to -1 not by it being negative.
12228         * remote-utils.c (remote_open): Likewise.
12229
12230 2010-05-23  Pedro Alves  <pedro@codesourcery.com>
12231
12232         * config.h: Regenerate.
12233
12234 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
12235
12236         * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12237         doesn't provide PTRACE_GET_THREAD_AREA.
12238
12239 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
12240
12241         * linux-m68k-low.c: Include <asm/ptrace.h>
12242         (ps_get_thread_area): Implement.
12243
12244 2010-05-03  Doug Evans  <dje@google.com>
12245
12246         * event-loop.c (struct callback_event): New struct.
12247         (callback_list): New global.
12248         (append_callback_event, delete_callback_event): New functions.
12249         (process_callback): New function.
12250         (start_event_loop): Call it.
12251         * remote-utils.c (NOT_SCHEDULED): Define.
12252         (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12253         moved out of readchar.
12254         (readchar): Rewrite.  Call reschedule before returning.
12255         (reset_readchar): New function.
12256         (remote_close): Call it.
12257         (process_remaining, reschedule): New functions.
12258         * server.h (callback_handler_func): New typedef.
12259         (append_callback_event, delete_callback_event): Declare.
12260
12261 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
12262
12263         * proc-service.c (ps_pglobal_lookup): Use
12264         thread_db_look_up_one_symbol.
12265         * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12266         parameter.  Use it instead of all_symbols_looked_up.
12267         * server.h (struct process_info) <all_symbols_looked_up>: Delete
12268         field.
12269         (all_symbols_looked_up): Don't declare.
12270         (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12271         * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12272         field.
12273         (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12274         Set all_symbols_looked_up here.
12275         (thread_db_look_up_one_symbol): New.
12276         (thread_db_get_tls_address): Adjust.
12277         (thread_db_load_search, try_thread_db_load_1): Always allocate the
12278         thread_db object on the heap, and tentatively set it in the
12279         process structure.
12280         (thread_db_init): Don't set all_symbols_looked_up here.
12281         * linux-low.h (thread_db_look_up_one_symbol): Declare.
12282
12283 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
12284
12285         * linux-low.c (linux_kill, linux_detach): Adjust.
12286         (status_pending_p_callback): Remove redundant statement.  Check
12287         for !TARGET_WAITIKIND_IGNORE, instead of
12288         TARGET_WAITKIND_STOPPED.
12289         (handle_tracepoints): Make sure LWP is locked.  Adjust.
12290         (linux_wait_for_event_1): Adjust.
12291         (linux_cancel_breakpoints): New.
12292         (unsuspend_one_lwp): New.
12293         (unsuspend_all_lwps): New.
12294         (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12295         (send_sigstop_callback): Change return type to int, add new
12296         `except' parameter and handle it.
12297         (suspend_and_send_sigstop_callback): New.
12298         (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12299         pass them down.  If SUSPEND, also increment the lwp's suspend
12300         count.
12301         (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12302         (need_step_over_p): Don't consider suspended LWPs.
12303         (start_step_over): Adjust.
12304         (proceed_one_lwp): Change return type to int, add new `except'
12305         parameter and handle it.
12306         (unsuspend_and_proceed_one_lwp): New.
12307         (proceed_all_lwps): Use find_inferior instead of
12308         for_each_inferior.
12309         (unstop_all_lwps): Add `unsuspend' parameter.  If UNSUSPEND, them
12310         also decrement the suspend count of LWPs.  Pass `except' down,
12311         instead of hacking its suspend count.
12312         (linux_pause_all): Add `freeze' parameter.  Adjust.
12313         (linux_unpause_all): New.
12314         (linux_target_ops): Install linux_unpause_all.
12315         * server.c (handle_status): Adjust.
12316         * target.h (struct target_ops): New fields `unpause_all' and
12317         `cancel_breakpoints'.  Add new parameter to `pause_all'.
12318         (pause_all): Add new `freeze' parameter.
12319         (unpause_all): New.
12320         (cancel_breakpoints): New.
12321         * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12322         cancel breakpoints.
12323         (cmd_qtstart): Pause threads.
12324         (stop_tracing): Pause threads, and cancel breakpoints.
12325         * win32-low.c (win32_target_ops): Adjust.
12326
12327 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
12328
12329         * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12330         the inferior right away from here...
12331         (linux_wait_1): ... to here, and adjust to check the thread's
12332         last_resume_kind instead of the lwp's step or stop_expected flags.
12333
12334 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
12335
12336         * README: Use consistent `GDB' and `GDBserver' spellings.
12337
12338 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
12339
12340         * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12341         (linux_kill): Stop all lwps here.  Don't delete the main lwp here.
12342         (linux_detach_one_lwp): Assume the lwp is stopped.
12343         (any_thread_of): Delete.
12344         (linux_detach): Stop all lwps here.  Don't blindly delete all
12345         breakpoints.
12346         (delete_lwp_callback): New.
12347         (linux_mourn): Delete all lwps of the process that is gone.
12348         (linux_wait_1): Don't delete the last lwp of the process here.
12349         * mem-break.h (mark_breakpoints_out): Declare.
12350         * mem-break.c (mark_breakpoints_out): New.
12351         (free_all_breakpoints): Use it.
12352         * server.c (handle_target_event): If the process is gone, mark
12353         breakpoints out.
12354         * thread-db.c (struct thread_db) <create_bp>: New field.
12355         (thread_db_enable_reporting): Fix prototype.  Store a thread event
12356         breakpoint reference in the thread_db struct.
12357         (thread_db_load_search): Clear the thread_db object.
12358         (try_thread_db_load_1): Ditto.
12359         (switch_to_process): New.
12360         (disable_thread_event_reporting): Use it.
12361         (remove_thread_event_breakpoints): New.
12362         (thread_db_detach, thread_db_mourn): Use it.
12363
12364 2010-05-01  Pedro Alves  <pedro@codesourcery.com>
12365
12366         * linux-low.c (linux_enable_event_reporting): New.
12367         (linux_wait_for_event_1, handle_extended_wait): Use it.
12368
12369 2010-04-30  Pedro Alves  <pedro@codesourcery.com>
12370
12371         * linux-low.c (linux_kill_one_lwp, linux_kill)
12372         (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12373         (send_sigstop): Take an lwp_info as parameter instead.  Queue a
12374         SIGSTOP even if the LWP is stopped.
12375         (send_sigstop_callback): New.
12376         (stop_all_lwps): Use send_sigstop_callback instead.
12377         (linux_resume_one_thread): Adjust.
12378         (proceed_one_lwp): Still proceed an LWP that the client has
12379         requested to stop, if we haven't reported it as stopped yet.  Make
12380         sure that LWPs the client want stopped, have a pending SIGSTOP.
12381
12382 2010-04-26  Doug Evans  <dje@google.com>
12383
12384         * server.c (handle_general_set): Make static.
12385
12386         * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12387         Print received char after testing for error/eof instead of before.
12388         (input_interrupt): Tweak comment.
12389
12390 2010-04-23  Doug Evans  <dje@google.com>
12391
12392         * server.c (start_inferior): Print inferior argv if --debug.
12393
12394 2010-04-21  Aleksandar Ristovski  <aristovski@qnx.com>
12395
12396         * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12397         * nto-x86-low.c: Include server.h
12398
12399 2010-04-20  Pierre Muller  <muller@ics.u-strasbg.fr>
12400
12401         * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12402         be consistent with other sources of this directory.
12403         (init_registers_amd64): Correct name of source file of this function
12404         in the comment.
12405
12406 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
12407
12408         * configure.srv (x86_64-*-mingw*): New configuration for Windows
12409         64-bit executables.
12410
12411 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
12412
12413         * win32-i386-low.c: Add 64-bit support.
12414         (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12415         (init_registers_amd64): Declare.
12416         (mappings): Add 64-bit version of array.
12417         (init_windows_x86): New function.
12418         (the_low_target): Change init_arch field to init_windows_x86.
12419
12420 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
12421
12422         * win32-low.c: Adapt to support also 64-bit architecture.
12423         (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12424         (get_image_name): Use SIZE_T type for local variable `done'.
12425         (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12426         (toolhelp_get_dll_name): Idem.
12427         (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12428         Use uintptr_t typecast to avoid warning.
12429         (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12430         (handle_exception): Use phex_nz to avoid warning.
12431         (win32_wait): Remove unused local variable `process'.
12432
12433 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
12434
12435         * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12436         `amd64-avx.o'.
12437
12438 2010-04-17  Pierre Muller  <muller@ics.u-strasbg.fr>
12439
12440         * configure.ac: Use `ws2_32' library for srv_mingw.
12441         * configure: Regenerate.
12442         * gdbreplay.c: Include winsock2.h instead of winsock.h.
12443         * remote-utils.c: Likewise.
12444
12445 2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>
12446
12447         * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12448         if __x86_64__ is defined.
12449
12450 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
12451
12452         * configure: Regenerate.
12453
12454 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
12455
12456         * server.c (handle_query): Handle 'qGetTIBAddr' query.
12457         * target.h (target_ops): New get_tib_address field.
12458         * win32-low.h (win32_thread_info): Add thread_local_base field.
12459         * win32-low.c (child_add_thread): Add tlb argument.
12460         Set thread_local_base field to TLB.
12461         (get_child_debug_event): Adapt to child_add_thread change.
12462         (win32_get_tib_address): New function.
12463         (win32_target_ops): Set get_tib_address field to
12464         win32_get_tib_address.
12465         * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12466
12467 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
12468
12469         * linux-low.c (linux_mourn): Also remove the process.
12470         * server.c (handle_target_event): Don't remove the process here.
12471         * nto-low.c (nto_mourn): New.
12472         (nto_target_ops): Install it.
12473         * spu-low.c (spu_mourn): New.
12474         (spu_target_ops): Install it.
12475         * win32-low.c (win32_mourn): New.
12476         (win32_target_ops): Install it.
12477
12478 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
12479
12480         * server.h (buffer_xml_printf): Remove redundant `;'.
12481
12482 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
12483
12484         * regcache.c (set_register_cache): Invalidate regcaches before
12485         changing the register cache layout.
12486         (regcache_invalidate_one): Allow a NULL regcache.
12487         * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12488         regcaches before changing the register cache layout or the target
12489         regsets.
12490
12491 2010-04-12  H.J. Lu  <hongjiu.lu@intel.com>
12492
12493         * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12494         variable warning on Linux/x86-64.
12495
12496 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
12497
12498         GDBserver disconnected tracing support.
12499
12500         * linux-low.c (linux_remove_process): Delete.
12501         (add_lwp): Don't set last_resume_kind here.
12502         (linux_kill): Use `mourn'.
12503         (linux_detach): Use `thread_db_detach', and `mourn'.
12504         (linux_mourn): New.
12505         (linux_attach_lwp_1): Adjust comment.
12506         (linux_attach): last_resume_kind moved the thread_info; adjust.
12507         (status_pending_p_callback): Adjust.
12508         (linux_wait_for_event_1): Adjust.
12509         (count_events_callback, select_singlestep_lwp_callback)
12510         (select_event_lwp_callback, cancel_breakpoints_callback)
12511         (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12512         (proceed_one_lwp): Adjust.
12513         (linux_async): Add debug output.
12514         (linux_thread_stopped): New.
12515         (linux_pause_all): New.
12516         (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12517         linux_pause_all.
12518         * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12519         (thread_db_free): Delete declaration.
12520         (thread_db_detach, thread_db_mourn): Declare.
12521         * thread-db.c (thread_db_init): Use thread_db_mourn.
12522         (thread_db_free): Delete, split in two.
12523         (disable_thread_event_reporting): New.
12524         (thread_db_detach): New.
12525         (thread_db_mourn): New.
12526
12527         * server.h (struct thread_info) <last_resume_kind>: New field.
12528         <attached>: Add comment.
12529         <gdb_detached>: New field.
12530         (handler_func): Change return type to int.
12531         (handle_serial_event, handle_target_event): Ditto.
12532         (gdb_connected): Declare.
12533         (tracing): Delete.
12534         (disconnected_tracing): Declare.
12535         (stop_tracing): Declare.
12536
12537         * server.c (handle_query) <qSupported>: Report support for
12538         disconnected tracing.
12539         (queue_stop_reply_callback): Account for running threads.
12540         (gdb_wants_thread_stopped): New.
12541         (gdb_wants_all_threads_stopped): New.
12542         (gdb_reattached_process): New.
12543         (handle_status): Clear the `gdb_detached' flag of all processes.
12544         In all-stop, stop all threads.
12545         (main): Be sure to leave tfind mode.  Handle disconnected tracing.
12546         (process_serial_event): If the remote connection breaks, or if an
12547         exit was forced with "monitor exit", force an event loop exit.
12548         Handle disconnected tracing on detach.
12549         (handle_serial_event): Adjust.
12550         (handle_target_event): If GDB isn't connected, forward events back
12551         to the inferior, unless the last process exited, in which case,
12552         exit gdbserver.  Adjust interface.
12553
12554         * remote-utils.c (remote_open): Don't block in accept.  Instead
12555         register an event loop source on the listen socket file
12556         descriptor.  Refactor bits into ...
12557         (listen_desc): ... this new global.
12558         (gdb_connected): ... this new function.
12559         (enable_async_notification): ... this new function.
12560         (handle_accept_event): ... this new function.
12561         (remote_close): Clear remote_desc.
12562
12563         * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12564
12565         * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12566         New fields.
12567         (mourn_inferior): Define.
12568         (target_process_qsupported): Avoid the dangling else problem.
12569         (thread_stopped): Define.
12570         (pause_all): Define.
12571         (target_waitstatus_to_string): Declare.
12572         * target.c (target_waitstatus_to_string): New.
12573
12574         * tracepoint.c (tracing): Make extern.
12575         (disconnected_tracing): New.
12576         (stop_tracing): Make extern.  Handle tracing stops due to GDB
12577         disconnecting.
12578         (cmd_qtdisconnected): New.
12579         (cmd_qtstatus): Report disconnected tracing status in trace reply.
12580         (handle_tracepoint_general_set): Handle QTDisconnected.
12581
12582         * event-loop.c (event_handler_func): Change return type to int.
12583         (process_event): Bail out if the event handler wants the event
12584         loop to stop.
12585         (handle_file_event): Ditto.
12586         (start_event_loop): Bail out if the event handler wants the event
12587         loop to stop.
12588
12589         * nto-low.c (nto_target_ops): Adjust.
12590         * spu-low.c (spu_wait): Don't remove the process here.
12591         (spu_target_ops): Adjust.
12592         * win32-low.c (win32_wait): Don't remove the process here.
12593         (win32_target_ops): Adjust.
12594
12595 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
12596
12597         * regcache.c (realloc_register_cache): Invalidate inferior's
12598         regcache before recreating it.
12599
12600 2010-04-09  Pedro Alves  <pedro@codesourcery.com>
12601
12602         * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12603
12604 2010-04-09  Stan Shebs  <stan@codesourcery.com>
12605             Pedro Alves  <pedro@codesourcery.com>
12606
12607         * server.h (LONGEST): New.
12608         (struct thread_info) <while_stepping>: New field.
12609         (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12610         Declare.
12611         (initialize_tracepoint, handle_tracepoint_general_set)
12612         (handle_tracepoint_query, tracepoint_finished_step)
12613         (tracepoint_was_hit, release_while_stepping_state_list):
12614         (current_traceframe): Declare.
12615         * server.c (handle_general_set): Handle tracepoint packets.
12616         (read_memory): New.
12617         (write_memory): New.
12618         (handle_search_memory_1): Use read_memory.
12619         (handle_query): Report support for conditional tracepoints, trace
12620         state variables, and tracepoint sources.  Handle tracepoint
12621         queries.
12622         (main): Initialize the tracepoints module.
12623         (process_serial_event): Handle traceframe reads/writes.
12624
12625         * linux-low.c (handle_tracepoints): New.
12626         (linux_wait_1): Call it.
12627         (linux_resume_one_lwp): Handle while-stepping.
12628         (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12629         (linux_target_ops): Install them.
12630         * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12631         New field.
12632         * linux-x86-low.c (x86_supports_tracepoints): New.
12633         (the_low_target). Install it.
12634
12635         * mem-break.h (delete_breakpoint): Declare.
12636         * mem-break.c (delete_breakpoint): Make external.
12637
12638         * target.h (struct target_ops): Add `supports_tracepoints',
12639         `read_pc', and `write_pc' fields.
12640         (target_supports_tracepoints): Define.
12641         * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12642         (phex_nz): New.
12643
12644         * regcache.h (struct regcache) <registers_owned>: New field.
12645         (init_register_cache, regcache_cpy): Declare.
12646         (regcache_read_pc, regcache_write_pc): Declare.
12647         (register_cache_size): Declare.
12648         (supply_regblock): Declare.
12649         * regcache.c (init_register_cache): New.
12650         (new_register_cache): Use it.
12651         (regcache_cpy): New.
12652         (register_cache_size): New.
12653         (supply_regblock): New.
12654         (regcache_read_pc, regcache_write_pc): New.
12655
12656         * tracepoint.c: New.
12657
12658         * Makefile.in (OBS): Add tracepoint.o.
12659         (tracepoint.o): New rule.
12660
12661 2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>
12662
12663         * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12664         (i386-mmx.o): New.
12665         (i386-mmx.c): Likewise.
12666         (i386-mmx-linux.o): Likewise.
12667         (i386-mmx-linux.c): Likewise.
12668
12669         * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12670         (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12671         (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12672         (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12673
12674         * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12675         (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12676         and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12677
12678 2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>
12679
12680         * Makefile.in (clean): Updated.
12681         (i386-avx.o): New.
12682         (i386-avx.c): Likewise.
12683         (i386-avx-linux.o): Likewise.
12684         (i386-avx-linux.c): Likewise.
12685         (amd64-avx.o): Likewise.
12686         (amd64-avx.c): Likewise.
12687         (amd64-avx-linux.o): Likewise.
12688         (amd64-avx-linux.c): Likewise.
12689
12690         * configure.srv (srv_i386_regobj): Add i386-avx.o.
12691         (srv_i386_linux_regobj): Add i386-avx-linux.o.
12692         (srv_amd64_regobj): Add amd64-avx.o.
12693         (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12694         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12695         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12696         (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12697         (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12698         (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12699         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12700
12701         * i387-fp.c: Include "i386-xstate.h".
12702         (i387_xsave): New.
12703         (i387_cache_to_xsave): Likewise.
12704         (i387_xsave_to_cache): Likewise.
12705         (x86_xcr0): Likewise.
12706
12707         * i387-fp.h (i387_cache_to_xsave): Likewise.
12708         (i387_xsave_to_cache): Likewise.
12709         (x86_xcr0): Likewise.
12710
12711         * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12712         * linux-crisv32-low.c (target_regsets): Likewise.
12713         * linux-m68k-low.c (target_regsets): Likewise.
12714         * linux-mips-low.c (target_regsets): Likewise.
12715         * linux-ppc-low.c (target_regsets): Likewise.
12716         * linux-s390-low.c (target_regsets): Likewise.
12717         * linux-sh-low.c (target_regsets): Likewise.
12718         * linux-sparc-low.c (target_regsets): Likewise.
12719         * linux-xtensa-low.c (target_regsets): Likewise.
12720
12721         * linux-low.c: Include <sys/uio.h>.
12722         (regsets_fetch_inferior_registers): Support nt_type.
12723         (regsets_store_inferior_registers): Likewise.
12724         (linux_process_qsupported): New.
12725         (linux_target_ops): Add linux_process_qsupported.
12726
12727         * linux-low.h (regset_info): Add nt_type.
12728         (linux_target_ops): Add process_qsupported.
12729
12730         * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12731         and <sys/uio.h>.
12732         (init_registers_i386_avx_linux): New.
12733         (init_registers_amd64_avx_linux): Likewise.
12734         (xmltarget_i386_linux_no_xml): Likewise.
12735         (xmltarget_amd64_linux_no_xml): Likewise.
12736         (PTRACE_GETREGSET): Likewise.
12737         (PTRACE_SETREGSET): Likewise.
12738         (x86_fill_xstateregset): Likewise.
12739         (x86_store_xstateregset): Likewise.
12740         (use_xml): Likewise.
12741         (x86_linux_update_xmltarget): Likewise.
12742         (x86_linux_process_qsupported): Likewise.
12743         (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12744         (x86_arch_setup): Don't call init_registers_amd64_linux nor
12745         init_registers_i386_linux here.  Call
12746         x86_linux_update_xmltarget.
12747         (the_low_target): Add x86_linux_process_qsupported.
12748
12749         * server.c (handle_query): Call target_process_qsupported.
12750
12751         * target.h (target_ops): Add process_qsupported.
12752         (target_process_qsupported): New.
12753
12754 2010-04-03  Pedro Alves  <pedro@codesourcery.com>
12755
12756         * inferiors.c (add_thread): Set last_status kind to
12757         TARGET_WAITKIND_IGNORE.
12758         * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12759         fetch.  Use ptid_of.  Avoid unnecessary get_lwp_thread calls.
12760         (linux_wait_1): Move `thread' local definition to block that uses
12761         it.  Don't NULL initialize `event_child'.
12762         (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12763         Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12764         * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12765
12766 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
12767
12768         * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12769         an extended waitstatus, or by a watchpoint.
12770         (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12771         thread was stepping or has been stopped by a watchpoint.
12772
12773 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
12774
12775         * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12776         (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12777         of another, then delete the previous, and validate all
12778         breakpoints.
12779         (validate_inserted_breakpoint): New.
12780         (delete_disabled_breakpoints): New.
12781         (validate_breakpoints): New.
12782         (check_mem_read): Validate breakpoints before trusting their
12783         shadow.  Delete disabled breakpoints.
12784         (check_mem_write): Validate breakpoints before trusting they
12785         should be inserted.  Delete disabled breakpoints.
12786         * mem-break.h (validate_breakpoints):
12787         * server.c (handle_query): Validate breakpoints when we see a
12788         qSymbol query.
12789
12790 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
12791
12792         * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12793         there's a GDB breakpoint at stop_pc.  Always report a trap to GDB
12794         if we could tell there's a GDB breakpoint at stop_pc.
12795         (need_step_over_p): Don't do a step over if we find a GDB
12796         breakpoint at the resume PC.
12797
12798         * mem-break.c (struct raw_breakpoint): New.
12799         (enum bkpt_type): New type `gdb_breakpoint'.
12800         (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12801         fields.  New field `raw'.
12802         (find_raw_breakpoint_at): New.
12803         (set_raw_breakpoint_at): Handle refcounting.  Create a raw
12804         breakpoint instead.
12805         (set_breakpoint_at): Adjust.
12806         (delete_raw_breakpoint): New.
12807         (release_breakpoint): New.
12808         (delete_breakpoint): Rename to...
12809         (delete_breakpoint_1): ... this.  Add proc parameter.  Use
12810         release_breakpoint.  Return ENOENT.
12811         (delete_breakpoint): Reimplement.
12812         (find_breakpoint_at): Delete.
12813         (find_gdb_breakpoint_at): New.
12814         (delete_breakpoint_at): Delete.
12815         (set_gdb_breakpoint_at): New.
12816         (delete_gdb_breakpoint_at): New.
12817         (gdb_breakpoint_here): New.
12818         (set_reinsert_breakpoint): Use release_breakpoint.
12819         (uninsert_breakpoint): Rename to ...
12820         (uninsert_raw_breakpoint): ... this.
12821         (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12822         (reinsert_raw_breakpoint): Change parameter type to
12823         raw_breakpoint.
12824         (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12825         instead.
12826         (check_breakpoints): Adjust.  Use release_breakpoint.
12827         (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12828         (breakpoint_inserted_here): Ditto.
12829         (check_mem_read): Adjust to iterate over raw breakpoints instead.
12830         Don't trust the breakpoint's shadow if it is not inserted.
12831         (check_mem_write): Adjust to iterate over raw breakpoints instead.
12832         (delete_all_breakpoints): Adjust.
12833         (free_all_breakpoints): Mark all breakpoints as uninserted, and
12834         use delete_breakpoint_1.
12835
12836         * mem-break.h (breakpoints_supported): Delete declaration.
12837         (set_gdb_breakpoint_at): Declare.
12838         (gdb_breakpoint_here): Declare.
12839         (delete_breakpoint_at): Delete.
12840         (delete_gdb_breakpoint_at): Declare.
12841
12842         * server.h (struct raw_breakpoint): Forward declare.
12843         (struct process_info): New field `raw_breakpoints'.
12844
12845         * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12846         breakpoints.
12847
12848 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
12849
12850         * linux-low.c (status_pending_p_callback): Fix comment.
12851         (linux_wait_for_event_1): Move most of the internal breakpoint
12852         handling from here...
12853         (linux_wait_1): ... to here.
12854         (count_events_callback): New.
12855         (select_singlestep_lwp_callback): New.
12856         (select_event_lwp_callback): New.
12857         (cancel_breakpoints_callback): New.
12858         (select_event_lwp): New.
12859         (linux_wait_1): Simplify internal breakpoint handling.  Give equal
12860         priority to all LWPs that have had events that should be reported
12861         to the client.  Cancel breakpoints when about to reporting the
12862         event to the client, not while stopping lwps.  No longer cancel
12863         finished single-steps here.
12864         (cancel_finished_single_step): Delete.
12865         (cancel_finished_single_steps): Delete.
12866
12867 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
12868
12869         * mem-break.c (enum bkpt_type): New.
12870         (struct breakpoint): New field `type'.
12871         (set_breakpoint_at): Change return type to struct breakpoint
12872         pointer.  Set type to `other_breakpoint' by default.
12873         (delete_breakpoint): Rewrite, supporting more than one breakpoint
12874         in the breakpoint list.
12875         (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12876         (reinsert_breakpoint): Rename to ...
12877         (reinsert_raw_breakpoint): ... this.
12878         (reinsert_breakpoints_at): Adjust.
12879         * mem-break.h (struct breakpoint): Declare.
12880         (set_breakpoint_at): Change return type to struct breakpoint
12881         pointer.
12882
12883 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
12884
12885         * server.c (handle_query): Assign, not compare.
12886
12887 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
12888
12889         Teach linux gdbserver to step-over-breakpoints.
12890
12891         * linux-low.c (can_hardware_single_step): New.
12892         (supports_breakpoints): New.
12893         (handle_extended_wait): If stopping threads, read the stop pc of
12894         the new cloned LWP.
12895         (get_pc): New.
12896         (get_stop_pc): Add `lwp' parameter.  Handle it.  Bail out if the
12897         low target doesn't support retrieving the PC.
12898         (add_lwp): Set last_resume_kind to resume_continue.
12899         (linux_attach_lwp_1): Adjust comments.  Always set stop_expected.
12900         (linux_attach): Don't clear stop_expected.  Set the lwp's
12901         last_resume_kind to resume_stop.
12902         (linux_detach_one_lwp): Don't check for removed breakpoints.
12903         (check_removed_breakpoint): Delete.
12904         (status_pending_p): Rename to ...
12905         (status_pending_p_callback): ... this.  Don't check for removed
12906         breakpoints.  Don't consider threads that are stopped from GDB's
12907         perspective.
12908         (linux_wait_for_lwp): Always read the stop_pc here.
12909         (cancel_breakpoint): New.
12910         (step_over_bkpt): New global.
12911         (linux_wait_for_event_1): Implement stepping over breakpoints.
12912         (gdb_wants_lwp_stopped): New.
12913         (gdb_wants_all_stopped): New.
12914         (linux_wait_1): Tag threads as gdb-wants-stopped.  Cancel finished
12915         single-step traps here.  Store the thread's last reported target
12916         wait status.
12917         (send_sigstop): Don't clear stop_expected.  Always set it,
12918         instead.
12919         (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12920         (cancel_finished_single_step): New.
12921         (cancel_finished_single_steps): New.
12922         (wait_for_sigstop): Don't cancel finished single-step traps here.
12923         (linux_resume_one_lwp): Don't check for removed breakpoints.
12924         Don't set `step' on non-hardware step archs.
12925         (linux_set_resume_request): Ignore resume_stop requests if already
12926         stopping or stopped.  Set the lwp's last_resume_kind.
12927         (resume_status_pending_p): Don't check for removed breakpoints.
12928         (need_step_over_p): New.
12929         (start_step_over): New.
12930         (finish_step_over): New.
12931         (linux_resume_one_thread): Always queue a sigstop for resume_stop
12932         requests.  Clear the thread's last reported target waitstatus.
12933         Don't use the `suspended' flag.  Don't consider pending breakpoints.
12934         (linux_resume): Start a step-over if necessary.
12935         (proceed_one_lwp): New.
12936         (proceed_all_lwps): New.
12937         (unstop_all_lwps): New.
12938         * linux-low.h (struct lwp_info): Rewrite comment for the
12939         `suspended' flag.  Add the `stop_pc' field.  Delete the
12940         `pending_stop_pc' field.  Tweak the `stepping' flag's comment.
12941         Add `'last_resume_kind' and `need_step_over' fields.
12942         * inferiors.c (struct thread_info): Delete, moved elsewhere.
12943         * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12944         Delete `breakpoint_to_reinsert' field.  New flag `inserted'.
12945         (set_raw_breakpoint_at): New.
12946         (set_breakpoint_at): Rewrite to use it.
12947         (reinsert_breakpoint_handler): Delete.
12948         (set_reinsert_breakpoint): New.
12949         (reinsert_breakpoint_by_bp): Delete.
12950         (delete_reinsert_breakpoints): New.
12951         (uninsert_breakpoint): Rewrite.
12952         (uninsert_breakpoints_at): New.
12953         (reinsert_breakpoint): Rewrite.
12954         (reinsert_breakpoints_at): New.
12955         (check_breakpoints): Rewrite.
12956         (breakpoint_here): New.
12957         (breakpoint_inserted_here): New.
12958         (check_mem_read): Adjust.
12959         * mem-break.h (breakpoints_supported, breakpoint_here)
12960         (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12961         (reinsert_breakpoint_by_bp): Delete declaration.
12962         (delete_reinsert_breakpoints): Declare.
12963         (reinsert_breakpoint): Delete declaration.
12964         (reinsert_breakpoints_at): Declare.
12965         (uninsert_breakpoint): Delete declaration.
12966         (uninsert_breakpoints_at): Declare.
12967         (check_breakpoints): Adjust prototype.
12968         * server.h: Adjust include order.
12969         (struct thread_info): Declare here.  Add a `last_status' field.
12970
12971 2010-03-23  Michael Snyder  <msnyder@vmware.com>
12972
12973         * server.c (crc32): New function.
12974         (handle_query): Add handling for 'qCRC:' request.
12975
12976 2010-03-23  Pedro Alves  <pedro@codesourcery.com>
12977
12978         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12979         lwp had been stopped by a watchpoint.
12980
12981 2010-03-16  Pedro Alves  <pedro@codesourcery.com>
12982
12983         * server.h (internal_error): Declare.
12984         (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12985         * utils.c (internal_error): New function.
12986
12987 2010-03-15  Andreas Schwab  <schwab@redhat.com>
12988
12989         * configure.srv: Fix typo setting srv_regobj.
12990
12991 2010-03-15  Pedro Alves  <pedro@codesourcery.com>
12992
12993         * linux-low.c (fetch_register): Avoid passing a non string literal
12994         format to `error'.
12995         (usr_store_inferior_registers): Ditto.
12996
12997 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
12998
12999         * linux-low.c (linux_write_memory): Bail out early if peeking
13000         memory failed.
13001
13002 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
13003
13004         * linux-low.h (struct lwp_info): New fields
13005         `stopped_by_watchpoint' and `stopped_data_address'.
13006         * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13007         here, and cache them in the lwp object.
13008         (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13009         directly.
13010         (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13011         field.
13012         (linux_stopped_by_watchpoint): Rewrite.
13013         (linux_stopped_data_address): Rewrite.
13014
13015 2010-03-06  Simo Melenius  <simo.melenius@iki.fi>
13016
13017         * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13018         switching the current inferior, not before.
13019
13020 2010-03-01  H.J. Lu  <hongjiu.lu@intel.com>
13021
13022         * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13023         reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13024         i386-linux.c and amd64-linux.c.
13025         (reg-i386.o): Removed.
13026         (reg-i386.c): Likewise.
13027         (reg-i386-linux.o): Likewise.
13028         (reg-i386-linux.c): Likewise.
13029         (reg-x86-64.o): Likewise.
13030         (reg-x86-64.c): Likewise.
13031         (reg-x86-64-linux.o): Likewise.
13032         (reg-x86-64-linux.c): Likewise.
13033         (i386.o): New.
13034         (i386.c): Likewise.
13035         (i386-linux.o): Likewise.
13036         (i386-linux.c): Likewise.
13037         (amd64.o): Likewise.
13038         (amd64.c): Likewise.
13039         (amd64-linux.o): Likewise.
13040         (amd64-linux.c): Likewise.
13041
13042         * configure.srv (srv_i386_regobj): New.
13043         (srv_i386_linux_regobj): Likewise.
13044         (srv_amd64_regobj): Likewise.
13045         (srv_amd64_linux_regobj): Likewise.
13046         (srv_i386_32bit_xmlfiles): Likewise.
13047         (srv_i386_64bit_xmlfiles): Likewise.
13048         (srv_i386_xmlfiles): Likewise.
13049         (srv_amd64_xmlfiles): Likewise.
13050         (srv_i386_linux_xmlfiles): Likewise.
13051         (srv_amd64_linux_xmlfiles): Likewise.
13052         (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj.  Set
13053         srv_xmlfiles to $srv_i386_xmlfiles.
13054         (i[34567]86-*-mingw32ce*): Likewise.
13055         (i[34567]86-*-mingw*): Likewise.
13056         (i[34567]86-*-nto*): Likewise.
13057         (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13058         and $srv_amd64_linux_regobj.  Set srv_xmlfiles to
13059         $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13060         (x86_64-*-linux*): Likewise.
13061
13062         * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13063         (init_registers_amd64_linux): New.
13064         (x86_arch_setup): Replace init_registers_x86_64_linux with
13065         init_registers_amd64_linux.
13066
13067 2010-02-23  Maxim Kuvyrkov  <maxim@codesourcery.com>
13068
13069         * configure.ac: Check for libdl.  If it is not available link against
13070         static libthread_db.
13071         * configure: Regenerate.
13072
13073 2010-02-22  Pedro Alves  <pedro@codesourcery.com>
13074
13075         PR9605
13076
13077         * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13078         handing a read watchpoint.
13079         (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13080
13081 2010-02-12  Doug Evans  <dje@google.com>
13082
13083         * linux-low.c (linux_supports_tracefork_flag): Document.
13084         (linux_look_up_symbols): Add comment.
13085
13086 2010-02-03  H.J. Lu  <hongjiu.lu@intel.com>
13087
13088         * regcache.c (supply_register): Clear regcache if buf is NULL.
13089
13090 2010-02-02  Nicolas Roche  <roche@sourceware.org>
13091             Joel Brobecker  <brobecker@adacore.com>
13092
13093         * inferiors.c (find_inferior): Add function documentation.
13094         (unloaded_dll): Handle the case where the unloaded dll has not
13095         been previously registered in the dll list.
13096
13097 2010-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
13098
13099         * linux-arm-low.c (thumb_breakpoint_len): Delete.
13100         (thumb2_breakpoint): New.
13101         (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13102
13103 2010-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
13104
13105         * linux-low.c (get_stop_pc): Check for SIGTRAP.
13106         (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13107         breakpoints.
13108
13109 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
13110
13111         * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13112
13113 2010-01-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13114
13115         * linux-s390-low.c (s390_collect_ptrace_register)
13116         (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13117
13118 2010-01-21  Doug Evans  <dje@google.com>
13119
13120         * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13121         (PTRACE_ARG4_TYPE): New macro.
13122         (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13123         (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13124         (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13125         (usr_store_inferior_registers): Ditto.
13126         (linux_read_memory, linux_write_memory): Ditto.
13127         (linux_test_for_tracefork): Ditto.
13128
13129         * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13130         Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13131
13132 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
13133
13134         * proc-service.c (ps_lgetregs): Don't refetch registers from the
13135         target.
13136
13137 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
13138
13139         * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13140         prototype to take a regcache.  Adjust.
13141
13142 2010-01-20  Pedro Alves  <pedro@codesourcery.com>
13143
13144         * regcache.h (struct thread_info): Forward declare.
13145         (struct regcache): New.
13146         (new_register_cache): Adjust prototype.
13147         (get_thread_regcache): Declare.
13148         (free_register_cache): Adjust prototype.
13149         (registers_to_string, registers_from_string): Ditto.
13150         (supply_register, supply_register_by_name, collect_register)
13151         (collect_register_as_string, collect_register_by_name): Ditto.
13152         * regcache.c (struct inferior_regcache_data): Delete.
13153         (get_regcache): Rename to ...
13154         (get_thread_regcache): ... this.  Adjust.  Switch inferior before
13155         fetching registers.
13156         (regcache_invalidate_one): Adjust.
13157         (regcache_invalidate): Fix prototype.
13158         (new_register_cache): Return the new register cache.
13159         (free_register_cache): Change prototype.
13160         (realloc_register_cache): Adjust.
13161         (registers_to_string): Change prototype to take a regcache.  Adjust.
13162         (registers_from_string): Ditto.
13163         (register_data): Ditto.
13164         (supply_register): Ditto.
13165         (supply_register_by_name): Ditto.
13166         (collect_register): Ditto.
13167         (collect_register_as_string): Ditto.
13168         (collect_register_by_name): Ditto.
13169         * server.c (process_serial_event): Adjust.
13170         * linux-low.h (regset_fill_func, regset_store_func): Change
13171         prototype.
13172         (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13173         Change prototype.
13174         * linux-low.c (get_stop_pc): Adjust.
13175         (check_removed_breakpoint): Adjust.
13176         (linux_wait_for_event): Adjust.
13177         (linux_resume_one_lwp): Adjust.
13178         (fetch_register): Add regcache parameter.  Adjust.
13179         (usr_store_inferior_registers): Ditto.
13180         (regsets_fetch_inferior_registers): Ditto.
13181         (regsets_store_inferior_registers): Ditto.
13182         (linux_fetch_registers, linux_store_registers): Ditto.
13183         * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13184         regcache.  Adjust.
13185         (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13186         Ditto.
13187         * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13188         prototype to take a regcache.
13189         (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13190         * remote-utils.c (convert_ascii_to_int, outreg)
13191         (prepare_resume_reply): Change prototype to take a regcache.
13192         Adjust.
13193         * target.h (struct target_ops) <fetch_registers, store_registers>:
13194         Change prototype to take a regcache.
13195         (fetch_inferior_registers, store_inferior_registers): Change
13196         prototype to take a regcache.  Adjust.
13197         * proc-service.c (ps_lgetregs): Adjust.
13198         * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13199         (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13200         (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13201         take a regcache.  Adjust.
13202         * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13203         (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13204         (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13205         (arm_breakpoint_at): Change prototype to take a regcache.  Adjust.
13206         * linux-cris-low.c (cris_get_pc, cris_set_pc)
13207         (cris_cannot_fetch_register):
13208         (cris_breakpoint_at): Change prototype to take a regcache.
13209         Adjust.
13210         * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13211         cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13212         to take a regcache.  Adjust.
13213         (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13214         Adjust.
13215         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13216         take a regcache.  Adjust.
13217         * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13218         (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13219         (m68k_set_pc): Change prototype to take a regcache.  Adjust.
13220         * linux-mips-low.c (mips_get_pc):
13221         (mips_set_pc): Change prototype to take a regcache.  Adjust.
13222         (mips_reinsert_addr): Adjust.
13223         (mips_collect_register): Change prototype to take a regcache.
13224         Adjust.
13225         (mips_supply_register):
13226         (mips_collect_register_32bit, mips_supply_register_32bit)
13227         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13228         (mips_store_fpregset): Ditto.
13229         * linux-ppc-low.c (ppc_supply_ptrace_register)
13230         (ppc_supply_ptrace_register): Ditto.
13231         (parse_spufs_run): Adjust.
13232         (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13233         (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13234         (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13235         take a regcache.  Adjust.
13236         * linux-s390-low.c (s390_collect_ptrace_register)
13237         (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13238         (s390_set_pc): Change prototype to take a regcache.  Adjust.
13239         (s390_arch_setup): Adjust.
13240         * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13241         (sh_fill_gregset): Change prototype to take a regcache.  Adjust.
13242         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13243         (sparc_fill_gregset, sparc_store_gregset_from_stack)
13244         (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13245         regcache.  Adjust.
13246         (sparc_breakpoint_at): Adjust.
13247         * linux-xtensa-low.c (xtensa_fill_gregset):
13248         (xtensa_store_gregset):
13249         (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13250         (xtensa_set_pc): Change prototype to take a regcache.  Adjust.
13251         * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13252         prototype to take a regcache.  Adjust.
13253         * win32-arm-low.c (arm_fetch_inferior_register)
13254         (arm_store_inferior_register): Change prototype to take a
13255         regcache.  Adjust.
13256         * win32-i386-low.c (i386_fetch_inferior_register)
13257         (i386_store_inferior_register): Change prototype to take a
13258         regcache.  Adjust.
13259         * win32-low.c (child_fetch_inferior_registers)
13260         (child_store_inferior_registers): Change prototype to take a
13261         regcache.  Adjust.
13262         (win32_wait): Adjust.
13263         (win32_fetch_inferior_registers): Change prototype to take a
13264         regcache.  Adjust.
13265         (win32_store_inferior_registers): Adjust.
13266         * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13267         store_inferior_register>: Change prototype to take a regcache.
13268
13269 2010-01-20  Doug Evans  <dje@google.com>
13270
13271         * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13272         #ifdef.
13273         (linux_wait_for_event1, linux_init_signals): Ditto.
13274         (W_STOPCODE): Provide definition if missing.
13275
13276 2010-01-13  Vladimir Prus  <vladimir@codesourcery.com>
13277
13278         * linux-low.c (linux_core_of_thread): New.
13279         (compare_ints, show_process, list_threads): New.
13280         (linux_qxfer_osdata): Report threads and cores.
13281         (linux_target_op): Register linux_core_of_thread.
13282         * remote-utils.c (prepare_resume_reply): Report the core.
13283         (buffer_xml_printf): Support %d specifier.
13284         * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13285         New.
13286         (handle_query): Handle qXfer:threads.  Announce availability
13287         thereof.
13288         * target.h (struct target_ops): New field core_of_thread.
13289
13290 2010-01-04  Ulrich Weigand  <uweigand@de.ibm.com>
13291
13292         * Makefile.in (clean): Remove new generated files.
13293         (reg-s390.o, reg-s390.c): Remove rules.
13294         (reg-s390x.o, reg-s390x.c): Likewise.
13295         (s390-linux32.o, s390-linux32.c): Add rules.
13296         (s390-linux64.o, s390-linux64.c): Likewise.
13297         (s390x-linux64.o, s390x-linux64.c): Likewise.
13298         * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13299         * linux-s390-low.c: Include <elf.h>.
13300         (HWCAP_S390_HIGH_GPRS): Define if undefined.
13301         (init_registers_s390): Remove prototype.
13302         (init_registers_s390x): Likewise.
13303         (init_registers_s390_linux32): Add prototype.
13304         (init_registers_s390_linux64): Likewise.
13305         (init_registers_s390x_linux64): Likewise.
13306         (s390_num_regs_3264): New define.
13307         (s390_regmap_3264): New global variable.
13308         (s390_cannot_fetch_register): Remove obsolete check.
13309         (s390_cannot_store_register): Likewise.
13310         (s390_collect_ptrace_register): Handle upper/lower register halves.
13311         (s390_supply_ptrace_register): Likewise.
13312         (s390_fill_gregset): Update to register number changes.
13313         (s390_get_hwcap): New routine.
13314         (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13315         Install appropriate regmap and register set.
13316
13317 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
13318
13319         * server.c (gdbserver_version): Update copyright year to 2010.
13320         * gdbreplay.c (gdbreplay_version): Likewise.
13321
13322 2009-12-28  Doug Evans  <dje@google.com>
13323
13324         * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13325         elf/external.h.  Include <elf.h> instead but only if necessary.
13326
13327 2009-12-28  Pedro Alves  <pedro@codesourcery.com>
13328
13329         * linux-low.c (linux_remove_process): Remove `detaching'
13330         parameter.  Don't release/detach from thread_db here.
13331         (linux_kill): Release/detach from thread_db here, ...
13332         (linux_detach): ... and here, before actually detaching.
13333         (linux_wait_1): ... and here, when a process exits.
13334         * thread-db.c (any_thread_of): New.
13335         (thread_db_free): Switch the current inferior to a thread of the
13336         passed in process.
13337
13338 2009-12-21  Doug Evans  <dje@google.com>
13339
13340         * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13341
13342         * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13343         Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13344         warning ifndef __NR_tkill.  Move setting of errno there too.
13345         Delete unnecessary resetting of errno after syscall.
13346         Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13347
13348         * configure.ac: Check for dladdr.
13349         * config.in: Regenerate.
13350         * configure: Regenerate.
13351         * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13352         (try_thread_db_load): Update.
13353
13354         * linux-low.c (my_waitpid): Delete unnecessary prototype.
13355
13356 2009-12-18  Doug Evans  <dje@google.com>
13357
13358         * event-loop.c: Include unistd.h if it exists.
13359
13360         * linux-low.c (my_waitpid): Move definition away from being in
13361         between linux_tracefork_child/linux_test_for_tracefork.
13362
13363         * gdb_proc_service.h (psaddr_t): Fix type.
13364         * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13365         signature to match glibc.
13366
13367 2009-12-16  Doug Evans  <dje@google.com>
13368
13369         * linux-low.c (linux_read_memory): Fix argument to read.
13370
13371 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
13372
13373         * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13374         events, don't leave current_inferior pointing at null.
13375
13376 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
13377
13378         * win32-low.c (LOG): Delete.
13379         (OUTMSG): Output to stderr.
13380         (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13381         on compile time LOG macro.
13382         (win32_wait): Fix debug output.
13383
13384 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
13385
13386         * win32-low.c (win32_add_one_solib): If the dll name is
13387         "ntdll.dll", prepend the system directory to the dll path.
13388
13389 2009-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
13390
13391         * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13392
13393 2009-11-17  Nathan Sidwell  <nathan@codesourcery.com>
13394             Vladimir Prus  <vladimir@codesourcery.com>
13395
13396         * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13397         * configure.ac: Check for __mcoldfire__ and set
13398         gdb_cv_m68k_is_coldfire.
13399         * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13400         reg-cf.o and reg-m68k.o.
13401         * configure: Regenerated.
13402
13403 2009-11-16  Pedro Alves  <pedro@codesourcery.com>
13404
13405         * linux-low.c (linux_remove_process): Add `detaching' parameter.
13406         Pass it to thread_db_free.
13407         (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13408         proper `detaching' argument to linux_remove_process.
13409         * linux-low.h (thread_db_free): Add `detaching' parameter.
13410         * thread-db.c (thread_db_init): Pass false as `detaching' argument
13411         to thread_db_free.
13412         (thread_db_free): Add `detaching' parameter.  Only
13413         call td_ta_clear_event if detaching from process.
13414
13415 2009-11-12  Maxim Kuvyrkov  <maxim@codesourcery.com>
13416
13417         * thread-db.c (thread_db_free): Fix typo.
13418
13419 2009-11-11  Paul Pluzhnikov  <ppluzhnikov@google.com>
13420
13421         PR gdb/10838
13422         * thread-db.c (thread_db_free): Call td_ta_clear_event.
13423
13424 2009-11-03  Nathan Sidwell  <nathan@codesourcery.com>
13425
13426         * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13427         with an i686 compiler.
13428         * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13429         needed.
13430         * configure: Rebuilt.
13431
13432 2009-10-29  Sandra Loosemore  <sandra@codesourcery.com>
13433
13434         PR gdb/10783
13435
13436         * server.c (handle_search_memory_1): Correct read_addr initialization
13437         in loop for searching subsequent chunks.
13438
13439 2009-10-29  Paul Pluzhnikov  <ppluzhnikov@google.com>
13440
13441         * configure.ac: New --with-libthread-db option.
13442         * thread-db.c: Allow direct dependence on libthread_db.
13443         (thread_db_free): Adjust.
13444         * config.in: Regenerate.
13445         * configure: Likewise.
13446
13447 2009-10-28  Paul Pluzhnikov  <ppluzhnikov@google.com>
13448
13449         PR gdb/10757
13450         * thread-db.c (attach_thread): New function.
13451         (maybe_attach_thread): Return success/failure.
13452         (find_new_threads_callback): Adjust.
13453         (thread_db_find_new_threads): Loop until no new threads.
13454
13455 2009-10-13  Pedro Alves  <pedro@codesourcery.com>
13456
13457         * proc-service.c (ps_lgetregs): Formatting.
13458
13459 2009-10-08  Paul Pluzhnikov  <ppluzhnikov@google.com>
13460
13461         * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13462         * configure.ac: Adjust.
13463         * linux-low.h (struct process_info_private): Move members to struct
13464         thread_db.
13465         (thread_db_free, thread_db_handle_monitor_command): New prototype.
13466         * linux-low.c (linux_remove_process): Adjust.
13467         (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13468         * server.c (handle_query): Move code ...
13469         (handle_monitor_command): ... here. New function.
13470         * target.h (struct target_ops): New member.
13471         * thread-db.c (struct thread_db): New.
13472         (libthread_db_search_path): New variable.
13473         (thread_db_create_event, thread_db_enable_reporting)
13474         (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13475         (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13476         (try_thread_db_load_1, dladdr_to_soname): New functions.
13477         (try_thread_db_load, thread_db_load_search): New functions.
13478         (thread_db_init): Search for libthread_db.
13479         (thread_db_free): New function.
13480         (thread_db_handle_monitor_command): Likewise.
13481         * config.in: Regenerate.
13482         * configure: Regenerate.
13483
13484 2009-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
13485
13486         * spu-low.c (spu_kill): Wait for inferior to terminate.
13487         Call clear_inferiors.
13488         (spu_detach): Call clear_inferiors.
13489
13490 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13491
13492         * aclocal.m4: Regenerate.
13493         * config.in: Likewise.
13494         * configure: Likewise.
13495
13496 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
13497
13498         * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13499         (parse_spufs_run): New function.
13500         (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13501         (ppc_breakpoint_at): Handle SPU breakpoints.
13502
13503 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
13504
13505         * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13506         (SPUFS_MAGIC): Define.
13507         (spu_enumerate_spu_ids): New function.
13508         (linux_qxfer_spu): New function.
13509         (linux_target_ops): Install linux_qxfer_spu.
13510
13511 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
13512
13513         * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13514         and powerpc-cell64l.o to srv_regobj.  Add rs6000/powerpc-cell32l.xml
13515         and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13516         * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13517         (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13518         (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13519         * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13520         (init_registers_powerpc_cell32l): Add prototype.
13521         (init_registers_powerpc_cell64l): Likewise.
13522         (ppc_arch_setup): Detect Cell/B.E. architecture.
13523
13524 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13525
13526         * Makefile.in (datarootdir): New variable.
13527
13528 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
13529
13530         * linux-low.c (linux_write_memory): Update debugging output.
13531         * Makefile.in (clean): Add new descriptions.
13532         (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13533         (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13534         * configure.srv: Add new files for arm*-*-linux*.
13535         * linux-arm-low.c: Add new declarations.
13536         (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13537         (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13538         (HWCAP_VFPv3D16): New.
13539         (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13540         instead of __IWMMXT__.
13541         (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13542         (arm_arch_setup): New.
13543         (target_regsets): Remove #ifdef.  Add VFP regset.
13544         (the_low_target): Use arm_arch_setup.
13545
13546 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
13547
13548         * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13549         the main thread again.
13550
13551 2009-07-06  Aleksandar Ristovski  <aristovski@qnx.com>
13552
13553         Adding Neutrino gdbserver.
13554         * configure: Regenerated.
13555         * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13556         * configure.srv (i[34567]86-*-nto*): New target.
13557         * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13558         * remote-utils.c [__QNX__]: Include sys/iomgr.h
13559         (nto_comctrl) [__QNX__]: New function.
13560         (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13561
13562 2009-07-05  Danny Backx  <dannybackx@users.sourceforge.net>
13563
13564         * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13565         srv_tgtobj.
13566
13567 2009-07-04  Danny Backx  <dannybackx@users.sourceforge.net>
13568             Pedro Alves  <pedro@codesourcery.com>
13569
13570         * win32-i386-low.c (i386_get_thread_context): Handle systems that
13571         don't support CONTEXT_EXTENDED_REGISTERS.
13572         (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13573         (the_low_target): Install them.
13574         * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13575         failing with ERROR_PIPE_NOT_CONNECTED.
13576
13577 2009-06-30  Doug Evans  <dje@google.com>
13578             Pierre Muller  <muller@ics.u-strasbg.fr>
13579
13580         Add h/w watchpoint support to x86-linux, win32-i386.
13581         * Makefile.in (SFILES): Add i386-low.c
13582         (i386_low_h): Define.
13583         (i386-low.o): Add dependencies.
13584         (linux-x86-low.o): Add i386-low.h dependency.
13585         (win32-i386-low.o): Ditto.
13586         * i386-low.c: New file.
13587         * i386-low.h: New file.
13588         * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13589         (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13590         * linux-low.c (linux_add_process): Initialize arch_private.
13591         (linux_remove_process): Free arch_private.
13592         (add_lwp): Initialize arch_private.
13593         (delete_lwp): Free arch_private.
13594         (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13595         provided.
13596         * linux-low.h (process_info_private): New member arch_private.
13597         (lwp_info): New member arch_private.
13598         (linux_target_ops): New members new_process, new_thread,
13599         prepare_to_resume.
13600         (ptid_of): New macro.
13601         * linux-x86-low.c: Include stddef.h, i386-low.h.
13602         (arch_process_info): New struct.
13603         (arch_lwp_info): New struct.
13604         (x86_linux_dr_get, x86_linux_dr_set): New functions.
13605         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13606         (i386_dr_low_get_status): New function.
13607         (x86_insert_point, x86_remove_point): New functions.
13608         (x86_stopped_by_watchpoint): New function.
13609         (x86_stopped_data_address): New function.
13610         (x86_linux_new_process, x86_linux_new_thread): New functions.
13611         (x86_linux_prepare_to_resume): New function.
13612         (the_low_target): Add entries for insert_point, remove_point,
13613         stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13614         prepare_to_resume.
13615         * server.c (debug_hw_points): New global.
13616         (monitor_show_help): Document set debug-hw-points.
13617         (handle_query): Process "set debug-hw-points".
13618         * server.h (debug_hw_points): Declare.
13619         (paddress): Declare.
13620         * utils.c (NUMCELLS, CELLSIZE): New macros.
13621         (get_sell, xsnprintf, paddress): New functions.
13622         * win32-arm-low.c (the_low_target): Add entries for insert_point,
13623         remove_point, stopped_by_watchpoint, stopped_data_address.
13624         * win32-i386-low.c: Include i386-low.h.
13625         (debug_reg_state): Replaces dr.
13626         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13627         (i386_dr_low_get_status): New function.
13628         (i386_insert_point, i386_remove_point): New functions.
13629         (i386_stopped_by_watchpoint): New function.
13630         (i386_stopped_data_address): New function.
13631         (i386_initial_stuff): Update.
13632         (get_thread_context,set_thread_context,i386_thread_added): Update.
13633         (the_low_target): Add entries for insert_point,
13634         remove_point, stopped_by_watchpoint, stopped_data_address.
13635         * win32-low.c (win32_insert_watchpoint): New function.
13636         (win32_remove_watchpoint): New function.
13637         (win32_stopped_by_watchpoint): New function.
13638         (win32_stopped_data_address): New function.
13639         (win32_target_ops): Add entries for insert_watchpoint,
13640         remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13641         * win32-low.h (win32_target_ops): New members insert_point,
13642         remove_point, stopped_by_watchpoint, stopped_data_address.
13643
13644 2009-06-25  Pedro Alves  <pedro@codesourcery.com>
13645
13646         * server.c (process_serial_event): Re-return unsupported, not
13647         error, if the type isn't recognized.  Re-allow supporting only
13648         insert or remove packets.  Also call require_running for
13649         breakpoints.  Add missing break statement to default case.  Tidy.
13650         * target.h (struct target_ops): Rename insert_watchpoint to
13651         insert_point, and remove_watchpoint to remove_point.
13652
13653         * linux-low.h (struct linux_target_ops): Likewise.
13654         * linux-low.c (linux_insert_watchpoint): Rename to ...
13655         (linux_insert_point): ... this.  Adjust.
13656         (linux_remove_watchpoint): Rename to ...
13657         (linux_remove_point): ... this.  Adjust.
13658         (linux_target_ops): Adjust.
13659         * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13660         (cris_insert_point): ... this.
13661         (cris_remove_watchpoint): Rename to ...
13662         (cris_remove_point): ... this.
13663         (the_low_target): Adjust.
13664
13665 2009-06-24  Pierre Muller  <muller@ics.u-strasbg.fr>
13666
13667         * server.c (handle_v_kill): Pass signal_pid to
13668         kill_inferior if multi_process is zero.
13669
13670 2009-06-23  Aleksandar Ristovski  <aristovski@qnx.com>
13671
13672         * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13673         * target.h (target_ops): Comment for *_watchpoint to make it clear
13674         the functions can get types '0' and '1'.
13675
13676 2009-06-22  Aleksandar Ristovski  <aristovski@qnx.com>
13677
13678         * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13679         * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13680         * regcache.c (get_regcache): Likewise.
13681         * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13682         * win32-low.c (child_fetch_inferior_registers): Remove check for
13683         regno 0.
13684
13685 2009-06-19  Aleksandar Ristovski  <aristovski@qnx.com>
13686             Pedro Alves <pedro@codesourcery.com>
13687
13688         * target.h (struct target_ops) <supports_multi_process>: New
13689         callback.
13690         (target_supports_multi_process): New.
13691         * server.c (handle_query): Even if GDB reports support, only
13692         enable multi-process if the target also supports it.  Report
13693         multi-process support only if the target backend supports it.
13694         * linux-low.c (linux_supports_multi_process): New function.
13695         (linux_target_ops): Install it as target_supports_multi_process
13696         callback.
13697
13698 2009-05-24  Doug Evans  <dje@google.com>
13699
13700         Global renaming of find_thread_pid to find_thread_ptid.
13701         * server.h (find_thread_ptid): Renamed from find_thread_pid.
13702         * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13703         All callers updated.
13704
13705         * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13706         to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13707         directly.
13708
13709         * linux-low.c (get_stop_pc): Print pc if debug_threads.
13710         (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13711         (linux_resume_one_lwp): Ditto.
13712
13713 2009-05-23  Doug Evans  <dje@google.com>
13714
13715         * linux-low.c (linux_resume_one_lwp): Change type of first arg
13716         from struct inferior_list_entry * to struct lwp_info *.
13717         All callers updated.
13718
13719 2009-05-13  Doug Evans  <dje@google.com>
13720
13721         * linux-x86-low.c: Don't include assert.h.
13722         (x86_siginfo_fixup): Use fatal, not assert.
13723         (x86_arch_setup): Fix comment.
13724
13725 2009-05-12  Doug Evans  <dje@google.com>
13726
13727         Biarch support for i386/amd64 gdbserver.
13728         * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13729         Add linux-x86-low.c.
13730         (linux-i386-low.o, linux-x86-64-low.o): Delete.
13731         (linux-x86-low.o): Add.
13732         * linux-x86-64-low.c: Delete.
13733         * linux-i386-low.c: Delete.
13734         * linux-x86-low.c: New file.
13735         * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13736         linux-x86-low.o.
13737         (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13738         linux-x86-low.o.
13739         (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13740         * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13741         (linux_child_pid_to_exec_file): New function.
13742         (elf_64_header_p, elf_64_file_p): New functions.
13743         (siginfo_fixup): New function.
13744         (linux_xfer_siginfo): New local inf_siginfo.  Call siginfo_fixup to
13745         give target a chance to convert layout.
13746         * linux-low.h (linux_target_ops): New member siginfo_fixup.
13747         (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13748
13749 2009-05-07  Doug Evans  <dje@google.com>
13750
13751         * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13752         (regsets_store_inferior_registers): Ditto.
13753
13754 2009-05-06  Pedro Alves  <pedro@codesourcery.com>
13755
13756         PR server/10048
13757
13758         * linux-low.c (must_set_ptrace_flags): Delete.
13759         (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13760         of the global.
13761         (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here.  Set
13762         `lwp->must_set_ptrace_flags' instead.
13763         (linux_wait_for_event_1): Set ptrace options here.
13764         (linux_wait_1): ... not here.
13765
13766 2009-04-30  Doug Evans  <dje@google.com>
13767
13768         * inferiors.c (started_inferior_callback): New function.
13769         (attached_inferior_callback): New function.
13770         (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13771         * server.c (print_started_pid, print_attached_pid): New functions.
13772         (detach_or_kill_for_exit): New function.
13773         (main): Call it instead of for_each_inferior (kill_inferior_callback).
13774         * server.h (have_started_inferiors_p): Declare.
13775         (have_attached_inferiors_p): Declare.
13776
13777         * inferiors.c (remove_process): Fix memory leak, free process.
13778         * linux-low.c (linux_remove_process): New function.
13779         (linux_kill): Call it instead of remove_process.
13780         (linux_detach, linux_wait_1): Ditto.
13781
13782 2009-04-19  Danny Backx  <dannybackx@users.sourceforge.net>
13783
13784         * configure.srv: Add x86 Windows CE target.
13785
13786 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
13787
13788         * inferiors.c (get_thread_process): Make global.
13789         * server.h (get_thread_process): Add prototype.
13790         * thread-db.c (find_one_thread): Use get_thread_process
13791         instead of current_process.
13792         (thread_db_get_tls_address): Do not crash if called when
13793         thread layer is not yet initialized.
13794
13795 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
13796
13797         * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13798         * spu-low.c (current_tid): Rename to ...
13799         (current_ptid): ... this.
13800         (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13801         spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13802         ptid_get_lwp (current_ptid) instead of current_tid.
13803         (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13804         instead of current_tid.  Use find_process_pid to verify pid
13805         argument is valid.  Pass proper argument to remove_process.
13806         (spu_thread_alive): Compare current_ptid instead of current_tid.
13807         (spu_resume): Likewise.
13808
13809 2009-04-02  Pedro Alves  <pedro@codesourcery.com>
13810
13811         * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13812         variable.
13813
13814 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
13815
13816         Implement the multiprocess extensions, and add linux multiprocess
13817         support.
13818
13819         * server.h (ULONGEST): Declare.
13820         (struct ptid, ptid_t): New.
13821         (minus_one_ptid, null_ptid): Declare.
13822         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13823         (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13824         (struct inferior_list_entry): Change `id' type from unsigned from
13825         to ptid_t.
13826         (struct sym_cache, struct breakpoint, struct
13827         process_info_private): Forward declare.
13828         (struct process_info): Declare.
13829         (current_process): Declare.
13830         (all_processes): Declare.
13831         (initialize_inferiors): Declare.
13832         (add_thread): Adjust to use ptid_t.
13833         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13834         (add_process, remove_process, find_thread_pid): Declare.
13835         (find_inferior_id): Adjust to use ptid_t.
13836         (cont_thread, general_thread, step_thread): Change type to ptid_t.
13837         (multi_process): Declare.
13838         (push_event): Adjust to use ptid_t.
13839         (read_ptid, write_ptid): Declare.
13840         (prepare_resume_reply): Adjust to use ptid_t.
13841         (clear_symbol_cache): Declare.
13842         * inferiors.c (all_processes): New.
13843         (null_ptid, minus_one_ptid): New.
13844         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13845         (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13846         (add_thread): Change unsigned long to ptid.  Remove gdb_id
13847         parameter.  Adjust.
13848         (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13849         (gdb_id_to_thread): Rename to ...
13850         (find_thread_pid): ... this.  Change unsigned long to ptid.
13851         (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13852         (loaded_dll, pull_pid_from_list): Adjust.
13853         (add_process, remove_process, find_process_pid)
13854         (get_thread_process, current_process, initialize_inferiors): New.
13855         * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13856         (struct target_waitstatus) <related_pid>: Ditto.
13857         (struct target_ops) <kill, detach>: Add `pid' argument.  Change
13858         return type to int.
13859         (struct target_ops) <join>: Add `pid' argument.
13860         (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13861         (struct target_ops) <wait>: Add `ptid' field.  Change return type
13862         to ptid.
13863         (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13864         (mywait): Add `ptid' argument.  Change return type to ptid_t.
13865         (target_pid_to_str): Declare.
13866         * target.c (set_desired_inferior): Adjust to use ptids.
13867         (mywait): Add new `ptid' argument.  Adjust.
13868         (target_pid_to_str): New.
13869         * mem-break.h (free_all_breakpoints): Declare.
13870         * mem-break.c (breakpoints): Delelete.
13871         (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13872         (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13873         to use per-process breakpoint list.
13874         (free_all_breakpoints): New.
13875         * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13876         (symbol_cache, all_symbols_looked_up): Delete.
13877         (hexchars): New.
13878         (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13879         read_ptid): New.
13880         (prepare_resume_reply): Change ptid argument's type from unsigned
13881         long to ptid_t.  Adjust.  Implement W;process and X;process.
13882         (free_sym_cache, clear_symbol_cache): New.
13883         (look_up_one_symbol): Adjust to per-process symbol cache.  *
13884         * server.c (cont_thread, general_thread, step_thread): Change type
13885         to ptid_t.
13886         (attached): Delete.
13887         (multi_process): New.
13888         (last_ptid): Change type to ptid_t.
13889         (struct vstop_notif) <ptid>: Change type to ptid_t.
13890         (queue_stop_reply, push_event): Change `ptid' argument's type to
13891         ptid_t.
13892         (discard_queued_stop_replies): Add `pid' argument.
13893         (start_inferior): Adjust to use ptids.  Adjust to mywait interface
13894         changes.  Don't reference the `attached' global.
13895         (attach_inferior): Adjust to mywait interface changes.
13896         (handle_query): Adjust to use ptids.  Parse GDB's qSupported
13897         features.  Handle and report "multiprocess+".  Handle
13898         "qAttached:PID".
13899         (handle_v_cont): Adjust to use ptids.  Adjust to mywait interface
13900         changes.
13901         (handle_v_kill): New.
13902         (handle_v_stopped): Adjust to use target_pid_to_str.
13903         (handle_v_requests): Allow multiple attaches and runs when
13904         multiprocess extensions are in effect.  Handle "vKill".
13905         (myresume): Adjust to use ptids.
13906         (queue_stop_reply_callback): Add `arg' parameter.  Handle it.
13907         (handle_status): Adjust to discard_queued_stop_replies interface
13908         change.
13909         (first_thread_of, kill_inferior_callback)
13910         (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13911         (main): Call initialize_inferiors.  Adjust to use ptids, killing
13912         and detaching from all inferiors.  Handle multiprocess packet
13913         variants.
13914         * linux-low.h: Include gdb_proc_service.h.
13915         (struct process_info_private): New.
13916         (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13917         <lwpid_of>: Use ptid_get_lwp.
13918         (get_lwp_thread): Adjust.
13919         (struct lwp_info): Add `dead' member.
13920         (find_lwp_pid): Declare.
13921         * linux-low.c (thread_db_active): Delete.
13922         (new_inferior): Adjust comment.
13923         (inferior_pid): Delete.
13924         (linux_add_process): New.
13925         (handle_extended_wait): Adjust.
13926         (add_lwp): Change unsigned long to ptid.
13927         (linux_create_inferior): Add process to processes table.  Adjust
13928         to use ptids.  Don't set new_inferior here.
13929         (linux_attach_lwp): Rename to ...
13930         (linux_attach_lwp_1): ... this.  Add `initial' argument.  Handle
13931         it.  Adjust to use ptids.
13932         (linux_attach_lwp): New.
13933         (linux_attach): Add process to processes table.  Don't set
13934         new_inferior here.
13935         (struct counter): New.
13936         (second_thread_of_pid_p, last_thread_of_process_p): New.
13937         (linux_kill_one_lwp): Add `args' parameter.  Handle it.  Adjust to
13938         multiple processes.
13939         (linux_kill): Add `pid' argument.  Handle it.  Adjust to multiple
13940         processes.  Remove process from process table.
13941         (linux_detach_one_lwp): Add `args' parameter.  Handle it.  Adjust
13942         to multiple processes.
13943         (any_thread_of): New.
13944         (linux_detach): Add `pid' argument, and handle it.  Remove process
13945         from processes table.
13946         (linux_join): Add `pid' argument.  Handle it.
13947         (linux_thread_alive): Change unsighed long argument to ptid_t.
13948         Consider dead lwps as not being alive.
13949         (status_pending_p): Rename `dummy' argument to `arg'.  Filter out
13950         threads we're not interested in.
13951         (same_lwp, find_lwp_pid): New.
13952         (linux_wait_for_lwp): Change `pid' argument's type from int to
13953         ptid_t.  Adjust.
13954         (linux_wait_for_event): Rename to ...
13955         (linux_wait_for_event_1): ... this.  Change `pid' argument's type
13956         from int to ptid_t.  Adjust.
13957         (linux_wait_for_event): New.
13958         (linux_wait_1): Add `ptid' argument.  Change return type to
13959         ptid_t.  Adjust.  Use last_thread_of_process_p.  Remove processes
13960         that exit from the process table.
13961         (linux_wait): Add `ptid' argument.  Change return type to ptid_t.
13962         Adjust.
13963         (mark_lwp_dead): New.
13964         (wait_for_sigstop): Adjust to use ptids.  If a process exits while
13965         stopping all threads, mark its main lwp as dead.
13966         (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13967         ptids.
13968         (fetch_register, usr_store_inferior_registers)
13969         (regsets_fetch_inferior_registers)
13970         (regsets_store_inferior_registers, linux_read_memory)
13971         (linux_write_memory): Inline `inferior_pid'.
13972         (linux_look_up_symbols): Adjust to use per-process
13973         `thread_db_active'.
13974         (linux_request_interrupt): Adjust to use ptids.
13975         (linux_read_auxv): Inline `inferior_pid'.
13976         (initialize_low): Don't reference thread_db_active.
13977         * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13978         * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13979         (ps_getpid): Return the pid of the current inferior.
13980         * thread-db.c (proc_handle, thread_agent): Delete.
13981         (thread_db_create_event, thread_db_enable_reporting): Adjust to
13982         per-process data.
13983         (find_one_thread): Change argument type to ptid_t.  Adjust to
13984         per-process data.
13985         (maybe_attach_thread): Adjust to per-process data and ptids.
13986         (thread_db_find_new_threads): Ditto.
13987         (thread_db_init): Ditto.
13988         * spu-low.c (spu_create_inferior, spu_attach): Add process to
13989         processes table.  Adjust to use ptids.
13990         (spu_kill, spu_detach): Adjust interface.  Remove process from
13991         processes table.
13992         (spu_join, spu_thread_alive): Adjust interface.
13993         (spu_wait): Adjust interface.  Remove process from processes
13994         table.  Adjust to use ptids.
13995         * win32-low.c (current_inferior_tid): Delete.
13996         (current_inferior_ptid): New.
13997         (debug_event_ptid): New.
13998         (thread_rec): Take a ptid.  Adjust.
13999         (child_add_thread): Add `pid' argument.  Adjust to use ptids.
14000         (child_delete_thread): Ditto.
14001         (do_initial_child_stuff): Add `attached' argument.  Add process to
14002         processes table.
14003         (child_fetch_inferior_registers, child_store_inferior_registers):
14004         Adjust.
14005         (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14006         (win32_attach): Pass 1 to do_initial_child_stuff.
14007         (win32_kill): Adjust interface.  Remove process from processes
14008         table.
14009         (win32_detach): Ditto.
14010         (win32_join): Adjust interface.
14011         (win32_thread_alive): Take a ptid.
14012         (win32_resume): Adjust to use ptids.
14013         (get_child_debug_event): Ditto.
14014         (win32_wait): Adjust interface.  Remove exiting process from
14015         processes table.
14016
14017 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
14018
14019         Non-stop mode support.
14020
14021         * server.h (non_stop): Declare.
14022         (gdb_client_data, handler_func): Declare.
14023         (delete_file_handler, add_file_handler, start_event_loop):
14024         Declare.
14025         (handle_serial_event, handle_target_event, push_event)
14026         (putpkt_notif): Declare.
14027         * target.h (enum resume_kind): New.
14028         (struct thread_resume): Replace `step' field by `kind' field.
14029         (TARGET_WNOHANG): Define.
14030         (struct target_ops) <wait>: Add `options' argument.
14031         <supports_non_stop, async, start_non_stop>: New fields.
14032         (target_supports_non_stop, target_async): New.
14033         (start_non_stop): Declare.
14034         (mywait): Add `options' argument.
14035         * target.c (mywait): Add `options' argument.  Print child exit
14036         notifications here.
14037         (start_non_stop): New.
14038         * server.c (non_stop, own_buf, mem_buf): New globals.
14039         (struct vstop_notif): New.
14040         (notif_queue): New global.
14041         (queue_stop_reply, push_event, discard_queued_stop_replies)
14042         (send_next_stop_reply): New.
14043         (start_inferior): Adjust to use resume_kind.  Adjust to mywait
14044         interface changes.
14045         (attach_inferior): In non-stop mode, don't wait for the target
14046         here.
14047         (handle_general_set): Handle QNonStop.
14048         (handle_query): When handling qC, return the current general
14049         thread, instead of the first thread of the list.
14050         (handle_query): If the backend supports non-stop mode, include
14051         QNonStop+ in the qSupported query response.
14052         (handle_v_cont): Adjust to use resume_kind.  Handle resume_stop
14053         and non-stop mode.
14054         (handle_v_attach, handle_v_run): Handle non-stop mode.
14055         (handle_v_stopped): New.
14056         (handle_v_requests): Report support for vCont;t.  Handle vStopped.
14057         (myresume): Adjust to use resume_kind.  Handle non-stop.
14058         (queue_stop_reply_callback): New.
14059         (handle_status): Handle non-stop mode.
14060         (main): Clear non_stop flag on reconnection.  Use the event-loop.
14061         Refactor serial protocol handling from here ...
14062         (process_serial_event): ... to this new function.  When GDB
14063         selects any thread, select one here.  In non-stop mode, wait until
14064         GDB acks all pending events before exiting.
14065         (handle_serial_event, handle_target_event): New.
14066         * remote-utils.c (remote_open): Install remote_desc in the event
14067         loop.
14068         (remote_close): Remove remote_desc from the event loop.
14069         (putpkt_binary): Rename to...
14070         (putpkt_binary_1): ... this.  Add `is_notic' argument.  Handle it.
14071         (putpkt_binary): New as wrapper around putpkt_binary_1.
14072         (putpkt_notif): New.
14073         (prepare_resume_reply): In non-stop mode, don't change the
14074         general_thread.
14075         * event-loop.c: New.
14076         * Makefile.in (OBJ): Add event-loop.o.
14077         (event-loop.o): New rule.
14078
14079         * linux-low.h (pid_of): Moved here.
14080         (lwpid_of): New.
14081         (get_lwp_thread): Use lwpid_of.
14082         (struct lwp_info): Delete `lwpid' field.  Add `suspended' field.
14083         * linux-low.c (pid_of): Delete.
14084         (inferior_pid): Use lwpid_of.
14085         (linux_event_pipe): New.
14086         (target_is_async_p): New.
14087         (delete_lwp): New.
14088         (handle_extended_wait): Use lwpid_of.
14089         (add_lwp): Don't set lwpid field.
14090         (linux_attach_lwp): Adjust debug output.  Use lwpid_of.
14091         (linux_kill_one_lwp): If killing a running lwp, stop it first.
14092         Use lwpid_of.  Adjust to linux_wait_for_event interface changes.
14093         (linux_detach_one_lwp): If detaching from a running lwp, stop it
14094         first.  Adjust to linux_wait_for_event interface changes.  Use
14095         lwpid_of.
14096         (linux_detach): Don't delete the main lwp here.
14097         (linux_join): Use my_waitpid.  Avoid signal_pid.  Use lwpid_of.
14098         (status_pending_p): Don't consider explicitly suspended lwps.
14099         (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14100         pointer.  Add OPTIONS argument.  Change return type to int.  Use
14101         my_waitpid instead of sleeping.  Handle WNOHANG.  Use lwpid_of.
14102         (linux_wait_for_event): Take an integer pid instead of a lwp_info
14103         pointer.  Add status pointer argument.  Return a pid instead of a
14104         status.  Use lwpid_of.  Adjust to linux_wait_for_lwp interface
14105         changes.  In non-stop mode, don't switch to a random thread.
14106         (linux_wait): Rename to...
14107         (linux_wait_1): ... this.  Add target_options argument, and handle
14108         it.  Adjust to use resume_kind.  Use lwpid_of.  In non-stop mode,
14109         don't handle the continue thread.  Handle TARGET_WNOHANG.  Merge
14110         clean exit and signal exit code.  Don't stop all threads in
14111         non-stop mode.  In all-stop mode, only stop all threads when
14112         reporting a stop to GDB.  Handle explicit thread stop requests.
14113         (async_file_flush, async_file_mark): New.
14114         (linux_wait): New.
14115         (send_sigstop): Use lwpid_of.
14116         (wait_for_sigstop): Use lwpid_of.  Adjust to linux_wait_for_event
14117         interface changes.  In non-stop mode, don't switch to a random
14118         thread.
14119         (linux_resume_one_lwp): Use lwpid_of.
14120         (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14121         (linux_resume_one_thread): ... this.  Handle resume_stop.  In
14122         non-stop mode, don't look for pending flag in all threads.
14123         (resume_status_pending_p): Don't consider explicitly suspended
14124         threads.
14125         (my_waitpid): Reimplement.  Emulate __WALL.
14126         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14127         Use lwpid_of.
14128         (sigchld_handler, linux_supports_non_stop, linux_async)
14129         (linux_start_non_stop): New.
14130         (linux_target_ops): Register linux_supports_non_stop, linux_async
14131         and linux_start_non_stop.
14132         (initialize_low): Install SIGCHLD handler.
14133         * thread-db.c (thread_db_create_event, find_one_thread)
14134         (thread_db_get_tls_address): Use lwpid_of.
14135         * win32-low.c (win32_detach): Adjust to use resume_kind.
14136         (win32_wait): Add `options' argument.
14137         * spu-low.c (spu_resume): Adjust to use resume_kind.
14138         (spu_wait): Add `options' argument.
14139
14140 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
14141
14142         Decouple target code from remote protocol.
14143
14144         * target.h (enum target_waitkind): New.
14145         (struct target_waitstatus): New.
14146         (struct target_ops) <wait>: Return an unsigned long.  Take a
14147         target_waitstatus pointer instead of a char pointer.
14148         (mywait): Likewise.
14149         * target.c (mywait): Change prototype to return an unsigned long.
14150         Take a target_waitstatus pointer instead of a char pointer.  Adjust.
14151         * server.h (thread_from_wait, old_thread_from_wait): Delete
14152         declarations.
14153         (prepare_resume_reply): Change prototype to take a
14154         target_waitstatus.
14155         * server.c (thread_from_wait, old_thread_from_wait): Delete.
14156         (last_status, last_ptid): New.
14157         (start_inferior): Remove "statusptr" argument.  Adjust.  Return a
14158         pid instead of a signal.
14159         (attach_inferior): Remove "status" and "signal" parameters.
14160         Adjust.
14161         (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14162         not as an address.
14163         (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14164         (handle_v_requests, myresume): Remove "status" and "signal"
14165         parameters.  Adjust.
14166         (handle_status): New.
14167         (main): Delete local `status'.  Adjust.
14168         * remote-utils.c: Include target.h.
14169         (prepare_resume_reply): Change prototype to take a
14170         target_waitstatus.  Adjust.
14171
14172         * linux-low.c (linux_wait): Adjust to new target_ops->wait
14173         interface.
14174         * spu-low.c (spu_wait): Adjust.
14175         * win32-low.c (enum target_waitkind, struct target_waitstatus):
14176         Delete.
14177         (win32_wait): Adjust.
14178
14179 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
14180
14181         * target.h (struct thread_resume): Delete leave_stopped member.
14182         (struct target_ops): Add a `n' argument to the `resume' callback.
14183         * server.c (start_inferior): Adjust.
14184         (handle_v_cont, myresume): Adjust.
14185         * linux-low.c (check_removed_breakpoint): Adjust to resume
14186         interface change, and to removed leave_stopped field.
14187         (resume_ptr): Delete.
14188         (struct thread_resume_array): New.
14189         (linux_set_resume_request): Add new `arg' parameter.  Adjust to
14190         resume interface change.
14191         (linux_continue_one_thread, linux_queue_one_thread)
14192         (resume_status_pending_p): Check if the resume field is NULL
14193         instead of checking the leave_stopped member.
14194         (linux_resume): Adjust to the target resume interface change.
14195         * spu-low.c (spu_resume): Adjust to the target resume interface
14196         change.
14197         * win32-low.c (win32_detach, win32_resume): Ditto.
14198
14199 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
14200
14201         * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14202         flag.
14203         (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14204         pending.
14205         (linux_continue_one_thread): Only preserve the stepping flag if
14206         there's a pending breakpoint.
14207
14208 2009-03-31  Pedro Alves  <pedro@codesourcery.com>
14209
14210         * server.c (main): After the inferior having exited, call
14211         remote_close before exiting gdbserver.
14212
14213 2009-03-25  Thiago Jung Bauermann  <bauerman@br.ibm.com>
14214
14215         Fix size of FPSCR in Power 7 processors.
14216         * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14217         (PPC_FEATURE_HAS_DFP): New #define.
14218         (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14219         size of the FPSCR.
14220
14221 2009-03-23  Pedro Alves  <pedro@codesourcery.com>
14222
14223         * server.c (handle_query) Whitespace and formatting.
14224
14225 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
14226
14227         * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14228         linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14229         linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14230         linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14231         regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14232         thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14233         Makefile.in, configure.ac: Fix whitespace throughout.
14234         * configure: Regenerate.
14235
14236 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
14237
14238         * inferiors.c (find_inferior): Make it safe for the callback
14239         function to delete the currently iterated inferior.
14240
14241 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
14242
14243         * Makefile.in (linuw_low_h): Move higher.
14244         (thread-db.o): Depend on $(linux_low_h).
14245
14246 2009-03-17  Pedro Alves  <pedro@codesourcery.com>
14247
14248         Rename "process" to "lwp" throughout.
14249
14250         * linux-low.c (all_processes): Rename to...
14251         (all_lwps): ... this.
14252         (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14253         (add_process): Rename to ...
14254         (add_lwp): ... this.  Adjust.
14255         (linux_create_inferior): Adjust.
14256         (linux_attach_lwp): Adjust.
14257         (linux_attach): Adjust.
14258         (linux_kill_one_process): Rename to ...
14259         (linux_kill_one_lwp): ... this.  Adjust.
14260         (linux_kill): Adjust.
14261         (linux_detach_one_process): Rename to ...
14262         (linux_detach_one_lwp): ... this.  Adjust.
14263         (linux_detach): Adjust.
14264         (check_removed_breakpoint): Adjust.
14265         (status_pending_p): Adjust.
14266         (linux_wait_for_process): Rename to ...
14267         (linux_wait_for_lwp): ... this.  Adjust.
14268         (linux_wait_for_event): Adjust.
14269         (send_sigstop): Adjust.
14270         (wait_for_sigstop): Adjust.
14271         (stop_all_processes): Rename to ...
14272         (stop_all_lwps): ... this.
14273         (linux_resume_one_process): Rename to ...
14274         (linux_resume_one_lwp): ... this.  Adjust.
14275         (linux_set_resume_request, linux_continue_one_thread)
14276         (linux_queue_one_thread, resume_status_pending_p)
14277         (usr_store_inferior_registers, regsets_store_inferior_registers)
14278         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14279         Adjust.
14280         * linux-low.h (get_process): Rename to ...
14281         (get_lwp): ... this.  Adjust.
14282         (get_thread_process): Rename to ...
14283         (get_thread_lwp): ... this.  Adjust.
14284         (get_process_thread): Rename to ...
14285         (get_lwp_thread): ... this.  Adjust.
14286         (struct process_info): Rename to ...
14287         (struct lwp_info): ... this.
14288         (all_processes): Rename to ...
14289         (all_lwps): ... this.
14290         * proc-service.c (ps_lgetregs): Adjust.
14291         * thread-db.c (thread_db_create_event, find_one_thread)
14292         (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14293
14294 2009-03-14  Pedro Alves  <pedro@codesourcery.com>
14295
14296         * server.c (handle_query): Handle "qAttached".
14297
14298 2009-03-13  Nathan Sidwell  <nathan@codesourcery.com>
14299
14300         * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14301         GPLv3, update license URL.
14302
14303 2009-03-01  Doug Evans  <dje@google.com>
14304
14305         * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14306         (server_h): Add gdb_signals.h.
14307         (signals.o): Update.
14308         * server.h (target_signal_from_host,target_signal_to_host_p)
14309         (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14310
14311 2009-02-14  Pierre Muller  <muller@ics.u-strasbg.fr>
14312
14313         * remote-utils.c (getpkt): Also generate remote-debug
14314         information if noack_mode is set.
14315
14316 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
14317
14318         * server.c (handle_query): Report qXfer:siginfo:read and
14319         qXfer:siginfo:write as supported and handle them.
14320         * target.h (struct target_ops) <qxfer_siginfo>: New field.
14321         * linux-low.c (linux_xfer_siginfo): New.
14322         (linux_target_ops): Set it.
14323
14324 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
14325
14326         * server.c (gdbserver_usage): Mention --remote-debug.
14327         (main): Accept '--remote-debug' switch.
14328
14329 2009-01-18  Doug Evans  <dje@google.com>
14330
14331         * regcache.c (new_register_cache): No need to check result of xcalloc.
14332         * server.c (handle_search_memory): Back out calls to xmalloc,
14333         result is checked and error is returned to user upon failure.
14334         (handle_query): Ditto.  Add more checks for result of malloc.
14335         (handle_v_cont): Check result of malloc, report error back to
14336         user upon failure.
14337         (handle_v_run): Ditto.  Call freeargv.
14338         * server.h (freeargv): Declare.
14339         * utils.c (freeargv): New fn.
14340
14341 2009-01-15  Doug Evans  <dje@google.com>
14342
14343         * gdbreplay.c (perror_with_name): Make arg const char *.
14344         * server.h (target_signal_to_name): Make return type const char *.
14345         * thread-db.c (thread_db_err_str): Make return type const char *.
14346         * utils.c (perror_with_name): Make arg const char *.
14347
14348 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
14349
14350         * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14351         when handling a EXIT_PROCESS_DEBUG_EVENT.
14352
14353 2009-01-06  Joel Brobecker  <brobecker@adacore.com>
14354
14355         * gdbreplay.c (gdbreplay_version): Update copyright year.
14356         * server.c (gdbserver_version): Likewise.
14357
14358 2009-01-05  Doug Evans  <dje@google.com>
14359
14360         * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14361         (handle_extended_wait): Improve comment.
14362
14363 2008-12-13  Doug Evans  <dje@google.com>
14364
14365         * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14366         * server.h (ATTR_MALLOC): New macro.
14367         (xmalloc,xcalloc,xstrdup): Declare.
14368         * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14369         * inferiors.c: Ditto.
14370         * linux-low.c: Ditto.
14371         * mem-break.c: Ditto.
14372         * regcache.c: Ditto.
14373         * remote-utils.c: Ditto.
14374         * server.c: Ditto.
14375         * target.c: Ditto.
14376         * win32-low.c: Ditto.
14377
14378 2008-12-12  Doug Evans  <dje@google.com>
14379
14380         * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14381         in debugging printf.
14382
14383         * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14384
14385 2008-12-09  Doug Evans  <dje@google.com>
14386
14387         * linux-low.h (struct process_info): Delete member tid, unused.
14388         * thread-db.c (find_one_thread): Update.
14389         (maybe_attach_thread): Update.
14390
14391 2008-12-02  Pedro Alves  <pedro@codesourcery.com>
14392
14393         * target.h (struct target_ops): Add qxfer_osdata member.
14394         * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14395         and dirent.h.
14396         (linux_qxfer_osdata): New functions.
14397         (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14398         callback.
14399         * server.c (handle_query): Handle "qXfer:osdata:read:".
14400         * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14401         (buffer_xml_printf): New functions.
14402         * server.h (struct buffer): New.
14403         (buffer_grow_str, buffer_grow_str0): New macros.
14404         (buffer_grow, buffer_free, buffer_init, buffer_finish)
14405         (buffer_xml_printf): Declare.
14406
14407 2008-11-24  Doug Evans  <dje@google.com>
14408
14409         * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14410
14411 2008-11-24  Daniel Jacobowitz  <dan@codesourcery.com>
14412
14413         * server.c (handle_v_run): Always use the supplied argument list.
14414
14415 2008-11-19  Bob Wilson  <bob.wilson@acm.org>
14416
14417         * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14418         (xtensa_regmap_table): Add entry for scompare1.
14419
14420 2008-11-18  Thiago Jung Bauermann  <bauerman@br.ibm.com>
14421
14422         * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14423         powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14424         powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14425         powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14426         powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14427         powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14428         * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14429         XML target descriptions.
14430         * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14431         when inferior is running on an ISA 2.05 or later processor.  Add
14432         special case to return offset for full 64-bit slot of FPSCR when
14433         in 32-bits.
14434
14435 2008-11-14  Daniel Gutson  <dgutson@codesourcery.com>
14436
14437         * Makefile.in (SFILES, clean): Added sparc64 files.
14438         (reg-sparc64.o, reg-sparc64.c): New.
14439         * configure.srv (sparc*-*-linux*): New configuration.
14440         * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14441         syscall arguments for SPARC.
14442         (regsets_store_inferior_registers): Likewise.
14443         * linux-sparc-low.c: New file.
14444
14445 2008-10-21  Doug Evans  <dje@google.com>
14446
14447         * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14448         (READLINE_DIR,READLINE_DEP): Delete.
14449         (INTERNAL_CFLAGS): Update.
14450         (LINTFLAGS): Update.
14451
14452 2008-10-10  Pedro Alves  <pedro@codesourcery.com>
14453
14454         * server.c (handle_v_run): If GDB didn't specify an argv, use the
14455         whole argv from the last run, not just argv[0].
14456
14457 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
14458
14459         * regcache.c (new_register_cache): Return NULL if the register
14460         cache size isn't known yet.
14461         (free_register_cache): Avoid dereferencing a NULL regcache.
14462
14463 2008-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
14464
14465         * configure.srv: Merge MIPS and MIPS64.
14466
14467 2008-08-24  Maciej W. Rozycki  <macro@linux-mips.org>
14468
14469         * Makefile.in (uninstall): Apply $(EXEEXT) too.
14470
14471 2008-08-18  Luis Machado  <luisgpm@br.ibm.com>
14472
14473         * Makefile.in: Add required vsx dependencies.
14474
14475         * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14476         Declare init_registers_powerpc_vsx32l.
14477         Declare init_registers_powerpc_vsx64l.
14478         Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14479         (ppc_arch_setup): Check for VSX in hwcap.
14480         (ppc_fill_vsxregset): New function.
14481         (ppc_store_vsxregset): New function.
14482         Add new VSX entry in regset_info target_regsets.
14483
14484         * configure.srv: Add new VSX dependencies.
14485
14486 2008-08-12  Pedro Alves  <pedro@codesourcery.com>
14487
14488         * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14489         (remote_open): Set or clear transport_is_reliable.
14490         (putpkt_binary): Don't expect acks in noack mode.
14491         (getpkt): Don't send ack/nac in noack mode.
14492         * server.c (handle_general_set): Handle QStartNoAckMode.
14493         (handle_query): If connected by tcp pass QStartNoAckMode+ in
14494         qSupported.
14495         (main): Reset noack_mode on every connection.
14496         * server.h (noack_mode): Declare.
14497
14498 2008-08-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14499
14500         * Makefile.in (GDBREPLAY_OBS): New variable.
14501         (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14502
14503 2008-08-05  Ulrich Weigand  <uweigand@de.ibm.com>
14504             Daniel Jacobowitz  <dan@codesourcery.com>
14505
14506         * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14507         (usr_store_inferior_registers): Likewise.
14508         (regsets_store_inferior_registers): Likewise.
14509
14510 2008-07-31  Rolf Jansen  <rj@surtec.com>
14511             Pedro Alves  <pedro@codesourcery.com>
14512
14513         * configure.ac: Check for memmem declaration.
14514         * server.c [HAVE_MALLOC_H]: Include malloc.h.
14515         (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14516         (disable_packet_qfThreadInfo): Unconditionally compile.
14517         * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14518         * configure, config.in: Regenerate.
14519
14520 2008-07-28  Doug Kwan  <dougkwan@google.com>
14521
14522         * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14523         (linux_write_memory): Remove declaration of errno.
14524
14525 2008-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
14526
14527         * linux-low.c (handle_extended_wait): Do not use "status"
14528         variable uninitialized.
14529
14530 2008-07-07  Pedro Alves  <pedro@codesourcery.com>
14531
14532         * server.c (handle_v_attach): Inhibit reporting dll changes.
14533
14534 2008-06-27  Pedro Alves  <pedro@codesourcery.com>
14535
14536         * remote-utils.c (prepare_resume_reply): If requested, don't
14537         output "thread:TID" in the T stop reply.
14538
14539         * server.c (disable_packet_vCont, disable_packet_Tthread)
14540         (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14541         (handle_query): If requested, disable support for qC, qfThreadInfo
14542         and qsThreadInfo.
14543         (handle_v_requests): If requested, disable support for vCont.
14544         (gdbserver_show_disableable): New.
14545         (main): Handle --disable-packet and --disable-packet=LIST.
14546
14547         * server.h (disable_packet_vCont, disable_packet_Tthread)
14548         (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14549
14550 2008-06-20  Carlos O'Donell  <carlos@codesourcery.com>
14551
14552         * server.c (gdbserver_usage): Mention --version.
14553
14554 2008-06-06  Daniel Jacobowitz  <dan@codesourcery.com>
14555
14556         * Makefile.in (gdbreplay.o): New rule.
14557
14558 2008-06-06  Joseph Myers  <joseph@codesourcery.com>
14559
14560         * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14561         message, not gdbserver.
14562
14563 2008-06-05  Vladimir Prus  <vladimir@codesourcery.com>
14564             Nathan Sidwell  <nathan@codesourcery.com>
14565             Joseph Myers  <joseph@codesourcery.com>
14566
14567         * acinclude.m4: Include ../../config/acx.m4.
14568         * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14569         * configure, config.in: Regenerate.
14570         * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14571         * server.c (gdbserver_version): Print PKGVERSION.
14572         (gdbsrever_usage): Add stream parameter.  Print REPORT_BUGS_TO.
14573         (main): Adjust gdbserver_usage calls.
14574         * gdbreplay.c (version, host_name): Add declarations.
14575         (gdbreplay_version, gdbreplay_usage): New.
14576         (main): Accept --version and --help options.
14577
14578 2008-06-04  Daniel Jacobowitz  <dan@codesourcery.com>
14579
14580         * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14581         (arm_breakpoint_at): Handle Thumb.
14582         (the_low_target): Add comment.
14583
14584 2008-05-29  Ulrich Weigand  <uweigand@de.ibm.com>
14585
14586         * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14587
14588 2008-05-09  Doug Evans  <dje@google.com>
14589
14590         * server.h (decode_search_memory_packet): Declare.
14591         * remote-utils.c (decode_search_memory_packet): New fn.
14592         * server.c (handle_search_memory_1): New fn.
14593         (handle_search_memory): New fn.
14594         (handle_query): Process qSearch:memory packets.
14595
14596 2008-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
14597
14598         * regcache.c (registers_length): Remove.
14599         (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14600         full register packet.
14601         * regcache.h (registers_length): Remove prototype.
14602         * server.h (PBUFSIZ): Define to 16384.
14603
14604 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
14605
14606         * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14607         powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14608         powerpc-64l.o, and powerpc-altivec64l.o.
14609         Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14610         rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14611         rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14612         rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14613         rs6000/power-linux.xml, and rs6000/power64-linux.xml
14614         to srv_xmlfiles.
14615
14616         * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14617         (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14618         (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14619         (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14620         (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14621         (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14622         (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14623         (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14624         (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14625         (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14626         (clean): Update.
14627
14628         * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14629         (init_registers_powerpc_32l): ... this new prototype.
14630         (init_registers_powerpc_32): Remove, replace by ...
14631         (init_registers_powerpc_altivec32l): ... this new prototype.
14632         (init_registers_powerpc_e500): Remove, replace by ...
14633         (init_registers_powerpc_e500l): ... this new prototype.
14634         (init_registers_ppc64): Remove, replace by ...
14635         (init_registers_powerpc_64l): ... this new prototype.
14636         (init_registers_powerpc_64): Remove, replace by ...
14637         (init_registers_powerpc_altivec64l): ... this new prototype.
14638         (ppc_num_regs): Set to 73.
14639         (PT_ORIG_R3, PT_TRAP): Define if necessary.
14640         (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14641         (ppc_cannot_store_register): Handle orig_r3 and trap.
14642         (ppc_arch_setup): Update init_registers_... calls.
14643         (ppc_fill_gregset): Handle orig_r3 and trap.
14644
14645         * inferiors.c (clear_inferiors): Reset current_inferior.
14646
14647 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
14648
14649         * acinclude.m4: Add override.m4.
14650         * configure: Regenerate.
14651
14652 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
14653
14654         * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14655         initial call to init_register_ppc64.
14656
14657 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
14658
14659         * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14660         single powerpc*-*-linux* case.
14661         (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14662
14663 2008-04-17  Ulrich Weigand  <uweigand@de.ibm.com>
14664
14665         * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14666         srv_regobj.  Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14667         from reg_xmlfiles.
14668         * linux-ppc-low.c: Include <elf.h>.
14669         (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14670         (ppc_hwcap): New global variable.
14671         (ppc_regmap): Remove __SPE__ #ifdef sections.
14672         (ppc_regmap_e500): New global variable.
14673         (ppc_cannot_store_register): Update __SPE__ special case.
14674         (ppc_get_hwcap): New function.
14675         (ppc_arch_setup): Use it to determine whether inferior supports
14676         AltiVec or SPE registers.  Set the_low_target.regmap if appropriate.
14677         (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14678         Do not access registers if target does not support AltiVec.
14679         (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14680         Do not access registers if target does not support SPE.
14681         (target_regsets): Unconditionally include AltiVec and SPE regsets.
14682
14683 2008-04-17  Daniel Jacobowitz  <dan@codesourcery.com>
14684
14685         * linux-low.c (disabled_regsets, num_regsets): New.
14686         (use_regsets_p): Delete.
14687         (linux_wait_for_process): Clear disabled_regsets.
14688         (regsets_fetch_inferior_registers): Check and set it.
14689         (regsets_store_inferior_registers): Likewise.
14690         (linux_fetch_registers, linux_store_registers): Do not use
14691         use_regsets_p.
14692         (initialize_low): Allocate disabled_regsets.
14693
14694 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
14695
14696         * Makefile.in (LIBOBJS): New.
14697         (OBS): Use LIBOBJS.
14698         (memmem.o): New rule.
14699         * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14700         * configure: Regenerated.
14701
14702 2008-04-04  Ulrich Weigand  <uweigand@de.ibm.com>
14703
14704         * server.c (handle_query): Never return "unsupported" for
14705         qXfer:features:read queries.
14706
14707 2008-03-27  Ulrich Weigand  <uweigand@de.ibm.com>
14708
14709         * server.c (get_features_xml): Fix inverted condition.
14710         (handle_query): Always support qXfer:feature:read.
14711
14712 2008-03-10  Daniel Jacobowitz  <dan@codesourcery.com>
14713
14714         * server.c (wrapper_argv): New.
14715         (start_inferior): Handle wrapper_argv.  If set, expect an extra
14716         trap.
14717         (gdbserver_usage): Document --wrapper.
14718         (main): Parse --wrapper.
14719
14720 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
14721
14722         * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14723         powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14724         * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14725         (ppc_set_pc): Likewise.
14726         (ppc_arch_setup): New function.
14727         (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14728         of collect_register.
14729         (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14730
14731 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
14732
14733         * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14734         instead of linux-ppc64-low.o.
14735         * linux-ppc64-low.c: Remove file.
14736         * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14737         (linux-ppc64-low.o): Remove rule.
14738
14739         * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14740         (init_registers_powerpc_64): Likewise.
14741         (ppc_regmap): Conditionally define depending on __powerpc64__.
14742         (ppc_cannot_store_register): Do not special-case "fpscr" when
14743         compiled on __powerpc64__.
14744         (ppc_collect_ptrace_register): New function.
14745         (ppc_supply_ptrace_register): New function.
14746         (ppc_breakpoint): Change type to "unsigned int".
14747         (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14748         (the_low_target): Conditionally provide initializers for the
14749         arch_setup member depending on __powerpc64__.  Install
14750         collect_ptrace_register and supply_ptrace_register members.
14751
14752 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
14753
14754         * regcache.h (gdbserver_xmltarget): Add extern declaration.
14755         * server.c (gdbserver_xmltarget): Define.
14756         (get_features_xml): Use it to replace "target.xml" and arch_string.
14757
14758         * configure.srv: Remove srv_xmltarget.  Add XML files that were
14759         mentioned there to srv_xmlfiles instead.  Remove conditional tests
14760         on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14761         srv_xmlfiles and srv_regobj to include all possible choices.
14762         * configure.ac (srv_xmltarget): Remove.
14763         (srv_xmlfiles): Do not add "target.xml".
14764         (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14765         checks for supplementary target information.
14766         * configure: Regenerate.
14767         * Makefile.in (XML_TARGET): Remove.
14768         (target.xml): Remove rule.
14769         (clean): Do not clean up target.xml.
14770         (.PRECIOUS): Do not mention target.xml.
14771
14772         * target.h (struct target_ops): Remove arch_string member.
14773         * linux-low.c (linux_arch_string): Remove.
14774         (linux_target_ops): Remove arch_string initializer.
14775         * linux-low.h (struct linux_target_ops): Remove arch_string member.
14776         * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14777         * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14778         * spu-low.c (spu_arch_string): Remove.
14779         (spu_target_ops): Remove arch_string initializer.
14780         * win32-low.c (win32_arch_string): Remove.
14781         (win32_target_ops): Remove arch_string initializer.
14782         * win32-low.h (struct win32_target_ops): Remove arch_string member.
14783         * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14784         * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14785
14786 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
14787
14788         * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14789         by collect_ptrace_register and supply_ptrace_register hooks.
14790         * linux-low.c (fetch_register): Use supply_ptrace_register callback
14791         instead of checking for the_low_target.left_pad_xfer.
14792         (usr_store_inferior_registers): Use collect_ptrace_register callback
14793         instead of checking for the_low_target.left_pad_xfer.
14794
14795         * linux-s390-low.c (s390_collect_ptrace_register): New function.
14796         (s390_supply_ptrace_register): Likewise.
14797         (s390_fill_gregset): Call s390_collect_ptrace_register.
14798         (the_low_target): Update.
14799
14800         * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14801         (ppc_supply_ptrace_register): Likewise.
14802         (the_low_target): Update.
14803
14804         * linux-i386-low.c (the_low_target): Update.
14805         * linux-x86-64-low.c (the_low_target): Update.
14806
14807 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
14808
14809         * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14810         reg-s390.o and reg-s390x.o.
14811
14812         * linux-low.c (new_inferior): New global variable.
14813         (linux_create_inferior, linux_attach): Set it.
14814         (linux_wait_for_process): Call the_low_target.arch_setup after the
14815         target has stopped for the first time.
14816         (initialize_low): Do not call the_low_target.arch_setup.
14817
14818         * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14819         (s390_set_pc): Likewise.
14820         (s390_arch_setup): New function.
14821         (the_low_target): Use s390_arch_setup as arch_setup routine.
14822
14823         * regcache.c (realloc_register_cache): New function.
14824         (set_register_cache): Call it for each existing regcache.
14825
14826 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
14827
14828         * server.h (init_registers): Remove prototype.
14829
14830         * linux-low.h (struct linux_target_ops): Add arch_setup field.
14831         * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14832         instead of init_registers ().
14833         * linux-arm-low.c (init_registers_arm): Add prototype.
14834         (init_registers_arm_with_iwmmxt): Likewise.
14835         (the_low_target): Add initializer for arch_setup field.
14836         * linux-cris-low.c (init_registers_cris): Add prototype.
14837         (the_low_target): Add initializer for arch_setup field.
14838         * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14839         (the_low_target): Add initializer for arch_setup field.
14840         * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14841         (the_low_target): Add initializer for arch_setup field.
14842         * linux-ia64-low.c (init_registers_ia64): Add prototype.
14843         (the_low_target): Add initializer for arch_setup field.
14844         * linux-m32r-low.c (init_registers_m32r): Add prototype.
14845         (the_low_target): Add initializer for arch_setup field.
14846         * linux-m68k-low.c (init_registers_m68k): Add prototype.
14847         (the_low_target): Add initializer for arch_setup field.
14848         * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14849         (init_registers_mips64_linux): Likewise.
14850         (the_low_target): Add initializer for arch_setup field.
14851         * linux-ppc-low.c (init_registers_ppc): Add prototype.
14852         (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14853         (the_low_target): Add initializer for arch_setup field.
14854         * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14855         (init_registers_powerpc_64): Likewise.
14856         (the_low_target): Add initializer for arch_setup field.
14857         * linux-s390-low.c (init_registers_s390): Add prototype.
14858         (init_registers_s390x): Likewise.
14859         (the_low_target): Add initializer for arch_setup field.
14860         * linux-sh-low.c (init_registers_sh): Add prototype.
14861         (the_low_target): Add initializer for arch_setup field.
14862         * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14863         (the_low_target): Add initializer for arch_setup field.
14864         * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14865         (the_low_target): Add initializer for arch_setup field.
14866
14867         * win32-low.h (struct win32_target_ops): Add arch_setup field.
14868         * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14869         instead of init_registers ().
14870         * win32-arm-low.c (init_registers_arm): Add prototype.
14871         (the_low_target): Add initializer for arch_setup field.
14872         * win32-i386-low.c (init_registers_i386): Add prototype.
14873         (the_low_target): Add initializer for arch_setup field.
14874
14875         * spu-low.c (init_registers_spu): Add prototype.
14876         (initialize_low): Call initialie_registers_spu () instead of
14877         initialize_registers ().
14878
14879 2008-02-19  Pedro Alves  <pedro@codesourcery.com>
14880
14881         * server.c (handle_v_requests): When handling the vRun and vAttach
14882         packets, if already debugging a process, don't kill it.  Return an
14883         error instead.
14884
14885 2008-02-17  Daniel Jacobowitz  <dan@codesourcery.com>
14886
14887         * server.c (handle_query): Correct length check.
14888
14889 2008-02-14  Pedro Alves  <pedro_alves@portugalmail.pt>
14890
14891         * win32-low.c (do_initial_child_stuff): Add process handle
14892         parameter.  Set current_process_handle and current_process_id from the
14893         parameters. Clear globals.
14894         (win32_create_inferior): Don't set current_process_handle and
14895         current_process_id here.  Instead pass them on the call to
14896         do_initial_child_stuff.
14897         (win32_attach): Likewise.
14898         (win32_clear_inferiors): New.
14899         (win32_kill): Don't close the current process handle or the
14900         current thread handle here.  Instead call win32_clear_inferiors.
14901         (win32_detach): Don't open a new handle to the process.  Call
14902         win32_clear_inferiors.
14903         (win32_join): Don't rely on current_process_handle; open a new
14904         handle using the process id.
14905         (win32_wait): Call win32_clear_inferiors when the inferior process
14906         has exited.
14907
14908 2008-02-14  Daniel Jacobowitz  <dan@codesourcery.com>
14909
14910         * server.c (monitor_show_help): Add "exit".
14911
14912 2008-02-11  Maxim Grigoriev  <maxim2405@gmail.com>
14913
14914         * Makefile.in (SFILES): Add linux-xtensa-low.c.
14915         (clean): Add reg-xtensa.c.
14916         (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14917         * configure.srv (xtensa*-*-linux*) New target.
14918         * linux-xtensa-low.c: New.
14919         * xtensa-xtregs.c: New.
14920
14921 2008-02-01  Pedro Alves  <pedro_alves@portugalmail.pt>
14922
14923         * hostio.c: Don't include errno.h.
14924         (errno_to_fileio_errno): Move to hostio-errno.
14925         * hostio.c: (hostio_error): Remove the error parameter.  Defer the
14926         error number outputting to the target->hostio_last_error callback.
14927         (hostio_packet_error): Use FILEIO_EINVAL directly.
14928         (handle_open, handle_pread, hostio_error, handle_unlink): Update
14929         calls to hostio_error.
14930         * hostio-errno.c: New.
14931         * server.h (hostio_last_error_from_errno): Declare.
14932         * target.h (target_ops): Add hostio_last_error member.
14933         * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14934         as hostio_last_error handler.
14935         * spu-low.c (spu_target_ops): Likewise.
14936         * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14937         (wince_hostio_last_error): New functions.
14938         (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14939         as hostio_last_error handler.
14940         (win32_target_ops) [!_WIN32_WCE]: Register
14941         hostio_last_error_from_errno as hostio_last_error handler.
14942         * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14943         (hostio-errno.o): New rule.
14944         * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14945         * configure.srv (srv_hostio_err_objs): New variable.  Default to
14946         hostio-errno.o.
14947         (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14948         * configure: Regenerate.
14949
14950 2008-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
14951
14952         * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14953         (linux_kill, linux_detach): Clean up the process list.
14954         * remote-utils.c (remote_open): Improve port number parsing.
14955         (putpkt_binary, input_interrupt): Only send interrupts if the target
14956         is running.
14957         * server.c (extended_protocol): Make static.
14958         (attached): Define earlier.
14959         (exit_requested, response_needed, program_argv): New variables.
14960         (target_running): New.
14961         (start_inferior): Clear attached here.
14962         (attach_inferior): Set attached here.
14963         (require_running): Define.
14964         (handle_query): Use require_running and target_running.  Implement
14965         "monitor exit".
14966         (handle_v_attach, handle_v_run): New.
14967         (handle_v_requests): Use require_running.  Handle vAttach and vRun.
14968         (gdbserver_usage): Update.
14969         (main): Redo argument parsing.  Handle --debug and --multi.  Handle
14970         --attach along with other options or after the port.  Save
14971         program_argv.  Support no initial program.  Resynchronize
14972         communication with GDB after an error.  Handle "monitor exit".
14973         Use require_running and target_running.  Always allow the extended
14974         protocol.  Do not error out for Hc0 or Hc-1.  Do not automatically
14975         restart in extended mode.
14976         * README: Refer to the GDB manual.  Update --attach usage.
14977
14978 2007-12-20  Andreas Schwab  <schwab@suse.de>
14979
14980         * linux-low.c (STACK_SIZE): Define.
14981         (linux_tracefork_child): Use it.  Use __clone2 on ia64.
14982         (linux_test_for_tracefork): Likewise.
14983
14984 2007-12-18  Daniel Jacobowitz  <dan@codesourcery.com>
14985
14986         * linux-low.c (linux_wait_for_event): Update messages.  Do not
14987         reinsert auto-delete breakpoints.
14988         * mem-break.c (struct breakpoint): Change return type of handler to
14989         int.
14990         (set_breakpoint_at): Update handler type.
14991         (reinsert_breakpoint_handler): Return 1 instead of calling
14992         delete_breakpoint.
14993         (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14994         setting a new one.
14995         (check_breakpoints): Delete auto-delete breakpoints and return 2.
14996         * mem-break.h (set_breakpoint_at): Update handler type.
14997         * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14998         * win32-low.c (auto_delete_breakpoint): New.
14999         (get_child_debug_event): Use it.
15000
15001 2007-12-16  Daniel Jacobowitz  <dan@codesourcery.com>
15002
15003         * configure.ac: Check for pread and pwrite.
15004         * hostio.c (handle_pread): Fall back to lseek and read.
15005         (handle_pwrite): Fall back to lseek and write.
15006         * config.in, configure: Regenerated.
15007
15008 2007-12-07  Daniel Jacobowitz  <dan@codesourcery.com>
15009
15010         * server.c (myresume): Add own_buf argument.
15011         (main): Update calls.
15012
15013 2007-12-06  Daniel Jacobowitz  <dan@codesourcery.com>
15014
15015         * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15016         * remote-utils.c (remote_open): Do not call disable_async_io.
15017         (block_async_io): Delete.
15018         (unblock_async_io): Make static.
15019         (initialize_async_io): New.
15020         * server.c (handle_v_cont): Handle async I/O here.
15021         (myresume): Likewise.  Move other common resume tasks here...
15022         (main): ... from here.  Call initialize_async_io.  Disable async
15023         I/O before the main loop.
15024         * server.h (initialize_async_io): Declare.
15025         (block_async_io, unblock_async_io): Delete prototypes.
15026         * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15027
15028 2007-12-06  Mick Davis  <mickd@goanna.iinet.net.au>
15029
15030         * remote-utils.c (readchar): Allow binary data in received messages.
15031
15032 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
15033
15034         * win32-low.c (attaching): New global.
15035         (win32_create_inferior): Clear the `attaching' global.
15036         (win32_attach): Set the `attaching' global.
15037         (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15038         attaching.  Only set a breakpoint at the entry point if not
15039         attaching.
15040
15041 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
15042
15043         * server.c (main): Don't report dll events on the initial
15044         connection on attaches.
15045
15046 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
15047
15048         * server.c (main): Relax numerical bases supported for the pid of
15049         the --attach command line argument.
15050
15051 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
15052
15053         * win32-low.c (win32_attach): Call OpenProcess before
15054         DebugActiveProcess, not after.  Add last error output to error
15055         call.
15056
15057 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
15058
15059         * win32-low.c (win32_get_thread_context)
15060         (win32_set_thread_context): New functions.
15061         (thread_rec): Use win32_get_thread_context.
15062         (continue_one_thread, win32_resume): Use win32_set_thread_context.
15063         * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15064         field.
15065
15066 2007-12-03  Leo Zayas
15067             Pedro Alves  <pedro_alves@portugalmail.pt>
15068
15069         * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15070         global variables.
15071         (child_add_thread): Minor cleanup.
15072         (child_continue): Resume artificially suspended threads before
15073         calling ContinueDebugEvent.
15074         (suspend_one_thread): New.
15075         (fake_breakpoint_event): New.
15076         (get_child_debug_event): Change return type to int.  Check here if
15077         gdb sent an interrupt request.  If a soft interrupt was requested,
15078         fake a breakpoint event.  Return 0 if there is no event to handle,
15079         and 1 otherwise.
15080         (win32_wait): Don't check here if gdb sent an interrupt request.
15081         Ensure there is a valid event to handle.
15082         (win32_request_interrupt): Add soft interruption method as last
15083         resort.
15084
15085 2007-12-03  Leo Zayas
15086             Pedro Alves  <pedro_alves@portugalmail.pt>
15087
15088         * win32-low.h (win32_thread_info): Add descriptions to the
15089         structure members.  Replace `suspend_count' counter by a
15090         `suspended' flag.
15091         * win32-low.c (thread_rec): Update condition of when to get the
15092         context from the inferior.  Rely on ContextFlags being set if it
15093         has already been retrieved.  Only suspend the inferior thread if
15094         we haven't already.  Warn if that fails.
15095         (continue_one_thread): s/suspend_count/suspended/.  Only call
15096         ResumeThread once.  Warn if that fails.
15097
15098 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
15099
15100         * win32-low.c (win32_wait): Don't read from the inferior when it
15101         has already exited.
15102
15103 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
15104
15105         * Makefile.in (win32_low_h): New variable.
15106         (win32-low.o): Add dependency on $(win32_low_h).
15107         (win32-arm-low.o, win32-i386-low.o): New rules.
15108
15109 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
15110
15111         * hostio.c: Correct copyright year.
15112
15113 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
15114
15115         * Makefile.in (OBS): Add hostio.o.
15116         (hostio.o): New rule.
15117         * server.h (handle_vFile): Declare.
15118         * hostio.c: New file.
15119         * server.c (handle_v_requests): Take packet_len and new_packet_len
15120         for binary packets.  Call handle_vFile.
15121         (main): Update call to handle_v_requests.
15122
15123 2007-11-05  Daniel Jacobowitz  <dan@codesourcery.com>
15124
15125         * linux-low.c: Include <sched.h>.
15126
15127 2007-11-01  Daniel Jacobowitz  <dan@codesourcery.com>
15128
15129         * linux-low.c (linux_tracefork_grandchild): New.
15130         (linux_tracefork_child): Use clone.
15131         (linux_test_for_tracefork): Use clone; allocate and free a stack.
15132
15133 2007-10-31  Joel Brobecker  <brobecker@adacore.com>
15134
15135         * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15136
15137 2007-10-24  Daniel Jacobowitz  <dan@codesourcery.com>
15138
15139         * linux-low.c (handle_extended_wait): Handle unexpected signals.
15140
15141 2007-10-23  Daniel Jacobowitz  <dan@codesourcery.com>
15142
15143         * inferiors.c (change_inferior_id): Delete.
15144         (add_pid_to_list, pull_pid_from_list): New.
15145         * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15146         (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15147         (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15148         (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15149         (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15150         (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15151         (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15152         (using_threads): Always set to 1.
15153         (handle_extended_wait): New.
15154         (add_process): Do not set TID.
15155         (linux_create_inferior): Set must_set_ptrace_flags.
15156         (linux_attach_lwp): Remove TID argument.  Do not check using_threads.
15157         Use PTRACE_SETOPTIONS.  Call new_thread_notify.  Update all callers.
15158         (linux_thread_alive): Rename TID argument to LWPID.
15159         (linux_wait_for_process): Handle unknown processes.  Do not use TID.
15160         (linux_wait_for_event): Do not use TID or check using_threads.  Update
15161         call to dead_thread_notify.  Call handle_extended_wait.
15162         (linux_create_inferior): Use PTRACE_SETOPTIONS.
15163         (send_sigstop): Delete sigstop_sent.
15164         (wait_for_sigstop): Avoid TID.
15165         (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15166         (linux_test_for_tracefork): New.
15167         (linux_lookup_signals): Use thread_db_active and
15168         linux_supports_tracefork_flag.
15169         (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15170         * linux-low.h (get_process_thread): Avoid TID.
15171         (struct process_ifo): Move thread_known and tid to the end.  Remove
15172         sigstop_sent.
15173         (linux_attach_lwp, thread_db_init): Update prototypes.
15174         * server.h (change_inferior_id): Delete prototype.
15175         (add_pid_to_list, pull_pid_from_list): New prototypes.
15176         * thread-db.c (thread_db_use_events): New.
15177         (find_first_thread): Rename to...
15178         (find_one_thread): ...this.  Update callers and messages.  Do not
15179         call fatal.  Check thread_db_use_events.  Do not call
15180         change_inferior_id or new_thread_notify.
15181         (maybe_attach_thread): Update.  Do not call new_thread_notify.
15182         (thread_db_init): Set thread_db_use_events.  Check use_events.
15183         * utils.c (fatal, warning): Correct message prefix.
15184
15185 2007-10-15  Daniel Jacobowitz  <dan@codesourcery.com>
15186
15187         * Makefile.in (clean): Remove new files.
15188         (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15189         (powerpc-64.o, powerpc-64.c): New rules.
15190         * configure.srv: Use alternate register sets for powerpc64-*-linux*
15191         with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15192         with SPE.
15193         * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15194         SPE targets.
15195         (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15196         (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15197         (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15198         (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15199         (target_regsets): Add AltiVec and SPE register sets.
15200         * configure.ac: Check for AltiVec and SPE.
15201         * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15202         (ppc_fill_vrregset, ppc_store_vrregset): New.
15203         (target_regsets): Add AltiVec register set.
15204         * configure: Regenerated.
15205
15206 2007-09-19  Daniel Jacobowitz  <dan@codesourcery.com>
15207
15208         * linux-low.c (O_LARGEFILE): Define.
15209         (linux_read_memory): Use /proc/PID/mem.
15210         * configure.ac: Use AC_GNU_SOURCE.  Check for pread64.
15211         * configure, config.in: Regenerated.
15212
15213 2007-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
15214
15215         * linux-low.c (linux_wait_for_event): Do not pass signals while
15216         single-stepping.
15217
15218 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
15219
15220         * win32-low.c (create_process): New.
15221         (win32_create_inferior): Use create_process instead of
15222         CreateProcess.  If create_process failed retry appending an ".exe"
15223         suffix.  Store the GetLastError result immediatelly after
15224         create_process calls and use it on the call to error.
15225
15226 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
15227
15228         * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15229
15230 2007-08-23  Joel Brobecker  <brobecker@adacore.com>
15231
15232         * configure.ac: Switch license to GPLv3.
15233
15234 2007-08-01  Michael Snyder  <msnyder@access-company.com>
15235
15236         * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15237
15238 2007-07-31  Pedro Alves  <pedro_alves@portugalmail.pt>
15239
15240         * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15241         typedef.
15242         (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15243         (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL.  Get
15244         CloseToolhelp32Snapshot.
15245         (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15246         CloseToolhelp32Snapshot.
15247
15248 2007-07-27  Michael Snyder  <michael.snyder@access-company.com>
15249
15250         * server.c (main): Check for inferior exit before main loop.
15251
15252 2007-07-18  Pedro Alves  <pedro_alves@portugalmail.pt>
15253
15254         * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15255         instead of on tmp_desc.
15256
15257 2007-07-17  Pedro Alves  <pedro_alves@portugalmail.pt>
15258             Daniel Jacobowitz  <dan@codesourcery.com>
15259
15260         * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15261         (add_thread): Minor cleanups.
15262         (clear_inferiors): Move lower in the file.  Clear the DLL
15263         list.
15264         (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15265         * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15266         (xml_escape_text): New.
15267         * server.c (handle_query): Handle qXfer:libraries:read.  Report it
15268         for qSupported.
15269         (handle_v_cont): Report errors.
15270         (gdbserver_version): Update.
15271         (main): Correct size of own_buf.  Do not report initial DLL events.
15272         * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15273         (unloaded_dll, xml_escape_text): New.
15274         * win32-low.c (enum target_waitkind): Update comments.
15275         (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15276         (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15277         (win32_EnumProcessModules, win32_GetModuleInformation)
15278         (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15279         (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15280         (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15281         (win32_Module32First, win32_Module32Next, load_toolhelp)
15282         (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15283         (get_child_debug_event): Handle DLL events.
15284         (win32_wait): Likewise.
15285
15286 2007-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
15287
15288         * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15289         * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15290
15291 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
15292
15293         * win32-low.c (handle_output_debug_string): Ignore event if not
15294         waiting.
15295
15296 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
15297
15298         * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15299
15300 2007-07-03  Daniel Jacobowitz  <dan@codesourcery.com>
15301
15302         * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15303
15304 2007-07-02  Daniel Jacobowitz  <dan@codesourcery.com>
15305
15306         * inferiors.c (change_inferior_id): Add comment.
15307         * linux-low.c (check_removed_breakpoint): Add an early
15308         prototype.  Improve debug output.
15309         (linux_attach): Doc update.
15310         (linux_detach_one_process, linux_detach): Clean up before releasing
15311         each process.
15312         (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15313         * linux-low.h (struct process_info): Doc improvement.
15314         * mem-break.c (delete_all_breakpoints): New.
15315         * mem-break.h (delete_all_breakpoints): New prototype.
15316         * thread-db.c (find_first_thread): New.
15317         (thread_db_create_event): Call it instead of
15318         thread_db_find_new_threads.  Clean up unused variables.
15319         (maybe_attach_thread): Remove first thread handling.
15320         (thread_db_find_new_threads): Use find_first_thread.
15321         (thread_db_get_tls_address): Likewise.
15322
15323 2007-06-27  Daniel Jacobowitz  <dan@codesourcery.com>
15324
15325         * thread-db.c (thread_db_find_new_threads): Add prototype.
15326         (thread_db_create_event): Check for the main thread before adding
15327         a new thread.
15328         (maybe_attach_thread): Only enable event reporting if TID == 0.
15329         (thread_db_get_tls_address): Check for new threads.
15330
15331 2007-06-20  Daniel Jacobowitz  <dan@codesourcery.com>
15332
15333         * linux-low.c (linux_create_inferior): Try execv before execvp.
15334         * spu-low.c (spu_create_inferior): Likewise.
15335
15336 2007-06-13  Mike Frysinger  <vapier@gentoo.org>
15337
15338         * linux-low.c (linux_create_inferior): Change execv to execvp.
15339         * spu-low.c (spu_create_inferior): Likewies.
15340
15341 2007-06-13  Daniel Jacobowitz  <dan@codesourcery.com>
15342
15343         * Makefile.in (clean): Clean new files instead of deleted ones.
15344         (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15345         (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15346         rules.
15347         * configure.srv: Specify XML files and new regformats for MIPS and
15348         MIPS64 GNU/Linux.
15349         * linux-mips-low.c (mips_num_regs): Set to only used registers.
15350         (mips_regmap): Do not fetch $0.  Remove unused registers.  Add
15351         an entry for the restart register.
15352         (mips_cannot_fetch_register, mips_cannot_store_register)
15353         (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15354         register names to match the XML descriptions.
15355         (mips_fill_gregset, mips_store_gregset): Likewise.  Handle the
15356         restart register instead of $0.
15357
15358 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
15359             Markus Deuling  <deuling@de.ibm.com>
15360
15361         * remote-utils.c (decode_xfer_write): New function.
15362         * server.h (decode_xfer_write): Add prototype.
15363         * server.c (handle_query): Add PACKET_LEN argument.  Support
15364         qXfer:spu:read and qXfer:spu:write packets.
15365         (main): Pass packet_len to handle_query.
15366         * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15367         * target.h (target_ops): Add qxfer_spu.
15368
15369 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
15370
15371         * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15372         accessing non-seekable spufs files.
15373
15374 2007-05-16  Markus Deuling  <deuling@de.ibm.com>
15375
15376         * server.c (handle_query): Add reply for qC packet.
15377
15378 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
15379             Leo Zayas  <lerele@champenstudios@com>
15380
15381         * server.h (check_remote_input_interrupt_request): New function.
15382         * remote_utils.c (INVALID_DESCRIPTOR): New define.
15383         (remote_desc): Initialize with INVALID_DESCRIPTOR.
15384         (input_interrupt): Expose on USE_WIN32API too.  Fix whitespace.
15385         (check_remote_input_interrupt_request): New function.
15386         * server.h (check_remote_input_interrupt_request): Declare.
15387         * win32-low.c (winapi_DebugBreakProcess,
15388         winapi_GenerateConsoleCtrlEvent): New typedefs.
15389         (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15390         to 250 ms.
15391         (win32_wait): Check for remote interrupt request
15392         with check_remote_input_interrupt_request.
15393         (win32_request_interrupt): New function.
15394         (win32_target_op): Set request_interrupt to win32_request_interrupt.
15395
15396 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
15397
15398         * win32-low.c (debug_registers_changed,
15399         debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15400         CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15401         CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15402         (thread_rec): Get context using the low target.
15403         (child_add_thread): Call thread_added on the low target,
15404         which does the same thing.
15405         (regptr): Delete.
15406         (do_initial_child_stuff): Remove debug registers references.
15407         Set context using the low target.  Resume threads after
15408         setting the contexts.
15409         (child_continue): Remove dead variable.  Remove debug
15410         registers references.
15411         (child_fetch_inferior_registers): Go through the low target.
15412         (do_child_store_inferior_registers): Remove.
15413         (child_store_inferior_registers): Go through the low target.
15414         (win32_resume): Remove debug registers references.
15415         Set context using the low target.
15416         (handle_exception): Change return type to void.  Don't record
15417         context here.  Set status to TARGET_WAITKIND_SPURIOUS on a
15418         first chance exception.
15419         (get_child_debug_event): Change return type to void.  Remove
15420         goto loop.  Always return after waiting for debug event.
15421         (win32_wait): Convert to switch statement.  Handle spurious
15422         events.
15423
15424         * win32-i386-low.c (debug_registers_changed,
15425         debug_registers_used): New.
15426         (initial_stuff): Rename to ...
15427         (i386_initial_stuff): ... this.  Clear debug registers
15428         state variables.
15429         (store_debug_registers): Delete.
15430         (i386_get_thread_context): New.
15431         (load_debug_registers): Delete.
15432         (i386_set_thread_context): New.
15433         (i386_thread_added): New.
15434         (single_step): Rename to ...
15435         (i386_single_step): ... this.
15436         (do_fetch_inferior_registers): Rename to ...
15437         (i386_fetch_inferior_register): ... this.
15438         (i386_store_inferior_register): New.
15439         (the_low_target): Adapt to new interface.
15440
15441         * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15442         (arm_get_thread_context): New.
15443         (arm_set_thread_context): New.
15444         (regptr): New.
15445         (do_fetch_inferior_registers): Rename to ...
15446         (arm_fetch_inferior_register): ... this.
15447         (arm_store_inferior_register): New.
15448         (arm_wince_breakpoint): Reimplement as unsigned long.
15449         (arm_wince_breakpoint_len): Define.
15450         (the_low_target): Adapt to new interface.
15451
15452         * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15453         load_debug_registers.  Add get_thread_context, set_thread_context,
15454         thread_added and store_inferior_register.  Rename
15455         fetch_inferior_registers to fetch_inferior_register.
15456         (regptr): Remove declaration.
15457
15458 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
15459
15460         * linux-low.c (linux_detach): Change return type to int.  Return 0.
15461         * spu-low.c (spu_detach): Likewise.
15462
15463 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
15464
15465         * target.h (target_ops): Change return type of detach to int.
15466         Add join.
15467         (join_inferior): New.
15468         * server.c (main): Don't skip detach support on mingw32.
15469         If the inferior doesn't support detaching return error.
15470         Call join_inferior instead of using waitpid.
15471         * linux-low.c (linux_join): New.
15472         (linux_target_op): Add linux_join.
15473         * spu-low.c (spu_join): New.
15474         (spu_target_ops): Add spu_join.
15475         * win32-low.c (win32_detach): Adapt to new interface.
15476         Reopen current_process_handle before detaching.  Issue a child
15477         resume before detaching.
15478         (win32_join): New.
15479         (win32_target_op): Add win32_join.
15480
15481 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
15482
15483         * win32-low.c (win32-attach): Fix return value.
15484         * target.h (target_ops): Describe ATTACH return values.
15485
15486 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
15487
15488         * win32-low.c (GETPROCADDRESS): Define.
15489         (winapi_DebugActiveProcessStop): Add WINAPI.  typedef as pointer.
15490         (winapi_DebugSetProcessKillOnExit): Likewise.
15491         (win32_create_inferior): Force usage of ansi CreateProcessA.
15492         (win32_attach): Use GETPROCADDRESS.
15493         (win32_detach): Likewise.
15494
15495 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
15496
15497         * win32-low.c (win32_wait): Don't use WSTOPSIG.
15498
15499 2007-03-30  Pedro Alves  <pedro_alves@portugalmail.pt>
15500
15501         * win32-low.c: Commit leftover changes from 2007-03-29.
15502
15503 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
15504
15505         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15506         fields short instead of int.  Add explicit padding.
15507         (i387_cache_to_fsave): Remove unnecessary casts.
15508         (i387_fsave_to_cache): Doc fix.
15509         (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15510
15511 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
15512
15513         * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15514         (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15515
15516 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
15517
15518         * configure.srv (arm*-*-mingw32ce*): Move near the other
15519         arm targets.
15520
15521 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
15522
15523         * configure.ac: Add errno checking.
15524         (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15525         sys/file.h and malloc.h.
15526         (AC_CHECK_DECLS): Add perror.
15527         (srv_mingwce): Handle.
15528         * configure.srv (i[34567]86-*-cygwin*): Add
15529         win32-i386-low.o to srv_tgtobj.
15530         (i[34567]86-*-mingw*): Likewise.
15531         (arm*-*-mingw32ce*): Add case.
15532         * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15533         HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15534         [__MINGW32CE__] (strerror): New function.
15535         [__MINGW32CE__] (errno): Define to GetLastError.
15536         [__MINGW32CE__] (COUNTOF): New macro.
15537         (remote_open): Remove extra close call.
15538         * mem-break.c (delete_breakpoint_at): New function.
15539         * mem-break.h (delete_breakpoint_at): Declare.
15540         * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15541         HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15542         [USE_WIN32API] (read, write): Add char* casts.
15543         * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15544         * server.h: Include wincecompat.h on Windows CE.
15545         [HAVE_ERRNO_H]: Check.
15546         (perror): Declare if not declared.
15547         * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15548         (perror_with_name): Remove errno declaration.
15549         * wincecompat.h: New.
15550         * wincecompat.c: New.
15551         * win32-low.h: New.
15552         * win32-arm-low.c: New.
15553         * win32-i386-low.c: New.
15554         (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15555         (OUTMSG2): Make it safe.
15556         (_T): New macro.
15557         (COUNTOF): New macro.
15558         (NUM_REGS): Get it from the low target.
15559         (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15560         CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15561         (thread_rec): Let low target handle debug registers.
15562         (child_add_thread): Likewise.
15563         (child_init_thread_list): Likewise.
15564         (continue_one_thread): Likewise.
15565         (regptr): New.
15566         (do_child_fetch_inferior_registers): Move to ...
15567         * win32-i386-low.c: ... here, and rename to ...
15568         (do_fetch_inferior_registers): ... this.
15569         * win32-low.c (child_fetch_inferior_registers):
15570         Go through the low target.
15571         (do_child_store_inferior_registers): Use regptr.
15572         (strwinerror): New function.
15573         (win32_create_inferior): Handle Windows CE.
15574         Use strwinerror instead of strerror on Windows error
15575         codes.  Add program to the error output.
15576         Don't close the main thread handle on Windows CE.
15577         (win32_attach): Use coredll.dll on Windows CE.
15578         (win32_kill): Close current process and current
15579         thread handles.
15580         (win32_detach): Use coredll.dll on Windows CE.
15581         (win32_resume): Let low target handle debug registers, and
15582         step request.
15583         (handle_exception): Add/Remove initial breakpoint.  Avoid
15584         non-existant WSTOPSIG on Windows CE.
15585         (win32_read_inferior_memory): Cast to remove warning.
15586         (win32_arch_string): Go through the low target.
15587         (initialize_low): Call set_breakpoint_data with the low
15588         target's breakpoint.
15589         * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15590         FOP_REGNUM, mappings): Move to ...
15591         * win32-i386-low.c: ... here.
15592         * win32-low.c (win32_thread_info): Move to ...
15593         * win32-low.h: ... here.
15594         * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15595         win32-arm-low.c and wincecompat.c.
15596         (all:): Add $EXEEXT.
15597         (install-only:): Likewise.
15598         (gdbserver:): Likewise.
15599         (gdbreplay:): Likewise.
15600         * config.in: Regenerate.
15601         * configure: Regenerate.
15602
15603 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
15604
15605         * win32-low.c: Rename typedef thread_info to
15606         win32_thread_info throughout.
15607
15608 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
15609
15610         * win32-i386-low.c: Rename to ...
15611         * win32-low.c: ... this.
15612         * configure.srv: Replace win32-i386-low.o with win32-low.o.
15613         * Makefile.in: Likewise.
15614
15615 2007-03-27  Pedro Alves  <pedro_alves@portugalmail.pt>
15616
15617         * remote-utils.c (monitor_output): Constify msg parameter.
15618         * server.h (monitor_output): Likewise.
15619         * win32-i386-low.c (handle_output_debug_string): New.
15620         (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15621         handle_output_debug_string.
15622         (get_child_debug_event): Likewise.
15623
15624 2007-03-27  Mat Hostetter  <mat@lcs.mit.edu>
15625
15626         * server.c (main): Correct strtoul check.
15627
15628 2007-03-27  Jon Ringle  <jon@ringle.org>
15629
15630         * linux-low.c: Check __ARCH_HAS_MMU__ also.
15631
15632 2007-03-27  Brooks Moses  <brooks.moses@codesourcery.com>
15633
15634         * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15635
15636 2007-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
15637
15638         * terminal.h: Check HAVE_SGTTY_H.
15639
15640 2007-02-27  Mat Hostetter  <mat@lcs.mit.edu>
15641
15642         * remote-utils.c (remote_open): Print out the assigned port number.
15643
15644 2007-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
15645
15646         * remote-utils.c (monitor_output): New function.
15647         * server.c (debug_threads): Define here.
15648         (monitor_show_help): New function.
15649         (handle_query): Handle qRcmd.
15650         (main): Do not handle 'd' packet.
15651         * server.h (debug_threads, remote_debug, monitor_output): Declare.
15652         * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15653         of debug_threads.
15654
15655 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
15656
15657         * Makefile.in (EXEEXT): New.
15658         (clean): Use $(EXEEXT).
15659
15660 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
15661
15662         * target.h (target_ops): Rename send_signal to request_interrupt,
15663         and remove enum target_signal parameter.
15664         * linux-low.c (linux_request_interrupt): Rename from
15665         linux_send_signal, and always send SIGINT.
15666         * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15667         and always send SIGINT.
15668         * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15669         of send_signal.
15670         (input_interrupt): Likewise.
15671
15672 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
15673
15674         * server.c (get_features_xml): Check if target implemented
15675         arch_string.
15676         * win32-i386-low.c (win32_arch_string): New.
15677         (win32_target_ops): Add win32_arch_string as arch_string member.
15678
15679 2007-02-22  Markus Deuling  <deuling@de.ibm.com>
15680
15681         * spu-low.c (spu_arch_string): New.
15682         (spu_target_ops): Add spu_arch_string.
15683
15684 2007-02-16  Daniel Jacobowitz  <dan@codesourcery.com>
15685
15686         * remote-utils.c: Remove HAVE_TERMINAL_H check.
15687         * configure.ac: Do not check for terminal.h.
15688         * configure, config.in: Regenerated.
15689
15690 2007-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
15691
15692         * Makefile.in (OBS): Add $(XML_BUILTIN).
15693         (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15694         (clean): Update.
15695         (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15696         (arm-with-iwmmxt.c): New.
15697         * config.in, configure: Regenerate.
15698         * configure.ac: Check for iWMMXt.  Handle srv_xmltarget,
15699         srv_xmlbuiltin, and srv_xmlfiles.  Define USE_XML.
15700         * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15701         (arm*-*-linux*): Add iWMMXt and regset support.
15702         * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15703         (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15704         (arm_store_wmmxregset, target_regsets): New.
15705         * server.c (get_features_xml): Take annex argument.  Check builtin
15706         XML documents.
15707         (handle_query): Handle multiple annexes.
15708
15709 2007-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
15710
15711         * remote-utils.c [USE_WIN32API] (read, write): Define.
15712         (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15713         write.
15714
15715 2007-01-09  Daniel Jacobowitz  <dan@codesourcery.com>
15716
15717         * linux-i386-low.c (the_low_target): Set arch_string.
15718         * linux-x86-64-low.c (the_low_target): Likewise.
15719         * linux-low.c (linux_arch_string): New.
15720         (linux_target_ops): Add it.
15721         * linux-low.h (struct linux_target_ops): Add arch_string.
15722         * server.c (write_qxfer_response): Use const void * for DATA.
15723         (get_features_xml): New.
15724         (handle_query): Handle qXfer:features:read.  Report it for qSupported.
15725         * target.h (struct target_ops): Add arch_string method.
15726
15727 2007-01-03  Denis Pilat  <denis.pilat@st.com>
15728             Daniel Jacobowitz  <dan@codesourcery.com>
15729
15730         * linux-low.c (linux_kill): Handle being called with no threads.
15731         * win32-i386-low.c (win32_kill): Likewise.
15732         (get_child_debug_event): Clear current_process_handle.
15733
15734 2006-12-30  Denis PILAT  <denis.pilat@st.com>
15735             Daniel Jacobowitz  <dan@codesourcery.com>
15736
15737         * remote-utils.c (remote_open): Check the type of specified
15738         serial port devices before opening them.
15739         * server.c (main): Kill the inferior if an error occurs during
15740         the first remote_open.
15741
15742 2006-12-05  Markus Deuling  <deuling@de.ibm.com>
15743
15744         * README: Update supported targets.
15745
15746 2006-11-28  Daniel Jacobowitz  <dan@codesourcery.com>
15747
15748         * Makefile.in (clean): Remove reg-mips64.c.
15749         (reg-mips64.c, reg-mips64.o): New rules.
15750         * configure.srv: Handle mips64.  Include regset support for mips.
15751         * linux-mips-low.c (union mips_register): New.
15752         (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15753         (mips_breakpoint, mips_breakpoint_at): Use int.
15754         (mips_collect_register, mips_supply_register)
15755         (mips_collect_register_32bit, mips_supply_register_32bit)
15756         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15757         (mips_store_fpregset, target_regsets): New.
15758         * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15759
15760 2006-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
15761
15762         * configure.srv: Add target "spu*-*-*".
15763         * Makefile.in (clean): Remove reg-spu.c.
15764         (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15765         * spu-low.c: New file.
15766
15767 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
15768
15769         * configure.ac: Correct td_thr_tls_get_addr test.
15770         * configure: Regenerated.
15771
15772 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
15773
15774         * linux-low.c (linux_wait_for_event): Reformat.  Use the
15775         pass_signals array.
15776         * remote-utils.c (decode_address_to_semicolon): New.
15777         * server.c (pass_signals, handle_general_set): New.
15778         (handle_query): Mention QPassSignals for qSupported.
15779         (main): Call handle_general_set.
15780         * server.h (pass_signals, decode_address_to_semicolon): New.
15781
15782 2006-11-06  Daniel Jacobowitz  <dan@codesourcery.com>
15783
15784         * server.c (handle_query): Correct error handling for read_auxv.
15785
15786 2005-10-19  Ulrich Weigand  <uweigand@de.ibm.com>
15787
15788         * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15789         and srv_linux_thread_db to yes.
15790         * linux-s390-low.c (s390_fill_gregset): New function.
15791         (target_regsets): Define data structure.
15792
15793 2006-10-17  Daniel Jacobowitz  <dan@codesourcery.com>
15794
15795         * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15796         * configure.ac: Use it.  Define HAVE_TD_THR_TLS_GET_ADDR.
15797         * config.in, configure: Regenerated.
15798         * inferiors.c (gdb_id_to_thread): New function.
15799         (gdb_id_to_thread_id): Use it.
15800         * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15801         * linux-low.h (struct process_info): Add th member.
15802         (thread_db_get_tls_address): New prototype.
15803         * remote-utils.c (decode_address): Make non-static.
15804         * server.c (handle_query): Handle qGetTLSAddr.
15805         * server.h (gdb_id_to_thread, decode_address): New prototypes.
15806         * target.h (struct target_ops): Add get_tls_address.
15807         * thread-db.c (maybe_attach_thread): Save the thread handle.
15808         (thread_db_get_tls_address): New.
15809
15810 2006-09-28  Daniel Jacobowitz  <dan@codesourcery.com>
15811
15812         * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15813         (linux_resume_one_process): Take a siginfo_t *.  Update all
15814         callers.  Queue it if necessary.  Use PTRACE_SETSIGINFO.
15815         (struct pending_signals): Add a siginfo_t.
15816         (linux_wait_for_process): Always set last_status.
15817         (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15818         (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15819         * linux-low.h (struct process_info): Add last_status.
15820
15821 2006-09-21  Daniel Jacobowitz  <dan@codesourcery.com>
15822
15823         * remote-utils.c (try_rle): New function.
15824         (putpkt_binary): Use it.
15825
15826 2006-08-19  Daniel Jacobowitz  <dan@codesourcery.com>
15827
15828         * Makefile.in (clean): Clean reg-x86-64-linux.c.
15829         (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15830         * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15831         * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15832         (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15833         point registers.
15834
15835 2006-08-08  Richard Sandiford  <richard@codesourcery.com>
15836
15837         * server.c (terminal_fd): New variable.
15838         (old_foreground_pgrp): Likewise.
15839         (restore_old_foreground_pgrp): New function.
15840         (start_inferior): Record the terminal file descriptor in terminal_fd
15841         and its original foreground group in old_foreground_pgrp.  Register
15842         restore_old_foreground_pgrp with atexit().
15843
15844 2006-07-26  Daniel Jacobowitz  <dan@codesourcery.com>
15845
15846         * server.c (handle_query): Correct qPart to qXfer.
15847
15848 2006-07-22  Daniel Jacobowitz  <dan@codesourcery.com>
15849
15850         * configure.ac: Check for more headers which are missing on
15851         Windows.  Automatically supply -lwsock32 and USE_WIN32API.
15852         * configure.srv: Add Cygwin and mingw32.
15853         * remote-utils.c: Don't include headers unconditionally which
15854         are missing on mingw32.  Include <winsock.h> for mingw32.
15855         (remote_open): Adjust for mingw32 support.  Flush
15856         standard error after writing to it.
15857         (remote_close, putpkt_binary, input_interrupt, block_async_io)
15858         (unblock_async_io, enable_async_io, disable_async_io)
15859         (readchar, getpkt): Update for Winsock support.
15860         (prepare_resume_reply): Expect a protocol signal number.
15861         * server.c: Disable <sys/wait.h> on mingw32.
15862         (start_inferior): Adjust for mingw32 support.  Flush
15863         standard error after writing to it.
15864         (attach_inferior): Likewise.  Use protocol signal
15865         numbers.
15866         (main): Skip 'D' packet on mingw32.  Use protocol signal numbers
15867         and names.
15868         * win32-i386-low.c: New file.
15869         * Makefile.in (XM_CLIBS): Set.
15870         (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15871         (win32-i386-low.o): New dependency rule.
15872         * linux-low.c (linux_wait): Use target signal numbers.
15873         * target.h (struct target_ops): Doc fix.
15874         * server.h (target_signal_to_name): New prototype.
15875         * gdbreplay.c: Don't include headers unconditionally which
15876         are missing on mingw32.  Include <winsock.h> for mingw32.
15877         (remote_close, remote_open): Adjust for Winsock support.
15878         * configure, config.in: Regenerated.
15879
15880 2006-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
15881
15882         * server.c (decode_xfer_read, write_qxfer_response): New.
15883         (handle_query): Take a packet length argument.  Handle
15884         qXfer:auxv:read instead of qPart:auxv:read.  Mention it in
15885         the qSupported response.
15886         (main): Update call to handle_query.
15887
15888 2006-06-22  Daniel Jacobowitz  <dan@codesourcery.com>
15889
15890         * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15891         (putpkt_binary): Renamed from putpkt and adjusted for binary
15892         data.
15893         (putpkt): New wrapper for putpkt_binary.
15894         (readchar): Don't mask off the high bit.
15895         (decode_X_packet): New function.
15896         * server.c (main): Call putpkt_binary if a handler sets the packet
15897         length.  Save the length of the incoming packet.  Handle 'X'.
15898         * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15899
15900 2006-06-21  Daniel Jacobowitz  <dan@codesourcery.com>
15901
15902         * server.c (handle_query): Handle qSupported.
15903
15904 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
15905
15906         * remote-utils.c (all_symbols_looked_up): New variable.
15907         (look_up_one_symbol): Check it.
15908         * server.h (look_up_one_symbol): New declaration.
15909         * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15910
15911 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
15912
15913         * Makefile.in (linux-arm-low.o): Update dependencies.
15914         * linux-arm-low.c: Include "gdb_proc_service.h".
15915         (PTRACE_GET_THREAD_AREA): Define.
15916         (ps_get_thread_area): New function.
15917
15918 2006-05-09  Nathan Sidwell  <nathan@codesourcery.com>
15919
15920         * configure.srv (m68k*-*-uclinux*): New target.
15921         * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15922         (linux_resume_one_process): Remove extraneous cast.
15923         (linux_read_offsets): New.
15924         (linux_target_op): Add linux_read_offsets on mmuless systems.
15925         * server.c (handle_query): Add qOffsets logic.
15926         * target.h (struct target_ops): Add read_offsets.
15927
15928 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
15929
15930         * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15931         (PTRACE_GET_THREAD_AREA): Define.
15932         (ps_get_thread_area): New function.
15933         * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15934         (linux-x86-64-low.o): Update.
15935
15936 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
15937
15938         * configure.ac: Remove checks for prfpregset_t.
15939         * gdb_proc_service.h: New file.
15940         * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15941         new "gdb_proc_service.h".
15942         * proc-service.c: Likewise.
15943         (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15944         (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15945         * Makefile.in (gdb_proc_service_h): Updated.
15946         * configure, config.in: Regenerated.
15947
15948 2006-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
15949
15950         * remote-utils.c (prepare_resume_reply): Move declaration
15951         of gdb_id_from_wait to the top of the block.
15952
15953 2006-02-15  Daniel Jacobowitz  <dan@codesourcery.com>
15954
15955         * linux-low.c (regsets_store_inferior_registers): Read the regset
15956         from the target before filling it.
15957
15958 2006-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
15959
15960         * server.c (attach_inferior): Return SIGTRAP for a successful
15961         attach.
15962
15963 2006-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
15964
15965         * Makefile.in (OBS): Add version.o.
15966         (STAGESTUFF): Delete.
15967         (version.o): Add dependencies.
15968         (version.c): Replace rule.
15969         (clean): Remove version.c.
15970         * server.c (gdbserver_version): New.
15971         (gdbserver_usage): Use printf.
15972         (main): Handle --version and --help.
15973         * server.h (version, host_name): Add declarations.
15974
15975 2005-12-23  Eli Zaretskii  <eliz@gnu.org>
15976
15977         * linux-arm-low.c:
15978         * linux-arm-low.c:
15979         * inferiors.c:
15980         * i387-fp.h:
15981         * i387-fp.c:
15982         * gdbreplay.c:
15983         * regcache.c:
15984         * proc-service.c:
15985         * mem-break.h:
15986         * mem-break.c:
15987         * linux-x86-64-low.c:
15988         * linux-sh-low.c:
15989         * linux-s390-low.c:
15990         * linux-ppc64-low.c:
15991         * linux-ppc-low.c:
15992         * linux-mips-low.c:
15993         * linux-m68k-low.c:
15994         * linux-m32r-low.c:
15995         * linux-low.h:
15996         * linux-low.c:
15997         * linux-ia64-low.c:
15998         * linux-i386-low.c:
15999         * linux-crisv32-low.c:
16000         * thread-db.c:
16001         * terminal.h:
16002         * target.h:
16003         * target.c:
16004         * server.h:
16005         * server.c:
16006         * remote-utils.c:
16007         * regcache.h:
16008         * utils.c:
16009         * Makefile.in:
16010         * configure.ac:
16011         * gdbserver.1: Add (C) after Copyright.  Update the FSF
16012         address.
16013
16014 2005-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
16015
16016         * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16017         (arm_breakpoint_at): Recognize both breakpoints.
16018         (the_low_target): Use the correct breakpoint instruction.
16019
16020 2005-11-02  Daniel Jacobowitz  <dan@codesourcery.com>
16021
16022         * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16023         * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16024         (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16025         (the_low_target): Update.
16026
16027 2005-10-25  Andreas Schwab  <schwab@suse.de>
16028
16029         * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16030
16031         * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16032         (ia64_num_regs): Reduce to 462.
16033
16034 2005-09-17  Daniel Jacobowitz  <dan@codesourcery.com>
16035
16036         * acinclude.m4: Correct quoting.
16037         * aclocal.m4: Regenerated.
16038
16039         Suggested by SZOKOVACS Robert <szo@ies.hu>:
16040         * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16041         (thread_db_init): Call thread_db_err_str.
16042         * configure.ac: Check for TD_VERSION.
16043         * config.in, configure: Regenerated.
16044
16045 2005-07-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16046
16047         * server.h (error, fatal, warning): Add ATTR_FORMAT.
16048
16049 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
16050
16051         * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16052         is not available.  Define HAVE_PTRACE_GETREGS if it is.
16053         * config.in, configure: Regenerated.
16054         * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16055         * linux-i386-low.c, linux-m68k-low.c: Update to use
16056         HAVE_PTRACE_GETREGS.
16057         * linux-low.c (regsets_fetch_inferior_registers)
16058         (regsets_store_inferior_registers): Only return 0 if we processed
16059         GENERAL_REGS.
16060         * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16061         * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16062
16063 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
16064
16065         * inferiors.c (struct thread_info): Add gdb_id.
16066         (add_thread): Add gdb_id argument.
16067         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16068         * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16069         calls to add_thread.
16070         * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16071         * server.c (handle_query): Use thread_to_gdb_id.
16072         (handle_v_cont, main): Use gdb_id_to_thread_id.
16073         * server.h (add_thread): Update prototype.
16074         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16075         prototypes.
16076
16077 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
16078
16079         * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16080         left-padded registers.
16081         * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16082         * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16083
16084 2005-07-01  Steve Ellcey  <sje@cup.hp.com>
16085
16086         * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16087         * configure: Regenerate.
16088         * config.in: Regenerate.
16089         * server.h (NEED_DECLARATION_STRERROR):
16090         Replace with !HAVE_DECL_STRERROR.
16091
16092 2005-06-16  Daniel Jacobowitz  <dan@codesourcery.com>
16093
16094         * linux-low.c (linux_wait, linux_send_signal): Don't test
16095         an unsigned long variable for > 0 if it could be MAX_ULONG.
16096         * server.c (myresume): Likewise.
16097         * target.c (set_desired_inferior): Likewise.
16098
16099 2005-06-13  Mark Kettenis  <kettenis@gnu.org>
16100
16101         * configure.ac: Simplify and improve check for socklen_t.
16102         * configure, config.in: Regenerate.
16103
16104 2005-06-12  Daniel Jacobowitz  <dan@codesourcery.com>
16105
16106         * acconfig.h: Remove.
16107         * configure.ac: Add a test for socklen_t.  Use three-argument
16108         AC_DEFINE throughout.
16109         * config.in: Regenerated using autoheader 2.59.
16110         * configure: Regenerated.
16111
16112         * gdbreplay.c (socklen_t): Provide a default.
16113         (remote_open): Use socklen_t.
16114         * remote-utils.c (socklen_t): Provide a default.
16115         (remote_open): Use socklen_t.
16116         (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16117         unsigned char.
16118
16119         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16120         char for buffers.
16121         * linux-low.c (linux_read_memory, linux_write_memory)
16122         (linux_read_auxv): Likewise.
16123         * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16124         (check_mem_write): Likewise.
16125         * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16126         Likewise.
16127         * regcache.c (struct inferior_rgcache_data, registers_to_string)
16128         (registers_from_string, register_data): Likewise.
16129         * server.c (handle_query, main): Likewise.
16130         * server.h (convert_ascii_to_int, convert_int_to_ascii)
16131         (decode_M_packet): Likewise.
16132         * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16133         * target.h (struct target_ops): Update read_memory, write_memory,
16134         and read_auxv.
16135         (read_inferior_memory, write_inferior_memory): Update.
16136         * linux-low.h (struct linux_target_ops): Change type of breakpoint
16137         to unsigned char *.
16138         * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16139         linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16140         linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16141         linux-s390-low.c, linux-sh-low.c: Update for changes in
16142         read_inferior_memory and the_low_target->breakpoint.
16143
16144 2005-05-28  Daniel Jacobowitz  <dan@codesourcery.com>
16145
16146         * Makefile.in (SFILES): Add linux-ppc64-low.c.
16147         (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16148         * configure.srv: Add powerpc64-*-linux*.
16149         * linux-ppc64-low.c: New file.
16150
16151 2005-05-23  Orjan Friberg  <orjanf@axis.com>
16152
16153         * linux-cris-low.c: New file with support for CRIS.
16154         * linux-crisv32-low.c: Ditto for CRISv32.
16155         * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16156         (clean): Add reg-cris.c and reg-crisv32.c.
16157         Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16158         reg-crisv32.o, and reg-crisv32.c to make rules.
16159         * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16160         recognized targets.
16161
16162 2005-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
16163
16164         * linux-low.c (fetch_register): Ensure buffer size is a multiple
16165         of sizeof (PTRACE_XFER_TYPE).
16166         (usr_store_inferior_registers): Likewise.  Zero out excess bytes.
16167
16168 2005-05-12  Orjan Friberg  <orjanf@axis.com>
16169
16170         * target.h (struct target_ops): Add insert_watchpoint,
16171         remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16172         pointers for hardware watchpoint support.
16173         * linux-low.h (struct linux_target_ops): Ditto.
16174         * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16175         (linux_stopped_by_watchpoint, linux_stopped_data_address): New.  Add
16176         to linux_target_ops.
16177         * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16178         reply packet.
16179         * server.c (main): Recognize 'Z' and 'z' packets.
16180
16181 2005-05-10  Ulrich Weigand  <uweigand@de.ibm.com>
16182
16183         * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16184         (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16185         (the_low_target): Add new members.
16186
16187 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
16188
16189         * proc-service.c (ps_lgetregs): Search all_processes instead of
16190         all_threads.
16191
16192 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
16193
16194         * server.c (start_inferior): Change return type to int.
16195         (attach_inferior): Change sigptr to int *.
16196         (handle_v_cont, handle_v_requests): Change signal to int *.
16197         (main): Change signal to int.
16198
16199 2005-04-15  Kei Sakamoto  <sakamoto.kei@renesas.com>
16200
16201         * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16202         * configure.srv: Add m32r*-*-linux*.
16203         * linux-m32r-low.c: New file.
16204
16205 2005-03-04  Daniel Jacobowitz  <dan@codesourcery.com>
16206
16207         * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16208
16209 2005-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
16210
16211         * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16212         Take unsigned long arguments for PIDs.
16213         * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16214         (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16215         (wait_for_sigstop, linux_resume_one_process)
16216         (regsets_fetch_inferior_registers, linux_send_signal)
16217         (linux_read_auxv): Likewise.  Update the types of variables holding
16218         PIDs.  Update format string specifiers.
16219         * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16220         * remote-utils.c (prepare_resume_reply): Likewise.
16221         * server.c (cont_thread, general_thread, step_thread)
16222         (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16223         unsigned long.
16224         (handle_query): Update format specifiers.
16225         (handle_v_cont, main): Use strtoul for thread IDs.
16226         * server.h (struct inferior_list_entry): Use unsigned long for ID.
16227         (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16228         (general_thread, step_thread, thread_from_wait)
16229         (old_thread_from_wait): Update.
16230         * target.h (struct thread_resume): Use unsigned long for THREAD.
16231         (struct target_ops): Use unsigned long for arguments to attach and
16232         thread_alive.
16233
16234 2005-02-24  Daniel Jacobowitz  <dan@codesourcery.com>
16235
16236         * acinclude.m4: Include bfd/bfd.m4 directly.
16237         * configure.ac: Use AC_ARG_PROGRAM.  Suggested by Aron Griffis
16238         <agriffis@toolchain.org>.
16239         * aclocal.m4, configure: Regenerated.
16240
16241 2005-01-07  Andrew Cagney  <cagney@gnu.org>
16242
16243         * configure.ac: Rename configure.in, require autoconf 2.59.
16244         * configure: Re-generate.
16245
16246 2004-12-08  Daniel Jacobowitz  <dan@debian.org>
16247
16248         * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area.  Reset
16249         LIBS when finished.
16250         * aclocal.m4: Regenerated.
16251         * configure: Regenerated.
16252
16253 2004-11-21  Andreas Schwab  <schwab@suse.de>
16254
16255         * linux-m68k-low.c (m68k_num_gregs): Define.
16256         (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16257         (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16258         (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16259         (m68k_breakpoint_at): New.  Add to the_low_target.
16260
16261         * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16262         srv_linux_thread_db to yes.
16263
16264 2004-10-20  Joel Brobecker  <brobecker@gnat.com>
16265
16266         * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16267         (ARCH_SET_FS): Likewise.
16268         (ARCH_GET_FS): Likewise.
16269         (ARCH_GET_GS): Likewise.
16270
16271 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
16272
16273         * linux-i386-low.c (ps_get_thread_area): New.
16274         * linux-x86-64-low.c (ps_get_thread_area): New.
16275         * linux-low.c: Include <sys/syscall.h>.
16276         (linux_kill_one_process): Don't kill the first thread here.
16277         (linux_kill): Kill the first thread here.
16278         (kill_lwp): New function.
16279         (send_sigstop, linux_send_signal): Use it.
16280         * proc-service.c: Clean up #ifdefs.
16281         (fpregset_info): Delete.
16282         (ps_lgetregs): Update and enable implementation.
16283         (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16284         implementations.
16285         * remote-utils.c (struct sym_cache, symbol_cache): New.
16286         (input_interrupt): Print a clearer message.
16287         (async_io_enabled): New variable.
16288         (enable_async_io, disable_async_io): Use it.  Update comments.
16289         (look_up_one_symbol): Use the symbol cache.
16290         * thread-db.c (thread_db_look_up_symbols): New function.
16291         (thread_db_init): Update comments.  Call thread_db_look_up_symbols.
16292
16293 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
16294
16295         * configure.in: Test for -rdynamic.
16296         * configure: Regenerated.
16297         * Makefile (INTERNAL_LDFLAGS): New.
16298         (gdbserver, gdbreplay): Use it.
16299
16300 2004-09-02  Andrew Cagney  <cagney@gnu.org>
16301
16302         * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16303
16304 2004-03-23  Daniel Jacobowitz  <drow@mvista.com>
16305
16306         * linux-low.c (linux_wait): Clear all_processes list also.
16307
16308 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
16309
16310         * linux-low.c: Include <errno.h>.  Remove extern declaration of
16311         errno.
16312
16313 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
16314
16315         * gdbreplay.c, server.h, utils.c: Update copyright years.
16316
16317 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
16318
16319         * server.c (main): Print child status or termination signal from
16320         variable 'signal', not 'sig'.
16321
16322 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
16323
16324         * linux-low.c (linux_read_memory): Change return type to
16325         int.  Check for and return error from ptrace().
16326         * target.c (read_inferior_memory): Change return type to int.  Pass
16327         back return status from the_target->read_memory().
16328         * target.h (struct target_ops): Adapt *read_memory() prototype.
16329         Update comment.
16330         (read_inferior_memory): Adapt prototype.
16331         * server.c (main): Return an error packet if
16332         read_inferior_memory() returns an error.
16333
16334 2004-03-04  Daniel Jacobowitz  <drow@mvista.com>
16335
16336         * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16337         Unify with other clean targets.
16338
16339 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
16340
16341         * server.c (handle_v_cont): Call set_desired_inferior.
16342
16343 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
16344
16345         * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16346
16347 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
16348
16349         * linux-low.c (linux_wait): Unblock async I/O.
16350         (linux_resume): Block and enable async I/O.
16351         * remote-utils.c (block_async_io, unblock_async_io): New functions.
16352         * server.h (block_async_io, unblock_async_io): Add prototypes.
16353
16354 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
16355
16356         * remote-utils.c (remote_open): Print a status notice after
16357         opening a TCP port.
16358         * server.c (attach_inferior): Print a status notice after
16359         attaching.
16360
16361 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
16362
16363         * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16364
16365 2004-02-26  Daniel Jacobowitz  <drow@mvista.com>
16366
16367         * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16368         error packet.
16369         * server.c, target.h: Update copyright years.
16370
16371 2004-02-25  Roland McGrath  <roland@redhat.com>
16372
16373         * target.h (struct target_ops): New member `read_auxv'.
16374         * server.c (handle_query): Handle qPart:auxv:read: query using that.
16375         * linux-low.c (linux_read_auxv): New function.
16376         (linux_target_ops): Initialize `read_auxv' member to that.
16377
16378 2004-02-17  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16379
16380         Committed by Jim Blandy  <jimb@redhat.com>.
16381
16382         * linux-s390-low.c (s390_num_regs): Update.
16383         (s390_regmap): Remove control registers.  Use __s390x__ predefine
16384         instead of GPR_SIZE to distiguish s390 and s390x targets.
16385
16386 2004-01-31  Daniel Jacobowitz  <drow@mvista.com>
16387
16388         * linux-low.c: Update copyright year.
16389         (check_removed_breakpoint): Clear pending_is_breakpoint.
16390         (linux_set_resume_request, linux_queue_one_thread)
16391         (resume_status_pending_p): New functions.
16392         (linux_continue_one_thread): Use process->resume.
16393         (linux_resume): Only resume threads if there are no pending events.
16394         * linux-low.h (struct process_info): Add resume request
16395         pointer.
16396
16397 2004-01-30  Daniel Jacobowitz  <drow@mvista.com>
16398
16399         * regcache.c (new_register_cache): Clear the allocated register
16400         buffer.  Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16401
16402 2003-10-13  Daniel Jacobowitz  <drow@mvista.com>
16403
16404         * linux-low.c (linux_resume): Take a struct thread_resume *
16405         argument.
16406         (linux_wait): Update call.
16407         (resume_ptr): New static variable.
16408         (linux_continue_one_thread): Renamed from
16409         linux_continue_one_process.  Use resume_ptr.
16410         (linux_resume): Use linux_continue_one_thread.
16411         * server.c (handle_v_cont, handle_v_requests): New functions.
16412         (myresume): New function.
16413         (main): Handle 'v' case.
16414         * target.h (struct thread_resume): New type.
16415         (struct target_ops): Change argument of "resume" to struct
16416         thread_resume *.
16417         (myresume): Delete macro.
16418
16419 2003-08-08  H.J. Lu  <hongjiu.lu@intel.com>
16420
16421         * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16422         (uninstall): Support DESTDIR.
16423
16424 Mon Jul 21 20:09:34 UTC 2003  Brendan Conoboy  <blc@redhat.com>
16425
16426         * configure.srv: Add xscale*linux copy of arm*linux entry.
16427
16428 2003-07-24  Daniel Jacobowitz  <drow@mvista.com>
16429
16430         * linux-arm-low.c (arm_reinsert_addr): New function.
16431         (the_low_target): Add arm_reinsert_addr.
16432
16433 2003-07-08  Mark Kettenis  <kettenis@gnu.org>
16434
16435         * mem-break.c: Remove whitespace at end of file.
16436
16437 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
16438
16439         * configure.in: Check whether we need to prototype strerror.
16440         * server.h: Optionally prototype strerror.
16441         * gdbreplay.c (perror_with_name): Use strerror.
16442         * linux-low.c (linux_attach_lwp): Use strerror.
16443         * utils.c (perror_with_name): Use strerror.
16444         * config.in, configure: Regenerated.
16445
16446 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
16447
16448         * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16449         SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16450
16451 2003-06-20  Daniel Jacobowitz  <drow@mvista.com>
16452
16453         * Makefile.in (SFILES): Update.
16454         * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16455         low-sun3.c: Remove files.
16456
16457 2003-06-17  Daniel Jacobowitz  <drow@mvista.com>
16458
16459         * linux-low.c: Move comment to linux_thread_alive where it belonged.
16460         (linux_detach_one_process, linux_detach): New functions.
16461         (linux_target_ops): Add linux_detach.
16462         * server.c (main): Handle 'D' packet.
16463         * target.h (struct target_ops): Add "detach" member.
16464         (detach_inferior): Define.
16465
16466 2003-06-13  Mark Kettenis  <kettenis@gnu.org>
16467
16468         From Kelley Cook  <kelleycook@wideopenwest.com>:
16469         * configure.srv: Accept i[34567]86 variants.
16470
16471 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
16472
16473         * linux-low.c (linux_wait_for_event): Correct comment typos.
16474         (linux_resume_one_process): Call check_removed_breakpoint.
16475         (linux_send_signal): New function.
16476         (linux_target_ops): Add linux_send_signal.
16477         * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16478         of kill.
16479         * target.h (struct target_ops): Add send_signal.
16480
16481 2003-05-29  Jim Blandy  <jimb@redhat.com>
16482
16483         * linux-low.c (usr_store_inferior_registers): Transfer buf in
16484         PTRACE_XFER_TYPE-sized chunks, not int-sized chunks.  Otherwise,
16485         if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16486         away part of the register's value.
16487
16488 2003-03-26  Daniel Jacobowitz  <drow@mvista.com>
16489
16490         * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16491         (linux_wait_for_event, linux_init_signals): Likewise.
16492
16493 2003-03-17  Daniel Jacobowitz  <drow@mvista.com>
16494
16495         * configure.in: Check for stdlib.h.
16496         * configure: Regenerated.
16497         * config.in: Regenerated.
16498
16499 2003-01-04  Andreas Schwab  <schwab@suse.de>
16500
16501         * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16502
16503 2003-01-02  Andrew Cagney  <ac131313@redhat.com>
16504
16505         * Makefile.in: Remove obsolete code.
16506
16507 2002-11-20  Daniel Jacobowitz  <drow@mvista.com>
16508
16509         * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16510         defined(PT_FPR0_HI).
16511
16512 2002-11-17  Stuart Hughes  <seh@zee2.com>
16513
16514         * linux-arm-low.c (arm_num_regs): Increase.
16515         (arm_regmap): Include status register.
16516
16517 2002-11-17  Daniel Jacobowitz  <drow@mvista.com>
16518
16519         * linux-low.c (register_addr): Remove incorrect -1 check.
16520
16521 2002-08-29  Daniel Jacobowitz  <drow@mvista.com>
16522
16523         * linux-low.c (linux_create_inferior): Call setpgid.  Return
16524         the new PID.
16525         (unstopped_p, linux_signal_pid): Remove.
16526         (linux_target_ops): Remove linux_signal_pid.
16527         * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16528         global instead of target method.
16529         * target.h (struct target_ops): Remove signal_pid.  Update comment
16530         for create_inferior.
16531         * server.c (signal_pid): New variable.
16532         (create_inferior): Set signal_pid.  Block SIGTTOU and SIGTTIN in
16533         gdbserver.  Set the child to be the foreground process group.
16534         (attach_inferior): Set signal_pid.
16535
16536 2002-08-23  Daniel Jacobowitz  <drow@mvista.com>
16537
16538         * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16539
16540 2002-08-20  Jim Blandy  <jimb@redhat.com>
16541
16542         * Makefile.in (LDFLAGS): Allow the configure script to establish a
16543         default for this.
16544
16545 2002-08-01  Andrew Cagney  <cagney@redhat.com>
16546
16547         * Makefile.in: Make chill references obsolete.
16548
16549 2002-07-24  Kevin Buettner  <kevinb@redhat.com>
16550
16551         * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16552         * configure: Regenerate.
16553         * config.in: Regenerate.
16554
16555 2002-07-09  David O'Brien  <obrien@FreeBSD.org>
16556
16557         * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16558         (perror_with_name, remote_close, remote_open, expect, play): Static.
16559
16560 2002-07-04  Michal Ludvig  <mludvig@suse.cz>
16561
16562         * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16563         byte offsets instead of an array of indexes.
16564         (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16565
16566 2002-06-13  Daniel Jacobowitz  <drow@mvista.com>
16567
16568         * regcache.c: Add comment.
16569
16570 2002-06-11  Daniel Jacobowitz  <drow@mvista.com>
16571
16572         * thread-db.c: New file.
16573         * proc-service.c: New file.
16574         * acinclude.m4: New file.
16575         * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16576         proc-service.o, and thread-db.o.
16577         (linux-low.o): Add USE_THREAD_DB.
16578         * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16579         HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16580         * aclocal.m4: Regenerated.
16581         * config.in: Regenerated.
16582         * configure: Regenerated.
16583         * configure.in: Check for proc_service.h, sys/procfs.h,
16584         thread_db.h, and linux/elf.h headrs.
16585         Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16586         PRFPREGSET_T_BROKEN.  Introduce srv_thread_depfiles and USE_THREAD_DB.
16587         Check for -lthread_db and thread support.
16588         * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16589         PowerPC, and SuperH.
16590         * i387-fp.c: Constify arguments.
16591         * i387-fp.h: Likewise.
16592         * inferiors.c: (struct thread_info): Renamed from
16593         `struct inferior_info'.  Remove PID member.  Use generic inferior
16594         list header.  All uses updated.
16595         (inferiors, signal_pid): Removed.
16596         (all_threads): New variable.
16597         (get_thread): Define.
16598         (add_inferior_to_list): New function.
16599         (for_each_inferior): New function.
16600         (change_inferior_id): New function.
16601         (add_inferior): Removed.
16602         (remove_inferior): New function.
16603         (add_thread): New function.
16604         (free_one_thread): New function.
16605         (remove_thread): New function.
16606         (clear_inferiors): Use for_each_inferior and free_one_thread.
16607         (find_inferior): New function.
16608         (find_inferior_id): New function.
16609         (inferior_target_data): Update argument type.
16610         (set_inferior_target_data): Likewise.
16611         (inferior_regcache_data): Likewise.
16612         (set_inferior_regcache_data): Likewise.
16613         * linux-low.c (linux_bp_reinsert): Remove.
16614         (all_processes, stopping_threads, using_thrads)
16615         (struct pending_signals, debug_threads, pid_of): New.
16616         (inferior_pid): Replace with macro.
16617         (struct inferior_linux_data): Remove.
16618         (get_stop_pc, add_process): New functions.
16619         (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16620         Use add_process and add_thread.
16621         (linux_attach_lwp): New function, based on old linux_attach.  Use
16622         add_process and add_thread.  Set stop_expected for new threads.
16623         (linux_attach): New function.
16624         (linux_kill_one_process): New function.
16625         (linux_kill): Kill all LWPs.
16626         (linux_thread_alive): Use find_inferior_id.
16627         (check_removed_breakpoints, status_pending_p): New functions.
16628         (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16629         Update.  Use WNOHANG.  Wait for cloned processes also.  Update process
16630         struct for the found process.
16631         (linux_wait_for_event): New function.
16632         (linux_wait): Use it.  Support LWPs.
16633         (send_sigstop, wait_for_sigstop, stop_all_processes)
16634         (linux_resume_one_process, linux_continue_one_process): New functions.
16635         (linux_resume): Support LWPs.
16636         (REGISTER_RAW_SIZE): Remove.
16637         (fetch_register): Use register_size instead.  Call supply_register.
16638         (usr_store_inferior_registers): Likewise.  Call collect_register.
16639         Fix recursive case.
16640         (regsets_fetch_inferior_registers): Improve error message.
16641         (regsets_store_inferior_registers): Add debugging.
16642         (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16643         (unstopped_p, linux_signal_pid): New functions.
16644         (linux_target_ops): Add linux_signal_pid.
16645         (linux_init_signals): New function.
16646         (initialize_low): Call it.  Initialize using_threads.
16647         * regcache.c (inferior_regcache_data): Add valid
16648         flag.
16649         (get_regcache): Fetch registers lazily.  Add fetch argument
16650         and update all callers.
16651         (regcache_invalidate_one, regcache_invalidate): New
16652         functions.
16653         (new_register_cache): Renamed from create_register_cache.
16654         Return the new regcache.
16655         (free_register_cache): Change argument to a void *.
16656         (registers_to_string, registers_from_string): Call get_regcache
16657         with fetch flag set.
16658         (register_data): Make static.  Pass fetch flag to get_regcache.
16659         (supply_register): Call get_regcache with fetch flag clear.
16660         (collect_register): Call get_regcache with fetch flag set.
16661         (collect_register_as_string): New function.
16662         * regcache.h: Update.
16663         * remote-utils.c (putpkt): Flush after debug output and use
16664         stderr.
16665         Handle input interrupts while waiting for an ACK.
16666         (input_interrupt): Use signal_pid method.
16667         (getpkt): Flush after debug output and use stderr.
16668         (outreg): Use collect_register_as_string.
16669         (new_thread_notify, dead_thread_notify): New functions.
16670         (prepare_resume_reply): Check using_threads.  Set thread_from_wait
16671         and general_thread.
16672         (look_up_one_symbol): Flush after debug output.
16673         * server.c (step_thread, server_waiting): New variables.
16674         (start_inferior): Don't use signal_pid.  Update call to mywait.
16675         (attach_inferior): Update call to mywait.
16676         (handle_query): Handle qfThreadInfo and qsThreadInfo.
16677         (main): Don't fetch/store registers explicitly.  Use
16678         set_desired_inferior.  Support proposed ``Hs'' packet.  Update
16679         calls to mywait.
16680         * server.h: Update.
16681         (struct inferior_list, struct_inferior_list_entry): New.
16682         * target.c (set_desired_inferior): New.
16683         (write_inferior_memory): Constify.
16684         (mywait): New function.
16685         * target.h: Update.
16686         (struct target_ops): New signal_pid method.
16687         (mywait): Removed macro, added prototype.
16688
16689         * linux-low.h (regset_func): Removed.
16690         (regset_fill_func, regset_store_func): New.
16691         (enum regset_type): New.
16692         (struct regset_info): Add type field.  Use new operation types.
16693         (struct linux_target_ops): stop_pc renamed to get_pc.
16694         Add decr_pc_after_break and breakpoint_at.
16695         (get_process, get_thread_proess, get_process_thread)
16696         (strut process_info, all_processes, linux_attach_lwp)
16697         (thread_db_init): New.
16698
16699         * linux-arm-low.c (arm_get_pc, arm_set_pc,
16700         arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16701         (the_low_target): Add new members.
16702         * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16703         (i386_store_fpxregset): Constify.
16704         (target_regsets): Add new kind identifier.
16705         (i386_get_pc): Renamed from i386_stop_pc.  Simplify.
16706         (i386_set_pc): Add debugging.
16707         (i386_breakpoint_at): New function.
16708         (the_low_target): Add new members.
16709         * linux-mips-low.c (mips_get_pc, mips_set_pc)
16710         (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16711         (mips_breakpoint_at): New.
16712         (the_low_target): Add new members.
16713         * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16714         (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16715         (the_low_target): Add new members.
16716         * linux-sh-low.c (sh_get_pc, sh_set_pc)
16717         (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16718         (the_low_target): Add new members.
16719         * linux-x86-64-low.c (target_regsets): Add new kind
16720         identifier.
16721
16722 2002-05-15  Daniel Jacobowitz  <drow@mvista.com>
16723
16724         From Martin Pool <mbp@samba.org>:
16725         * server.c (gdbserver_usage): New function.
16726         (main): Call it.
16727
16728 2002-05-14  Daniel Jacobowitz  <drow@mvista.com>
16729
16730         * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16731         stop_at -> stop_pc.
16732
16733 2002-05-04  Andrew Cagney  <ac131313@redhat.com>
16734
16735         * Makefile.in: Remove obsolete code.
16736
16737 2002-04-24  Michal Ludvig  <mludvig@suse.cz>
16738
16739         * linux-low.c (regsets_fetch_inferior_registers),
16740         (regsets_store_inferior_registers): Removed cast to int from
16741         ptrace() calls.
16742         * regcache.h: Added declaration of struct inferior_info.
16743
16744 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
16745
16746         * inferiors.c (struct inferior_info): Add regcache_data.
16747         (add_inferior): Call create_register_cache.
16748         (clear_inferiors): Call free_register_cache.
16749         (inferior_regcache_data, set_inferior_regcache_data): New functions.
16750         * regcache.c (struct inferior_regcache_data): New.
16751         (registers): Remove.
16752         (get_regcache): New function.
16753         (create_register_cache, free_register_cache): New functions.
16754         (set_register_cache): Don't initialize the register cache here.
16755         (registers_to_string, registers_from_string, register_data): Call
16756         get_regcache.
16757         * regcache.h: Add prototypes.
16758         * server.h: Likewise.
16759
16760 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
16761
16762         * mem-break.c: New file.
16763         * mem-break.h: New file.
16764         * Makefile.in: Add mem-break.o rule; update server.h
16765         dependencies.
16766         * inferiors.c (struct inferior_info): Add target_data
16767         member.
16768         (clear_inferiors): Free target_data member if set.
16769         (inferior_target_data, set_inferior_target_data): New functions.
16770         * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16771         (i386_stop_pc, i386_set_pc): New.  Add to the_low_target.
16772         * linux-low.c (linux_bp_reinsert): New variable.
16773         (struct inferior_linux_data): New.
16774         (linux_create_inferior): Use set_inferior_target_data.
16775         (linux_attach): Likewise.  Call add_inferior.
16776         (linux_wait_for_one_inferior): New function.
16777         (linux_wait): Call it.
16778         (linux_write_memory): Add const.
16779         (initialize_low): Call set_breakpoint_data.
16780         * linux-low.h (struct linux_target_ops): Add breakpoint
16781         handling members.
16782         * server.c (attach_inferior): Remove extra add_inferior
16783         call.
16784         * server.h: Include mem-break.h.  Update inferior.c
16785         prototypes.
16786         * target.c (read_inferior_memory)
16787         (write_inferior_memory): New functions.
16788         * target.h (read_inferior_memory)
16789         (write_inferior_memory): Change macros to prototypes.
16790         (struct target_ops): Update comments.  Add const to write_memory
16791         definition.
16792
16793 2002-04-11  Daniel Jacobowitz  <drow@mvista.com>
16794
16795         * linux-low.c (usr_store_inferior_registers): Support
16796         registers which are allowed to fail to store.
16797         * linux-low.h (linux_target_ops): Likewise.
16798         * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16799         (ppc_cannot_store_register): FPSCR may not be storable.
16800
16801 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
16802
16803         * server.h: Include <string.h> if HAVE_STRING_H.
16804         * ChangeLog: Correct paths in last ChangeLog entry.
16805
16806 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
16807
16808         * linux-low.h: Remove obsolete prototypes.
16809         (struct linux_target_ops): New.
16810         (extern the_low_target): New.
16811         * linux-low.c (num_regs, regmap): Remove declarations.
16812         (register_addr): Use the_low_target explicitly.
16813         (fetch_register): Likewise.
16814         (usr_fetch_inferior_registers): Likewise.
16815         (usr_store_inferior_registers): Likewise.
16816         * linux-arm-low.c (num_regs): Remove.
16817         (arm_num_regs): Define.
16818         (arm_regmap): Renamed from regmap, made static.
16819         (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16820         made static.
16821         (arm_cannot_store_register): Renamed from cannot_store_register,
16822         made static.
16823         (the_low_target): New.
16824         * linux-i386-low.c (num_regs): Remove.
16825         (i386_num_regs): Define.
16826         (i386_regmap): Renamed from regmap, made static.
16827         (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16828         made static.
16829         (i386_cannot_store_register): Renamed from cannot_store_register,
16830         made static.
16831         (the_low_target): New.
16832         * linux-ia64-low.c (num_regs): Remove.
16833         (ia64_num_regs): Define.
16834         (ia64_regmap): Renamed from regmap, made static.
16835         (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16836         made static.
16837         (ia64_cannot_store_register): Renamed from cannot_store_register,
16838         made static.
16839         (the_low_target): New.
16840         * linux-m68k-low.c (num_regs): Remove.
16841         (m68k_num_regs): Define.
16842         (m68k_regmap): Renamed from regmap, made static.
16843         (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16844         made static.
16845         (m68k_cannot_store_register): Renamed from cannot_store_register,
16846         made static.
16847         (the_low_target): New.
16848         * linux-mips-low.c (num_regs): Remove.
16849         (mips_num_regs): Define.
16850         (mips_regmap): Renamed from regmap, made static.
16851         (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16852         made static.
16853         (mips_cannot_store_register): Renamed from cannot_store_register,
16854         made static.
16855         (the_low_target): New.
16856         * linux-ppc-low.c (num_regs): Remove.
16857         (ppc_num_regs): Define.
16858         (ppc_regmap): Renamed from regmap, made static.
16859         (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16860         made static.
16861         (ppc_cannot_store_register): Renamed from cannot_store_register,
16862         made static.
16863         (the_low_target): New.
16864         * linux-s390-low.c (num_regs): Remove.
16865         (s390_num_regs): Define.
16866         (s390_regmap): Renamed from regmap, made static.
16867         (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16868         made static.
16869         (s390_cannot_store_register): Renamed from cannot_store_register,
16870         made static.
16871         (the_low_target): New.
16872         * linux-sh-low.c (num_regs): Remove.
16873         (sh_num_regs): Define.
16874         (sh_regmap): Renamed from regmap, made static.
16875         (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16876         made static.
16877         (sh_cannot_store_register): Renamed from cannot_store_register,
16878         made static.
16879         (the_low_target): New.
16880         * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16881         (the_low_target): New.
16882
16883 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
16884
16885         * Makefile.in: Add stamp-h target.
16886         * configure.in: Create stamp-h.
16887         * configure: Regenerated.
16888
16889 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
16890
16891         * inferiors.c: New file.
16892         * target.c: New file.
16893         * target.h: New file.
16894         * Makefile.in:  Add target.o and inferiors.o.  Update
16895         dependencies.
16896         * linux-low.c (inferior_pid): New static variable,
16897         moved from server.c.
16898         (linux_create_inferior): Renamed from create_inferior.
16899         Call add_inferior.  Return 0 on success instead of a PID.
16900         (linux_attach): Renamed from myattach.
16901         (linux_kill): Renamed from kill_inferior.  Call clear_inferiors ().
16902         (linux_thread_alive): Renamed from mythread_alive.
16903         (linux_wait): Renamed from mywait.  Call clear_inferiors () if the
16904         child dies.
16905         (linux_resume): Renamed from myresume.  Add missing ``return 0''.
16906         (regsets_store_inferior_registers): Correct error message.
16907         Add missing ``return 0''.
16908         (linux_fetch_registers): Renamed from fetch_inferior_registers.
16909         (linux_store_registers): Renamed from store_inferior_registers.
16910         (linux_read_memory): Renamed from read_inferior_memory.
16911         (linux_write_memory): Renamed from write_inferior_memory.
16912         (linux_target_ops): New structure.
16913         (initialize_low): Call set_target_ops ().
16914         * remote-utils.c (unhexify): New function.
16915         (hexify): New function.
16916         (input_interrupt): Send signals to ``signal_pid''.
16917         * server.c (inferior_pid): Remove.
16918         (start_inferior): Update create_inferior call.
16919         (attach_inferior): Call add_inferior.
16920         (handle_query): New function.
16921         (main): Call handle_query for `q' packets.
16922         * server.h: Include "target.h".  Remove obsolete prototypes.
16923         Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16924
16925 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
16926
16927         * Makefile.in: Add WARN_CFLAGS.  Update configury
16928         dependencies.
16929         * configure.in: Check for <string.h>
16930         * configure: Regenerate.
16931         * config.in: Regenerate.
16932         * gdbreplay.c: Include needed system headers.
16933         (remote_open): Remove strchr prototype.
16934         * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16935         * regcache.c (supply_register): Change buf argument to const void *.
16936         (supply_register_by_name): Likewise.
16937         (collect_register): Change buf argument to void *.
16938         (collect_register_by_name): Likewise.
16939         * regcache.h: Add missing prototypes.
16940         * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16941         * server.c (handle_query): New function.
16942         (attached): New static variable, moved out of main.
16943         (main): Quiet longjmp clobber warnings.
16944         * server.h: Add ATTR_NORETURN and ATTR_FORMAT.  Update prototypes.
16945         * utils.c (error): Remove NORETURN.
16946         (fatal): Likewise.