c9979ed330f9cf9536eef54139a7dcb2df89dd81
[external/binutils.git] / gdb / gdbserver / ChangeLog
1 2018-09-16  Tom Tromey  <tom@tromey.com>
2
3         * remote-utils.c (remote_open): Use GNU style for metasyntactic
4         variables.
5         * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
6         variables.
7
8 2018-09-05  Tom Tromey  <tom@tromey.com>
9
10         * configure: Rebuild.
11
12 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
13
14         PR build/23399
15         * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
16
17 2018-08-27  Tom Tromey  <tom@tromey.com>
18
19         PR build/23087:
20         * configure: Rebuild.
21
22 2018-08-27  Tom Tromey  <tom@tromey.com>
23
24         * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
25         (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
26         (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
27         (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
28         (s390x_emit_stack_adjust): Add casts to unsigned char.
29
30 2018-08-22  Simon Marchi  <simon.marchi@ericsson.com>
31
32         PR gdb/23374
33         PR gdb/23375
34         * server.h (struct client_state) <disable_randomization>:
35         Initialize to 1.
36
37 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
38
39         * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
40         variable.
41         (mips_supply_ptrace_register): Likewise.
42
43 2018-07-22  Tom Tromey  <tom@tromey.com>
44
45         * configure: Rebuild.
46
47 2018-07-22  Tom Tromey  <tom@tromey.com>
48
49         * win32-low.c (win32_create_inferior): Remove unused variables.
50         * gdbreplay.c (remote_open): Remove unused variable.
51         * remote-utils.c (remote_prepare): Remove unused variable.
52         * x86-tdesc.h (X86_TDESC_H): Define.
53         (amd64_expedite_regs): Define conditionally.
54         (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
55         * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
56         * remote-utils.c (readchar): Remove unused variable.
57
58 2018-07-13  Pedro Alves  <palves@redhat.com>
59
60         * linux-low.c (linux_kill): Change parameter to process_info
61         pointer instead of pid.  Adjust.
62         * lynx-low.c (lynx_kill): Likewise.
63         * nto-low.c (nto_kill): Likewise.
64         * spu-low.c (spu_kill): Likewise.
65         * win32-low.c (win32_kill): Likewise.
66         * server.c (handle_v_kill, kill_inferior_callback)
67         (detach_or_kill_for_exit): Adjust.
68         * target.c (kill_inferior): Change parameter to process_info
69         pointer instead of pid.  Adjust.
70         * target.h (struct target_ops) <kill>: Change parameter to
71         process_info pointer instead of pid.  Adjust all implementations
72         and callers.
73         (kill_inferior): Likewise.
74
75 2018-07-13  Pedro Alves  <palves@redhat.com>
76
77         * linux-low.c (linux_detach, linux_join): Change parameter to
78         process_info pointer instead of pid.  Adjust.
79         * lynx-low.c (lynx_detach, lynx_join): Likewise.
80         * nto-low.c (nto_detach): Likewise.
81         * spu-low.c (spu_detach, spu_join): Likewise.
82         * win32-low.c (win32_detach, win32_join): Likewise.
83         * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
84         * target.h (struct target_ops) <detach, join>: Change parameter to
85         process_info pointer instead of pid.  Adjust all implementations
86         and callers.
87         (detach_inferior, join_inferior): Rename 'pid' parameter to
88         'proc'.
89
90 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
91             Jan Kratochvil  <jan.kratochvil@redhat.com>
92             Paul Fertser  <fercerpav@gmail.com>
93             Tsutomu Seki  <sekiriki@gmail.com>
94
95         * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
96         (OBS): Add 'common/netstuff.o'.
97         (GDBREPLAY_OBS): Likewise.
98         * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
99         (remote_open): Implement support for IPv6
100         connections.
101         * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
102         and 'wspiapi.h'.
103         (handle_accept_event): Accept connections from IPv6 sources.
104         (remote_prepare): Handle IPv6-style hostnames; implement
105         support for IPv6 connections.
106         (remote_open): Implement support for printing connections from
107         IPv6 sources.
108
109 2018-07-11  Pedro Alves  <palves@redhat.com>
110
111         PR gdb/23377
112         * mem-break.c (any_persistent_commands): Add process_info
113         parameter and use it instead of relying on the current process.
114         Change return type to bool.
115         * mem-break.h (any_persistent_commands): Add process_info
116         parameter and change return type to bool.
117         * server.c (handle_detach): Remove require_running_or_return call.
118         Look up the process_info for the process we're about to detach.
119         If not found, return back error to GDB.  Adjust
120         any_persistent_commands call to pass down a process pointer.
121
122 2018-07-11  Pedro Alves  <palves@redhat.com>
123
124         * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
125         (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
126         instead of collect_register_by_name.
127         * regcache.c (regcache_raw_get_unsigned_by_name): New.
128         * regcache.h (regcache_raw_get_unsigned_by_name): New.
129
130 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
131             Pedro Alves  <palves@redhat.com>
132
133         * linux-low.c (initialize_low): Call linux_proc_init_warnings.
134
135 2018-07-03  Tom Tromey  <tom@tromey.com>
136
137         * linux-low.c: Update.
138         * lynx-low.c: Update.
139         * mem-break.c: Update.
140         * nto-low.c: Update.
141         * remote-utils.c: Update.
142         * server.c: Update.
143         * spu-low.c: Update.
144         * target.c: Update.
145         * win32-low.c: Update.
146
147 2018-07-03  Tom Tromey  <tom@tromey.com>
148
149         * server.c: Update.
150
151 2018-07-03  Tom Tromey  <tom@tromey.com>
152
153         * linux-low.c: Update.
154
155 2018-07-03  Tom Tromey  <tom@tromey.com>
156
157         * target.c: Update.
158
159 2018-07-03  Tom Tromey  <tom@tromey.com>
160
161         * linux-low.c: Update.
162         * linux-mips-low.c: Update.
163         * lynx-low.c: Update.
164         * nto-low.c: Update.
165         * remote-utils.c: Update.
166         * server.c: Update.
167         * spu-low.c: Update.
168         * target.c: Update.
169         * thread-db.c: Update.
170
171 2018-07-03  Tom Tromey  <tom@tromey.com>
172
173         * linux-low.c: Update.
174         * linux-mips-low.c: Update.
175         * lynx-low.c: Update.
176         * mem-break.c: Update.
177         * nto-low.c: Update.
178         * remote-utils.c: Update.
179         * server.c: Update.
180         * spu-low.c: Update.
181         * target.c: Update.
182         * tracepoint.c: Update.
183
184 2018-07-03  Tom Tromey  <tom@tromey.com>
185
186         * linux-low.c: Update.
187         * linux-ppc-low.c: Update.
188         * linux-x86-low.c: Update.
189         * proc-service.c: Update.
190         * server.c: Update.
191         * spu-low.c: Update.
192         * thread-db.c: Update.
193         * win32-low.c: Update.
194
195 2018-07-03  Tom Tromey  <tom@tromey.com>
196
197         * linux-low.c: Update.
198         * lynx-low.c: Update.
199         * nto-low.c: Update.
200         * remote-utils.c: Update.
201         * spu-low.c: Update.
202         * thread-db.c: Update.
203         * win32-low.c: Update.
204
205 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
206
207         * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
208         parameter in call to 'amd64_create_target_description'.
209
210 2018-06-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
211
212         * x86-tdesc.h: Remove executable permission flag.
213
214 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
215
216         * configure.ac: Remove AC_PREREQ, add missing quoting.
217         * configure: Re-generate.
218         * config.in: Re-generate.
219         * aclocal.m4: Re-generate.
220
221 2018-06-18  Simon Marchi  <simon.marchi@ericsson.com>
222
223         * tracepoint.h (current_traceframe): Remove declaration.
224
225 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
226
227         * linux-aarch64-low.c (is_sve_tdesc): New function.
228         (aarch64_sve_regs_copy_to_regcache): Likewise.
229         (aarch64_sve_regs_copy_from_regcache): Likewise.
230         (aarch64_regs_info): Add SVE checks.
231         (initialize_low_arch): Initialize SVE.
232
233 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
234
235         * Makefile.in: Add aarch64-sve-linux-ptrace.c.
236
237 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
238
239         * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
240         (initialize_low_tracepoint): Likewise
241         * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
242         * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
243         param.
244         * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
245         checks.
246         * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
247
248 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
249
250         * server.h (PBUFSIZ): Increase size
251
252 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
253
254         * regcache.c (regcache::raw_compare): New function.
255         * regcache.h (regcache::raw_compare): New declaration.
256
257 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
258
259         * regcache.c (new_register_cache): Use new.
260         (free_register_cache): Use delete.
261         (register_data): Use const.
262         (supply_register): Move body inside regcache.
263         (regcache::raw_supply): New override function.
264         (collect_register): Move body inside regcache.
265         (regcache::raw_collect): New override function.
266         (regcache::get_register_status): New override function.
267         * regcache.h (struct regcache): Inherit from reg_buffer_common.
268
269 2018-06-09  Tom Tromey  <tom@tromey.com>
270
271         * event-loop.c (gdb_event, gdb_event_p): Remove typedefs.  Don't
272         declare queue.
273         (event_queue): Use std::queue.
274         (gdb_event_xfree): Remove.
275         (initialize_event_loop, process_event, wait_for_event): Update.
276
277 2018-06-08  Stan Cox  <scox@redhat.com>
278
279         * win32-low.c (win32_create_inferior):  last_ptid and last_status
280         moved to client_state.
281
282 2018-06-08  Pedro Alves  <palves@redhat.com>
283
284         * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
285         common/common-exceptions.o, common/common-utils.o,
286         common/errors.o, common/print-utils.o and utils.o.
287         * gdbreplay.c: Include "common-defs.h" instead of the two
288         'config.h's here.  Don't include stdio.h, errno.h, stdlib.h,
289         string.h or alloca.h.
290         (perror_with_name): Delete.
291         (remote_open): Use xstrdup instead of strdup.
292         (main): Rename to ...
293         (captured_main): ... this.
294         (main): New.
295
296 2018-06-08  Tom Tromey  <tom@tromey.com>
297
298         * linux-low.c (linux_low_read_btrace): Update.
299
300 2018-06-04  Stan Cox  <scox@redhat.com>
301
302         * server.h (struct client_state): New.
303         * server.c (cont_thread, general_thread, multi_process)
304         (report_fork_events, report_vfork_events, report_exec_events)
305         (report_thread_events, swbreak_feature, hwbreak_feature)
306         (vCont_supported, disable_randomization, pass_signals)
307         (program_signals, program_signals_p, last_status, last_ptid, own_buf):
308         Moved to client_state.
309         * remote-utils.c (remote_debug, noack_mode)
310         (transport_is_reliable): Moved to client_state.
311         * tracepoint.c (current_traceframe): Moved to client_state.
312
313         Update all callers.
314         * server.c, remote-utils.c, tracepoint.c, fork-child.c,
315         linux-low.c, remote-utils.h, target.c: Use client_state.
316
317 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
318
319         * configure.srv: Add new c/h file.
320
321 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
322
323         * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
324         null VQ.
325
326 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
327
328         * gdb.arch/mips-fpregset-core.exp: New test.
329         * gdb.arch/mips-fpregset-core.c: New test source.
330
331 2018-05-23  Erik Kurzinger  <ekurzinger@nvidia.com>
332
333         PR server/23198
334         * hostio.c (require_int): Do not report overflow for integers
335         between 0xfffffff and 0x7fffffff.
336
337 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
338
339         * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
340         (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
341         (mips_collect_ptrace_register, mips_supply_ptrace_register): New
342         functions.
343         (the_low_target): Wire them.
344
345 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
346
347         * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
348         Set vscr_offset to 0 in little-endian mode and 12 in big-endian
349         mode. Call collect_register_by_name with vscr using
350         vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
351         (ppc_store_vrregset): Add and set vscr_offset variable as in
352         ppc_fill_vrregset. Call supply_register_by_name with vscr using
353         vscr_offset.
354
355 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
356
357         * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
358         (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
359         PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
360
361 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
362
363         * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
364         (ppc_store_vsxregset): Likewise.
365         (ppc_fill_vrregset): Likewise.
366         (ppc_store_vrregset): Likewise.
367         (ppc_fill_evrregset): Likewise.
368         (ppc_store_evrregset): Likewise.
369         (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
370         (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
371         needed.
372
373 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
374
375         * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
376         wordsize of the inferior. Call ppc_linux_target_wordsize.
377
378 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
379
380         * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
381         * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
382         * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
383         * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
384         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
385         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
386         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
387         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
388         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
389         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
390         (tdesc_powerpc_e500l): Remove.
391         * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
392         linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
393         * linux-ppc-low.c: Include arch/ppc-linux-common.h,
394         arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
395         linux-ppc-tdesc.h.
396         (ppc_arch_setup): Remove target description matching code. Fill a
397         ppc_linux_features struct and call ppc_linux_match_description
398         with it.
399
400 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
401
402         * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
403         width of the requested register exceeds the width of the
404         `ptrace' data type.
405         (mips_cannot_store_register): Likewise.
406
407 2018-05-21  Maciej W. Rozycki  <macro@mips.com>
408
409         * linux-mips-low.c (mips_fetch_register): New function.  Update
410         preceding comment.
411         (mips_store_gregset): Supply 0 rather than $restart for $zero.
412         (the_low_target): Wire `mips_fetch_register'.
413
414 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
415
416         * lynx-i386-low.c (LYNXOS_178): New macro.
417         [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
418         the layout on LynxOS-178.
419         (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
420         handle floating point registers that are not supported by
421         LynxOS-178.
422
423 2018-05-10  Tom Tromey  <tom@tromey.com>
424
425         * configure: Rebuild.
426
427 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
428
429         PR server/23158:
430         * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
431         * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
432         Use it to set the expedite_regs field in the given tdesc.
433         * x86-tdesc.h: New file.
434         * linux-aarch64-tdesc.c (aarch64_linux_read_description):
435         Adjust following the addition of the new expedite_regs parameter
436         to init_target_desc.
437         * linux-tic6x-low.c (tic6x_read_description): Likewise.
438         * linux-x86-tdesc.c: #include "x86-tdesc.h".
439         (i386_linux_read_description, amd64_linux_read_description):
440         Adjust following the addition of the new expedite_regs parameter
441         to init_target_desc.
442         * lynx-i386-low.c: #include "x86-tdesc.h".
443         (lynx_i386_arch_setup): Adjust following the addition of the new
444         expedite_regs parameter to init_target_desc.
445         * nto-x86-low.c: #include "x86-tdesc.h".
446         (nto_x86_arch_setup): Adjust following the addition of the new
447         expedite_regs parameter to init_target_desc.
448         * win32-i386-low.c: #include "x86-tdesc.h".
449         (i386_arch_setup): Adjust following the addition of the new
450         expedite_regs parameter to init_target_desc.
451
452 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
453
454         PR server/23158:
455         * win32-low.c (win32_create_inferior): Add call to my_wait
456         setting last_status global.
457
458 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
459
460         PR server/23158:
461         * win32-low.c (create_process): Only call gdb_tilde_expand if
462         inferior_cwd is not NULL.
463
464 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
465
466         * i387-fp.c (i387_cache_to_xsave): Only write x87 control
467         registers to the cache if their values have changed.
468         (i387_xsave_to_cache): Provide default values for x87 control
469         registers when these features are available, but disabled.
470         * regcache.c (supply_register_by_name_zeroed): New function.
471         * regcache.h (supply_register_by_name_zeroed): Declare new
472         function.
473
474 2018-05-07  Tom Tromey  <tom@tromey.com>
475
476         * configure: Rebuild.
477
478 2018-05-04  Tom Tromey  <tom@tromey.com>
479
480         * configure: Rebuild.
481
482 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
483             Pedro Alves <palves@redhat.com>
484
485         * linux-aarch64-low.c (aarch64_stopped_data_address):
486         Likewise.
487
488 2018-04-27  Tom Tromey  <tom@tromey.com>
489
490         * configure: Rebuild.
491
492 2018-04-23  Tom Tromey  <tom@tromey.com>
493
494         * configure: Rebuild.
495
496 2018-04-19  Simon Marchi  <simon.marchi@ericsson.com>
497
498         * Makefile.in (depcomp): Add "..".
499         (all_deps_files): New and use it.
500
501 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
502
503         * configure.srv (aarch64*-*-linux*): Don't include xml.
504         (i[34567]86-*-cygwin*): Likewise.
505         (i[34567]86-*-linux*): Likewise.
506         (i[34567]86-*-lynxos*): Likewise.
507         (i[34567]86-*-mingw32ce*): Likewise.
508         (i[34567]86-*-mingw*): Likewise.
509         (i[34567]86-*-nto*): Likewise.
510         (tic6x-*-uclinux): Likewise.
511         (x86_64-*-linux*): Likewise.
512         (x86_64-*-mingw*): Likewise.
513         (x86_64-*-cygwin*): Likewise.
514
515 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
516
517         * tdesc.c: Remove xml parameter.
518
519 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
520
521         * server.c (get_features_xml): Remove cast.
522         * tdesc.c (void target_desc::accept): Fill in function.
523         (tdesc_get_features_xml): Remove old xml creation.
524         (print_xml_feature::visit_pre): Add xml vistor.
525         * tdesc.h (struct target_desc): Make xmltarget mutable.
526         (tdesc_get_features_xml): Remove declaration.
527
528 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
529
530         * tdesc.c (tdesc_architecture_name): Add new function.
531         (tdesc_osabi_name): Likewise.
532         (tdesc_get_features_xml): Use new functions.
533
534 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
535
536         * tdesc.c (tdesc_create_flags): Remove.
537         (tdesc_add_flag): Likewise.
538         (tdesc_named_type): Likewise.
539         (tdesc_create_union): Likewise.
540         (tdesc_create_struct): Likewise.
541         (tdesc_create_vector): Likewise.
542         (tdesc_add_bitfield): Likewise.
543         (tdesc_add_field): Likewise.
544         (tdesc_set_struct_size): Likewise.
545
546 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
547
548         * tdesc.c (~target_desc): Remove implictly deleted items.
549         (init_target_desc): Iterate all features.
550         (tdesc_get_features_xml): Use vector.
551         (tdesc_create_feature): Create feature.
552         * tdesc.h (tdesc_feature) Remove
553         (target_desc): Add features.
554
555 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
556
557         * Makefile.in: Add common/tdesc.c
558         * tdesc.c (init_target_desc): init all reg_defs from register
559         vector.
560         (tdesc_create_reg): Create tdesc_reg.
561         * tdesc.h (tdesc_feature): Add register vector.
562
563 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
564
565         * tdesc.h (struct target_desc) <features>: Change type to
566         std::vector<std::string>.
567         * tdesc.c (target_desc::~target_desc): Adjust to std::vector
568         changes.
569         (tdesc_get_features_xml): Likewise.
570         (tdesc_create_feature): Likewise.
571
572 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
573
574         * regcache.c (find_register_by_number): Return a ref.
575         (find_regno): Use references.
576         (register_size): Likewise.
577         (register_data): Likewise.
578         * tdesc.c (target_desc::~target_desc): Remove free calls.
579         (target_desc::operator==): Use std::vector compare.
580         (init_target_desc): Use reference.
581         (tdesc_create_reg): Use reg constructors.
582         * tdesc.h (struct target_desc): Replace pointer with object.
583
584 2018-03-23  Alan Hayward  <alan.hayward@arm.com>
585
586         * regcache.c (find_register_by_number): Make static.
587         (find_regno): Use find_register_by_number
588         * regcache.h (struct reg): Remove declaration.
589
590 2018-03-23  Alan Hayward  <alan.hayward@arm.com>
591
592         * tdesc.c (target_desc::~target_desc): Move to here.
593         (target_desc::operator==): Likewise.
594         * tdesc.h (target_desc::~target_desc): Move from here.
595         (target_desc::operator==): Likewise.
596
597 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
598
599         * linux-s390-low.c (s390_get_wordsize): Correct brace style.
600
601 2018-03-21  Andreas Arnez  <arnez@linux.vnet.ibm.com>
602
603         * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
604         S390_TDESC_GS.
605         * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
606         (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
607         and init_registers_s390_gs_linux64.
608
609 2018-03-21  Andreas Arnez  <arnez@linux.vnet.ibm.com>
610
611         * linux-s390-low.c (s390_fill_gs): Remove function.
612         (s390_fill_gsbc): Remove function.
613         (s390_regsets): Set fill functions for the guarded storage regsets
614         to NULL.
615
616 2018-03-21  Andreas Arnez  <arnez@linux.vnet.ibm.com>
617
618         * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
619         the word size.  Add comment.
620         (s390_get_wordsize): New function.
621         (s390_arch_setup): No longer select a temporary tdesc to fetch the
622         pswm with it.  Instead, use s390_get_wordsize to determine the
623         word size first and derive the correct tdesc from that directly.
624
625 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
626
627         * Makefile.in: Include silent-rules.mk.
628         (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
629         (COMPILE): Add ECHO_CXX.
630         (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
631         (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
632         ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
633         (version-generated.c): Add ECHO_GEN.
634         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
635         (IPAGENT_COMPILE): Add ECHO_CXX.
636         (%-generated.c): Add ECHO_REGDAT.
637
638 2018-03-14  Tom Tromey  <tom@tromey.com>
639
640         PR cli/14977:
641         * ax.c (ax_printf): Special case for NULL.
642
643 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
644
645         * linux-low.c (linux_qxfer_libraries_svr4): Use
646         xml_escape_text_append.
647
648 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
649
650         * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
651
652 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
653
654         * server.c (handle_general_set): Remove unnecessary xstrdup.
655
656 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
657
658         * server.c (parse_debug_format_options): Adjust to
659         delim_string_to_char_ptr_vec changes.
660         * thread-db.c (thread_db_load_search): Adjust to
661         dirnames_to_char_ptr_vec changes.
662
663 2018-03-01  Markus Metzger  <markus.t.metzger@intel.com>
664
665         * target.h (target_enable_btrace, target_disable_btrace)
666         (target_read_btrace, target_read_btrace_conf): Turn macro into
667         inline function.  Throw error if target method is not defined.
668         * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
669         check for btrace target method.  Be prepared to handle exceptions
670         from btrace target methods.
671
672 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
673
674         * server.c (captured_main): Change order of error message printed
675         when the current working directory cannot be found.
676
677 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
678
679         * server.c: Include "filenames.h" and "pathstuff.h".
680         (program_name): Delete variable.
681         (program_path): New anonymous class.
682         (get_exec_wrapper): Use "program_path" instead of
683         "program_name".
684         (handle_v_run): Likewise.
685         (captured_main): Likewise.
686         (process_serial_event): Likewise.
687
688 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
689
690         * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
691         (OBJS): Add "pathstuff.o".
692         * server.c (current_directory): New global variable.
693         (captured_main): Initialize "current_directory".
694
695 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
696
697         * tdesc.c: Use common/tdesc.h.
698         * tdesc.h: Likewise.
699
700 2018-02-20  Alan Hayward  <alan.hayward@arm.com>
701             Simon Marchi  <simon.marchi@ericsson.com>
702
703         * Makefile.in: Switch order of make rules.
704
705 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
706
707         * Makefile.in: Add common directory in build.
708         * configure.ac: Add common reference.
709         * configure: Regenerate.
710
711 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
712
713         * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
714         * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
715         * spu-low.c (spu_target_ops): Likewise.
716         * win32-low.c (win32_target_ops): Likewise.
717         * server.c (supported_btrace_packets): Report packets unconditionally.
718         * target.h (target_ops) <supports_btrace>: Remove.
719         (target_supports_btrace): Remove.
720
721 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
722
723         * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
724         (handle_btrace_disable): Change return type to void.  Use exceptions
725         to report errors.
726         (handle_btrace_general_set): Catch exception and copy message to
727         return message.
728
729 2018-02-08  Tom Tromey  <tom@tromey.com>
730
731         * linux-low.c (install_software_single_step_breakpoints): Use
732         make_scoped_restore.
733         * inferiors.c (make_cleanup_restore_current_thread): Remove.
734         (do_restore_current_thread_cleanup): Remove.
735         * gdbthread.h (make_cleanup_restore_current_thread): Don't
736         declare.
737
738 2018-02-08  Tom Tromey  <tom@tromey.com>
739
740         * mem-break.c (set_raw_breakpoint_at): Use
741         gdb::unique_xmalloc_ptr.
742
743 2018-01-30  Pedro Alves  <palves@redhat.com>
744
745         PR gdb/13211
746         * target.c (target_terminal::terminal_state): Rename to ...
747         (target_terminal::m_terminal_state): ... this.
748
749 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
750
751         * linux-low.c (handle_extended_wait): Surround call to
752         thread_db_notice_clone with #ifdef USE_THREAD_DB.
753
754 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
755
756         * linux-low.c (attach_proc_task_lwp_callback): Adjust to
757         linux_ptrace_attach_fail_reason_string now returning an
758         std::string.
759         (linux_attach): Likewise.
760         * thread-db.c (attach_thread): Likewise.
761
762 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
763
764         PR gdb/21559
765         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
766         checking for fs_base/gs_base fields in struct user_regs_struct.
767         * configure: Regenerate.
768
769 2018-01-16  Yao Qi  <yao.qi@linaro.org>
770
771         PR gdb/18749
772         * linux-low.c (fetch_register): Call supply_register instead of
773         error.
774
775 2018-01-08  Yao Qi  <yao.qi@linaro.org>
776             Simon Marchi  <simon.marchi@ericsson.com>
777
778         * Makefile.in (OBS): Remove selftest.o.
779         * configure.ac: Set srv_selftest_objs if $development is true.
780         (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
781         * configure: Re-generated.
782         * server.c (captured_main): Wrap variable selftest_filter with
783         GDB_SELF_TEST.
784
785 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
786
787         * server.c (parse_debug_format_options): Return std::string.
788         (handle_monitor_command, captured_main): Adjust.
789
790 2018-01-05  Pedro Alves  <palves@redhat.com>
791
792         PR gdb/18653
793         * server.c (captured_main): Pass quiet=false to
794         save_original_signals_state.
795
796 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
797
798         * gdbreplay.c (gdbreplay_version): Update copyright year in
799         version message.
800         * server.c (gdbserver_version): Likewise.
801
802 2017-12-08  Tom Tromey  <tom@tromey.com>
803
804         * ax.c (ax_printf): Update.
805
806 2017-12-07  Yao Qi  <yao.qi@linaro.org>
807
808         * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
809         aarch64_linux_read_description.
810         * linux-amd64-ipa.c (idx2mask): New array.
811         (get_ipa_tdesc): Move idx2mask out.
812         (initialize_low_tracepoint): Initialize target descriptions.
813         * linux-i386-ipa.c (idx2mask): New array.
814         (get_ipa_tdesc): Move idx2mask out.
815         (initialize_low_tracepoint): Initialize target descriptions.
816
817 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
818
819         * tdesc.c (struct tdesc_type): Change return type.
820         (tdesc_add_flag): Change parameter type.
821         (tdesc_add_bitfield): Likewise.
822         (tdesc_add_field): Likewise.
823         (tdesc_set_struct_size): Likewise.
824
825 2017-12-05  Simon Marchi  <simon.marchi@ericsson.com>
826
827         * regcache.c (registers_to_string): Remove unused variable.
828
829 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
830
831         * inferiors.c (for_each_inferior_with_data): Remove.
832         * inferiors.h (for_each_inferior_with_data): Remove.
833         * server.c (handle_qxfer_threads_worker): Change parameter type.
834         (handle_qxfer_threads_proper): Use for_each_thread.
835
836 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
837
838         * inferiors.c (for_each_inferior): Remove.
839         (clear_inferiors): Use for_each_thread.
840         * inferiors.h (for_each_inferior): Remove.
841         * linux-low.c (linux_wait_for_event_filtered): Use
842         for_each_thread.
843         (linux_stabilize_threads): Likewise.
844         * regcache.c (regcache_release): Likewise.
845         * server.c (gdb_wants_all_threads_stopped): Likewise.
846         (clear_pending_status_callback): Remove.
847         (handle_status): Use for_each_thread.
848         (captured_main): Likewise.
849         * win32-low.c (child_init_thread_list): Likewise.
850         (win32_clear_inferiors): Likewise.
851         (fake_breakpoint_event): Likewise.
852
853 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
854
855         * inferiors.h (find_inferior): Remove.
856         * inferiors.c (find_inferior): Remove.
857
858 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
859
860         * linux-low.c (resume_status_pending_p): Update comment.
861         (need_step_over_p): Update comment.
862
863 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
864
865         * linux-low.c (proceed_one_lwp): Return void, change parameter
866         type.
867         (unsuspend_and_proceed_one_lwp): Likewise.
868         (proceed_all_lwps): Use for_each_thread.
869         (unstop_all_lwps): Likewise.
870
871 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
872
873         * linux-low.c (linux_resume_one_thread): Return void, take
874         parameter directly.
875         (linux_resume): Use for_each_thread.
876
877 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
878
879         * linux-low.c (send_sigstop_callback): Return void, change
880         parameter type.  Rename to...
881         (send_sigstop): ... this.
882         (suspend_and_send_sigstop_callback): Return void, change parameter
883         type.  Rename to...
884         (suspend_and_send_sigstop): ... this.
885         (stop_all_lwps): Use for_each_thread.
886
887 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
888
889         * linux-low.c (lwp_running): Return bool, remove unused
890         argument.
891         (linux_stabilize_threads): Use find_thread.
892
893 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
894
895         * linux-low.c (select_singlestep_lwp_callback): Remove.
896         (count_events_callback): Remove.
897         (select_event_lwp_callback): Remove.
898         (select_event_lwp): Use find_thread/for_each_thread.
899
900 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
901
902         * linux-low.c (not_stopped_callback): Return bool, take filter
903         argument directly.
904         (linux_wait_for_event_filtered): Use find_thread.
905         (linux_wait_1): Likewise.
906
907 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
908
909         * linux-low.c (same_lwp): Remove.
910         (find_lwp_pid): Use find_thread.
911
912 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
913
914         * linux-low.c (delete_lwp_callback): Remove.
915         (linux_mourn): Use for_each_thread.
916
917 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
918
919         * linux-low.c (linux_detach_lwp_callback): Return void, remove
920         args parameter, don't check for pid.
921         (linux_detach): Use for_each_thread.
922
923 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
924
925         * linux-low.c (struct counter): Remove.
926         (second_thread_of_pid_p): Remove.
927         (last_thread_of_process_p): Use find_thread.
928
929 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
930
931         * inferiors.c (find_inferior_in_random): Remove.
932         * inferiors.h (find_inferior_in_random): Remove.
933         * linux-low.c (status_pending_p_callback): Return bool, accept
934         parameter ptid directly.
935         (linux_wait_for_event_filtered): Use find_thread_in_random.
936         (linux_wait_1): Likewise.
937
938 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
939
940         * inferiors.c (find_inferior_id): Remove.
941         (find_thread_ptid): Move implemention from find_inferior_id to
942         here.
943         * inferiors.h (find_inferior_id): Remove.
944         * server.c (handle_status): Use find_thread_ptid.
945         (process_serial_event): Likewise.
946         * thread-db.c (find_one_thread): Likewise.
947         (thread_db_thread_handle): Likewise.
948         * win32-low.c (thread_rec): Likewise.
949         (child_delete_thread): Likewise.
950         (win32_thread_alive): Likewise.
951         (get_child_debug_event): Likewise.
952
953 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
954
955         * linux-mips-low.c (update_watch_registers_callback): Return
956         void, remove pid_p parameter, don't check for pid.
957         (mips_insert_point, mips_remove_point): Use for_each_thread.
958
959 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
960
961         * lynx.low (lynx_delete_thread_callback): Remove.
962         (lynx_mourn): Use for_each_thread.
963
964 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
965
966         * regcache.c (regcache_invalidate_one): Remove.
967         (regcache_invalidate_pid): use for_each_thread.
968
969 2017-11-26  Tom Tromey  <tom@tromey.com>
970
971         * linux-low.c (linux_create_inferior): Update.
972
973 2017-11-24  Ulrich Weigand  <uweigand@de.ibm.com>
974
975         * spu-low.c (spu_create_inferior): Fix typo in argument name.
976
977 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
978
979         * configure.srv: Add linux-aarch64-tdesc-selftest.o.
980         * linux-aarch64-low.c (initialize_low_arch): Call init func.
981         * linux-aarch64-tdesc-selftest.c: New file.
982         * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
983
984 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
985
986         * configure.srv: Add new file.
987         * linux-aarch64-low.c (initialize_low_arch): Call init func.
988         * linux-aarch64-tdesc-selftest.c: New file.
989         * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
990
991 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
992
993         * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
994         * linux-aarch64-low.c (initialize_low_arch): Remove init.
995         * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
996
997 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
998
999         * configure.srv: Add new files.
1000         * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1001         aarch64_linux_read_description.
1002         * linux-aarch64-low.c (aarch64_linux_read_description):
1003         Merge with aarch64_arch_setup.
1004         (aarch64_arch_setup): Call aarch64_linux_read_description.
1005         * linux-aarch64-tdesc.c: New file.
1006         * linux-aarch64-tdesc.h: New file.
1007
1008 2017-11-24  Yao Qi  <yao.qi@linaro.org>
1009
1010         * configure.srv: Set $srv_regobj for tic6x-linux.
1011         * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1012         (tic6x_read_description): Move some code to tic6x_arch_setup.
1013         (tic6x_tdesc_test): New function.
1014         (initialize_low_arch): Call selftests::register_test.
1015
1016 2017-11-22  Yao Qi  <yao.qi@linaro.org>
1017
1018         * remote-utils.c (prepare_resume_reply): Use memcpy.
1019
1020 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1021
1022         * linux-low.c (kill_one_lwp_callback): Return void, take
1023         argument directly, don't filter on pid.
1024         (linux_kill): Use for_each_thread.
1025
1026 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1027
1028         * linux-low.c (need_step_over_p): Return bool, remove dummy
1029         argument.
1030         (linux_resume, proceed_all_lwps): Use find_thread.
1031
1032 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1033
1034         * linux-low.c (resume_status_pending_p): Return bool, remove
1035         flag_p argument.
1036         (linux_resume): Use find_thread.
1037
1038 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1039
1040         * linux-low.c (struct thread_resume_array): Remove.
1041         (linux_set_resume_request): Return void, take arguments
1042         directly.
1043         (linux_resume): Use for_each_thread.
1044
1045 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1046
1047         * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1048         return bool, remove data argument.
1049         (linux_stabilize_threads): Use find_thread.
1050
1051 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1052
1053         * linux-low.c (unsuspend_one_lwp): Remove.
1054         (unsuspend_all_lwps): Use for_each_thread, inline code from
1055         unsuspend_one_lwp.
1056
1057 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1058
1059         * gdbthread.h (find_thread): Add overload with ptid_t filter.
1060         * linux-low.c (struct iterate_over_lwps_args): Remove.
1061         (iterate_over_lwps_filter): Remove.
1062         (iterate_over_lwps): Use find_thread.
1063
1064 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1065
1066         * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1067         (linux_handle_new_gdb_connection): Use for_each_thread, inline
1068         code from reset_lwp_ptrace_options_callback.
1069
1070 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1071
1072         * linux-arm-low.c (struct update_registers_data): Remove.
1073         (update_registers_callback): Return void, take arguments
1074         directly, don't check thread's pid.
1075         (arm_insert_point, arm_remove_point): Use for_each_thread.
1076
1077 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1078
1079         * win32-low.c (continue_one_thread): Return void, take argument
1080         directly.
1081         (child_continue): Use for_each_thread.
1082
1083 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1084
1085         * win32-i386-low.c (update_debug_registers_callback): Rename
1086         to ...
1087         (update_debug_registers): ... this, return void, remove pid_p arg.
1088         (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1089
1090 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
1091
1092         * inferiors.h (struct process_info): Add constructor, initialize
1093         fields..
1094         <syscalls_to_catch>: Change type to std::vector<int>.
1095         * inferiors.c (add_process): Allocate process_info with new.
1096         (remove_process): Free process_info with delete.
1097         * linux-low.c (handle_extended_wait): Adjust.
1098         (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1099         * server.c (handle_general_set): Adjust.
1100
1101 2017-11-16  Pedro Alves  <palves@redhat.com>
1102
1103         * remote-utils.c (remote_close): Block SIGIO signals instead of
1104         uninstalling the SIGIO handler.
1105
1106 2017-11-16  Alan Hayward  <alan.hayward@arm.com>
1107
1108         * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1109
1110 2017-11-16  Yao Qi  <yao.qi@linaro.org>
1111
1112         * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1113         (tic6x_store_gregset): Likewise.
1114         (tic6x_usrregs_info): Move it up.
1115
1116 2017-11-15  Alan Hayward  <alan.hayward@arm.com>
1117
1118         * Makefile.in: Update arch rules.
1119         * configure.srv: Explicitly mark arch/ files.
1120
1121 2017-11-13  Andreas Schwab  <schwab@suse.de>
1122
1123         * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1124         function.
1125         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1126
1127 2017-11-06  Pedro Alves  <palves@redhat.com>
1128
1129         * config.in, configure: Regenerate.
1130
1131 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1132
1133         * target.c (struct thread_search): Remove.
1134         (thread_search_callback): Remove.
1135         (prepare_to_access_memory): Use for_each_thread instead of
1136         find_inferior.  Inline code from thread_search_callback.
1137
1138 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1139
1140         * server.c (struct visit_actioned_threads_data): Remove.
1141         (visit_actioned_threads): Change prototype to take arguments
1142         directly.
1143         (resume): Use find_thread instead of find_inferior.
1144
1145 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1146
1147         * server.c (queue_stop_reply_callback): Change prototype, return
1148         void.
1149         (find_status_pending_thread_callback): Remove.
1150         (handle_status): Replace find_inferior with find_thread and
1151         for_each_thread.
1152
1153 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
1154
1155         * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1156         with REGNO.
1157         (aarch64_store_gregset): Likewise.
1158         (aarch64_fill_fpregset): Likewise.
1159         (aarch64_store_fpregset): Likewise.
1160
1161 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1162
1163         * gdbthread.h (find_thread, for_each_thread): New functions.
1164         * inferiors.c (thread_of_pid): Remove.
1165         (find_any_thread_of_pid): Use find_thread.
1166         * linux-low.c (num_lwps): Use for_each_thread.
1167
1168 2017-10-17  Yao Qi  <yao.qi@linaro.org>
1169
1170         * Makefile.in: Remove one rule.
1171         * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1172
1173 2017-10-17  Yao Qi  <yao.qi@linaro.org>
1174
1175         * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1176         Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1177
1178 2017-10-17  Yao Qi  <yao.qi@linaro.org>
1179
1180         * configure.srv: Rename arm.o with arch/arm.o.
1181
1182 2017-10-17  Yao Qi  <yao.qi@linaro.org>
1183
1184         * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1185         (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1186         (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1187         (arch-i386.o, arch-amd64.o): Remove rules.
1188         (arch/%.o): New rule.
1189         Update POSTCOMPILE and COMPILE.pre.
1190         * configure.ac: Invoke AC_CONFIG_COMMANDS.
1191         * configure: Re-generated.
1192         * configure.srv: Replace arch-i386.o with arch/i386.o.
1193         Replace arch-amd64.o with arch/amd64.o.
1194
1195 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1196
1197         * configure: Regenerated.
1198
1199 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1200
1201         * inferiors.h: (struct inferior_list): Remove.
1202         (struct inferior_list_entry); Remove.
1203         (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1204         A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1205         get_first_inferior): Remove.
1206         (for_each_inferior, for_each_inferior_with_data, find_inferior,
1207         find_inferior_id, find_inferior_in_random): Change signature.
1208         * inferiors.c (all_threads): Change type to
1209         std::list<thread_info *>.
1210         (get_thread): Remove macro.
1211         (find_inferior, find_inferior_id): Change signature, implement
1212         using find_thread.
1213         (find_inferior_in_random): Change signature, implement using
1214         find_thread_in_random.
1215         (for_each_inferior, for_each_inferior_with_data): Change
1216         signature, implement using for_each_thread.
1217         (add_inferior_to_list, remove_inferior): Remove.
1218         (add_thread, get_first_thread, thread_of_pid,
1219         find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1220         (get_first_inferior, one_inferior_p, clear_inferior_list):
1221         Remove.
1222         (clear_inferiors, get_thread_process): Update.
1223         * gdbthread.h: Include <list>.
1224         (struct thread_info) <entry>: Remove field.
1225         <id>: New field.
1226         (all_threads): Change type to std::list<thread_info *>.
1227         (get_first_inferior): Add doc.
1228         (find_thread, for_each_thread, find_thread_in_random): New
1229         functions.
1230         (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1231         * linux-arm-low.c (update_registers_callback): Update.
1232         * linux-low.c (second_thread_of_pid_p): Update.
1233         (kill_one_lwp_callback, linux_detach_lwp_callback,
1234         delete_lwp_callback, status_pending_p_callback, same_lwp,
1235         find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1236         iterate_over_lwps, not_stopped_callback,
1237         resume_stopped_resumed_lwps, count_events_callback,
1238         select_singlestep_lwp_callback, select_event_lwp_callback,
1239         unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1240         suspend_and_send_sigstop_callback, wait_for_sigstop,
1241         stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1242         lwp_running, linux_set_resume_request, resume_status_pending_p,
1243         need_step_over_p, start_step_over, linux_resume_one_thread,
1244         proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1245         reset_lwp_ptrace_options_callback): Update.
1246         * linux-mips-low.c (update_watch_registers_callback): Update.
1247         * regcache.c (regcache_invalidate_one, regcache_invalidate):
1248         Update.
1249         (free_register_cache_thread_one): Remove.
1250         (regcache_release): Update.
1251         * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1252         handle_qxfer_threads_worker): Update.
1253         (handle_query): Update, use list iterator.
1254         (visit_actioned_threads, handle_pending_status,
1255         queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1256         clear_pending_status_callback, set_pending_status_callback,
1257         find_status_pending_thread_callback, handle_status,
1258         process_serial_event): Update.
1259         * target.c (thread_search_callback): Update.
1260         * thread-db.c (thread_db_get_tls_address): Update.
1261         * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1262         Update.
1263         * win32-i386-low.c (update_debug_registers_callback): Update.
1264         * win32-low.c (delete_thread_info, child_delete_thread,
1265         continue_one_thread, suspend_one_thread,
1266         get_child_debug_event): Adjust.
1267
1268 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1269
1270         * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1271         * inferiors.h: Include <list>.
1272         (struct process_info) <entry>: Remove field.
1273         <pid>: New field.
1274         (pid_of): Change macro to function.
1275         (ptid_of, lwpid_of): Remove macro.
1276         (all_processes): Change type to std::list<process_info *>.
1277         (ALL_PROCESSES): Remove macro.
1278         (for_each_process, find_process): New function.
1279         * inferiors.c (all_processes): Change type to
1280         std::list<process_info *>.
1281         (find_thread_process): Adjust.
1282         (add_process): Likewise.
1283         (remove_process): Likewise.
1284         (find_process_pid): Likewise.
1285         (get_first_process): Likewise.
1286         (started_inferior_callback): Remove.
1287         (have_started_inferiors_p): Adjust.
1288         (attached_inferior_callback): Remove.
1289         (have_attached_inferiors_p): Adjust.
1290         * linux-low.c (check_zombie_leaders): Likewise.
1291         * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1292         (x86_linux_update_xmltarget): Adjust.
1293         * server.c (handle_query): Likewise.
1294         (gdb_reattached_process): Remove.
1295         (handle_status): Adjust.
1296         (kill_inferior_callback): Likewise.
1297         (detach_or_kill_inferior): Remove.
1298         (print_started_pid): Likewise.
1299         (print_attached_pid): Likewise.
1300         (detach_or_kill_for_exit): Update.
1301         (process_serial_event): Likewise.
1302         * linux-arm-low.c (arm_new_fork): Likewise.
1303
1304 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1305
1306         * dll.h: Include <list>.
1307         (struct dll_info): Add constructor.
1308         <entry>: Remove field.
1309         (all_dlls): Change type to std::list<dll_info>.
1310         * dll.c: Include <algorithm>.
1311         (get_dll): Remove macro.
1312         (all_dlls): Change type to std::list<dll_info *>.
1313         (free_one_dll): Remove.
1314         (match_dll): Likewise.
1315         (loaded_dll): Adjust.
1316         (unloaded_dll): Adjust to all_dlls type change, use
1317         std::find_if.  Inline code from match_dll.
1318         (clear_dlls): Adjust to all_dlls type change.
1319         * server.c (emit_dll_description): Remove.
1320         (handle_qxfer_libraries): Adjust to all_dlls type change,
1321         integrate emit_dll_description's functionality.
1322
1323 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1324
1325         * linux-low.h (struct linux_target_ops) <delete_process>: New
1326         field.
1327         * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1328         * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1329         (struct linux_target_ops): Add delete_process callback.
1330         * linux-arm-low.c (arm_delete_process): New.
1331         (struct linux_target_ops): Add delete_process callback.
1332         * linux-bfin-low.c (struct linux_target_ops): Likewise.
1333         * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1334         * linux-m32r-low.c (struct linux_target_ops): Likewise.
1335         * linux-mips-low.c (mips_linux_delete_process): New.
1336         (struct linux_target_ops): Add delete_process callback.
1337         * linux-ppc-low.c (struct linux_target_ops): Likewise.
1338         * linux-s390-low.c (struct linux_target_ops): Likewise.
1339         * linux-sh-low.c (struct linux_target_ops): Likewise.
1340         * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1341         * linux-tile-low.c (struct linux_target_ops): Likewise.
1342         * linux-x86-low.c (x86_linux_delete_process): New.
1343         (struct linux_target_ops): Add delete_process callback.
1344         * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1345
1346 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1347
1348         * linux-aarch64-low.c (the_low_target): Add thread delete
1349         callback.
1350         * linux-arm-low.c (arm_delete_thread): New function.
1351         (the_low_target): Add thread delete callback.
1352         * linux-bfin-low.c (the_low_target): Likewise.
1353         * linux-crisv32-low.c (the_low_target): Likewise.
1354         * linux-low.c (delete_lwp): Invoke delete_thread callback if
1355         set.
1356         * linux-low.h (struct linux_target_ops) <delete_thread>: New
1357         field.
1358         * linux-m32r-low.c (the_low_target): Add thread delete callback.
1359         * linux-mips-low.c (mips_linux_delete_thread): New function.
1360         (the_low_target): Add thread delete callback.
1361         * linux-ppc-low.c (the_low_target): Likewise.
1362         * linux-s390-low.c (the_low_target): Likewise.
1363         * linux-sh-low.c (the_low_target): Likewise.
1364         * linux-tic6x-low.c (the_low_target): Likewise.
1365         * linux-tile-low.c (the_low_target): Likewise.
1366         * linux-x86-low.c (the_low_target): Likewise.
1367         * linux-xtensa-low.c (the_low_target): Likewise.
1368
1369 2017-10-06  Yuanhui Zhang  <asmwarrior@gmail.com>
1370
1371         * win32-low.c: Include "common-inferior.h".
1372
1373 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1374
1375         * inferiors.c (set_inferior_cwd): New function.
1376         * server.c (handle_general_set): Handle QSetWorkingDir packet.
1377         (handle_query): Inform that QSetWorkingDir is supported.
1378         * win32-low.c (create_process): Pass the inferior's cwd to
1379         CreateProcess.
1380
1381 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1382
1383         * inferiors.c (current_inferior_cwd): New global variable.
1384         (get_inferior_cwd): New function.
1385         * inferiors.h (struct process_info) <cwd>: New field.
1386
1387 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1388
1389         * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1390         (OBS): Add gdb_tilde_expand.o.
1391
1392 2017-10-02  Simon Marchi  <simon.marchi@ericsson.com>
1393
1394         * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1395         * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1396
1397 2017-09-29  Pedro Alves  <palves@redhat.com>
1398
1399         * ax.c (gdb_parse_agent_expr): Constify.
1400         * ax.h (gdb_parse_agent_expr): Constify.
1401         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1402         Constify.
1403         * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1404         * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1405         * remote-utils.h (read_ptid): Constify.
1406         * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1407         (process_point_options, process_serial_event): Constify.
1408         * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1409         (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1410         (cmd_qtbuffer): Constify.
1411
1412 2017-09-29  Pedro Alves  <palves@redhat.com>
1413
1414         * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1415         fails.
1416
1417 2017-09-29  Pedro Alves  <palves@redhat.com>
1418
1419         * linux-low.c (handle_extended_wait): Pass parent thread instead
1420         of process to thread_db_notice_clone.
1421         * linux-low.h (thread_db_notice_clone): Replace parent process
1422         parameter with parent thread parameter.
1423         * thread-db.c (find_one_thread): Add comment.
1424         (thread_db_notice_clone): Replace parent process parameter with
1425         parent thread parameter.  Temporarily switch to the parent thread.
1426
1427 2017-09-26  Sergio Durigan Junior  <sergiodj@redhat.com>
1428
1429         * gdbthread.h: Include "common-gdbthread.h".
1430         * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1431         "if" when validating the ptid.
1432         * remote-utils.c: Include "gdbthread.h".
1433         (prepare_resume_reply): Use "switch_to_thread".
1434         * target.c (done_accessing_memory): Likewise.
1435
1436 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1437
1438         * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1439         s390x-gs-linux64.o to srv_regobj.  Add s390-gs-linux64.xml,
1440         s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1441         srv_xmlfiles.  Add s390-gs-linux64-ipa.o and
1442         s390x-gs-linux64-ipa.o to ipa_obj.
1443         * linux-s390-low.c (HWCAP_S390_GS): New define.
1444         (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1445         New functions.
1446         (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1447         (s390_arch_setup): Check for guarded-storage support and choose
1448         appropriate tdesc.
1449         (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1450         init_registers_s390x_gs_linux64.
1451         * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1452         enum value.
1453         (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1454         (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1455
1456 2017-09-22  Simon Marchi  <simon.marchi@ericsson.com>
1457
1458         * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1459
1460 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1461
1462         * linux-low.h (struct lwp_info): Add new field, thread_handle.
1463         (thread_db_thread_handle): Declare.
1464         * linux-low.c (linux_target_ops): Initialize thread_handle.
1465         * server.c (handle_qxfer_threads_worker): Add support for
1466         "handle" attribute.
1467         * target.h (struct target_ops): Add new function pointer,
1468         thread_handle.
1469         (target_thread_handle): Define.
1470         * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1471         field in lwp.
1472         (thread_db_thread_handle): New function.
1473
1474 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1475
1476         * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1477         * linux-low.h (thread_db_notice_clone): Declare.
1478         * thread-db.c (thread_db_notice_clone): New function.
1479
1480 2017-09-21  Pedro Alves  <palves@redhat.com>
1481
1482         * server.c (gdb_read_memory, handle_status, process_serial_event)
1483         (handle_serial_event, handle_target_event): Adjust to
1484         set_desired_thread prototype change.
1485         * target.c (set_desired_thread): Remove 'use_general' parameter
1486         and adjust.
1487         * target.h (set_desired_thread): Remove 'use_general' parameter.
1488
1489 2017-09-20  Tom Tromey  <tom@tromey.com>
1490
1491         * target.c (target_terminal::terminal_state): Define.
1492         (target_terminal::init): Rename from target_terminal_init.
1493         (target_terminal::inferior): Rename from
1494         target_terminal_inferior.
1495         (target_terminal::ours): Rename from target_terminal_ours.
1496         (target_terminal::ours_for_output, target_terminal::info): New.
1497
1498 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1499
1500         * server.c (accumulate_file_name_length): Remove.
1501         (emit_dll_description): Adjust to std::string change.
1502         (handle_qxfer_libraries): Use std::string to hold document.
1503
1504 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1505
1506         * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1507         return type of xml_escape_text.
1508         * server.c (emit_dll_description): Likewise.
1509
1510 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1511
1512         * server.c (captured_main): Accept argument for --selftest.
1513         Update run_tests call.
1514         * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1515         when registering selftests.
1516
1517 2017-09-16  Sergio Durigan Junior  <sergiodj@redhat.com>
1518
1519         * regcache.c (get_thread_regcache): Update code to use "std::vector"
1520         instead of "VEC" for "target_desc.reg_defs".
1521         (regcache_cpy): Likewise.
1522         (registers_to_string): Likewise.
1523         (registers_from_string): Likewise.
1524         (find_regno): Likewise.
1525         (supply_regblock): Likewise.
1526         (regcache_raw_read_unsigned): Likewise.
1527         * tdesc.c (init_target_desc): Likewise.
1528         (tdesc_create_reg): Likewise.
1529         * tdesc.h: Remove declaration of "tdesc_reg_p".  Include <vector>.
1530         (struct target_desc) <reg_defs>: Convert to "std::vector".
1531         (target_desc): Do not initialize "reg_defs".
1532         (~target_desc): Update code to use "std::vector" instead of "VEC"
1533         for "target_desc.reg_defs".
1534         (operator==): Likewise.
1535
1536 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1537
1538         * inferiors.h (thread_to_gdb_id): Remove.
1539         * inferiors.c (thread_to_gdb_id): Remove.
1540         * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1541         * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1542         lynx_store_registers, lynx_read_memory, lynx_write_memory):
1543         Likewise.
1544         * nto-low.c (nto_fetch_registers, nto_store_registers,
1545         nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1546
1547 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1548
1549         * inferiors.h (gdb_id_to_thread_id): Remove.
1550         * inferiors.c (gdb_id_to_thread_id): Remove.
1551         * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1552         removal.  Move pid declaration closer to where it's used.
1553
1554 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1555
1556         * server.c (handle_detach): New function.
1557         (process_serial_event): Move code out, call handle_detach.
1558
1559 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1560
1561         * server.c (require_running): Rename to ...
1562         (require_running_or_return): ... this ...
1563         (require_running_or_break): ... and this.
1564         (handle_query, process_serial_event): Adjust.
1565
1566 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1567
1568         * linux-low.c (linux_set_resume_request): Remove unused
1569         variables.
1570
1571 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1572
1573         * server.c (first_thread_of): Remove.
1574         (process_serial_event): Replace usage of first_thread_of with
1575         find_any_thread_of_pid.
1576         * tracepoint.c (same_process_p): Remove.
1577         (gdb_agent_about_to_close): Replace usage of same_process_p with
1578         find_any_thread_of_pid.
1579         * linux-x86-low.c (same_process_callback): Remove.
1580         (x86_arch_setup_process_callback): Replace usage of
1581         same_process_callback with find_any_thread_of_pid.
1582         * thread-db.c (any_thread_of): Remove.
1583         (switch_to_process): Replace usage of any_thread_of with
1584         find_any_thread_of_pid.
1585         * inferiors.c (thread_pid_matches_callback): Remove.
1586         (find_thread_process): Adjust to use find_any_thread_of_pid.
1587
1588 2017-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1589
1590         * regcache.c (get_thread_regcache): Guard calls to "memset"
1591           with "!VEC_empty".
1592
1593 2017-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
1594
1595         * linux-low.c (handle_extended_wait): Use
1596         "allocate_target_description" instead of "XNEW".
1597         * linux-x86-low.c (initialize_low_arch): Likewise.
1598
1599 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1600
1601         * configure.srv (srv_i386_regobj): Remove.
1602         (srv_amd64_regobj): Remove.
1603         (srv_regobj): Set it to "" for x86 non-linux targets.
1604         * linux-x86-tdesc.c (i386_linux_read_description):
1605         * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1606         (init_registers_i386): Remove the declaration.
1607         (tdesc_i386): Remove the declaration.
1608         (lynx_i386_arch_setup): Call i386_create_target_description.
1609         * nto-x86-low.c: Likewise.
1610         * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1611         [!__x86_64__]: include arch/i386.h.
1612         (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1613
1614 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1615
1616         * configure.srv (srv_amd64_linux_xmlfiles): Remove
1617         i386/amd64-XXX-linux from it.
1618
1619 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1620
1621         * configure.srv: Empty srv_amd64_linux_regobj if $development is
1622         false.
1623         (ipa_amd64_linux_regobj): Remove.
1624         (ipa_x32_linux_regobj): Remove.
1625
1626 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1627
1628         * Makefile.in (arch-amd64.o): New rule.
1629         * configure.srv: Append arch-amd64.o.
1630         * linux-amd64-ipa.c: Include common/x86-xstate.h.
1631         (get_ipa_tdesc): Call amd64_linux_read_description.
1632         (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1633         and init_registers_amd64_XXX.
1634         * linux-x86-low.c (x86_linux_read_description): Call
1635         amd64_linux_read_description.
1636         (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1637         (initialize_low_arch): Don't call init_registers_x32_XXX and
1638         init_registers_amd64_XXX.
1639         * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1640         and tdesc_amd64_XXX.
1641         [__x86_64__] (amd64_tdesc_test): New function.
1642         (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1643         and init_registers_amd64_XXX.
1644         * linux-x86-tdesc.c: Include arch/amd64.h.
1645         (xcr0_to_tdesc_idx): New function.
1646         (i386_linux_read_description): New function.
1647         (amd64_get_ipa_tdesc_idx): New function.
1648         * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1649         (amd64_get_ipa_tdesc): Declare.
1650
1651 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1652
1653         * configure.srv (srv_i386_linux_xmlfiles): Remove
1654         i386/i386-XXX-linux.xml from it.
1655
1656 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1657
1658         * configure.srv: Set srv_i386_linux_regobj empty if $development
1659         is false.
1660         * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1661         initialize_low_tdesc.
1662         * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1663         with #if initialize_low_tdesc.
1664         * linux-x86-tdesc-selftest.c: New file.
1665         * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1666
1667 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1668
1669         * Makefile.in (arch-i386.o): New rule.
1670         * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1671         (x86_64-*-linux*): Likewise.
1672         * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1673         include arch/i386.h.
1674         (i386_linux_read_description): Remove code and call
1675         i386_create_target_description.
1676         * tdesc.c (allocate_target_description): New function.
1677         * tdesc.h (set_tdesc_architecture): Remove declaration.
1678         (set_tdesc_osabi): Likewise.
1679
1680 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1681
1682         * linux-x86-tdesc.c: Don't include <inttypes.h>.
1683         (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1684         set_tdesc_architecture and set_tdesc_osabi.  Remove code setting
1685         .xmltarget.
1686         * server.c (get_features_xml): Call tdesc_get_features_xml.
1687         * tdesc.c (set_tdesc_architecture): New function.
1688         (set_tdesc_osabi): New function.
1689         (tdesc_get_features_xml): New function.
1690         (tdesc_create_feature): Add an argument.
1691         * tdesc.h (struct target_desc) <features>: New field.
1692         <arch, osabi>: New field.
1693         (~target_desc): xfree features, arch, and osabi.
1694         (target_desc::oerator==): Don't compare .xmltarget.
1695         [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1696         (set_tdesc_osabi): Likewise.
1697         (tdesc_get_features_xml): Likewise.
1698
1699 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1700
1701         * linux-x86-tdesc.c: Include selftest.h.
1702         (i386_tdesc_test): New function.
1703         (initialize_low_tdesc): Call selftests::register_test.
1704         * tdesc.h: Include regdef.h.
1705         (target_desc): Override operator == and !=.
1706
1707 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1708
1709         * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1710         (ipa_obj): Likewise.
1711         * linux-i386-ipa.c: Include common/x86-xstate.h
1712         (get_ipa_tdesc): Call i386_linux_read_description.
1713         (initialize_low_tracepoint): Don't call  init_registers_XXX
1714         functions, call initialize_low_tdesc instead.
1715         * linux-x86-low.c (x86_linux_read_description): Call
1716         i386_linux_read_description.
1717         (initialize_low_arch): Don't call init_registers_i386_XXX
1718         functions, call initialize_low_tdesc.
1719         * linux-x86-tdesc.c: New file.
1720         * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1721         (i386_get_ipa_tdesc_idx): Declare.
1722         (i386_get_ipa_tdesc): Declare.
1723         (initialize_low_tdesc): Declare.
1724
1725 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1726
1727         * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1728         instead of 0.
1729
1730 2017-09-05  Yao Qi  <yao.qi@linaro.org>
1731
1732         * Makefile.in (IPA_OBJS): Add vec-ipa.o
1733         * regcache.c (get_thread_regcache): Use VEC_length.
1734         (init_register_cache): Likewise.
1735         (regcache_cpy): Likewise.
1736         (registers_to_string): Iterate reg_defs via VEC_iterate.
1737         (find_regno): Likewise.
1738         (find_register_by_number): Use VEC_index.
1739         (register_size): Call find_register_by_number.
1740         (register_data): Call find_register_by_number.
1741         (supply_regblock): Use VEC_length.
1742         (regcache_raw_read_unsigned): Likewise.
1743         * tdesc.c (init_target_desc): Iterate reg_defs via
1744         VEC_iterate.
1745         (default_description): Update initializer.
1746         (copy_target_description): Don't update field num_registers.
1747         * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1748         <num_registers>: Remove.
1749
1750 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
1751
1752         * Makefile.in (.SECONDARY): Define target.
1753
1754 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
1755
1756         * linux-low.c (linux_wait_1): Adjust.
1757         * server.c (queue_stop_reply_callback): Adjust.
1758
1759 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
1760
1761         * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1762         QEnvironmentUnset and QEnvironmentReset packets.
1763         (handle_query): Inform remote that QEnvironmentHexEncoded,
1764         QEnvironmentUnset and QEnvironmentReset are supported.
1765
1766 2017-08-25  Simon Marchi  <simon.marchi@ericsson.com>
1767
1768         * inferiors.h (inferior_target_data): Rename to ...
1769         (thread_target_data): ... this.
1770         (inferior_regcache_data): Rename to ...
1771         (thread_regcache_data): ... this.
1772         (set_inferior_regcache_data): Rename to ...
1773         (set_thread_regcache_data): ... this.
1774         * inferiors.c (inferior_target_data): Rename to ...
1775         (thread_target_data): ... this.
1776         (inferior_regcache_data): Rename to ...
1777         (thread_regcache_data): ... this.
1778         (set_inferior_regcache_data): Rename to ...
1779         (set_thread_regcache_data): ... this.
1780         (free_one_thread): Update.
1781         * linux-low.h (get_thread_lwp): Update.
1782         * regcache.c (get_thread_regcache): Update.
1783         (regcache_invalidate_thread): Update.
1784         (free_register_cache_thread): Update.
1785         * win32-i386-low.c (update_debug_registers_callback): Update.
1786         (win32_get_current_dr): Update.
1787         * win32-low.c (thread_rec): Update.
1788         (delete_thread_info): Update.
1789         (continue_one_thread): Update.
1790         (suspend_one_thread): Update.
1791
1792 2017-08-24  Simon Marchi  <simon.marchi@ericsson.com>
1793
1794         * inferiors.c (set_inferior_target_data): Remove.
1795         * inferiors.h (set_inferior_target_data): Remove.
1796
1797 2017-08-18  Yao Qi  <yao.qi@linaro.org>
1798
1799         * Makefile.in (OBS): Add selftest.o.
1800         * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1801         * configure, config.in: Re-generated.
1802         * server.c: Include common/sefltest.h.
1803         (captured_main): Handle option --selftest.
1804
1805 2017-08-09  Yao Qi  <yao.qi@linaro.org>
1806
1807         * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1808         i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1809         i386-avx-mpx.o and i386-mmx.o.
1810         (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1811         amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1812         (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1813         i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1814         i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1815         (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1816         i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1817         i386/amd64-avx-mpx.xml.
1818
1819 2017-08-09  Yao Qi  <yao.qi@linaro.org>
1820
1821         * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1822         and x32-avx-avx512.o.
1823         (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1824         i386/x32-avx-avx512.xml.
1825
1826 2017-07-26  Simon Marchi  <simon.marchi@ericsson.com>
1827
1828         * tracepoint.h (enum class fast_tpoint_collect_result): New
1829         enumeration.
1830         (fast_tracepoint_collecting): Change return type to
1831         fast_tpoint_collect_result.
1832         * tracepoint.c (fast_tracepoint_collecting): Likewise.
1833         * linux-low.h: Include tracepoint.h.
1834         (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1835         fast_tpoint_collect_result.
1836         * linux-low.c (handle_tracepoints): Adjust.
1837         (linux_fast_tracepoint_collecting): Change return type to
1838         fast_tpoint_collect_result.
1839         (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
1840         linux_wait_1, stuck_in_jump_pad_callback,
1841         lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
1842         proceed_one_lwp): Adjust to type change.
1843
1844 2017-07-10  Yao Qi  <yao.qi@linaro.org>
1845
1846         * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
1847
1848 2017-06-29  Yao Qi  <yao.qi@linaro.org>
1849
1850         * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
1851         Remove.
1852         [IN_PROCESS_AGENT] <xmltarget>: Likewise.
1853
1854 2017-06-20  Simon Marchi  <simon.marchi@ericsson.com>
1855
1856         * Makefile.in (IPA_OBJS): Sort and format one item per line.
1857
1858 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
1859
1860         * linux-low.c (linux_create_inferior): Adjust code to access the
1861         environment information via 'gdb_environ' class.
1862         * lynx-low.c (lynx_create_inferior): Likewise.
1863         * server.c (our_environ): Make it an instance of 'gdb_environ'.
1864         (get_environ): Return a pointer to 'our_environ'.
1865         (captured_main): Initialize 'our_environ'.
1866         * server.h (get_environ): Adjust prototype.
1867         * spu-low.c (spu_create_inferior): Adjust code to access the
1868         environment information via 'gdb_environ' class.
1869
1870 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
1871
1872         * linux-low.c (linux_read_memory, linux_write_memory): Remove
1873         usage of "register" keyword.
1874
1875 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
1876
1877         * configure: Re-generate.
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         * Makefile.in (COMPILE.pre): Add "-x c++".
1886
1887 2017-06-09  Sergio Durigan Junior  <sergiodj@redhat.com>
1888
1889         * fork-child.c: Conditionally include <signal.h>.
1890
1891 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
1892
1893         * server.c (handle_general_set): Handle new packet
1894         "QStartupWithShell".
1895         (handle_query): Add "QStartupWithShell" to the list of supported
1896         packets.
1897         (gdbserver_usage): Add help text explaining the
1898         new "--startup-with-shell" and "--no-startup-with-shell" CLI
1899         options.
1900         (captured_main): Recognize and act upon the presence of the new
1901         CLI options.
1902
1903 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
1904             Pedro Alves  <palves@redhat.com>
1905
1906         * Makefile.in (SFILES): Add "nat/fork-inferior.o".
1907         * configure: Regenerate.
1908         * configure.srv (srv_linux_obj): Add "fork-child.o" and
1909         "fork-inferior.o".
1910         (i[34567]86-*-lynxos*): Likewise.
1911         (spu*-*-*): Likewise.
1912         * fork-child.c: New file.
1913         * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
1914         and "environ.h".
1915         (linux_ptrace_fun): New function.
1916         (linux_create_inferior): Adjust function prototype to reflect
1917         change on "target.h".  Adjust function code to use
1918         "fork_inferior".
1919         (linux_request_interrupt): Delete "signal_pid".
1920         * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1921         (lynx_ptrace_fun): New function.
1922         (lynx_create_inferior): Adjust function prototype to reflect
1923         change on "target.h".  Adjust function code to use
1924         "fork_inferior".
1925         * nto-low.c (nto_create_inferior): Adjust function prototype and
1926         code to reflect change on "target.h".  Update comments.
1927         * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
1928         "common-terminal.h" and "environ.h".
1929         (terminal_fd): Moved to fork-child.c.
1930         (old_foreground_pgrp): Likewise.
1931         (restore_old_foreground_pgrp): Likewise.
1932         (last_status): Make it global.
1933         (last_ptid): Likewise.
1934         (our_environ): New variable.
1935         (startup_with_shell): Likewise.
1936         (program_name): Likewise.
1937         (program_argv): Rename to...
1938         (program_args): ...this.
1939         (wrapper_argv): New variable.
1940         (start_inferior): Delete function.
1941         (get_exec_wrapper): New function.
1942         (get_exec_file): Likewise.
1943         (get_environ): Likewise.
1944         (prefork_hook): Likewise.
1945         (post_fork_inferior): Likewise.
1946         (postfork_hook): Likewise.
1947         (postfork_child_hook): Likewise.
1948         (handle_v_run): Update code to deal with arguments coming from the
1949         remote host.  Update calls from "start_inferior" to
1950         "create_inferior".
1951         (captured_main): Likewise.  Initialize environment variable.  Call
1952         "have_job_control".
1953         * server.h (post_fork_inferior): New prototype.
1954         (get_environ): Likewise.
1955         (last_status): Declare.
1956         (last_ptid): Likewise.
1957         (signal_pid): Likewise.
1958         * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
1959         (spu_ptrace_fun): New function.
1960         (spu_create_inferior): Adjust function prototype to reflect change
1961         on "target.h".  Adjust function code to use "fork_inferior".
1962         * target.c (target_terminal_init): New function.
1963         (target_terminal_inferior): Likewise.
1964         (target_terminal_ours): Likewise.
1965         * target.h: Include <vector>.
1966         (struct target_ops) <create_inferior>: Update prototype.
1967         (create_inferior): Update macro.
1968         * utils.c (gdb_flush_out_err): New function.
1969         * win32-low.c (win32_create_inferior): Adjust function prototype
1970         and code to reflect change on "target.h".
1971
1972 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
1973
1974         * inferiors.c (switch_to_thread): New function.
1975
1976 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
1977
1978         * Makefile.in (SFILE): Add "common/job-control.c".
1979         (OBS): Add "job-control.o".
1980
1981 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
1982
1983         * Makefile: Remove "@host_makefile_frag@".
1984
1985 2017-05-05  Pedro Alves  <palves@redhat.com>
1986
1987         * configure: Regenerate.
1988
1989 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
1990
1991         * configure: Regenerate.
1992
1993 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
1994
1995         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
1996         software_single_step change of return type to
1997         std::vector<CORE_ADDR>.
1998         * linux-low.c (install_software_single_step_breakpoints):
1999         Likewise.
2000         * linux-low.h (install_software_single_step_breakpoints):
2001         Likewise.
2002
2003 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2004
2005         * remote-utils.c: Include "gdb_termios.h" instead of
2006         "terminal.h".
2007         * terminal.h: Delete file.
2008
2009 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2010
2011         * server.c: Include <vector>.
2012         <program_argv, wrapper_argv>: Convert to std::vector.
2013         (start_inferior): Rewrite function to use C++.
2014         (handle_v_run): Likewise.  Update code that calculates the argv
2015         based on the vRun packet; use C++.
2016         (captured_main): Likewise.
2017
2018 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
2019
2020         * server.c (handle_v_cont): Initialize thread_resume::thread
2021         with null_ptid.
2022
2023 2017-04-05  Pedro Alves  <palves@redhat.com>
2024
2025         * configure: Regenerate.
2026
2027 2017-04-05  Pedro Alves  <palves@redhat.com>
2028
2029         * gdbreplay.c (sync_error): Constify.
2030         * linux-x86-low.c (push_opcode): Constify.
2031
2032 2017-04-05  Pedro Alves  <palves@redhat.com>
2033
2034         * win32-low.c (get_child_debug_event)
2035         <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2036         Report TARGET_WAITKIND_SPURIOUS instead.
2037
2038 2017-04-05  Pedro Alves  <palves@redhat.com>
2039
2040         * remote-utils.c (remote_prepare, remote_open): Constify.
2041         * remote-utils.h (remote_prepare, remote_open): Constify.
2042         * server.c (captured_main): Constify 'port' handling.
2043
2044 2017-04-04  Simon Marchi  <simon.marchi@ericsson.com>
2045
2046         * Makefile.in (clean): Clear .deps.
2047
2048 2017-03-31  Simon Marchi  <simon.marchi@polymtl.ca>
2049
2050         * .gitignore: Remove generated files, replace with wildcard.
2051         * (clean): Replace removal of generated files with wildcard.
2052         (version.c): Replace with...
2053         (version-generated.c): ...this.
2054         (xml-builtin.c): Replace with...
2055         (xml-builtin-generated.c): ...this.
2056         (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2057         (%.c: *regformats*): Replace with...
2058         (%-generated.c: *regformats*): ...this.
2059
2060 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
2061
2062         * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2063         (xtensa_fill_gregset): Call collect_register_by_name for
2064         threadptr register.
2065         (xtensa_store_gregset): Call supply_register_by_name for
2066         threadptr register.
2067
2068 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
2069
2070         * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2071         for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2072         (xtensa_store_gregset): Call supply_register for all registers in
2073         a0_regnum..a0_regnum + C0_NREGS range.
2074
2075 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
2076
2077         * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2078         (ax-ipa.o: ax.c): Remove.
2079         (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2080         (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2081         (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2082         (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2083         (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2084
2085 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
2086
2087         * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2088         (print-utils-ipa.o: ../common/print-utils.c): Remove.
2089         (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2090         (errors-ipa.o: ../common/errors.c): Remove.
2091         (format-ipa.o: ../common/format.c): Remove.
2092         (common-utils-ipa.o: ../common/common-utils.c): Remove.
2093
2094 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
2095
2096         * Makefile.in (%-ipa.o: %.c): New rule.
2097         (tracepoint-ipa.o: tracepoint.c): Remove.
2098         (utils-ipa.o: utils.c): Remove.
2099         (remote-utils-ipa.o: remote-utils.c): Remove.
2100         (regcache-ipa.o: regcache.c): Remove.
2101         (i386-linux-ipa.o: i386-linux.c): Remove.
2102         (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2103         (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2104         (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2105         (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2106         (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2107         (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2108         (amd64-linux-ipa.o: amd64-linux.c): Remove.
2109         (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2110         (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2111         (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2112         (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2113         (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2114         (aarch64-ipa.o: aarch64.c): Remove.
2115         (s390-linux32-ipa.o: s390-linux32.c): Remove.
2116         (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2117         (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2118         (s390-linux64-ipa.o: s390-linux64.c): Remove.
2119         (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2120         (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2121         (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2122         (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2123         (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2124         (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2125         (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2126         (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2127         (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2128         (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2129         (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2130         (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2131         (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2132         (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2133         (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2134         (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2135         (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2136         (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2137         (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2138         (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2139         (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2140         (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2141         (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2142         (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2143         (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2144         (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2145         (tdesc-ipa.o: tdesc.c): Remove.
2146         (x32-linux-ipa.o: x32-linux.c): Remove.
2147         (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2148         (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2149
2150 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
2151
2152         * Makefile.in (%.o: ../arch/%.c): New rule.
2153         (arm.o: ../arch/arm.c): Remove.
2154         (arm-linux.o: ../arch/arm-linux.c): Remove.
2155         (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2156         (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2157
2158 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
2159
2160         * Makefile.in (%.o: ../nat/%.c): New rule.
2161         (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2162         (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2163         (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2164         (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2165         (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2166         (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2167         (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2168         (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2169         (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2170         (linux-personality.o: ../nat/linux-personality.c): Remove.
2171         (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2172         (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2173         (x86-linux.o: ../nat/x86-linux.c): Remove.
2174         (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2175         (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2176
2177 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
2178
2179         * Makefile.in (%.o: ../common/%.c): New rule.
2180         (signals.o: ../common/signals.c): Remove.
2181         (print-utils.o: ../common/print-utils.c): Remove.
2182         (rsp-low.o: ../common/rsp-low.c): Remove.
2183         (common-utils.o: ../common/common-utils.c): Remove.
2184         (posix-strerror.o: ../common/posix-strerror.c): Remove.
2185         (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2186         (vec.o: ../common/vec.c): Remove.
2187         (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2188         (xml-utils.o: ../common/xml-utils.c): Remove.
2189         (ptid.o: ../common/ptid.c): Remove.
2190         (buffer.o: ../common/buffer.c): Remove.
2191         (format.o: ../common/format.c): Remove.
2192         (filestuff.o: ../common/filestuff.c): Remove.
2193         (agent.o: ../common/agent.c): Remove.
2194         (errors.o: ../common/errors.c): Remove.
2195         (environ.o: ../common/environ.c): Remove.
2196         (common-debug.o: ../common/common-debug.c): Remove.
2197         (cleanups.o: ../common/cleanups.c): Remove.
2198         (common-exceptions.o: ../common/common-exceptions.c): Remove.
2199         (fileio.o: ../common/fileio.c): Remove.
2200         (common-regcache.o: ../common/common-regcache.c): Remove.
2201         (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2202         (new-op.o: ../common/new-op.c): Remove.
2203         (btrace-common.o: ../common/btrace-common.c): Remove.
2204
2205 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
2206
2207         * Makefile.in (%.o: ../target/%.c): New rule.
2208         (waitstatus.o: ../target/waitstatus.c): Remove.
2209
2210 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
2211
2212         * Makefile.in
2213         (%.c: ../regformats/%.dat,
2214         (%.c: ../regformats/arm/%.dat,
2215         (%.c: ../regformats/i386/%.dat,
2216         (%.c: ../regformats/rs6000/%.dat): New rules.
2217         (aarch64.c): Remove.
2218         (reg-arm.c): Remove.
2219         (arm-with-iwmmxt.c): Remove.
2220         (arm-with-vfpv2.c): Remove.
2221         (arm-with-vfpv3.c): Remove.
2222         (arm-with-neon.c): Remove.
2223         (reg-bfin.c): Remove.
2224         (reg-cris.c): Remove.
2225         (reg-crisv32.c): Remove.
2226         (i386.c): Remove.
2227         (i386-linux.c): Remove.
2228         (i386-avx.c): Remove.
2229         (i386-avx-linux.c): Remove.
2230         (i386-avx-avx512.c): Remove.
2231         (i386-avx-avx512-linux.c): Remove.
2232         (i386-mpx.c): Remove.
2233         (i386-mpx-linux.c): Remove.
2234         (i386-avx-mpx-avx512-pku.c): Remove.
2235         (i386-avx-mpx-avx512-pku-linux.c): Remove.
2236         (i386-avx-mpx.c): Remove.
2237         (i386-avx-mpx-linux.c): Remove.
2238         (i386-mmx.c): Remove.
2239         (i386-mmx-linux.c): Remove.
2240         (reg-ia64.c): Remove.
2241         (reg-m32r.c): Remove.
2242         (reg-m68k.c): Remove.
2243         (reg-cf.c): Remove.
2244         (mips-linux.c): Remove.
2245         (mips-dsp-linux.c): Remove.
2246         (mips64-linux.c): Remove.
2247         (mips64-dsp-linux.c): Remove.
2248         (nios2-linux.c): Remove.
2249         (powerpc-32.c): Remove.
2250         (powerpc-32l.c): Remove.
2251         (powerpc-altivec32l.c): Remove.
2252         (powerpc-cell32l.c): Remove.
2253         (powerpc-vsx32l.c): Remove.
2254         (powerpc-isa205-32l.c): Remove.
2255         (powerpc-isa205-altivec32l.c): Remove.
2256         (powerpc-isa205-vsx32l.c): Remove.
2257         (powerpc-e500l.c): Remove.
2258         (powerpc-64l.c): Remove.
2259         (powerpc-altivec64l.c): Remove.
2260         (powerpc-cell64l.c): Remove.
2261         (powerpc-vsx64l.c): Remove.
2262         (powerpc-isa205-64l.c): Remove.
2263         (powerpc-isa205-altivec64l.c): Remove.
2264         (powerpc-isa205-vsx64l.c): Remove.
2265         (s390-linux32.c): Remove.
2266         (s390-linux32v1.c): Remove.
2267         (s390-linux32v2.c): Remove.
2268         (s390-linux64.c): Remove.
2269         (s390-linux64v1.c): Remove.
2270         (s390-linux64v2.c): Remove.
2271         (s390-te-linux64.c): Remove.
2272         (s390-vx-linux64.c): Remove.
2273         (s390-tevx-linux64.c): Remove.
2274         (s390x-linux64.c): Remove.
2275         (s390x-linux64v1.c): Remove.
2276         (s390x-linux64v2.c): Remove.
2277         (s390x-te-linux64.c): Remove.
2278         (s390x-vx-linux64.c): Remove.
2279         (s390x-tevx-linux64.c): Remove.
2280         (tic6x-c64xp-linux.c): Remove.
2281         (tic6x-c64x-linux.c): Remove.
2282         (tic6x-c62x-linux.c): Remove.
2283         (reg-sh.c): Remove.
2284         (reg-sparc64.c): Remove.
2285         (reg-spu.c): Remove.
2286         (amd64.c): Remove.
2287         (amd64-linux.c): Remove.
2288         (amd64-avx.c): Remove.
2289         (amd64-avx-linux.c): Remove.
2290         (amd64-avx-avx512.c): Remove.
2291         (amd64-avx-avx512-linux.c): Remove.
2292         (amd64-mpx.c): Remove.
2293         (amd64-mpx-linux.c): Remove.
2294         (amd64-avx-mpx-avx512-pku.c): Remove.
2295         (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2296         (amd64-avx-mpx.c): Remove.
2297         (amd64-avx-mpx-linux.c): Remove.
2298         (x32.c): Remove.
2299         (x32-linux.c): Remove.
2300         (x32-avx.c): Remove.
2301         (x32-avx-linux.c): Remove.
2302         (x32-avx-avx512.c): Remove.
2303         (x32-avx-avx512-linux.c): Remove.
2304         (reg-xtensa.c): Remove.
2305         (reg-tilegx.c): Remove.
2306         (reg-tilegx32.c): Remove.
2307
2308 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
2309
2310         * Makefile.in (SFILES): Add "common/environ.c".
2311         (OBJS): Add "common/environ.h".
2312
2313 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2314
2315         * configure.ac: Check if the fs_base and gs_base members of
2316         `struct user_regs_struct' exist.
2317         * config.in: Regenerated.
2318         * configure: Likewise.
2319
2320 2017-01-09  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2321
2322         * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2323         target_read_memory.
2324         * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2325         (get_next_pcs_syscall_next_pc): Likewise.
2326
2327 2016-12-23  Luis Machado  <lgustavo@codesourcery.com>
2328
2329         * win32-i386-low.c: Fix incorrect reference to a couple source files.
2330         * nto-x86-low.c: Likewise.
2331
2332 2016-11-30  Simon Marchi  <simon.marchi@polymtl.ca>
2333
2334         * Makefile.in: Include disable-implicit-rules.mk.
2335
2336 2016-11-23  Pedro Alves  <palves@redhat.com>
2337
2338         * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2339         (debug_vprintf): Use std::chrono::steady_clock instead of
2340         gettimeofday.  Use '.' instead of ':'.
2341         * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2342         (get_timestamp): Use std::chrono::steady_clock instead of
2343         gettimeofday.
2344
2345 2016-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
2346
2347         * Makefile.in: Fix whitespace formatting.
2348
2349 2016-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
2350
2351         * Makefile.in (SFILES, OBS): Flatten list and order
2352         alphabetically.
2353
2354 2016-11-23  Pedro Alves  <palves@redhat.com>
2355
2356         * event-loop.c (handle_file_event): Use warning.
2357         * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2358         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2359         Use warning.
2360
2361 2016-11-23  Pedro Alves  <palves@redhat.com>
2362
2363         * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2364         output.
2365         * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2366         * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2367         debug_printf and debug_flush for debug output.
2368         * server.c (handle_general_set): Likewise.
2369         * thread-db.c (try_thread_db_load): Use debug_printf for debug
2370         output.
2371
2372 2016-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
2373
2374         * Makefile.in (.c.o): Replace rule with ...
2375         (%.o: %.c): ... this one.
2376
2377 2016-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
2378
2379         * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2380         prefixed with @GMAKE_FALSE@.  Update comment related to non-GNU
2381         make.
2382         * configure.ac: Remove checks for the make program.
2383         * configure: Re-generate.
2384
2385 2016-10-28  Pedro Alves  <palves@redhat.com>
2386
2387         * Makefile.in (CXX_DIALECT): Get from configure.
2388         (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2389         * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2390         * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2391         * config.in: Regenerate.
2392         * configure: Regenerate.
2393
2394 2016-10-27  Yao Qi  <yao.qi@linaro.org>
2395
2396         * linux-low.c (linux_supports_range_stepping): Return true if
2397         can_software_single_step return true.
2398
2399 2016-10-27  Yao Qi  <yao.qi@linaro.org>
2400
2401         * inferiors.c (find_inferior_in_random): New function.
2402         * inferiors.h (find_inferior_in_random): Declare.
2403         * linux-low.c (linux_wait_for_event_filtered): Call
2404         find_inferior_in_random instead of find_inferior.
2405
2406 2016-10-27  Yao Qi  <yao.qi@linaro.org>
2407
2408         * linux-low.c (linux_wait_1): If single-step breakpoints are
2409         inserted, remove them.
2410
2411 2016-10-26  Pedro Alves  <palves@redhat.com>
2412
2413         * linux-low.c (handle_extended_wait): Link parent/child fork
2414         threads.
2415         (linux_wait_1): Unlink them.
2416         (linux_set_resume_request): Ignore resume requests for
2417         already-resumed and unhandled fork child threads.
2418         * linux-low.h (struct lwp_info) <fork_relative>: New field.
2419         * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2420         New functions.
2421         (handle_v_requests) <vCont>: Don't call require_running.
2422         * server.h (in_queued_stop_replies): New declaration.
2423
2424 2016-10-24  Yao Qi  <yao.qi@linaro.org>
2425
2426         PR server/20733
2427         * linux-aarch64-low.c (append_insns): Cast the return value to
2428         'uint32_t *'.
2429
2430 2016-10-10  Yao Qi  <yao.qi@linaro.org>
2431
2432         * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2433
2434 2016-10-06  Sergio Durigan Junior  <sergiodj@redhat.com>
2435
2436         * target.c (target_supports_multi_process): New function, moved
2437         from...
2438         * target.h (target_supports_multi_process): ... here.  Remove
2439         macro.
2440
2441 2016-10-05  Tom Tromey  <tom@tromey.com>
2442
2443         PR remote/20655:
2444         * tracepoint.c (handle_tracepoint_bkpts): Check
2445         ipa_error_tracepoint, not ipa_stopping_tracepoint.
2446
2447 2016-10-05  Yao Qi  <yao.qi@linaro.org>
2448
2449         * configure.srv: Update the path of arm-*.xml files.
2450
2451 2016-10-05  Terry Guo  <terry.guo@arm.com>
2452             Yao Qi  <yao.qi@linaro.org>
2453
2454         * Makefile.in: Adjust the path of rules.
2455         * configure.srv: Update the path of xml files.
2456         * regformats/arm-with-iwmmxt.dat: Regenerated.
2457         * regformats/arm-with-neon.dat: Likewise.
2458         * regformats/arm-with-vfpv2.dat: Likewise.
2459         * regformats/arm-with-vfpv3.dat Likewise.
2460
2461 2016-09-30  Yao Qi  <yao.qi@linaro.org>
2462
2463         PR gdbserver/20627
2464         * target.c (target_stop_and_wait): Don't call
2465         target_continue_no_signal, use resume_stop instead.
2466
2467 2016-09-26  Yao Qi  <yao.qi@linaro.org>
2468
2469         * linux-low.c (linux_wait_1): Call debug_exit.
2470
2471 2016-09-23  Pedro Alves  <palves@redhat.com>
2472
2473         * Makefile.in (SFILES): Add common/new-op.c.
2474         (OBS): Add common/new-op.o.
2475         (new-op.o): New rule.
2476
2477 2016-09-21  Simon Marchi  <simon.marchi@ericsson.com>
2478
2479         * .gitinore: Ignore more files.
2480
2481 2016-09-21  Yao Qi  <yao.qi@linaro.org>
2482
2483         * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2484         23.
2485
2486 2016-09-19  Sergio Durigan Junior  <sergiodj@redhat.com>
2487
2488         * server.c (start_inferior): Call target_mourn_inferior instead of
2489         mourn_inferior; pass ptid_t argument to it.
2490         (resume): Likewise.
2491         (handle_target_event): Likewise.
2492         * target.c (target_mourn_inferior): New function.
2493         * target.h (mourn_inferior): Delete macro.
2494
2495 2016-09-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2496
2497         * linux-low.c (lwp_is_stepping): New function.
2498
2499 2016-09-06  Carl Love  <cel@us.ibm.com>
2500
2501         * server.c (start_inferior):  Fixed comment, requested comment change
2502         didn't get updated correctly.  Removed reference to ptrace () call as
2503         it is only true on Linux systems.
2504
2505 2016-09-06  Carl Love  <cel@us.ibm.com>
2506
2507         * server.c (start_inferior):  Do not call
2508         function target_post_create_inferior () if the
2509         inferior process has already exited.
2510
2511 2016-09-05  Pedro Alves  <palves@redhat.com>
2512
2513         * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2514         (COMPILE.pre, CC_LD): Use CXX directly.
2515         (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2516         * acinclude.m4: Don't include build-with-cxx.m4.
2517         * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2518         * configure: Regenerate.
2519
2520 2016-09-02  Akash Trehan  <akash.trehan123@gmail.com>
2521
2522         PR gdb/19495
2523         * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2524         call writing data to own_buf.
2525
2526 2016-09-01  Sergio Durigan Junior  <sergiodj@redhat.com>
2527
2528         * target.c (mywait): Call target_wait instead of
2529         the_target->wait.
2530         (target_wait): New function.
2531
2532 2016-09-01  Sergio Durigan Junior  <sergiodj@redhat.com>
2533
2534         * server.c (start_inferior): New variable 'ptid'.  Replace calls
2535         to the_target->resume by target_continue{,_no_signal}, depending
2536         on the case.
2537         * target.c (target_stop_and_wait): Call target_continue_no_signal
2538         instead of the_target->resume.
2539         (target_continue): New function.
2540
2541 2016-08-31  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2542
2543         * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2544
2545 2016-08-25  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
2546
2547         PR server/20491
2548         * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2549         ps_prochandle.
2550         * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2551         * linux-arm-low.c (ps_get_thread_area): Likewise.
2552         * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2553         * linux-m68k-low.c (ps_get_thread_area): Likewise.
2554         * linux-mips-low.c (ps_get_thread_area): Likewise.
2555         * linux-nios2-low.c (ps_get_thread_area): Likewise.
2556         * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2557         * linux-x86-low.c (ps_get_thread_area): Likewise.
2558         * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2559
2560 2016-08-19  Pedro Alves  <palves@redhat.com>
2561
2562         * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2563
2564 2016-08-19  Pedro Alves  <palves@redhat.com>
2565
2566         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2567         comment.  Use memcpy instead of casting through unsigned long.
2568
2569 2016-08-19  Pedro Alves  <palves@redhat.com>
2570
2571         * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2572         allocating around 0x80000000.
2573
2574 2016-08-19  Pedro Alves  <palves@redhat.com>
2575
2576         PR gdb/20415
2577         * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2578         (x32-avx512-linux-ipa.o): New rules.
2579         * configure.ac (x86_64-*-linux*): New x32 check.
2580         * configure.srv (ipa_x32_linux_regobj): New.
2581         (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2582         * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2583         descriptions.
2584         (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2585         descriptions.
2586         * configure: Regenerate.
2587
2588 2016-08-09  Pedro Alves  <palves@redhat.com>
2589
2590         PR gdb/18653
2591         * Makefile.in (OBS): Add signals-state-save-restore.o.
2592         (signals-state-save-restore.o): New rule.
2593         * config.in: Regenerate.
2594         * configure: Regenerate.
2595         * linux-low.c: Include "signals-state-save-restore.h".
2596         (linux_create_inferior): Call
2597         restore_original_signals_state.
2598         * server.c: Include "dispositions-save-restore.h".
2599         (captured_main): Call save_original_signals_state.
2600
2601 2016-08-05  Pedro Alves  <palves@redhat.com>
2602
2603         * configure: Regenerate.
2604
2605 2016-08-04  Yao Qi  <yao.qi@linaro.org>
2606
2607         * linux-low.c (regsets_fetch_inferior_registers): Check
2608         errno is ESRCH or not.
2609
2610 2016-08-02  Yao Qi  <yao.qi@linaro.org>
2611
2612         * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2613         <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2614         (thread_db_load_search): Update.
2615         (try_thread_db_load_1): Don't look for td_ta_event_addr,
2616         td_ta_set_event and td_ta_event_getmsg.
2617
2618 2016-07-26  Pedro Alves  <palves@redhat.com>
2619
2620         PR server/20414
2621         * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2622         of unsigned long for 64-bit registers and use uint32_t instead of
2623         unsigned int for 32-bit registers.
2624
2625 2016-07-26  Pedro Alves  <palves@redhat.com>
2626
2627         * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2628         to 'ptrace'.
2629
2630 2016-07-21  Tom Tromey  <tom@tromey.com>
2631
2632         * configure: Rebuild.
2633
2634 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2635
2636         * mem-break.c (find_gdb_breakpoint): Cast bp to
2637         'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2638
2639 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2640
2641         * server.c (handle_v_requests): Support s and S actions
2642         if target_supports_software_single_step return true.
2643
2644 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2645
2646         * linux-low.c (resume_stopped_resumed_lwps): If resume request
2647         is resume_step, call maybe_hw_step.
2648         (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2649         and unstop them.
2650         (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2651         breakpoints or not.
2652         (proceed_one_lwp): If resume request is resume_step, install
2653         reinsert breakpoints and call maybe_hw_step.
2654
2655 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2656
2657         * linux-low.c (proceed_one_lwp): Declare.
2658         (linux_resume_one_thread): Remove local variable 'step'.
2659         Lift code enqueue signal.  Call proceed_one_lwp instead of
2660         linux_resume_one_lwp.
2661
2662 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2663
2664         * linux-low.c (linux_resume_one_thread): Call
2665         enqueue_pending_signal.
2666
2667 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2668
2669         * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2670         * inferiors.c (do_restore_current_thread_cleanup): New function.
2671         (make_cleanup_restore_current_thread): Likewise.
2672         * linux-low.c (install_software_single_step_breakpoints): Call
2673         make_cleanup_restore_current_thread.  Switch current_thread to
2674         thread.
2675
2676 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2677
2678         * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2679         (set_reinsert_breakpoint): New parameter ptid.  Callers updated.
2680         (clone_one_breakpoint): Likewise.
2681         (delete_reinsert_breakpoints): Change parameter to thread.
2682         Callers updated.
2683         (has_reinsert_breakpoints): Likewise.
2684         (uninsert_reinsert_breakpoints): Likewise.
2685         (reinsert_reinsert_breakpoints): Likewise.
2686         * mem-break.h (set_reinsert_breakpoint): Update declaration.
2687         (delete_reinsert_breakpoints): Likewise.
2688         (reinsert_reinsert_breakpoints): Likewise.
2689         (uninsert_reinsert_breakpoints): Likewise.
2690         (has_reinsert_breakpoints): Likewise.
2691
2692 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2693
2694         * inferiors.c (get_thread_process): Make parameter const.
2695         * inferiors.h (get_thread_process): Update declaration.
2696         * mem-break.c (clone_all_breakpoints): Remove all parameters.
2697         Add new parameters child_thread and parent_thread.  Callers
2698         updated.
2699         * mem-break.h (clone_all_breakpoints): Update declaration.
2700
2701 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2702
2703         * mem-break.c (struct breakpoint) <cond_list>: Remove.
2704         <command_list, handler>: Remove.
2705         (struct gdb_breakpoint): New.
2706         (struct other_breakpoint): New.
2707         (struct reinsert_breakpoint): New.
2708         (is_gdb_breakpoint): New function.
2709         (any_persistent_commands): Update command_list if
2710         is_gdb_breakpoint returns true.
2711         (set_breakpoint): Create breakpoints according to their types.
2712         (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2713         (set_gdb_breakpoint_1): Likewise.
2714         (set_gdb_breakpoint): Likewise.
2715         (clear_breakpoint_conditions): Change parameter type to
2716         'struct gdb_breakpoint *'.
2717         (clear_breakpoint_commands): Likewise.
2718         (clear_breakpoint_conditions_and_commands): Likewise.
2719         (add_condition_to_breakpoint): Likewise.
2720         (add_breakpoint_condition): Likewise.
2721         (add_commands_to_breakpoint): Likewise.
2722         (check_breakpoints): Check other_breakpoint.
2723         (clone_one_breakpoint): Clone breakpopint according to its type.
2724         * mem-break.h (struct gdb_breakpoint): Declare.
2725         (set_gdb_breakpoint): Update declaration.
2726         (clear_breakpoint_conditions_and_commands): Likewise.
2727         (add_breakpoint_condition): Likewise.
2728         (add_breakpoint_commands): Likewise.
2729         * server.c (process_point_options): Change parameter type to
2730         'struct gdb_breakpoint *'.
2731
2732 2016-07-21  Yao Qi  <yao.qi@linaro.org>
2733
2734         * mem-break.c (set_breakpoint_at): Rename it to ...
2735         (set_breakpoint_type_at): ... it.
2736         (set_breakpoint_at): Call set_breakpoint_type_at.
2737         (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2738         * mem-break.h (set_breakpoint_at): Update comments.
2739
2740 2016-07-12  Chung-Lin Tang  <cltang@codesourcery.com>
2741
2742         * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2743         to buf parameter.
2744         (nios2_store_gregset): Likewise.
2745
2746 2016-07-01  Pedro Alves  <palves@redhat.com>
2747             Antoine Tremblay  <antoine.tremblay@ericsson.com>
2748
2749         * linux-low.c: Change interface to take the target lwp_info
2750         pointer directly and return void.  Handle detaching from a zombie
2751         thread.
2752         (linux_detach_lwp_callback): New function.
2753         (linux_detach): Detach from the leader thread after detaching from
2754         the clone threads.
2755
2756 2016-06-28  Yao Qi  <yao.qi@linaro.org>
2757
2758         * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2759         for variable new_offset.
2760         (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2761         (aarch64_ftrace_insn_reloc_cb): Likewise.
2762         (aarch64_ftrace_insn_reloc_tb): Likewise.
2763         (aarch64_install_fast_tracepoint_jump_pad): Likewise.  Use
2764         PRIx64 instead of PRIx32.
2765
2766 2016-06-28  Yao Qi  <yao.qi@linaro.org>
2767
2768         * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2769         (the_low_target): Install arm_get_syscall_trapinfo.
2770
2771 2016-06-28  Yao Qi  <yao.qi@linaro.org>
2772
2773         * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2774         function.
2775         (the_low_target): Install aarch64_get_syscall_trapinfo.
2776
2777 2016-06-28  Yao Qi  <yao.qi@linaro.org>
2778
2779         * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2780         Callers updated.
2781         * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2782         Remove parameter sysno.
2783         * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2784         sysret.
2785
2786 2016-06-21  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2787
2788         * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2789         (s390_emit_ne_goto): Likewise.
2790         (s390_emit_lt_goto): Likewise.
2791         (s390_emit_le_goto): Likewise.
2792         (s390_emit_gt_goto): Likewise.
2793         (s390_emit_ge_goto): Likewise.
2794         (s390x_emit_eq_goto): Likewise.
2795         (s390x_emit_ne_goto): Likewise.
2796         (s390x_emit_lt_goto): Likewise.
2797         (s390x_emit_le_goto): Likewise.
2798         (s390x_emit_gt_goto): Likewise.
2799         (s390x_emit_ge_goto): Likewise.
2800         (s390_emit_ops_impl): Mark variable static.
2801         (s390x_emit_ops): Likewise.
2802
2803 2016-06-17  Yao Qi  <yao.qi@linaro.org>
2804
2805         * linux-low.c (handle_extended_wait): Call
2806         uninsert_reinsert_breakpoints for the parent process.  Remove
2807         reinsert breakpoints from the child process.  Reinsert them to
2808         the parent process when vfork is done.
2809         * mem-break.c (uninsert_reinsert_breakpoints): New function.
2810         (reinsert_reinsert_breakpoints): New function.
2811         * mem-break.h (uninsert_reinsert_breakpoints): Declare
2812         (reinsert_reinsert_breakpoints): Declare.
2813
2814 2016-06-17  Yao Qi  <yao.qi@linaro.org>
2815
2816         * linux-low.c (handle_extended_wait): If the parent is doing
2817         step-over, remove the reinsert breakpoints from the forked child.
2818
2819 2016-06-17  Yao Qi  <yao.qi@linaro.org>
2820
2821         * linux-low.c (unsuspend_all_lwps): Declare.
2822         (linux_low_filter_event): If thread exited, call finish_step_over.
2823         If step-over is finished, unsuspend other threads.
2824
2825 2016-06-17  Yao Qi  <yao.qi@linaro.org>
2826
2827         * linux-low.c (linux_resume_one_lwp_throw): Assert
2828         has_reinsert_breakpoints returns false.
2829         * mem-break.c (delete_disabled_breakpoints): Assert
2830         bp type isn't reinsert_breakpoint.
2831
2832 2016-06-17  Yao Qi  <yao.qi@linaro.org>
2833
2834         * linux-low.c (maybe_hw_step): New function.
2835         (linux_resume_one_lwp_throw): Call maybe_hw_step.
2836         (finish_step_over): Switch current_thread to lwp temporarily,
2837         and assert has_reinsert_breakpoints returns true.
2838         (proceed_one_lwp): Call maybe_hw_step.
2839         * mem-break.c (has_reinsert_breakpoints): New function.
2840         * mem-break.h (has_reinsert_breakpoints): Declare.
2841
2842 2016-06-02  Jon Turney  <jon.turney@dronecode.org.uk>
2843
2844         * win32-low.c (win32_create_inferior): Add pointer casts for C++.
2845
2846 2016-05-17  Yao Qi  <yao.qi@linaro.org>
2847
2848         * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
2849         instead of find_inferior.
2850
2851 2016-05-05  Yao Qi  <yao.qi@linaro.org>
2852
2853         * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
2854         Initialize res to zero.
2855
2856 2016-05-05  Yao Qi  <yao.qi@linaro.org>
2857
2858         * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
2859         to uint32_t.
2860
2861 2016-05-04  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2862
2863         * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
2864         used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
2865         (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
2866
2867 2016-04-28  Par Olsson  <par.olsson@windriver.com>
2868             Simon Marchi  <simon.marchi@ericsson.com>
2869
2870         * tracepoint.c (write_inferior_int8): New function.
2871         (cmd_qtenable_disable): Write enable flag using
2872         write_inferior_int8.
2873
2874 2016-04-25  Yao Qi  <yao.qi@linaro.org>
2875
2876         * linux-low.c (lwp_signal_can_be_delivered): Adjust.
2877         (need_step_over_p): Return zero if the LWP has pending signals
2878         can be delivered on software single step target.
2879
2880 2016-04-25  Yao Qi  <yao.qi@linaro.org>
2881
2882         * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
2883         return instead of error.
2884
2885 2016-04-22  Yao Qi  <yao.qi@linaro.org>
2886
2887         * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
2888         to 23.
2889
2890 2016-04-22  Yao Qi  <yao.qi@linaro.org>
2891
2892         * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
2893         signal when stepping over breakpoint with software single
2894         step.
2895
2896 2016-04-21  Pedro Alves  <palves@redhat.com>
2897
2898         * linux-s390-low.c (s390_collect_ptrace_register)
2899         (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
2900         add casts.
2901         (s390_check_regset): Use void * instead of gdb_byte *.
2902
2903 2016-04-20  Pedro Alves  <palves@redhat.com>
2904
2905         * configure: Renegerate.
2906
2907 2016-04-20  Yao Qi  <yao.qi@linaro.org>
2908
2909         * linux-aarch32-low.c: Include "arch/arm-linux.h".
2910         (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
2911         number 16.
2912         (arm_store_gregset): Likewise.
2913
2914 2016-04-16  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2915
2916         * Makefile.in (clean): Add removal for i386-avx-mpx.c,
2917         i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
2918         (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
2919         (amd64-avx-mpx-linux.c): New rules.
2920         (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
2921         * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
2922         (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
2923         (srv_amd64_regobj): Add amd64-avx-mpx.o.
2924         (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
2925         (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
2926         (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
2927         (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
2928         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
2929         (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
2930         (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
2931         * linux-x86-low.c (x86_linux_read_description): Add case for
2932         X86_XSTATE_AVX_MPX_MASK.
2933         (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
2934         (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
2935         init_registers_i386_avx_mpx_linux.
2936         * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
2937         (initialize_low_tracepoint): Call
2938         init_registers_i386_avx_mpx_linux.
2939         * linux-amd64-ipa.c (get_ipa_tdesc):  Add case for avx_mpx.
2940         (initialize_low_tracepoint): Call
2941         init_registers_amd64_avx_mpx_linux.
2942         * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
2943         (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
2944         (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
2945         declarations.
2946
2947 2016-04-18  Pedro Alves  <palves@redhat.com>
2948
2949         * configure: Regenerate.
2950
2951 2016-04-13  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2952
2953         * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
2954         (aarch64_emit_sub): Likewise.
2955
2956 2016-04-12  Pedro Alves  <palves@redhat.com>
2957
2958         * utils.c (prepare_to_throw_exception): Delete.
2959
2960 2016-04-05  Simon Marchi  <simon.marchi@ericsson.com>
2961
2962         * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
2963
2964 2016-04-05  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2965
2966         * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
2967
2968 2016-04-03  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2969
2970         * linux-aarch64-ipa.c: Add <elf.h> include.
2971         * linux-ppc-ipa.c: Add <elf.h> include.
2972         * linux-s390-ipa.c: Add <elf.h> include.
2973
2974 2016-03-31  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2975
2976         * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
2977         (get_raw_reg_ptr): Likewise.
2978         (get_trace_state_variable_value_ptr): Likewise.
2979         (set_trace_state_variable_value_ptr): Likewise.
2980         (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
2981         char *.
2982
2983 2016-03-31  Wei-cheng Wang  <cole945@gmail.com>
2984             Marcin KoÅ›cielnicki  <koriakin@0x04.net>
2985
2986         PR/17221
2987         * linux-ppc-low.c (emit_insns): New function.
2988         (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
2989         (ppc_emit_prologue): New function.
2990         (ppc_emit_epilogue): New function.
2991         (ppc_emit_add): New function.
2992         (ppc_emit_sub): New function.
2993         (ppc_emit_mul): New function.
2994         (ppc_emit_lsh): New function.
2995         (ppc_emit_rsh_signed): New function.
2996         (ppc_emit_rsh_unsigned): New function.
2997         (ppc_emit_ext): New function.
2998         (ppc_emit_zero_ext): New function.
2999         (ppc_emit_log_not): New function.
3000         (ppc_emit_bit_and): New function.
3001         (ppc_emit_bit_or): New function.
3002         (ppc_emit_bit_xor): New function.
3003         (ppc_emit_bit_not): New function.
3004         (ppc_emit_equal): New function.
3005         (ppc_emit_less_signed): New function.
3006         (ppc_emit_less_unsigned): New function.
3007         (ppc_emit_ref): New function.
3008         (ppc_emit_const): New function.
3009         (ppc_emit_reg): New function.
3010         (ppc_emit_pop): New function.
3011         (ppc_emit_stack_flush): New function.
3012         (ppc_emit_swap): New function.
3013         (ppc_emit_stack_adjust): New function.
3014         (ppc_emit_call): New function.
3015         (ppc_emit_int_call_1): New function.
3016         (ppc_emit_void_call_2): New function.
3017         (ppc_emit_if_goto): New function.
3018         (ppc_emit_goto): New function.
3019         (ppc_emit_eq_goto): New function.
3020         (ppc_emit_ne_goto): New function.
3021         (ppc_emit_lt_goto): New function.
3022         (ppc_emit_le_goto): New function.
3023         (ppc_emit_gt_goto): New function.
3024         (ppc_emit_ge_goto): New function.
3025         (ppc_write_goto_address): New function.
3026         (ppc_emit_ops_impl): New static variable.
3027         (ppc64v1_emit_prologue): New function.
3028         (ppc64v2_emit_prologue): New function.
3029         (ppc64_emit_epilogue): New function.
3030         (ppc64_emit_add): New function.
3031         (ppc64_emit_sub): New function.
3032         (ppc64_emit_mul): New function.
3033         (ppc64_emit_lsh): New function.
3034         (ppc64_emit_rsh_signed): New function.
3035         (ppc64_emit_rsh_unsigned): New function.
3036         (ppc64_emit_ext): New function.
3037         (ppc64_emit_zero_ext): New function.
3038         (ppc64_emit_log_not): New function.
3039         (ppc64_emit_bit_and): New function.
3040         (ppc64_emit_bit_or): New function.
3041         (ppc64_emit_bit_xor): New function.
3042         (ppc64_emit_bit_not): New function.
3043         (ppc64_emit_equal): New function.
3044         (ppc64_emit_less_signed): New function.
3045         (ppc64_emit_less_unsigned): New function.
3046         (ppc64_emit_ref): New function.
3047         (ppc64_emit_const): New function.
3048         (ppc64v1_emit_reg): New function.
3049         (ppc64v2_emit_reg): New function.
3050         (ppc64_emit_pop): New function.
3051         (ppc64_emit_stack_flush): New function.
3052         (ppc64_emit_swap): New function.
3053         (ppc64v1_emit_call): New function.
3054         (ppc64v2_emit_call): New function.
3055         (ppc64v1_emit_int_call_1): New function.
3056         (ppc64v2_emit_int_call_1): New function.
3057         (ppc64v1_emit_void_call_2): New function.
3058         (ppc64v2_emit_void_call_2): New function.
3059         (ppc64_emit_if_goto): New function.
3060         (ppc64_emit_eq_goto): New function.
3061         (ppc64_emit_ne_goto): New function.
3062         (ppc64_emit_lt_goto): New function.
3063         (ppc64_emit_le_goto): New function.
3064         (ppc64_emit_gt_goto): New function.
3065         (ppc64_emit_ge_goto): New function.
3066         (ppc64v1_emit_ops_impl): New static variable.
3067         (ppc64v2_emit_ops_impl): New static variable.
3068         (ppc_emit_ops): New function.
3069         (linux_low_target): Wire in ppc_emit_ops.
3070
3071 2016-03-31  Wei-cheng Wang  <cole945@gmail.com>
3072             Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3073
3074         PR/17221
3075         * Makefile.in: Add powerpc-*-ipa.o
3076         * configure.srv: Add ipa_obj for powerpc*-linux.
3077         * linux-ppc-ipa.c: New file.
3078         * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3079         includes.
3080         (PPC_FIELD): New macro.
3081         (PPC_SEXT): New macro.
3082         (PPC_OP6): New macro.
3083         (PPC_BO): New macro.
3084         (PPC_LI): New macro.
3085         (PPC_BD): New macro.
3086         (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3087         (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3088         (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3089         (ppc_get_thread_area): New function.
3090         (is_elfv2_inferior): New function.
3091         (gen_ds_form): New function.
3092         (GEN_STD): New macro.
3093         (GEN_STDU): New macro.
3094         (GEN_LD): New macro.
3095         (GEN_LDU): New macro.
3096         (gen_d_form): New function.
3097         (GEN_ADDI): New macro.
3098         (GEN_ADDIS): New macro.
3099         (GEN_LI): New macro.
3100         (GEN_LIS): New macro.
3101         (GEN_ORI): New macro.
3102         (GEN_ORIS): New macro.
3103         (GEN_LWZ): New macro.
3104         (GEN_STW): New macro.
3105         (GEN_STWU): New macro.
3106         (gen_xfx_form): New function.
3107         (GEN_MFSPR): New macro.
3108         (GEN_MTSPR): New macro.
3109         (GEN_MFCR): New macro.
3110         (GEN_MTCR): New macro.
3111         (GEN_SYNC): New macro.
3112         (GEN_LWSYNC): New macro.
3113         (gen_x_form): New function.
3114         (GEN_OR): New macro.
3115         (GEN_MR): New macro.
3116         (GEN_LWARX): New macro.
3117         (GEN_STWCX): New macro.
3118         (GEN_CMPW): New macro.
3119         (gen_md_form): New function.
3120         (GEN_RLDICL): New macro.
3121         (GEN_RLDICR): New macro.
3122         (gen_i_form): New function.
3123         (GEN_B): New macro.
3124         (GEN_BL): New macro.
3125         (gen_b_form): New function.
3126         (GEN_BNE): New macro.
3127         (GEN_LOAD): New macro.
3128         (GEN_STORE): New macro.
3129         (gen_limm): New function.
3130         (gen_atomic_xchg): New function.
3131         (gen_call): New function.
3132         (ppc_relocate_instruction): New function.
3133         (ppc_install_fast_tracepoint_jump_pad): New function.
3134         (ppc_get_min_fast_tracepoint_insn_len): New function.
3135         (ppc_get_ipa_tdesc_idx): New function.
3136         (the_low_target): Wire in the new functions.
3137         (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3138         tdescs.
3139         * linux-ppc-tdesc.h: New file.
3140
3141 2016-03-31  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3142
3143         * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3144         (alloc_jump_pad_buffer): New function.
3145         * linux-amd64-ipa.c: Add <sys/mman.h> include.
3146         (alloc_jump_pad_buffer): New function.
3147         * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3148         * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3149         (alloc_jump_pad_buffer): New function.
3150         * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3151         (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3152         * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3153         (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3154
3155 2016-03-30  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3156
3157         * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3158         * linux-amd64-ipa.c: Likewise.
3159         * linux-i386-ipa.c: Likewise.
3160         * linux-s390-ipa.c: Likewise.
3161         * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3162         ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3163         set_trace_state_variable_value_ptr.
3164         (struct ipa_sym_addresses): Likewise.
3165         (symbol_list): Likewise.
3166         (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3167         accessing gdb_collect directly.
3168         (gdb_collect_ptr_type): New typedef.
3169         (get_raw_reg_ptr_type): New typedef.
3170         (get_trace_state_variable_value_ptr_type): New typedef.
3171         (set_trace_state_variable_value_ptr_type): New typedef.
3172         (gdb_collect_ptr): New global.
3173         (get_raw_reg_ptr): New global.
3174         (get_trace_state_variable_value_ptr): New global.
3175         (set_trace_state_variable_value_ptr): New global.
3176         (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3177         accessing get_raw_reg directly.
3178         (get_get_tsv_func_addr): Likewise for
3179         get_trace_state_variable_value_ptr.
3180         (get_set_tsv_func_addr): Likewise for
3181         set_trace_state_variable_value_ptr.
3182         * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3183
3184 2016-03-30  Simon Marchi  <simon.marchi@ericsson.com>
3185
3186         * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3187
3188 2016-03-30  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3189
3190         * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3191         packets.
3192         (relocate_instruction): Remove own_buf.
3193         * server.c (own_buf): Make global.
3194         (handle_v_requests): Make global.
3195         * server.h (own_buf): New declaration.
3196         (handle_v_requests): New prototype.
3197
3198 2016-03-29  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3199
3200         PR 18377
3201         * linux-s390-low.c (add_insns): New function.
3202         (s390_emit_prologue): New function.
3203         (s390_emit_epilogue): New function.
3204         (s390_emit_add): New function.
3205         (s390_emit_sub): New function.
3206         (s390_emit_mul): New function.
3207         (s390_emit_lsh): New function.
3208         (s390_emit_rsh_signed): New function.
3209         (s390_emit_rsh_unsigned): New function.
3210         (s390_emit_ext): New function.
3211         (s390_emit_log_not): New function.
3212         (s390_emit_bit_and): New function.
3213         (s390_emit_bit_or): New function.
3214         (s390_emit_bit_xor): New function.
3215         (s390_emit_bit_not): New function.
3216         (s390_emit_equal): New function.
3217         (s390_emit_less_signed): New function.
3218         (s390_emit_less_unsigned): New function.
3219         (s390_emit_ref): New function.
3220         (s390_emit_if_goto): New function.
3221         (s390_emit_goto): New function.
3222         (s390_write_goto_address): New function.
3223         (s390_emit_litpool): New function.
3224         (s390_emit_const): New function.
3225         (s390_emit_call): New function.
3226         (s390_emit_reg): New function.
3227         (s390_emit_pop): New function.
3228         (s390_emit_stack_flush): New function.
3229         (s390_emit_zero_ext): New function.
3230         (s390_emit_swap): New function.
3231         (s390_emit_stack_adjust): New function.
3232         (s390_emit_set_r2): New function.
3233         (s390_emit_int_call_1): New function.
3234         (s390_emit_void_call_2): New function.
3235         (s390_emit_eq_goto): New function.
3236         (s390_emit_ne_goto): New function.
3237         (s390_emit_lt_goto): New function.
3238         (s390_emit_le_goto): New function.
3239         (s390_emit_gt_goto): New function.
3240         (s390_emit_ge_goto): New function.
3241         (s390x_emit_prologue): New function.
3242         (s390x_emit_epilogue): New function.
3243         (s390x_emit_add): New function.
3244         (s390x_emit_sub): New function.
3245         (s390x_emit_mul): New function.
3246         (s390x_emit_lsh): New function.
3247         (s390x_emit_rsh_signed): New function.
3248         (s390x_emit_rsh_unsigned): New function.
3249         (s390x_emit_ext): New function.
3250         (s390x_emit_log_not): New function.
3251         (s390x_emit_bit_and): New function.
3252         (s390x_emit_bit_or): New function.
3253         (s390x_emit_bit_xor): New function.
3254         (s390x_emit_bit_not): New function.
3255         (s390x_emit_equal): New function.
3256         (s390x_emit_less_signed): New function.
3257         (s390x_emit_less_unsigned): New function.
3258         (s390x_emit_ref): New function.
3259         (s390x_emit_if_goto): New function.
3260         (s390x_emit_const): New function.
3261         (s390x_emit_call): New function.
3262         (s390x_emit_reg): New function.
3263         (s390x_emit_pop): New function.
3264         (s390x_emit_stack_flush): New function.
3265         (s390x_emit_zero_ext): New function.
3266         (s390x_emit_swap): New function.
3267         (s390x_emit_stack_adjust): New function.
3268         (s390x_emit_int_call_1): New function.
3269         (s390x_emit_void_call_2): New function.
3270         (s390x_emit_eq_goto): New function.
3271         (s390x_emit_ne_goto): New function.
3272         (s390x_emit_lt_goto): New function.
3273         (s390x_emit_le_goto): New function.
3274         (s390x_emit_gt_goto): New function.
3275         (s390x_emit_ge_goto): New function.
3276         (s390_emit_ops): New function.
3277         (struct linux_target_ops): Fill in emit_ops hook.
3278
3279 2016-03-29  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3280
3281         PR 18377
3282         * Makefile.in: Add s390 IPA files.
3283         * configure.srv: Build IPA for s390.
3284         * linux-s390-ipa.c: New file.
3285         * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3286         (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3287         (tdesc_s390_linux32): Likewise.
3288         (init_registers_s390_linux32v1): Likewise.
3289         (tdesc_s390_linux32v1): Likewise.
3290         (init_registers_s390_linux32v2): Likewise.
3291         (tdesc_s390_linux32v2): Likewise.
3292         (init_registers_s390_linux64): Likewise.
3293         (tdesc_s390_linux64): Likewise.
3294         (init_registers_s390_linux64v1): Likewise.
3295         (tdesc_s390_linux64v1): Likewise.
3296         (init_registers_s390_linux64v2): Likewise.
3297         (tdesc_s390_linux64v2): Likewise.
3298         (init_registers_s390_te_linux64): Likewise.
3299         (tdesc_s390_te_linux64): Likewise.
3300         (init_registers_s390_vx_linux64): Likewise.
3301         (tdesc_s390_vx_linux64): Likewise.
3302         (init_registers_s390_tevx_linux64): Likewise.
3303         (tdesc_s390_tevx_linux64): Likewise.
3304         (init_registers_s390x_linux64): Likewise.
3305         (tdesc_s390x_linux64): Likewise.
3306         (init_registers_s390x_linux64v1): Likewise.
3307         (tdesc_s390x_linux64v1): Likewise.
3308         (init_registers_s390x_linux64v2): Likewise.
3309         (tdesc_s390x_linux64v2): Likewise.
3310         (init_registers_s390x_te_linux64): Likewise.
3311         (tdesc_s390x_te_linux64): Likewise.
3312         (init_registers_s390x_vx_linux64): Likewise.
3313         (tdesc_s390x_vx_linux64): Likewise.
3314         (init_registers_s390x_tevx_linux64): Likewise.
3315         (tdesc_s390x_tevx_linux64): Likewise.
3316         (have_hwcap_s390_vx): New static variable.
3317         (s390_arch_setup): Fill have_hwcap_s390_vx.
3318         (s390_get_thread_area): New function.
3319         (s390_ft_entry_gpr_esa): New const.
3320         (s390_ft_entry_gpr_zarch): New const.
3321         (s390_ft_entry_misc): New const.
3322         (s390_ft_entry_fr): New const.
3323         (s390_ft_entry_vr): New const.
3324         (s390_ft_main_31): New const.
3325         (s390_ft_main_64): New const.
3326         (s390_ft_exit_fr): New const.
3327         (s390_ft_exit_vr): New const.
3328         (s390_ft_exit_misc): New const.
3329         (s390_ft_exit_gpr_esa): New const.
3330         (s390_ft_exit_gpr_zarch): New const.
3331         (append_insns): New function.
3332         (s390_relocate_instruction): New function.
3333         (s390_install_fast_tracepoint_jump_pad): New function.
3334         (s390_get_min_fast_tracepoint_insn_len): New function.
3335         (s390_get_ipa_tdesc_idx): New function.
3336         (struct linux_target_ops): Wire in the above functions.
3337         (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3338         * linux-s390-tdesc.h: New file.
3339
3340 2016-03-29  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3341
3342         * linux-s390-low.c (s390_supports_tracepoints): New function.
3343         (struct linux_target_ops): Fill supports_tracepoints hook.
3344
3345 2016-03-18  Yao Qi  <yao.qi@linaro.org>
3346
3347         * linux-low.c (lwp_signal_can_be_delivered): New function.
3348         (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3349
3350 2016-03-18  Yao Qi  <yao.qi@linaro.org>
3351
3352         * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3353         0 if signal is enqueued.  Remove 'signal' from one debugging
3354         message.  Move one debugging message to some lines below.
3355         Remove code setting 'signal' to 0.
3356
3357 2016-03-18  Yao Qi  <yao.qi@linaro.org>
3358
3359         * linux-low.c (linux_low_filter_event): Remove redundant
3360         WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3361
3362 2016-03-09  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3363
3364         * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3365         (struct linux_target_ops): Wire in the above.
3366
3367 2016-03-03  Yao Qi  <yao.qi@linaro.org>
3368
3369         * linux-low.c: Update comments to start_step_over.
3370
3371 2016-03-03  Yao Qi  <yao.qi@linaro.org>
3372
3373         PR server/19736
3374         * linux-low.c (handle_extended_wait): Set child suspended
3375         if event_lwp->bp_reinsert isn't zero.
3376
3377 2016-03-02  Yao Qi  <yao.qi@linaro.org>
3378
3379         * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3380         enqueue_pending_signal.
3381
3382 2016-03-02  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3383
3384         * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3385         is actually loaded.
3386
3387 2016-02-25  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3388
3389         * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3390         (s390_regmap_3264) [!__s390x__]: New global.
3391         (s390_collect_ptrace_register): Skip map entries containing -1.
3392         (s390_supply_ptrace_register): Ditto.
3393         (s390_fill_gprs_high): New function.
3394         (s390_store_gprs_high): New function.
3395         (s390_regsets): Add NT_S390_HIGH_GPRS.
3396         (s390_get_hwcap): Enable on 31-bit.
3397         (have_hwcap_s390_high_gprs): Enable on 31-bit.
3398         (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3399         Detect NT_S390_HIGH_GPRS.
3400         (s390_usrregs_info_3264): Enable on 31-bit.
3401         (s390_regs_info): Enable regs_info_3264 on 31-bit.
3402         (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3403
3404 2016-02-25  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3405
3406         PR gdb/13808
3407         * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3408         * configure.srv: Ditto.
3409         * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3410         (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3411         * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3412         (init_registers_amd64_linux): Remove prototype.
3413         (tdesc_amd64_linux): Remove declaration.
3414         (get_ipa_tdesc): New function.
3415         (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3416         initialize remaining tdescs.
3417         * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3418         (init_registers_i386_linux): Remove prototype.
3419         (tdesc_i386_linux): Remove declaration.
3420         (get_ipa_tdesc): New function.
3421         (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3422         initialize remaining tdescs.
3423         * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3424         (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3425         * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3426         * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3427         (x86_get_ipa_tdesc_idx): New function.
3428         (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3429         * linux-x86-tdesc.h: New file.
3430         * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3431         (target_get_ipa_tdesc_idx): New macro.
3432         * tracepoint.c (ipa_tdesc_idx): New macro.
3433         (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3434         (symbol_list): Add ipa_tdesc_idx.
3435         (cmd_qtstart): Write ipa_tdesc_idx in the target.
3436         (ipa_tdesc): Remove.
3437         (ipa_tdesc_idx): New variable.
3438         (get_context_regcache): Use get_ipa_tdesc.
3439         (gdb_collect): Ditto.
3440         (gdb_probe): Ditto.
3441         * tracepoint.h (get_ipa_tdesc): New prototype.
3442         (ipa_tdesc): Remove.
3443
3444 2016-02-24  Pedro Alves  <palves@redhat.com>
3445
3446         * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3447         (save_stop_reason): ... this.  Use GDB_ARCH_IS_TRAP_HWBKPT and
3448         handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3449         Factor out common code between the USE_SIGTRAP_SIGINFO and
3450         !USE_SIGTRAP_SIGINFO blocks.
3451         (linux_low_filter_event): Call save_stop_reason instead of
3452         check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3453         Update comments.
3454         (linux_wait_1): Update comments.
3455
3456 2016-02-24  Wei-cheng Wang  <cole945@gmail.com>
3457
3458         * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3459         (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3460         (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3461         ppc_insert_point, ppc_remove_point.
3462
3463 2016-02-17  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3464
3465         * linux-s390-low.c (s390_supports_z_point_type): New function.
3466         (struct linux_target_ops): Wire s390_supports_z_point_type in.
3467
3468 2016-02-16  Yao Qi  <yao.qi@linaro.org>
3469
3470         * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3471         PC.  Get pc from regcache_read_pc.
3472
3473 2016-02-12  Yao Qi  <yao.qi@linaro.org>
3474
3475         * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3476         or linux_get_pc_32bit.
3477         (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3478
3479 2016-02-12  Yao Qi  <yao.qi@linaro.org>
3480
3481         * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3482         arm_linux_get_next_pcs_fixup.
3483
3484 2016-02-12  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3485
3486         * tracepoint.c (x_tracepoint_action_download): Change
3487         write_inferior_data_ptr to write_inferior_data_pointer.
3488         (cmd_qtstart): Likewise.
3489         (write_inferior_data_ptr): Remove.
3490         (download_agent_expr): Change write_inferior_data_ptr to
3491         write_inferior_data_pointer.
3492         (download_tracepoint_1): Likewise.
3493         (download_tracepoint): Likewise.
3494         (download_trace_state_variables): Likewise.
3495
3496 2016-02-11  Wei-cheng Wang  <cole945@gmail.com>
3497             Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3498
3499         * tracepoint.c (struct tracepoint_action_ops): Remove.
3500         (struct tracepoint_action): Remove ops.
3501         (m_tracepoint_action_download, r_tracepoint_action_download)
3502         (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3503         size and offset accordingly.
3504         (m_tracepoint_action_ops, r_tracepoint_action_ops)
3505         (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3506         (tracepoint_action_send, tracepoint_action_download): New functions.
3507         Helpers for trace action handlers.
3508         (add_tracepoint_action): Remove setup actions ops.
3509         (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3510
3511 2016-02-10  Yao Qi  <yao.qi@linaro.org>
3512
3513         * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3514
3515 2016-02-09  Simon Marchi  <simon.marchi@ericsson.com>
3516
3517         * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3518         to AC_OUTPUT.
3519         * configure: Regenerate.
3520
3521 2016-02-09  Simon Marchi  <simon.marchi@ericsson.com>
3522
3523         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3524         void * to gdb_byte *.
3525         * linux-low.c (siginfo_fixup): Likewise.
3526         (linux_xfer_siginfo): Likewise.
3527         * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3528         Likewise.
3529         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3530
3531 2016-02-02  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3532
3533         * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3534         to srv_tgtobj.
3535         (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3536         to srv_tgtobj.
3537         * linux-x86-low.c [__x86_64__]: Include
3538         "nat/amd64-linux-siginfo.h".
3539         (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3540         (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3541         (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3542         (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3543         (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3544         (cpt_si_fd, si_timerid, si_overrun): Move from
3545         nat/amd64-linux-siginfo.c.
3546         * Makefile.in (amd64-linux-siginfo.o:): New rule.
3547
3548 2016-01-28  Simon Marchi  <simon.marchi@ericsson.com>
3549
3550         * server.c (skip_to_semicolon):  Remove.
3551         (process_point_options): Use strchrnul instead of
3552         skip_to_semicolon.
3553
3554 2016-01-26  Yao Qi  <yao.qi@linaro.org>
3555
3556         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3557         * linux-low.c (install_software_single_step_breakpoints): Don't
3558         call regcache_read_pc.
3559         * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3560         argument pc.
3561
3562 2016-01-26  Yao Qi  <yao.qi@linaro.org>
3563
3564         * linux-low.c (install_software_single_step_breakpoints): Call
3565         regcache_read_pc instead of get_pc.
3566
3567 2016-01-26  Yao Qi  <yao.qi@linaro.org>
3568
3569         * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3570         (unblock_async_io): Rename to ...
3571         (block_unblock_async_io): ... it.  New function.
3572         (enable_async_io): Don't install SIGIO handler.  Unblock it
3573         instead.
3574         (disable_async_io): Don't ignore SIGIO.  Block it instead.
3575         (initialize_async_io): Install SIGIO handler.  Don't call
3576         unblock_async_io.
3577
3578 2016-01-26  Yao Qi  <yao.qi@linaro.org>
3579
3580         * remote-utils.c (getpkt): If the buffer isn't empty, and the
3581         first character is '\003', call *the_target->request_interrupt.
3582
3583 2016-01-25  Yao Qi  <yao.qi@linaro.org>
3584
3585         * remote-utils.c (new_thread_notify): Remove.
3586         (dead_thread_notify): Likewise.
3587         * remote-utils.h (new_thread_notify): Remove declaration.
3588         (dead_thread_notify): Likewise.
3589
3590 2016-01-23  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3591
3592         * gdb.trace/pending.exp: Fix expected message on continue.
3593
3594 2016-01-22  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3595
3596         * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3597         it works properly on big-endian machines where sizeof (CORE_ADDR)
3598         != sizeof (void *).
3599
3600 2016-01-21  Pedro Alves  <palves@redhat.com>
3601
3602         * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3603         (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3604         * configure: Regenerate.
3605
3606 2016-01-21  Yao Qi  <yao.qi@linaro.org>
3607
3608         * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3609         is_thumb and set it according to CPSR saved on the stack.
3610         (get_next_pcs_syscall_next_pc): Pass is_thumb to
3611         arm_sigreturn_next_pc.
3612
3613 2016-01-18  Yao Qi  <yao.qi@linaro.org>
3614
3615         * linux-low.c (linux_set_pc_64bit): New function.
3616         (linux_get_pc_64bit): New function.
3617         * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3618         Declare.
3619         * linux-sparc-low.c (debug_threads): Remove declaration.
3620         (sparc_get_pc): Remove.
3621         (the_low_target): Use linux_get_pc_64bit instead of
3622         sparc_get_pc.
3623         * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3624         (the_low_target): Use linux_get_pc_64bit and
3625         linux_set_pc_64bit.
3626
3627 2016-01-18  Yao Qi  <yao.qi@linaro.org>
3628
3629         * linux-arm-low.c (debug_threads): Remove declaration.
3630         (arm_get_pc, arm_set_pc): Remove.
3631         (the_low_target): Use linux_get_pc_32bit and
3632         linux_set_pc_32bit.
3633         * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3634         (the_low_target): Use linux_get_pc_32bit and
3635         linux_set_pc_32bit.
3636         * linux-cris-low.c (debug_threads): Remove declaration.
3637         (cris_get_pc, cris_set_pc,): Remove.
3638         (the_low_target): Use linux_get_pc_32bit and
3639         linux_set_pc_32bit.
3640         * linux-crisv32-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-low.c: Include inttypes.h.
3645         (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3646         * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3647         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3648         (the_low_target): Use linux_get_pc_32bit and
3649         linux_set_pc_32bit.
3650         * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3651         (the_low_target): Use linux_get_pc_32bit and
3652         linux_set_pc_32bit.
3653         * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3654         (the_low_target): Use linux_get_pc_32bit and
3655         linux_set_pc_32bit.
3656         * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3657         (the_low_target): Use linux_get_pc_32bit and
3658         linux_set_pc_32bit.
3659         * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3660         (the_low_target): Use linux_get_pc_32bit and
3661         linux_set_pc_32bit.
3662
3663 2016-01-18  Gary Benson  <gbenson@redhat.com>
3664
3665         * configure.ac (AC_FUNC_FORK): New check.
3666         * config.in: Regenerate.
3667         * configure: Likewise.
3668
3669 2016-01-14  Yao Qi  <yao.qi@linaro.org>
3670
3671         * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3672         * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3673         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3674         arm_get_next_pcs_ctor.
3675
3676 2016-01-12  Josh Stone  <jistone@redhat.com>
3677             Philippe Waroquiers  <philippe.waroquiers@skynet.be>
3678
3679         * inferiors.h: Include "gdb_vecs.h".
3680         (struct process_info): Add syscalls_to_catch.
3681         * inferiors.c (remove_process): Free syscalls_to_catch.
3682         * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3683         syscall_return stops.
3684         * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3685         * server.c (handle_general_set): Handle QCatchSyscalls.
3686         (handle_query): Report support for QCatchSyscalls.
3687         * target.h (struct target_ops): Add supports_catch_syscall.
3688         (target_supports_catch_syscall): New macro.
3689         * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3690         (struct lwp_info): Add syscall_state.
3691         * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3692         Maintain syscall_state and syscalls_to_catch across exec.
3693         (get_syscall_trapinfo): New function, proxy to the_low_target.
3694         (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3695         (linux_low_filter_event): Toggle syscall_state entry/return for
3696         syscall traps, and set it ignored for all others.
3697         (gdb_catching_syscalls_p): New function.
3698         (gdb_catch_this_syscall_p): New function.
3699         (linux_wait_1): Handle SYSCALL_SIGTRAP.
3700         (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3701         (linux_supports_catch_syscall): New function.
3702         (linux_target_ops): Install it.
3703         * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3704         (the_low_target): Install it.
3705
3706 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
3707
3708         * acinclude.m4: Include new ../warning.m4 file.
3709         * configure: Regenerated.
3710         * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3711
3712 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
3713
3714         * ax.c (is_goto_target): Mark static.
3715         * linux-low.c (register_addr): Likewise.
3716         (linux_fetch_registers, linux_store_registers): Likewise.
3717         * mem-break.c (any_persistent_commands): Fix old prototype.
3718         (add_commands_to_breakpoint): Mark static.
3719         * regcache.c (find_register_by_name): Delete unused func.
3720         * remote-utils.c (hex_or_minus_one): Mark static.
3721         * server.c (monitor_show_help): Mark static.
3722         (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3723         handle_v_requests): Likewise.
3724
3725 2016-01-12  Pedro Alves  <palves@redhat.com>
3726
3727         Remove use of the registered trademark symbol throughout.
3728
3729 2016-01-08  Yao Qi  <yao.qi@linaro.org>
3730
3731         * remote-utils.c (getpkt): If c is '\003', call target hook
3732         request_interrupt.
3733
3734 2016-01-06  Yao Qi  <yao.qi@linaro.org>
3735
3736         * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3737         linux-aarch32-low.c.
3738         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3739         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3740         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3741         (thumb2_breakpoint): Declare.
3742         * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3743         linux-aarch32-low.h.
3744         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3745         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3746         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3747
3748 2016-01-01  Joel Brobecker  <brobecker@adacore.com>
3749
3750         * gdbreplay.c (gdbreplay_version): Change copyright year in
3751         version message.
3752         * server.c (gdbserver_version): Likewise.
3753
3754 2015-12-28  Patrick Palka  <patrick@parcs.ath.cx>
3755
3756         * server.c (crc32_table): Delete.
3757         (crc32): Use libiberty's xcrc32 function.
3758
3759 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
3760
3761         * lynx-low.c (lynx_delete_thread_callback): New function.
3762         (lynx_mourn): Properly delete our process and all of its
3763         threads.  Remove call to clear_inferiors.
3764
3765 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
3766
3767         * target.c (thread_search_callback): Add check that
3768         the thread_stopped target callback is not NULL before
3769         calling it.
3770
3771 2015-12-21  Yao Qi  <yao.qi@linaro.org>
3772
3773         * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3774         arm breakpoint.
3775
3776 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3777
3778         * server.c (handle_query): Call target_supports_software_single_step.
3779
3780 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3781
3782         * linux-low.c (single_step): New function.
3783         (linux_resume_one_lwp_throw): Call single_step.
3784         (start_step_over): Likewise.
3785
3786 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3787
3788         * Makefile.in (SFILES): Append arch/arm-linux.c,
3789         arch/arm-get-next-pcs.c.
3790         (arm-linux.o): New rule.
3791         (arm-get-next-pcs.o): New rule.
3792         * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3793         arm-linux.o.
3794         * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro.  Moved
3795         to linux-aarch32-low.c.
3796         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3797         (arm_breakpoint_len, thumb_breakpoint): Likewise.
3798         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3799         (thumb2_breakpoint_len): Likewise.
3800         (arm_is_thumb_mode): Make non-static.
3801         * linux-aarch32-low.h (arm_abi_breakpoint): New macro.  Moved
3802         from linux-aarch32-low.c.
3803         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3804         (arm_breakpoint_len, thumb_breakpoint): Likewise.
3805         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3806         (thumb2_breakpoint_len): Likewise.
3807         (arm_is_thumb_mode): New declaration.
3808         * linux-arm-low.c: Include arch/arm-linux.h
3809         aarch/arm-get-next-pcs.h, sys/syscall.h.
3810         (get_next_pcs_ops): New struct.
3811         (get_next_pcs_addr_bits_remove): New function.
3812         (get_next_pcs_is_thumb): New function.
3813         (get_next_pcs_read_memory_unsigned_integer): Likewise.
3814         (arm_sigreturn_next_pc): Likewise.
3815         (get_next_pcs_syscall_next_pc): Likewise.
3816         (arm_gdbserver_get_next_pcs): Likewise.
3817         (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3818         Initialize.
3819         * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3820         * server.h: Include gdb_vecs.h.
3821
3822 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3823
3824         * Makefile.in (SFILES): Append common/common-regcache.c.
3825         (OBS): Append common-regcache.o.
3826         (common-regcache.o): New rule.
3827         * regcache.c (init_register_cache): Initialize cache to
3828         REG_UNAVAILABLE.
3829         (regcache_raw_read_unsigned): New function.
3830         * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3831         register_status enum.
3832
3833 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3834
3835         * linux-aarch64-low.c (the_low_targets): Rename
3836         breakpoint_reinsert_addr to get_next_pcs.
3837         * linux-arm-low.c (the_low_targets): Likewise.
3838         * linux-bfin-low.c (the_low_targets): Likewise.
3839         * linux-cris-low.c (the_low_targets): Likewise.
3840         * linux-crisv32-low.c (the_low_targets): Likewise.
3841         * linux-low.c (can_software_single_step): Likewise.
3842         (install_software_single_step_breakpoints): New function.
3843         (start_step_over): Use install_software_single_step_breakpoints.
3844         * linux-low.h: New CORE_ADDR vector.
3845         (struct linux_target_ops) Rename breakpoint_reinsert_addr to
3846         get_next_pcs.
3847         * linux-mips-low.c (the_low_targets): Likewise.
3848         * linux-nios2-low.c (the_low_targets): Likewise.
3849         * linux-sparc-low.c (the_low_targets): Likewise.
3850
3851 2015-12-17  Pedro Alves  <palves@redhat.com>
3852
3853         * linux-low.c (linux_kill_one_lwp): Remove references to
3854         LinuxThreads.
3855         (kill_lwp): Remove HAVE_TKILL_SYSCALL check.  No longer fall back
3856         to 'kill'.
3857         (linux_init_signals): Delete.
3858         (initialize_low): Adjust.
3859         * thread-db.c (thread_db_init): Remove LinuxThreads reference.
3860
3861 2015-12-16  Pedro Alves  <palves@redhat.com>
3862
3863         * configure.ac (compiler warning flags): When testing a
3864         -Wno-foo option, check whether -Wfoo works instead.
3865         * configure: Regenerate.
3866
3867 2015-12-11  Don Breazeal  <donb@codesourcery.com>
3868
3869         * server.c (process_serial_event): Don't exit from gdbserver
3870         in remote mode if there are still active inferiors.
3871
3872 2015-12-11  Yao Qi  <yao.qi@linaro.org>
3873
3874         * linux-aarch64-low.c (aarch64_breakpoint_at): Call
3875         arm_breakpoint_at if the process is 32-bit.
3876
3877 2015-12-11  Yao Qi  <yao.qi@linaro.org>
3878
3879         * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
3880         arm breakpoint.
3881
3882 2015-12-07  Yao Qi  <yao.qi@linaro.org>
3883
3884         * configure.srv: Append arm.o to srv_tgtobj for
3885         aarch64*-*-linux* target.
3886         * linux-aarch32-low.c (arm_abi_breakpoint): New macro.  Moved
3887         from linux-arm-low.c.
3888         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3889         (arm_breakpoint_len, thumb_breakpoint): Likewise.
3890         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3891         (thumb2_breakpoint_len): Likewise.
3892         (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
3893         (arm_breakpoint_kinds): Likewise.
3894         (arm_breakpoint_kind_from_pc): Likewise.
3895         (arm_sw_breakpoint_from_kind): Likewise.
3896         (arm_breakpoint_kind_from_current_state): Likewise.
3897         * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
3898         (arm_sw_breakpoint_from_kind): Declare.
3899         (arm_breakpoint_kind_from_current_state): Declare.
3900         (arm_breakpoint_at): Declare.
3901         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
3902         arm_sw_breakpoint_from_kind if process is 32-bit.
3903         (aarch64_breakpoint_kind_from_pc): New function.
3904         (aarch64_breakpoint_kind_from_current_state): New function.
3905         (the_low_target): Initialize fields breakpoint_kind_from_pc
3906         and breakpoint_kind_from_current_state.
3907         * linux-arm-low.c (arm_breakpoint_kinds): Move to
3908         linux-aarch32-low.c.
3909         (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
3910         (arm_breakpoint, arm_breakpoint_len): Likewise.
3911         (thumb_breakpoint, thumb_breakpoint_len): Likewise.
3912         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3913         (arm_is_thumb_mode): Likewise.
3914         (arm_breakpoint_at): Likewise.
3915         (arm_breakpoint_kind_from_pc): Likewise.
3916         (arm_sw_breakpoint_from_kind): Likewise.
3917         (arm_breakpoint_kind_from_current_state): Likewise.
3918
3919         Revert:
3920         2015-08-04  Yao Qi  <yao.qi@linaro.org>
3921
3922         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
3923         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
3924         * server.c (extended_protocol): Remove "static".
3925         * server.h (extended_protocol): Declare it.
3926
3927 2015-12-04  Josh Stone  <jistone@redhat.com>
3928
3929         * target.h (struct target_ops) <arch_setup>: Rename to ...
3930         (struct target_ops) <post_create_inferior>: ... this.
3931         (target_arch_setup): Rename to ...
3932         (target_post_create_inferior): ... this, calling post_create_inferior.
3933         * server.c (start_inferior): Update target_arch_setup calls to
3934         target_post_create_inferior.
3935         * linux-low.c (linux_low_ptrace_options): Forward declare.
3936         (linux_arch_setup): Update its comment for general use.
3937         (linux_post_create_inferior): New, run arch_setup and setup ptrace.
3938         (struct linux_target_ops): Use linux_post_create_inferior.
3939         * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
3940         to post_create_inferior.
3941         * nto-low.c (struct nto_target_ops): Likewise.
3942         * spu-low.c (struct spu_target_ops): Likewise.
3943         * win32-low.c (struct win32_target_ops): Likewise.
3944
3945 2015-12-03  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3946
3947         * linux-arm-low.c: Remove duplicate arch/arm.h include.
3948
3949 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3950
3951         * linux-arm-low.c (arm_reinsert_addr): Remove function.
3952         (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
3953         * linux-cris-low.c (cris_reinsert_addr> Remove function.
3954         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3955         * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
3956         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3957         * linux-mips-low.c (mips_reinsert_addr): Remove function.
3958         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3959         * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
3960         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3961         * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
3962         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
3963
3964 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3965
3966         * linux-low.c (linux_look_up_symbols): Don't call
3967         linux_supports_traceclone.
3968         * linux-low.h (thread_db_init): Remove use_events argument.
3969         * thread-db.c (thread_db_use_event): Remove global variable.
3970         (struct thread_db) <td_thr_event_enable_p>: Remove field.
3971         (struct thread_db) <td_create_bp>: Remove field.
3972         (thread_db_create_event): Remove function.
3973         (thread_db_enable_reporting): Likewise.
3974         (find_one_thread): Don't check for thread_db_use_events.
3975         (attach_thread): Likewise.
3976         (thread_db_load_search): Remove td_thr_event_enable_p initialization.
3977         (try_thread_db_load_1): Don't check for thread_db_use_events.
3978         (thread_db_init): Remove use_events argument and thread events
3979         handling.
3980         (remove_thread_event_breakpoints): Remove function.
3981         (thread_db_detach): Remove call to remove_thred_event_breakpoints.
3982
3983 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3984
3985         * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
3986         New function.
3987         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3988         * linux-arm-low.c (arm_supports_hardware_single_step): New function.
3989         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3990         * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
3991         (struct linux_target_ops) <bfin_supports_hardware_single_step>:
3992         Initialize.
3993         * linux-crisv32-low.c (cris_supports_hardware_single_step):
3994         New function.
3995         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
3996         * linux-low.c (can_hardware_single_step): Use
3997         supports_hardware_single_step.
3998         (can_software_single_step): New function.
3999         (start_step_over): Call can_software_single_step.
4000         (linux_supports_hardware_single_step): New function.
4001         (struct target_ops) <supports_software_single_step>: Initialize.
4002         * linux-low.h (struct linux_target_ops)
4003         <supports_hardware_single_step>: Initialize.
4004         * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4005         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4006         * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4007         (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4008         * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4009         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4010         * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4011         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4012         * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4013         (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4014         Initialize.
4015         * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4016         (struct linux_target_ops) <tile_supports_hardware_single_step>:
4017         Initialize.
4018         * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4019         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4020         * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4021         New function.
4022         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4023         * target.h (struct target_ops): <supports_software_single_step>:
4024         New field.
4025         (target_supports_software_single_step): New macro.
4026
4027 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4028
4029         * linux-low.c (linux_wait_1): Fix pc advance condition.
4030         * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4031         * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4032
4033 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4034
4035         * linux-arm-low.c (arm_is_thumb_mode): New function.
4036         (arm_breakpoint_at): Use arm_is_thumb_mode.
4037         (arm_breakpoint_kind_from_current_state): New function.
4038         (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4039         Initialize.
4040         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4041         (linux_breakpoint_kind_from_current_state): New function.
4042         (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4043         * linux-low.h (struct linux_target_ops)
4044         <breakpoint_kind_from_current_state>: New field.
4045         * target.h (struct target_ops): Likewise.
4046         (target_breakpoint_kind_from_current_state): New macro.
4047
4048 2015-11-30  Pedro Alves  <palves@redhat.com>
4049
4050         * linux-low.c (linux_resume): Wake up the event loop before
4051         returning.
4052
4053 2015-11-30  Pedro Alves  <palves@redhat.com>
4054
4055         * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4056         check.
4057         (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4058         to -1.
4059         * target.c (struct thread_search): New structure.
4060         (thread_search_callback): New function.
4061         (prev_general_thread): New global.
4062         (prepare_to_access_memory, done_accessing_memory): New functions.
4063         * target.h (prepare_to_access_memory, done_accessing_memory):
4064         Replace macros with function declarations.
4065
4066 2015-11-30  Pedro Alves  <palves@redhat.com>
4067
4068         PR 14618
4069         * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4070         report TARGET_WAITKIND_NO_RESUMED.
4071         * remote-utils.c (prepare_resume_reply): Handle
4072         TARGET_WAITKIND_NO_RESUMED.
4073         * server.c (report_no_resumed): New global.
4074         (handle_query) <qSupported>: Handle "no-resumed+".  Report
4075         "no-resumed+" support.
4076         (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4077         return error if the client doesn't support no-resumed events.
4078         (push_stop_notification): New function.
4079         (handle_target_event): Use it.  Report TARGET_WAITKIND_NO_RESUMED
4080         events if the client supports them.
4081
4082 2015-11-30  Pedro Alves  <palves@redhat.com>
4083
4084         * linux-low.c (thread_still_has_status_pending_p): Don't check
4085         vCont;t here.
4086         (lwp_resumed): New function.
4087         (status_pending_p_callback): Return early if the LWP is not
4088         supposed to be resumed.
4089
4090 2015-11-30  Pedro Alves  <palves@redhat.com>
4091
4092         * linux-low.c (handle_extended_wait): Assert that the LWP's
4093         waitstatus is TARGET_WAITKIND_IGNORE.  If GDB wants to hear about
4094         thread create events, leave the new child's status pending.
4095         (linux_low_filter_event): If GDB wants to hear about thread exit
4096         events, leave the LWP marked dead and don't delete it.
4097         (linux_wait_for_event_filtered): Don't check for thread exit.
4098         (filter_exit_event): New function.
4099         (linux_wait_1): Use it, when returning an exit event.
4100         (linux_resume_one_lwp_throw): Assert that the LWP's
4101         waitstatus is TARGET_WAITKIND_IGNORE.
4102         * remote-utils.c (prepare_resume_reply): Handle
4103         TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4104         * server.c (report_thread_events): New global.
4105         (handle_general_set): Handle QThreadEvents.
4106         (handle_query) <qSupported>: Handle and report QThreadEvents+;
4107         (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4108         TARGET_WAITKIND_THREAD_EXITED.
4109         * server.h (report_thread_events): Declare.
4110
4111 2015-11-30  Pedro Alves  <palves@redhat.com>
4112
4113         * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4114         the thread's last_resume_kind was resume_stop.
4115
4116 2015-11-30  Pedro Alves  <palves@redhat.com>
4117
4118         * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4119         before returning.
4120
4121 2015-11-30  Pedro Alves  <palves@redhat.com>
4122
4123         * server.c (handle_v_requests): Handle vCtrlC.
4124
4125 2015-11-30  Pedro Alves  <palves@redhat.com>
4126
4127         * gdbthread.h (find_any_thread_of_pid): Declare.
4128         * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4129         functions.
4130         * server.c (handle_query): If current_thread is NULL, look for
4131         another thread of the selected process.
4132
4133 2015-11-26  Daniel Colascione  <dancol@dancol.org>
4134             Simon Marchi  <simon.marchi@ericsson.com>
4135
4136         * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4137         * server.c (handle_qxfer_threads_worker): Refactor to include thread
4138         name in reply.
4139         * target.h (struct target_ops) <thread_name>: New field.
4140         (target_thread_name): New macro.
4141
4142 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
4143
4144         * regcache.h (regcache_invalidate_pid): Add declaration.
4145         * regcache.c (regcache_invalidate_pid): New function, extracted
4146         from regcache_invalidate.
4147         (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4148         Add trivial documentation comment.
4149         * lynx-low.c: Use regcache_invalidate_pid instead of
4150         regcache_invalidate.
4151
4152 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
4153
4154         * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4155         and Elf64_auxv_t if the target is Android.
4156
4157 2015-11-22  Doug Evans  <xdje42@gmail.com>
4158
4159         * target.h: #include <sys/types.h>.
4160
4161 2015-11-19  Pedro Alves  <palves@redhat.com>
4162
4163         * linux-low.c (linux_process_qsupported): Change prototype.
4164         Adjust.
4165         * linux-low.h (struct linux_target_ops) <process_qsupported>:
4166         Change prototype.
4167         * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4168         and adjust to loop over all features.
4169         * server.c (handle_query) <qSupported>: Adjust to call
4170         target_process_qsupported once, passing it a vector of unprocessed
4171         features.
4172         * target.h (struct target_ops) <process_qsupported>: Change
4173         prototype.
4174         (target_process_qsupported): Adjust.
4175
4176 2015-11-19  Pedro Alves  <palves@redhat.com>
4177
4178         * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4179         mode.
4180         * configure: Regenerate.
4181
4182 2015-11-19  Pedro Alves  <palves@redhat.com>
4183
4184         * configure: Regenerate.
4185
4186 2015-11-19  Yao Qi  <yao.qi@linaro.org>
4187
4188         * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4189         type to uint32_t.
4190
4191 2015-11-19  Yao Qi  <yao.qi@linaro.org>
4192
4193         * linux-aarch64-low.c (enum aarch64_operand_type): New.
4194         (struct aarch64_operand): Move enum out.
4195
4196 2015-11-19  Yao Qi  <yao.qi@linaro.org>
4197
4198         * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4199         struct user_fpsimd_state *.
4200         (aarch64_store_fpregset): Likewise.
4201
4202 2015-11-19  Yao Qi  <yao.qi@linaro.org>
4203
4204         * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4205         struct user_pt_regs *.
4206         (aarch64_store_gregset): Likewise.
4207
4208 2015-11-18  Pedro Alves  <palves@redhat.com>
4209
4210         * Makefile.in (all_object_files): Add $IPA_OBJS.
4211
4212 2015-11-17  Pedro Alves  <palves@redhat.com>
4213
4214         * win32-low.c (win32_resume): Use gdb_signal_from_host,
4215         GDB_SIGNAL_0 and gdb_signal_to_string.
4216
4217 2015-11-17  Pedro Alves  <palves@redhat.com>
4218
4219         * win32-low.c (handle_output_debug_string): Remove parameter.
4220         (win32_kill): Remove our_status local and adjust call to
4221         handle_output_debug_string.
4222         (get_child_debug_event): Adjust call to
4223         handle_output_debug_string.
4224
4225 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
4226
4227         * linux-mips-low.c (mips_fill_gregset): Add cast.
4228         (mips_store_gregset): Likewise.
4229         (mips_fill_fpregset): Likewise.
4230         (mips_store_fpregset): Likewise.
4231
4232 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
4233
4234         * linux-mips-low.c (mips_add_watchpoint): Rename private to
4235         priv.
4236
4237 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
4238
4239         * linux-mips-low.c (mips_linux_new_thread): Change type of
4240         watch_type to enum target_hw_bp_type.
4241
4242 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
4243
4244                 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4245                 Change return type to arm_hwbp_type.
4246
4247 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
4248
4249         * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4250         (arm_store_gregset): Likewise.
4251         * linux-arm-low.c (arm_get_hwcap): Likewise.
4252         (arm_read_description): Likewise.
4253
4254 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
4255
4256         * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4257
4258 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
4259
4260         * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4261         (ppc_fill_vsxregset): Likewise.
4262         (ppc_store_vsxregset): Likewise.
4263         (ppc_fill_vrregset): Likewise.
4264         (ppc_store_vrregset): Likewise.
4265         (ppc_fill_evrregset): Likewise.
4266         (ppc_store_evrregset): Likewise.
4267
4268 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
4269
4270         * linux-ppc-low.c (ppc_usrregs_info): Remove
4271         forward-declaration.
4272         (ppc_arch_setup): Move lower in file.
4273
4274 2015-10-30  Simon Marchi  <simon.marchi@ericsson.com>
4275
4276         * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4277         (ps_pdwrite): Likewise.
4278
4279 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4280
4281         * linux-arm-low.c (arm_new_thread): Move pointer dereference
4282         to after assert checks.
4283
4284 2015-10-29  Simon Marchi  <simon.marchi@ericsson.com>
4285
4286         * proc-service.c (ps_pdread): Add/adjust casts.
4287         (ps_pdwrite): Add/adjust casts.
4288
4289 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
4290
4291         * server.c (handle_search_memory_1): Cast return value of
4292         memmem.
4293
4294 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
4295
4296         * server.c (write_qxfer_response): Change type of data to
4297         gdb_byte *.
4298
4299 2015-10-29  Pedro Alves  <palves@redhat.com>
4300
4301         * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4302
4303 2015-10-29  Pedro Alves  <palves@redhat.com>
4304
4305         * tracepoint.c (clear_installed_tracepoints): Add casts.
4306
4307 2015-10-29  Pedro Alves  <palves@redhat.com>
4308
4309         * server.c (handle_v_cont, process_serial_event): Add enum
4310         gdb_signal casts to signal parsing code.
4311
4312 2015-10-29  Pedro Alves  <palves@redhat.com>
4313
4314         * linux-low.h (NULL_REGSET): Define.
4315         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4316         * linux-arm-low.c (arm_regsets): Likewise.
4317         * linux-crisv32-low.c (cris_regsets): Likewise.
4318         * linux-m68k-low.c (m68k_regsets): Likewise.
4319         * linux-mips-low.c (mips_regsets): Likewise.
4320         * linux-nios2-low.c (nios2_regsets): Likewise.
4321         * linux-ppc-low.c (ppc_regsets): Likewise.
4322         * linux-s390-low.c (s390_regsets): Likewise.
4323         * linux-sh-low.c (sh_regsets): Likewise.
4324         * linux-sparc-low.c (sparc_regsets): Likewise.
4325         * linux-tic6x-low.c (tic6x_regsets): Likewise.
4326         * linux-tile-low.c (tile_regsets): Likewise.
4327         * linux-x86-low.c (x86_regsets): Likewise.
4328         * linux-xtensa-low.c (xtensa_regsets): Likewise.
4329
4330 2015-10-29  Pedro Alves  <palves@redhat.com>
4331
4332         * linux-low.h (NULL_REGSET): Define.
4333         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4334         * linux-arm-low.c (arm_regsets): Likewise.
4335         * linux-crisv32-low.c (cris_regsets): Likewise.
4336         * linux-m68k-low.c (m68k_regsets): Likewise.
4337         * linux-mips-low.c (mips_regsets): Likewise.
4338         * linux-nios2-low.c (nios2_regsets): Likewise.
4339         * linux-ppc-low.c (ppc_regsets): Likewise.
4340         * linux-s390-low.c (s390_regsets): Likewise.
4341         * linux-sh-low.c (sh_regsets): Likewise.
4342         * linux-sparc-low.c (sparc_regsets): Likewise.
4343         * linux-tic6x-low.c (tic6x_regsets): Likewise.
4344         * linux-tile-low.c (tile_regsets): Likewise.
4345         * linux-x86-low.c (x86_regsets): Likewise.
4346         * linux-xtensa-low.c (xtensa_regsets): Likewise.
4347
4348 2015-10-26  Doug Evans  <dje@google.com>
4349
4350         * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4351
4352 2015-10-26  Doug Evans  <dje@google.com>
4353
4354         * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4355
4356 2015-10-26  Doug Evans  <dje@google.com>
4357
4358         * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4359         for debug_printf.
4360         (attach_thread, find_new_threads_callback): Ditto.
4361
4362 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4363
4364         * mem-break.h (set_breakpoint_data): Remove.
4365
4366 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4367
4368         * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4369         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4370         (initialize_low): Remove set_breakpoint_data call.
4371         * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4372         (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4373         (initialize_low): Remove set_breakpoint_data call.
4374         * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4375         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4376         (initialize_low): Remove set_breakpoint_data call.
4377
4378 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4379
4380         * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4381         * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4382         * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4383         * target.h (target_breakpoint_kind_from_pc): New macro.
4384
4385 2015-10-22  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4386
4387         * linux-low.c (default_breakpoint_kind_from_pc): New function.
4388         (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4389         the default breakpoint kind.
4390
4391 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4392
4393         * linux-arm-low.c (arm_supports_z_point_type): Add software
4394         breakpoint support.
4395
4396 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4397
4398         * linux-arm-low.c: Refactor breakpoint definitions.
4399         (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4400         (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4401
4402 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4403
4404         * Makefile.in: Add arm.c/o.
4405         * configure.srv: Likewise.
4406         * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4407         (arm_breakpoint_kind_from_pc): New function.
4408         (arm_sw_breakpoint_from_kind): Return proper kind.
4409         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4410
4411 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4412
4413         * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4414         removal.
4415         * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4416         (struct raw_breakpoint) <size>: Remove.
4417         (struct raw_breakpoint) <kind>: Add.
4418         (bp_size): New function.
4419         (bp_opcode): Likewise.
4420         (find_raw_breakpoint_at): Adjust for kind.
4421         (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4422         (remove_memory_breakpoint): Adjust for kind call bp_size.
4423         (set_raw_breakpoint_at): Adjust for kind.
4424         (set_breakpoint): Likewise.
4425         (set_breakpoint_at): Call breakpoint_kind_from_pc.
4426         (delete_raw_breakpoint): Adjust for kind.
4427         (delete_breakpoint): Likewise.
4428         (find_gdb_breakpoint): Likewise.
4429         (set_gdb_breakpoint_1): Likewise.
4430         (set_gdb_breakpoint): Likewise.
4431         (delete_gdb_breakpoint_1): Likewise.
4432         (delete_gdb_breakpoint): Likewise.
4433         (uninsert_raw_breakpoint): Likewise.
4434         (reinsert_raw_breakpoint): Likewise.
4435         (set_breakpoint_data): Remove.
4436         (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4437         (check_mem_read): Adjust for kind call bp_size.
4438         (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4439         (clone_one_breakpoint): Adjust for kind.
4440         * mem-break.h (set_gdb_breakpoint): Likewise.
4441         (delete_gdb_breakpoint): Likewise.
4442         * server.c (process_serial_event): Likewise.
4443
4444 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4445
4446         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4447         (struct linux_target_ops) <breakpoint>: Remove.
4448         (struct linux_target_ops) <breakpoint_len>: Remove.
4449         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4450         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4451         * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4452         (arm_sw_breakpoint_from_kind): New function.
4453         * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4454         (struct linux_target_ops) <breakpoint>: Remove.
4455         (struct linux_target_ops) <breakpoint_len>: Remove.
4456         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4457         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4458         * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4459         (struct linux_target_ops) <breakpoint>: Remove.
4460         (struct linux_target_ops) <breakpoint_len>: Remove.
4461         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4462         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4463         * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4464         (struct linux_target_ops) <breakpoint>: Remove.
4465         (struct linux_target_ops) <breakpoint_len>: Remove.
4466         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4467         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4468         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4469         and sw_breakpoint_from_kind to increment the pc.
4470         (linux_breakpoint_kind_from_pc): New function.
4471         (linux_sw_breakpoint_from_kind): New function.
4472         (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4473         (initialize_low): Call breakpoint_kind_from_pc and
4474         sw_breakpoint_from_kind to replace breakpoint_data/len.
4475         * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4476         New field.
4477         (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4478         * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4479         (struct linux_target_ops) <breakpoint>: Remove.
4480         (struct linux_target_ops) <breakpoint_len>: Remove.
4481         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4482         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4483         * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4484         (struct linux_target_ops) <breakpoint>: Remove.
4485         (struct linux_target_ops) <breakpoint_len>: Remove.
4486         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4487         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4488         * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4489         (struct linux_target_ops) <breakpoint>: Remove.
4490         (struct linux_target_ops) <breakpoint_len>: Remove.
4491         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4492         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4493         * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4494         (struct linux_target_ops) <breakpoint>: Remove.
4495         (struct linux_target_ops) <breakpoint_len>: Remove.
4496         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4497         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4498         * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4499         (struct linux_target_ops) <breakpoint>: Remove.
4500         (struct linux_target_ops) <breakpoint_len>: Remove.
4501         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4502         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4503         * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4504         (struct linux_target_ops) <breakpoint>: Remove.
4505         (struct linux_target_ops) <breakpoint_len>: Remove.
4506         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4507         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4508         * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4509         (struct linux_target_ops) <breakpoint>: Remove.
4510         (struct linux_target_ops) <breakpoint_len>: Remove.
4511         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4512         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4513         * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4514         (struct linux_target_ops) <breakpoint>: Remove.
4515         (struct linux_target_ops) <breakpoint_len>: Remove.
4516         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4517         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4518         * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4519         (struct linux_target_ops) <breakpoint>: Remove.
4520         (struct linux_target_ops) <breakpoint_len>: Remove.
4521         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4522         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4523         * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4524         * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4525         (struct linux_target_ops) <breakpoint>: Remove.
4526         (struct linux_target_ops) <breakpoint_len>: Remove.
4527         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4528         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4529         * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4530         (struct linux_target_ops) <breakpoint>: Remove.
4531         (struct linux_target_ops) <breakpoint_len>: Remove.
4532         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4533         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4534
4535 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4536
4537         * linux-cris-low.c (cris_get_pc): Remove void arg.
4538
4539 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
4540
4541         * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4542         variable name.
4543
4544 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
4545
4546         * inferiors.c (thread_pid_matches_callback): New function.
4547         (find_thread_process): New function.
4548         (remove_thread): Reset current_thread.
4549         (remove_process): Assert threads have been removed first.
4550
4551 2015-10-15  Yao Qi  <yao.qi@linaro.org>
4552
4553         * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4554         if it is 3.
4555         (aarch64_remove_point): Likewise.
4556         * regcache.c (regcache_register_size): New function.
4557
4558 2015-10-12  Yao Qi  <yao.qi@linaro.org>
4559
4560         * linux-aarch64-low.c: Update all callers as emit_load_store
4561         is renamed to aarch64_emit_load_store.
4562
4563 2015-10-12  Yao Qi  <yao.qi@linaro.org>
4564
4565         * linux-aarch64-low.c: Update all callers of function renaming
4566         from emit_insn to aarch64_emit_insn.
4567
4568 2015-10-12  Yao Qi  <yao.qi@linaro.org>
4569
4570         * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4571         arch/aarch64-insn.h.
4572         (struct aarch64_memory_operand): Likewise.
4573         (ENCODE): Likewise.
4574         (emit_insn): Move to arch/aarch64-insn.c.
4575         (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4576         (emit_load_store): Move to arch/aarch64-insn.c.
4577         (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4578         (can_encode_int32): Remove.
4579
4580 2015-10-12  Yao Qi  <yao.qi@linaro.org>
4581
4582         * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4583         (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4584         (aarch64_relocate_instruction): Likewise.
4585         (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4586         (struct aarch64_insn_visitor): Likewise.
4587
4588 2015-10-12  Yao Qi  <yao.qi@linaro.org>
4589
4590         * linux-aarch64-low.c (struct aarch64_insn_data): New.
4591         (struct aarch64_insn_visitor): New.
4592         (struct aarch64_insn_relocation_data): New.
4593         (aarch64_ftrace_insn_reloc_b): New function.
4594         (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4595         (aarch64_ftrace_insn_reloc_cb): Likewise.
4596         (aarch64_ftrace_insn_reloc_tb): Likewise.
4597         (aarch64_ftrace_insn_reloc_adr): Likewise.
4598         (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4599         (aarch64_ftrace_insn_reloc_others): Likewise.
4600         (visitor): New.
4601         (aarch64_relocate_instruction): Use visitor.
4602
4603 2015-10-12  Yao Qi  <yao.qi@linaro.org>
4604
4605         * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4606         int.  Add argument buf.
4607         (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4608         aarch64_relocate_instruction.
4609
4610 2015-10-12  Yao Qi  <yao.qi@linaro.org>
4611
4612         * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4613         argument insn.  Remove local variable insn.  Don't call
4614         target_read_uint32.
4615         (aarch64_install_fast_tracepoint_jump_pad): Call
4616         target_read_uint32.
4617
4618 2015-09-30  Yao Qi  <yao.qi@linaro.org>
4619
4620         * linux-aarch64-low.c (emit_movk): Shorten a long line.
4621         (emit_load_store_pair): Likewise.
4622
4623 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
4624
4625         * dll.c (match_dll): Add cast(s).
4626         (unloaded_dll): Likewise.
4627         * linux-low.c (second_thread_of_pid_p): Likewise.
4628         (delete_lwp_callback): Likewise.
4629         (count_events_callback): Likewise.
4630         (select_event_lwp_callback): Likewise.
4631         (linux_set_resume_request): Likewise.
4632         * server.c (accumulate_file_name_length): Likewise.
4633         (emit_dll_description): Likewise.
4634         (handle_qxfer_threads_worker): Likewise.
4635         (visit_actioned_threads): Likewise.
4636         * thread-db.c (any_thread_of): Likewise.
4637         * tracepoint.c (same_process_p): Likewise.
4638         (match_blocktype): Likewise.
4639         (build_traceframe_info_xml): Likewise.
4640
4641 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
4642
4643         * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4644         assignment.
4645         (gdb_unparse_agent_expr): Likewise.
4646         * hostio.c (require_data): Likewise.
4647         (handle_pread): Likewise.
4648         * linux-low.c (disable_regset): Likewise.
4649         (fetch_register): Likewise.
4650         (store_register): Likewise.
4651         (get_dynamic): Likewise.
4652         (linux_qxfer_libraries_svr4): Likewise.
4653         * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4654         (set_fast_tracepoint_jump): Likewise.
4655         (uninsert_fast_tracepoint_jumps_at): Likewise.
4656         (reinsert_fast_tracepoint_jumps_at): Likewise.
4657         (validate_inserted_breakpoint): Likewise.
4658         (clone_agent_expr): Likewise.
4659         * regcache.c (init_register_cache): Likewise.
4660         * remote-utils.c (putpkt_binary_1): Likewise.
4661         (decode_M_packet): Likewise.
4662         (decode_X_packet): Likewise.
4663         (look_up_one_symbol): Likewise.
4664         (relocate_instruction): Likewise.
4665         (monitor_output): Likewise.
4666         * server.c (handle_search_memory): Likewise.
4667         (handle_qxfer_exec_file): Likewise.
4668         (handle_qxfer_libraries): Likewise.
4669         (handle_qxfer): Likewise.
4670         (handle_query): Likewise.
4671         (handle_v_cont): Likewise.
4672         (handle_v_run): Likewise.
4673         (captured_main): Likewise.
4674         * target.c (write_inferior_memory): Likewise.
4675         * thread-db.c (try_thread_db_load_from_dir): Likewise.
4676         * tracepoint.c (init_trace_buffer): Likewise.
4677         (add_tracepoint_action): Likewise.
4678         (add_traceframe): Likewise.
4679         (add_traceframe_block): Likewise.
4680         (cmd_qtdpsrc): Likewise.
4681         (cmd_qtdv): Likewise.
4682         (cmd_qtstatus): Likewise.
4683         (response_source): Likewise.
4684         (response_tsv): Likewise.
4685         (cmd_qtnotes): Likewise.
4686         (gdb_collect): Likewise.
4687         (initialize_tracepoint): Likewise.
4688
4689 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
4690
4691         * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4692         (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4693         <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4694         <NOP>: New.
4695         (enum aarch64_condition_codes): New enum.
4696         (w0): New static global.
4697         (fp): Likewise.
4698         (lr): Likewise.
4699         (struct aarch64_memory_operand) <type>: New
4700         MEMORY_OPERAND_POSTINDEX type.
4701         (postindex_memory_operand): New helper function.
4702         (emit_ret): New function.
4703         (emit_load_store_pair): New function, factored out of emit_stp
4704         with support for MEMORY_OPERAND_POSTINDEX.
4705         (emit_stp): Rewrite using emit_load_store_pair.
4706         (emit_ldp): New function.
4707         (emit_load_store): Likewise.
4708         (emit_ldr): Mention post-index instruction in comment.
4709         (emit_ldrh): New function.
4710         (emit_ldrb): New function.
4711         (emit_ldrsw): Mention post-index instruction in comment.
4712         (emit_str): Likewise.
4713         (emit_subs): New function.
4714         (emit_cmp): Likewise.
4715         (emit_and): Likewise.
4716         (emit_orr): Likewise.
4717         (emit_orn): Likewise.
4718         (emit_eor): Likewise.
4719         (emit_mvn): Likewise.
4720         (emit_lslv): Likewise.
4721         (emit_lsrv): Likewise.
4722         (emit_asrv): Likewise.
4723         (emit_mul): Likewise.
4724         (emit_sbfm): Likewise.
4725         (emit_sbfx): Likewise.
4726         (emit_ubfm): Likewise.
4727         (emit_ubfx): Likewise.
4728         (emit_csinc): Likewise.
4729         (emit_cset): Likewise.
4730         (emit_nop): Likewise.
4731         (emit_ops_insns): New helper function.
4732         (emit_pop): Likewise.
4733         (emit_push): Likewise.
4734         (aarch64_emit_prologue): New function.
4735         (aarch64_emit_epilogue): Likewise.
4736         (aarch64_emit_add): Likewise.
4737         (aarch64_emit_sub): Likewise.
4738         (aarch64_emit_mul): Likewise.
4739         (aarch64_emit_lsh): Likewise.
4740         (aarch64_emit_rsh_signed): Likewise.
4741         (aarch64_emit_rsh_unsigned): Likewise.
4742         (aarch64_emit_ext): Likewise.
4743         (aarch64_emit_log_not): Likewise.
4744         (aarch64_emit_bit_and): Likewise.
4745         (aarch64_emit_bit_or): Likewise.
4746         (aarch64_emit_bit_xor): Likewise.
4747         (aarch64_emit_bit_not): Likewise.
4748         (aarch64_emit_equal): Likewise.
4749         (aarch64_emit_less_signed): Likewise.
4750         (aarch64_emit_less_unsigned): Likewise.
4751         (aarch64_emit_ref): Likewise.
4752         (aarch64_emit_if_goto): Likewise.
4753         (aarch64_emit_goto): Likewise.
4754         (aarch64_write_goto_address): Likewise.
4755         (aarch64_emit_const): Likewise.
4756         (aarch64_emit_call): Likewise.
4757         (aarch64_emit_reg): Likewise.
4758         (aarch64_emit_pop): Likewise.
4759         (aarch64_emit_stack_flush): Likewise.
4760         (aarch64_emit_zero_ext): Likewise.
4761         (aarch64_emit_swap): Likewise.
4762         (aarch64_emit_stack_adjust): Likewise.
4763         (aarch64_emit_int_call_1): Likewise.
4764         (aarch64_emit_void_call_2): Likewise.
4765         (aarch64_emit_eq_goto): Likewise.
4766         (aarch64_emit_ne_goto): Likewise.
4767         (aarch64_emit_lt_goto): Likewise.
4768         (aarch64_emit_le_goto): Likewise.
4769         (aarch64_emit_gt_goto): Likewise.
4770         (aarch64_emit_ge_got): Likewise.
4771         (aarch64_emit_ops_impl): New static global variable.
4772         (aarch64_emit_ops): New target function, return
4773         &aarch64_emit_ops_impl.
4774         (struct linux_target_ops): Install it.
4775
4776 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
4777
4778         * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4779         * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4780         aarch64-ipa.o.
4781         * linux-aarch64-ipa.c: New file.
4782         * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4783         and endian.h.
4784         (aarch64_get_thread_area): New target method.
4785         (extract_signed_bitfield): New helper function.
4786         (aarch64_decode_ldr_literal): New function.
4787         (enum aarch64_opcodes): New enum.
4788         (struct aarch64_register): New struct.
4789         (struct aarch64_operand): New struct.
4790         (x0): New static global.
4791         (x1): Likewise.
4792         (x2): Likewise.
4793         (x3): Likewise.
4794         (x4): Likewise.
4795         (w2): Likewise.
4796         (ip0): Likewise.
4797         (sp): Likewise.
4798         (xzr): Likewise.
4799         (aarch64_register): New helper function.
4800         (register_operand): Likewise.
4801         (immediate_operand): Likewise.
4802         (struct aarch64_memory_operand): New struct.
4803         (offset_memory_operand): New helper function.
4804         (preindex_memory_operand): Likewise.
4805         (enum aarch64_system_control_registers): New enum.
4806         (ENCODE): New macro.
4807         (emit_insn): New helper function.
4808         (emit_b): New function.
4809         (emit_bcond): Likewise.
4810         (emit_cb): Likewise.
4811         (emit_tb): Likewise.
4812         (emit_blr): Likewise.
4813         (emit_stp): Likewise.
4814         (emit_ldp_q_offset): Likewise.
4815         (emit_stp_q_offset): Likewise.
4816         (emit_load_store): Likewise.
4817         (emit_ldr): Likewise.
4818         (emit_ldrsw): Likewise.
4819         (emit_str): Likewise.
4820         (emit_ldaxr): Likewise.
4821         (emit_stxr): Likewise.
4822         (emit_stlr): Likewise.
4823         (emit_data_processing_reg): Likewise.
4824         (emit_data_processing): Likewise.
4825         (emit_add): Likewise.
4826         (emit_sub): Likewise.
4827         (emit_mov): Likewise.
4828         (emit_movk): Likewise.
4829         (emit_mov_addr): Likewise.
4830         (emit_mrs): Likewise.
4831         (emit_msr): Likewise.
4832         (emit_sevl): Likewise.
4833         (emit_wfe): Likewise.
4834         (append_insns): Likewise.
4835         (can_encode_int32_in): New helper function.
4836         (aarch64_relocate_instruction): New function.
4837         (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4838         (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
4839         (struct linux_target_ops): Install aarch64_get_thread_area,
4840         aarch64_install_fast_tracepoint_jump_pad and
4841         aarch64_get_min_fast_tracepoint_insn_len.
4842
4843 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
4844
4845         * Makefile.in (aarch64-insn.o): New rule.
4846         * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
4847
4848 2015-09-21  Yao Qi  <yao.qi@linaro.org>
4849
4850         * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
4851
4852 2015-09-21  Yao Qi  <yao.qi@linaro.org>
4853
4854         * tracepoint.c (max_jump_pad_size): Remove.
4855
4856 2015-09-18  Yao Qi  <yao.qi@linaro.org>
4857
4858         * linux-aarch64-low.c: Don't include sys/uio.h.
4859         (ps_get_thread_area): Call aarch64_ps_get_thread_area.
4860
4861 2015-09-16  Wei-cheng Wang  <cole945@gmail.com>
4862
4863         * tracepoint.c (eval_result_type): Change prototype.
4864         (condition_true_at_tracepoint): Fix argument to compiled_cond.
4865
4866 2015-09-15  Pedro Alves  <palves@redhat.com>
4867
4868         * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
4869         Check whether to report exec events instead of checking whether
4870         multiprocess is enabled.
4871
4872 2015-09-15  Pedro Alves  <palves@redhat.com>
4873
4874         PR remote/18965
4875         * remote-utils.c (prepare_resume_reply): Merge
4876         TARGET_WAITKIND_VFORK_DONE switch case with the
4877         TARGET_WAITKIND_FORKED case.
4878
4879 2015-09-15  Yao Qi  <yao.qi@linaro.org>
4880
4881         * server.c (handle_query): Check string comparison using
4882         "else if" instead of "if".
4883
4884 2015-09-15  Yao Qi  <yao.qi@linaro.org>
4885
4886         * server.c (vCont_supported): New global variable.
4887         (handle_query): Set vCont_supported to 1 if "vContSupported+"
4888         matches.  Append ";vContSupported+" to own_buf.
4889         (handle_v_requests): Append ";s;S" to own_buf if target supports
4890         hardware single step or vCont_supported is false.
4891         (capture_main): Set vCont_supported to zero.
4892
4893 2015-09-15  Yao Qi  <yao.qi@linaro.org>
4894
4895         * linux-low.c (linux_supports_conditional_breakpoints): Rename
4896         it to ...
4897         (linux_supports_hardware_single_step): ... New function.
4898         (linux_target_ops): Update.
4899         * lynx-low.c (lynx_target_ops): Set field
4900         supports_hardware_single_step to target_can_do_hardware_single_step.
4901         * nto-low.c (nto_target_ops): Likewise.
4902         * spu-low.c (spu_target_ops): Likewise.
4903         * win32-low.c (win32_target_ops): Likewise.
4904         * target.c (target_can_do_hardware_single_step): New function.
4905         * target.h (struct target_ops) <supports_conditional_breakpoints>:
4906         Remove.  <supports_hardware_single_step>: New field.
4907         (target_supports_conditional_breakpoints): Remove.
4908         (target_supports_hardware_single_step): New macro.
4909         (target_can_do_hardware_single_step): Declare.
4910         * server.c (handle_query): Use target_supports_hardware_single_step
4911         instead of target_supports_conditional_breakpoints.
4912
4913 2015-09-15  Yao Qi  <yao.qi@linaro.org>
4914
4915         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
4916         function.
4917         (struct linux_target_ops the_low_target): Install
4918         aarch64_linux_siginfo_fixup.
4919
4920 2015-09-11  Don Breazeal  <donb@codesourcery.com>
4921             Luis Machado  <lgustavo@codesourcery.com>
4922
4923         * linux-low.c (linux_mourn): Static declaration.
4924         (linux_arch_setup): Move in front of
4925         handle_extended_wait.
4926         (linux_arch_setup_thread): New function.
4927         (handle_extended_wait): Handle exec events.  Call
4928         linux_arch_setup_thread.  Make event_lwp argument a
4929         pointer-to-a-pointer.
4930         (check_zombie_leaders): Do not check stopped threads.
4931         (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
4932         (linux_low_filter_event): Add lwp and thread for exec'ing
4933         non-leader thread if leader thread has been deleted.
4934         Refactor code into linux_arch_setup_thread and call it.
4935         Pass child lwp pointer by reference to handle_extended_wait.
4936         (linux_wait_for_event_filtered): Update comment.
4937         (linux_wait_1): Prevent clobbering exec event status.
4938         (linux_supports_exec_events): New function.
4939         (linux_target_ops) <supports_exec_events>: Initialize new member.
4940         * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
4941         new member.
4942         * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
4943         * server.c (report_exec_events): New global variable.
4944         (handle_query): Handle qSupported query for exec-events feature.
4945         (captured_main): Initialize report_exec_events.
4946         * server.h (report_exec_events): Declare new global variable.
4947         * target.h (struct target_ops) <supports_exec_events>: New
4948         member.
4949         (target_supports_exec_events): New macro.
4950         * win32-low.c (win32_target_ops) <supports_exec_events>:
4951         Initialize new member.
4952
4953 2015-09-09  Markus Metzger  <markus.t.metzger@intel.com>
4954
4955         * linux-low.c (linux_low_enable_btrace): Remove.
4956         (linux_target_ops): Replace linux_low_enable_btrace with
4957         linux_enable_btrace.
4958
4959 2015-09-03  Yao Qi  <yao.qi@linaro.org>
4960
4961         * linux-aarch64-low.c (aarch64_insert_point): Call
4962         aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
4963         returns true.
4964
4965 2015-08-27  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
4966
4967         * linux-low.c (check_stopped_by_breakpoint): Use
4968         GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
4969
4970 2015-08-27  Pedro Alves  <palves@redhat.com>
4971
4972         * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
4973
4974 2015-08-26  Simon Marchi  <simon.marchi@ericsson.com>
4975
4976         * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
4977         the XNEW-family equivalent.
4978         (compile_bytecodes): Likewise.
4979         * dll.c (loaded_dll): Likewise.
4980         * event-loop.c (append_callback_event): Likewise.
4981         (create_file_handler): Likewise.
4982         (create_file_event): Likewise.
4983         * hostio.c (handle_open): Likewise.
4984         * inferiors.c (add_thread): Likewise.
4985         (add_process): Likewise.
4986         * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
4987         * linux-arm-low.c (arm_new_process): Likewise.
4988         (arm_new_thread): Likewise.
4989         * linux-low.c (add_to_pid_list): Likewise.
4990         (linux_add_process): Likewise.
4991         (handle_extended_wait): Likewise.
4992         (add_lwp): Likewise.
4993         (enqueue_one_deferred_signal): Likewise.
4994         (enqueue_pending_signal): Likewise.
4995         (linux_resume_one_lwp_throw): Likewise.
4996         (linux_resume_one_thread): Likewise.
4997         (linux_read_memory): Likewise.
4998         (linux_write_memory): Likewise.
4999         * linux-mips-low.c (mips_linux_new_process): Likewise.
5000         (mips_linux_new_thread): Likewise.
5001         (mips_add_watchpoint): Likewise.
5002         * linux-x86-low.c (initialize_low_arch): Likewise.
5003         * lynx-low.c (lynx_add_process): Likewise.
5004         * mem-break.c (set_raw_breakpoint_at): Likewise.
5005         (set_breakpoint): Likewise.
5006         (add_condition_to_breakpoint): Likewise.
5007         (add_commands_to_breakpoint): Likewise.
5008         (clone_agent_expr): Likewise.
5009         (clone_one_breakpoint): Likewise.
5010         * regcache.c (new_register_cache): Likewise.
5011         * remote-utils.c (look_up_one_symbol): Likewise.
5012         * server.c (queue_stop_reply): Likewise.
5013         (start_inferior): Likewise.
5014         (queue_stop_reply_callback): Likewise.
5015         (handle_target_event): Likewise.
5016         * spu-low.c (fetch_ppc_memory): Likewise.
5017         (store_ppc_memory): Likewise.
5018         * target.c (set_target_ops): Likewise.
5019         * thread-db.c (thread_db_load_search): Likewise.
5020         (try_thread_db_load_1): Likewise.
5021         * tracepoint.c (add_tracepoint): Likewise.
5022         (add_tracepoint_action): Likewise.
5023         (create_trace_state_variable): Likewise.
5024         (cmd_qtdpsrc): Likewise.
5025         (cmd_qtro): Likewise.
5026         (add_while_stepping_state): Likewise.
5027         * win32-low.c (child_add_thread): Likewise.
5028         (get_image_name): Likewise.
5029
5030 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5031
5032         * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5033
5034 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5035
5036         * Makefile.in (aarch64-linux.o): New rule.
5037         * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5038         srv_tgtobj.
5039         * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5040         (aarch64_init_debug_reg_state): Make it extern.
5041         (aarch64_linux_prepare_to_resume): Remove.
5042
5043 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5044
5045         * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5046         lwp_arch_private_info and ptid_of_lwp.
5047
5048 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5049
5050         * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5051         Find proc_info by find_process_pid.  All callers updated.
5052
5053 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5054
5055         * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5056         Remove.
5057         (debug_reg_change_callback): Remove.
5058         (aarch64_notify_debug_reg_change): Remove.
5059
5060 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5061
5062         * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5063         Call current_lwp_ptid.
5064
5065 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5066
5067         * linux-aarch64-low.c (debug_reg_change_callback): Use
5068         debug_printf.
5069
5070 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5071
5072         * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5073
5074 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5075
5076         * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5077
5078 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5079
5080         * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5081         the code.
5082
5083 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5084
5085         * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5086         Remove.
5087         (debug_reg_change_callback): Remove argument entry and add argument
5088         lwp.  Remove local variable thread.  Don't print thread id in the
5089         debugging output.  Don't check whether pid of thread equals to pid.
5090         (aarch64_notify_debug_reg_change): Don't set param.pid.  Call
5091         iterate_over_lwps instead find_inferior.
5092
5093 2015-08-24  Pedro Alves  <palves@redhat.com>
5094
5095         * inferiors.c (get_first_process): New function.
5096         * inferiors.h (get_first_process): New declaration.
5097         * remote-utils.c (read_ptid): Default to the first process in the
5098         list, instead of to the current thread's process.
5099
5100 2015-08-24  Pedro Alves  <palves@redhat.com>
5101
5102         * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5103         * event-loop.c: Likewise.
5104         * remote-utils.c: Likewise.
5105         * tracepoint.c: Likewise.
5106
5107 2015-08-24  Pedro Alves  <palves@redhat.com>
5108
5109         * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5110         ptid_get_lwp.
5111
5112 2015-08-21  Pedro Alves  <palves@redhat.com>
5113
5114         * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5115         instead of literal 1.
5116
5117 2015-08-21  Pedro Alves  <palves@redhat.com>
5118
5119         * tdesc.c (default_description): Explicitly zero-initialize.
5120
5121 2015-08-21  Pedro Alves  <palves@redhat.com>
5122
5123         PR gdb/18749
5124         * inferiors.c (remove_thread): Discard any pending stop reply for
5125         this thread.
5126         * server.c (remove_all_on_match_pid): Rename to ...
5127         (remove_all_on_match_ptid): ... this.  Work with a filter ptid
5128         instead of a pid.
5129         (discard_queued_stop_replies): Change parameter to a ptid.  Now
5130         extern.
5131         (handle_v_kill, kill_inferior_callback, captured_main)
5132         (process_serial_event): Adjust.
5133         * server.h (discard_queued_stop_replies): Declare.
5134
5135 2015-08-21  Pedro Alves  <palves@redhat.com>
5136
5137         * linux-low.c (wait_for_sigstop): Always switch to no thread
5138         selected if the previously current thread dies.
5139         * lynx-low.c (lynx_request_interrupt): Use the first thread's
5140         process instead of the current thread's.
5141         * remote-utils.c (input_interrupt): Don't check if there's no
5142         current thread.
5143         * server.c (gdb_read_memory, gdb_write_memory): If setting the
5144         current thread to the general thread fails, error out.
5145         (handle_qxfer_auxv, handle_qxfer_libraries)
5146         (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5147         (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5148         (handle_query): Check if there's a thread selected instead of
5149         checking whether there's any thread in the thread list.
5150         (handle_qxfer_threads, handle_qxfer_btrace)
5151         (handle_qxfer_btrace_conf): Don't error out early if there's no
5152         thread in the thread list.
5153         (handle_v_cont, myresume): Don't set the current thread to the
5154         continue thread.
5155         (process_serial_event) <Hg handling>: Also set thread_id if the
5156         previous general thread is still alive.
5157         (process_serial_event) <g/G handling>: If setting the current
5158         thread to the general thread fails, error out.
5159         * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5160         thread's lwp instead of the current thread's.
5161         * target.c (set_desired_thread): If the desired thread was not
5162         found, leave the current thread pointing to NULL.  Return an int
5163         (boolean) indicating success.
5164         * target.h (set_desired_thread): Change return type to int.
5165
5166 2015-08-20  Max Filippov  <jcmvbkbc@gmail.com>
5167
5168         * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5169         * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5170         #includes.
5171         (ps_get_thread_area): New function.
5172
5173 2015-08-19  Gary Benson  <gbenson@redhat.com>
5174
5175         * hostio.c (handle_pread): Do not attempt to read more data
5176         than hostio_reply_with_data can fit in a packet.
5177
5178 2015-08-18  Joel Brobecker  <brobecker@adacore.com>
5179
5180         * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5181
5182 2015-08-14  Matthew Fortune  <matthew.fortune@imgtec.com>
5183
5184         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5185
5186 2015-08-06  Pedro Alves  <palves@redhat.com>
5187
5188         * tracepoint.c (expr_eval_result): Now an int.
5189
5190 2015-08-06  Pedro Alves  <palves@redhat.com>
5191
5192         * gdbthread.h (struct regcache): Forward declare.
5193         (struct thread_info) <regcache_data>: Now a struct regcache
5194         pointer.
5195         * inferiors.c (inferior_regcache_data)
5196         (set_inferior_regcache_data): Now work with struct regcache
5197         pointers.
5198         * inferiors.h (struct regcache): Forward declare.
5199         (inferior_regcache_data, set_inferior_regcache_data): Now work
5200         with struct regcache pointers.
5201         * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5202         (free_register_cache_thread): Remove struct regcache pointer
5203         casts.
5204
5205 2015-08-06  Pedro Alves  <palves@redhat.com>
5206
5207         * server.c (captured_main): On error, print the exception message
5208         to stderr, and if run_once is set, throw a quit.
5209
5210 2015-08-06  Pedro Alves  <palves@redhat.com>
5211
5212         * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5213         the current thread.
5214
5215 2015-08-06  Pedro Alves  <palves@redhat.com>
5216
5217         * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5218         reading beyond the passed in buffer length.
5219
5220 2015-08-06  Pierre Langlois  <pierre.langlois@arm.com>
5221
5222         * tracepoint.c (symbol_list) <required>: Remove.
5223
5224 2015-08-06  Pedro Alves  <palves@redhat.com>
5225
5226         * linux-low.c (handle_extended_wait): Set the fork child's suspend
5227         count if stopping and suspending threads.
5228         (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5229         stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5230         (linux_detach): Complete an ongoing step-over.
5231         (lwp_suspended_inc, lwp_suspended_decr): New functions.  Use
5232         throughout.
5233         (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5234         (linux_wait_1): If passing a signal to the inferior after
5235         finishing a step-over, unsuspend and re-resume all lwps.  If we
5236         see a single-step event but the thread should be continuing, don't
5237         pass the trap to gdb.
5238         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5239         internal_error instead of gdb_assert.
5240         (enqueue_pending_signal): New function.
5241         (check_ptrace_stopped_lwp_gone): Add debug output.
5242         (start_step_over): Use internal_error instead of gdb_assert.
5243         (complete_ongoing_step_over): New function.
5244         (linux_resume_one_thread): Don't resume a suspended thread.
5245         (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5246         it stepping.
5247
5248 2015-08-06  Pedro Alves  <palves@redhat.com>
5249
5250         * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5251         (linux_thread_alive): Use lwp_is_marked_dead.
5252         (extended_event_reported): Delete.
5253         (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5254         instead of extended_event_reported.
5255         (mark_lwp_dead): Don't set the 'dead' flag.  Store the waitstatus
5256         as well.
5257         (lwp_is_marked_dead): New function.
5258         (lwp_running): Use lwp_is_marked_dead.
5259         * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5260         comment.
5261
5262 2015-08-06  Pedro Alves  <palves@redhat.com>
5263
5264         * linux-low.c (linux_wait_1): Move fork event output out of the
5265         !report_to_gdb check.  Pass event_child->waitstatus to
5266         target_waitstatus_to_string instead of ourstatus.
5267
5268 2015-08-04  Yao Qi  <yao.qi@linaro.org>
5269
5270         * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5271         if current_thread is 32 bit.
5272
5273 2015-08-04  Yao Qi  <yao.qi@linaro.org>
5274
5275         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5276         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5277         * server.c (extended_protocol): Remove "static".
5278         * server.h (extended_protocol): Declare it.
5279
5280 2015-08-04  Yao Qi  <yao.qi@linaro.org>
5281
5282         * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5283         both aarch64 and aarch32.
5284         (aarch64_set_pc): Likewise.
5285
5286 2015-08-04  Yao Qi  <yao.qi@linaro.org>
5287
5288         * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5289         to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5290         arm-with-neon.xml to srv_xmlfiles.
5291         * linux-aarch64-low.c: Include linux-aarch32-low.h.
5292         (is_64bit_tdesc): New function.
5293         (aarch64_linux_read_description): New function.
5294         (aarch64_arch_setup): Call aarch64_linux_read_description.
5295         (regs_info): Rename to regs_info_aarch64.
5296         (aarch64_regs_info): Return right regs_info.
5297         (initialize_low_arch): Call initialize_low_arch_aarch32.
5298
5299 2015-08-04  Yao Qi  <yao.qi@linaro.org>
5300
5301         * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5302         * linux-aarch32-low.c: New file.
5303         * linux-aarch32-low.h: New file.
5304         * linux-arm-low.c (arm_fill_gregset): Move it to
5305         linux-aarch32-low.c.
5306         (arm_store_gregset): Likewise.
5307         (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5308         (arm_store_vfpregset): Call arm_store_vfpregset_num.
5309         (arm_arch_setup): Check if PTRACE_GETREGSET works.
5310         (regs_info): Rename to regs_info_arm.
5311         (arm_regs_info): Return regs_info_aarch32 if
5312         have_ptrace_getregset is 1 and target description is
5313         arm_with_neon or arm_with_vfpv3.
5314         (initialize_low_arch): Don't call init_registers_arm_with_neon.
5315         Call initialize_low_arch_aarch32 instead.
5316
5317 2015-08-04  Yao Qi  <yao.qi@linaro.org>
5318
5319         * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5320         * linux-low.c: ... here.
5321         * linux-low.h (have_ptrace_getregset): Declare it.
5322
5323 2015-08-04  Pedro Alves  <palves@redhat.com>
5324
5325         * thread-db.c (struct thread_db): Use new typedefs.
5326         (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5327         CHK calls.
5328         (disable_thread_event_reporting): Cast result of dlsym to
5329         destination function pointer type.
5330         (thread_db_mourn): Use td_ta_delete_ftype.
5331
5332 2015-08-03  Sandra Loosemore  <sandra@codesourcery.com>
5333
5334         * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5335         arch variant.
5336         (CDX_BREAKPOINT): Define for R2.
5337         (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5338         (the_low_target): Add comments.
5339
5340 2015-07-30  Yao Qi  <yao.qi@linaro.org>
5341
5342         * linux-arm-low.c (arm_hwcap): Remove it.
5343         (arm_read_description): New local variable arm_hwcap.  Don't
5344         set arm_hwcap to zero.
5345
5346 2015-07-30  Yao Qi  <yao.qi@linaro.org>
5347
5348         * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5349         Use regcache->tdesc instead.
5350         (arm_store_wmmxregset): Likewise.
5351         (arm_fill_vfpregset): Likewise.
5352         (arm_store_vfpregset): Likewise.
5353
5354 2015-07-30  Yao Qi  <yao.qi@linaro.org>
5355
5356         * linux-arm-low.c: Include arch/arm.h.
5357         (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5358         (arm_store_gregset): Likewise.
5359
5360 2015-07-29  Simon Marchi  <simon.marchi@ericsson.com>
5361
5362         * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5363         ptrace's 4th parameter.
5364
5365 2015-07-27  Yao Qi  <yao.qi@linaro.org>
5366
5367         * configure.srv (case aarch64*-*-linux*): Don't set
5368         srv_linux_usrregs.
5369
5370 2015-07-24  Pedro Alves  <palves@redhat.c: Likewise.om>
5371
5372         * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5373         sys/ptrace.h.
5374         * linux-arm-low.c: Likewise.
5375         * linux-cris-low.c: Likewise.
5376         * linux-crisv32-low.c: Likewise.
5377         * linux-low.c: Likewise.
5378         * linux-m68k-low.c: Likewise.
5379         * linux-mips-low.c: Likewise.
5380         * linux-nios2-low.c: Likewise.
5381         * linux-s390-low.c: Likewise.
5382         * linux-sparc-low.c: Likewise.
5383         * linux-tic6x-low.c: Likewise.
5384         * linux-tile-low.c: Likewise.
5385         * linux-x86-low.c: Likewise.
5386
5387 2015-07-24  Pedro Alves  <palves@redhat.com>
5388
5389         * config.in: Regenerate.
5390         * configure: Regenerate.
5391
5392 2015-07-24  Pedro Alves  <palves@redhat.com>
5393
5394         * acinclude.m4: Include ../ptrace.m4.
5395         * configure.ac: Call GDB_AC_PTRACE.
5396         * config.in, configure: Regenerate.
5397
5398 2015-07-24  Yao Qi  <yao.qi@linaro.org>
5399
5400         * linux-low.c (linux_create_inferior): Remove setting to
5401         proc->priv->new_inferior.
5402         (linux_attach): Likewise.
5403         (linux_low_filter_event): Likewise.
5404         * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5405
5406 2015-07-24  Yao Qi  <yao.qi@linaro.org>
5407
5408         * linux-low.c (linux_arch_setup): New function.
5409         (linux_low_filter_event): If proc->tdesc is NULL and
5410         proc->attached is true, call the_low_target.arch_setup.
5411         Otherwise, keep status pending, and return.
5412         (linux_resume_one_lwp_throw): Don't call get_pc if
5413         thread->while_stepping isn't NULL.  Don't call
5414         get_thread_regcache if proc->tdesc is NULL.
5415         (need_step_over_p): Return 0 if proc->tdesc is NULL.
5416         (linux_target_ops): Install arch_setup.
5417         * server.c (start_inferior): Call the_target->arch_setup.
5418         * target.h (struct target_ops) <arch_setup>: New field.
5419         (target_arch_setup): New marco.
5420         * lynx-low.c (lynx_target_ops): Update.
5421         * nto-low.c (nto_target_ops): Update.
5422         * spu-low.c (spu_target_ops): Update.
5423         * win32-low.c (win32_target_ops): Update.
5424
5425 2015-07-24  Yao Qi  <yao.qi@linaro.org>
5426
5427         * linux-low.c (linux_add_process): Don't set
5428         proc->priv->new_inferior.
5429         (linux_create_inferior): Set proc->priv->new_inferior to 1.
5430         (linux_attach): Likewise.
5431
5432 2015-07-24  Yao Qi  <yao.qi@linaro.org>
5433
5434         * server.c (start_inferior): Code refactor.
5435
5436 2015-07-24  Yao Qi  <yao.qi@linaro.org>
5437
5438         * server.c (process_serial_event): Set general_thread.
5439
5440 2015-07-21  Yao Qi  <yao.qi@linaro.org>
5441
5442         * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5443         aarch64_linux_get_debug_reg_capacity.
5444
5445 2015-07-17  Yao Qi  <yao.qi@linaro.org>
5446
5447         * Makefile.in (aarch64-linux-hw-point.o): New rule.
5448         * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5449         * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5450         (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5451         (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5452         (AARCH64_HWP_ALIGNMENT): Likewise.
5453         (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5454         (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5455         (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5456         (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5457         (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5458         (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5459         (struct aarch64_debug_reg_state): Likewise.
5460         (struct arch_lwp_info): Likewise.
5461         (aarch64_align_watchpoint): Likewise.
5462         (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5463         (aarch64_watchpoint_length): Likewise.
5464         (aarch64_point_encode_ctrl_reg): Likewise
5465         (aarch64_point_is_aligned): Likewise.
5466         (aarch64_align_watchpoint): Likewise.
5467         (aarch64_linux_set_debug_regs):
5468         (aarch64_dr_state_insert_one_point): Likewise.
5469         (aarch64_dr_state_remove_one_point): Likewise.
5470         (aarch64_handle_breakpoint): Likewise.
5471         (aarch64_handle_aligned_watchpoint): Likewise.
5472         (aarch64_handle_unaligned_watchpoint): Likewise.
5473         (aarch64_handle_watchpoint): Likewise.
5474
5475 2015-07-17  Yao Qi  <yao.qi@linaro.org>
5476
5477         * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5478         and don't aarch64_get_debug_reg_state.  All callers update.
5479         (aarch64_handle_aligned_watchpoint): Likewise.
5480         (aarch64_handle_unaligned_watchpoint): Likewise.
5481         (aarch64_handle_watchpoint): Likewise.
5482         (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5483         (aarch64_remove_point): Likewise.
5484
5485 2015-07-17  Yao Qi  <yao.qi@linaro.org>
5486
5487         * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5488         debug_printf.
5489         (aarch64_handle_unaligned_watchpoint): Likewise.
5490
5491 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
5492
5493         Revert the previous 3 commits:
5494         Move gdb_regex* to common/
5495         Move linux_find_memory_regions_full & co.
5496         gdbserver build-id attribute generator
5497
5498 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
5499             Jan Kratochvil  <jan.kratochvil@redhat.com>
5500
5501         gdbserver build-id attribute generator.
5502         * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5503         (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5504         (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5505         (find_phdr): New.
5506         (get_dynamic): Use find_pdhr to traverse program headers.
5507         (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5508         (compare_mapping_entry_range, struct find_memory_region_callback_data)
5509         (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5510         (get_hex_build_id): New.
5511         (linux_qxfer_libraries_svr4): Add optional build-id attribute
5512         to reply XML document.
5513
5514 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
5515             Jan Kratochvil  <jan.kratochvil@redhat.com>
5516
5517         * target.c: Include target/target-utils.h and fcntl.h.
5518         (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5519         (target_fileio_read_stralloc): New functions.
5520
5521 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
5522
5523         * Makefile.in (OBS): Add gdb_regex.o.
5524         (gdb_regex.o): New.
5525         * config.in: Rebuilt.
5526         * configure: Rebuilt.
5527
5528 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
5529             Jan Kratochvil  <jan.kratochvil@redhat.com>
5530
5531         Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5532         * Makefile.in (OBS): Add target-utils.o.
5533         (linux-maps.o, target-utils.o): New.
5534         * configure.srv (srv_linux_obj): Add linux-maps.o.
5535
5536 2015-07-15  Pierre Langlois  <pierre.langlois@arm.com>
5537
5538         * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5539         function, return 1.
5540         (the_low_target): Install it.
5541
5542 2015-07-14  Pedro Alves  <palves@redhat.com>
5543
5544         * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5545         Instead, ignore ECHILD, and throw an error for other errnos.
5546
5547 2015-07-10  Pedro Alves  <palves@redhat.com>
5548
5549         * event-loop.c (struct callback_event) <data>: Change type to
5550         gdb_client_data instance instead of gdb_client_data pointer.
5551         (append_callback_event): Adjust.
5552
5553 2015-07-10  Pierre Langlois  <pierre.langlois@arm.com>
5554
5555         * linux-aarch64-low.c: Add comments for each linux_target_ops
5556         method.  Remove comments already covered in target_ops and
5557         linux_target_ops definitions.
5558         (the_low_target): Add comments for each unimplemented method.
5559
5560 2015-07-09  Yao Qi  <yao.qi@linaro.org>
5561
5562         * linux-aarch64-low.c (aarch64_regmap): Remove.
5563         (aarch64_usrregs_info): Remove.
5564         (regs_info): Set field usrregs to NULL.
5565
5566 2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
5567
5568         * linux-low.c: Include "rsp-low.h"
5569         (linux_low_encode_pt_config, linux_low_encode_raw): New.
5570         (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5571         (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5572         (handle_btrace_enable_pt): New.
5573         (handle_btrace_general_set): Support "pt".
5574         (handle_btrace_conf_general_set): Support "pt:size".
5575
5576 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
5577
5578         * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5579         Z_PACKET_SW_BP.
5580
5581 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
5582
5583         * linux-aarch64-low.c: Remove comment about endianness.
5584         (aarch64_breakpoint): Change type to gdb_byte[].  Set to "brk #0".
5585         (aarch64_breakpoint_at): Change type of insn to gdb_byte[].  Use
5586         memcmp.
5587
5588 2015-06-24  Gary Benson  <gbenson@redhat.com>
5589
5590         * linux-i386-ipa.c (stdint.h): Do not include.
5591         * lynx-i386-low.c (stdint.h): Likewise.
5592         * lynx-ppc-low.c (stdint.h): Likewise.
5593         * mem-break.c (stdint.h): Likewise.
5594         * thread-db.c (stdint.h): Likewise.
5595         * tracepoint.c (stdint.h): Likewise.
5596         * win32-low.c (stdint.h): Likewise.
5597
5598 2015-06-18  Simon Marchi  <simon.marchi@ericsson.com>
5599
5600         * server.c (write_qxfer_response): Update call to
5601         remote_escape_output.
5602
5603 2015-06-15  Aleksandar Ristovski  <aristovski@qnx.com
5604             Jan Kratochvil  <jan.kratochvil@redhat.com>
5605
5606         Merge multiple hex conversions.
5607         * gdbreplay.c (tohex): Rename to 'fromhex'.
5608         (logchar): Use fromhex.
5609
5610 2015-06-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
5611
5612         * server.c (handle_qxfer_libraries): Set `version' attribute for
5613         <library-list>.
5614
5615 2015-06-10  Gary Benson  <gbenson@redhat.com>
5616
5617         * target.h (struct target_ops) <multifs_open>: New field.
5618         <multifs_unlink>: Likewise.
5619         <multifs_readlink>: Likewise.
5620         * linux-low.c (nat/linux-namespaces.h): New include.
5621         (linux_target_ops): Initialize the_target->multifs_open,
5622         the_target->multifs_unlink and the_target->multifs_readlink.
5623         * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5624         * hostio.c (hostio_fs_pid): New static variable.
5625         (hostio_handle_new_gdb_connection): New function.
5626         (handle_setfs): Likewise.
5627         (handle_open): Use the_target->multifs_open as appropriate.
5628         (handle_unlink): Use the_target->multifs_unlink as appropriate.
5629         (handle_readlink): Use the_target->multifs_readlink as
5630         appropriate.
5631         (handle_vFile): Handle vFile:setfs packets.
5632         * server.c (handle_query): Call hostio_handle_new_gdb_connection
5633         after target_handle_new_gdb_connection.
5634
5635 2015-06-10  Gary Benson  <gbenson@redhat.com>
5636
5637         * configure.ac (AC_CHECK_FUNCS): Add setns.
5638         * config.in: Regenerate.
5639         * configure: Likewise.
5640         * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5641         (linux-namespaces.o): New rule.
5642         * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5643
5644 2015-06-09  Gary Benson <gbenson@redhat.com>
5645
5646         * hostio.c (handle_open): Process mode argument with
5647         fileio_to_host_mode.
5648
5649 2015-06-01  Yao Qi  <yao.qi@linaro.org>
5650
5651         * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5652         * linux-x86-low.c: Likewise.
5653
5654 2015-05-28  Don Breazeal  <donb@codesourcery.com>
5655
5656         * linux-low.c (handle_extended_wait): Initialize
5657         thread_info.last_resume_kind for new fork children.
5658
5659 2015-05-15  Pedro Alves  <palves@redhat.com>
5660
5661         * target.h (target_handle_new_gdb_connection): Rewrite using if
5662         wrapped in do/while.
5663
5664 2015-05-14  Joel Brobecker  <brobecker@adacore.com>
5665
5666         * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5667         * configure, config.in: Regenerate.
5668         * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5669         Declare typedef.
5670
5671 2015-05-12  Don Breazeal  <donb@codesourcery.com>
5672
5673         * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5674         PTRACE_EVENT_VFORK_DONE.
5675         (linux_low_ptrace_options, extended_event_reported): Add vfork
5676         events.
5677         * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5678         and "vforkdone" for RSP 'T' Stop Reply Packet.
5679         * server.h (report_vfork_events): Declare
5680         global variable.
5681
5682 2015-05-12  Don Breazeal  <donb@codesourcery.com>
5683
5684         * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5685         (the_low_target) <new_fork>: Initialize new member.
5686         * linux-arm-low.c (arm_new_fork): New function.
5687         (the_low_target) <new_fork>: Initialize new member.
5688         * linux-low.c (handle_extended_wait): Call new target function
5689         new_fork.
5690         * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5691         * linux-mips-low.c (mips_add_watchpoint): New function
5692         extracted from mips_insert_point.
5693         (the_low_target) <new_fork>: Initialize new member.
5694         (mips_linux_new_fork): New function.
5695         (mips_insert_point): Call mips_add_watchpoint.
5696         * linux-x86-low.c (x86_linux_new_fork): New function.
5697         (the_low_target) <new_fork>: Initialize new member.
5698
5699 2015-05-12  Don Breazeal  <donb@codesourcery.com>
5700
5701         * linux-low.c (handle_extended_wait): Implement return value,
5702         rename argument 'event_child' to 'event_lwp', handle
5703         PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5704         (linux_low_ptrace_options): New function.
5705         (linux_low_filter_event): Call linux_low_ptrace_options,
5706         use different argument fo linux_enable_event_reporting,
5707         use return value from handle_extended_wait.
5708         (extended_event_reported): New function.
5709         (linux_wait_1): Call extended_event_reported and set
5710         status to report fork events.
5711         (linux_write_memory): Add pid to debug message.
5712         (reset_lwp_ptrace_options_callback): New function.
5713         (linux_handle_new_gdb_connection): New function.
5714         (linux_target_ops): Initialize new structure member.
5715         * linux-low.h (struct lwp_info) <waitstatus>: New member.
5716         * lynx-low.c: Initialize new structure member.
5717         * remote-utils.c (prepare_resume_reply): Implement stop reason
5718         "fork" for "T" stop message.
5719         * server.c (handle_query): Call handle_new_gdb_connection.
5720         * server.h (report_fork_events): Declare global flag.
5721         * target.h (struct target_ops) <handle_new_gdb_connection>:
5722         New member.
5723         (target_handle_new_gdb_connection): New macro.
5724         * win32-low.c: Initialize new structure member.
5725
5726 2015-05-12  Don Breazeal  <donb@codesourcery.com>
5727
5728         * mem-break.c (APPEND_TO_LIST): Define macro.
5729         (clone_agent_expr): New function.
5730         (clone_one_breakpoint): New function.
5731         (clone_all_breakpoints): New function.
5732         * mem-break.h: Declare new functions.
5733
5734 2015-05-12  Don Breazeal  <donb@codesourcery.com>
5735
5736         * linux-low.c (linux_supports_fork_events): New function.
5737         (linux_supports_vfork_events): New function.
5738         (linux_target_ops): Initialize new structure members.
5739         (initialize_low): Call linux_check_ptrace_features.
5740         * lynx-low.c (lynx_target_ops): Initialize new structure
5741         members.
5742         * server.c (report_fork_events, report_vfork_events):
5743         New global flags.
5744         (handle_query): Add new features to qSupported packet and
5745         response.
5746         (captured_main): Initialize new global variables.
5747         * target.h (struct target_ops) <supports_fork_events>:
5748         New member.
5749         <supports_vfork_events>: New member.
5750         (target_supports_fork_events): New macro.
5751         (target_supports_vfork_events): New macro.
5752         * win32-low.c (win32_target_ops): Initialize new structure
5753         members.
5754
5755 2015-05-12  Gary Benson <gbenson@redhat.com>
5756
5757         * server.c (handle_qxfer_exec_file): Use current process
5758         if annex is empty.
5759
5760 2015-05-08  Sandra Loosemore  <sandra@codesourcery.com>
5761
5762         * linux-nios2-low.c: Include elf/common.h.  Adjust comments.
5763         Remove HAVE_PTRACE_GETREGS conditionals.
5764         (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5765         instead of PTRACE_GETREGS and PTRACE_SETREGS.
5766
5767 2015-05-08  Yao Qi  <yao.qi@linaro.org>
5768
5769         * linux-low.c (linux_supports_conditional_breakpoints): New
5770         function.
5771         (linux_target_ops): Install new target method.
5772         * lynx-low.c (lynx_target_ops): Install NULL hook for
5773         supports_conditional_breakpoints.
5774         * nto-low.c (nto_target_ops): Likewise.
5775         * spu-low.c (spu_target_ops): Likewise.
5776         * win32-low.c (win32_target_ops): Likewise.
5777         * server.c (handle_query): Check
5778         target_supports_conditional_breakpoints.
5779         * target.h (struct target_ops) <supports_conditional_breakpoints>:
5780         New field.
5781         (target_supports_conditional_breakpoints): New macro.
5782
5783 2015-05-06  Pedro Alves  <palves@redhat.com>
5784
5785         PR server/18081
5786         * server.c (start_inferior): If the process exits, mourn it.
5787
5788 2015-04-21  Gary Benson <gbenson@redhat.com>
5789
5790         * hostio.c (fileio_open_flags_to_host): Factored out to
5791         fileio_to_host_openflags in common/fileio.c.  Single use
5792         updated.
5793
5794 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
5795
5796         * linux-xtensa-low.c (xtensa_fill_gregset)
5797         (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5798         XCHAL_HAVE_LOOP.
5799
5800 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
5801
5802         * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5803         (regs_info): Replace usrregs pointer with NULL.
5804
5805 2015-04-17  Gary Benson  <gbenson@redhat.com>
5806
5807         * target.h (struct target_ops) <pid_to_exec_file>: New field.
5808         * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5809         * server.c (handle_qxfer_exec_file): New function.
5810         (qxfer_packets): Add exec-file entry.
5811         (handle_query): Report qXfer:exec-file:read as supported packet.
5812
5813 2015-04-14  Romain Naour <romain.naour@openwide.fr>  (tiny change)
5814
5815         * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5816
5817 2015-04-09  Gary Benson <gbenson@redhat.com>
5818
5819         * hostio-errno.c (errno_to_fileio_error): Remove function.
5820         Update caller to use remote_fileio_to_fio_error.
5821
5822 2015-04-09  Yao Qi  <yao.qi@linaro.org>
5823
5824         * linux-low.c (linux_insert_point): Call
5825         insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5826         (linux_remove_point): Call remove_memory_breakpoint if type is
5827         raw_bkpt_type_sw.
5828         * linux-x86-low.c (x86_insert_point): Don't call
5829         insert_memory_breakpoint.
5830         (x86_remove_point): Don't call remove_memory_breakpoint.
5831
5832 2015-04-01  Pedro Alves  <palves@redhat.com>
5833             Cleber Rosa  <crosa@redhat.com>
5834
5835         * server.c (gdbserver_usage): Reorganize and extend the usage
5836         message.
5837
5838 2015-03-24  Pedro Alves  <palves@redhat.com>
5839
5840         * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
5841         output.  Also dump TRAP_TRACE.
5842         (linux_low_filter_event): In debug output, distinguish a
5843         resume_stop SIGSTOP from a delayed SIGSTOP.
5844
5845 2015-03-24  Gary Benson  <gbenson@redhat.com>
5846
5847         * linux-x86-low.c (x86_linux_new_thread): Moved to
5848         nat/x86-linux.c.
5849         (x86_linux_prepare_to_resume): Likewise.
5850
5851 2015-03-24  Gary Benson  <gbenson@redhat.com>
5852
5853         * Makefile.in (x86-linux-dregs.o): New rule.
5854         * configure.srv: Add x86-linux-dregs.o to relevant targets.
5855         * linux-x86-low.c: Include nat/x86-linux-dregs.h.
5856         (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
5857         (x86_linux_dr_get): Likewise.
5858         (x86_linux_dr_set): Likewise.
5859         (update_debug_registers_callback): Likewise.
5860         (x86_linux_dr_set_addr): Likewise.
5861         (x86_linux_dr_get_addr): Likewise.
5862         (x86_linux_dr_set_control): Likewise.
5863         (x86_linux_dr_get_control): Likewise.
5864         (x86_linux_dr_get_status): Likewise.
5865         (x86_linux_update_debug_registers): Likewise.
5866
5867 2015-03-24  Gary Benson  <gbenson@redhat.com>
5868
5869         * linux-x86-low.c (x86_linux_update_debug_registers):
5870         New function, factored out from...
5871         (x86_linux_prepare_to_resume): ...this.
5872
5873 2015-03-24  Gary Benson  <gbenson@redhat.com>
5874
5875         * linux-x86-low.c (x86_linux_dr_get): Update comments.
5876         (x86_linux_dr_set): Likewise.
5877         (update_debug_registers_callback): Likewise.
5878         (x86_linux_dr_set_addr): Likewise.
5879         (x86_linux_dr_get_addr): Likewise.
5880         (x86_linux_dr_set_control): Likewise.
5881         (x86_linux_dr_get_control): Likewise.
5882         (x86_linux_dr_get_status): Likewise.
5883         (x86_linux_prepare_to_resume): Likewise.
5884
5885 2015-03-24  Gary Benson  <gbenson@redhat.com>
5886
5887         * linux-x86-low.c (x86_linux_dr_get): Add assertion.
5888         Use perror_with_name.  Pass string through gettext.
5889         (x86_linux_dr_set): Likewise.
5890
5891 2015-03-24  Gary Benson  <gbenson@redhat.com>
5892
5893         * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
5894         (x86_linux_dr_set_addr): ...this.
5895         (x86_dr_low_get_addr): Rename to...
5896         (x86_linux_dr_get_addr): ...this.
5897         (x86_dr_low_set_control): Rename to...
5898         (x86_linux_dr_set_control): ...this.
5899         (x86_dr_low_get_control): Rename to...
5900         (x86_linux_dr_get_control): ...this.
5901         (x86_dr_low_get_status): Rename to...
5902         (x86_linux_dr_get_status): ...this.
5903         (x86_dr_low): Update with new function names.
5904
5905 2015-03-24  Gary Benson  <gbenson@redhat.com>
5906
5907         * Makefile.in (x86-linux.o): New rule.
5908         * configure.srv: Add x86-linux.o to relevant targets.
5909         * linux-low.c (lwp_set_arch_private_info): New function.
5910         (lwp_arch_private_info): Likewise.
5911         * linux-x86-low.c: Include nat/x86-linux.h.
5912         (arch_lwp_info): Removed structure.
5913         (update_debug_registers_callback):
5914         Use lwp_set_debug_registers_changed.
5915         (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
5916         and lwp_set_debug_registers_changed.
5917         (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
5918
5919 2015-03-24  Gary Benson  <gbenson@redhat.com>
5920
5921         * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
5922         * linux-arm-low.c (arm_new_thread): Likewise.
5923         * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
5924         * linux-mips-low.c (mips_linux_new_thread): Likewise.
5925         * linux-x86-low.c (x86_linux_new_thread): Likewise.
5926         * linux-low.c (add_lwp): Update the_low_target.new_thread call.
5927
5928 2015-03-24  Gary Benson  <gbenson@redhat.com>
5929
5930         * linux-low.c (ptid_of_lwp): New function.
5931         (lwp_is_stopped): Likewise.
5932         (lwp_stop_reason): Likewise.
5933         * linux-x86-low.c (update_debug_registers_callback):
5934         Use lwp_is_stopped.
5935         (x86_linux_prepare_to_resume): Use ptid_of_lwp and
5936         lwp_stop_reason.
5937
5938 2015-03-24  Gary Benson  <gbenson@redhat.com>
5939
5940         * linux-low.h (linux_stop_lwp): Remove declaration.
5941
5942 2015-03-24  Gary Benson  <gbenson@redhat.com>
5943
5944         * linux-low.h: Include nat/linux-nat.h.
5945         * linux-low.c (iterate_over_lwps_args): New structure.
5946         (iterate_over_lwps_filter): New function.
5947         (iterate_over_lwps): Likewise.
5948         * linux-x86-low.c (update_debug_registers_callback):
5949         Update signature to what iterate_over_lwps expects.
5950         Remove PID check that iterate_over_lwps now performs.
5951         (x86_dr_low_set_addr): Use iterate_over_lwps.
5952         (x86_dr_low_set_control): Likewise.
5953
5954 2015-03-24  Gary Benson  <gbenson@redhat.com>
5955
5956         * linux-x86-low.c (x86_debug_reg_state): New function.
5957         (x86_linux_prepare_to_resume): Use the above.
5958
5959 2015-03-24  Gary Benson  <gbenson@redhat.com>
5960
5961         * linux-low.c (current_lwp_ptid): New function.
5962         * linux-x86-low.c: Include nat/linux-nat.h.
5963         (x86_dr_low_get_addr): Use current_lwp_ptid.
5964         (x86_dr_low_get_control): Likewise.
5965         (x86_dr_low_get_status): Likewise.
5966
5967 2015-03-20  Pedro Alves  <palves@redhat.com>
5968
5969         * tracepoint.c (cmd_qtstatus): Make "str" const.
5970
5971 2015-03-20  Pedro Alves  <palves@redhat.com>
5972
5973         * server.c (handle_general_set): Make "req_str" const.
5974
5975 2015-03-19  Pedro Alves  <palves@redhat.com>
5976
5977         * linux-low.c (linux_resume_one_lwp): Rename to ...
5978         (linux_resume_one_lwp_throw): ... this.  Don't handle ESRCH here,
5979         instead call perror_with_name.
5980         (check_ptrace_stopped_lwp_gone): New function.
5981         (linux_resume_one_lwp): Reimplement as wrapper around
5982         linux_resume_one_lwp_throw that swallows errors if the LWP is
5983         gone.
5984
5985 2015-03-19  Pedro Alves  <palves@redhat.com>
5986
5987         * linux-low.c (count_events_callback, select_event_lwp_callback):
5988         No longer check whether the thread has resume_stop as last resume
5989         kind.
5990
5991 2015-03-19 Pedro Alves  <palves@redhat.com>
5992
5993         * linux-low.c (count_events_callback, select_event_lwp_callback):
5994         Use the lwp's status_pending_p field, not the thread's.
5995
5996 2015-03-19  Pedro Alves  <palves@redhat.com>
5997
5998         * linux-low.c (select_event_lwp_callback): Update comments to
5999         no longer mention SIGTRAP.
6000
6001 2015-03-18  Gary Benson  <gbenson@redhat.com>
6002
6003         * server.c (handle_query): Do not report vFile:fstat as supported.
6004
6005 2015-03-11  Gary Benson  <gbenson@redhat.com>
6006
6007         * hostio.c (sys/types.h): New include.
6008         (sys/stat.h): Likewise.
6009         (common-remote-fileio.h): Likewise.
6010         (handle_fstat): New function.
6011         (handle_vFile): Handle vFile:fstat packets.
6012
6013 2015-03-11  Gary Benson  <gbenson@redhat.com>
6014
6015         * configure.ac (AC_CHECK_MEMBERS): Add checks for
6016         struct stat.st_blocks and struct stat.st_blksize.
6017         * configure: Regenerate.
6018         * config.in: Likewise.
6019         * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6020         (OBS): Add common-remote-fileio.o.
6021         (common-remote-fileio.o): New rule.
6022
6023 2015-03-09  Pedro Alves  <palves@redhat.com>
6024
6025         * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6026         'struct sockaddr' pointer in 'accept' call.
6027
6028 2015-03-09  Pedro Alves  <palves@redhat.com>
6029
6030         Revert:
6031         2015-03-07  Pedro Alves  <palves@redhat.com>
6032         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6033         or <winsock2.h> here.  Instead include "gdb_socket.h".
6034         (remote_open): Use union gdb_sockaddr_u.
6035         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6036         or <winsock2.h> here.  Instead include "gdb_socket.h".
6037         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6038         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6039         or <sys/un.h>.
6040         (init_named_socket, gdb_agent_helper_thread): Use union
6041         gdb_sockaddr_u.
6042
6043 2015-03-07  Pedro Alves  <palves@redhat.com>
6044
6045         * configure.ac (build_warnings): Move
6046         -Wdeclaration-after-statement to the C-specific set.
6047         * configure: Regenerate.
6048
6049 2015-03-07  Pedro Alves  <palves@redhat.com>
6050
6051         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6052         or <winsock2.h> here.  Instead include "gdb_socket.h".
6053         (remote_open): Use union gdb_sockaddr_u.
6054         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6055         or <winsock2.h> here.  Instead include "gdb_socket.h".
6056         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6057         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6058         or <sys/un.h>.
6059         (init_named_socket, gdb_agent_helper_thread): Use union
6060         gdb_sockaddr_u.
6061
6062 2015-03-07  Pedro Alves  <palves@redhat.com>
6063
6064         Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6065         instead.
6066
6067 2015-03-06  Yao Qi  <yao.qi@linaro.org>
6068
6069         * linux-aarch64-low.c (aarch64_insert_point): Use
6070         show_debug_regs as a boolean.
6071         (aarch64_remove_point): Likewise.
6072
6073 2015-03-05  Pedro Alves  <palves@redhat.com>
6074
6075         * lynx-low.c (lynx_target_ops): Install NULL hooks for
6076         stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6077         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6078         * nto-low.c (nto_target_ops): Likewise.
6079         * spu-low.c (spu_target_ops): Likewise.
6080         * win32-low.c (win32_target_ops): Likewise.
6081
6082 2015-03-04  Pedro Alves  <palves@redhat.com>
6083
6084         * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6085         Decide whether a breakpoint triggered based on the SIGTRAP's
6086         siginfo.si_code.
6087         (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6088         breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6089         (linux_low_filter_event): Check for breakpoints before checking
6090         watchpoints.
6091         (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6092         siginfo.si_code.
6093         (linux_stopped_by_sw_breakpoint)
6094         (linux_supports_stopped_by_sw_breakpoint)
6095         (linux_stopped_by_hw_breakpoint)
6096         (linux_supports_stopped_by_hw_breakpoint): New functions.
6097         (linux_target_ops): Install new target methods.
6098
6099 2015-03-04  Pedro Alves  <palves@redhat.com>
6100
6101         * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6102         * server.c (swbreak_feature, hwbreak_feature): New globals.
6103         (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6104         (captured_main): Clear swbreak_feature and hwbreak_feature.
6105         * server.h (swbreak_feature, hwbreak_feature): Declare.
6106         * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6107         supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6108         supports_stopped_by_hw_breakpoint>: New fields.
6109         (target_supports_stopped_by_sw_breakpoint)
6110         (target_stopped_by_sw_breakpoint)
6111         (target_supports_stopped_by_hw_breakpoint)
6112         (target_stopped_by_hw_breakpoint): Declare.
6113
6114 2015-03-04  Pedro Alves  <palves@redhat.com>
6115
6116         enum lwp_stop_reason -> enum target_stop_reason
6117         * linux-low.c (check_stopped_by_breakpoint): Adjust.
6118         (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6119         (linux_wait_1, stuck_in_jump_pad_callback)
6120         (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6121         (linux_stopped_by_watchpoint):
6122         * linux-low.h (enum lwp_stop_reason): Delete.
6123         (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6124         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6125
6126 2015-03-04  Yao Qi  <yao.qi@linaro.org>
6127
6128         * Makefile.in (SFILES): Add linux-aarch64-low.c.
6129
6130 2015-03-03  Gary Benson  <gbenson@redhat.com>
6131
6132         * hostio.c (handle_vFile): Fix prefix lengths.
6133
6134 2015-03-03  Markus Metzger  <markus.t.metzger@intel.com>
6135
6136         * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6137         ptr_bits.
6138
6139 2015-03-02  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6140
6141         * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6142         (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6143         (clean): Add "rm -f" for above C files.
6144         * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6145         s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6146         (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6147         s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6148         * linux-s390-low.c (HWCAP_S390_VX): New macro.
6149         (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6150         (init_registers_s390x_vx_linux64)
6151         (init_registers_s390x_tevx_linux64)
6152         (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6153         (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6154         declarations.
6155         (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6156         (s390_store_vxrs_high): New functions.
6157         (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6158         NT_S390_VXRS_HIGH.
6159         (s390_arch_setup): Add logic for selecting one of the new target
6160         descriptions.  Activate the new vector regsets if applicable.
6161         (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6162         init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6163         and init_registers_s390x_tevx_linux64.
6164
6165 2015-03-01  Pedro Alves  <palves@redhat.com>
6166
6167         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6168         parameter.
6169
6170 2015-02-27  Pedro Alves  <palves@redhat.com>
6171
6172         * linux-x86-low.c (u_debugreg_offset): New function.
6173         (x86_linux_dr_get, x86_linux_dr_set): Use it.
6174
6175 2015-02-27  Pedro Alves  <palves@redhat.com>
6176
6177         * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6178         [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6179         [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6180         ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6181         (ps_lsetfpregs, ps_getpid)
6182         (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6183         (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6184         (ps_lsetxregs, ps_plog): Declare.
6185
6186 2015-02-27  Pedro Alves  <palves@redhat.com>
6187
6188         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6189         IP_AGENT_EXPORT_FUNC.
6190         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6191         IP_AGENT_EXPORT_FUNC.
6192         * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6193         (IP_AGENT_EXPORT): Delete.
6194         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6195         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6196         (gdb_trampoline_buffer_error, collecting, gdb_collect)
6197         (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6198         (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6199         (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6200         (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6201         (traceframe_read_count, traceframe_write_count)
6202         (traceframes_created, trace_state_variables, get_raw_reg)
6203         (get_trace_state_variable_value, set_trace_state_variable_value)
6204         (ust_loaded, helper_thread_id, cmd_buf): Use
6205         IPA_SYM_EXPORTED_NAME.
6206         (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6207         (tracepoints) Use IP_AGENT_EXPORT_VAR.
6208         (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6209         IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6210         (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6211         (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6212         EXTERN_C_PUSH/EXTERN_C_POP.
6213         (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6214         (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6215         wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6216         (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6217         (traceframe_write_count, traceframe_read_count)
6218         (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6219         (about_to_request_buffer_space, get_trace_state_variable_value)
6220         (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6221         (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6222         EXTERN_C_PUSH/EXTERN_C_POP.
6223         (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6224         (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6225         (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6226         and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6227         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6228         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6229         (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6230         * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6231         Define.
6232         (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6233         (IP_AGENT_EXPORT_VAR_DECL): Define.
6234         (tracing): Declare.
6235         (gdb_agent_get_raw_reg): Declare.
6236
6237 2015-02-27  Tom Tromey  <tromey@redhat.com>
6238             Pedro Alves  <palves@redhat.com>
6239
6240         Rename symbols whose names are reserved C++ keywords throughout.
6241
6242 2015-02-27  Pedro Alves  <palves@redhat.com>
6243
6244         * Makefile.in (COMPILER): New, get it from autoconf.
6245         (CXX): Get from autoconf instead.
6246         (COMPILE.pre): Use COMPILER.
6247         (CC-LD): Rename to ...
6248         (CC_LD): ... this.  Use COMPILER.
6249         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6250         (CXX_FOR_TARGET): Default to g++ instead of gcc.
6251         * acinclude.m4: Include build-with-cxx.m4.
6252         * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6253         Disable -Werror by default if building in C++ mode.
6254         (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6255         -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6256         the C++ compiler.  Save/restore CXXFLAGS too.
6257         * configure: Regenerate.
6258
6259 2015-02-27  Pedro Alves  <palves@redhat.com>
6260
6261         * acinclude.m4: Include libiberty.m4.
6262         * configure.ac: Call libiberty_INIT.
6263         * config.in, configure: Regenerate.
6264
6265 2015-02-26  Pedro Alves  <palves@redhat.com>
6266
6267         * linux-low.c (linux_wait_1): When incrementing the PC past a
6268         program breakpoint always use the_low_target.breakpoint_len as
6269         increment, rather than the maximum between that and
6270         the_low_target.decr_pc_after_break.
6271
6272 2015-02-23  Pedro Alves  <palves@redhat.com>
6273
6274         * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6275         thread was doing a step-over; always adjust the PC if
6276         we stepped over a permanent breakpoint.
6277         (linux_wait_1): If we stepped over breakpoint that was on top of a
6278         permanent breakpoint, manually advance the PC past it.
6279
6280 2015-02-23  Pedro Alves  <palves@redhat.com>
6281
6282         * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6283         modes.
6284         (x86_fill_gregset, x86_store_gregset): Use it when handling
6285         $orig_eax.
6286
6287 2015-02-20  Pedro Alves  <palves@redhat.com>
6288
6289         * thread-db.c: Include "nat/linux-procfs.h".
6290         (thread_db_init): Skip listing new threads if the kernel supports
6291         PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6292
6293 2015-02-20  Pedro Alves  <palves@redhat.com>
6294
6295         * linux-low.c (status_pending_p_callback): Use ptid_match.
6296
6297 2015-02-19  Antoine Tremblay  <antoine.tremblay@ericsson.com>
6298
6299         PR breakpoints/16812
6300         * linux-low.c (wstatus_maybe_breakpoint): Remove.
6301         (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6302         (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6303
6304 2015-02-10  Antoine Tremblay <antoine.tremblay@ericsson.com>
6305
6306         PR breakpoints/15956
6307         * tracepoint.c (cmd_qtinit): Add check for current_thread.
6308
6309 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
6310
6311         * linux-low.c (linux_low_btrace_conf): Print size.
6312         * server.c (handle_btrace_conf_general_set): New.
6313         (hanle_general_set): Call handle_btrace_conf_general_set.
6314         (handle_query): Report Qbtrace-conf:bts:size as supported.
6315
6316 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
6317
6318         * linux-low.c (linux_low_enable_btrace): Update parameters.
6319         (linux_low_btrace_conf): New.
6320         (linux_target_ops)<to_btrace_conf>: Initialize.
6321         * server.c (current_btrace_conf): New.
6322         (handle_btrace_enable): Rename to ...
6323         (handle_btrace_enable_bts): ... this.  Pass &current_btrace_conf
6324         to target_enable_btrace.  Update comment.  Update users.
6325         (handle_qxfer_btrace_conf): New.
6326         (qxfer_packets): Add btrace-conf entry.
6327         (handle_query): Report qXfer:btrace-conf:read as supported packet.
6328         * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6329         (target_ops)<read_btrace_conf>: New.
6330         (target_enable_btrace): Update parameters.
6331         (target_read_btrace_conf): New.
6332
6333 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
6334
6335         * server.c (handle_btrace_general_set): Remove call to
6336         target_supports_btrace.
6337         (supported_btrace_packets): New.
6338         (handle_query): Call supported_btrace_packets.
6339         * target.h: include btrace-common.h.
6340         (btrace_target_info): Removed.
6341         (supports_btrace, target_supports_btrace): Update parameters.
6342
6343 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
6344
6345         * Makefile.in (SFILES): Add common/btrace-common.c.
6346         (OBS): Add common/btrace-common.o.
6347         (btrace-common.o): Add build rules.
6348         * linux-low: Include btrace-common.h.
6349         (linux_low_read_btrace): Use struct btrace_data.  Call
6350         btrace_data_init and btrace_data_fini.
6351
6352 2015-02-06  Pedro Alves  <palves@redhat.com>
6353
6354         * thread-db.c (find_new_threads_callback): Add debug output.
6355
6356 2015-02-04  Pedro Alves  <palves@redhat.com>
6357
6358         * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6359         (resume_stopped_resumed_lwps): New function.
6360         (linux_wait_for_event_filtered): Use it.
6361
6362 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
6363
6364         * Makefile.in (SFILES): Add linux-personality.c.
6365         (linux-personality.o): New rule.
6366         * configure.srv (srv_linux_obj): Add linux-personality.o to the
6367         list of objects to be built.
6368         * linux-low.c: Include nat/linux-personality.h.
6369         (linux_create_inferior): Remove code to disable address space
6370         randomization (moved to ../nat/linux-personality.c).  Create
6371         cleanup to disable address space randomization.
6372
6373 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
6374
6375         * Makefile.in (posix-strerror.o): New rule.
6376         (mingw-strerror.o): Likewise.
6377         * configure: Regenerated.
6378         * configure.ac: Source file ../common/common.host.  Initialize new
6379         variable srv_host_obs.  Add srv_host_obs to GDBSERVER_DEPFILES.
6380
6381 2015-01-14  Yao Qi  <yao@codesourcery.com>
6382
6383         * Makefile.in (SFILES): Add nat/ppc-linux.c.
6384         (ppc-linux.o): New rule.
6385         * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6386         * configure.ac: AC_CHECK_FUNCS(getauxval).
6387         * config.in: Re-generated.
6388         * configure: Re-generated.
6389         * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6390         ppc64_64bit_inferior_p
6391
6392 2015-01-14  Yao Qi  <yao@codesourcery.com>
6393
6394         * linux-ppc-low.c: Include "nat/ppc-linux.h".
6395          (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6396         (PPC_FEATURE_HAS_ALTIVEC,  PPC_FEATURE_HAS_SPE): Likewise.
6397         (PT_ORIG_R3, PT_TRAP): Likewise.
6398         (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6399         (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6400         (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6401
6402 2015-01-10  Joel Brobecker  <brobecker@adacore.com>
6403
6404         * i387-fp.c (i387_cache_to_xsave): In look over
6405         num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6406         zmmh_low_space field by use of zmmh_high_space.
6407
6408 2015-01-09  Pedro Alves  <palves@redhat.com>
6409
6410         * linux-low.c (step_over_bkpt): Move higher up in the file.
6411         (handle_extended_wait): Don't store the stop_pc here.
6412         (get_stop_pc): Adjust comments and rename to ...
6413         (check_stopped_by_breakpoint): ... this.  Record whether the LWP
6414         stopped for a software breakpoint or hardware breakpoint.
6415         (thread_still_has_status_pending_p): New function.
6416         (status_pending_p_callback): Use
6417         thread_still_has_status_pending_p.  If the event is no longer
6418         interesting, resume the LWP.
6419         (handle_tracepoints): Add assert.
6420         (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6421         (wstatus_maybe_breakpoint): New function.
6422         (cancel_breakpoint): Delete function.
6423         (check_stopped_by_watchpoint): New function, factored out from
6424         linux_low_filter_event.
6425         (lp_status_maybe_breakpoint): Delete function.
6426         (linux_low_filter_event): Remove filter_ptid argument.
6427         Leave thread group exits pending here.  Store the LWP's stop PC.
6428         Always leave events pending.
6429         (linux_wait_for_event_filtered): Pull all events out of the
6430         kernel, and leave them all pending.
6431         (count_events_callback, select_event_lwp_callback): Consider all
6432         events.
6433         (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6434         (select_event_lwp): Only give preference to the stepping LWP in
6435         all-stop mode.  Adjust comments.
6436         (ignore_event): New function.
6437         (linux_wait_1): Delete 'retry' label.  Use ignore_event.  Remove
6438         references to cancel_breakpoints.  Adjust to renames.  Also give
6439         equal priority to all LWPs that have had events in non-stop mode.
6440         If reporting a software breakpoint event, unadjust the LWP's PC.
6441         (linux_wait): If linux_wait_1 returned an ignored event, retry.
6442         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6443         Adjust.
6444         (linux_resume_one_lwp): Store the LWP's PC.  Adjust.
6445         (resume_status_pending_p): Use thread_still_has_status_pending_p.
6446         (linux_stopped_by_watchpoint): Adjust.
6447         (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6448         * linux-low.h (enum lwp_stop_reason): New.
6449         (struct lwp_info) <stop_pc>: Adjust comment.
6450         <stopped_by_watchpoint>: Delete field.
6451         <stop_reason>: New field.
6452         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6453         * mem-break.c (software_breakpoint_inserted_here)
6454         (hardware_breakpoint_inserted_here): New function.
6455         * mem-break.h (software_breakpoint_inserted_here)
6456         (hardware_breakpoint_inserted_here): Declare.
6457         * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6458         (cancel_breakpoints): Delete.
6459         * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6460         (upload_fast_traceframes): Remove references to
6461         cancel_breakpoints.
6462
6463 2015-01-09  Pedro Alves  <palves@redhat.com>
6464
6465         * thread-db.c (find_new_threads_callback): Ignore thread if the
6466         kernel thread ID is -1.
6467
6468 2015-01-09  Pedro Alves  <palves@redhat.com>
6469
6470         * linux-low.c (linux_attach_fail_reason_string): Move to
6471         nat/linux-ptrace.c, and rename.
6472         (linux_attach_lwp): Update comment.
6473         (attach_proc_task_lwp_callback): New function.
6474         (linux_attach): Adjust to rename and use
6475         linux_proc_attach_tgid_threads.
6476         (linux_attach_fail_reason_string): Delete declaration.
6477
6478 2015-01-01  Joel Brobecker  <brobecker@adacore.com>
6479
6480         * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6481         * server.c (gdbserver_version): Likewise.
6482
6483 2014-12-29  Sergio Durigan Junior  <sergiodj@redhat.com>
6484
6485         * remote-utils.c: Include ctype.h.
6486         (input_interrupt): Explicitly handle the case when the char
6487         received is the NUL byte.  Improve the printing of non-ASCII
6488         characters.
6489
6490 2014-12-16  Joel Brobecker  <brobecker@adacore.com>
6491
6492         * linux-low.c (linux_low_filter_event): Update call to
6493         linux_enable_event_reporting following the addition of
6494         a new parameter to that function.
6495
6496 2014-12-16  Catalin Udma  <catalin.udma@freescale.com>
6497
6498         PR server/17457
6499         * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6500         (AARCH64_FPCR_REGNO): Likewise.
6501         (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6502         (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6503         (aarch64_store_fpregset): Likewise.
6504
6505 2014-12-15  Joel Brobecker  <brobecker@adacore.com>
6506
6507         * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6508         Remove FIXME comment about assumption about N.
6509
6510 2014-12-13  Joel Brobecker  <brobecker@adacore.com>
6511
6512         * configure.ac: If large-file support is disabled in GDBserver,
6513         pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6514         * configure: Regenerate.
6515
6516 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6517
6518         * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6519         warning upon ENODATA from ptrace.
6520         * linux-s390-low.c (s390_store_tdb): New.
6521         (s390_regsets): Add regset for NT_S390_TDB.
6522
6523 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6524
6525         * linux-low.c (regsets_store_inferior_registers): Skip regsets
6526         without a fill_function.
6527         * linux-s390-low.c (s390_fill_last_break): Remove.
6528         (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6529         (s390_arch_setup): Use regset's size instead of fill_function for
6530         loop end condition.
6531
6532 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6533
6534         * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6535         the regset's store function when ptrace returned an error.
6536         * regcache.c (get_thread_regcache): Invalidate register cache
6537         before fetching inferior's registers.
6538
6539 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6540
6541         * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6542         while-loop as for-loop.
6543         (regsets_store_inferior_registers): Likewise.
6544
6545 2014-11-28  Yao Qi  <yao@codesourcery.com>
6546
6547         * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6548         * config.in, configure: Re-generate.
6549         * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6550         is defined.
6551
6552 2014-11-21  Yao Qi  <yao@codesourcery.com>
6553
6554         * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6555         (AC_CHECK_HEADERS): Remove malloc.h.
6556         * configure: Re-generated.
6557         * config.in: Re-generated.
6558         * server.h: Don't include alloca.h and malloc.h.
6559         * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6560         Don't include malloc.h.
6561
6562 2014-11-17  Joel Brobecker  <brobecker@adacore.com>
6563
6564         * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6565         corresponding ERRNO check in same block.
6566
6567 2014-11-12  Pedro Alves  <palves@redhat.com>
6568
6569         * server.c (cont_thread): Update comment.
6570         (start_inferior, attach_inferior): No longer clear cont_thread.
6571         (handle_v_cont): No longer set cont_thread.
6572         (captured_main): Clear cont_thread each time a GDB connects.
6573
6574 2014-11-12  Pedro Alves  <palves@redhat.com>
6575
6576         * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6577         thread, and don't resume all threads if the Hc thread has exited.
6578
6579 2014-11-12  Pedro Alves  <palves@redhat.com>
6580
6581         * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6582         the process group instead of to a specific LWP.
6583
6584 2014-10-15  Pedro Alves  <palves@redhat.com>
6585
6586         PR server/17487
6587         * win32-arm-low.c (arm_set_thread_context): Remove current_event
6588         parameter.
6589         (arm_set_thread_context): Delete.
6590         (the_low_target): Adjust.
6591         * win32-i386-low.c (debug_registers_changed)
6592         (debug_registers_used): Delete.
6593         (update_debug_registers_callback): New function.
6594         (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6595         needing to update their debug registers.
6596         (win32_get_current_dr): New function.
6597         (x86_dr_low_get_addr, x86_dr_low_get_control)
6598         (x86_dr_low_get_status): Fetch the debug register from the thread
6599         record's context.
6600         (i386_initial_stuff): Adjust.
6601         (i386_get_thread_context): Remove current_event parameter.  Don't
6602         clear debug_registers_changed nor copy DR values to
6603         debug_reg_state.
6604         (i386_set_thread_context): Delete.
6605         (i386_prepare_to_resume): New function.
6606         (i386_thread_added): Mark the thread as needing to update irs
6607         debug registers.
6608         (the_low_target): Remove i386_set_thread_context and install
6609         i386_prepare_to_resume.
6610         * win32-low.c (win32_get_thread_context): Adjust.
6611         (win32_set_thread_context): Use SetThreadContext
6612         directly.
6613         (win32_prepare_to_resume): New function.
6614         (win32_require_context): New function, factored out from ...
6615         (thread_rec): ... this.
6616         (continue_one_thread): Call win32_prepare_to_resume on each thread
6617         we're about to continue.
6618         (win32_resume): Call win32_prepare_to_resume on the event thread.
6619         * win32-low.h (struct win32_thread_info)
6620         <debug_registers_changed>: New field.
6621         (struct win32_target_ops): Change prototype of set_thread_context,
6622         delete set_thread_context and add prepare_to_resume.
6623         (win32_require_context): New declaration.
6624
6625 2014-10-08  Gary Benson  <gbenson@redhat.com>
6626
6627         * server.h: Do not include common-exceptions.h.
6628
6629 2014-10-08  Gary Benson  <gbenson@redhat.com>
6630
6631         * server.h: Do not include cleanups.h.
6632
6633 2014-09-30  James Hogan  <james.hogan@imgtec.com>
6634
6635         * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6636         mips64-dsp-linux.c.
6637
6638 2014-09-23  Yao Qi  <yao@codesourcery.com>
6639
6640         * linux-low.c (lp_status_maybe_breakpoint): New function.
6641         (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6642         (count_events_callback): Likewise.
6643         (select_event_lwp_callback): Likewise.
6644         (cancel_breakpoints_callback): Likewise.
6645
6646 2014-09-19  Don Breazeal  <donb@codesourcery.com>
6647
6648         * linux-low.c (handle_extended_wait): Call
6649         linux_ptrace_get_extended_event.
6650         (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6651         linux_is_extended_waitstatus.
6652
6653 2014-09-16  Joel Brobecker  <brobecker@adacore.com>
6654
6655         * Makefile.in (CPPFLAGS): Define.
6656         (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6657         (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6658
6659 2014-09-16  Gary Benson  <gbenson@redhat.com>
6660
6661         * inferiors.h (current_inferior): Renamed as...
6662         (current_thread): New variable.  All uses updated.
6663         * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6664         (maybe_move_out_of_jump_pad): Likewise.
6665         (cancel_breakpoint): Likewise.
6666         (linux_low_filter_event): Likewise.
6667         (wait_for_sigstop): Likewise.
6668         (linux_resume_one_lwp): Likewise.
6669         (need_step_over_p): Likewise.
6670         (start_step_over): Likewise.
6671         (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6672         * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6673         * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6674         and save_inferior as saved_thread.
6675         * regcache.c (get_thread_regcache): Renamed saved_inferior as
6676         saved_thread.
6677         (regcache_invalidate_thread): Likewise.
6678         * remote-utils.c (prepare_resume_reply): Likewise.
6679         * thread-db.c (thread_db_get_tls_address): Likewise.
6680         (disable_thread_event_reporting): Likewise.
6681         (remove_thread_event_breakpoints): Likewise.
6682         * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6683         as saved_thread.
6684         * target.h (set_desired_inferior): Renamed as...
6685         (set_desired_thread): New declaration.  All uses updated.
6686         * server.c (myresume): Updated comment to reference thread instead
6687         of inferior.
6688         (handle_serial_event): Likewise.
6689         (handle_target_event): Likewise.
6690
6691 2014-09-12  Tom Tromey  <tromey@redhat.com>
6692             Gary Benson  <gbenson@redhat.com>
6693
6694         * regcache.h: Include common-regcache.h.
6695         (regcache_read_pc): Don't declare.
6696         * regcache.c (get_thread_regcache_for_ptid): New function.
6697
6698 2014-09-11  Tom Tromey  <tromey@redhat.com>
6699             Gary Benson  <gbenson@redhat.com>
6700
6701         * symbol.c: New file.
6702         * Makefile.in (SFILES): Add symbol.c.
6703         (OBS): Add symbol.o.
6704
6705 2014-09-11  Gary Benson  <gbenson@redhat.com>
6706
6707         * target.c (target_stop_ptid, target_continue_ptid): New
6708         functions.
6709
6710 2014-09-11  Tom Tromey  <tromey@redhat.com>
6711             Gary Benson  <gbenson@redhat.com>
6712
6713         * target.h: Include target/target.h.
6714         * target.c (target_read_memory, target_read_uint32)
6715         (target_write_memory): New functions.
6716
6717 2014-09-11  Gary Benson  <gbenson@redhat.com>
6718
6719         * server.h (debug_hw_points): Don't declare.
6720         * server.c (debug_hw_points): Don't define.  Replace all uses
6721         with show_debug_regs.
6722         * linux-aarch64-low.c (debug_hw_points): Don't define.  Replace
6723         all uses with show_debug_regs.
6724
6725 2014-09-08  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
6726
6727         * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6728         endianness into account.
6729         (ppc_supply_ptrace_register): Likewise.
6730
6731 2014-09-03  James Hogan  <james.hogan@imgtec.com>
6732
6733         * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6734         to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6735
6736 2014-09-03  Gary Benson  <gbenson@redhat.com>
6737
6738         * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6739         ALL_DEBUG_ADDRESS_REGISTERS.
6740
6741 2014-09-02  Gary Benson  <gbenson@redhat.com>
6742
6743         * i386-low.h: Renamed as...
6744         * x86-low.h: New file.  All type, function and variable name
6745         prefixes changed from "i386_" to "x86_".  All references updated.
6746         * i386-low.c: Renamed as...
6747         * x86-low.c: New file.  All type, function and variable name
6748         prefixes changed from "i386_" to "x86_".  All references updated.
6749
6750 2014-09-02  Gary Benson  <gbenson@redhat.com>
6751
6752         * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6753         (x86_linux_new_thread): Likewise.
6754
6755 2014-08-29  Gary Benson  <gbenson@redhat.com>
6756
6757         * server.h (setjmp.h): Do not include.
6758         (toplevel): Do not declare.
6759         (common-exceptions.h): Include.
6760         (cleanups.h): Likewise.
6761         * server.c (toplevel): Do not define.
6762         (exit_code): New static global.
6763         (detach_or_kill_for_exit_cleanup): New function.
6764         (main): New function.  Original main renamed to...
6765         (captured_main): New function.
6766         * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6767
6768 2014-08-29  Gary Benson  <gbenson@redhat.com>
6769
6770         * Makefile.in (SFILES): Add common/common-exceptions.c.
6771         (OBS): Add common-exceptions.o.
6772         (common-exceptions.o): New rule.
6773         * utils.c (prepare_to_throw_exception): New function.
6774
6775 2014-08-29  Gary Benson  <gbenson@redhat.com>
6776
6777         * config.in: Regenerate.
6778         * configure: Likewise.
6779
6780 2014-08-29  Gary Benson  <gbenson@redhat.com>
6781
6782         * Makefile.in (SFILES): Add common/cleanups.c.
6783         (OBS): cleanups.o.
6784         (cleanups.o): New rule.
6785
6786 2014-08-29  Gary Benson  <gbenson@redhat.com>
6787
6788         * utils.c (internal_vwarning): New function.
6789
6790 2014-08-28  Gary Benson  <gbenson@redhat.com>
6791
6792         * utils.h (fatal): Remove declaration.
6793         * utils.c (fatal): Remove function.
6794
6795 2014-08-28  Gary Benson  <gbenson@redhat.com>
6796
6797         * tracepoint.c (gdb_agent_init): Replace fatal with
6798         perror_with_name.
6799         (initialize_tracepoint): Likewise.
6800
6801 2014-08-28  Gary Benson  <gbenson@redhat.com>
6802
6803         * remote-utils.c (remote_prepare): Replace fatal with error.
6804
6805 2014-08-28  Gary Benson  <gbenson@redhat.com>
6806
6807         * linux-low.c (linux_async): Replace fatal with warning.
6808         Tidy up and return.
6809         (linux_start_non_stop): Return -1 if linux_async failed.
6810
6811 2014-08-28  Gary Benson  <gbenson@redhat.com>
6812
6813         * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6814         gdb_assert.
6815         (i386_dr_low_get_addr): Remove vague comment.
6816         * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6817         gdb_assert.
6818
6819 2014-08-28  Gary Benson  <gbenson@redhat.com>
6820
6821         * inferiors.c (get_thread_process): Replace check with gdb_assert.
6822         * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6823         internal_error.
6824         (linux_resume_one_lwp): Likewise.
6825         * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6826         gdb_assert.
6827         * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6828         with internal_error.
6829         * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6830         (init_register_cache): Replace fatal with gdb_assert_not_reached.
6831         (find_register_by_name): Replace fatal with internal_error.
6832         (find_regno): Likewise.
6833         * tdesc.c (init_target_desc): Replace check with gdb_assert.
6834         * thread-db.c (thread_db_create_event): Likewise.
6835         (thread_db_load_search): Likewise.
6836         (try_thread_db_load_1): Likewise.
6837         * tracepoint.c (get_jump_space_head): Replace fatal with
6838         internal_error.
6839         (claim_trampoline_space): Likewise.
6840         (have_fast_tracepoint_trampoline_buffer): Likewise.
6841         (cmd_qtstart): Likewise.
6842         (stop_tracing): Likewise.
6843         (fast_tracepoint_collecting): Likewise.
6844         (target_malloc): Likewise.
6845         (download_tracepoint): Likewise.
6846         (download_trace_state_variables): Replace check with gdb_assert.
6847         (upload_fast_traceframes): Replace fatal with internal_error.
6848
6849 2014-08-19  Tom Tromey  <tromey@redhat.com>
6850             Gary Benson  <gbenson@redhat.com>
6851
6852         * Makefile.in (SFILES): Add common/common-debug.c.
6853         (OBS): Add common-debug.o.
6854         (common-debug.o): New rule.
6855         * debug.h (debug_printf): Don't declare.
6856         * debug.c (debug_printf): Renamed and rewritten as...
6857         (debug_vprintf): New function.
6858
6859 2014-08-19  Gary Benson  <gbenson@redhat.com>
6860
6861         * utils.h: Do not include print-utils.h.
6862
6863 2014-08-19  Tom Tromey  <tromey@redhat.com>
6864             Gary Benson  <gbenson@redhat.com>
6865
6866         * server.h: Add static assertion.
6867         (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
6868
6869 2014-08-19  Tom Tromey  <tromey@redhat.com>
6870             Gary Benson  <gbenson@redhat.com>
6871
6872         * Makefile.in (SFILES): Add common/errors.c.
6873         (OBS): Add errors.o.
6874         (IPA_OBS): Add errors-ipa.o.
6875         (errors.o): New rule.
6876         (errors-ipa.o): Likewise.
6877         * utils.h (perror_with_name, error, warning): Don't declare.
6878         * utils.c (warning): Renamed and rewritten as...
6879         (vwarning): New function.
6880         (error): Renamed and rewritten as...
6881         (verror): New function.
6882         (internal_error): Renamed and rewritten as...
6883         (internal_verror): New function.
6884
6885 2014-08-07  Gary Benson  <gbenson@redhat.com>
6886
6887         * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
6888         * configure: Regenerate.
6889         * config.in: Likewise.
6890         * server.h: Do not include errno.h.
6891         * event-loop.c: Likewise.
6892         * hostio-errno.c: Likewise.
6893         * linux-low.c: Likewise.
6894         * remote-utils.c: Likewise.
6895         * spu-low.c: Likewise.
6896         * utils.c: Likewise.
6897         * gdbreplay.c: Unconditionally include errno.h.
6898
6899 2014-08-07  Gary Benson  <gbenson@redhat.com>
6900
6901         * server.h: Do not include string.h.
6902         * event-loop.c: Likewise.
6903         * linux-low.c: Likewise.
6904         * regcache.c: Likewise.
6905         * remote-utils.c: Likewise.
6906         * spu-low.c: Likewise.
6907         * utils.c: Likewise.
6908
6909 2014-08-07  Gary Benson  <gbenson@redhat.com>
6910
6911         * server.h: Do not include gdb_assert.h.
6912
6913 2014-08-07  Gary Benson  <gbenson@redhat.com>
6914
6915         * server.h: Do not include common-utils.h.
6916
6917 2014-08-07  Gary Benson  <gbenson@redhat.com>
6918
6919         * server.h: Do not include ptid.h.
6920         * notif.h: Likewise.
6921
6922 2014-08-07  Gary Benson  <gbenson@redhat.com>
6923
6924         * server.h: Do not include gdb_locale.h.
6925
6926 2014-08-07  Gary Benson  <gbenson@redhat.com>
6927
6928         * server.h: Do not include gdb/signals.h.
6929         * win32-low.c: Likewise.
6930
6931 2014-08-07  Gary Benson  <gbenson@redhat.com>
6932
6933         * server.h: Do not include pathmax.h.
6934
6935 2014-08-07  Gary Benson  <gbenson@redhat.com>
6936
6937         * server.h: Do not include libiberty.h.
6938         * linux-bfin-low.c: Likewise.
6939
6940 2014-08-07  Gary Benson  <gbenson@redhat.com>
6941
6942         * server.h: Do not include ansidecl.h.
6943
6944 2014-08-07  Gary Benson  <gbenson@redhat.com>
6945
6946         * linux-x86-low.c: Do not include stddef.h.
6947         * lynx-ppc-low.c: Likewise.
6948         * tracepoint.c: Likewise.
6949
6950 2014-08-07  Gary Benson  <gbenson@redhat.com>
6951
6952         * server.h: Do not include stdarg.h.
6953         * nto-low.c: Likewise.
6954
6955 2014-08-07  Gary Benson  <gbenson@redhat.com>
6956
6957         * server.h: Do not include stdlib.h.
6958         * inferiors.c: Likewise.
6959         * linux-low.c: Likewise.
6960         * regcache.c: Likewise.
6961         * spu-low.c: Likewise.
6962         * tracepoint.c: Likewise.
6963         * utils.c: Likewise.
6964
6965 2014-08-07  Gary Benson  <gbenson@redhat.com>
6966
6967         * server.h: Do not include stdio.h.
6968         * linux-low.c: Likewise.
6969         * remote-utils.c: Likewise.
6970         * spu-low.c: Likewise.
6971         * utils.c: Likewise.
6972         * wincecompat.c: Likewise.
6973
6974 2014-08-06  Gary Benson  <gbenson@redhat.com>
6975
6976         * regcache.c (init_register_cache): Move conditionals inside if.
6977
6978 2014-08-06  Gary Benson  <gbenson@redhat.com>
6979
6980         * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
6981
6982 2014-07-31  Gary Benson  <gbenson@redhat.com>
6983
6984         * ax.h: Do not include server.h.
6985         * gdbthread.h: Likewise.
6986         * lynx-low.h: Likewise.
6987         * notif.h: Likewise.
6988
6989 2014-07-30  Gary Benson  <gbenson@redhat.com>
6990
6991         * server.h: Include common-defs.h.
6992         Do not include config.h or build-gnulib-gdbserver/config.h.
6993
6994 2014-07-30  Gary Benson  <gbenson@redhat.com>
6995
6996         * hostio-errno.c: Move server.h to top of includes list.
6997         * inferiors.c: Likewise.
6998         * linux-x86-low.c: Likewise.
6999         * notif.c: Include server.h.
7000
7001 2014-07-24  Tom Tromey  <tromey@redhat.com>
7002             Gary Benson  <gbenson@redhat.com>
7003
7004         * server.h (CORE_ADDR): Now unsigned.
7005
7006 2014-07-16  Pedro Alves  <palves@redhat.com>
7007
7008         * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7009
7010 2014-07-15  Pedro Alves  <palves@redhat.com>
7011
7012         * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7013         copy.
7014
7015 2014-07-11  Pedro Alves  <palves@redhat.com>
7016
7017         * linux-low.c (kill_wait_lwp): New function, based on
7018         kill_one_lwp_callback, but use my_waitpid directly.
7019         (kill_one_lwp_callback, linux_kill): Use it.
7020
7021 2014-06-23  Pedro Alves  <palves@redhat.com>
7022
7023         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7024         before setting DR0..DR3.
7025
7026 2014-06-20  Gary Benson  <gbenson@redhat.com>
7027
7028         * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7029         * configure: Regenerated.
7030         * config.in: Likewise.
7031
7032 2014-06-20  Gary Benson  <gbenson@redhat.com>
7033
7034         * Makefile.in (SFILES): Update locations for files moved
7035         from common to nat.
7036         (object file files): Reordered.
7037
7038 2014-06-20  Gary Benson  <gbenson@redhat.com>
7039
7040         * i386-low.h (i386_dr_low_can_set_addr): Removed.
7041         (i386_dr_low_set_addr): Likewise.
7042         (i386_dr_low_get_addr): Likewise.
7043         (i386_dr_low_can_set_control): Likewise.
7044         (i386_dr_low_set_control): Likewise.
7045         (i386_dr_low_get_control): Likewise.
7046         (i386_dr_low_get_status): Likewise.
7047         (i386_get_debug_register_length): Likewise.
7048         * linux-x86-low.c (i386_dr_low_set_addr):
7049         Changed signature.  Made static.
7050         (i386_dr_low_get_addr): Likewise.
7051         (i386_dr_low_set_control): Likewise.
7052         (i386_dr_low_get_control): Likewise.
7053         (i386_dr_low_get_status): Likewise.
7054         (i386_dr_low): New global variable.
7055         * win32-i386-low.c (i386_dr_low_set_addr):
7056         Changed signature.  Made static.
7057         (i386_dr_low_get_addr): Likewise.
7058         (i386_dr_low_set_control): Likewise.
7059         (i386_dr_low_get_control): Likewise.
7060         (i386_dr_low_get_status): Likewise.
7061         (i386_dr_low): New global variable.
7062
7063 2014-06-20  Marcus Shawcroft  <marcus.shawcroft@arm.com>
7064
7065         * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7066         * Makefile.in (AR, AR_FLAGS): Define.
7067         * configure: Regenerate.
7068
7069 2014-06-19  Gary Benson  <gbenson@redhat.com>
7070
7071         * Makefile.in (i386-dregs.o): New rule.
7072         * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7073         * i386-low.c (target.h): Remove include.
7074         (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7075         (DR_CONTROL_SHIFT): Likewise.
7076         (DR_CONTROL_SIZE): Likewise.
7077         (DR_RW_EXECUTE): Likewise.
7078         (DR_RW_WRITE): Likewise.
7079         (DR_RW_READ): Likewise.
7080         (DR_RW_IORW): Likewise.
7081         (DR_LEN_1): Likewise.
7082         (DR_LEN_2): Likewise.
7083         (DR_LEN_4): Likewise.
7084         (DR_LEN_8): Likewise.
7085         (DR_LOCAL_ENABLE_SHIFT): Likewise.
7086         (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7087         (DR_ENABLE_SIZE): Likewise.
7088         (DR_LOCAL_SLOWDOWN): Likewise.
7089         (DR_GLOBAL_SLOWDOWN): Likewise.
7090         (DR_CONTROL_RESERVED): Likewise.
7091         (I386_DR_CONTROL_MASK): Likewise.
7092         (I386_DR_VACANT): Likewise.
7093         (I386_DR_LOCAL_ENABLE): Likewise.
7094         (I386_DR_GLOBAL_ENABLE): Likewise.
7095         (I386_DR_DISABLE): Likewise.
7096         (I386_DR_SET_RW_LEN): Likewise.
7097         (I386_DR_GET_RW_LEN): Likewise.
7098         (I386_DR_WATCH_HIT): Likewise.
7099         (i386_wp_op_t): Likewise.
7100         (i386_show_dr): Likewise.
7101         (i386_length_and_rw_bits): Likewise.
7102         (i386_insert_aligned_watchpoint): Likewise.
7103         (i386_remove_aligned_watchpoint): Likewise.
7104         (i386_handle_nonaligned_watchpoint): Likewise.
7105         i386_update_inferior_debug_regs(): Likewise.
7106         (i386_dr_insert_watchpoint): Likewise.
7107         (i386_dr_remove_watchpoint): Likewise.
7108         (i386_dr_region_ok_for_watchpoint): Likewise.
7109         (i386_dr_stopped_data_address): Likewise.
7110         (i386_dr_stopped_by_watchpoint): Likewise.
7111
7112 2014-06-19  Gary Benson  <gbenson@redhat.com>
7113
7114         * i386-low.c (i386_dr_show): Renamed to
7115         i386_show_dr and made static.  All uses updated.
7116         (i386_dr_length_and_rw_bits): Renamed to
7117         i386_length_and_rw_bits and made static.
7118         All uses updated.
7119         (i386_dr_insert_aligned_watchpoint): Renamed to
7120         i386_insert_aligned_watchpoint and made static.
7121         All uses updated.
7122         (i386_dr_remove_aligned_watchpoint): Renamed to
7123         i386_remove_aligned_watchpoint and made static.
7124         All uses updated.
7125         (i386_dr_update_inferior_debug_regs): Renamed to
7126         i386_update_inferior_debug_regs and made static.
7127         All uses updated.
7128
7129 2014-06-18  Gary Benson  <gbenson@redhat.com>
7130
7131         * i386-low.h (i386_dr_low_can_set_addr): New macro.
7132         (i386_dr_low_can_set_control): Likewise.
7133         (i386_get_debug_register_length): Likewise.
7134         * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7135         (i386_dr_low_can_set_control): Likewise.
7136         (i386_get_debug_register_length): Likewise.
7137
7138 2014-06-17  Gary Benson  <gbenson@redhat.com>
7139
7140         * i386-low.h (i386-dregs.h): New include.
7141         (DR_FIRSTADDR): Now in i386-dregs.h.
7142         (DR_LASTADDR): Likewise.
7143         (DR_NADDR): Likewise.
7144         (DR_STATUS): Likewise.
7145         (DR_CONTROL): Likewise.
7146         (i386_debug_reg_state): Likewise.
7147         (i386_dr_insert_watchpoint): Likewise.
7148         (i386_dr_remove_watchpoint): Likewise.
7149         (i386_dr_region_ok_for_watchpoint): Likewise.
7150         (i386_dr_stopped_data_address): Likewise.
7151         (i386_dr_stopped_by_watchpoint): Likewise.
7152         * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7153
7154 2014-06-18  Gary Benson  <gbenson@redhat.com>
7155
7156         * i386-low.h (i386_low_insert_watchpoint): Renamed to
7157         i386_dr_insert_watchpoint.
7158         (i386_low_remove_watchpoint): Renamed to
7159         i386_dr_remove_watchpoint.
7160         (i386_low_region_ok_for_watchpoint): Renamed to
7161         i386_dr_region_ok_for_watchpoint.
7162         (i386_low_stopped_data_address): Renamed to
7163         i386_dr_stopped_data_address.
7164         (i386_low_stopped_by_watchpoint): Renamed to
7165         i386_dr_stopped_by_watchpoint.
7166         * i386-low.c (i386_show_dr): Renamed to
7167         i386_dr_show and made nonstatic.  All uses updated.
7168         (i386_length_and_rw_bits): Renamed to
7169         i386_dr_length_and_rw_bits and made nonstatic.
7170         All uses updated.
7171         (i386_insert_aligned_watchpoint): Renamed to
7172         i386_dr_insert_aligned_watchpoint and made nonstatic.
7173         All uses updated.
7174         (i386_remove_aligned_watchpoint): Renamed to
7175         i386_dr_remove_aligned_watchpoint and made nonstatic.
7176         All uses updated.
7177         (i386_update_inferior_debug_regs): Renamed to
7178         i386_dr_update_inferior_debug_regs and made nonstatic.
7179         All uses updated.
7180         (i386_low_insert_watchpoint): Renamed to
7181         i386_dr_insert_watchpoint.  All uses updated.
7182         (i386_low_remove_watchpoint): Renamed to
7183         i386_dr_remove_watchpoint.  All uses updated.
7184         (i386_low_region_ok_for_watchpoint): Renamed to
7185         i386_dr_region_ok_for_watchpoint.  All uses updated.
7186         (i386_low_stopped_data_address): Renamed to
7187         i386_dr_stopped_data_address.  All uses updated.
7188         (i386_low_stopped_by_watchpoint): Renamed to
7189         i386_dr_stopped_by_watchpoint.  All uses updated.
7190
7191 2014-06-18  Gary Benson  <gbenson@redhat.com>
7192
7193         * i386-low.c (i386_dr_low_can_set_addr): New macro.
7194         (i386_dr_low_can_set_control): Likewise.
7195         (i386_insert_aligned_watchpoint): New check.
7196
7197 2014-06-18  Gary Benson  <gbenson@redhat.com>
7198
7199         * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7200         Renamed to state.
7201
7202 2014-06-18  Gary Benson  <gbenson@redhat.com>
7203
7204         * i386-low.c (i386_length_and_rw_bits): Use internal_error
7205         instead of fatal and error.
7206         (i386_handle_nonaligned_watchpoint): Likewise.
7207
7208 2014-06-18  Gary Benson  <gbenson@redhat.com>
7209
7210         * i386-low.c (i386_get_debug_register_length): New macro.
7211         (TARGET_HAS_DR_LEN_8): Remove conditional.  Use above macro.
7212         (i386_show_dr): Use debug_printf instead of fprintf.  Use
7213         phex to format values.
7214
7215 2014-06-18  Gary Benson  <gbenson@redhat.com>
7216
7217         * i386-low.h: Comment changes.
7218         * i386-low.c: Likewise.
7219
7220 2014-06-18  Gary Benson  <gbenson@redhat.com>
7221
7222         * i386-low.c: Whitespace changes.
7223
7224 2014-06-12  Tom Tromey  <tromey@redhat.com>
7225
7226         * utils.c (freeargv): Remove.
7227
7228 2014-06-12  Tom Tromey  <tromey@redhat.com>
7229
7230         * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7231         * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7232         (parse_debug_format_options): Likewise.
7233         (gdbserver_usage): Likewise.
7234         * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7235         (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7236         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7237         against libiberty.
7238         ($(LIBGNU)): Depend on libiberty.
7239         (all-lib): Recurse into all subdirs.
7240         (install-only): Invoke "install" target in subdirs.
7241         (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7242         targets.
7243         * configure: Rebuild.
7244         * configure.ac: Add ACX_CONFIGURE_DIR for libiberty.  Don't check
7245         for vasprintf, vsnprintf, or gettimeofday.
7246         * configure.srv: Don't add safe-ctype.o or lbasename.o to
7247         srv_tgtobj.
7248
7249 2014-06-05  Joel Brobecker  <brobecker@adacore.com>
7250
7251         * development.sh: Delete.
7252         * Makefile.in (config.status): Adjust dependency on development.sh.
7253         * configure.ac: Adjust development.sh source call.
7254         * configure: Regenerate.
7255
7256 2014-06-02  Pedro Alves  <palves@redhat.com>
7257
7258         * ax.c (gdb_free_agent_expr): New function.
7259         * ax.h (gdb_free_agent_expr): New declaration.
7260         * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7261         list.
7262         (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7263         static.
7264         (clear_breakpoint_conditions_and_commands): New function.
7265         * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7266         (clear_breakpoint_conditions_and_commands): New declaration.
7267
7268 2014-05-23  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
7269
7270         * linux-aarch64-low.c (asm/ptrace.h): Include.
7271
7272 2014-05-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
7273
7274         Fix TLS access for -static -pthread.
7275         * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7276         (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7277         (thread_db_load_search, try_thread_db_load_1): Initialize it.
7278
7279 2014-05-20  Pedro Alves  <palves@redhat.com>
7280
7281         * linux-aarch64-low.c (aarch64_insert_point)
7282         (aarch64_remove_point): No longer check whether the type is
7283         supported here.  Adjust to new interface.
7284         (the_low_target): Install aarch64_supports_z_point_type as
7285         supports_z_point_type method.
7286         * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7287         (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7288         instead of a Z packet char.  Adjust.
7289         (arm_supports_z_point_type): New function.
7290         (arm_insert_point, arm_remove_point): Adjust to new interface.
7291         (the_low_target): Install arm_supports_z_point_type.
7292         * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7293         (cris_insert_point, cris_remove_point): Adjust to new interface.
7294         Don't check whether the type is supported here.
7295         (the_low_target): Install cris_supports_z_point_type.
7296         * linux-low.c (linux_supports_z_point_type): New function.
7297         (linux_insert_point, linux_remove_point): Adjust to new interface.
7298         * linux-low.h (struct linux_target_ops) <insert_point,
7299         remove_point>: Take an enum raw_bkpt_type instead of a char.  Add
7300         raw_breakpoint pointer parameter.
7301         <supports_z_point_type>: New method.
7302         * linux-mips-low.c (mips_supports_z_point_type): New function.
7303         (mips_insert_point, mips_remove_point): Adjust to new interface.
7304         Use mips_supports_z_point_type.
7305         (the_low_target): Install mips_supports_z_point_type.
7306         * linux-ppc-low.c (the_low_target): Install NULL as
7307         supports_z_point_type method.
7308         * linux-s390-low.c (the_low_target): Install NULL as
7309         supports_z_point_type method.
7310         * linux-sparc-low.c (the_low_target): Install NULL as
7311         supports_z_point_type method.
7312         * linux-x86-low.c (x86_supports_z_point_type): New function.
7313         (x86_insert_point): Adjust to new insert_point interface.  Use
7314         insert_memory_breakpoint.  Adjust to new
7315         i386_low_insert_watchpoint interface.
7316         (x86_remove_point): Adjust to remove_point interface.  Use
7317         remove_memory_breakpoint.  Adjust to new
7318         i386_low_remove_watchpoint interface.
7319         (the_low_target): Install x86_supports_z_point_type.
7320         * lynx-low.c (lynx_target_ops): Install NULL as
7321         supports_z_point_type callback.
7322         * nto-low.c (nto_supports_z_point_type): New.
7323         (nto_insert_point, nto_remove_point): Adjust to new interface.
7324         (nto_target_ops): Install nto_supports_z_point_type.
7325         * mem-break.c: Adjust intro comment.
7326         (struct raw_breakpoint) <raw_type, size>: New fields.
7327         <inserted>: Update comment.
7328         <shlib_disabled>: Delete field.
7329         (enum bkpt_type) <gdb_breakpoint>: Delete value.
7330         <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7331         gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7332         (raw_bkpt_type_to_target_hw_bp_type): New function.
7333         (find_enabled_raw_code_breakpoint_at): New function.
7334         (find_raw_breakpoint_at): New type and size parameters.  Use them.
7335         (insert_memory_breakpoint): New function, based off
7336         set_raw_breakpoint_at.
7337         (remove_memory_breakpoint): New function.
7338         (set_raw_breakpoint_at): Reimplement.
7339         (set_breakpoint): New, based on set_breakpoint_at.
7340         (set_breakpoint_at): Reimplement.
7341         (delete_raw_breakpoint): Go through the_target->remove_point
7342         instead of assuming memory breakpoints.
7343         (find_gdb_breakpoint_at): Delete.
7344         (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7345         (find_gdb_breakpoint): New function.
7346         (set_gdb_breakpoint_at): Delete.
7347         (z_type_supported): New function.
7348         (set_gdb_breakpoint_1): New function, loosely based off
7349         set_gdb_breakpoint_at.
7350         (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7351         (delete_gdb_breakpoint_at): Delete.
7352         (delete_gdb_breakpoint_1): New function, loosely based off
7353         delete_gdb_breakpoint_at.
7354         (delete_gdb_breakpoint): New function.
7355         (clear_gdb_breakpoint_conditions): Rename to ...
7356         (clear_breakpoint_conditions): ... this.  Don't handle a NULL
7357         breakpoint.
7358         (add_condition_to_breakpoint): Make static.
7359         (add_breakpoint_condition): Take a struct breakpoint pointer
7360         instead of an address.  Adjust.
7361         (gdb_condition_true_at_breakpoint): Rename to ...
7362         (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7363         z_type parameter.
7364         (gdb_condition_true_at_breakpoint): Reimplement.
7365         (add_breakpoint_commands): Take a struct breakpoint pointer
7366         instead of an address.  Adjust.
7367         (gdb_no_commands_at_breakpoint): Rename to ...
7368         (gdb_no_commands_at_breakpoint_z_type): ... this.  Add z_type
7369         parameter.  Return true if no breakpoint was found.  Change debug
7370         output.
7371         (gdb_no_commands_at_breakpoint): Reimplement.
7372         (run_breakpoint_commands): Rename to ...
7373         (run_breakpoint_commands_z_type): ... this.  Add z_type parameter,
7374         and change return type to boolean.
7375         (run_breakpoint_commands): New function.
7376         (gdb_breakpoint_here): Also check for Z1 breakpoints.
7377         (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7378         breakpoint.  Go through the_target->remove_point instead of
7379         assuming memory breakpoint.
7380         (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7381         software and hardware breakpoints.
7382         (reinsert_raw_breakpoint): Go through the_target->insert_point
7383         instead of assuming memory breakpoint.
7384         (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7385         software and hardware breakpoints.
7386         (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7387         Check both software and hardware breakpoints.
7388         (validate_inserted_breakpoint): Assert the breakpoint is a
7389         software breakpoint.  Set the inserted flag to -1 instead of
7390         setting shlib_disabled.
7391         (delete_disabled_breakpoints): Adjust.
7392         (validate_breakpoints): Only validate software breakpoints.
7393         Adjust to inserted flag change.
7394         (check_mem_read, check_mem_write): Skip breakpoint types other
7395         than software breakpoints.  Adjust to inserted flag change.
7396         * mem-break.h (enum raw_bkpt_type): New enum.
7397         (raw_breakpoint, struct process_info): Forward declare.
7398         (Z_packet_to_target_hw_bp_type): Delete declaration.
7399         (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7400         (set_gdb_breakpoint, delete_gdb_breakpoint)
7401         (clear_breakpoint_conditions): New declarations.
7402         (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7403         (breakpoint_inserted_here): Update comment.
7404         (add_breakpoint_condition, add_breakpoint_commands): Replace
7405         address parameter with a breakpoint pointer parameter.
7406         (gdb_breakpoint_here): Update comment.
7407         (delete_gdb_breakpoint_at): Delete.
7408         (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7409         * server.c (process_point_options): Take a struct breakpoint
7410         pointer instead of an address.  Adjust.
7411         (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7412         delete_gdb_breakpoint.
7413         * spu-low.c (spu_target_ops): Install NULL as
7414         supports_z_point_type method.
7415         * target.h: Include mem-break.h.
7416         (struct target_ops) <prepare_to_access_memory>: Update comment.
7417         <supports_z_point_type>: New field.
7418         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7419         instead of a char.  Also take a raw breakpoint pointer.
7420         * win32-arm-low.c (the_low_target): Install NULL as
7421         supports_z_point_type.
7422         * win32-i386-low.c (i386_supports_z_point_type): New function.
7423         (i386_insert_point, i386_remove_point): Adjust to new interface.
7424         (the_low_target): Install i386_supports_z_point_type.
7425         * win32-low.c (win32_supports_z_point_type): New function.
7426         (win32_insert_point, win32_remove_point): Adjust to new interface.
7427         (win32_target_ops): Install win32_supports_z_point_type.
7428         * win32-low.h (struct win32_target_ops):
7429         <supports_z_point_type>: New method.
7430         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7431         instead of a char.  Also take a raw breakpoint pointer.
7432
7433 2014-05-20  Pedro Alves  <palves@redhat.com>
7434
7435         * mem-break.h: Include break-common.h.
7436         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7437         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7438         (Z_packet_to_target_hw_bp_type): New declaration.
7439         * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7440         * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7441         (Z_PACKET_ACCESS_WP): Delete macros.
7442         (Z_packet_to_hw_type): Delete function.
7443         * i386-low.h: Don't include break-common.h here.
7444         (Z_packet_to_hw_type): Delete declaration.
7445         * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7446         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7447         * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7448         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7449         * linux-aarch64-low.c: Don't include break-common.h here.
7450         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7451         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7452         (Z_packet_to_target_hw_bp_type): Delete function.
7453         * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7454         function.
7455         (mips_insert_point, mips_remove_point): Use
7456         Z_packet_to_target_hw_bp_type.
7457
7458 2014-05-20  Pedro Alves  <palves@redhat.com>
7459
7460         * linux-aarch64-low.c: Include break-common.h.
7461         (enum target_point_type): Delete.
7462         (Z_packet_to_point_type): Rename to ...
7463         (Z_packet_to_target_hw_bp_type): ... this, and return a
7464         target_hw_bp_type instead.
7465         (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7466         instead of an enum target_point_type.
7467         (aarch64_point_encode_ctrl_reg): Likewise.  Compute type mask from
7468         breakpoint type.
7469         (aarch64_dr_state_insert_one_point)
7470         (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7471         (aarch64_handle_aligned_watchpoint)
7472         (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7473         Take an enum target_hw_bp_type instead of an enum
7474         target_point_type.
7475         (aarch64_supports_z_point_type): New function.
7476         (aarch64_insert_point, aarch64_remove_point): Use it.  Adjust to
7477         use Z_packet_to_target_hw_bp_type.
7478
7479 2014-05-20  Joel Brobecker  <brobecker@adacore.com>
7480
7481         * configure.ac: Only use -Werror by default when DEVELOPMENT
7482         is true.
7483         * configure: Regenerate.
7484
7485 2014-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
7486
7487         Fix gdbserver qGetTLSAddr for x86_64 -m32.
7488         * linux-x86-low.c (X86_64_USER_REGS): New.
7489         (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7490
7491 2014-04-28  Yao Qi  <yao@codesourcery.com>
7492
7493         * Makefile.in (i386-avx512.c): Fix the typo of generated file
7494         name.
7495
7496 2014-04-25  Pedro Alves  <palves@redhat.com>
7497
7498         PR server/16255
7499         * linux-low.c (linux_attach_fail_reason_string): New function.
7500         (linux_attach_lwp): Delete.
7501         (linux_attach_lwp_1): Rename to ...
7502         (linux_attach_lwp): ... this.  Take a ptid instead of a pid as
7503         argument.  Remove "initial" parameter.  Return int instead of
7504         void.  Don't error or warn here.
7505         (linux_attach): Adjust to call linux_attach_lwp.  Call error on
7506         failure to attach to the tgid.  Call warning when failing to
7507         attach to an lwp.
7508         * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7509         argument.  Remove "initial" parameter.  Return int instead of
7510         void.  Don't error or warn here.
7511         (linux_attach_fail_reason_string): New declaration.
7512         * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7513         interface change.  Use linux_attach_fail_reason_string.
7514
7515 2014-04-24  Michael Sturm  <michael.sturm@mintel.com>
7516             Walfred Tedeschi  <walfred.tedeschi@intel.com>
7517
7518         * Makefile.in: Added rules to handle new files
7519         i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7520         amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7521         * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7522         (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7523         (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7524         (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7525         x32-avx512-linux.o.
7526         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7527         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7528         (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7529         i386/x32-avx512.xml.
7530         (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7531         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7532         i386/x32-avx512-linux.xml.
7533         * i387-fp.c (num_avx512_k_registers): New constant for number
7534         of K registers.
7535         (num_avx512_zmmh_low_registers): New constant for number of
7536         lower ZMM registers (0-15).
7537         (num_avx512_zmmh_high_registers): New constant for number of
7538         higher ZMM registers (16-31).
7539         (num_avx512_ymmh_registers): New contant for number of higher
7540         YMM registers (ymm16-31 added by avx521 on x86_64).
7541         (num_avx512_xmm_registers): New constant for number of higher
7542         XMM registers (xmm16-31 added by AVX512 on x86_64).
7543         (struct i387_xsave): Add space for AVX512 registers.
7544         (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7545         Add code to handle AVX512 registers.
7546         (i387_xsave_to_cache): Add code to handle AVX512 registers.
7547         * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7548         prototypei from generated file.
7549         (tdesc_amd64_avx512_linux): Likewise.
7550         (init_registers_x32_avx512_linux): Likewise.
7551         (tdesc_x32_avx512_linux): Likewise.
7552         (init_registers_i386_avx512_linux): Likewise.
7553         (tdesc_i386_avx512_linux): Likewise.
7554         (x86_64_regmap): Add AVX512 registers.
7555         (x86_linux_read_description): Add code to handle AVX512 XSTATE
7556         mask.
7557         (initialize_low_arch): Add code to initialize AVX512 registers.
7558
7559 2014-04-23  Pedro Alves  <palves@redhat.com>
7560
7561         * mem-break.c (find_gdb_breakpoint_at): Make static.
7562         * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7563
7564 2014-04-23  Pedro Alves  <palves@redhat.com>
7565
7566         * i386-low.c: Don't include break-common.h here.
7567         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7568         prototype to take target_hw_bp_type as argument instead of a Z
7569         packet char.
7570         * i386-low.h: Include break-common.h here.
7571         (Z_packet_to_hw_type): Declare.
7572         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7573         prototypes.
7574         * linux-x86-low.c (x86_insert_point): Convert the packet number to
7575         a target_hw_bp_type before calling i386_low_insert_watchpoint.
7576         (x86_remove_point): Convert the packet number to a
7577         target_hw_bp_type before calling i386_low_remove_watchpoint.
7578         * win32-i386-low.c (i386_insert_point): Convert the packet number
7579         to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7580         (i386_remove_point): Convert the packet number to a
7581         target_hw_bp_type before calling i386_low_remove_watchpoint.
7582
7583 2014-04-23  Pedro Alves  <palves@redhat.com>
7584
7585         * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7586
7587 2014-04-10  Pedro Alves  <palves@redhat.com>
7588
7589         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7590         Check if the condition or command is NULL before checking if the
7591         breakpoint is known.  On success, return true.
7592         * mem-break.h (add_breakpoint_condition): Document return.
7593         (add_breakpoint_commands): Add describing comment.
7594         * server.c (skip_to_semicolon): New function.
7595         (process_point_options): Use it.
7596
7597 2014-04-09  Pedro Alves  <palves@redhat.com>
7598
7599         * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7600         to lwpid_of.
7601
7602 2014-02-27  Pedro Alves  <palves@redhat.com>
7603
7604         PR 12702
7605         * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7606         macros.
7607         * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7608         output.
7609         (last_thread_of_process_p): Take a PID argument instead of a
7610         thread pointer.
7611         (linux_wait_for_lwp): Delete.
7612         (num_lwps, check_zombie_leaders, not_stopped_callback): New
7613         functions.
7614         (linux_low_filter_event): New function, party factored out from
7615         linux_wait_for_event.
7616         (linux_wait_for_event): Rename to ...
7617         (linux_wait_for_event_filtered): ... this.  Add new filter ptid
7618         argument.  Partly rewrite.  Always use waitpid(-1, WNOHANG) and
7619         sigsuspend.  Check for zombie leaders.
7620         (linux_wait_for_event): Reimplement as wrapper around
7621         linux_wait_for_event_filtered.
7622         (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED.  Assume that if
7623         a normal or signal exit is seen, it's the whole process exiting.
7624         (wait_for_sigstop): No longer a for_each_inferior callback.
7625         Rewrite on top of linux_wait_for_event_filtered.
7626         (stop_all_lwps): Call wait_for_sigstop directly.
7627         * server.c (resume, handle_target_event): Handle
7628         TARGET_WAITKIND_NO_RESUMED.
7629
7630 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
7631
7632         * win32-low.c (psapi_get_dll_name,
7633         * win32_CreateToolhelp32Snapshot): Delete.
7634         (win32_CreateToolhelp32Snapshot, win32_Module32First)
7635         (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7636         Delete.
7637         (handle_load_dll): Add function description.
7638         Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7639
7640 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
7641
7642         * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7643         Add comment.
7644         (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7645         base address when calling win32_add_one_solib.
7646         (handle_load_dll): Delete local variable load_addr.
7647         Remove 0x1000 offset applied to DLL base address when calling
7648         win32_add_one_solib.
7649         (handle_unload_dll): Add comment.
7650
7651 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
7652
7653         * win32-low.c (win32_add_all_dlls): Renames
7654         win32_ensure_ntdll_loaded.  Rewrite function documentation.
7655         Adjust implementation to always load all DLLs.
7656         Add 0x1000 offset to DLL base address when calling
7657         win32_add_one_solib.
7658         (child_initialization_done): New static global.
7659         (do_initial_child_stuff): Set child_initialization_done to
7660         zero during child initialization, and 1 after.  Replace call
7661         to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7662         Add comment.
7663         (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7664         (handle_unload_dll): Add function documentation.
7665         (get_child_debug_event): Ignore load and unload DLL events
7666         during child initialization.
7667
7668 2014-02-20  Doug Evans  <dje@google.com>
7669
7670         Remove global all_lwps.
7671         * inferiors.h (ptid_of): Move here from linux-low.h.
7672         (pid_of, lwpid_of): Ditto.
7673         * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7674         parameter is a struct thread_info * now.
7675         (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7676         directly.  Pass &all_threads to find_inferior instead of &all_lwps.
7677         (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7678         directly.
7679         (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7680         (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7681         * linux-arm-low.c (update_registers_callback): Update, "entry"
7682         parameter is a struct thread_info * now.
7683         Fetch lwpid from current_inferior directly.
7684         (arm_insert_point): Pass &all_threads to find_inferior instead of
7685         &all_lwps.
7686         (arm_remove_point): Ditto.
7687         (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7688         (arm_prepare_to_resume): Fetch pid from thread.
7689         (arm_read_description): Fetch lwpid from current_inferior directly.
7690         * linux-low.c (all_lwps): Delete.
7691         (delete_lwp): Delete call to remove_inferior.
7692         (handle_extended_wait): Fetch lwpid from thread.
7693         (add_lwp): Don't set lwp->entry.id.  Remove call to
7694         add_inferior_to_list.
7695         (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7696         (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7697         (kill_one_lwp_callback): Ditto.
7698         (linux_kill): Don't dereference NULL pointer.
7699         Fetch ptid,lwpid from thread.
7700         (get_detach_signal): Fetch ptid from thread.
7701         (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7702         Simplify call to regcache_invalidate_thread.
7703         (delete_lwp_callback): Update, "entry" parameter is a
7704         struct thread_info * now.  Fetch pid from thread.
7705         (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7706         (status_pending_p_callback): Update, "entry" parameter is a
7707         struct thread_info * now.  Fetch ptid from thread.
7708         (find_lwp_pid): Update, "entry" parameter is a
7709         struct thread_info * now.
7710         (linux_wait_for_lwp): Fetch pid from thread.
7711         (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7712         (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7713         (enqueue_one_deferred_signal): Fetch lwpid from thread.
7714         (dequeue_one_deferred_signal): Ditto.
7715         (cancel_breakpoint): Fetch ptid from current_inferior.
7716         (linux_wait_for_event): Pass &all_threads to find_inferior,
7717         not &all_lwps.  Fetch ptid, lwpid from thread.
7718         (count_events_callback): Update, "entry" parameter is a
7719         struct thread_info * now.
7720         (select_singlestep_lwp_callback): Ditto.
7721         (select_event_lwp_callback): Ditto.
7722         (cancel_breakpoints_callback): Ditto.
7723         (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7724         not &all_lwps.
7725         (select_event_lwp): Ditto.  Fetch ptid from event_thread.
7726         (unsuspend_one_lwp): Update, "entry" parameter is a
7727         struct thread_info * now.
7728         (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7729         not &all_lwps.
7730         (linux_stabilize_threads): Ditto.  And for for_each_inferior.
7731         Fetch lwpid from thread, not lwp.
7732         (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7733         Pass &all_threads to find_inferior, not &all_lwps.
7734         (send_sigstop): Fetch lwpid from thread, not lwp.
7735         (send_sigstop_callback): Update, "entry" parameter is a
7736         struct thread_info * now.
7737         (suspend_and_send_sigstop_callback): Ditto.
7738         (wait_for_sigstop): Ditto.  Fetch ptid, lwpid from thread, lwp.
7739         (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7740         struct thread_info * now.
7741         (move_out_of_jump_pad_callback): Ditto.  Fetch ptid, lwpid
7742         from thread, lwp.
7743         (lwp_running): Update, "entry" parameter is a
7744         struct thread_info * now.
7745         (stop_all_lwps): Fetch ptid from thread.
7746         Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7747         (linux_resume_one_lwp): Fetch lwpid from thread.
7748         (linux_set_resume_request): Update, "entry" parameter is a
7749         struct thread_info * now.  Fetch pid, lwpid from thread.
7750         (resume_status_pending_p): Update, "entry" parameter is a
7751         struct thread_info * now.
7752         (need_step_over_p): Ditto.  Fetch lwpid from thread.
7753         (start_step_over): Fetch lwpid from thread.
7754         (linux_resume_one_thread): Update, "entry" parameter is a
7755         struct thread_info * now.  Fetch lwpid from thread.
7756         (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7757         (proceed_one_lwp): Update, "entry" parameter is a
7758         struct thread_info * now.  Fetch lwpid from thread.
7759         (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7760         struct thread_info * now.
7761         (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7762         (unstop_all_lwps): Ditto.  Fetch lwpid from thread.
7763         (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7764         directly.
7765         (regsets_store_inferior_registers): Ditto.
7766         (fetch_register, store_register): Ditto.
7767         (linux_read_memory, linux_write_memory): Ditto.
7768         (linux_request_interrupt): Ditto.
7769         (linux_read_auxv): Ditto.
7770         (linux_xfer_siginfo): Ditto.
7771         (linux_qxfer_spu): Ditto.
7772         (linux_qxfer_libraries_svr4): Ditto.
7773         * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7774         moved to inferiors.h.
7775         (get_lwp): Delete.
7776         (get_thread_lwp): Update.
7777         (struct lwp_info): Delete member "entry".  Simplify comment for
7778         member "thread".
7779         (all_lwps): Delete.
7780         * linux-mips-low.c (mips_read_description): Fetch lwpid from
7781         current_inferior directly.
7782         (update_watch_registers_callback): Update, "entry" parameter is a
7783         struct thread_info * now.  Fetch pid from thread.
7784         (mips_linux_prepare_to_resume): Fetch ptid from thread.
7785         (mips_insert_point): Fetch lwpid from current_inferior.
7786         Pass &all_threads to find_inferior, not &all_lwps.
7787         (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7788         (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7789         directly.
7790         (mips_stopped_data_address): Ditto.
7791         * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7792         directly.
7793         * linux-tile-low.c (tile_arch_setup): Ditto.
7794         * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7795         (update_debug_registers_callback): Update, "entry" parameter is a
7796         struct thread_info * now.  Fetch pid from thread.
7797         (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7798         Pass &all_threads to find_inferior, not &all_lwps.
7799         (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7800         (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7801         Pass &all_threads to find_inferior, not &all_lwps.
7802         (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7803         (i386_dr_low_get_status): Ditto.
7804         (x86_linux_prepare_to_resume): Fetch ptid from thread.
7805         (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7806         (x86_linux_read_description): Ditto.
7807         * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7808
7809 2014-02-20  Doug Evans  <dje@google.com>
7810
7811         * inferiors.c (get_first_inferior): Fix buglet.
7812
7813 2014-02-19  Doug Evans  <dje@google.com>
7814
7815         * gdbthread.h (add_thread): Change result type to struct thread_info *.
7816         * inferiors.c (add_thread): Change result type to struct thread_info *.
7817         All callers updated.
7818         (add_lwp): Call add_thread here instead of in callers.
7819         All callers updated.
7820         * linux-low.h (get_lwp_thread): Rewrite.
7821         (struct lwp_info): New member "thread".
7822
7823 2014-02-19  Doug Evans  <dje@google.com>
7824
7825         * linux-low.c (add_lwp): Change result to struct lwp_info *.
7826         All callers updated.
7827
7828 2014-02-19  Doug Evans  <dje@google.com>
7829
7830         * inferiors.c (add_thread): Fix whitespace.
7831
7832 2014-02-19  Doug Evans  <dje@google.com>
7833
7834         * dll.c (clear_dlls): Replace accessing list implemention details
7835         with API function.
7836         * gdbthread.h (get_first_thread): Declare.
7837         * inferiors.c (for_each_inferior_with_data): New function.
7838         (get_first_thread): New function.
7839         (find_thread_ptid): Simplify.
7840         (get_first_inferior): New function.
7841         (clear_list): Delete.
7842         (one_inferior_p): New function.
7843         (clear_inferior_list): New function.
7844         (clear_inferiors): Update.
7845         * inferiors.h (for_each_inferior_with_data): Declare.
7846         (clear_inferior_list): Declare.
7847         (one_inferior_p): Declare.
7848         (get_first_inferior): Declare.
7849         * linux-low.c (linux_wait_for_event): Replace accessing list
7850         implemention details with API function.
7851         * server.c (target_running): Ditto.
7852         (accumulate_file_name_length): New function.
7853         (emit_dll_description): New function.
7854         (handle_qxfer_libraries): Replace accessing list implemention
7855         details with API function.
7856         (handle_qxfer_threads_worker): New function.
7857         (handle_qxfer_threads_proper): Replace accessing list implemention
7858         details with API function.
7859         (handle_query): Ditto.
7860         (visit_actioned_threads_callback_ftype): New typedef.
7861         (visit_actioned_threads_data): New struct.
7862         (visit_actioned_threads): Rewrite to be find_inferior callback.
7863         (resume): Call find_inferior.
7864         (handle_status): Replace accessing list implemention
7865         details with API function.
7866         (process_serial_event): Replace accessing list implemention details
7867         with API function.
7868         * target.c (set_desired_inferior): Replace accessing list implemention
7869         details with API function.
7870         * tracepoint.c (same_process_p): New function.
7871         (gdb_agent_about_to_close): Replace accessing list implemention
7872         details with API function.
7873         * win32-low.c (child_delete_thread): Replace accessing list
7874         implemention details with API function.
7875         (match_dll_by_basename): New function.
7876         (dll_is_loaded_by_basename): New function.
7877         (win32_ensure_ntdll_loaded): Replace accessing list implemention
7878         details call to dll_is_loaded_by_basename.
7879
7880 2014-02-19  Doug Evans  <dje@google.com>
7881
7882         * dll.h (struct dll_info): Add comment.
7883         * gdbthread.h (struct thread_info): Add comment.
7884         (current_ptid): Simplify.
7885         * inferiors.c (add_process): Update.
7886         (remove_process): Update.
7887         * inferiors.h (struct process_info): Rename member "head" to "entry".
7888         * linux-low.c (delete_lwp): Update.
7889         (add_lwp): Update.
7890         (last_thread_of_process_p): Update.
7891         (kill_one_lwp_callback, linux_kill): Update.
7892         (status_pending_p_callback): Update.
7893         (wait_for_sigstop): Update.  Simplify read of ptid.
7894         (start_step_over): Update.
7895         * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
7896         (get_lwp_thread): Update.
7897         (struct lwp_info): Rename member "head" to "entry".
7898         * regcache.h (inferior_list_entry): Delete.
7899         * server.c (kill_inferior_callback): Update.
7900         (detach_or_kill_inferior_callback): Update.
7901         (print_started_pid): Update.
7902         (print_attached_pid): Update.
7903         (process_serial_event): Simplify read of ptid.
7904         * thread-db.c (thread_db_create_event): Update.
7905         (thread_db_get_tls_address): Update.
7906         * win32-low.c (current_inferior_ptid): Simplify.
7907
7908 2014-02-19  Tom Tromey  <tromey@redhat.com>
7909
7910         * target.h (struct target_ops) <supports_btrace>: Add target_ops
7911         argument.
7912         (target_supports_btrace): Update.
7913
7914 2014-02-14  Yao Qi  <yao@codesourcery.com>
7915
7916         * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
7917         (rsp-low-ipa.o): New target.
7918
7919 2014-02-12  Tom Tromey  <tromey@redhat.com>
7920
7921         * ax.c (gdb_parse_agent_expr): Use hex2bin, not
7922         convert_ascii_to_int.
7923         * regcache.c (registers_to_string): Likewise.
7924         * remote-utils.c (decode_M_packet): Likewise.
7925         * server.c (process_serial_event): Likewise.
7926
7927 2014-02-12  Tom Tromey  <tromey@redhat.com>
7928
7929         * server.c (handle_query, handle_v_run): Use hex2bin, not
7930         unhexify.
7931         * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
7932
7933 2014-02-12  Tom Tromey  <tromey@redhat.com>
7934
7935         * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
7936         convert_int_to_ascii.
7937         * regcache.c (registers_to_string, collect_register_as_string):
7938         Likewise.
7939         * remote-utils.c (look_up_one_symbol, relocate_instruction):
7940         Likewise.
7941         * server.c (process_serial_event): Likewise.
7942         * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
7943         (cmd_qtbuffer, cstr_to_hexstr): Likewise.
7944
7945 2014-02-12  Tom Tromey  <tromey@redhat.com>
7946
7947         * remote-utils.c (look_up_one_symbol, monitor_output): Use
7948         bin2hex, not hexify.
7949         * tracepoint.c (cmd_qtstatus): Likewise.
7950
7951 2014-02-12  Tom Tromey  <tromey@redhat.com>
7952
7953         * remote-utils.c (monitor_output): Pass explicit length to
7954         hexify.
7955
7956 2014-02-12  Tom Tromey  <tromey@redhat.com>
7957
7958         * tracepoint.c: Include rsp-low.h.
7959         * server.c: Include rsp-low.h.
7960         * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
7961         (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
7962         declare.
7963         * remote-utils.c: Include rsp-low.h.
7964         (fromhex, hexchars, ishex, unhexify, tohex, hexify)
7965         (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
7966         (convert_int_to_ascii, convert_ascii_to_int): Move to
7967         common/rsp-low.c.
7968         * regcache.c: Include rsp-low.h.
7969         * ax.c: Include rsp-low.h.
7970         * Makefile.in (SFILES): Add common/rsp-low.c.
7971         (OBS): Add rsp-low.o.
7972         (rsp-low.o): New target.
7973
7974 2014-02-12  Tom Tromey  <tromey@redhat.com>
7975
7976         * utils.h (pulongest, plongest, phex_nz): Don't declare.
7977         Include print-utils.h.
7978         * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
7979         (plongest, thirty_two, phex_nz): Remove.
7980         * Makefile.in (SFILES): Add common/print-utils.c.
7981         (OBS): Add print-utils.o.
7982         (print-utils-ipa.o): New target.
7983         (print-utils.o): New target.
7984         (IPA_OBJS): Add print-utils-ipa.o.
7985
7986 2014-02-06  Tom Tromey  <tromey@redhat.com>
7987
7988         * Makefile.in (SFILES): Fix indentation.
7989
7990 2014-02-05  Doug Evans  <dje@google.com>
7991
7992         * linux-low.c (linux_wait_for_event): Improve comment.
7993         (linux_wait_1): Keep current_inferior in sync with event_child.
7994
7995 2014-01-22  Doug Evans  <dje@google.com>
7996
7997         * gdbthread.h (gdb_id_to_thread): Delete, unused.
7998
7999 2014-01-22  Doug Evans  <dje@google.com>
8000
8001         * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8002         * configure: Regenerate.
8003         * config.in: Regenerate.
8004         * Makefile.in (SFILES): Add debug.c.
8005         (OBS): Add debug.o.
8006         * debug.c: New file.
8007         * debug.h: New file.
8008         * linux-aarch64-low.c (*): Update all debugging printfs to use
8009         debug_printf instead of fprintf.
8010         * linux-arm-low.c (*): Ditto.
8011         * linux-cris-low.c (*): Ditto.
8012         * linux-crisv32-low.c (*): Ditto.
8013         * linux-m32r-low.c (*): Ditto.
8014         * linux-sparc-low.c (*): Ditto.
8015         * linux-x86.c (*): Ditto.
8016         * linux-low.c (*): Ditto.
8017         (linux_wait_1): Add calls to debug_enter, debug_exit.
8018         (linux_wait): Remove redundant debugging printf.
8019         (stop_all_lwps): Add calls to debug_enter, debug_exit.
8020         (linux_resume, unstop_all_lwps): Ditto.
8021         * mem-break.c (*): Update all debugging printfs to use
8022         debug_printf instead of fprintf.
8023         * remote-utils.c (*): Ditto.
8024         * thread-db.c (*): Ditto.
8025         * server.c #include <ctype.h>, "gdb_vecs.h".
8026         (debug_threads): Moved to debug.c.
8027         (*): Update all debugging printfs to use debug_printf instead of
8028         fprintf.
8029         (start_inferior): Replace call to fflush with call to debug_flush.
8030         (monitor_show_help): Mention set debug-format.
8031         (parse_debug_format_options): New function.
8032         (handle_monitor_command): Handle "monitor set debug-format".
8033         (gdbserver_usage): Mention --debug-format.
8034         (main): Parse --debug-format.
8035         * server.h (debug_threads): Declaration moved to debug.h.
8036         #include "debug.h".
8037         * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8038         trace_debug_1 that uses debug_printf.
8039         (tracepoint_look_up_symbols): Update all debugging printfs to use
8040         debug_printf instead of fprintf.
8041
8042 2014-01-20  Baruch Siach  <baruch@tkos.co.il>
8043
8044         * linux-xtensa-low.c: Include asm/ptrace.h instead of
8045         sys/ptrace.h.
8046
8047 2014-01-17  Pedro Alves  <palves@redhat.com>
8048
8049         PR build/16445
8050         * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8051         defined after including gdb_proc_service.h.
8052
8053 2014-01-16  Doug Evans  <dje@google.com>
8054
8055         * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8056         (match_dll): Use it.
8057
8058 2014-01-16  Markus Metzger  <markus.t.metzger@intel.com>
8059
8060         * target.h (target_ops) <read_btrace>: Change parameters and
8061         return type to allow error reporting.
8062         * server.c (handle_qxfer_btrace): Support delta reads.  Pass
8063         trace reading errors on.
8064         * linux-low.c (linux_low_read_btrace): Pass trace reading
8065         errors on.
8066         (linux_low_disable_btrace): New.
8067
8068 2014-01-15  Doug Evans  <dje@google.com>
8069
8070         * inferiors.c (thread_id_to_gdb_id): Delete.
8071         * inferiors.h (thread_id_to_gdb_id): Delete.
8072
8073 2014-01-13  Eli Zaretskii  <eliz@gnu.org>
8074
8075         * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8076         "-I$(srcdir)/../".  Fixes MinGW compilation errors with old GCC
8077         versions.
8078
8079 2014-01-08  Pedro Alves  <palves@redhat.com>
8080
8081         * server.c (handle_status): Don't discard previous queued stop
8082         replies or thread's pending status here.
8083         (main) <disconnection>: Do it here instead.
8084
8085 2014-01-08  Pedro Alves  <palves@redhat.com>
8086
8087         * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8088         * server.c (visit_actioned_threads, handle_pending_status): New
8089         function.
8090         (handle_v_cont): Factor out parts to ...
8091         (resume): ... this new function.  If in all-stop, and a thread
8092         being resumed has a pending status, report it without actually
8093         resuming.
8094         (myresume): Adjust to use the new 'resume' function.
8095         (clear_pending_status_callback, set_pending_status_callback)
8096         (find_status_pending_thread_callback): New functions.
8097         (handle_status): Handle the case of multiple threads having
8098         interesting statuses to report.  Report threads' real last signal
8099         instead of always reporting GDB_SIGNAL_TRAP.  Look for a thread
8100         with an interesting thread to report the status for, instead of
8101         always reporting the status of the first thread.
8102
8103 2014-01-01  Joel Brobecker  <brobecker@adacore.com>
8104
8105         * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8106         * gdbreplay.c (gdbreplay_version): Likewise.
8107
8108 2013-12-18  Yufeng Zhang  <yufeng.zhang@arm.com>
8109
8110         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8111         iov.iov_len with the real length in use.
8112
8113 2013-12-13  Joel Brobecker  <brobecker@adacore.com>
8114
8115         * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8116         * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8117         for all targets that use win32-low.c.
8118         * win32-low.c (win32_ensure_ntdll_loaded): New function.
8119         (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8120
8121 2013-12-13  Pedro Alves  <palves@redhat.com>
8122
8123         * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8124         if equal to TARGET_WAITKIND_LOADED.
8125         * win32-low.c (cached_status): New static global.
8126         (win32_wait): Add declaration.
8127         (do_initial_child_stuff): Flush all initial pending debug events
8128         up to the initial breakpoint.
8129         (win32_wait): If CACHED_STATUS was set, return that instead
8130         of doing a real wait.  Remove the code resuming the execution
8131         of the inferior after receiving a TARGET_WAITKIND_LOADED event
8132         during the initial phase.  Also remove the code changing
8133         OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8134         TARGET_WAITKIND_STOPPED.
8135
8136 2013-12-11  Yao Qi  <yao@codesourcery.com>
8137
8138         * notif.c (handle_notif_ack): Return 0 if no notification
8139         matches.
8140
8141 2013-11-20  Doug Evans  <dje@google.com>
8142
8143         * linux-low.c (linux_set_resume_request): Fix comment.
8144
8145 2013-11-20  Doug Evans  <dje@google.com>
8146
8147         * linux-low.c (resume_status_pending_p): Tweak comment.
8148
8149 2013-11-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
8150
8151         * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8152         amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8153         * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8154         (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8155         (srv_amd64_regobj): Add amd64-mpx.o.
8156         (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8157         (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8158         (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8159         * i387-fp.c (num_pl_bnd_register) Added constant.
8160         (num_pl_bnd_cfg_registers) Added constant.
8161         (struct i387_xsave) Added reserved area and MPX fields.
8162         (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8163         * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8164         function.
8165         (tdesc_i386_mpx_linux): Add MPX amd64 target.
8166         (init_registers_amd64_mpx_linux): Declare new function.
8167         (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8168         (x86_64_regmap): Add MPX registers.
8169         (x86_linux_read_description): Add MPX case.
8170         (initialize_low_arch): Initialize MPX targets.
8171
8172 2013-11-18  Tom Tromey  <tromey@redhat.com>
8173
8174         * configure: Rebuild.
8175         * configure.ac: Don't check for stdlib.h.
8176         * gdbreplay.c: Unconditionally include stdlib.h.
8177
8178 2013-11-18  Tom Tromey  <tromey@redhat.com>
8179
8180         * config.in: Rebuild.
8181         * configure: Rebuild.
8182         * configure.ac: Don't use AC_HEADER_DIRENT.
8183
8184 2013-11-18  Tom Tromey  <tromey@redhat.com>
8185
8186         * server.h: Don't check HAVE_STRING_H.
8187         * gdbreplay.c: Don't check HAVE_STRING_H.
8188         * configure: Rebuild.
8189
8190 2013-11-18  Tom Tromey  <tromey@redhat.com>
8191
8192         * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8193         LIBGNU.
8194
8195 2013-11-08  Tom Tromey  <tromey@redhat.com>
8196
8197         * configure, config.in: Rebuild.
8198         * configure.ac: Remove unused configury.
8199
8200 2013-11-08  Tom Tromey  <tromey@redhat.com>
8201
8202         * acinclude.m4: Include common.m4, codeset.m4.
8203         * configure, config.in: Rebuild.
8204         * configure.ac: Use GDB_AC_COMMON.
8205
8206 2013-11-06  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8207
8208         * linux-s390-low.c (HWCAP_S390_TE): New define.
8209         (s390_arch_setup): Consider the TE field in the HWCAP for
8210         determining 'have_regset_tdb'.
8211
8212 2013-10-16  Sergio Durigan Junior  <sergiodj@redhat.com>
8213
8214         PR gdb/16014
8215         * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8216         call to sizeof.
8217
8218 2013-10-02  Pedro Alves  <palves@redhat.com>
8219
8220         * server.c (process_serial_event): Don't output "GDBserver
8221         exiting" if GDB is connected through stdio.
8222         * target.c (mywait): Likewise, be silent if GDB is connected
8223         through stdio.
8224
8225 2013-10-01  Joel Brobecker  <brobecker@adacore.com>
8226
8227         * lynx-low.c (lynx_add_threads_after_attach): New function.
8228         (lynx_attach): Remove call to add_thread.  Add call to
8229         lynx_add_threads_after_attach instead.
8230
8231 2013-09-28  Mike Frysinger  <vapier@gentoo.org>
8232
8233         * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8234         * config.in, configure: Regenerated.
8235
8236 2013-09-18  Yao Qi  <yao@codesourcery.com>
8237
8238         PR server/15959
8239         * server.c (start_inferior): Clear 'resume_info'.
8240
8241 2013-09-16  Jiong Wang  <jiwang@tilera.com>
8242
8243         * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8244         for each register.
8245
8246 2013-09-16  Jiong Wang  <jiwang@tilera.com>
8247
8248         * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8249         linux-tile-low.o to srv_tgtobj.
8250
8251 2013-09-16  Will Newton  <will.newton@linaro.org>
8252
8253         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8254         out regs.
8255
8256 2013-09-06  Pedro Alves  <palves@redhat.com>
8257
8258         * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8259         (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8260         (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8261         (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8262         (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8263         (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8264
8265 2013-09-06  Pedro Alves  <palves@redhat.com>
8266
8267         * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8268         explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8269
8270 2013-09-06  Pedro Alves  <palves@redhat.com>
8271
8272         * linux-amd64-ipa.c: Include tracepoint.h.
8273         * linux-i386-ipa.c: Include tracepoint.h.
8274
8275 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
8276
8277         * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8278         (ps_get_thread_area): New function.
8279
8280 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
8281
8282         * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8283         (initialize_low_arch): Call init_registers_crisv32 rather than
8284         init_register_crisv32.
8285
8286 2013-09-05  Pedro Alves  <palves@redhat.com>
8287
8288         * server.h (handle_vFile, hostio_last_error_from_errno): Move
8289         to ...
8290         * hostio.h: ... this new file.
8291         * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8292         win32-low.c: Include hostio.h.
8293
8294 2013-09-05  Pedro Alves  <palves@redhat.com>
8295
8296         * server.h (gdb_client_data, handler_func, callback_handler_func)
8297         (delete_file_handler, add_file_handler, append_callback_event)
8298         (delete_callback_event, start_event_loop, initialize_event_loop):
8299         Move to event-loop.h and include it.
8300         * event-loop.h: New file.
8301
8302 2013-09-05  Pedro Alves  <palves@redhat.com>
8303
8304         * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8305         * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8306         (loaded_dll, unloaded_dll): Move to ...
8307         * dll.h: ... this new file.
8308         * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8309
8310 2013-09-05  Pedro Alves  <palves@redhat.com>
8311
8312         * server.h (current_process, get_thread_process, all_processes)
8313         (add_inferior_to_list, for_each_inferior, current_inferior)
8314         (remove_inferior, add_process, remove_process, find_process_pid)
8315         (have_started_inferiors_p, have_attached_inferiors_p)
8316         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8317         (clear_inferiors, find_inferior, find_inferior_id)
8318         (inferior_target_data, set_inferior_target_data)
8319         (inferior_regcache_data, set_inferior_regcache_data): Move to
8320         inferiors.h, and include it.
8321         * inferiors.h: New file.
8322
8323 2013-09-05  Pedro Alves  <palves@redhat.com>
8324
8325         * server.h (struct emit_ops, current_insn_ptr, emit_error):
8326         Move ...
8327         * ax.h: ... here.
8328
8329 2013-09-05  Pedro Alves  <palves@redhat.com>
8330
8331         * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8332         tracepoint.h.
8333         * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8334         (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8335         (handle_tracepoint_general_set, handle_tracepoint_query)
8336         (tracepoint_finished_step, tracepoint_was_hit)
8337         (release_while_stepping_state_list, current_traceframe)
8338         (in_readonly_region, traceframe_read_mem)
8339         (fetch_traceframe_registers, traceframe_read_sdata)
8340         (traceframe_read_info, struct fast_tpoint_collect_status)
8341         (fast_tracepoint_collecting, force_unlock_trace_buffer)
8342         (handle_tracepoit_bkpts, initialize_low_tracepoint)
8343         (supply_fast_tracepoint_registers)
8344         (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8345         (ipa_tdesc, claim_trampoline_space)
8346         (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8347         (agent_mem_read, agent_get_trace_state_variable_value)
8348         (agent_set_trace_state_variable_value, agent_tsv_read)
8349         (agent_mem_read_string, get_raw_reg_func_addr)
8350         (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8351         * tracepoint.h: ... this new file.
8352
8353 2013-09-05  Pedro Alves  <palves@redhat.com>
8354
8355         * server.h (perror_with_name, error, fatal, warning, paddress)
8356         (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8357         include it.
8358         * utils.h: New file.
8359
8360 2013-09-05  Pedro Alves  <palves@redhat.com>
8361
8362         * server.h (remote_debug, noack_mode, transport_is_reliable)
8363         (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8364         (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8365         (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8366         (write_enn, initialize_async_io, enable_async_io)
8367         (disable_async_io, check_remote_input_interrupt_request)
8368         (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8369         (dead_thread_notify, prepare_resume_reply)
8370         (decode_address_to_semicolon, decode_address, decode_m_packet)
8371         (decode_M_packet, decode_X_packet, decode_xfer_write)
8372         (decode_search_memory_packet, unhexify, hexify)
8373         (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8374         (look_up_one_symbol, relocate_instruction)
8375         (monitor_output): Move to remote-utils.h, and include it.
8376         * remote-utils.h: New file.
8377
8378 2013-09-05  Pedro Alves  <palves@redhat.com>
8379
8380         * server.h (_): Delete.
8381
8382 2013-09-02  Pedro Alves  <palves@redhat.com>
8383
8384         * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8385         (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8386         allocated.
8387         (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8388
8389 2013-09-02  Pierre Muller  <muller@sourceware.org>
8390
8391         * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8392         or WriteProcessMemory complete successfully and handle
8393         ERROR_PARTIAL_COPY error.
8394
8395 2013-09-02  Pedro Alves  <palves@redhat.com>
8396
8397         * server.c (gdb_read_memory): Return -1 on traceframe memory read
8398         error instead of EIO.
8399
8400 2013-08-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
8401
8402         PR server/15604
8403         * linux-low.c: Include filestuff.h.
8404         (linux_create_inferior) <pid == 0>: Call close_most_fds.
8405         * lynx-low.c: Include filestuff.h.
8406         (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8407         * server.c: Include filestuff.h.
8408         (main): Call notice_open_fds.
8409         * spu-low.c: Include filestuff.h.
8410         (spu_create_inferior) <pid == 0>: Call close_most_fds.
8411
8412 2013-08-22  Luis Machado  <lgustavo@codesourcery.com>
8413
8414         * Makefile.in: Explain why ../target and ../nat are not
8415         listed as include file search paths.
8416         (linux-waitpid.o): New object file rule.
8417         * configure.srv (srv_native_linux_obj): New variable.
8418         Replace all occurrences of linux native object files with
8419         $srv_native_linux_obj.
8420         * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8421         (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8422         (linux_enable_event_reporting): Remove declaration.
8423         (my_waitpid): Moved to common/linux-waitpid.c.
8424         (linux_wait_for_event): Pass ptid when calling
8425         linux_enable_event_reporting.
8426         (linux_supports_tracefork_flag): Remove.
8427         (linux_enable_event_reporting): Likewise.
8428         (linux_tracefork_grandchild): Remove.
8429         (STACK_SIZE): Moved to common/linux-ptrace.c.
8430         (linux_tracefork_child): Remove.
8431         (linux_test_for_tracefork): Remove.
8432         (linux_look_up_symbols): Call linux_supports_traceclone.
8433         (initialize_low): Remove call to linux_test_for_tracefork.
8434         * linux-low.h (PTRACE_TYPE_ARG3): Move to
8435         common/linux-ptrace.h.
8436         (PTRACE_TYPE_ARG4): Likewise.
8437         Include linux-ptrace.h.
8438
8439 2013-08-21  Pedro Alves  <palves@redhat.com>
8440
8441         * config.in: Renegerate.
8442
8443 2013-08-19  Luis Machado  <lgustavo@codesourcery.com>
8444
8445         * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8446         (SFILES): Remove $(srcdir)/common/target-common.c and
8447         add $(srcdir)/target/waitstatus.c.
8448         (OBS): Remove target-common.o and add waitstatus.o.
8449         (server_h): Remove $(srcdir)/../common/target-common.h and
8450         add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8451         and $(srcdir)/../target/waitstatus.h.
8452         (target-common.o): Remove.
8453         (waitstatus.o): New target object file.
8454         * target.h: Do not include target-common.h and
8455         include target/resume.h, target/wait.h and
8456         target/waitstatus.h.
8457
8458 2013-08-13  Luis Machado  <lgustavo@codesourcery.com>
8459
8460         * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8461         to PTRACE_TYPE_ARG3.
8462         * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8463         to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8464         PTRACE_TYPE_ARG4.
8465         * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8466         (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8467
8468 2013-07-27  Jie Zhang  <jie@codesourcery.com>
8469             Daniel Jacobowitz  <dan@codesourcery.com>
8470             Yao Qi  <yao@codesourcery.com>
8471
8472         * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8473         (mips-linux-watch.o): New rule.
8474         (mips_linux_watch_h): New variable.
8475         * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8476         srv_tgtobj.
8477         * linux-mips-low.c: Include mips-linux-watch.h.
8478         (struct arch_process_info, struct arch_lwp_info): New.
8479         (update_watch_registers_callback): New function.
8480         (mips_linux_new_process, mips_linux_new_thread) New functions.
8481         (mips_linux_prepare_to_resume, mips_insert_point): New
8482         functions.
8483         (mips_remove_point, mips_stopped_by_watchpoint): New
8484         functions.
8485         (rsp_bp_type_to_target_hw_bp_type): New function.
8486         (mips_stopped_data_address): New function.
8487         (the_low_target): Add watchpoint support functions.
8488
8489 2013-07-27  Yao Qi  <yao@codesourcery.com>
8490
8491         * i386-low.c: Include break-common.h.
8492         (enum target_hw_bp_type): Remove.
8493
8494 2013-07-24  Luis Machado  <lgustavo@codesourcery.com>
8495
8496         * Makefile.in (SFILES): /common/target-common.c.
8497         (OBS): Add target-common.o.
8498         (server_h): Add $(srcdir)/../common/target-common.h.
8499         (target-common.o): New target.
8500         * server.c (queue_stop_reply_callback): Free
8501         status string after use.
8502         * target.c (target_waitstatus_to_string): Remove.
8503         * target.h: Include target-common.h.
8504         (resume_kind): Likewise.
8505         (target_waitkind): Likewise.
8506         (target_waitstatus): Likewise.
8507         (TARGET_WNOHANG): Likewise.
8508
8509 2013-07-04  Yao Qi  <yao@codesourcery.com>
8510
8511         * Makefile.in (host_alias): Use @host_noncanonical@.
8512         (target_alias): Use @target_noncanonical@.
8513         * configure.ac: Use ACX_NONCANONICAL_TARGET and
8514         ACX_NONCANONICAL_HOST.
8515         * configure: Regenerated.
8516
8517         Revert:
8518         2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
8519
8520         * configure.ac (version_host, version_target): Set and AC_SUBST them.
8521         * configure: Rebuild.
8522         * Makefile.in (version_host, version_target): Get from configure.
8523         (version.c): Use $(version_host) and $(version_target).
8524
8525 2013-07-03  Pedro Alves  <palves@redhat.com>
8526
8527         * Makefile.in (config.status): Depend on development.sh.
8528         * acinclude.m4: Include libmcheck.m4.
8529         * configure: Regenerate.
8530
8531 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
8532
8533         * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8534         attribute inside the parentheses.
8535         (winapi_DebugSetProcessKillOnExit): Ditto.
8536         (winapi_DebugBreakProcess): Ditto.
8537         (winapi_GenerateConsoleCtrlEvent): Ditto.
8538
8539 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
8540
8541         * notif.h (notif_event): Add a dummy member to avoid compiler
8542         errors.
8543
8544 2013-07-01  Pedro Alves  <palves@redhat.com>
8545
8546         * hostio.c (HOSTIO_PATH_MAX): Define.
8547         (require_filename, handle_open, handle_unlink, handle_readlink):
8548         Use it.
8549
8550 2013-07-01  Pedro Alves  <palves@redhat.com>
8551
8552         * server.h: Include "pathmax.h".
8553         * linux-low.c: Don't include sys/param.h.
8554         (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8555         MAXPATHLEN.
8556         * win32-low.c: Don't include sys/param.h.
8557         (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8558
8559 2013-07-01  Pedro Alves  <palves@redhat.com>
8560
8561         * event-loop.c: Don't check HAVE_UNISTD_H before including
8562         <unistd.h>.
8563         * gdbreplay.c: Likewise.
8564         * remote-utils.c: Likewise.
8565         * server.c: Likewise.
8566         * configure.ac: Don't check for unistd.h.
8567         * configure: Regenerate.
8568
8569 2013-06-28  Tom Tromey  <tromey@redhat.com>
8570
8571         * Makefile.in (version.c): Use version.in, not
8572         common/version.in.
8573
8574 2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
8575
8576         * configure.ac (version_host, version_target): Set and AC_SUBST them.
8577         * configure: Rebuild.
8578         * Makefile.in (version_host, version_target): Get from configure.
8579         (version.c): Use $(version_host) and $(version_target).
8580
8581 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
8582
8583         Fix trace-status to output user name without trailing colon.
8584         * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8585
8586 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
8587
8588         Fix trace-status to output proper start-time and stop-time.
8589         * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8590         output start time and stop time in hex as gdb expects.
8591
8592 2013-06-26  Pedro Alves  <pedro@codesourcery.com>
8593
8594         * tracepoint.c (build_traceframe_info_xml): Output trace state
8595         variables present in the trace buffer.
8596
8597 2013-06-24  Tom Tromey  <tromey@redhat.com>
8598
8599         * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8600         create-version.sh.
8601         (version.o): Remove.
8602         * gdbreplay.c: Include version.h.
8603         (version, host_name): Don't declare.
8604         * server.h: Include version.h.
8605         (version, host_name): Don't declare.
8606
8607 2013-06-12  Pedro Alves  <palves@redhat.com>
8608
8609         * linux-x86-low.c (linux_is_elf64): Delete global.
8610         (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8611         with local linux_pid_exe_is_elf_64_file use.
8612
8613 2013-06-11  Pedro Alves  <palves@redhat.com>
8614
8615         * linux-low.c (regset_disabled, disable_regset): New functions.
8616         (regsets_fetch_inferior_registers)
8617         (regsets_store_inferior_registers): Use them.
8618         (initialize_regsets_info); Don't allocate the disabled_regsets
8619         array here.
8620         * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8621         comment.
8622
8623 2013-06-11  Pedro Alves  <palves@redhat.com>
8624
8625         * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8626         xmalloc.
8627
8628 2013-06-11  Pedro Alves  <palves@redhat.com>
8629
8630         * linux-x86-low.c (initialize_low_arch): Call
8631         init_registers_x32_avx_linux.
8632
8633 2013-06-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
8634
8635         Fix compatibility with Android Bionic.
8636         * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8637         it is not empty.
8638
8639 2013-06-07  Pedro Alves  <palves@redhat.com>
8640
8641         PR server/14823
8642         * Makefile.in (OBS): Add tdesc.o.
8643         (IPA_OBJS): Add tdesc-ipa.o.
8644         (tdesc-ipa.o): New rule.
8645         * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8646         interface.
8647         * linux-low.c (new_inferior): Delete.
8648         (disabled_regsets, num_regsets): Delete.
8649         (linux_add_process): Adjust to set the new per-process
8650         new_inferior flag.
8651         (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8652         (linux_wait_for_lwp): Adjust.  Only call arch_setup if the event
8653         was a stop.  When calling arch_setup, switch the current inferior
8654         to the thread that got an event.
8655         (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8656         (regsets_fetch_inferior_registers)
8657         (regsets_store_inferior_registers): New regsets_info parameter.
8658         Adjust to use it.
8659         (linux_register_in_regsets): New regs_info parameter.  Adjust to
8660         use it.
8661         (register_addr, fetch_register, store_register): New usrregs_info
8662         parameter.  Adjust to use it.
8663         (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8664         parameter regs_info.  Adjust to use it.
8665         (linux_fetch_registers): Get the current inferior's regs_info, and
8666         adjust to use it.
8667         (linux_store_registers): Ditto.
8668         [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8669         (initialize_low): Don't initialize the target_regsets here.  Call
8670         initialize_low_arch.
8671         * linux-low.h (target_regsets): Delete declaration.
8672         (struct regsets_info): New.
8673         (struct usrregs_info): New.
8674         (struct regs_info): New.
8675         (struct process_info_private) <new_inferior>: New field.
8676         (struct linux_target_ops): Delete the num_regs, regmap, and
8677         regset_bitmap fields.  New field regs_info.
8678         [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8679         * i387-fp.c (num_xmm_registers): Delete.
8680         (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8681         calls to new interface.
8682         (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8683         (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8684         Infer the number of xmm registers from the regcache's target
8685         description.
8686         * i387-fp.h (num_xmm_registers): Delete.
8687         * inferiors.c (add_thread): Don't install the thread's regcache
8688         here.
8689         * proc-service.c (gregset_info): Fetch the current inferior's
8690         regs_info.  Adjust to use it.
8691         * regcache.c: Include tdesc.h.
8692         (register_bytes, reg_defs, num_registers)
8693         (gdbserver_expedite_regs): Delete.
8694         (get_thread_regcache): If the thread doesn't have a regcache yet,
8695         create one, instead of aborting gdbserver.
8696         (regcache_invalidate_one): Rename to ...
8697         (regcache_invalidate_thread): ... this.
8698         (regcache_invalidate_one): New.
8699         (regcache_invalidate): Only invalidate registers of the current
8700         process.
8701         (init_register_cache): Add target_desc parameter, and use it.
8702         (new_register_cache): Ditto.  Assert the target description has a
8703         non zero registers_size.
8704         (regcache_cpy): Add assertions.  Adjust.
8705         (realloc_register_cache, set_register_cache): Delete.
8706         (registers_to_string, registers_from_string): Adjust.
8707         (find_register_by_name, find_regno, find_register_by_number)
8708         (register_cache_size): Add target_desc parameter, and use it.
8709         (free_register_cache_thread, free_register_cache_thread_one)
8710         (regcache_release, register_cache_size): New.
8711         (register_size): Add target_desc parameter, and use it.
8712         (register_data, supply_register, supply_register_zeroed)
8713         (supply_regblock, supply_register_by_name, collect_register)
8714         (collect_register_as_string, collect_register_by_name): Adjust.
8715         * regcache.h (struct target_desc): Forward declare.
8716         (struct regcache) <tdesc>: New field.
8717         (init_register_cache, new_register_cache): Add target_desc
8718         parameter.
8719         (regcache_invalidate_thread): Declare.
8720         (regcache_invalidate_one): Delete declaration.
8721         (regcache_release): Declare.
8722         (find_register_by_number, register_cache_size, register_size)
8723         (find_regno): Add target_desc parameter.
8724         (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8725         declarations.
8726         * remote-utils.c: Include tdesc.h.
8727         (outreg, prepare_resume_reply): Adjust.
8728         * server.c: Include tdesc.h.
8729         (gdbserver_xmltarget): Delete declaration.
8730         (get_features_xml, process_serial_event): Adjust.
8731         * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8732         declare.
8733         (struct process_info) <tdesc>: New field.
8734         (ipa_tdesc): Declare.
8735         * tdesc.c: New file.
8736         * tdesc.h: New file.
8737         * tracepoint.c: Include tdesc.h.
8738         [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8739         (get_context_regcache): Adjust to pass ipa_tdesc down.
8740         (do_action_at_tracepoint): Adjust to get the register cache size
8741         from the context regcache's description.
8742         (traceframe_walk_blocks): Adjust to get the register cache size
8743         from the current trace frame's description.
8744         (traceframe_get_pc): Adjust to get current trace frame's
8745         description and pass it down.
8746         (gdb_collect): Adjust to get the register cache size from the
8747         IPA's description.
8748         * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8749         (gdbserver_xmltarget): Delete.
8750         (initialize_low_tracepoint): Set the ipa's target description.
8751         * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8752         (initialize_low_tracepoint): Set the ipa's target description.
8753         * linux-x86-low.c: Include tdesc.h.
8754         [__x86_64__] (is_64bit_tdesc): New.
8755         (ps_get_thread_area, x86_get_thread_area): Use it.
8756         (i386_cannot_store_register): Rename to ...
8757         (x86_cannot_store_register): ... this.  Use is_64bit_tdesc.
8758         (i386_cannot_fetch_register): Rename to ...
8759         (x86_cannot_fetch_register): ... this.  Use is_64bit_tdesc.
8760         (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8761         to new interface.
8762         (target_regsets): Rename to ...
8763         (x86_regsets): ... this.
8764         (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8765         interface.
8766         (x86_siginfo_fixup): Use is_64bit_tdesc.
8767         [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8768         (tdesc_x32_avx_linux, tdesc_x32_linux)
8769         (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8770         Declare.
8771         (x86_linux_update_xmltarget): Delete.
8772         (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8773         (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8774         (AMD64_LINUX_USER64_CS): New.
8775         (x86_linux_read_description): New, based on
8776         x86_linux_update_xmltarget.
8777         (same_process_callback): New.
8778         (x86_arch_setup_process_callback): New.
8779         (x86_linux_update_xmltarget): New.
8780         (x86_regsets_info): New.
8781         (amd64_linux_regs_info): New.
8782         (i386_linux_usrregs_info): New.
8783         (i386_linux_regs_info): New.
8784         (x86_linux_regs_info): New.
8785         (x86_arch_setup): Reimplement.
8786         (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8787         (x86_emit_ops): Ditto.
8788         (the_low_target): Adjust.  Install x86_linux_regs_info,
8789         x86_cannot_fetch_register, and x86_cannot_store_register.
8790         (initialize_low_arch): New.
8791         * linux-ia64-low.c (tdesc_ia64): Declare.
8792         (ia64_fetch_register): Adjust.
8793         (ia64_usrregs_info, regs_info): New globals.
8794         (ia64_regs_info): New function.
8795         (the_low_target): Adjust.
8796         (initialize_low_arch): New function.
8797         * linux-sparc-low.c (tdesc_sparc64): Declare.
8798         (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8799         Adjust.
8800         (sparc_arch_setup): New function.
8801         (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8802         (the_low_target): Adjust.
8803         (initialize_low_arch): New function.
8804         * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8805         (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8806         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8807         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8808         (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8809         (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8810         (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8811         (tdesc_powerpc_isa205_vsx64l): Declare.
8812         (ppc_cannot_store_register, ppc_collect_ptrace_register)
8813         (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8814         (ppc_set_pc, ppc_get_hwcap): Adjust.
8815         (ppc_usrregs_info): Forward declare.
8816         (!__powerpc64__) ppc_regmap_adjusted: New global.
8817         (ppc_arch_setup): Adjust to the current process'es target
8818         description.
8819         (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8820         (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8821         (ppc_store_evrregset): Adjust.
8822         (target_regsets): Rename to ...
8823         (ppc_regsets): ... this, and make static.
8824         (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8825         (ppc_regs_info): New function.
8826         (the_low_target): Adjust.
8827         (initialize_low_arch): New function.
8828         * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8829         (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8830         (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8831         (tdesc_s390x_linux64v2): Declare.
8832         (s390_collect_ptrace_register, s390_supply_ptrace_register)
8833         (s390_fill_gregset, s390_store_last_break): Adjust.
8834         (target_regsets): Rename to ...
8835         (s390_regsets): ... this, and make static.
8836         (s390_get_pc, s390_set_pc): Adjust.
8837         (s390_get_hwcap): New target_desc parameter, and use it.
8838         [__s390x__] (have_hwcap_s390_high_gprs): New global.
8839         (s390_arch_setup): Adjust to set the current process'es target
8840         description.  Don't adjust the regmap.
8841         (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
8842         [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
8843         (regs_info_3264): New globals.
8844         (s390_regs_info): New function.
8845         (the_low_target): Adjust.
8846         (initialize_low_arch): New function.
8847         * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
8848         (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
8849         [__mips64] (init_registers_mips_linux)
8850         (init_registers_mips_dsp_linux): Delete defines.
8851         [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
8852         (have_dsp): New global.
8853         (mips_read_description): New, based on mips_arch_setup.
8854         (mips_arch_setup): Reimplement.
8855         (get_usrregs_info): New function.
8856         (mips_cannot_fetch_register, mips_cannot_store_register)
8857         (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
8858         (mips_fill_fpregset, mips_store_fpregset): Adjust.
8859         (target_regsets): Rename to ...
8860         (mips_regsets): ... this, and make static.
8861         (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
8862         (dsp_regs_info, regs_info): New globals.
8863         (mips_regs_info): New function.
8864         (the_low_target): Adjust.
8865         (initialize_low_arch): New function.
8866         * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
8867         (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
8868         Declare.
8869         (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
8870         (arm_read_description): New, with bits factored from
8871         arm_arch_setup.
8872         (arm_arch_setup): Reimplement.
8873         (target_regsets): Rename to ...
8874         (arm_regsets): ... this, and make static.
8875         (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
8876         (arm_regs_info): New function.
8877         (the_low_target): Adjust.
8878         (initialize_low_arch): New function.
8879         * linux-m68k-low.c (tdesc_m68k): Declare.
8880         (target_regsets): Rename to ...
8881         (m68k_regsets): ... this, and make static.
8882         (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
8883         (m68k_regs_info): New function.
8884         (m68k_arch_setup): New function.
8885         (the_low_target): Adjust.
8886         (initialize_low_arch): New function.
8887         * linux-sh-low.c (tdesc_sharch): Declare.
8888         (target_regsets): Rename to ...
8889         (sh_regsets): ... this, and make static.
8890         (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
8891         (sh_regs_info, sh_arch_setup): New functions.
8892         (the_low_target): Adjust.
8893         (initialize_low_arch): New function.
8894         * linux-bfin-low.c (tdesc_bfin): Declare.
8895         (bfin_arch_setup): New function.
8896         (bfin_usrregs_info, regs_info): New globals.
8897         (bfin_regs_info): New function.
8898         (the_low_target): Adjust.
8899         (initialize_low_arch): New function.
8900         * linux-cris-low.c (tdesc_cris): Declare.
8901         (cris_arch_setup): New function.
8902         (cris_usrregs_info, regs_info): New globals.
8903         (cris_regs_info): New function.
8904         (the_low_target): Adjust.
8905         (initialize_low_arch): New function.
8906         * linux-cris-low.c (tdesc_crisv32): Declare.
8907         (cris_arch_setup): New function.
8908         (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
8909         (cris_regs_info): New function.
8910         (the_low_target): Adjust.
8911         (initialize_low_arch): New function.
8912         * linux-m32r-low.c (tdesc_m32r): Declare.
8913         (m32r_arch_setup): New function.
8914         (m32r_usrregs_info, regs_info): New globals.
8915         (m32r_regs_info): Adjust.
8916         (initialize_low_arch): New function.
8917         * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
8918         (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
8919         (tic6x_usrregs_info): Forward declare.
8920         (tic6x_read_description): New function, based on ...
8921         (tic6x_arch_setup): ... this.  Reimplement.
8922         (target_regsets): Rename to ...
8923         (tic6x_regsets): ... this, and make static.
8924         (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
8925         (tic6x_regs_info): New function.
8926         (the_low_target): Adjust.
8927         (initialize_low_arch): New function.
8928         * linux-xtensa-low.c (tdesc_xtensa): Declare.
8929         (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
8930         (target_regsets): Rename to ...
8931         (xtensa_regsets): ... this, and make static.
8932         (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
8933         globals.
8934         (xtensa_arch_setup, xtensa_regs_info): New functions.
8935         (the_low_target): Adjust.
8936         (initialize_low_arch): New function.
8937         * linux-nios2-low.c (tdesc_nios2_linux): Declare.
8938         (nios2_arch_setup): Set the current process'es tdesc.
8939         (target_regsets): Rename to ...
8940         (nios2_regsets): ... this.
8941         (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
8942         (nios2_regs_info): New function.
8943         (the_low_target): Adjust.
8944         (initialize_low_arch): New function.
8945         * linux-aarch64-low.c (tdesc_aarch64): Declare.
8946         (aarch64_arch_setup): Set the current process'es tdesc.
8947         (target_regsets): Rename to ...
8948         (aarch64_regsets): ... this.
8949         (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
8950         (aarch64_regs_info): New function.
8951         (the_low_target): Adjust.
8952         (initialize_low_arch): New function.
8953         * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
8954         globals.
8955         (target_regsets): Rename to ...
8956         (tile_regsets): ... this.
8957         (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
8958         (tile_regs_info): New function.
8959         (tile_arch_setup): Set the current process'es tdesc.
8960         (the_low_target): Adjust.
8961         (initialize_low_arch): New function.
8962         * spu-low.c (tdesc_spu): Declare.
8963         (spu_create_inferior, spu_attach): Set the new process'es tdesc.
8964         * win32-arm-low.c (tdesc_arm): Declare.
8965         (arm_arch_setup): New function.
8966         (the_low_target): Install arm_arch_setup instead of
8967         init_registers_arm.
8968         * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
8969         (init_windows_x86): Rename to ...
8970         (i386_arch_setup): ... this.  Set `win32_tdesc'.
8971         (the_low_target): Adjust.
8972         * win32-low.c (win32_tdesc): New global.
8973         (child_add_thread): Don't create the thread cache here.
8974         (do_initial_child_stuff): Set the new process'es tdesc.
8975         * win32-low.h (struct target_desc): Forward declare.
8976         (win32_tdesc): Declare.
8977         * lynx-i386-low.c (tdesc_i386): Declare global.
8978         (lynx_i386_arch_setup): Set `lynx_tdesc'.
8979         * lynx-low.c (lynx_tdesc): New global.
8980         (lynx_add_process): Set the new process'es tdesc.
8981         * lynx-low.h (struct target_desc): Forward declare.
8982         (lynx_tdesc): Declare global.
8983         * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
8984         (lynx_ppc_arch_setup): Set `lynx_tdesc'.
8985         * nto-low.c (nto_tdesc): New global.
8986         (do_attach): Set the new process'es tdesc.
8987         * nto-low.h (struct target_desc): Forward declare.
8988         (nto_tdesc): Declare.
8989         * nto-x86-low.c (tdesc_i386): Declare.
8990         (nto_x86_arch_setup): Set `nto_tdesc'.
8991
8992 2013-06-04  Gary Benson  <gbenson@redhat.com>
8993
8994         * server.c (handle_query): Add "augmented-libraries-svr4-read+"
8995         to qSupported response when appropriate.
8996         (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
8997         with nonzero-length annex.
8998         * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
8999         arguments supplied in annex.
9000
9001 2013-05-31  Doug Evans  <dje@google.com>
9002
9003         PR server/15594
9004         * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9005         64 bits in 64-cross-32 environment.
9006
9007 2013-05-28  Pedro Alves  <palves@redhat.com>
9008
9009         * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9010         (aarch64-without-fpu.c): Delete rule.
9011         * configure.srv (aarch64*-*-linux*): Remove references to
9012         aarch64-without-fpu.o and aarch64-without-fpu.xml.
9013         * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9014         declaration.
9015
9016 2013-05-24  Pedro Alves  <palves@redhat.com>
9017
9018         * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9019         instead of strchr/decode_address.  Error if the range isn't split
9020         with a ','.  Don't assume there's be a ':' in the action.
9021
9022 2013-05-23  Yao Qi  <yao@codesourcery.com>
9023             Pedro Alves  <palves@redhat.com>
9024
9025         * linux-low.c (lwp_in_step_range): New function.
9026         (linux_wait_1): If the thread was range stepping and stopped
9027         outside the stepping range, report the stop to GDB.  Otherwise,
9028         continue stepping.  Add range stepping debug output.
9029         (linux_set_resume_request): Copy the step range from the resume
9030         request to the lwp.
9031         (linux_supports_range_stepping): New.
9032         (linux_target_ops) <supports_range_stepping>: Set to
9033         linux_supports_range_stepping.
9034         * linux-low.h (struct linux_target_ops)
9035         <supports_range_stepping>: New field.
9036         (struct lwp_info) <step_range_start, step_range_end>: New fields.
9037         * linux-x86-low.c (x86_supports_range_stepping): New.
9038         (the_low_target) <supports_range_stepping>: Set to
9039         x86_supports_range_stepping.
9040         * server.c (handle_v_cont): Handle 'r' action.
9041         (handle_v_requests): Append ";r" if the target supports range
9042         stepping.
9043         * target.h (struct thread_resume) <step_range_start,
9044         step_range_end>: New fields.
9045         (struct target_ops) <supports_range_stepping>:
9046         New field.
9047         (target_supports_range_stepping): New macro.
9048
9049 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
9050
9051         * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9052         confusion in comment.
9053
9054 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
9055
9056         * lynx-low.c (struct process_info_private): New type.
9057         (lynx_add_process): New function.
9058         (lynx_create_inferior, lynx_attach): Replace calls to
9059         add_process by calls to lynx_add_process.
9060         (lynx_resume): If PTID is null, then try using
9061         current_process()->private->last_wait_event_ptid.
9062         Add comments.
9063         (lynx_clear_inferiors): Delete.  The contents of that function
9064         has been inlined in lynx_mourn;
9065         (lynx_wait_1): Save the ptid in the process's private data.
9066         (lynx_mourn): Free the process' private data.  Replace call
9067         to lynx_clear_inferiors by call to clear_inferiors.
9068
9069 2013-05-17  Yao Qi  <yao@codesourcery.com>
9070
9071         * i386-low.c (i386_length_and_rw_bits): Move the comment to
9072         the right place.
9073
9074 2013-05-16  Luis Machado  <lgustavo@codesourcery.com>
9075
9076         * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9077         PT_DATA_ADDR and PT_TEXT_END_ADDR.  Update comments.
9078         (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9079         PT_TEXT_END_ADDR guards.  Update comments.
9080         (linux_target_op) <read_offsets>: Conditionally define to
9081         linux_read_offsets if the target is UCLIBC and if it defines
9082         PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9083
9084 2013-05-06  Sandra Loosemore  <sandra@codesourcery.com>
9085             Andrew Jenner  <andrew@codesourcery.com>
9086
9087         * Makefile.in (SFILES): Add linux-nios2-low.c.
9088         (clean): Add action to delete nios2-linux.c.
9089         (nios2-linux.c): New rule.
9090         * configure.srv: Add nios2*-*-linux*.
9091         * linux-nios2-low.c: New.
9092
9093 2013-05-03  Hafiz Abid Qadeer  <abidh@codesourcery.com>
9094
9095         * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9096
9097 2013-04-25  Hui Zhu  <hui@codesourcery.com>
9098
9099         PR gdb/15186
9100         * ax.c (ax_printf): Add fflush.
9101
9102 2013-04-22  Tom Tromey  <tromey@redhat.com>
9103
9104         * Makefile.in (SFILES): Add filestuff.c.
9105         (OBS): Add filestuff.o.
9106         (filestuff.o): New target.
9107         * config.in, configure: Rebuild.
9108         * configure.ac: Check for fdwalk, pipe2.
9109
9110 2013-04-17  Pedro Alves  <palves@redhat.com>
9111
9112         * configure.ac (USE_THREAD_DB): Delete variable.
9113         (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9114         Don't AC_SUBST USE_THREAD_DB.
9115         * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9116         * config.in, configure: Regenerate.
9117
9118 2013-04-16  Pedro Alves  <palves@redhat.com>
9119
9120         * linux-low.h (struct lwp_info) <thread_known>: Move under
9121         the USE_THREAD_DB #ifdef.
9122
9123 2013-04-16  Pedro Alves  <palves@redhat.com>
9124
9125         * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9126         (linux-low.o): Delete rule.
9127         * linux-low.h: Always include "gdb_thread_db.h" instead of
9128         conditionally including thread_db.h.
9129         (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9130         HAVE_THREAD_DB_H.
9131
9132 2013-04-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
9133
9134         * Makefile.in (install-only): Fix make install regression.
9135
9136 2013-04-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
9137
9138         Convert man pages to texinfo, new gdbinit.5 texinfo page.
9139         * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9140         installation.
9141         * gdbserver.1: Remove.
9142
9143 2013-03-22  Pedro Alves  <palves@redhat.com>
9144
9145         * linux-low.c (handle_extended_wait): Don't call
9146         linux_enable_event_reporting.
9147
9148 2013-03-15  Tony Theodore  <tonyt@logyst.com>
9149
9150         PR build/9098:
9151         * Makefile.in (SHELL): Use @SHELL@.
9152
9153 2013-03-14  Sergio Durigan Junior  <sergiodj@redhat.com>
9154
9155         * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9156         compiler warning.
9157
9158 2013-03-13  Joel Brobecker  <brobecker@adacore.com>
9159
9160         * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9161         Remove extraneous NULL element.
9162
9163 2013-03-13  Yao Qi  <yao@codesourcery.com>
9164
9165         * tracepoint.c (traceframe_read_tsv): Look for the last matched
9166         'V' block in trace frame.
9167
9168 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
9169
9170         * target.h (struct target_ops): Add btrace ops.
9171         (target_supports_btrace): New macro.
9172         (target_enable_btrace): New macro.
9173         (target_disable_btrace): New macro.
9174         (target_read_btrace): New macro.
9175         * gdbthread.h (struct thread_info): Add btrace field.
9176         * server.c: Include btrace-common.h.
9177         (handle_btrace_general_set): New function.
9178         (handle_btrace_enable): New function.
9179         (handle_btrace_disable): New function.
9180         (handle_general_set): Call handle_btrace_general_set.
9181         (handle_qxfer_btrace): New function.
9182         (struct qxfer qxfer_packets[]): Add btrace entry.
9183         * inferiors.c (remove_thread): Disable btrace.
9184         * linux-low: Include linux-btrace.h.
9185         (linux_low_enable_btrace): New function.
9186         (linux_low_read_btrace): New function.
9187         (linux_target_ops): Add btrace ops.
9188         * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9189         Add srv_linux_btrace=yes.
9190         (x86_64-*-linux*): Add linux-btrace.o.
9191         Add srv_linux_btrace=yes.
9192         * configure.ac: Define HAVE_LINUX_BTRACE.
9193         * config.in: Regenerated.
9194         * configure: Regenerated.
9195
9196 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
9197
9198         * server.c (handle_qxfer): Preserve error message if -3 is
9199         returned.
9200         (qxfer): Document the -3 return value.
9201
9202 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
9203
9204         * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9205         (linux_btrace_h): New variable.
9206         (linux-btrace.o): New rule.
9207
9208 2013-03-08  Stan Shebs  <stan@codesourcery.com>
9209             Hafiz Abid Qadeer  <abidh@codesourcery.com>
9210
9211         * tracepoint.c (trace_buffer_size): New global.
9212         (DEFAULT_TRACE_BUFFER_SIZE): New define.
9213         (init_trace_buffer): Change to one-argument function. Allocate
9214         trace buffer memory.
9215         (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9216         handle QTBuffer:size packet.
9217         (cmd_bigqtbuffer_size): New function.
9218         (initialize_tracepoint): Call init_trace_buffer with
9219         DEFAULT_TRACE_BUFFER_SIZE.
9220         * server.c (handle_query): Add QTBuffer:size in the
9221         supported packets.
9222
9223 2013-03-07  Yao Qi  <yao@codesourcery.com>
9224
9225         * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9226         (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9227         of -1.
9228         (cmd_qtsp): Adjust condition.  Do post increment.
9229         Set cur_action and cur_step_action back to 0.
9230
9231 2013-03-07  Jeremy Bennett  <jeremy.bennett@embecosm.com>
9232
9233         PR server/15236
9234         * linux-low.c (linux_write_memory): Return early success if LEN is
9235         zero.
9236
9237 2013-03-05  Corinna Vinschen  <vinschen@redhat.de>
9238
9239         * configure.srv: Add x86_64-*-cygwin* as target.
9240
9241 2013-02-28  Tom Tromey  <tromey@redhat.com>
9242
9243         * configure.ac: Invoke AC_SYS_LARGEFILE.
9244         * configure, config.in: Rebuild.
9245
9246 2013-02-28  Corinna Vinschen  <vinschen@redhat.com>
9247
9248         * win32-low.c: Throughout, fix format strings and casts of
9249         printf-like functions to avoid type related warnings on all
9250         platforms.
9251         (get_child_debug_event): Print dwDebugEventCode as hex since
9252         that's how it's usually documented.
9253
9254 2013-02-28  Yao Qi  <yao@codesourcery.com>
9255
9256         * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9257         pulongest.
9258
9259 2013-02-27  Jiong Wang  <jiwang@tilera.com>
9260
9261         * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9262         (reg-tilegx32.c): New rule.
9263         * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9264         * linux-tile-low.c (tile_arch_setup): New function.  Invoke
9265         different register info initializer according to elf class.
9266         (init_registers_tilgx32): New function.  The tilegx32 register info
9267         initializer.
9268         (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9269         (tile_store_gregset): Likewise.
9270
9271 2013-02-27  Yao Qi  <yao@codesourcery.com>
9272
9273         * server.c (process_point_options): Print debug message when
9274         debug_threads is true.
9275
9276 2013-02-26  Yao Qi  <yao@codesourcery.com>
9277
9278         * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9279
9280 2013-02-19  Pedro Alves  <palves@redhat.com>
9281             Kai Tietz <ktietz@redhat.com>
9282
9283         PR gdb/15161
9284
9285         * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9286         instead of strtoul to extract address from packet.
9287         (process_serial_event) <'z'>: Likewise.
9288
9289 2013-02-18  Yao Qi  <yao@codesourcery.com>
9290
9291         * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9292
9293 2013-02-14  Pedro Alves  <palves@redhat.com>
9294
9295         Plug memory leak.
9296
9297         * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9298         TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9299
9300 2013-02-14  Pedro Alves  <palves@redhat.com>
9301
9302         * tracepoint.c (cmd_qtdpsrc): Use savestring.
9303
9304 2013-02-14  Pedro Alves  <palves@redhat.com>
9305
9306         * tracepoint.c (save_string): Delete.
9307         (add_tracepoint_action): Use savestring instead of save_string.
9308
9309 2013-02-12  Pedro Alves  <palves@redhat.com>
9310
9311         * linux-xtensa-low.c: Ditto.
9312         * xtensa-xtregs.c: Ditto.
9313
9314 2013-02-12  Sanimir Agovic  <sanimir.agovic@intel.com>
9315
9316         * thread-db.c (thread_db_get_tls_address): NULL pointer check
9317         thread_db.
9318
9319 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
9320
9321         * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9322         aarch64_num_wp_regs and aarch64_num_bp_regs to
9323         AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9324
9325 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
9326
9327         * linux-aarch64-low.c (ps_get_thread_area): Replace
9328         PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9329
9330 2013-02-04  Jim MacArthur  <jim.macarthur@arm.com>
9331             Marcus Shawcroft  <marcus.shawcroft@arm.com>
9332             Nigel Stephens  <nigel.stephens@arm.com>
9333             Yufeng Zhang  <yufeng.zhang@arm.com>
9334
9335         * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9336         (aarch64.c, aarch64-without-fpu.c): New targets.
9337         * configure.srv (aarch64*-*-linux*): New.
9338         * linux-aarch64-low.c: New file.
9339
9340 2013-02-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
9341
9342         * linux-low.c (handle_extended_wait, linux_create_inferior)
9343         (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9344         (dequeue_one_deferred_signal, linux_resume_one_thread)
9345         (fetch_register, linux_write_memory, linux_enable_event_reporting)
9346         (linux_tracefork_grandchild, linux_test_for_tracefork)
9347         (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9348         PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9349         where the argument is 0.
9350
9351 2013-01-25  Yao Qi  <yao@codesourcery.com>
9352
9353         * event-loop.c: Include "queue.h".
9354         (gdb_event_p): New typedef.
9355         (struct gdb_event) <next_event>: Remove.
9356         (event_queue): Change to QUEUE(gdb_event_p).
9357         (async_queue_event): Remove.
9358         (gdb_event_xfree): New.
9359         (initialize_event_loop): New.
9360         (process_event): Use API from QUEUE.
9361         (wait_for_event): Likewise.
9362         * server.c (main): Call initialize_event_loop.
9363         * server.h (initialize_event_loop): Declare.
9364
9365 2013-01-18  Yao Qi  <yao@codesourcery.com>
9366
9367         * ax.h (struct eval_agent_expr_context): New.
9368         (gdb_eval_agent_expr): Update declaration.
9369         * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9370         TFRAME.  Add new argument CTX.
9371         * server.h (struct eval_agent_expr_context): Declare.
9372         (agent_mem_read, agent_tsv_read): Update declaration.
9373         (agent_mem_read_string): Likewise.
9374         * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9375         (add_traceframe_block): Add new argument TPOINT.
9376         Increase TPOINT->traceframe_usage.
9377         (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9378         eval_tracepoint_agent_expr.
9379         (condition_true_at_tracepoint): Likewise.
9380         (agent_mem_read): Remove argument TFRAME.  Add argument CTX.
9381         (agent_mem_read_string, agent_tsv_read): Likewise.
9382
9383 2013-01-16  Yao Qi  <yao@codesourcery.com>
9384
9385         * linux-low.c (linux_resume_one_lwp): Don't check
9386         'lwp->bp_reinsert != 0'.
9387
9388 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
9389             Pedro Alves  <palves@redhat.com>
9390
9391         * lynx-low.c (ptrace_request_to_str): Define a temporary
9392         macro and use it to simplify this function's implementation.
9393
9394 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
9395
9396         * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9397         sets errno.
9398
9399 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
9400
9401         * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9402
9403 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
9404
9405         * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9406
9407 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
9408
9409         * lynx-low.c (lynx_resume): Use the resume_info parameter
9410         to determine the ptid for the lynx_ptrace call, unless
9411         it is equal to minus_one_ptid, in which case we use the
9412         ptid of the current_inferior.
9413         (lynx_wait_1): After having received a thread create/exit
9414         event, resume the inferior's execution using the signaling
9415         thread's ptid, rather than the old ptid.
9416
9417 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
9418
9419         * lynx-low.c (lynx_resume): Delete variable ret.
9420
9421 2013-01-01  Joel Brobecker  <brobecker@adacore.com>
9422
9423         * gdbreplay.c (gdbreplay_version): Update copyright year.
9424         * server.c (gdbserver_version): Likewise.
9425
9426 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
9427
9428         * lynx-low.c (lynx_wait_1): Add debug trace before adding
9429         new thread.
9430
9431 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
9432
9433         * lynx-low.c (ptrace_request_to_str): Add handling for
9434         PTRACE_GETTRACESIG.
9435
9436 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
9437
9438         * lynx-low.c (lynx_attach): Delete variable new_process.
9439
9440 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
9441
9442         * lynx-low.c (lynx_create_inferior): Delete variable
9443         new_process.
9444
9445 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
9446
9447         * lynx-low.c (ptrace_request_to_str): Do not handle
9448         PTRACE_GETTHREADLIST if this macro does not exist.
9449
9450 2012-12-15  Yao Qi  <yao@codesourcery.com>
9451
9452         * Makefile.in (OBS): Add notif.o.
9453         * notif.c, notif.h: New.
9454         * server.c: Include "notif.h".
9455         (struct vstop_notif) <next>: Remove.
9456         <base>: New field.
9457         (queue_stop_reply): Update.
9458         (push_event, send_next_stop_reply): Remove.
9459         (discard_queued_stop_replies): Update.
9460         (notif_stop): New variable.
9461         (handle_v_stopped): Remove.
9462         (handle_v_requests): Don't call handle_v_stopped.  Call
9463         handle_ack_notif instead.
9464         (queue_stop_reply_callback): Call notif_event_enque instead
9465         of queue_stop_reply.
9466         (handle_status): Don't call send_next_stop_reply, call
9467         notif_write_event instead.
9468         (kill_inferior_callback): Likewise.
9469         (detach_or_kill_inferior_callback): Likewise.
9470         (main): Call initialize_notif.
9471         (process_serial_event): Call QUEUE_is_empty.
9472         (handle_target_event): Call notif_push instead of push event.
9473         * server.h (push_event): Remove declaration.
9474
9475 2012-12-10  Tom Tromey  <tromey@redhat.com>
9476
9477         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9478         (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9479         macros.
9480         (.c.o): Rewrite.
9481         (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9482         (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9483         (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9484         (amd64-linux-ipa.o, ax.o): Rewrite.
9485         (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9486         (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9487         (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9488         (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9489         (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9490         (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9491         (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9492         (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9493         (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9494         (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9495         (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9496         (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9497         (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9498         (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9499         (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9500         (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9501         (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9502         (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9503         (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9504         (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9505         (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9506         (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9507         (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9508         (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9509         (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9510         (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9511         (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9512         (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9513         (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9514         (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9515         (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9516         (reg-tilegx.o): Remove.
9517         (all_object_files): New macro.
9518         Include .deps files.
9519         * aclocal.m4, configure: Rebuild.
9520         * acinclude.m4: Include depstand.m4, lead-dot.m4.
9521         * configure.ac: Invoke ZW_CREATE_DEPDIR,
9522         ZW_PROG_COMPILER_DEPENDENCIES.  Compute GMAKE condition.
9523
9524 2012-12-05  Tom Tromey  <tromey@redhat.com>
9525
9526         PR gdb/14917:
9527         * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9528
9529 2012-11-28  Markus Metzger  <markus.t.metzger@intel.com>
9530
9531         * configure.ac: Check for linux/perf_event.h.
9532         * config.in: Regenerated.
9533         * configure: Regenerated.
9534
9535 2012-11-26  Maxime Villard  <rustyBSD@gmx.fr>
9536
9537         * hostio.c (handle_readlink): Decrease buffer size
9538         parameter passed to readlink by one byte.
9539
9540 2012-11-26  Yao Qi  <yao@codesourcery.com>
9541
9542         * configure.ac (build_warnings): Append '-Wempty-body'.
9543         * configure: Regenerated.
9544         * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9545         body.
9546
9547 2012-11-15  Pierre Muller  <muller@sourceware.org>
9548
9549         * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9550         * config.in: Regenerate.
9551         * configure: Regenerate.
9552         * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9553         Use "gdb_wait.h" header instead of <sys/wait.h> header.
9554         * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9555         * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9556         header.
9557         * server.c: Remove HAVE_WAIT_H conditional.  Use "gdb_wait.h" header
9558         instead of <sys/wait.h> header.
9559         * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9560
9561 2012-11-13 Markus Metzger  <markus.t.metzger@intel.com>
9562
9563         * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9564         (various make rules): Remove -DGDBSERVER
9565
9566 2012-11-09  Yao Qi  <yao@codesourcery.com>
9567
9568         * spu-low.c (current_ptid): Move it to ..
9569         * gdbthread.h: ... here.  New.
9570         * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9571         * server.c (myresume, process_serial_event): Likewise.
9572         * thread-db.c (thread_db_find_new_threads): Likewise.
9573         * tracepoint.c (run_inferior_command): Likewise.
9574
9575 2012-10-01  Andrew Burgess  <aburgess@broadcom.com>
9576
9577         * server.c (handle_search_memory_1): Include access length in
9578         warning message.
9579
9580 2012-09-05  Michael Brandt  <michael.brandt@axis.com>
9581
9582         * linux-crisv32-low.c: Fix compile errors.
9583
9584 2012-09-04  Yao Qi  <yao@codesourcery.com>
9585
9586         * tracepoint.c (cmd_qtsv): Adjust debug message.
9587         Don't check CUR_TPOINT.
9588
9589 2012-08-28  Yao Qi  <yao@codesourcery.com>
9590
9591         * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9592         * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9593         (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9594         Remove declarations of xmalloc, xreallloc, xstrdup and
9595         freeargv.
9596         * Makefile.in (libiberty_h): New.
9597         (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9598         (linux-bfin-low.o): Append dependency 'libiberty.h'.
9599
9600 2012-08-23  Yao Qi  <yao@codesourcery.com>
9601
9602         * server.h: Remove declaration of 'xsnprintf'.
9603
9604 2012-08-22  Keith Seitz  <keiths@redhat.com>
9605
9606         * server.h: Include build-gnulib-gbserver/config.h.
9607         * gdbreplay.c: Likewise.
9608
9609 2012-08-08  Doug Evans  <dje@google.com>
9610
9611         * Makefile.in (SFILES): Add gdb_vecs.c.
9612         (OBS): Add gdb_vecs.o.
9613         (gdb_vecs_h, host_defs_h): New variables.
9614         (thread-db.o): Add $(gdb_vecs_h) dependency.
9615         (gdb_vecs.o): New rule.
9616         * thread-db.c: #include "gdb_vecs.h".
9617         (thread_db_load_search): Use a vector to iterate over path elements.
9618         Handle text appearing after "$pdir".
9619
9620         * configure.ac: Add check for strstr.
9621         * config.in: Regenerate.
9622         * configure: Regenerate.
9623
9624 2012-08-02  Ulrich Weigand  <ulrich.weigand@linaro.org>
9625
9626         * hostio.c (handle_pread): If pread fails, fall back to attempting
9627         lseek/read.
9628         (handle_pwrite): Likewise for pwrite.
9629
9630 2012-08-01  Ulrich Weigand  <ulrich.weigand@linaro.org>
9631
9632         * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9633         between unsupported TYPE and unimplementable ADDR/LEN combination.
9634         (arm_insert_point): Act on new return value.
9635
9636 2012-07-31  Pedro Alves  <palves@redhat.com>
9637
9638         * server.c (process_point_options): Only skip tokens if we find
9639         one that is unrecognized.  Don't treat 'X' specially while
9640         skipping unrecognized tokens.
9641
9642 2012-07-30  Ulrich Weigand  <ulrich.weigand@linaro.org>
9643
9644         * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9645         to 4-byte-align HW breakpoint addresses for Thumb.
9646
9647 2012-07-27  Yao Qi  <yao@codesourcery.com>
9648
9649         PR remote/14161.
9650
9651         * server.h: Declare gdb_agent_about_to_close.
9652         * target.c (kill_inferior): Include "agent.h".
9653         New.  Send command 'kill'.
9654         * target.h (kill_inferior): Removed macro.
9655         * tracepoint.c (gdb_agent_about_to_close): New.
9656         (gdb_agent_helper_thread): Handle command 'close'.
9657         Wait endlessly until the inferior stops.
9658         Install gdb_agent_remove_socket to atexit hook.
9659         (agent_socket_name): New static variable.
9660         (gdb_agent_socket_init): Replace local variable 'name' with
9661         'agent_socket_name'.
9662         (gdb_agent_remove_socket): New.
9663
9664 2012-07-27  Yao Qi  <yao@codesourcery.com>
9665
9666         * server.c (process_point_options): Stop at 'X' when parsing.
9667
9668 2012-07-19  Michael Eager  <eager@eagercon.com>
9669
9670         * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9671         to hw_execute.
9672         * linux-x86-low.c (x86_insert_point, x86_remove_point):
9673         Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9674         hardware breakpoint.
9675
9676 2012-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
9677
9678         * gdbserver/linux-low.c (initialize_low): Call
9679         linux_ptrace_init_warnings.
9680
9681 2012-07-02  Doug Evans  <dje@google.com>
9682
9683         * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9684         pointer to int.
9685
9686 2012-07-02  Stan Shebs  <stan@codesourcery.com>
9687
9688         * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9689         (ax.o): Add it to build rule.
9690         (ax-ipa.o): Ditto.
9691         (OBS): Add format.o.
9692         (IPA_OBS): Add format.o.
9693         * server.c (handle_query): Claim support for breakpoint commands.
9694         (process_point_options): Add command case.
9695         (process_serial_event): Leave running if there are printfs in
9696         effect.
9697         * mem-break.h (any_persistent_commands): Declare.
9698         (add_breakpoint_commands): Declare.
9699         (gdb_no_commands_at_breakpoint): Declare.
9700         (run_breakpoint_commands): Declare.
9701         * mem-break.c (struct point_command_list): New struct.
9702         (struct breakpoint): New field command_list.
9703         (any_persistent_commands): New function.
9704         (add_commands_to_breakpoint): New function.
9705         (add_breakpoint_commands): New function.
9706         (gdb_no_commands_at_breakpoint): New function.
9707         (run_breakpoint_commands): New function.
9708         * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9709         locally.
9710         * ax.c: Include format.h.
9711         (ax_printf): New function.
9712         (gdb_eval_agent_expr): Add printf opcode.
9713
9714 2012-06-13  Yao Qi  <yao@codesourcery.com>
9715
9716         * server.c (start_inferior): Remove duplicated writes to fields
9717         'last_resume_kind' and 'last_status' of 'current_inferior'.
9718
9719 2012-06-12  Yao Qi  <yao@codesourcery.com>
9720             Pedro Alves  <palves@redhat.com>
9721
9722         * linux-low.c (linux_set_resume_request): Simplify predicate.  Add
9723         comment.
9724         * server.c (handle_v_cont): Extend comment.
9725
9726 2012-06-11  Yao Qi  <yao@codesourcery.com>
9727
9728         * linux-low.c (linux_attach): Add 'static'.
9729
9730 2012-06-06  Yao Qi  <yao@codesourcery.com>
9731
9732         * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9733
9734 2012-06-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
9735
9736         Fix gcc -flto compilation warning.
9737         * server.c (main): Make variable multi_mode and attach volatile.
9738
9739 2012-05-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
9740
9741         * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9742         if the platform doesn't know about it.
9743
9744 2012-05-30  Jeff Kenton  <jkenton@tilera.com>
9745
9746         * Makefile.in (SFILES): Add linux-tile-low.c.
9747         (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9748         * configure.srv: Handle tilegx-*-linux*.
9749         * linux-tile-low.c: New file.
9750
9751 2012-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
9752
9753         * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9754
9755 2012-05-24  Pedro Alves  <palves@redhat.com>
9756
9757         PR gdb/7205
9758
9759         Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9760
9761 2012-05-24  Pedro Alves  <palves@redhat.com>
9762
9763         PR gdb/7205
9764
9765         Replace target_signal with gdb_signal throughout.
9766
9767 2012-05-22  Maciej W. Rozycki  <macro@codesourcery.com>
9768
9769         * linux-low.c (linux_store_registers): Avoid the copying sequence
9770         when no data has been retrieved by ptrace.
9771
9772 2012-05-22  Will Deacon  <will.deacon@arm.com>
9773
9774         * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9775         Include asm/ptrace.h.
9776         (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9777         already defined.
9778
9779 2012-05-21  Maciej W. Rozycki  <macro@codesourcery.com>
9780
9781         * linux-low.c (linux_store_registers): Don't re-retrieve data
9782         with ptrace that has already been obtained from /proc.  Always
9783         copy any data retrieved with ptrace to the buffer supplied.
9784
9785 2012-05-11  Yao Qi  <yao@codesourcery.com>
9786             Pedro Alves  <palves@redhat.com>
9787
9788         * linux-low.c (enum stopping_threads_kind): New.
9789         (stopping_threads): Change type to `enum stopping_threads_kind'.
9790         (handle_extended_wait): If stopping and suspending threads, leave
9791         the new_lwp suspended too.
9792         (linux_wait_for_event): Adjust.
9793         (stop_all_lwps): Set `stopping_threads' to
9794         STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9795         whether we're suspending threads or just stopping them.  Assert no
9796         recursion happens.
9797
9798 2012-04-29  Yao Qi  <yao@codesourcery.com>
9799
9800         * server.h: Move some code to ...
9801         * gdbthread.h: ... here.  New.
9802         * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9803         (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9804         (nto-low.o, win32-low.o): Likewise.
9805         * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9806         * regcache.c, remote-utils.c, server.c: Likewise.
9807         * target.c, tracepoint.c, win32-low.c: Likewise.
9808
9809 2012-04-24  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
9810
9811         * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9812         (PTRACE_ARG4_TYPE): Likewise.
9813         (PTRACE_XFER_TYPE): Likewise.
9814         * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9815         ptrace to PTRACE_ARG3_TYPE.
9816         * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9817         (PTRACE_ARG4_TYPE): Likewise.
9818         (PTRACE_XFER_TYPE): Likewise.
9819         (linux_detach_one_lwp): Cast fourth argument of
9820         ptrace to long then PTRACE_ARG4_TYPE.
9821         (regsets_fetch_inferior_registers): Cast third argument of
9822         ptrace to long then PTRACE_ARG3_TYPE.
9823         (regsets_store_inferior_registers): Likewise.
9824
9825 2012-04-20  Pedro Alves  <palves@redhat.com>
9826
9827         * configure: Regenerate.
9828
9829 2012-04-19  Pedro Alves  <palves@redhat.com>
9830
9831         * Makefile.in (GNULIB_BUILDDIR): New.
9832         (LIBGNU, INCGNU, GNULIB_H): Adjust.
9833         (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9834         (all, install-only, uninstall, clean-info, all-lib, clean): No
9835         longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
9836         (maintainer-clean realclean distclean): Use subdir_do.
9837         (subdir_do): New.
9838         (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
9839         $(GNULIB_BUILDDIR).  Don't pass argument to config.status.
9840         * acinclude.m4: Include acx_configure_dir.m4.
9841         * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
9842         calls.  Call AC_PROG_RANLIB.  Configure gnulib using
9843         ACX_CONFIGURE_DIR.
9844         (GNULIB): New.
9845         (GNULIB_STDINT_H): Adjust.
9846         (AC_OUTPUT): Don't output gnulib/Makefile anymore.
9847         * gdbreplay.c: Include build-gnulib/config.h.
9848         * server.h: Likewise.
9849         * aclocal.m4: Regenerate.
9850         * config.in: Regenerate.
9851         * configure: Regenerate.
9852
9853 2012-04-19  Pedro Alves  <palves@redhat.com>
9854
9855         * Makefile.in (LIBGNU, INCGNU): Adjust.
9856         (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
9857         (all, install-only, uninstall, clean-info, all-lib, clean)
9858         (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
9859         * configure.ac: Adjust AC_OUTPUT output.
9860         * aclocal.m4: Regenerate.
9861         * configure: Regenerate.
9862
9863 2012-04-19  Pedro Alves  <palves@redhat.com>
9864
9865         * Makefile.in (generated_files): New.
9866         (server_h): Remove the explicit dependency on config.h, and depend
9867         on $generated_files.
9868
9869 2012-04-19  Pedro Alves  <palves@redhat.com>
9870
9871         * Makefile.in (INCGNU): Add -Ignulib.
9872
9873 2012-04-19  Pedro Alves  <palves@redhat.com>
9874
9875         * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
9876         (INCGNU): ... this, and spell out -I here.
9877         (GNULIB_LIB): Rename to ...
9878         (LIBGNU): ... this.
9879         (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
9880
9881 2012-04-19  Pedro Alves  <palves@redhat.com>
9882
9883         * config.in: Regenerate.
9884
9885 2012-04-19  Pedro Alves  <palves@redhat.com>
9886
9887         * configure.ac: Remove AC_CHECK_DECLS check for memmem.
9888         * server.h (memmem): Remove declaration.
9889         * config.in: Regenerate.
9890         * configure: Regenerate.
9891
9892 2012-04-19  Yao Qi  <yao@codesourcery.com>
9893
9894         * Makefile.in (SFILES): Add common/vec.c.
9895         (OBS): Add vec.o.
9896         (vec.o): New rule.
9897
9898 2012-04-19  Yao Qi  <yao@codesourcery.com>
9899
9900         * remote-utils.c (prepare_resume_reply): Replace with macro
9901         target_core_of_thread.
9902         * server.c (handle_qxfer_threads_proper): Likewise.
9903         * target.h (traget_core_of_thread): New macro.
9904
9905 2012-04-18  Pedro Alves  <palves@redhat.com>
9906
9907         * aclocal.m4: Regenerate.
9908         * configure: Regenerate.
9909
9910 2012-04-16  Yao Qi  <yao@codesourcery.com>
9911
9912         * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
9913         duplicated on address.
9914
9915 2012-04-16  Yao Qi  <yao@codesourcery.com>
9916
9917         * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
9918         (struct tracepoint_action_ops) <send>: New field.
9919         (m_tracepoint_action_send, r_tracepoint_action_send): New.
9920         (agent_expr_send, x_tracepoint_action_send): New.
9921         (l_tracepoint_action_send): New.
9922         (cmd_qtdp): Download and install tracepoint
9923         according to `use_agent'.
9924         (run_inferior_command): Add one more parameter `len'.
9925         Update callers.
9926         (tracepoint_send_agent): New.
9927         (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
9928
9929 2012-04-16  Yao Qi  <yao@codesourcery.com>
9930
9931         * tracepoint.c (download_tracepoints): Moved to ...
9932         (cmd_qtstart): ... here.
9933
9934 2012-04-14  Yao Qi  <yao@codesourcery.com>
9935
9936         * tracepoint.c: Include inttypes.h.
9937         (struct collect_memory_action): Use sized types.
9938         (struct tracepoint): Likewise.
9939         (cmd_qtdp, stop_tracing): Update print specifiers.
9940         (cmd_qtp, response_tracepoint): Likewise.
9941         (collect_data_at_tracepoint): Likewise.
9942         (collect_data_at_step): Likewise.
9943
9944 2012-04-14  Yao Qi  <yao@codesourcery.com>
9945
9946         Import gnulib module inttypes.
9947         * aclocal.m4, config.in, configure: Regenerated.
9948
9949 2012-04-14  Yao Qi  <yao@codesourcery.com>
9950
9951         * Makefile.in (maintainer-clean, realclean, distclean): Remove
9952         Makefile and config.status at last.
9953
9954 2012-04-13  Yao Qi  <yao@codesourcery.com>
9955
9956         * tracepoint.c: Include stdint.h unconditionally.
9957
9958 2012-04-13  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
9959
9960         * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
9961         on BFD_HAVE_SYS_PROCFS_TYPE.
9962         * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
9963         * configure: Regenerate.
9964         * config.in: Likewise.
9965
9966 2012-04-13  H.J. Lu  <hongjiu.lu@intel.com>
9967
9968         * Makefile.in (clean): Also remove x32.c x32-linux.c
9969         x32-avx.c x32-avx-linux.c.
9970         (x32.o): New target.
9971         (x32.c): Likewise.
9972         (x32-linux.o): Likewise.
9973         (x32-linux.c): Likewise.
9974         (x32-avx.o): Likewise.
9975         (x32-avx.c): Likewise.
9976         (x32-avx-linux.o): Likewise.
9977         (x32-avx-linux.c): Likewise.
9978
9979         * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
9980         (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
9981         (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
9982         (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
9983         (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
9984         i386/x32-avx-linux.xml.
9985
9986         * linux-x86-low.c (init_registers_x32_linux): New prototype.
9987         (init_registers_x32_avx_linux): Likwise.
9988         (x86_linux_update_xmltarget): Call init_registers_x32_linux
9989         or init_registers_x32_avx_linux if linux_is_elf64 is false.
9990
9991 2012-04-13  Pedro Alves  <palves@redhat.com>
9992
9993         * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
9994         (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
9995         (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
9996         (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
9997         the sub-make.
9998
9999 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
10000
10001         * linux-x86-low.c (compat_x32_clock_t): New.
10002         (compat_x32_siginfo_t): Likewise.
10003         (compat_x32_siginfo_from_siginfo): Likewise.
10004         (siginfo_from_compat_x32_siginfo): Likewise.
10005         (linux_is_elf64): Likewise.
10006         (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10007         and siginfo_from_compat_x32_siginfo for x32.
10008         (x86_arch_setup): Set linux_is_elf64.
10009
10010 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
10011
10012         PR gdb/13969
10013         * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10014         e_machine field.
10015         (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10016         * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10017         * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10018         compatible with process.
10019
10020 2012-04-12  Yao Qi  <yao@codesourcery.com>
10021
10022         * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10023         (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10024         (install-only, install-info, clean): Handle sub dir gnulib.
10025         (all-lib, am--refresh): New targets.
10026         (memmem.o): Remove target.
10027         * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10028         Invoke gl_EARLY.  Invoke AC_CHECK_PROGS for make.
10029         (AC_REPLACE_FUNCS): Remove memmem.
10030         Invoke gl_INIT and AM_INIT_AUTOMAKE.
10031         (AC_OUTPUT): Generate Makefile in gnulib/.
10032         * aclocal.m4, config.in, configure: Regenerated.
10033
10034 2012-04-10  Maciej W. Rozycki  <macro@codesourcery.com>
10035
10036         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10037
10038 2012-04-05  Pedro Alves  <palves@redhat.com>
10039
10040         -Werror=strict-aliasing
10041
10042         * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10043         pointer.
10044
10045 2012-04-04  Pedro Alves  <palves@redhat.com>
10046
10047         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10048         (sparc_store_gregset_from_stack, sparc_store_gregset)
10049         (sparc_breakpoint_at): Fix formatting.
10050
10051 2012-03-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
10052
10053         * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10054         are available.
10055         * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10056         [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10057         * config.in: Regenerate.
10058         * configure: Likewise.
10059
10060 2012-03-29  Pedro Alves  <palves@redhat.com>
10061
10062         * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10063         Correct ptrace arguments.
10064
10065 2012-03-28  Pedro Alves  <palves@redhat.com>
10066
10067         * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10068         (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10069         (IA64_FR1_REGNUM): New defines.
10070         (ia64_fetch_register): New.
10071         (the_low_target): Install it.
10072         * linux-low.h (struct linux_target_ops) <fetch_register>: New
10073         field.
10074         * linux-low.c (linux_fetch_registers): Try the
10075         the_low_target.fetch_register hook first.
10076
10077         * linux-arm-low.c (the_low_target): Adjust.
10078         * linux-bfin-low.c (the_low_target): Adjust.
10079         * linux-cris-low.c (the_low_target): Adjust.
10080         * linux-crisv32-low.c (the_low_target): Adjust.
10081         * linux-m32r-low.c (the_low_target): Adjust.
10082         * linux-m68k-low.c (the_low_target): Adjust.
10083         * linux-mips-low.c (the_low_target): Adjust.
10084         * linux-ppc-low.c (the_low_target): Adjust.
10085         * linux-s390-low.c (the_low_target): Adjust.
10086         * linux-sh-low.c (the_low_target): Adjust.
10087         * linux-sparc-low.c (the_low_target): Adjust.
10088         * linux-tic6x-low.c (the_low_target): Adjust.
10089         * linux-x86-low.c (the_low_target): Adjust.
10090         * linux-xtensa-low.c (the_low_target): Adjust.
10091
10092 2012-03-26  Pedro Alves  <palves@redhat.com>
10093
10094         * server.c (handle_qxfer_libraries): Don't bail early if
10095         the_target->qxfer_libraries_svr4 is not NULL.
10096
10097 2012-03-26  Pedro Alves  <palves@redhat.com>
10098
10099         * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10100
10101 2012-03-23  Pedro Alves  <palves@redhat.com>
10102
10103         * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10104         "library-list-svr4" element's start tag when the the DSO list is
10105         empty.
10106
10107 2012-03-23  Pedro Alves  <palves@redhat.com>
10108
10109         * linux-low.c (read_one_ptr): Read the inferior's pointer through
10110         a variable whose type size is the same as the inferior's pointer
10111         size.
10112
10113 2012-03-21  Thomas Schwinge  <thomas@codesourcery.com>
10114
10115         * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10116         struct siginfo.
10117         * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10118         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10119         * linux-low.h: Include <signal.h>.
10120         (struct siginfo): Remove forward declaration.
10121         (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10122         struct siginfo.
10123
10124 2012-03-21  Mike Frysinger  <vapier@gentoo.org>
10125
10126         * .gitignore: Ignore more files.
10127
10128 2012-03-19  Pedro Alves  <palves@redhat.com>
10129             Jan Kratochvil  <jan.kratochvil@redhat.com>
10130
10131         * server.c (cont_thread, general_thread): Add describing comments.
10132         (start_inferior): Clear `cont_thread'.
10133         (handle_v_cont): Don't set `cont_thread' if resuming all threads
10134         of a process.
10135
10136 2012-03-15  Yao Qi  <yao@codesourcery.com>
10137
10138         * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10139         handling to ...
10140         (cmd_qtdp): ... here.
10141
10142 2012-03-15  Yao Qi  <yao@codesourcery.com>
10143
10144         * tracepoint.c (struct tracepoint_action_ops): New.
10145         (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10146         (m_tracepoint_action_download): New.
10147         (r_tracepoint_action_download): New.
10148         (x_tracepoint_action_download): New.
10149         (l_tracepoint_action_download): New.
10150         (add_tracepoint_action): Install `action->ops' according type.
10151         (download_tracepoint_1): Move code `download' function pointer
10152         of various tracepoint_action_ops.
10153
10154 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
10155
10156         * linux-low.c (linux_attach_lwp_1): New variable buffer.  Call
10157         linux_ptrace_attach_warnings.
10158
10159 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
10160
10161         * Makefile.in (linux-ptrace.o): New.
10162         * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10163         (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10164         (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10165         (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10166         (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10167         of these targets.
10168         * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10169
10170 2012-03-08  Yao Qi  <yao@codesourcery.com>
10171             Pedro Alves  <palves@redhat.com>
10172
10173         Fix PR server/13392.
10174         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10175         offset of JMP insn.
10176         * tracepoint.c (remove_tracepoint): New.
10177         (cmd_qtdp): Call remove_tracepoint when failed to install.
10178
10179 2012-03-07  Pedro Alves  <palves@redhat.com>
10180
10181         * linux-low.c (get_detach_signal): New.
10182         (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10183         Pass on pending signals to PTRACE_DETACH.  Check the result of the
10184         ptrace call.
10185         * server.c (program_signals, program_signals_p): New.
10186         (handle_general_set): Handle QProgramSignals.
10187         * server.h (program_signals, program_signals_p): Declare.
10188
10189 2012-03-05  Pedro Alves  <palves@redhat.com>
10190             Jan Kratochvil  <jan.kratochvil@redhat.com>
10191
10192         * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10193         New comment why.
10194
10195 2012-03-03  Yao Qi  <yao@codesourcery.com>
10196
10197         * tracepoint.c (tracepoint_look_up_symbols): Update call to
10198         agent_look_up_symbols.
10199
10200 2012-03-03  Yao Qi  <yao@codesourcery.com>
10201
10202         * Makefile.in (linux-low.o): Keep dependence on agent.h.
10203         (linux-x86-low.o): Likewise.
10204         * server.h: Remove in_process_agent_loaded.
10205         * tracepoint.c (in_process_agent_loaded): Removed.  Moved it
10206         common/agent.c.
10207         Update callers.
10208
10209 2012-03-03  Yao Qi  <yao@codesourcery.com>
10210
10211         * tracepoint.c (gdb_agent_capability): New global.
10212         (in_process_agent_loaded_ust): Renamed to
10213         `in_process_agent_supports_ust'.
10214         Update callers.
10215         (in_process_agent_supports_ust): Call agent_capability_check.
10216         (clear_installed_tracepoints): Assert that agent supports
10217         agent.
10218
10219 2012-03-03  Yao Qi  <yao@codesourcery.com>
10220
10221         * linux-low.c (linux_supports_agent): New.
10222         (linux_target_ops): Initialize field `supports_agent' with
10223         linux_supports_agent.
10224         * target.h (struct target_ops) <supports_agent>: New.
10225         (target_supports_agent): New macro.
10226         * server.c (handle_general_set): Handle packet 'QAgent'.
10227         (handle_query): Send `QAgent+'.
10228         * Makefile.in (server.o): Depends on agent.h.
10229
10230 2012-03-03  Yao Qi  <yao@codesourcery.com>
10231
10232         * Makefile.in (OBS): Add agent.o.
10233         Add new rule for agent.o.
10234         Track dependence of tracepoint.c on agent.h.
10235         * tracepoint.c (run_inferior_command_1):
10236         (run_inferior_command): Call agent_run_command.
10237         (gdb_ust_connect_sync_socket): Deleted.  Move it to
10238         common/agent.c.
10239         (resume_thread, stop_thread): Likewise.
10240         (gdb_ust_socket_init): Renamed to ...
10241         (gdb_agent_socket_init): ... New.
10242         (gdb_ust_thread): Renamed to ...
10243         (gdb_agent_helper_thread): ... New.
10244         (gdb_ust_init): Move some code to ...
10245         (gdb_agent_init): ... here.  New.
10246         [HAVE_UST]: Call gdb_ust_init.
10247         (initialize_tracepoint_ftlib):  Call gdb_agent_init.
10248         * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10249         * config.in, configure: Regenerated.
10250
10251 2012-03-02  Pedro Alves  <palves@redhat.com>
10252
10253         * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10254         * linux-low.c (struct simple_pid_list): New.
10255         (stopped_pids): New a struct simple_pid_list pointer.
10256         (add_to_pid_list, pull_pid_from_list): New.
10257         (handle_extended_wait): Don't assume the first signal new children
10258         report is SIGSTOP.  Adjust call to pull_pid_from_list.
10259         (linux_wait_for_lwp): Adjust.
10260
10261 2012-03-02  Yao Qi  <yao@codesourcery.com>
10262
10263         * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10264         debug log.
10265
10266 2012-03-02  Yao Qi  <yao@codesourcery.com>
10267
10268         * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10269         `stop_pc' and `tpoint'.  Update caller.
10270
10271 2012-03-01  Maciej W. Rozycki  <macro@codesourcery.com>
10272
10273         * linux-low.h (linux_target_ops): Add regset_bitmap member.
10274         * linux-low.c (use_linux_regsets): New macro.
10275         [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10276         [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10277         (linux_register_in_regsets): New function.
10278         (usr_fetch_inferior_registers): Skip registers covered by
10279         regsets.
10280         (usr_store_inferior_registers): Likewise.
10281         (usr_fetch_inferior_registers): New macro.
10282         (usr_store_inferior_registers): Likewise.
10283         (linux_fetch_registers): Handle mixed regset/non-regset targets.
10284         (linux_store_registers): Likewise.
10285         * linux-mips-low.c (init_registers_mips_dsp_linux): New
10286         prototype.
10287         (init_registers_mips64_dsp_linux): Likewise.
10288         (init_registers_mips_linux): New macro.
10289         (init_registers_mips_dsp_linux): Likewise.
10290         (mips_dsp_num_regs): Likewise.
10291         (DSP_BASE, DSP_CONTROL): New fallback macros.
10292         (mips_base_regs): New macro.
10293         (mips_regmap): Use it.  Fix the size.
10294         (mips_dsp_regmap): New variable.
10295         (mips_dsp_regset_bitmap): Likewise.
10296         (mips_arch_setup): New function.
10297         (mips_cannot_fetch_register): Use the_low_target.regmap rather
10298         than mips_regmap.
10299         (mips_cannot_store_register): Likewise.
10300         (the_low_target): Update .arch_setup, .num_regs and .regmap
10301         initializers.  Add .regset_bitmap initializer.
10302         * linux-arm-low.c (the_low_target): Add .regset_bitmap
10303         initializer.
10304         * linux-bfin-low.c (the_low_target): Likewise.
10305         * linux-cris-low.c (the_low_target): Likewise.
10306         * linux-crisv32-low.c (the_low_target): Likewise.
10307         * linux-ia64-low.c (the_low_target): Likewise.
10308         * linux-m32r-low.c (the_low_target): Likewise.
10309         * linux-m68k-low.c (the_low_target): Likewise.
10310         * linux-ppc-low.c (the_low_target): Likewise.
10311         * linux-s390-low.c (the_low_target): Likewise.
10312         * linux-sh-low.c (the_low_target): Likewise.
10313         * linux-sparc-low.c (the_low_target): Likewise.
10314         * linux-tic6x-low.c (the_low_target): Likewise.
10315         * linux-x86-low.c (the_low_target): Likewise.
10316         * linux-xtensa-low.c (the_low_target): Likewise.
10317         * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10318         mips64-dsp-linux.o to srv_regobj.  Add mips-dsp-linux.xml,
10319         mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10320         srv_xmlfiles.
10321         * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10322         (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10323
10324 2012-02-29  Yao Qi  <yao@codesourcery.com>
10325             Pedro Alves  <palves@redhat.com>
10326
10327         * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10328         `step_over_finished' is true.
10329
10330 2012-02-27  Pedro Alves  <palves@redhat.com>
10331
10332         * linux-low.c (pid_is_stopped): Delete, moved to common/.
10333         (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10334
10335 2012-02-27  Pedro Alves  <palves@redhat.com>
10336
10337         PR server/9684
10338         * linux-low.c (pid_is_stopped): New.
10339         (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10340
10341 2012-02-25  Luis Machado  <lgustavo@codesourcery.com>
10342
10343         * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10344         of conditions.
10345
10346 2012-02-24  Maciej W. Rozycki  <macro@codesourcery.com>
10347
10348         * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10349
10350 2012-02-24  Luis Machado  <lgustavo@codesourcery>
10351
10352         * server.c (handle_query): Advertise support for target-side
10353         breakpoint condition evaluation.
10354         (process_point_options): New function.
10355         (process_serial_event): When inserting a breakpoint, check for
10356         a target-side condition that should be evaluated.
10357
10358         * mem-break.c: Include regcache.h and ax.h.
10359         (point_cond_list_t): New data structure.
10360         (breakpoint) <cond_list>: New field.
10361         (find_gdb_breakpoint_at): Make non-static.
10362         (delete_gdb_breakpoint_at): Clear any target-side
10363         conditions.
10364         (clear_gdb_breakpoint_conditions): New function.
10365         (add_condition_to_breakpoint): Likewise.
10366         (add_breakpoint_condition): Likewise.
10367         (gdb_condition_true_at_breakpoint): Likewise.
10368         (gdb_breakpoint_here): Return result directly instead
10369         of going through a local variable.
10370
10371         * mem-break.h (find_gdb_breakpoint_at): New prototype.
10372         (clear_gdb_breakpoint_conditions): Likewise.
10373         (add_breakpoint_condition): Likewise.
10374         (gdb_condition_true_at_breakpoint): Likewise.
10375
10376         * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10377         (need_step_over_p): Take target-side breakpoint condition into
10378         consideration.
10379
10380 2012-02-24  Luis Machado  <lgustavo@codesourcery>
10381
10382         * server.h: Include tracepoint.h.
10383         (agent_mem_read, agent_get_trace_state_variable_value,
10384         agent_set_trace_state_variable_value,
10385         agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10386         get_set_tsv_func_addr): New prototypes.
10387
10388         * ax.h: New include file.
10389         * ax.c: New source file.
10390
10391         * tracepoint.c: Include ax.h.
10392         (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10393         agent_expr, eval_result_type): Move to ax.h.
10394         (parse_agent_expr): Rename to ...
10395         (gdb_parse_agent_expr): ... this, make it non-static and move
10396         to ax.h.
10397         (unparse_agent_expr) Rename to ...
10398         (gdb_unparse_agent_expr): ... this, make it non-static and move
10399         to ax.h.
10400         (eval_agent_expr): Rename to ...
10401         (eval_tracepoint_agent_expr): ... this.
10402         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10403         forward declarations.
10404         (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10405         (agent_get_trace_state_variable_value): New function.
10406         (agent_set_trace_state_variable_value): New function.
10407         (cmd_qtdp): Call gdb_parse_agent_expr (...).
10408         (response_tracepoint): Call gdb_unparse_agent_expr (...).
10409         (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10410         (condition_true_at_tracepoint): Likewise.
10411         (parse_agent_expr): Rename to ...
10412         (gdb_parse_agent_expr): ... this and move to ax.c.
10413         (unparse_agent_expr): Rename to ...
10414         (gdb_unparse_agent_expr): ... this and move to ax.c.
10415         (gdb_agent_op_name): Move to ax.c.
10416         (eval_agent_expr): Rename to ...
10417         (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10418         and move to ax.c.
10419         (eval_tracepoint_agent_expr): New function.
10420         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10421         non-static.
10422         (current_insn_ptr, emit_error, struct bytecode_address): Move to
10423         ax.c.
10424         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10425         emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10426         emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10427         emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10428         emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10429         emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10430         emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10431         emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10432         (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10433         (compile_bytecodes): Remove forward declaration.
10434         (is_goto_target): Move to ax.c.
10435         (compile_bytecodes): Move to ax.c and call
10436         agent_get_trace_state_variable_value (...) and
10437         agent_set_trace_state_variable_value (...).
10438
10439         * Makefile.in: Update ax.c and IPA dependencies.
10440
10441 2012-02-24  Pedro Alves  <palves@redhat.com>
10442
10443         * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10444         (cmd_bigqtbuffer_circular): ... this.  Only handle
10445         'QTBuffer:circular:'.
10446         (handle_tracepoint_general_set): Adjust.
10447
10448 2012-02-16  Yao Qi  <yao@codesourcery.com>
10449
10450         * inferiors.c: Move code to ...
10451         * dll.c: .... here.  New.
10452         * server.h: Declare clear_dlls.
10453         * Makefile.in (SFILES): Add dll.c.
10454         (OBS): Add dll.o
10455         (dll.o): New rule.
10456
10457 2012-02-11  Yao Qi  <yao@codesourcery.com>
10458
10459         * server.c: (handle_monitor_command): Add a new parameter
10460         `own_buf'.
10461         (handle_query): Update caller.
10462
10463 2012-02-09  Joel Brobecker  <brobecker@adacore.com>
10464
10465         * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10466         * configure, config.in: Regenerate.
10467         * hostio.c: Provide an alternate implementation if HAVE_READLINK
10468         is not defined.
10469
10470 2012-02-02  Pedro Alves  <palves@redhat.com>
10471
10472         Try SIGKILL first, then PTRACE_KILL.
10473         * linux-low.c (linux_kill_one_lwp): New.
10474         (linux_kill_one_lwp): Rename to ...
10475         (kill_one_lwp_callback): ... this.  Use the new
10476         linux_kill_one_lwp.
10477
10478 2012-02-02  Pedro Alves  <palves@redhat.com>
10479
10480         * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10481         inferior.
10482
10483 2012-01-27  Pedro Alves  <palves@redhat.com>
10484
10485         * linux-low.c (linux_child_pid_to_exec_file): Delete.
10486         (elf_64_file_p): Make static.
10487         (linux_pid_exe_is_elf_64_file): New.
10488         * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10489         Delete declarations.
10490         (linux_pid_exe_is_elf_64_file): Declare.
10491         * linux-x86-low.c (x86_arch_setup): Use
10492         linux_pid_exe_is_elf_64_file.
10493
10494 2012-01-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
10495
10496         * linux-low.c (linux_wait_for_event_1): Rename to ...
10497         (linux_wait_for_event): ... here and merge it with former
10498         linux_wait_for_event - new variable wait_ptid, use it.
10499         (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10500
10501 2012-01-23  Pedro Alves  <palves@redhat.com>
10502
10503         * server.c (main): Avoid yet another case of infinite loop while
10504         detaching/killing after a longjmp.
10505
10506 2012-01-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10507
10508         Code cleanup.
10509         * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10510
10511 2012-01-20  Ulrich Weigand  <ulrich.weigand@linaro.org>
10512
10513         * hostio.c (handle_readlink): New function.
10514         (handle_vFile): Call it to handle "vFile:readlink" packets.
10515
10516 2012-01-20  Pedro Alves  <palves@redhat.com>
10517             Ulrich Weigand  <ulrich.weigand@linaro.org>
10518
10519         * server.c (handle_v_requests): Only support vAttach and vRun to
10520         start multiple processes when in extended protocol mode.
10521
10522 2012-01-17  Pedro Alves  <palves@redhat.com>
10523
10524         * tracepoint.c (initialize_tracepoint): Use mmap instead of
10525         memalign plus mprotect to allocate the scratch buffer.
10526
10527 2012-01-13  Pedro Alves  <palves@redhat.com>
10528
10529         * server.c (attach_inferior): Clear `cont_thread'.
10530
10531 2012-01-13  Pedro Alves  <palves@redhat.com>
10532
10533         * server.c (main): Avoid infinite loop while detaching/killing
10534         after a longjmp.
10535
10536 2012-01-09  Doug Evans  <dje@google.com>
10537
10538         * server.c (start_inferior): Set last_ptid in --wrapper case.
10539
10540 2012-01-06  Yao Qi  <yao@codesourcery.com>
10541
10542         * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10543         defined.
10544         [IN_PROCESS_AGENT] (debug_agent): New global variable.
10545
10546 2012-01-04  Yao Qi  <yao@codesourcery.com>
10547
10548         * tracepoint.c (cmd_qtdp): Print debug message
10549         for static tracepoint.
10550
10551 2012-01-04  Yao Qi  <yao@codesourcery.com>
10552
10553         * tracepoint.c (trace_vdebug): Differentiate debug message
10554         between gdbserver and IPA.
10555
10556 2012-01-03  Yao Qi  <yao@codesourcery.com>
10557
10558         * tracepoint.c (tracepoint_was_hit): Don't collect for
10559         static tracepoint.
10560
10561 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
10562
10563         * terminal.h: Reformat copyright header.
10564
10565 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
10566
10567         * server.c (gdbserver_version): Update copyright year.
10568         * gdbreplay.c (gdbreplay_version): Likewise.
10569
10570 2011-12-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
10571
10572         * linux-low.c (linux_create_inferior): Put empty if clause for write.
10573
10574         Revert:
10575         2011-12-18  Hui Zhu  <teawater@gmail.com>
10576         * linux-low.c (linux_create_inferior): Save return value to ret.
10577
10578 2011-12-18  Hui Zhu  <teawater@gmail.com>
10579
10580         * linux-low.c (linux_create_inferior): Save return value to ret.
10581
10582 2011-12-16  Doug Evans  <dje@google.com>
10583
10584         * linux-low.c (linux_create_inferior): If stdio connection,
10585         redirect stdin from /dev/null, stdout to stderr.
10586         * remote-utils.c (remote_is_stdio): New static global.
10587         (remote_connection_is_stdio): New function.
10588         (remote_prepare): Handle stdio connection.
10589         (remote_open): Ditto.
10590         (remote_close): Don't close stdin for stdio connections.
10591         (read_prim,write_prim): New functions.  Replace all calls to
10592         read/write to these.
10593         * server.c (main): Watch for "-" argument.  Move call to
10594         remote_prepare before start_inferior.
10595         * server.h (STDIO_CONNECTION_NAME): New macro.
10596         (remote_connection_is_stdio): Declare.
10597
10598         * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10599         in debugging output.
10600
10601 2011-12-15  Yao Qi  <yao@codesourcery.com>
10602
10603         * tracepoint.c: Include sys/syscall.h.
10604         (gdb_ust_thread): Remove preprocessor conditional.
10605
10606 2011-12-14  Pedro Alves  <pedro@codesourcery.com>
10607
10608         * linux-low.c (linux_detach_one_lwp): Call
10609         the_low_target.prepare_to_resume before detaching.
10610
10611 2011-12-14  Yao Qi  <yao@codesourcery.com>
10612
10613         * tracepoint.c (gdb_ust_thread): Don't ignore return value
10614         of write.
10615
10616 2011-12-14  Yao Qi  <yao@codesourcery.com>
10617
10618         * i386-low.c (i386_low_stopped_data_address): Initialize local
10619         variable `control'.
10620
10621 2011-12-13  Pedro Alves  <pedro@codesourcery.com>
10622
10623         PR remote/13492
10624
10625         * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10626         DR_CONTROL unless necessary.  Extend comments.
10627         * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10628         DR0-3 if not used.  If any watchpoint was set, clear DR_STATUS.
10629
10630 2011-12-13  Yao Qi  <yao@codesourcery.com>
10631
10632         * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10633         macros.
10634         (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10635
10636 2011-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
10637
10638         * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10639         Print new debug message for such case.
10640
10641 2011-12-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
10642
10643         Fix overlapping memcpy.
10644         * mem-break.c (set_raw_breakpoint_at): New variable buf.  Use it for
10645         the read_inferior_memory transfer.
10646         (delete_fast_tracepoint_jump): New variable buf.  Use it for the
10647         write_inferior_memory transfer.
10648         (set_fast_tracepoint_jump): New variable buf.  Use it for the
10649         read_inferior_memory and write_inferior_memory transfers.
10650         (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10651         (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10652         Use it for the write_inferior_memory transfer.
10653         (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10654         buffers.
10655
10656 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
10657
10658         * linux-low.c (fetch_register, store_register): Make code
10659         consistent, fix formatting.
10660
10661 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
10662
10663         * linux-low.c (usr_store_inferior_registers): Factor out code
10664         to handle individual registers into...
10665         (store_register): ... this new function.
10666
10667 2011-12-06  Ulrich Weigand  <uweigand@de.ibm.com>
10668
10669         * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10670         (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10671         (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10672         (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10673         (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10674         (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10675         * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10676         (srv_xmlfiles): Add new XML files.
10677
10678         * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10679         and <sys/uio.h>.
10680         (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10681         (init_registers_s390_linux32v1): Add prototype.
10682         (init_registers_s390_linux32v2): Likewise.
10683         (init_registers_s390_linux64v1): Likewise.
10684         (init_registers_s390_linux64v2): Likewise.
10685         (init_registers_s390x_linux64v1): Likewise.
10686         (init_registers_s390x_linux64v2): Likewise.
10687         (s390_num_regs): Increment to 52.
10688         (s390_regmap): Add orig_r2 register.
10689         (s390_num_regs_3264): Increment to 68.
10690         (s390_regmap_3264): Add orig_r2 register.
10691         (s390_collect_ptrace_register): Handle orig_r2 register.
10692         (s390_supply_ptrace_register): Likewise.
10693         (s390_fill_last_break): New function.
10694         (s390_store_last_break): Likewise.
10695         (s390_fill_system_call): New function.
10696         (s390_store_system_call): Likewise.
10697         (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10698         register sets.
10699         (s390_check_regset): New function.
10700         (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10701         NT_S390_SYSTEM_CALL regsets and use appropriate description.
10702         Update target_regsets for available register sets.
10703
10704 2011-12-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
10705             Jan Kratochvil  <jan.kratochvil@redhat.com>
10706
10707         * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10708         (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10709         New.
10710         (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10711         * linux-low.h (struct process_info_private): New member r_debug.
10712         * server.c (handle_qxfer_libraries): Call
10713         the_target->qxfer_libraries_svr4.
10714         (handle_qxfer_libraries_svr4): New function.
10715         (qxfer_packets): New entry "libraries-svr4".
10716         (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10717         * target.h (struct target_ops): New member qxfer_libraries_svr4.
10718         * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10719         PACKET_qXfer_libraries_svr4.
10720
10721 2011-11-30  Ulrich Weigand  <uweigand@de.ibm.com>
10722
10723         * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10724         PSW address/mask between 8-byte and 16-byte formats.
10725         (s390_supply_ptrace_register): Likewise.
10726         (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10727         basic addressing mode bit.
10728
10729 2011-11-24  Stan Shebs  <stan@codesourcery.com>
10730
10731         * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10732
10733 2011-11-17  Stan Shebs  <stan@codesourcery.com>
10734
10735         * tracepoint.c (struct tracepoint): New field traceframe_usage.
10736         (tracing_start_time): New global.
10737         (tracing_stop_time): New global.
10738         (tracing_user_name): New global.
10739         (tracing_notes): New global.
10740         (tracing_stop_note): New global.
10741         (cmd_qtstart): Set traceframe_usage, start_time.
10742         (stop_tracing): Set stop_time.
10743         (cmd_qtstatus): Report additional status.
10744         (cmd_qtp): New function.
10745         (handle_tracepoint_query): Call it.
10746         (cmd_qtnotes): New function.
10747         (handle_tracepoint_general_set): Call it.
10748         (get_timestamp): Rename from tsv_get_timestamp.
10749
10750 2011-11-14  Stan Shebs  <stan@codesourcery.com>
10751             Kwok Cheung Yeung  <kcy@codesourcery.com>
10752
10753         * linux-x86-low.c (small_jump_insn): New.
10754         (i386_install_fast_tracepoint_jump_pad): Add arguments for
10755         trampoline and error message, build a trampoline and issue a small
10756         jump instruction to it.
10757         (x86_install_fast_tracepoint_jump_pad): Add arguments for
10758         trampoline and error message.
10759         (x86_get_min_fast_tracepoint_insn_len): New.
10760         (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10761         * linux-low.h (struct linux_target_ops): Add arguments to
10762         install_fast_tracepoint_jump_pad operation, add new operation.
10763         * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10764         arguments.
10765         (linux_get_min_fast_tracepoint_insn_len): New function.
10766         (linux_target_op): Add new operation.
10767         * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10768         (gdb_trampoline_buffer_end): Ditto.
10769         (gdb_trampoline_buffer_error): Ditto.
10770         (struct ipa_sym_addresses): Add fields for new IPA variables.
10771         (symbol_list): Add entries for new IPA variables.
10772         (struct tracepoint): Add fields to hold the address range of the
10773         trampoline used by the tracepoint.
10774         (trampoline_buffer_head): New static variable.
10775         (trampoline_buffer_tail): Ditto.
10776         (claim_trampoline_space): New function.
10777         (have_fast_tracepoint_trampoline_buffer): New function.
10778         (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10779         structure.
10780         (install_fast_tracepoint): Ditto, also add error buffer argument.
10781         (cmd_qtminftpilen): New function.
10782         (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10783         (fast_tracepoint_from_trampoline_address): New function.
10784         (fast_tracepoint_collecting): Handle trampoline as part of jump
10785         pad space.
10786         (set_trampoline_buffer_space): New function.
10787         (initialize_tracepoint): Initialize new IPA variables.
10788         * target.h (struct target_ops): Add arguments to
10789         install_fast_tracepoint_jump_pad operation, add new
10790         get_min_fast_tracepoint_insn_len operation.
10791         (target_get_min_fast_tracepoint_insn_len): New.
10792         (install_fast_tracepoint_jump_pad): Add arguments.
10793         * server.h (IPA_BUFSIZ): Define.
10794         * linux-i386-ipa.c: Include extra header files.
10795         (initialize_fast_tracepoint_trampoline_buffer): New function.
10796         (initialize_low_tracepoint): Call it.
10797         * server.h (set_trampoline_buffer_space): Declare.
10798         (claim_trampoline_space): Ditto.
10799         (have_fast_tracepoint_trampoline_buffer): Ditto.
10800
10801 2011-11-14  Yao Qi  <yao@codesourcery.com>
10802
10803         * server.c (handle_query): Handle InstallInTrace for qSupported.
10804         * tracepoint.c (add_tracepoint): Sort list.
10805         (install_tracepoint, download_tracepoint): New.
10806         (cmd_qtdp): Call them to install and download tracepoints.
10807         (sort_tracepoints): Removed.
10808         (cmd_qtstart): Update.
10809
10810 2011-11-14  Yao Qi  <yao@codesourcery.com>
10811
10812         * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10813         * mem-break.h: Declare.
10814         * tracepoint.c (cmd_qtstart): Move some code to ...
10815         (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10816         New.
10817         (download_tracepoints): Move some code to ...
10818         (download_tracepoint_1): ... here.  New.
10819
10820 2011-11-08  Yao Qi  <yao@codesourcery.com>
10821
10822         * remote-utils.c (relocate_instruction): A comment fix.
10823
10824 2011-11-07  Joel Brobecker  <brobecker@adacore.com>
10825
10826         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10827         (i386_dr_low_get_control, i386_dr_low_get_status): Use
10828         dr_status_mirror and dr_control_mirror from debug_reg_state.
10829         (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10830         (i386_initial_stuff): Remove use of deleted globals.
10831         (i386_get_thread_context, i386_set_thread_context,
10832         i386_thread_added): Use dr_status_mirror and dr_control_mirror
10833         from debug_reg_state.
10834
10835 2011-11-05  Yao Qi  <yao@codesourcery.com>
10836
10837         * tracepoint.c (gdb_collect): Loop over tracepoints of same
10838         address as TPOINT's.
10839
10840 2011-11-02  Stan Shebs  <stan@codesourcery.com>
10841
10842         * tracepoint.c (agent_mem_read_string): New function.
10843         (eval_agent_expr): Call it for tracenz.
10844         * server.c (handle_query): Report support for tracenz.
10845
10846 2011-11-02  Yao Qi  <yao@codesourcery.com>
10847
10848         * tracepoint.c (cmd_qtstart): Remove unused local variables.
10849
10850 2011-11-02  Yao Qi  <yao@codesourcery.com>
10851
10852         * target.h: Fix a typo in comment.
10853
10854 2011-10-31  Pedro Alves  <pedro@codesourcery.com>
10855
10856         * mem-break.c (check_mem_write): Add `myaddr' parameter.  Don't
10857         clobber the breakpoints' shadows with fast tracepoint jumps.
10858         * mem-break.h (check_mem_write): Add `myaddr' parameter.
10859         * target.c (write_inferior_memory): Also pass MYADDR down to
10860         check_mem_write.
10861
10862 2011-10-07  Ulrich Weigand  <ulrich.weigand@linaro.org>
10863
10864         * configure.ac: Check support for personality routine.
10865         * configure: Regenerate.
10866         * config.in: Likewise.
10867         * linux-low.c: Include <sys/personality.h>.
10868         Define ADDR_NO_RANDOMIZE if necessary.
10869         (linux_create_inferior): Disable address space randomization when
10870         forking inferior, if requested.
10871         (linux_supports_disable_randomization): New function.
10872         (linux_target_ops): Install it.
10873         * server.h (disable_randomization): Declare.
10874         * server.c (disable_randomization): New global variable.
10875         (handle_general_set): Handle QDisableRandomization.
10876         (handle_query): Likewise for qSupported.
10877         (main): Support --disable-randomization and --no-disable-randomization
10878         command line arguments.
10879         * target.h (struct target_ops): Add supports_disable_randomization.
10880         (target_supports_disable_randomization): New macro.
10881
10882 2011-09-29  Mike Frysinger  <vapier@gentoo.org>
10883
10884         * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
10885         ifdef check.
10886         [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
10887         [!PT_GETDSBT] (target_loadmap): New definition.
10888         (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
10889         (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
10890         LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
10891         and PT_GETDSBT to LINUX_LOADMAP.
10892         [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
10893         (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
10894
10895 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
10896
10897         * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
10898         (arm_linux_hwbp_cap): New static variable.
10899         (arm_linux_get_hwbp_cap): Replace by ...
10900         (arm_linux_init_hwbp_cap): ... this new function.
10901         (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
10902         (arm_linux_get_hw_watchpoint_count): Likewise.
10903         (arm_linux_get_hw_watchpoint_max_length): Likewise.
10904         (arm_arch_setup): Call arm_linux_init_hwbp_cap.
10905         (arm_prepare_to_resume): Use perror_with_name instead of error.
10906
10907 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
10908
10909         * linux-arm-low.c: Include <signal.h>.
10910         (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
10911         (struct arm_linux_hwbp_cap): New data type.
10912         (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
10913         (struct arm_linux_hw_breakpoint): New data type.
10914         (MAX_BPTS, MAX_WPTS): Define.
10915         (struct arch_process_info, struct arch_lwp_info): New data types.
10916         (arm_linux_get_hwbp_cap): New function.
10917         (arm_linux_get_hw_breakpoint_count): Likewise.
10918         (arm_linux_get_hw_watchpoint_count): Likewise.
10919         (arm_linux_get_hw_watchpoint_max_length): Likewise.
10920         (arm_hwbp_control_initialize): Likewise.
10921         (arm_hwbp_control_is_enabled): Likewise.
10922         (arm_hwbp_control_is_initialized): Likewise.
10923         (arm_hwbp_control_disable): Likewise.
10924         (arm_linux_hw_breakpoint_equal): Likewise.
10925         (arm_linux_hw_point_initialize): Likewise.
10926         (struct update_registers_data): New data structure.
10927         (update_registers_callback: New function.
10928         (arm_insert_point): Likewise.
10929         (arm_remove_point): Likewise.
10930         (arm_stopped_by_watchpoint): Likewise.
10931         (arm_stopped_data_address): Likewise.
10932         (arm_new_process): Likewise.
10933         (arm_new_thread): Likewise.
10934         (arm_prepare_to_resume): Likewise.
10935         (the_low_target): Register arm_insert_point, arm_remove_point,
10936         arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
10937         arm_new_thread, and arm_prepare_to_resume.
10938
10939 2011-09-15  Stan Shebs  <stan@codesourcery.com>
10940
10941         * server.h (struct emit_ops): Add compare-goto fields.
10942         * tracepoint.c (gdb_agent_op_sizes): New table.
10943         (emit_eq_goto): New function.
10944         (emit_ne_goto): New function.
10945         (emit_lt_goto): New function.
10946         (emit_le_goto): New function.
10947         (emit_gt_goto): New function.
10948         (emit_ge_goto): New function.
10949         (is_goto_target): New function.
10950         (compile_bytecodes): Recognize special cases of compare-goto
10951         combinations and call specialized emitters for them.
10952         * linux-x86-low.c (amd64_emit_eq_goto): New function.
10953         (amd64_emit_ne_goto): New function.
10954         (amd64_emit_lt_goto): New function.
10955         (amd64_emit_le_goto): New function.
10956         (amd64_emit_gt_goto): New function.
10957         (amd64_emit_ge_goto): New function.
10958         (amd64_emit_ops): Add the new functions.
10959         (i386_emit_eq_goto): New function.
10960         (i386_emit_ne_goto): New function.
10961         (i386_emit_lt_goto): New function.
10962         (i386_emit_le_goto): New function.
10963         (i386_emit_gt_goto): New function.
10964         (i386_emit_ge_goto): New function.
10965         (i386_emit_ops): Add the new functions.
10966
10967 2011-09-08  Stan Shebs  <stan@codesourcery.com>
10968
10969         * linux-x86-low.c (i386_emit_prologue): Save %ebx.
10970         (i386_emit_epilogue): Restore %ebx.
10971
10972 2011-08-31  Jie Zhang  <jzhang918@gmail.com>
10973
10974         * server.c (step_thread): Remove definition.
10975         (process_serial_event): Don't handle Hs.
10976         * server.h (step_thread): Remove declaration.
10977         * target.c (set_desired_inferior): Remove use of step_thread.
10978
10979 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
10980
10981         * linux-low.c: Include linux-procfs.h.
10982         (linux_attach_lwp_1): Update comments.
10983         (linux_attach): Scan for existing threads when attaching to a
10984         process that is the tgid.
10985         * Makefile.in: Update dependencies.
10986
10987 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
10988
10989         * configure.srv: Add linux-procfs.o dependencies.
10990
10991 2011-08-14  Yao Qi  <yao@codesourcery.com>
10992
10993         * target.h (struct target_ops): Fix indent.
10994         * win32-low.c (win32_target_ops): Fix comment.
10995
10996 2011-08-14  Andrew Jenner  <andrew@codesourcery.com>
10997             Yao Qi  <yao@codesourcery.com>
10998
10999         * Makefile.in (clean): Remove tic6x-*.c files.
11000         (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11001         (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11002         (tic6x-c64xp-linux.c): Likewise.
11003         * configure.srv: Add support for tic6x-*-uclinux.
11004         * linux-tic6x-low.c: New.
11005         * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11006
11007 2011-08-14  Andrew Stubbs <ams@codesourcery.com>
11008             Yao Qi  <yao@codesourcery.com>
11009
11010         * target.h (struct target_ops): Add read_loadmap.
11011         * linux-low.c (struct target_loadseg): New type.
11012         (struct target_loadmap): New type.
11013         (linux_read_loadmap): New function.
11014         (linux_target_ops): Add linux_read_loadmap.
11015         * server.c (handle_query): Support qXfer:fdpic:read packet.
11016         * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11017         to NULL.
11018
11019 2011-08-05  Eli Zaretskii  <eliz@gnu.org>
11020
11021         * win32-low.c: Include <stdint.h>.
11022
11023 2011-07-22  Pedro Alves  <pedro@codesourcery.com>
11024
11025         * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11026         to the inferior here.
11027         (i386_remove_aligned_watchpoint): Ditto.
11028         (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11029         fit part of the watchpoint in the debug registers.
11030         (i386_update_inferior_debug_regs): New.
11031         (i386_low_insert_watchpoint): Work on a local mirror of the debug
11032         registers, and only update the inferior on success.
11033         (i386_low_remove_watchpoint): Ditto.
11034
11035 2011-07-22  Kwok Cheung Yeung  <kcy@codesourcery.com>
11036
11037         * linux-low.c (compare_ints, unique, list_threads, show_process,
11038         linux_core_of_thread): Delete.
11039         (linux_target_ops): Change linux_core_of_thread to
11040         linux_common_core_of_thread.
11041         (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11042         * utils.c (malloc_failure): Change type of argument.
11043         (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11044         * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11045         common/linux-osdata.c, common/ptid.c and common/buffer.c.
11046         (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11047         (IPA_OBJS): Add common-utils-ipa.o.
11048         (ptid_h, linux_osdata_h): New macros.
11049         (server_h): Add common/common-utils.h, common/xml-utils.h,
11050         common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11051         common/ptid.h.
11052         (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11053         ptid.o, buffer.o): New rules.
11054         (linux-low.o): Add common/linux-osdata.h as a dependency.
11055         * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11056         * configure.ac: Add AC_HEADER_DIRENT check.
11057         * config.in: Regenerate.
11058         * configure: Regenerate.
11059         * remote-utils.c (xml_escape_text): Delete.
11060         (buffer_grow, buffer_free, buffer_init, buffer_finish,
11061         buffer_xml_printf): Move to common/buffer.c.
11062         * server.c (main): Remove call to initialize_inferiors.
11063         * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11064         ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11065         ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11066         internal_error, gdb_assert, gdb_assert_fail): Delete.
11067         (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11068         buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11069         common/buffer.h.
11070         * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11071         ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11072         initialize_inferiors): Delete.
11073
11074 2011-07-20  Pedro Alves  <pedro@codesourcery.com>
11075
11076         * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11077         symbol error.
11078
11079 2011-05-31  Pedro Alves  <pedro@codesourcery.com>
11080
11081         * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11082         assertion.
11083         * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11084
11085 2011-05-26  Yao Qi  <yao@codesourcery.com>
11086
11087         * Makefile.in (thread-db.o): Track dependence to
11088         common/gdb_thread_db.h.
11089         * thread-db.c: include gdb_thread_db.h from right place.
11090
11091 2011-05-16  Adrian Cornish  <gnu@bluedreamer.com>
11092
11093         * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11094         __FILE__ and __LINE__ to internal_error.
11095
11096 2011-05-13  Doug Evans  <dje@google.com>
11097
11098         * thread-db.c (try_thread_db_load_from_sdir): New function.
11099         (try_thread_db_load_from_dir): New function.
11100         (thread_db_load_search): Handle $sdir, ignore $pdir.
11101         Remove trying of system directories if search of
11102         libthread-db-search-path fails, that is now done via $sdir.
11103
11104 2011-05-12  Kwok Cheung Yeung  <kcy@codesourcery.com>
11105
11106         * server.c (handle_query): Add EnableDisableTracepoints to the list
11107         of supported features.
11108         * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11109         tracepoints.
11110         (cmd_qtenable_disable): New.
11111         (cmd_qtstart): Install tracepoints even if disabled.
11112         (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11113         receiving a QTEnable or QTDisable packet.
11114         (gdb_collect): Skip data collection if fast tracepoint is disabled.
11115         (ust_marker_to_static_tracepoint): Do not ignore disabled static
11116         tracepoints.
11117         (gdb_probe): Skip data collection if static tracepoint is disabled.
11118
11119 2011-05-10  Doug Evans  <dje@google.com>
11120
11121         * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11122
11123 2011-05-04  Doug Evans  <dje@google.com>
11124
11125         * linux-low.c (linux_join): Skip process lookup.
11126         * spu-low.c (spu_join): Ditto.
11127         * server.c (join_inferiors_callback): Delete.
11128         (process_serial_event): For 'D' packet (detach) call join_inferior
11129         directly.
11130
11131 2011-05-04  Joseph Myers  <joseph@codesourcery.com>
11132
11133         * README: Don't mention xscale*-*-linux*.
11134         * configure.srv (xscale*-*-linux*): Don't handle target.
11135
11136 2011-04-27  Nathan Froyd  <froydnj@codesourcery.com>
11137
11138         * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11139         casting pointers.
11140         (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11141         (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11142         (i386_emit_void_call_2): Likewise.
11143
11144 2011-04-26  Yao Qi  <yao@codesourcery.com>
11145
11146         * linux-low.c: Move common macros to linux-ptrace.h.
11147         Include linux-ptrace.h.
11148         * Makefile.in (linux_ptrace_h): New.
11149         (linux-low.o): Depends on linux-ptrace.h.
11150
11151 2011-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
11152
11153         * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11154         RUN_ONCE.  Comment for the LISTEN_DESC delete_file_handler call.
11155         (remote_prepare): New function with most of the TCP code from ...
11156         (remote_open): ... here.  Detect PORT here unconditionally.  Move also
11157         setting transport_is_reliable.
11158         * server.c (run_once): New variable.
11159         (gdbserver_usage): Document it.
11160         (main): Set run_once for `--once'.  Call remote_prepare.  Exit after
11161         the first run if RUN_ONCE.
11162         * server.h (run_once, remote_prepare): New declarations.
11163
11164 2011-04-19  Tom Tromey  <tromey@redhat.com>
11165
11166         * win32-low.c (handle_load_dll): Remove duplicate "the".
11167
11168 2011-04-07  Pierre Muller  <muller@ics.u-strasbg.fr>
11169
11170         Remove support for old Cygwin 1.5 versions.
11171         * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11172         function to avoid warning.
11173         (win32_add_one_solib): Use cygwin_conv_path function to avoid
11174         warning.
11175
11176 2011-03-18  Pierre Muller  <muller@ics.u-strasbg.fr>
11177
11178         * gdbserver/server.h (Macro _): Define it if not available.
11179
11180 2011-03-14  Michael Snyder  <msnyder@vmware.com>
11181
11182         * hostio.c (handle_close): Remove unnecessary null test.
11183
11184 2011-03-10  Joel Brobecker  <brobecker@adacore.com>
11185
11186         * Makefile.in (maintainer-clean realclean distclean): Remove
11187         "make ...  subdir_do" command.
11188
11189 2011-03-10  Michael Snyder  <msnyder@vmware.com>
11190
11191         * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11192
11193         * server.c (handle_v_run): Free alloced buffer on early return.
11194
11195 2011-03-09  Yao Qi  <yao@codesourcery.com>
11196
11197         Revert:
11198         2011-03-04  Yao Qi  <yao@codesourcery.com>
11199
11200         * Makefile.in: Remove GNU make feature --directory.
11201
11202         2011-03-05  Yao Qi  <yao@codesourcery.com>
11203
11204         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11205         (subdir_do): New make target.  Copied from gdb/Makefile.
11206         (maintainer-clean, realclean, distclean, clean): Call corresponding
11207         make targets in common/Makefile.
11208
11209         2011-02-11  Yao Qi  <yao@codesourcery.com>
11210
11211         * configure.ac: Call AC_PROG_RANLIB.
11212         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
11213         * configure: Regenerate.
11214
11215 2011-03-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
11216
11217         * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11218
11219 2011-03-06  Yao Qi  <yao@codesourcery.com>
11220
11221         * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11222
11223 2011-03-05  Yao Qi  <yao@codesourcery.com>
11224
11225         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11226         (subdir_do): New make target.  Copied from gdb/Makefile.
11227         (maintainer-clean, realclean, distclean, clean): Call corresponding
11228         make targets in common/Makefile.
11229
11230 2011-03-04  Yao Qi  <yao@codesourcery.com>
11231
11232         * Makefile.in: Remove GNU make feature --directory.
11233
11234 2011-03-04  Michael Snyder  <msnyder@vmware.com>
11235
11236         * server.c (queue_stop_reply): Call xmalloc not malloc.
11237
11238 2011-03-02  Michael Snyder  <msnyder@vmware.com>
11239
11240         * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11241
11242 2011-02-28  Michael Snyder  <msnyder@vmware.com>
11243
11244         * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11245         (cmd_qtframe): Ditto.
11246         (cmd_qtbuffer): Ditto.
11247         (cmd_bigqtbuffer): Ditto.
11248
11249         * utils.c (decimal2str): Initialize 'width' to nine, then
11250         don't mess with it.
11251
11252 2011-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11253
11254         * hostio.c (require_data): Free *data, not data.
11255
11256 2011-02-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
11257
11258         * hostio.c (require_data): Use free, not xfree.
11259
11260 2011-02-27  Michael Snyder  <msnyder@vmware.com>
11261
11262         * server.c (handle_query): Discard unused value.
11263
11264         * hostio.c (require_data): Free malloc memory before returning
11265         error.
11266
11267 2011-02-26  Michael Snyder  <msnyder@vmware.com>
11268
11269         * linux-low.c (list_threads): Call closedir for dirent.
11270
11271 2011-02-27  Michael Snyder  <msnyder@vmware.com>
11272
11273         * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11274         a case statement falls through.
11275
11276         * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11277
11278         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11279         in comparison.
11280
11281 2011-02-26  Michael Snyder  <msnyder@vmware.com>
11282
11283         * utils.c (decimal2str): Eliminate dead code and dead param.
11284         (pulongest): Drop dead param from call to decimal2str.
11285         (plongest): Ditto.
11286
11287 2011-02-24  Joel Brobecker  <brobecker@adacore.com>
11288
11289         Revert the following patch (not approved yet):
11290         2011-02-21  Hui Zhu  <teawater@gmail.com>
11291         * tracepoint.c (tp_printf): New function.
11292         (eval_agent_expr): Handle gdb_agent_op_printf.
11293
11294 2011-02-21  Hui Zhu  <teawater@gmail.com>
11295
11296         * tracepoint.c (tp_printf): New function.
11297         (eval_agent_expr): Handle gdb_agent_op_printf.
11298
11299 2011-02-18  Tom Tromey  <tromey@redhat.com>
11300
11301         * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11302         (tracepoint.o): Likewise.
11303         * tracepoint.c (enum gdb_agent_op): Use ax.def.
11304         (gdb_agent_op_names): Likewise.
11305
11306 2011-02-18  Tom Tromey  <tromey@redhat.com>
11307
11308         * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11309         gdb_agent_op_rot>: New constants.
11310         (gdb_agent_op_names): Add pick and roll.
11311         (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11312         cases.
11313
11314 2011-02-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
11315
11316         * aclocal.m4: Regenerated with aclocal-1.11.1.
11317
11318 2011-02-14  Pedro Alves  <pedro@codesourcery.com>
11319
11320         * server.c (handle_qxfer_traceframe_info): New.
11321         (qxfer_packets): Register "traceframe-info".
11322         (handle_query): Report support for qXfer:traceframe-info:read+.
11323         * tracepoint.c (match_blocktype): New.
11324         (traceframe_find_block_type): Rename to ...
11325         (traceframe_walk_blocks): ... this.  Add callback filter argument,
11326         and use it.
11327         (traceframe_find_block_type): New, reimplemented on top of
11328         traceframe_walk_blocks.
11329         (build_traceframe_info_xml): New.
11330         (traceframe_read_info): New.
11331         * server.h (traceframe_read_info): Declare.
11332
11333 2011-02-11  Yao Qi  <yao@codesourcery.com>
11334
11335         * configure.ac: Call AC_PROG_RANLIB.
11336         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
11337         * configure: Regenerate.
11338
11339 2011-02-07  Pedro Alves  <pedro@codesourcery.com>
11340
11341         * server.c (gdb_read_memory): Change return semantics to allow
11342         partial transfers.
11343         (handle_search_memory_1): Adjust.
11344         (process_serial_event) <'m' packet>: Handle partial transfers.
11345         * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11346
11347 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
11348
11349         * regcache.c (init_register_cache): Initialize
11350         regcache->register_status.
11351         (free_register_cache): Release regcache->register_status.
11352         (regcache_cpy): Copy register_status.
11353         (registers_to_string): Print 'x's for unavailable registers.
11354         (supply_register): Mark the register's status valid or
11355         unavailable, depending on whether a buffer was passed in or not.
11356         (supply_register_zeroed): New.
11357         (supply_regblock): Mark the registers' status valid or
11358         unavailable, depending on whether a buffer was passed in or not.
11359         * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11360         (struct regcache): New `register_status' field.
11361         (supply_register_zeroed): Declare.
11362         * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11363         supply_register_zeroed, rather than passing a NULL buffer to
11364         supply_register.
11365         * tracepoint.c (fetch_traceframe_registers): Update comment.
11366
11367 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
11368
11369         * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11370         buffer explicit.
11371
11372 2011-01-25  Pedro Alves  <pedro@codesourcery.com>
11373
11374         * server.h (decode_xfer_write): Change prototype.
11375         * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11376         and don't extract the annex here.
11377         * server.c (decode_xfer_read): Remove `annex' parameter,
11378         and don't extract the annex here.
11379         (decode_xfer): New.
11380         (struct qxfer): New.
11381         (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11382         (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11383         (handle_qxfer_statictrace): New functions, abstracted out from
11384         handle_query, and made to use the struct qxfer interface.
11385         (handle_threads_qxfer_proper): Rename to ...
11386         (handle_qxfer_threads_proper): ... this.
11387         (handle_threads_qxfer): Rename to ...
11388         (handle_qxfer_threads): ... this.  Adjust.
11389         (qxfer_packets): New array.
11390         (handle_qxfer): New function.
11391         (handle_query): Use handle_qxfer.
11392
11393 2011-01-05  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>
11394
11395         * gdbreplay.c: Shorten lines of >= 80 columns.
11396         * linux-low.c: Ditto.
11397         * linux-ppc-low.c: Ditto.
11398         * linux-s390-low.c: Ditto.
11399         * linux-sparc-low.c: Ditto.
11400         * linux-x86-low.c: Ditto.
11401         * linux-xtensa-low.c: Ditto.
11402         * mem-break.c: Ditto.
11403         * nto-low.c: Ditto.
11404         * regcache.h: Ditto.
11405         * remote-utils.c: Ditto.
11406         * server.c: Ditto.
11407         * server.h: Ditto.
11408         * thread-db.c: Ditto.
11409         * tracepoint.c: Ditto.
11410         * utils.c: Ditto.
11411         * win32-low.h: Ditto.
11412
11413 2011-01-05  Joel Brobecker  <brobecker@adacore.com>
11414
11415         * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11416         update.
11417
11418 2011-01-01  Joel Brobecker  <brobecker@adacore.com>
11419
11420         * server.c (gdbserver_version): Update copyright year in version
11421         output.
11422         * gdbreplay.c (gdbreplay_version): Ditto.
11423
11424 2010-12-29  Jie Zhang  <jie.zhang@analog.com>
11425
11426         * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11427         * linux-bfin-low.c: New file.
11428         * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11429         PT_DATA_ADDR for BFIN targets.
11430         * Makefile.in (SFILES): Add linux-bfin-low.c.
11431         (clean): Remove reg-bfin.c.
11432         (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11433         * README: Mention supported Blackfin targets.
11434
11435 2010-12-23  Mike Frysinger  <vapier@gentoo.org>
11436
11437         * .gitignore: New file.
11438
11439 2010-11-16  Mike Frysinger  <vapier@gentoo.org>
11440
11441         * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11442
11443 2010-10-22  Jie Zhang  <jie@codesourcery.com>
11444
11445         * Makefile.in: Add FLAGS_TO_PASS variable.
11446         (install): Remove dependency of install-only and recursively
11447         invoke make for install-only.
11448
11449 2010-10-04  Doug Evans  <dje@google.com>
11450
11451         * Makefile.in (uninstall): Use $(DESTDIR).
11452
11453 2010-09-24  Pedro Alves  <pedro@codesourcery.com>
11454
11455         PR gdb/11842
11456
11457         * linux-x86-low.c (compat_siginfo_from_siginfo)
11458         (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11459         si_code is < 0.  Check for si_code == SI_TIMER before checking for
11460         si_code < 0.
11461
11462 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
11463
11464         * lynx-i386-low.c: New file.
11465         * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11466
11467 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
11468
11469         * lynx-low.c (ptrace_request_to_str): Remove handling for
11470         request values that have been removed in LynxOS 5.x.
11471
11472 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
11473
11474         * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11475         <ptrace.h>
11476
11477 2010-09-09  Nathan Sidwell  <nathan@codesourcery.com>
11478
11479         * configure.ac: Add --enable-inprocess-agent option.
11480         * configure: Rebuilt.
11481
11482 2010-09-06  Yao Qi  <yao@codesourcery.com>
11483
11484         * linux-low.c (linux_kill): Remove unused variable.
11485         (linux_stabilize_threads): Likewise.
11486         * server.c (start_inferior): Likewise.
11487         (queue_stop_reply_callback): Likewise.
11488         * tracepoint.c (do_action_at_tracepoint): Likewise.
11489
11490 2010-09-06  Yao Qi  <yao@codesourcery.com>
11491
11492         * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11493         on return.
11494
11495 2010-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
11496
11497         * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11498
11499 2010-09-06  Pedro Alves  <pedro@codesourcery.com>
11500
11501         * Makefile.in (install-only): Replace $IPA_DEPFILES with
11502         "$(IPA_DEPFILES)".
11503
11504 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
11505
11506         * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11507         gdbserver/lynx-ppc-low.c: New files.
11508         * Makefile.in (lynx_low_h): New variable.
11509         (lynx-low.o, lynx-ppc-low.o): New rules.
11510         * configure.ac: On LynxOS, link with -lnetinet.
11511         * configure.srv: Add handling of powerpc-*-lynxos* targets.
11512         * configure: regenerate.
11513
11514 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
11515
11516         * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11517         * configure.ac: Add check for vasprintf and vsnprintf.
11518         * configure, config.in: Regenerate.
11519         * server.h (vasprintf, vsnprintf): Add conditional declarations.
11520
11521 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
11522
11523         * gdbreplay.c: Move include of alloca.h up, next to include of
11524         malloc.h.
11525         * server.h: Add include of malloc.h.
11526         * mem-break.c: Remove include of malloc.h.
11527         * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11528
11529 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
11530
11531         * Makefile.in (memmem.o): Build with -Wno-error.
11532
11533 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
11534
11535         * utils.c (xsnprintf): Make non-static.
11536         * server.h: Add xsnprintf declaration.
11537         * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11538         replace calls to snprintf by calls to xsnprintf throughout.
11539
11540 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
11541
11542         * configure.ac: Add configure check for alloca.
11543         * configure, config.in: Regenerate.
11544         * server.h: Include alloca.h if it exists.
11545         * gdbreplay.c: Include alloca.h if it exists.
11546
11547 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
11548
11549         * linux-low.c (__SIGRTMIN): Define if not already defined.
11550         (linux_create_inferior): Check for __ANDROID__ rather than
11551         __SIGRTMIN.
11552         (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11553         are already deferred.
11554         (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11555         (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11556         stopped and already has a pending signal to report.
11557         (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11558         a pending signal to report or is moving out of a jump pad.
11559         (linux_init_signals): Check for __ANDROID__ rather than
11560         __SIGRTMIN.
11561
11562 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
11563
11564         * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11565         debug_threads check.  Avoid a linear search when not doing debug
11566         output.
11567
11568 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
11569
11570         * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11571         (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11572         (struct file_handler) <fd>: Change type to gdb_fildes_t.
11573         (process_event): Change local fd's type to gdb_fildes_t.
11574         (create_file_handler): Adjust prototype.
11575         (delete_file_handler): Adjust prototype.
11576         (handle_file_event): Adjust prototype.  Use pfildes.
11577         (create_file_event): Adjsut prototype.
11578         * remote-utils.c (remote_desc, listen_desc): Change type to
11579         gdb_fildes_t.
11580         * server.h: New gdb_fildes_t typedef.
11581         [USE_WIN32API]: Include winsock2.h.
11582         (delete_file_handler, add_file_handler): Adjust prototypes.
11583         (pfildes): Declare.
11584         * utils.c (pfildes): New.
11585
11586 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
11587
11588         * configure.ac (build_warnings): Add -Wno-char-subscripts.
11589         * configure: Regenerate.
11590
11591 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
11592
11593         * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11594         (linux_done_accessing_memory): ... this.
11595         (linux_target_ops): Adjust.
11596         * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11597         * nto-low.c (nto_target_ops): Adjust comment.
11598         * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11599         * spu-low.c (spu_target_ops): Adjust comment.
11600         * target.h (target_ops): Rename unprepare_to_access_memory field
11601         to done_accessing_memory.
11602         (unprepare_to_access_memory): Rename to ...
11603         (done_accessing_memory): ... this.
11604
11605 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
11606
11607         * linux-low.c (linux_prepare_to_access_memory): New.
11608         (linux_unprepare_to_access_memory): New.
11609         (linux_target_ops): Install them.
11610         * server.c (read_memory): Rename to ...
11611         (gdb_read_memory): ... this.  Use
11612         prepare_to_access_memory/prepare_to_access_memory.
11613         (write_memory): Rename to ...
11614         (gdb_write_memory): ... this.  Use
11615         prepare_to_access_memory/prepare_to_access_memory.
11616         (handle_search_memory_1): Adjust.
11617         (process_serial_event): Adjust.
11618         * target.h (struct target_ops): New fields
11619         prepare_to_access_memory and unprepare_to_access_memory.
11620         (prepare_to_access_memory, unprepare_to_access_memory): New.
11621         * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11622         prepare_to_access_memory/prepare_to_access_memory.
11623         * nto-low.c (nto_target_ops): Adjust.
11624         * spu-low.c (spu_target_ops): Adjust.
11625         * win32-low.c (win32_target_ops): Adjust.
11626
11627 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
11628
11629         * Makefile.in (WARN_CFLAGS): Get it from configure.
11630         (WERROR_CFLAGS): New.
11631         (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11632         * configure.ac: Introduce --enable-werror, which adds -Werror to
11633         the compiler command line.  Enabled by default.  Disable with
11634         --disable-werror.  Add -Wdeclaration-after-statement
11635         Wpointer-arith and -Wformat-nonliteral to warning flags.
11636         * configure: Regenerate.
11637
11638 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
11639
11640         * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11641
11642 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
11643
11644         * gdbreplay.c (remote_error): New.
11645         (gdbchar): New.
11646         (expect): Use gdbchar.  Check for error reading from GDB.
11647         Clarify sync error output.
11648         (play): Check for errors writing to GDB.
11649         * linux-low.c (sigchld_handler): Really ignore `write' errors.
11650         * remote-utils.c (getpkt): Check for errors writing to the remote
11651         descriptor.
11652
11653 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
11654
11655         * linux-low.c (linux_wait_1): Move non-debugging code out of
11656         `debug_threads' control.
11657
11658 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
11659
11660         * linux-low.c (linux_wait_1): Don't set last_status here.
11661         * server.c (push_event, queue_stop_reply_callback): Assert we're
11662         not pushing a TARGET_WAITKIND_IGNORE event.
11663         (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11664         (myresume, handle_target_event): Set the thread's last_resume_kind
11665         and last_status from the target returned status.
11666
11667 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
11668
11669         PR threads/10729
11670
11671         * linux-x86-low.c (update_debug_registers_callback): New.
11672         (i386_dr_low_set_addr): Use it.
11673         (i386_dr_low_get_addr): New.
11674         (i386_dr_low_set_control): Use update_debug_registers_callback.
11675         (i386_dr_low_get_control): New.
11676         (i386_dr_low_get_status): Adjust.
11677         * linux-low.c (linux_stop_lwp): New.
11678         * linux-low.h (linux_stop_lwp): Declare.
11679
11680         * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11681         argument instead of a i386_debug_reg_state.
11682         (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11683         a i386_debug_reg_state.
11684         (i386_insert_aligned_watchpoint): Adjust.
11685         (i386_remove_aligned_watchpoint): Adjust.
11686         (i386_low_stopped_data_address): Read the debug registers from the
11687         inferior instead of from the mirrors.
11688         * i386-low.h (struct i386_debug_reg_state): Extend comment.
11689         (i386_dr_low_get_addr): Declare.
11690         (i386_dr_low_get_control): Declare.
11691         (i386_dr_low_get_status): Change prototype.
11692
11693         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11694         (i386_dr_low_get_addr): New.
11695         (i386_dr_low_get_control): New.
11696         (i386_dr_low_get_status): Adjust prototype.  Return
11697         dr_status_mirror.
11698         (i386_initial_stuff): Clear dr_status_mirror and
11699         dr_control_mirror.
11700         (i386_get_thread_context): Adjust.
11701         (i386_set_thread_context): Adjust.
11702         (i386_thread_added): Adjust.
11703
11704 2010-08-24  Pedro Alves  <pedro@codesourcery.com>
11705
11706         * linux-low.h (linux_thread_area): Delete declaration.
11707
11708 2010-08-11  Thomas Schwinge  <thomas@codesourcery.com>
11709
11710         * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11711         after its termination.
11712
11713 2010-08-09  Pedro Alves  <pedro@codesourcery.com>
11714
11715         * linux-low.c (gdb_wants_lwp_stopped): Delete.
11716         (gdb_wants_all_stopped): Delete.
11717         (linux_wait_1): Don't call them.
11718         * server.c (handle_v_cont): Tag all threads as want-stopped.
11719         (gdb_wants_thread_stopped): Fix comments.  Tag the thread that
11720         stopped as "client-wants-stopped".
11721
11722 2010-07-31  Pedro Alves  <pedro@codesourcery.com>
11723
11724         * Makefile.in (signals_h): New.
11725         (server_h): Depend on it.
11726         (server.o): Don't depend on $(signals_def).
11727         (signals.o): Depend on $(signals_def).
11728
11729 2010-07-31  Jan Kratochvil  <jan.kratochvil@redhat.com>
11730
11731         * Makefile.in (signals_def): New.
11732         (server_h): Append include/gdb/signals.h and signals_def.
11733         (server.o): Append signals_def.
11734
11735 2010-07-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
11736
11737         * server.c (handle_target_event): Use target_signal_to_host for
11738         resume_info.sig initialization.
11739         * target.h (struct thread_resume) <sig>: New comment.
11740
11741 2010-07-20  Ozkan Sezer  <sezeroz@gmail.com>
11742
11743         * server.c (handle_query): strcpy() the returned string from paddress()
11744         instead of sprintf().
11745         * utils.c (paddress): Return phex_nz().
11746
11747 2010-07-07  Joel Brobecker  <brobecker@adacore.com>
11748
11749         * server.c (handle_v_cont): Call mourn_inferior if process
11750         just exited.
11751         (myresume): Likewise.
11752
11753 2010-07-01  Pedro Alves  <pedro@codesourcery.com>
11754
11755         Static tracepoints, and integration with UST.
11756
11757         * configure.ac: Handle --with-ust.  substitute ustlibs and ustinc.
11758         * mem-break.c (uninsert_all_breakpoints)
11759         (reinsert_all_breakpoints): New.
11760         * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11761         * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11762         (gdb_agent_ust_loaded, helper_thread_id)
11763         (gdb_agent_helper_thread_id): New macros.
11764         (struct ipa_sym_addresses): Add addr_ust_loaded,
11765         addr_helper_thread_id, addr_cmd_buf.
11766         (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11767         (in_process_agent_loaded_ust): New.
11768         (write_e_ust_not_loaded): New.
11769         (maybe_write_ipa_ust_not_loaded): New.
11770         (struct collect_static_trace_data_action): New.
11771         (enum tracepoint_type) <static_tracepoint>: New.
11772         (struct tracepoint) <handle>: Mention static tracepoints.
11773         (struct static_tracepoint_ctx): New.
11774         (CMD_BUF_SIZE): New.
11775         (add_tracepoint_action): Handle static tracepoint actions.
11776         (unprobe_marker_at): New.
11777         (clear_installed_tracepoints): Handle static tracepoints.
11778         (cmd_qtdp): Handle static tracepoints.
11779         (probe_marker_at): New.
11780         (cmd_qtstart): Handle static tracepoints.
11781         (response_tracepoint): Handle static tracepoints.
11782         (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11783         (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11784         (get_context_regcache): Handle static tracepoints.
11785         (do_action_at_tracepoint): Handle static tracepoint actions.
11786         (traceframe_find_block_type): Handle static trace data blocks.
11787         (traceframe_read_sdata): New.
11788         (download_tracepoints): Download static tracepoint actions.
11789         [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11790         (GDB_PROBE_NAME): New.
11791         (ust_ops): New.
11792         (GET_UST_SYM): New.
11793         (USTF): New.
11794         (dlsym_ust): New.
11795         (ust_marker_to_static_tracepoint): New.
11796         (gdb_probe): New.
11797         (collect_ust_data_at_tracepoint): New.
11798         (gdb_ust_probe): New.
11799         (UNIX_PATH_MAX, SOCK_DIR): New.
11800         (gdb_ust_connect_sync_socket): New.
11801         (resume_thread, stop_thread): New.
11802         (run_inferior_command): New.
11803         (init_named_socket): New.
11804         (gdb_ust_socket_init): New.
11805         (cstr_to_hexstr): New.
11806         (next_st): New.
11807         (first_marker, next_marker): New.
11808         (response_ust_marker): New.
11809         (cmd_qtfstm, cmd_qtsstm): New.
11810         (unprobe_marker_at, probe_marker_at): New.
11811         (cmd_qtstmat, gdb_ust_thread): New.
11812         (gdb_ust_init): New.
11813         (initialize_tracepoint_ftlib): Call gdb_ust_init.
11814         * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11815         (ST_REGENTRY): New.
11816         (x86_64_st_collect_regmap): New.
11817         (X86_64_NUM_ST_COLLECT_GREGS): New.
11818         (AMD64_RIP_REGNUM): New.
11819         (supply_static_tracepoint_registers): New.
11820         * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11821         (ST_REGENTRY): New.
11822         (i386_st_collect_regmap): New.
11823         (i386_NUM_ST_COLLECT_GREGS): New.
11824         (supply_static_tracepoint_registers): New.
11825         * server.c (handle_query): Handle qXfer:statictrace:read.
11826         <qSupported>: Report support for StaticTracepoints, and
11827         qXfer:statictrace:read features.
11828         * server.h (traceframe_read_sdata)
11829         (supply_static_tracepoint_registers): Declare.
11830         * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11831         (unpack_varlen_hex): Include in IPA build.
11832         * Makefile.in (ustlibs, ustinc): New.
11833         (IPA_OBJS): Add remote-utils-ipa.o.
11834         ($(IPA_LIB)): Link -ldl and -lpthread.
11835         (UST_CFLAGS): New.
11836         (IPAGENT_CFLAGS): Add UST_CFLAGS.
11837         * config.in, configure: Regenerate.
11838
11839 2010-06-20  Ian Lance Taylor  <iant@google.com>
11840             Pedro Alves  <pedro@codesourcery.com>
11841
11842         * linux-x86-low.c (always_true): Delete.
11843         (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
11844         trying to fool the compiler with always_true.
11845
11846 2010-06-20  Pedro Alves  <pedro@codesourcery.com>
11847
11848         * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
11849         conditions in gdbserver.
11850
11851 2010-06-19  Ulrich Weigand  <uweigand@de.ibm.com>
11852
11853         * spu-low.c (spu_read_memory): Wrap around local store limit.
11854         (spu_write_memory): Likewise.
11855
11856 2010-06-15  Pedro Alves  <pedro@codesourcery.com>
11857
11858         * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
11859         (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
11860         LONGEST uses.
11861         * server.h (struct emit_ops): Replace int64_t uses with LONGEST
11862         uses.
11863         * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
11864         uses with LONGEST uses.
11865
11866 2010-06-14  Stan Shebs  <stan@codesourcery.com>
11867             Pedro Alves  <pedro@codesourcery.com>
11868
11869         Bytecode compiler.
11870
11871         * linux-x86-low.c: Include limits.h.
11872         (add_insns): New.
11873         (always_true): New.
11874         (EMIT_ASM): New.
11875         (EMIT_ASM32): New.
11876         (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
11877         (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
11878         (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
11879         (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
11880         (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
11881         (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
11882         (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
11883         (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
11884         (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
11885         (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
11886         (amd64_emit_void_call_2): New.
11887         (amd64_emit_ops): New.
11888         (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
11889         (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
11890         (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
11891         (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
11892         (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
11893         (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
11894         (i386_emit_goto, i386_write_goto_address, i386_emit_const)
11895         (i386_emit_call, i386_emit_reg, i386_emit_pop)
11896         (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
11897         (i386_emit_stack_adjust, i386_emit_int_call_1)
11898         (i386_emit_void_call_2): New.
11899         (i386_emit_ops): New.
11900         (x86_emit_ops): New.
11901         (the_low_target): Install x86_emit_ops.
11902         * server.h (struct emit_ops): New.
11903         (get_raw_reg_func_addr): Declare.
11904         (current_insn_ptr, emit_error): Declare.
11905         * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
11906         (set_trace_state_variable_value): New defines.
11907         (struct ipa_sym_addresses): New fields addr_get_raw_reg,
11908         addr_get_trace_state_variable_value and
11909         addr_set_trace_state_variable_value.
11910         (symbol_list): New fields for get_raw_reg,
11911         get_trace_state_variable_value and set_trace_state_variable_value.
11912         (condfn): New typedef.
11913         (struct tracepoint): New field `compiled_cond'.
11914         (do_action_at_tracepoint): Clear compiled_cond.
11915         (get_trace_state_variable_value, set_trace_state_variable_value):
11916         Export in the IPA.
11917         (condition_true_at_tracepoint): If there's a compiled condition,
11918         run that.
11919         (current_insn_ptr, emit_error): New globals.
11920         (struct bytecode_address): New.
11921         (get_raw_reg_func_addr): New.
11922         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
11923         (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
11924         (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
11925         (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
11926         (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
11927         (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
11928         (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
11929         (compile_tracepoint_condition, compile_bytecodes): New.
11930         * target.h (emit_ops): Forward declare.
11931         (struct target_ops): New field emit_ops.
11932         (target_emit_ops): New.
11933         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
11934         * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
11935         * linux-low.c (linux_emit_ops): New.
11936         (linux_target_ops): Install it.
11937         * linux-low.h (struct linux_target_ops): New field emit_ops.
11938
11939 2010-06-14  Ulrich Weigand  <uweigand@de.ibm.com>
11940
11941         * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
11942         * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
11943
11944 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
11945             Stan Shebs  <stan@codesourcery.com>
11946
11947         * Makefile.in (IPA_DEPFILES, extra_libraries): New.
11948         (all): Depend on $(extra_libraries).
11949         (install-only): Install the IPA.
11950         (IPA_OBJS, IPA_LIB): New.
11951         (clean): Remove the IPA lib.
11952         (IPAGENT_CFLAGS): New.
11953         (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
11954         (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
11955         (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
11956         * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
11957         * configure.ac: Check for atomic builtins support in the compiler.
11958         (IPA_DEPFILES, extra_libraries): Define.
11959         * configure.srv (ipa_obj): Add description.
11960         (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
11961         (i[34567]86-*-linux*): Set ipa_obj.
11962         (x86_64-*-linux*): Set ipa_obj.
11963         * linux-low.c (stabilizing_threads): New.
11964         (supports_fast_tracepoints): New.
11965         (linux_detach): Stabilize threads before detaching.
11966         (handle_tracepoints): Handle internal tracing breakpoints.  Assert
11967         the lwp is either not stabilizing, or is moving out of a jump pad.
11968         (linux_fast_tracepoint_collecting): New.
11969         (maybe_move_out_of_jump_pad): New.
11970         (enqueue_one_deferred_signal): New.
11971         (dequeue_one_deferred_signal): New.
11972         (linux_wait_for_event_1): If moving out of a jump pad, defer
11973         pending signals to later.
11974         (linux_stabilize_threads): New.
11975         (linux_wait_1): Check if threads need moving out of jump pads, and
11976         do it if so.
11977         (stuck_in_jump_pad_callback): New.
11978         (move_out_of_jump_pad_callback): New.
11979         (lwp_running): New.
11980         (linux_resume_one_lwp): Handle moving out of jump pads.
11981         (linux_set_resume_request): Dequeue deferred signals.
11982         (need_step_over_p): Also step over fast tracepoint jumps.
11983         (start_step_over): Also uninsert fast tracepoint jumps.
11984         (finish_step_over): Also reinsert fast tracepoint jumps.
11985         (linux_install_fast_tracepoint_jump): New.
11986         (linux_target_ops): Install linux_stabilize_threads and
11987         linux_install_fast_tracepoint_jump_pad.
11988         * linux-low.h (linux_target_ops) <get_thread_area,
11989         install_fast_tracepoint_jump_pad>: New fields.
11990         (struct lwp_info) <collecting_fast_tracepoint,
11991         pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
11992         (linux_get_thread_area): Declare.
11993         * linux-x86-low.c (jump_insn): New.
11994         (x86_get_thread_area): New.
11995         (append_insns): New.
11996         (push_opcode): New.
11997         (amd64_install_fast_tracepoint_jump_pad): New.
11998         (i386_install_fast_tracepoint_jump_pad): New.
11999         (x86_install_fast_tracepoint_jump_pad): New.
12000         (the_low_target): Install x86_get_thread_area and
12001         x86_install_fast_tracepoint_jump_pad.
12002         * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12003         (struct fast_tracepoint_jump): New.
12004         (fast_tracepoint_jump_insn): New.
12005         (fast_tracepoint_jump_shadow): New.
12006         (find_fast_tracepoint_jump_at): New.
12007         (fast_tracepoint_jump_here): New.
12008         (delete_fast_tracepoint_jump): New.
12009         (set_fast_tracepoint_jump): New.
12010         (uninsert_fast_tracepoint_jumps_at): New.
12011         (reinsert_fast_tracepoint_jumps_at): New.
12012         (set_breakpoint_at): Use write_inferior_memory.
12013         (uninsert_raw_breakpoint): Use write_inferior_memory.
12014         (check_mem_read): Mask out fast tracepoint jumps.
12015         (check_mem_write): Mask out fast tracepoint jumps.
12016         * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12017         (set_fast_tracepoint_jump): Declare.
12018         (delete_fast_tracepoint_jump)
12019         (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12020         (reinsert_fast_tracepoint_jumps_at): Declare.
12021         * regcache.c: Don't compile many functions when building the
12022         in-process agent library.
12023         (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12024         the register buffer in the heap.
12025         (free_register_cache): If the register buffer isn't owned by the
12026         regcache, don't free it.
12027         (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12028         pre-existing register caches.
12029         * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12030         type.
12031         (convert_ascii_to_int): : Constify `from' parameter type.
12032         (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12033         a `to_p' pointer to pointer parameter.  If TO_P is NULL, malloc
12034         the needed buffer in-place.
12035         (relocate_instruction): New.
12036         * server.c (handle_query) <qSymbols>: If the target supports
12037         tracepoints, give it a chance of looking up symbols.  Report
12038         support for fast tracepoints.
12039         (handle_status): Stabilize threads.
12040         (process_serial_event): Adjust.
12041         * server.h (struct fast_tracepoint_jump): Forward declare.
12042         (struct process_info) <fast_tracepoint_jumps>: New field.
12043         (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12044         (decode_X_packet, decode_M_packet): Adjust.
12045         (relocate_instruction): Declare.
12046         (in_process_agent_loaded): Declare.
12047         (tracepoint_look_up_symbols): Declare.
12048         (struct fast_tpoint_collect_status): Declare.
12049         (fast_tracepoint_collecting): Declare.
12050         (force_unlock_trace_buffer): Declare.
12051         (handle_tracepoint_bkpts): Declare.
12052         (initialize_low_tracepoint)
12053         (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12054         * target.h (struct target_ops) <stabilize_threads,
12055         install_fast_tracepoint_jump_pad>: New fields.
12056         (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12057         * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12058         [HAVE_STDINT_H]: Include stdint.h.
12059         (trace_debug_1): Rename to ...
12060         (trace_vdebug): ... this.
12061         (trace_debug): Rename to ...
12062         (trace_debug_1): ... this.  Add `level' parameter.
12063         (trace_debug): New.
12064         (ATTR_USED, ATTR_NOINLINE): New.
12065         (IP_AGENT_EXPORT): New.
12066         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12067         (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12068         (about_to_request_buffer_space, trace_buffer_is_full)
12069         (stopping_tracepoint, expr_eval_result, error_tracepoint)
12070         (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12071         (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12072         (traceframe_write_count, traceframes_created)
12073         (trace_state_variables)
12074         New renaming defines.
12075         (struct ipa_sym_addresses): New.
12076         (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12077         (symbol_list): New.
12078         (ipa_sym_addrs): New.
12079         (all_tracepoint_symbols_looked_up): New.
12080         (in_process_agent_loaded): New.
12081         (write_e_ipa_not_loaded): New.
12082         (maybe_write_ipa_not_loaded): New.
12083         (tracepoint_look_up_symbols): New.
12084         (debug_threads) [IN_PROCESS_AGENT]: New.
12085         (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12086         (UNKNOWN_SIDE_EFFECTS): New.
12087         (stop_tracing): New.
12088         (flush_trace_buffer): New.
12089         (stop_tracing_bkpt): New.
12090         (flush_trace_buffer_bkpt): New.
12091         (read_inferior_integer): New.
12092         (read_inferior_uinteger): New.
12093         (read_inferior_data_pointer): New.
12094         (write_inferior_data_pointer): New.
12095         (write_inferior_integer): New.
12096         (write_inferior_uinteger): New.
12097         (struct collect_static_trace_data_action): Delete.
12098         (enum tracepoint_type): New.
12099         (struct tracepoint) <type>: New field `type'.
12100         <actions_str, step_actions, step_actions_str>: Only include in
12101         GDBserver.
12102         <orig_size, obj_addr_on_target, adjusted_insn_addr>
12103         <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12104         (tracepoints): Use IP_AGENT_EXPORT.
12105         (last_tracepoint): Don't include in the IPA.
12106         (stopping_tracepoint): Use IP_AGENT_EXPORT.
12107         (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12108         (alloced_trace_state_variables): New.
12109         (trace_state_variables): Use IP_AGENT_EXPORT.
12110         (traceframe_t): Delete unused variable.
12111         (circular_trace_buffer): Don't include in the IPA.
12112         (trace_buffer_start): Delete.
12113         (struct trace_buffer_control): New.
12114         (trace_buffer_free): Delete.
12115         (struct ipa_trace_buffer_control): New.
12116         (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12117         (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12118         New.
12119         (trace_buffer_ctrl): New.
12120         (TRACE_BUFFER_CTRL_CURR): New.
12121         (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12122         Reimplement as macros.
12123         (trace_buffer_wrap): Delete.
12124         (traceframe_write_count, traceframe_read_count)
12125         (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12126         (struct tracepoint_hit_ctx) <type>: New field.
12127         (struct fast_tracepoint_ctx): New.
12128         (memory_barrier): New.
12129         (cmpxchg): New.
12130         (record_tracepoint_error): Update atomically in the IPA.
12131         (clear_inferior_trace_buffer): New.
12132         (about_to_request_buffer_space): New.
12133         (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12134         updating the same buffer.
12135         (add_tracepoint): Default the tracepoint's type to trap
12136         tracepoint, and orig_size to -1.
12137         (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12138         internal variables.
12139         (create_trace_state_variable): New parameter `gdb'.  Handle it.
12140         (clear_installed_tracepoints): Clear fast tracepoint jumps.
12141         (cmd_qtdp): Handle fast tracepoints.
12142         (cmd_qtdv): Adjust.
12143         (max_jump_pad_size): New.
12144         (gdb_jump_pad_head): New.
12145         (get_jump_space_head): New.
12146         (claim_jump_space): New.
12147         (sort_tracepoints): New.
12148         (MAX_JUMP_SIZE): New.
12149         (cmd_qtstart): Handle fast tracepoints.  Sync tracepoints with the
12150         IPA.
12151         (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12152         support.  Upload fast traceframes, and delete internal IPA
12153         breakpoints.
12154         (stop_tracing_handler): New.
12155         (flush_trace_buffer_handler): New.
12156         (cmd_qtstop): Upload fast tracepoints.
12157         (response_tracepoint): Handle fast tracepoints.
12158         (tracepoint_finished_step): Upload fast traceframes.  Set the
12159         tracepoint hit context's tracepoint type.
12160         (handle_tracepoint_bkpts): New.
12161         (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12162         type.  Add comment about fast tracepoints.
12163         (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12164         non-existing action_str field.
12165         (get_context_regcache): Handle fast tracepoints.
12166         (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12167         to the regcache.
12168         (fast_tracepoint_from_jump_pad_address): New.
12169         (fast_tracepoint_from_ipa_tpoint_address): New.
12170         (collecting_t): New.
12171         (force_unlock_trace_buffer): New.
12172         (fast_tracepoint_collecting): New.
12173         (collecting): New.
12174         (gdb_collect): New.
12175         (write_inferior_data_ptr): New.
12176         (target_tp_heap): New.
12177         (target_malloc): New.
12178         (download_agent_expr): New.
12179         (UALIGN): New.
12180         (download_tracepoints): New.
12181         (download_trace_state_variables): New.
12182         (upload_fast_traceframes): New.
12183         (IPA_FIRST_TRACEFRAME): New.
12184         (IPA_NEXT_TRACEFRAME_1): New.
12185         (IPA_NEXT_TRACEFRAME): New.
12186         [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12187         [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12188         (gdb_jump_pad_buffer_end): New.
12189         [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12190         (initialize_tracepoint): Adjust.
12191         [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12192         buffer.  Initialize the low module.
12193         * utils.c (PREFIX, TOOLNAME): New.
12194         (malloc_failure): Use PREFIX.
12195         (error): In the IPA, an error causes an exit.
12196         (fatal, warning): Use PREFIX.
12197         (internal_error): Use TOOLNAME.
12198         (NUMCELLS): Increase to 10.
12199         * configure, config.in: Regenerate.
12200
12201 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
12202
12203         * server.c (handle_query) <qSupported>: Do two passes over the
12204         qSupported string to avoid nesting strtok.
12205
12206 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
12207
12208         * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12209         (CDEPS): New.
12210         * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping.  Test also
12211         -Wl,--dynamic-list.
12212         * configure: Regenerate.
12213         * proc-service.list: New.
12214
12215 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
12216
12217         * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12218         New comment.
12219
12220 2010-05-26  Ozkan Sezer  <sezeroz@gmail.com>
12221
12222         * gdbreplay.c (remote_open): Check error return from socket() call by
12223         its equality to -1 not by it being negative.
12224         * remote-utils.c (remote_open): Likewise.
12225
12226 2010-05-23  Pedro Alves  <pedro@codesourcery.com>
12227
12228         * config.h: Regenerate.
12229
12230 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
12231
12232         * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12233         doesn't provide PTRACE_GET_THREAD_AREA.
12234
12235 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
12236
12237         * linux-m68k-low.c: Include <asm/ptrace.h>
12238         (ps_get_thread_area): Implement.
12239
12240 2010-05-03  Doug Evans  <dje@google.com>
12241
12242         * event-loop.c (struct callback_event): New struct.
12243         (callback_list): New global.
12244         (append_callback_event, delete_callback_event): New functions.
12245         (process_callback): New function.
12246         (start_event_loop): Call it.
12247         * remote-utils.c (NOT_SCHEDULED): Define.
12248         (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12249         moved out of readchar.
12250         (readchar): Rewrite.  Call reschedule before returning.
12251         (reset_readchar): New function.
12252         (remote_close): Call it.
12253         (process_remaining, reschedule): New functions.
12254         * server.h (callback_handler_func): New typedef.
12255         (append_callback_event, delete_callback_event): Declare.
12256
12257 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
12258
12259         * proc-service.c (ps_pglobal_lookup): Use
12260         thread_db_look_up_one_symbol.
12261         * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12262         parameter.  Use it instead of all_symbols_looked_up.
12263         * server.h (struct process_info) <all_symbols_looked_up>: Delete
12264         field.
12265         (all_symbols_looked_up): Don't declare.
12266         (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12267         * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12268         field.
12269         (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12270         Set all_symbols_looked_up here.
12271         (thread_db_look_up_one_symbol): New.
12272         (thread_db_get_tls_address): Adjust.
12273         (thread_db_load_search, try_thread_db_load_1): Always allocate the
12274         thread_db object on the heap, and tentatively set it in the
12275         process structure.
12276         (thread_db_init): Don't set all_symbols_looked_up here.
12277         * linux-low.h (thread_db_look_up_one_symbol): Declare.
12278
12279 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
12280
12281         * linux-low.c (linux_kill, linux_detach): Adjust.
12282         (status_pending_p_callback): Remove redundant statement.  Check
12283         for !TARGET_WAITIKIND_IGNORE, instead of
12284         TARGET_WAITKIND_STOPPED.
12285         (handle_tracepoints): Make sure LWP is locked.  Adjust.
12286         (linux_wait_for_event_1): Adjust.
12287         (linux_cancel_breakpoints): New.
12288         (unsuspend_one_lwp): New.
12289         (unsuspend_all_lwps): New.
12290         (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12291         (send_sigstop_callback): Change return type to int, add new
12292         `except' parameter and handle it.
12293         (suspend_and_send_sigstop_callback): New.
12294         (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12295         pass them down.  If SUSPEND, also increment the lwp's suspend
12296         count.
12297         (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12298         (need_step_over_p): Don't consider suspended LWPs.
12299         (start_step_over): Adjust.
12300         (proceed_one_lwp): Change return type to int, add new `except'
12301         parameter and handle it.
12302         (unsuspend_and_proceed_one_lwp): New.
12303         (proceed_all_lwps): Use find_inferior instead of
12304         for_each_inferior.
12305         (unstop_all_lwps): Add `unsuspend' parameter.  If UNSUSPEND, them
12306         also decrement the suspend count of LWPs.  Pass `except' down,
12307         instead of hacking its suspend count.
12308         (linux_pause_all): Add `freeze' parameter.  Adjust.
12309         (linux_unpause_all): New.
12310         (linux_target_ops): Install linux_unpause_all.
12311         * server.c (handle_status): Adjust.
12312         * target.h (struct target_ops): New fields `unpause_all' and
12313         `cancel_breakpoints'.  Add new parameter to `pause_all'.
12314         (pause_all): Add new `freeze' parameter.
12315         (unpause_all): New.
12316         (cancel_breakpoints): New.
12317         * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12318         cancel breakpoints.
12319         (cmd_qtstart): Pause threads.
12320         (stop_tracing): Pause threads, and cancel breakpoints.
12321         * win32-low.c (win32_target_ops): Adjust.
12322
12323 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
12324
12325         * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12326         the inferior right away from here...
12327         (linux_wait_1): ... to here, and adjust to check the thread's
12328         last_resume_kind instead of the lwp's step or stop_expected flags.
12329
12330 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
12331
12332         * README: Use consistent `GDB' and `GDBserver' spellings.
12333
12334 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
12335
12336         * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12337         (linux_kill): Stop all lwps here.  Don't delete the main lwp here.
12338         (linux_detach_one_lwp): Assume the lwp is stopped.
12339         (any_thread_of): Delete.
12340         (linux_detach): Stop all lwps here.  Don't blindly delete all
12341         breakpoints.
12342         (delete_lwp_callback): New.
12343         (linux_mourn): Delete all lwps of the process that is gone.
12344         (linux_wait_1): Don't delete the last lwp of the process here.
12345         * mem-break.h (mark_breakpoints_out): Declare.
12346         * mem-break.c (mark_breakpoints_out): New.
12347         (free_all_breakpoints): Use it.
12348         * server.c (handle_target_event): If the process is gone, mark
12349         breakpoints out.
12350         * thread-db.c (struct thread_db) <create_bp>: New field.
12351         (thread_db_enable_reporting): Fix prototype.  Store a thread event
12352         breakpoint reference in the thread_db struct.
12353         (thread_db_load_search): Clear the thread_db object.
12354         (try_thread_db_load_1): Ditto.
12355         (switch_to_process): New.
12356         (disable_thread_event_reporting): Use it.
12357         (remove_thread_event_breakpoints): New.
12358         (thread_db_detach, thread_db_mourn): Use it.
12359
12360 2010-05-01  Pedro Alves  <pedro@codesourcery.com>
12361
12362         * linux-low.c (linux_enable_event_reporting): New.
12363         (linux_wait_for_event_1, handle_extended_wait): Use it.
12364
12365 2010-04-30  Pedro Alves  <pedro@codesourcery.com>
12366
12367         * linux-low.c (linux_kill_one_lwp, linux_kill)
12368         (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12369         (send_sigstop): Take an lwp_info as parameter instead.  Queue a
12370         SIGSTOP even if the LWP is stopped.
12371         (send_sigstop_callback): New.
12372         (stop_all_lwps): Use send_sigstop_callback instead.
12373         (linux_resume_one_thread): Adjust.
12374         (proceed_one_lwp): Still proceed an LWP that the client has
12375         requested to stop, if we haven't reported it as stopped yet.  Make
12376         sure that LWPs the client want stopped, have a pending SIGSTOP.
12377
12378 2010-04-26  Doug Evans  <dje@google.com>
12379
12380         * server.c (handle_general_set): Make static.
12381
12382         * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12383         Print received char after testing for error/eof instead of before.
12384         (input_interrupt): Tweak comment.
12385
12386 2010-04-23  Doug Evans  <dje@google.com>
12387
12388         * server.c (start_inferior): Print inferior argv if --debug.
12389
12390 2010-04-21  Aleksandar Ristovski  <aristovski@qnx.com>
12391
12392         * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12393         * nto-x86-low.c: Include server.h
12394
12395 2010-04-20  Pierre Muller  <muller@ics.u-strasbg.fr>
12396
12397         * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12398         be consistent with other sources of this directory.
12399         (init_registers_amd64): Correct name of source file of this function
12400         in the comment.
12401
12402 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
12403
12404         * configure.srv (x86_64-*-mingw*): New configuration for Windows
12405         64-bit executables.
12406
12407 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
12408
12409         * win32-i386-low.c: Add 64-bit support.
12410         (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12411         (init_registers_amd64): Declare.
12412         (mappings): Add 64-bit version of array.
12413         (init_windows_x86): New function.
12414         (the_low_target): Change init_arch field to init_windows_x86.
12415
12416 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
12417
12418         * win32-low.c: Adapt to support also 64-bit architecture.
12419         (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12420         (get_image_name): Use SIZE_T type for local variable `done'.
12421         (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12422         (toolhelp_get_dll_name): Idem.
12423         (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12424         Use uintptr_t typecast to avoid warning.
12425         (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12426         (handle_exception): Use phex_nz to avoid warning.
12427         (win32_wait): Remove unused local variable `process'.
12428
12429 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
12430
12431         * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12432         `amd64-avx.o'.
12433
12434 2010-04-17  Pierre Muller  <muller@ics.u-strasbg.fr>
12435
12436         * configure.ac: Use `ws2_32' library for srv_mingw.
12437         * configure: Regenerate.
12438         * gdbreplay.c: Include winsock2.h instead of winsock.h.
12439         * remote-utils.c: Likewise.
12440
12441 2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>
12442
12443         * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12444         if __x86_64__ is defined.
12445
12446 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
12447
12448         * configure: Regenerate.
12449
12450 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
12451
12452         * server.c (handle_query): Handle 'qGetTIBAddr' query.
12453         * target.h (target_ops): New get_tib_address field.
12454         * win32-low.h (win32_thread_info): Add thread_local_base field.
12455         * win32-low.c (child_add_thread): Add tlb argument.
12456         Set thread_local_base field to TLB.
12457         (get_child_debug_event): Adapt to child_add_thread change.
12458         (win32_get_tib_address): New function.
12459         (win32_target_ops): Set get_tib_address field to
12460         win32_get_tib_address.
12461         * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12462
12463 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
12464
12465         * linux-low.c (linux_mourn): Also remove the process.
12466         * server.c (handle_target_event): Don't remove the process here.
12467         * nto-low.c (nto_mourn): New.
12468         (nto_target_ops): Install it.
12469         * spu-low.c (spu_mourn): New.
12470         (spu_target_ops): Install it.
12471         * win32-low.c (win32_mourn): New.
12472         (win32_target_ops): Install it.
12473
12474 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
12475
12476         * server.h (buffer_xml_printf): Remove redundant `;'.
12477
12478 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
12479
12480         * regcache.c (set_register_cache): Invalidate regcaches before
12481         changing the register cache layout.
12482         (regcache_invalidate_one): Allow a NULL regcache.
12483         * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12484         regcaches before changing the register cache layout or the target
12485         regsets.
12486
12487 2010-04-12  H.J. Lu  <hongjiu.lu@intel.com>
12488
12489         * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12490         variable warning on Linux/x86-64.
12491
12492 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
12493
12494         GDBserver disconnected tracing support.
12495
12496         * linux-low.c (linux_remove_process): Delete.
12497         (add_lwp): Don't set last_resume_kind here.
12498         (linux_kill): Use `mourn'.
12499         (linux_detach): Use `thread_db_detach', and `mourn'.
12500         (linux_mourn): New.
12501         (linux_attach_lwp_1): Adjust comment.
12502         (linux_attach): last_resume_kind moved the thread_info; adjust.
12503         (status_pending_p_callback): Adjust.
12504         (linux_wait_for_event_1): Adjust.
12505         (count_events_callback, select_singlestep_lwp_callback)
12506         (select_event_lwp_callback, cancel_breakpoints_callback)
12507         (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12508         (proceed_one_lwp): Adjust.
12509         (linux_async): Add debug output.
12510         (linux_thread_stopped): New.
12511         (linux_pause_all): New.
12512         (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12513         linux_pause_all.
12514         * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12515         (thread_db_free): Delete declaration.
12516         (thread_db_detach, thread_db_mourn): Declare.
12517         * thread-db.c (thread_db_init): Use thread_db_mourn.
12518         (thread_db_free): Delete, split in two.
12519         (disable_thread_event_reporting): New.
12520         (thread_db_detach): New.
12521         (thread_db_mourn): New.
12522
12523         * server.h (struct thread_info) <last_resume_kind>: New field.
12524         <attached>: Add comment.
12525         <gdb_detached>: New field.
12526         (handler_func): Change return type to int.
12527         (handle_serial_event, handle_target_event): Ditto.
12528         (gdb_connected): Declare.
12529         (tracing): Delete.
12530         (disconnected_tracing): Declare.
12531         (stop_tracing): Declare.
12532
12533         * server.c (handle_query) <qSupported>: Report support for
12534         disconnected tracing.
12535         (queue_stop_reply_callback): Account for running threads.
12536         (gdb_wants_thread_stopped): New.
12537         (gdb_wants_all_threads_stopped): New.
12538         (gdb_reattached_process): New.
12539         (handle_status): Clear the `gdb_detached' flag of all processes.
12540         In all-stop, stop all threads.
12541         (main): Be sure to leave tfind mode.  Handle disconnected tracing.
12542         (process_serial_event): If the remote connection breaks, or if an
12543         exit was forced with "monitor exit", force an event loop exit.
12544         Handle disconnected tracing on detach.
12545         (handle_serial_event): Adjust.
12546         (handle_target_event): If GDB isn't connected, forward events back
12547         to the inferior, unless the last process exited, in which case,
12548         exit gdbserver.  Adjust interface.
12549
12550         * remote-utils.c (remote_open): Don't block in accept.  Instead
12551         register an event loop source on the listen socket file
12552         descriptor.  Refactor bits into ...
12553         (listen_desc): ... this new global.
12554         (gdb_connected): ... this new function.
12555         (enable_async_notification): ... this new function.
12556         (handle_accept_event): ... this new function.
12557         (remote_close): Clear remote_desc.
12558
12559         * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12560
12561         * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12562         New fields.
12563         (mourn_inferior): Define.
12564         (target_process_qsupported): Avoid the dangling else problem.
12565         (thread_stopped): Define.
12566         (pause_all): Define.
12567         (target_waitstatus_to_string): Declare.
12568         * target.c (target_waitstatus_to_string): New.
12569
12570         * tracepoint.c (tracing): Make extern.
12571         (disconnected_tracing): New.
12572         (stop_tracing): Make extern.  Handle tracing stops due to GDB
12573         disconnecting.
12574         (cmd_qtdisconnected): New.
12575         (cmd_qtstatus): Report disconnected tracing status in trace reply.
12576         (handle_tracepoint_general_set): Handle QTDisconnected.
12577
12578         * event-loop.c (event_handler_func): Change return type to int.
12579         (process_event): Bail out if the event handler wants the event
12580         loop to stop.
12581         (handle_file_event): Ditto.
12582         (start_event_loop): Bail out if the event handler wants the event
12583         loop to stop.
12584
12585         * nto-low.c (nto_target_ops): Adjust.
12586         * spu-low.c (spu_wait): Don't remove the process here.
12587         (spu_target_ops): Adjust.
12588         * win32-low.c (win32_wait): Don't remove the process here.
12589         (win32_target_ops): Adjust.
12590
12591 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
12592
12593         * regcache.c (realloc_register_cache): Invalidate inferior's
12594         regcache before recreating it.
12595
12596 2010-04-09  Pedro Alves  <pedro@codesourcery.com>
12597
12598         * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12599
12600 2010-04-09  Stan Shebs  <stan@codesourcery.com>
12601             Pedro Alves  <pedro@codesourcery.com>
12602
12603         * server.h (LONGEST): New.
12604         (struct thread_info) <while_stepping>: New field.
12605         (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12606         Declare.
12607         (initialize_tracepoint, handle_tracepoint_general_set)
12608         (handle_tracepoint_query, tracepoint_finished_step)
12609         (tracepoint_was_hit, release_while_stepping_state_list):
12610         (current_traceframe): Declare.
12611         * server.c (handle_general_set): Handle tracepoint packets.
12612         (read_memory): New.
12613         (write_memory): New.
12614         (handle_search_memory_1): Use read_memory.
12615         (handle_query): Report support for conditional tracepoints, trace
12616         state variables, and tracepoint sources.  Handle tracepoint
12617         queries.
12618         (main): Initialize the tracepoints module.
12619         (process_serial_event): Handle traceframe reads/writes.
12620
12621         * linux-low.c (handle_tracepoints): New.
12622         (linux_wait_1): Call it.
12623         (linux_resume_one_lwp): Handle while-stepping.
12624         (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12625         (linux_target_ops): Install them.
12626         * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12627         New field.
12628         * linux-x86-low.c (x86_supports_tracepoints): New.
12629         (the_low_target). Install it.
12630
12631         * mem-break.h (delete_breakpoint): Declare.
12632         * mem-break.c (delete_breakpoint): Make external.
12633
12634         * target.h (struct target_ops): Add `supports_tracepoints',
12635         `read_pc', and `write_pc' fields.
12636         (target_supports_tracepoints): Define.
12637         * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12638         (phex_nz): New.
12639
12640         * regcache.h (struct regcache) <registers_owned>: New field.
12641         (init_register_cache, regcache_cpy): Declare.
12642         (regcache_read_pc, regcache_write_pc): Declare.
12643         (register_cache_size): Declare.
12644         (supply_regblock): Declare.
12645         * regcache.c (init_register_cache): New.
12646         (new_register_cache): Use it.
12647         (regcache_cpy): New.
12648         (register_cache_size): New.
12649         (supply_regblock): New.
12650         (regcache_read_pc, regcache_write_pc): New.
12651
12652         * tracepoint.c: New.
12653
12654         * Makefile.in (OBS): Add tracepoint.o.
12655         (tracepoint.o): New rule.
12656
12657 2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>
12658
12659         * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12660         (i386-mmx.o): New.
12661         (i386-mmx.c): Likewise.
12662         (i386-mmx-linux.o): Likewise.
12663         (i386-mmx-linux.c): Likewise.
12664
12665         * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12666         (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12667         (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12668         (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12669
12670         * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12671         (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12672         and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12673
12674 2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>
12675
12676         * Makefile.in (clean): Updated.
12677         (i386-avx.o): New.
12678         (i386-avx.c): Likewise.
12679         (i386-avx-linux.o): Likewise.
12680         (i386-avx-linux.c): Likewise.
12681         (amd64-avx.o): Likewise.
12682         (amd64-avx.c): Likewise.
12683         (amd64-avx-linux.o): Likewise.
12684         (amd64-avx-linux.c): Likewise.
12685
12686         * configure.srv (srv_i386_regobj): Add i386-avx.o.
12687         (srv_i386_linux_regobj): Add i386-avx-linux.o.
12688         (srv_amd64_regobj): Add amd64-avx.o.
12689         (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12690         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12691         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12692         (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12693         (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12694         (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12695         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12696
12697         * i387-fp.c: Include "i386-xstate.h".
12698         (i387_xsave): New.
12699         (i387_cache_to_xsave): Likewise.
12700         (i387_xsave_to_cache): Likewise.
12701         (x86_xcr0): Likewise.
12702
12703         * i387-fp.h (i387_cache_to_xsave): Likewise.
12704         (i387_xsave_to_cache): Likewise.
12705         (x86_xcr0): Likewise.
12706
12707         * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12708         * linux-crisv32-low.c (target_regsets): Likewise.
12709         * linux-m68k-low.c (target_regsets): Likewise.
12710         * linux-mips-low.c (target_regsets): Likewise.
12711         * linux-ppc-low.c (target_regsets): Likewise.
12712         * linux-s390-low.c (target_regsets): Likewise.
12713         * linux-sh-low.c (target_regsets): Likewise.
12714         * linux-sparc-low.c (target_regsets): Likewise.
12715         * linux-xtensa-low.c (target_regsets): Likewise.
12716
12717         * linux-low.c: Include <sys/uio.h>.
12718         (regsets_fetch_inferior_registers): Support nt_type.
12719         (regsets_store_inferior_registers): Likewise.
12720         (linux_process_qsupported): New.
12721         (linux_target_ops): Add linux_process_qsupported.
12722
12723         * linux-low.h (regset_info): Add nt_type.
12724         (linux_target_ops): Add process_qsupported.
12725
12726         * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12727         and <sys/uio.h>.
12728         (init_registers_i386_avx_linux): New.
12729         (init_registers_amd64_avx_linux): Likewise.
12730         (xmltarget_i386_linux_no_xml): Likewise.
12731         (xmltarget_amd64_linux_no_xml): Likewise.
12732         (PTRACE_GETREGSET): Likewise.
12733         (PTRACE_SETREGSET): Likewise.
12734         (x86_fill_xstateregset): Likewise.
12735         (x86_store_xstateregset): Likewise.
12736         (use_xml): Likewise.
12737         (x86_linux_update_xmltarget): Likewise.
12738         (x86_linux_process_qsupported): Likewise.
12739         (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12740         (x86_arch_setup): Don't call init_registers_amd64_linux nor
12741         init_registers_i386_linux here.  Call
12742         x86_linux_update_xmltarget.
12743         (the_low_target): Add x86_linux_process_qsupported.
12744
12745         * server.c (handle_query): Call target_process_qsupported.
12746
12747         * target.h (target_ops): Add process_qsupported.
12748         (target_process_qsupported): New.
12749
12750 2010-04-03  Pedro Alves  <pedro@codesourcery.com>
12751
12752         * inferiors.c (add_thread): Set last_status kind to
12753         TARGET_WAITKIND_IGNORE.
12754         * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12755         fetch.  Use ptid_of.  Avoid unnecessary get_lwp_thread calls.
12756         (linux_wait_1): Move `thread' local definition to block that uses
12757         it.  Don't NULL initialize `event_child'.
12758         (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12759         Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12760         * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12761
12762 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
12763
12764         * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12765         an extended waitstatus, or by a watchpoint.
12766         (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12767         thread was stepping or has been stopped by a watchpoint.
12768
12769 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
12770
12771         * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12772         (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12773         of another, then delete the previous, and validate all
12774         breakpoints.
12775         (validate_inserted_breakpoint): New.
12776         (delete_disabled_breakpoints): New.
12777         (validate_breakpoints): New.
12778         (check_mem_read): Validate breakpoints before trusting their
12779         shadow.  Delete disabled breakpoints.
12780         (check_mem_write): Validate breakpoints before trusting they
12781         should be inserted.  Delete disabled breakpoints.
12782         * mem-break.h (validate_breakpoints):
12783         * server.c (handle_query): Validate breakpoints when we see a
12784         qSymbol query.
12785
12786 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
12787
12788         * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12789         there's a GDB breakpoint at stop_pc.  Always report a trap to GDB
12790         if we could tell there's a GDB breakpoint at stop_pc.
12791         (need_step_over_p): Don't do a step over if we find a GDB
12792         breakpoint at the resume PC.
12793
12794         * mem-break.c (struct raw_breakpoint): New.
12795         (enum bkpt_type): New type `gdb_breakpoint'.
12796         (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12797         fields.  New field `raw'.
12798         (find_raw_breakpoint_at): New.
12799         (set_raw_breakpoint_at): Handle refcounting.  Create a raw
12800         breakpoint instead.
12801         (set_breakpoint_at): Adjust.
12802         (delete_raw_breakpoint): New.
12803         (release_breakpoint): New.
12804         (delete_breakpoint): Rename to...
12805         (delete_breakpoint_1): ... this.  Add proc parameter.  Use
12806         release_breakpoint.  Return ENOENT.
12807         (delete_breakpoint): Reimplement.
12808         (find_breakpoint_at): Delete.
12809         (find_gdb_breakpoint_at): New.
12810         (delete_breakpoint_at): Delete.
12811         (set_gdb_breakpoint_at): New.
12812         (delete_gdb_breakpoint_at): New.
12813         (gdb_breakpoint_here): New.
12814         (set_reinsert_breakpoint): Use release_breakpoint.
12815         (uninsert_breakpoint): Rename to ...
12816         (uninsert_raw_breakpoint): ... this.
12817         (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12818         (reinsert_raw_breakpoint): Change parameter type to
12819         raw_breakpoint.
12820         (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12821         instead.
12822         (check_breakpoints): Adjust.  Use release_breakpoint.
12823         (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12824         (breakpoint_inserted_here): Ditto.
12825         (check_mem_read): Adjust to iterate over raw breakpoints instead.
12826         Don't trust the breakpoint's shadow if it is not inserted.
12827         (check_mem_write): Adjust to iterate over raw breakpoints instead.
12828         (delete_all_breakpoints): Adjust.
12829         (free_all_breakpoints): Mark all breakpoints as uninserted, and
12830         use delete_breakpoint_1.
12831
12832         * mem-break.h (breakpoints_supported): Delete declaration.
12833         (set_gdb_breakpoint_at): Declare.
12834         (gdb_breakpoint_here): Declare.
12835         (delete_breakpoint_at): Delete.
12836         (delete_gdb_breakpoint_at): Declare.
12837
12838         * server.h (struct raw_breakpoint): Forward declare.
12839         (struct process_info): New field `raw_breakpoints'.
12840
12841         * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
12842         breakpoints.
12843
12844 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
12845
12846         * linux-low.c (status_pending_p_callback): Fix comment.
12847         (linux_wait_for_event_1): Move most of the internal breakpoint
12848         handling from here...
12849         (linux_wait_1): ... to here.
12850         (count_events_callback): New.
12851         (select_singlestep_lwp_callback): New.
12852         (select_event_lwp_callback): New.
12853         (cancel_breakpoints_callback): New.
12854         (select_event_lwp): New.
12855         (linux_wait_1): Simplify internal breakpoint handling.  Give equal
12856         priority to all LWPs that have had events that should be reported
12857         to the client.  Cancel breakpoints when about to reporting the
12858         event to the client, not while stopping lwps.  No longer cancel
12859         finished single-steps here.
12860         (cancel_finished_single_step): Delete.
12861         (cancel_finished_single_steps): Delete.
12862
12863 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
12864
12865         * mem-break.c (enum bkpt_type): New.
12866         (struct breakpoint): New field `type'.
12867         (set_breakpoint_at): Change return type to struct breakpoint
12868         pointer.  Set type to `other_breakpoint' by default.
12869         (delete_breakpoint): Rewrite, supporting more than one breakpoint
12870         in the breakpoint list.
12871         (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
12872         (reinsert_breakpoint): Rename to ...
12873         (reinsert_raw_breakpoint): ... this.
12874         (reinsert_breakpoints_at): Adjust.
12875         * mem-break.h (struct breakpoint): Declare.
12876         (set_breakpoint_at): Change return type to struct breakpoint
12877         pointer.
12878
12879 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
12880
12881         * server.c (handle_query): Assign, not compare.
12882
12883 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
12884
12885         Teach linux gdbserver to step-over-breakpoints.
12886
12887         * linux-low.c (can_hardware_single_step): New.
12888         (supports_breakpoints): New.
12889         (handle_extended_wait): If stopping threads, read the stop pc of
12890         the new cloned LWP.
12891         (get_pc): New.
12892         (get_stop_pc): Add `lwp' parameter.  Handle it.  Bail out if the
12893         low target doesn't support retrieving the PC.
12894         (add_lwp): Set last_resume_kind to resume_continue.
12895         (linux_attach_lwp_1): Adjust comments.  Always set stop_expected.
12896         (linux_attach): Don't clear stop_expected.  Set the lwp's
12897         last_resume_kind to resume_stop.
12898         (linux_detach_one_lwp): Don't check for removed breakpoints.
12899         (check_removed_breakpoint): Delete.
12900         (status_pending_p): Rename to ...
12901         (status_pending_p_callback): ... this.  Don't check for removed
12902         breakpoints.  Don't consider threads that are stopped from GDB's
12903         perspective.
12904         (linux_wait_for_lwp): Always read the stop_pc here.
12905         (cancel_breakpoint): New.
12906         (step_over_bkpt): New global.
12907         (linux_wait_for_event_1): Implement stepping over breakpoints.
12908         (gdb_wants_lwp_stopped): New.
12909         (gdb_wants_all_stopped): New.
12910         (linux_wait_1): Tag threads as gdb-wants-stopped.  Cancel finished
12911         single-step traps here.  Store the thread's last reported target
12912         wait status.
12913         (send_sigstop): Don't clear stop_expected.  Always set it,
12914         instead.
12915         (mark_lwp_dead): Remove reference to pending_is_breakpoint.
12916         (cancel_finished_single_step): New.
12917         (cancel_finished_single_steps): New.
12918         (wait_for_sigstop): Don't cancel finished single-step traps here.
12919         (linux_resume_one_lwp): Don't check for removed breakpoints.
12920         Don't set `step' on non-hardware step archs.
12921         (linux_set_resume_request): Ignore resume_stop requests if already
12922         stopping or stopped.  Set the lwp's last_resume_kind.
12923         (resume_status_pending_p): Don't check for removed breakpoints.
12924         (need_step_over_p): New.
12925         (start_step_over): New.
12926         (finish_step_over): New.
12927         (linux_resume_one_thread): Always queue a sigstop for resume_stop
12928         requests.  Clear the thread's last reported target waitstatus.
12929         Don't use the `suspended' flag.  Don't consider pending breakpoints.
12930         (linux_resume): Start a step-over if necessary.
12931         (proceed_one_lwp): New.
12932         (proceed_all_lwps): New.
12933         (unstop_all_lwps): New.
12934         * linux-low.h (struct lwp_info): Rewrite comment for the
12935         `suspended' flag.  Add the `stop_pc' field.  Delete the
12936         `pending_stop_pc' field.  Tweak the `stepping' flag's comment.
12937         Add `'last_resume_kind' and `need_step_over' fields.
12938         * inferiors.c (struct thread_info): Delete, moved elsewhere.
12939         * mem-break.c (struct breakpoint): Delete `reinserting' flag.
12940         Delete `breakpoint_to_reinsert' field.  New flag `inserted'.
12941         (set_raw_breakpoint_at): New.
12942         (set_breakpoint_at): Rewrite to use it.
12943         (reinsert_breakpoint_handler): Delete.
12944         (set_reinsert_breakpoint): New.
12945         (reinsert_breakpoint_by_bp): Delete.
12946         (delete_reinsert_breakpoints): New.
12947         (uninsert_breakpoint): Rewrite.
12948         (uninsert_breakpoints_at): New.
12949         (reinsert_breakpoint): Rewrite.
12950         (reinsert_breakpoints_at): New.
12951         (check_breakpoints): Rewrite.
12952         (breakpoint_here): New.
12953         (breakpoint_inserted_here): New.
12954         (check_mem_read): Adjust.
12955         * mem-break.h (breakpoints_supported, breakpoint_here)
12956         (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
12957         (reinsert_breakpoint_by_bp): Delete declaration.
12958         (delete_reinsert_breakpoints): Declare.
12959         (reinsert_breakpoint): Delete declaration.
12960         (reinsert_breakpoints_at): Declare.
12961         (uninsert_breakpoint): Delete declaration.
12962         (uninsert_breakpoints_at): Declare.
12963         (check_breakpoints): Adjust prototype.
12964         * server.h: Adjust include order.
12965         (struct thread_info): Declare here.  Add a `last_status' field.
12966
12967 2010-03-23  Michael Snyder  <msnyder@vmware.com>
12968
12969         * server.c (crc32): New function.
12970         (handle_query): Add handling for 'qCRC:' request.
12971
12972 2010-03-23  Pedro Alves  <pedro@codesourcery.com>
12973
12974         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
12975         lwp had been stopped by a watchpoint.
12976
12977 2010-03-16  Pedro Alves  <pedro@codesourcery.com>
12978
12979         * server.h (internal_error): Declare.
12980         (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
12981         * utils.c (internal_error): New function.
12982
12983 2010-03-15  Andreas Schwab  <schwab@redhat.com>
12984
12985         * configure.srv: Fix typo setting srv_regobj.
12986
12987 2010-03-15  Pedro Alves  <pedro@codesourcery.com>
12988
12989         * linux-low.c (fetch_register): Avoid passing a non string literal
12990         format to `error'.
12991         (usr_store_inferior_registers): Ditto.
12992
12993 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
12994
12995         * linux-low.c (linux_write_memory): Bail out early if peeking
12996         memory failed.
12997
12998 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
12999
13000         * linux-low.h (struct lwp_info): New fields
13001         `stopped_by_watchpoint' and `stopped_data_address'.
13002         * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13003         here, and cache them in the lwp object.
13004         (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13005         directly.
13006         (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13007         field.
13008         (linux_stopped_by_watchpoint): Rewrite.
13009         (linux_stopped_data_address): Rewrite.
13010
13011 2010-03-06  Simo Melenius  <simo.melenius@iki.fi>
13012
13013         * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13014         switching the current inferior, not before.
13015
13016 2010-03-01  H.J. Lu  <hongjiu.lu@intel.com>
13017
13018         * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13019         reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13020         i386-linux.c and amd64-linux.c.
13021         (reg-i386.o): Removed.
13022         (reg-i386.c): Likewise.
13023         (reg-i386-linux.o): Likewise.
13024         (reg-i386-linux.c): Likewise.
13025         (reg-x86-64.o): Likewise.
13026         (reg-x86-64.c): Likewise.
13027         (reg-x86-64-linux.o): Likewise.
13028         (reg-x86-64-linux.c): Likewise.
13029         (i386.o): New.
13030         (i386.c): Likewise.
13031         (i386-linux.o): Likewise.
13032         (i386-linux.c): Likewise.
13033         (amd64.o): Likewise.
13034         (amd64.c): Likewise.
13035         (amd64-linux.o): Likewise.
13036         (amd64-linux.c): Likewise.
13037
13038         * configure.srv (srv_i386_regobj): New.
13039         (srv_i386_linux_regobj): Likewise.
13040         (srv_amd64_regobj): Likewise.
13041         (srv_amd64_linux_regobj): Likewise.
13042         (srv_i386_32bit_xmlfiles): Likewise.
13043         (srv_i386_64bit_xmlfiles): Likewise.
13044         (srv_i386_xmlfiles): Likewise.
13045         (srv_amd64_xmlfiles): Likewise.
13046         (srv_i386_linux_xmlfiles): Likewise.
13047         (srv_amd64_linux_xmlfiles): Likewise.
13048         (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj.  Set
13049         srv_xmlfiles to $srv_i386_xmlfiles.
13050         (i[34567]86-*-mingw32ce*): Likewise.
13051         (i[34567]86-*-mingw*): Likewise.
13052         (i[34567]86-*-nto*): Likewise.
13053         (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13054         and $srv_amd64_linux_regobj.  Set srv_xmlfiles to
13055         $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13056         (x86_64-*-linux*): Likewise.
13057
13058         * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13059         (init_registers_amd64_linux): New.
13060         (x86_arch_setup): Replace init_registers_x86_64_linux with
13061         init_registers_amd64_linux.
13062
13063 2010-02-23  Maxim Kuvyrkov  <maxim@codesourcery.com>
13064
13065         * configure.ac: Check for libdl.  If it is not available link against
13066         static libthread_db.
13067         * configure: Regenerate.
13068
13069 2010-02-22  Pedro Alves  <pedro@codesourcery.com>
13070
13071         PR9605
13072
13073         * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13074         handing a read watchpoint.
13075         (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13076
13077 2010-02-12  Doug Evans  <dje@google.com>
13078
13079         * linux-low.c (linux_supports_tracefork_flag): Document.
13080         (linux_look_up_symbols): Add comment.
13081
13082 2010-02-03  H.J. Lu  <hongjiu.lu@intel.com>
13083
13084         * regcache.c (supply_register): Clear regcache if buf is NULL.
13085
13086 2010-02-02  Nicolas Roche  <roche@sourceware.org>
13087             Joel Brobecker  <brobecker@adacore.com>
13088
13089         * inferiors.c (find_inferior): Add function documentation.
13090         (unloaded_dll): Handle the case where the unloaded dll has not
13091         been previously registered in the dll list.
13092
13093 2010-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
13094
13095         * linux-arm-low.c (thumb_breakpoint_len): Delete.
13096         (thumb2_breakpoint): New.
13097         (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13098
13099 2010-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
13100
13101         * linux-low.c (get_stop_pc): Check for SIGTRAP.
13102         (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13103         breakpoints.
13104
13105 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
13106
13107         * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13108
13109 2010-01-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13110
13111         * linux-s390-low.c (s390_collect_ptrace_register)
13112         (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13113
13114 2010-01-21  Doug Evans  <dje@google.com>
13115
13116         * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13117         (PTRACE_ARG4_TYPE): New macro.
13118         (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13119         (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13120         (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13121         (usr_store_inferior_registers): Ditto.
13122         (linux_read_memory, linux_write_memory): Ditto.
13123         (linux_test_for_tracefork): Ditto.
13124
13125         * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13126         Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13127
13128 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
13129
13130         * proc-service.c (ps_lgetregs): Don't refetch registers from the
13131         target.
13132
13133 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
13134
13135         * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13136         prototype to take a regcache.  Adjust.
13137
13138 2010-01-20  Pedro Alves  <pedro@codesourcery.com>
13139
13140         * regcache.h (struct thread_info): Forward declare.
13141         (struct regcache): New.
13142         (new_register_cache): Adjust prototype.
13143         (get_thread_regcache): Declare.
13144         (free_register_cache): Adjust prototype.
13145         (registers_to_string, registers_from_string): Ditto.
13146         (supply_register, supply_register_by_name, collect_register)
13147         (collect_register_as_string, collect_register_by_name): Ditto.
13148         * regcache.c (struct inferior_regcache_data): Delete.
13149         (get_regcache): Rename to ...
13150         (get_thread_regcache): ... this.  Adjust.  Switch inferior before
13151         fetching registers.
13152         (regcache_invalidate_one): Adjust.
13153         (regcache_invalidate): Fix prototype.
13154         (new_register_cache): Return the new register cache.
13155         (free_register_cache): Change prototype.
13156         (realloc_register_cache): Adjust.
13157         (registers_to_string): Change prototype to take a regcache.  Adjust.
13158         (registers_from_string): Ditto.
13159         (register_data): Ditto.
13160         (supply_register): Ditto.
13161         (supply_register_by_name): Ditto.
13162         (collect_register): Ditto.
13163         (collect_register_as_string): Ditto.
13164         (collect_register_by_name): Ditto.
13165         * server.c (process_serial_event): Adjust.
13166         * linux-low.h (regset_fill_func, regset_store_func): Change
13167         prototype.
13168         (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13169         Change prototype.
13170         * linux-low.c (get_stop_pc): Adjust.
13171         (check_removed_breakpoint): Adjust.
13172         (linux_wait_for_event): Adjust.
13173         (linux_resume_one_lwp): Adjust.
13174         (fetch_register): Add regcache parameter.  Adjust.
13175         (usr_store_inferior_registers): Ditto.
13176         (regsets_fetch_inferior_registers): Ditto.
13177         (regsets_store_inferior_registers): Ditto.
13178         (linux_fetch_registers, linux_store_registers): Ditto.
13179         * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13180         regcache.  Adjust.
13181         (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13182         Ditto.
13183         * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13184         prototype to take a regcache.
13185         (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13186         * remote-utils.c (convert_ascii_to_int, outreg)
13187         (prepare_resume_reply): Change prototype to take a regcache.
13188         Adjust.
13189         * target.h (struct target_ops) <fetch_registers, store_registers>:
13190         Change prototype to take a regcache.
13191         (fetch_inferior_registers, store_inferior_registers): Change
13192         prototype to take a regcache.  Adjust.
13193         * proc-service.c (ps_lgetregs): Adjust.
13194         * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13195         (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13196         (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13197         take a regcache.  Adjust.
13198         * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13199         (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13200         (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13201         (arm_breakpoint_at): Change prototype to take a regcache.  Adjust.
13202         * linux-cris-low.c (cris_get_pc, cris_set_pc)
13203         (cris_cannot_fetch_register):
13204         (cris_breakpoint_at): Change prototype to take a regcache.
13205         Adjust.
13206         * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13207         cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13208         to take a regcache.  Adjust.
13209         (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13210         Adjust.
13211         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13212         take a regcache.  Adjust.
13213         * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13214         (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13215         (m68k_set_pc): Change prototype to take a regcache.  Adjust.
13216         * linux-mips-low.c (mips_get_pc):
13217         (mips_set_pc): Change prototype to take a regcache.  Adjust.
13218         (mips_reinsert_addr): Adjust.
13219         (mips_collect_register): Change prototype to take a regcache.
13220         Adjust.
13221         (mips_supply_register):
13222         (mips_collect_register_32bit, mips_supply_register_32bit)
13223         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13224         (mips_store_fpregset): Ditto.
13225         * linux-ppc-low.c (ppc_supply_ptrace_register)
13226         (ppc_supply_ptrace_register): Ditto.
13227         (parse_spufs_run): Adjust.
13228         (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13229         (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13230         (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13231         take a regcache.  Adjust.
13232         * linux-s390-low.c (s390_collect_ptrace_register)
13233         (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13234         (s390_set_pc): Change prototype to take a regcache.  Adjust.
13235         (s390_arch_setup): Adjust.
13236         * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13237         (sh_fill_gregset): Change prototype to take a regcache.  Adjust.
13238         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13239         (sparc_fill_gregset, sparc_store_gregset_from_stack)
13240         (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13241         regcache.  Adjust.
13242         (sparc_breakpoint_at): Adjust.
13243         * linux-xtensa-low.c (xtensa_fill_gregset):
13244         (xtensa_store_gregset):
13245         (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13246         (xtensa_set_pc): Change prototype to take a regcache.  Adjust.
13247         * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13248         prototype to take a regcache.  Adjust.
13249         * win32-arm-low.c (arm_fetch_inferior_register)
13250         (arm_store_inferior_register): Change prototype to take a
13251         regcache.  Adjust.
13252         * win32-i386-low.c (i386_fetch_inferior_register)
13253         (i386_store_inferior_register): Change prototype to take a
13254         regcache.  Adjust.
13255         * win32-low.c (child_fetch_inferior_registers)
13256         (child_store_inferior_registers): Change prototype to take a
13257         regcache.  Adjust.
13258         (win32_wait): Adjust.
13259         (win32_fetch_inferior_registers): Change prototype to take a
13260         regcache.  Adjust.
13261         (win32_store_inferior_registers): Adjust.
13262         * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13263         store_inferior_register>: Change prototype to take a regcache.
13264
13265 2010-01-20  Doug Evans  <dje@google.com>
13266
13267         * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13268         #ifdef.
13269         (linux_wait_for_event1, linux_init_signals): Ditto.
13270         (W_STOPCODE): Provide definition if missing.
13271
13272 2010-01-13  Vladimir Prus  <vladimir@codesourcery.com>
13273
13274         * linux-low.c (linux_core_of_thread): New.
13275         (compare_ints, show_process, list_threads): New.
13276         (linux_qxfer_osdata): Report threads and cores.
13277         (linux_target_op): Register linux_core_of_thread.
13278         * remote-utils.c (prepare_resume_reply): Report the core.
13279         (buffer_xml_printf): Support %d specifier.
13280         * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13281         New.
13282         (handle_query): Handle qXfer:threads.  Announce availability
13283         thereof.
13284         * target.h (struct target_ops): New field core_of_thread.
13285
13286 2010-01-04  Ulrich Weigand  <uweigand@de.ibm.com>
13287
13288         * Makefile.in (clean): Remove new generated files.
13289         (reg-s390.o, reg-s390.c): Remove rules.
13290         (reg-s390x.o, reg-s390x.c): Likewise.
13291         (s390-linux32.o, s390-linux32.c): Add rules.
13292         (s390-linux64.o, s390-linux64.c): Likewise.
13293         (s390x-linux64.o, s390x-linux64.c): Likewise.
13294         * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13295         * linux-s390-low.c: Include <elf.h>.
13296         (HWCAP_S390_HIGH_GPRS): Define if undefined.
13297         (init_registers_s390): Remove prototype.
13298         (init_registers_s390x): Likewise.
13299         (init_registers_s390_linux32): Add prototype.
13300         (init_registers_s390_linux64): Likewise.
13301         (init_registers_s390x_linux64): Likewise.
13302         (s390_num_regs_3264): New define.
13303         (s390_regmap_3264): New global variable.
13304         (s390_cannot_fetch_register): Remove obsolete check.
13305         (s390_cannot_store_register): Likewise.
13306         (s390_collect_ptrace_register): Handle upper/lower register halves.
13307         (s390_supply_ptrace_register): Likewise.
13308         (s390_fill_gregset): Update to register number changes.
13309         (s390_get_hwcap): New routine.
13310         (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13311         Install appropriate regmap and register set.
13312
13313 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
13314
13315         * server.c (gdbserver_version): Update copyright year to 2010.
13316         * gdbreplay.c (gdbreplay_version): Likewise.
13317
13318 2009-12-28  Doug Evans  <dje@google.com>
13319
13320         * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13321         elf/external.h.  Include <elf.h> instead but only if necessary.
13322
13323 2009-12-28  Pedro Alves  <pedro@codesourcery.com>
13324
13325         * linux-low.c (linux_remove_process): Remove `detaching'
13326         parameter.  Don't release/detach from thread_db here.
13327         (linux_kill): Release/detach from thread_db here, ...
13328         (linux_detach): ... and here, before actually detaching.
13329         (linux_wait_1): ... and here, when a process exits.
13330         * thread-db.c (any_thread_of): New.
13331         (thread_db_free): Switch the current inferior to a thread of the
13332         passed in process.
13333
13334 2009-12-21  Doug Evans  <dje@google.com>
13335
13336         * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13337
13338         * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13339         Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13340         warning ifndef __NR_tkill.  Move setting of errno there too.
13341         Delete unnecessary resetting of errno after syscall.
13342         Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13343
13344         * configure.ac: Check for dladdr.
13345         * config.in: Regenerate.
13346         * configure: Regenerate.
13347         * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13348         (try_thread_db_load): Update.
13349
13350         * linux-low.c (my_waitpid): Delete unnecessary prototype.
13351
13352 2009-12-18  Doug Evans  <dje@google.com>
13353
13354         * event-loop.c: Include unistd.h if it exists.
13355
13356         * linux-low.c (my_waitpid): Move definition away from being in
13357         between linux_tracefork_child/linux_test_for_tracefork.
13358
13359         * gdb_proc_service.h (psaddr_t): Fix type.
13360         * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13361         signature to match glibc.
13362
13363 2009-12-16  Doug Evans  <dje@google.com>
13364
13365         * linux-low.c (linux_read_memory): Fix argument to read.
13366
13367 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
13368
13369         * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13370         events, don't leave current_inferior pointing at null.
13371
13372 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
13373
13374         * win32-low.c (LOG): Delete.
13375         (OUTMSG): Output to stderr.
13376         (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13377         on compile time LOG macro.
13378         (win32_wait): Fix debug output.
13379
13380 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
13381
13382         * win32-low.c (win32_add_one_solib): If the dll name is
13383         "ntdll.dll", prepend the system directory to the dll path.
13384
13385 2009-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
13386
13387         * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13388
13389 2009-11-17  Nathan Sidwell  <nathan@codesourcery.com>
13390             Vladimir Prus  <vladimir@codesourcery.com>
13391
13392         * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13393         * configure.ac: Check for __mcoldfire__ and set
13394         gdb_cv_m68k_is_coldfire.
13395         * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13396         reg-cf.o and reg-m68k.o.
13397         * configure: Regenerated.
13398
13399 2009-11-16  Pedro Alves  <pedro@codesourcery.com>
13400
13401         * linux-low.c (linux_remove_process): Add `detaching' parameter.
13402         Pass it to thread_db_free.
13403         (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13404         proper `detaching' argument to linux_remove_process.
13405         * linux-low.h (thread_db_free): Add `detaching' parameter.
13406         * thread-db.c (thread_db_init): Pass false as `detaching' argument
13407         to thread_db_free.
13408         (thread_db_free): Add `detaching' parameter.  Only
13409         call td_ta_clear_event if detaching from process.
13410
13411 2009-11-12  Maxim Kuvyrkov  <maxim@codesourcery.com>
13412
13413         * thread-db.c (thread_db_free): Fix typo.
13414
13415 2009-11-11  Paul Pluzhnikov  <ppluzhnikov@google.com>
13416
13417         PR gdb/10838
13418         * thread-db.c (thread_db_free): Call td_ta_clear_event.
13419
13420 2009-11-03  Nathan Sidwell  <nathan@codesourcery.com>
13421
13422         * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13423         with an i686 compiler.
13424         * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13425         needed.
13426         * configure: Rebuilt.
13427
13428 2009-10-29  Sandra Loosemore  <sandra@codesourcery.com>
13429
13430         PR gdb/10783
13431
13432         * server.c (handle_search_memory_1): Correct read_addr initialization
13433         in loop for searching subsequent chunks.
13434
13435 2009-10-29  Paul Pluzhnikov  <ppluzhnikov@google.com>
13436
13437         * configure.ac: New --with-libthread-db option.
13438         * thread-db.c: Allow direct dependence on libthread_db.
13439         (thread_db_free): Adjust.
13440         * config.in: Regenerate.
13441         * configure: Likewise.
13442
13443 2009-10-28  Paul Pluzhnikov  <ppluzhnikov@google.com>
13444
13445         PR gdb/10757
13446         * thread-db.c (attach_thread): New function.
13447         (maybe_attach_thread): Return success/failure.
13448         (find_new_threads_callback): Adjust.
13449         (thread_db_find_new_threads): Loop until no new threads.
13450
13451 2009-10-13  Pedro Alves  <pedro@codesourcery.com>
13452
13453         * proc-service.c (ps_lgetregs): Formatting.
13454
13455 2009-10-08  Paul Pluzhnikov  <ppluzhnikov@google.com>
13456
13457         * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13458         * configure.ac: Adjust.
13459         * linux-low.h (struct process_info_private): Move members to struct
13460         thread_db.
13461         (thread_db_free, thread_db_handle_monitor_command): New prototype.
13462         * linux-low.c (linux_remove_process): Adjust.
13463         (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13464         * server.c (handle_query): Move code ...
13465         (handle_monitor_command): ... here. New function.
13466         * target.h (struct target_ops): New member.
13467         * thread-db.c (struct thread_db): New.
13468         (libthread_db_search_path): New variable.
13469         (thread_db_create_event, thread_db_enable_reporting)
13470         (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13471         (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13472         (try_thread_db_load_1, dladdr_to_soname): New functions.
13473         (try_thread_db_load, thread_db_load_search): New functions.
13474         (thread_db_init): Search for libthread_db.
13475         (thread_db_free): New function.
13476         (thread_db_handle_monitor_command): Likewise.
13477         * config.in: Regenerate.
13478         * configure: Regenerate.
13479
13480 2009-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
13481
13482         * spu-low.c (spu_kill): Wait for inferior to terminate.
13483         Call clear_inferiors.
13484         (spu_detach): Call clear_inferiors.
13485
13486 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13487
13488         * aclocal.m4: Regenerate.
13489         * config.in: Likewise.
13490         * configure: Likewise.
13491
13492 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
13493
13494         * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13495         (parse_spufs_run): New function.
13496         (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13497         (ppc_breakpoint_at): Handle SPU breakpoints.
13498
13499 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
13500
13501         * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13502         (SPUFS_MAGIC): Define.
13503         (spu_enumerate_spu_ids): New function.
13504         (linux_qxfer_spu): New function.
13505         (linux_target_ops): Install linux_qxfer_spu.
13506
13507 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
13508
13509         * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13510         and powerpc-cell64l.o to srv_regobj.  Add rs6000/powerpc-cell32l.xml
13511         and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13512         * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13513         (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13514         (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13515         * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13516         (init_registers_powerpc_cell32l): Add prototype.
13517         (init_registers_powerpc_cell64l): Likewise.
13518         (ppc_arch_setup): Detect Cell/B.E. architecture.
13519
13520 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13521
13522         * Makefile.in (datarootdir): New variable.
13523
13524 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
13525
13526         * linux-low.c (linux_write_memory): Update debugging output.
13527         * Makefile.in (clean): Add new descriptions.
13528         (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13529         (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13530         * configure.srv: Add new files for arm*-*-linux*.
13531         * linux-arm-low.c: Add new declarations.
13532         (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13533         (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13534         (HWCAP_VFPv3D16): New.
13535         (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13536         instead of __IWMMXT__.
13537         (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13538         (arm_arch_setup): New.
13539         (target_regsets): Remove #ifdef.  Add VFP regset.
13540         (the_low_target): Use arm_arch_setup.
13541
13542 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
13543
13544         * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13545         the main thread again.
13546
13547 2009-07-06  Aleksandar Ristovski  <aristovski@qnx.com>
13548
13549         Adding Neutrino gdbserver.
13550         * configure: Regenerated.
13551         * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13552         * configure.srv (i[34567]86-*-nto*): New target.
13553         * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13554         * remote-utils.c [__QNX__]: Include sys/iomgr.h
13555         (nto_comctrl) [__QNX__]: New function.
13556         (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13557
13558 2009-07-05  Danny Backx  <dannybackx@users.sourceforge.net>
13559
13560         * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13561         srv_tgtobj.
13562
13563 2009-07-04  Danny Backx  <dannybackx@users.sourceforge.net>
13564             Pedro Alves  <pedro@codesourcery.com>
13565
13566         * win32-i386-low.c (i386_get_thread_context): Handle systems that
13567         don't support CONTEXT_EXTENDED_REGISTERS.
13568         (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13569         (the_low_target): Install them.
13570         * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13571         failing with ERROR_PIPE_NOT_CONNECTED.
13572
13573 2009-06-30  Doug Evans  <dje@google.com>
13574             Pierre Muller  <muller@ics.u-strasbg.fr>
13575
13576         Add h/w watchpoint support to x86-linux, win32-i386.
13577         * Makefile.in (SFILES): Add i386-low.c
13578         (i386_low_h): Define.
13579         (i386-low.o): Add dependencies.
13580         (linux-x86-low.o): Add i386-low.h dependency.
13581         (win32-i386-low.o): Ditto.
13582         * i386-low.c: New file.
13583         * i386-low.h: New file.
13584         * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13585         (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13586         * linux-low.c (linux_add_process): Initialize arch_private.
13587         (linux_remove_process): Free arch_private.
13588         (add_lwp): Initialize arch_private.
13589         (delete_lwp): Free arch_private.
13590         (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13591         provided.
13592         * linux-low.h (process_info_private): New member arch_private.
13593         (lwp_info): New member arch_private.
13594         (linux_target_ops): New members new_process, new_thread,
13595         prepare_to_resume.
13596         (ptid_of): New macro.
13597         * linux-x86-low.c: Include stddef.h, i386-low.h.
13598         (arch_process_info): New struct.
13599         (arch_lwp_info): New struct.
13600         (x86_linux_dr_get, x86_linux_dr_set): New functions.
13601         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13602         (i386_dr_low_get_status): New function.
13603         (x86_insert_point, x86_remove_point): New functions.
13604         (x86_stopped_by_watchpoint): New function.
13605         (x86_stopped_data_address): New function.
13606         (x86_linux_new_process, x86_linux_new_thread): New functions.
13607         (x86_linux_prepare_to_resume): New function.
13608         (the_low_target): Add entries for insert_point, remove_point,
13609         stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13610         prepare_to_resume.
13611         * server.c (debug_hw_points): New global.
13612         (monitor_show_help): Document set debug-hw-points.
13613         (handle_query): Process "set debug-hw-points".
13614         * server.h (debug_hw_points): Declare.
13615         (paddress): Declare.
13616         * utils.c (NUMCELLS, CELLSIZE): New macros.
13617         (get_sell, xsnprintf, paddress): New functions.
13618         * win32-arm-low.c (the_low_target): Add entries for insert_point,
13619         remove_point, stopped_by_watchpoint, stopped_data_address.
13620         * win32-i386-low.c: Include i386-low.h.
13621         (debug_reg_state): Replaces dr.
13622         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13623         (i386_dr_low_get_status): New function.
13624         (i386_insert_point, i386_remove_point): New functions.
13625         (i386_stopped_by_watchpoint): New function.
13626         (i386_stopped_data_address): New function.
13627         (i386_initial_stuff): Update.
13628         (get_thread_context,set_thread_context,i386_thread_added): Update.
13629         (the_low_target): Add entries for insert_point,
13630         remove_point, stopped_by_watchpoint, stopped_data_address.
13631         * win32-low.c (win32_insert_watchpoint): New function.
13632         (win32_remove_watchpoint): New function.
13633         (win32_stopped_by_watchpoint): New function.
13634         (win32_stopped_data_address): New function.
13635         (win32_target_ops): Add entries for insert_watchpoint,
13636         remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13637         * win32-low.h (win32_target_ops): New members insert_point,
13638         remove_point, stopped_by_watchpoint, stopped_data_address.
13639
13640 2009-06-25  Pedro Alves  <pedro@codesourcery.com>
13641
13642         * server.c (process_serial_event): Re-return unsupported, not
13643         error, if the type isn't recognized.  Re-allow supporting only
13644         insert or remove packets.  Also call require_running for
13645         breakpoints.  Add missing break statement to default case.  Tidy.
13646         * target.h (struct target_ops): Rename insert_watchpoint to
13647         insert_point, and remove_watchpoint to remove_point.
13648
13649         * linux-low.h (struct linux_target_ops): Likewise.
13650         * linux-low.c (linux_insert_watchpoint): Rename to ...
13651         (linux_insert_point): ... this.  Adjust.
13652         (linux_remove_watchpoint): Rename to ...
13653         (linux_remove_point): ... this.  Adjust.
13654         (linux_target_ops): Adjust.
13655         * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13656         (cris_insert_point): ... this.
13657         (cris_remove_watchpoint): Rename to ...
13658         (cris_remove_point): ... this.
13659         (the_low_target): Adjust.
13660
13661 2009-06-24  Pierre Muller  <muller@ics.u-strasbg.fr>
13662
13663         * server.c (handle_v_kill): Pass signal_pid to
13664         kill_inferior if multi_process is zero.
13665
13666 2009-06-23  Aleksandar Ristovski  <aristovski@qnx.com>
13667
13668         * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13669         * target.h (target_ops): Comment for *_watchpoint to make it clear
13670         the functions can get types '0' and '1'.
13671
13672 2009-06-22  Aleksandar Ristovski  <aristovski@qnx.com>
13673
13674         * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13675         * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13676         * regcache.c (get_regcache): Likewise.
13677         * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13678         * win32-low.c (child_fetch_inferior_registers): Remove check for
13679         regno 0.
13680
13681 2009-06-19  Aleksandar Ristovski  <aristovski@qnx.com>
13682             Pedro Alves <pedro@codesourcery.com>
13683
13684         * target.h (struct target_ops) <supports_multi_process>: New
13685         callback.
13686         (target_supports_multi_process): New.
13687         * server.c (handle_query): Even if GDB reports support, only
13688         enable multi-process if the target also supports it.  Report
13689         multi-process support only if the target backend supports it.
13690         * linux-low.c (linux_supports_multi_process): New function.
13691         (linux_target_ops): Install it as target_supports_multi_process
13692         callback.
13693
13694 2009-05-24  Doug Evans  <dje@google.com>
13695
13696         Global renaming of find_thread_pid to find_thread_ptid.
13697         * server.h (find_thread_ptid): Renamed from find_thread_pid.
13698         * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13699         All callers updated.
13700
13701         * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13702         to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13703         directly.
13704
13705         * linux-low.c (get_stop_pc): Print pc if debug_threads.
13706         (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13707         (linux_resume_one_lwp): Ditto.
13708
13709 2009-05-23  Doug Evans  <dje@google.com>
13710
13711         * linux-low.c (linux_resume_one_lwp): Change type of first arg
13712         from struct inferior_list_entry * to struct lwp_info *.
13713         All callers updated.
13714
13715 2009-05-13  Doug Evans  <dje@google.com>
13716
13717         * linux-x86-low.c: Don't include assert.h.
13718         (x86_siginfo_fixup): Use fatal, not assert.
13719         (x86_arch_setup): Fix comment.
13720
13721 2009-05-12  Doug Evans  <dje@google.com>
13722
13723         Biarch support for i386/amd64 gdbserver.
13724         * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13725         Add linux-x86-low.c.
13726         (linux-i386-low.o, linux-x86-64-low.o): Delete.
13727         (linux-x86-low.o): Add.
13728         * linux-x86-64-low.c: Delete.
13729         * linux-i386-low.c: Delete.
13730         * linux-x86-low.c: New file.
13731         * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13732         linux-x86-low.o.
13733         (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13734         linux-x86-low.o.
13735         (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13736         * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13737         (linux_child_pid_to_exec_file): New function.
13738         (elf_64_header_p, elf_64_file_p): New functions.
13739         (siginfo_fixup): New function.
13740         (linux_xfer_siginfo): New local inf_siginfo.  Call siginfo_fixup to
13741         give target a chance to convert layout.
13742         * linux-low.h (linux_target_ops): New member siginfo_fixup.
13743         (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13744
13745 2009-05-07  Doug Evans  <dje@google.com>
13746
13747         * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13748         (regsets_store_inferior_registers): Ditto.
13749
13750 2009-05-06  Pedro Alves  <pedro@codesourcery.com>
13751
13752         PR server/10048
13753
13754         * linux-low.c (must_set_ptrace_flags): Delete.
13755         (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13756         of the global.
13757         (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here.  Set
13758         `lwp->must_set_ptrace_flags' instead.
13759         (linux_wait_for_event_1): Set ptrace options here.
13760         (linux_wait_1): ... not here.
13761
13762 2009-04-30  Doug Evans  <dje@google.com>
13763
13764         * inferiors.c (started_inferior_callback): New function.
13765         (attached_inferior_callback): New function.
13766         (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13767         * server.c (print_started_pid, print_attached_pid): New functions.
13768         (detach_or_kill_for_exit): New function.
13769         (main): Call it instead of for_each_inferior (kill_inferior_callback).
13770         * server.h (have_started_inferiors_p): Declare.
13771         (have_attached_inferiors_p): Declare.
13772
13773         * inferiors.c (remove_process): Fix memory leak, free process.
13774         * linux-low.c (linux_remove_process): New function.
13775         (linux_kill): Call it instead of remove_process.
13776         (linux_detach, linux_wait_1): Ditto.
13777
13778 2009-04-19  Danny Backx  <dannybackx@users.sourceforge.net>
13779
13780         * configure.srv: Add x86 Windows CE target.
13781
13782 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
13783
13784         * inferiors.c (get_thread_process): Make global.
13785         * server.h (get_thread_process): Add prototype.
13786         * thread-db.c (find_one_thread): Use get_thread_process
13787         instead of current_process.
13788         (thread_db_get_tls_address): Do not crash if called when
13789         thread layer is not yet initialized.
13790
13791 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
13792
13793         * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13794         * spu-low.c (current_tid): Rename to ...
13795         (current_ptid): ... this.
13796         (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13797         spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13798         ptid_get_lwp (current_ptid) instead of current_tid.
13799         (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13800         instead of current_tid.  Use find_process_pid to verify pid
13801         argument is valid.  Pass proper argument to remove_process.
13802         (spu_thread_alive): Compare current_ptid instead of current_tid.
13803         (spu_resume): Likewise.
13804
13805 2009-04-02  Pedro Alves  <pedro@codesourcery.com>
13806
13807         * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13808         variable.
13809
13810 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
13811
13812         Implement the multiprocess extensions, and add linux multiprocess
13813         support.
13814
13815         * server.h (ULONGEST): Declare.
13816         (struct ptid, ptid_t): New.
13817         (minus_one_ptid, null_ptid): Declare.
13818         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13819         (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13820         (struct inferior_list_entry): Change `id' type from unsigned from
13821         to ptid_t.
13822         (struct sym_cache, struct breakpoint, struct
13823         process_info_private): Forward declare.
13824         (struct process_info): Declare.
13825         (current_process): Declare.
13826         (all_processes): Declare.
13827         (initialize_inferiors): Declare.
13828         (add_thread): Adjust to use ptid_t.
13829         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13830         (add_process, remove_process, find_thread_pid): Declare.
13831         (find_inferior_id): Adjust to use ptid_t.
13832         (cont_thread, general_thread, step_thread): Change type to ptid_t.
13833         (multi_process): Declare.
13834         (push_event): Adjust to use ptid_t.
13835         (read_ptid, write_ptid): Declare.
13836         (prepare_resume_reply): Adjust to use ptid_t.
13837         (clear_symbol_cache): Declare.
13838         * inferiors.c (all_processes): New.
13839         (null_ptid, minus_one_ptid): New.
13840         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13841         (ptid_get_tid, ptid_equal, ptid_is_pid): New.
13842         (add_thread): Change unsigned long to ptid.  Remove gdb_id
13843         parameter.  Adjust.
13844         (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
13845         (gdb_id_to_thread): Rename to ...
13846         (find_thread_pid): ... this.  Change unsigned long to ptid.
13847         (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
13848         (loaded_dll, pull_pid_from_list): Adjust.
13849         (add_process, remove_process, find_process_pid)
13850         (get_thread_process, current_process, initialize_inferiors): New.
13851         * target.h (struct thread_resume) <thread>: Change type to ptid_t.
13852         (struct target_waitstatus) <related_pid>: Ditto.
13853         (struct target_ops) <kill, detach>: Add `pid' argument.  Change
13854         return type to int.
13855         (struct target_ops) <join>: Add `pid' argument.
13856         (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
13857         (struct target_ops) <wait>: Add `ptid' field.  Change return type
13858         to ptid.
13859         (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
13860         (mywait): Add `ptid' argument.  Change return type to ptid_t.
13861         (target_pid_to_str): Declare.
13862         * target.c (set_desired_inferior): Adjust to use ptids.
13863         (mywait): Add new `ptid' argument.  Adjust.
13864         (target_pid_to_str): New.
13865         * mem-break.h (free_all_breakpoints): Declare.
13866         * mem-break.c (breakpoints): Delelete.
13867         (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
13868         (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
13869         to use per-process breakpoint list.
13870         (free_all_breakpoints): New.
13871         * remote-utils.c (struct sym_cache) <name>: Drop `const'.
13872         (symbol_cache, all_symbols_looked_up): Delete.
13873         (hexchars): New.
13874         (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
13875         read_ptid): New.
13876         (prepare_resume_reply): Change ptid argument's type from unsigned
13877         long to ptid_t.  Adjust.  Implement W;process and X;process.
13878         (free_sym_cache, clear_symbol_cache): New.
13879         (look_up_one_symbol): Adjust to per-process symbol cache.  *
13880         * server.c (cont_thread, general_thread, step_thread): Change type
13881         to ptid_t.
13882         (attached): Delete.
13883         (multi_process): New.
13884         (last_ptid): Change type to ptid_t.
13885         (struct vstop_notif) <ptid>: Change type to ptid_t.
13886         (queue_stop_reply, push_event): Change `ptid' argument's type to
13887         ptid_t.
13888         (discard_queued_stop_replies): Add `pid' argument.
13889         (start_inferior): Adjust to use ptids.  Adjust to mywait interface
13890         changes.  Don't reference the `attached' global.
13891         (attach_inferior): Adjust to mywait interface changes.
13892         (handle_query): Adjust to use ptids.  Parse GDB's qSupported
13893         features.  Handle and report "multiprocess+".  Handle
13894         "qAttached:PID".
13895         (handle_v_cont): Adjust to use ptids.  Adjust to mywait interface
13896         changes.
13897         (handle_v_kill): New.
13898         (handle_v_stopped): Adjust to use target_pid_to_str.
13899         (handle_v_requests): Allow multiple attaches and runs when
13900         multiprocess extensions are in effect.  Handle "vKill".
13901         (myresume): Adjust to use ptids.
13902         (queue_stop_reply_callback): Add `arg' parameter.  Handle it.
13903         (handle_status): Adjust to discard_queued_stop_replies interface
13904         change.
13905         (first_thread_of, kill_inferior_callback)
13906         (detach_or_kill_inferior_callback, join_inferiors_callback): New.
13907         (main): Call initialize_inferiors.  Adjust to use ptids, killing
13908         and detaching from all inferiors.  Handle multiprocess packet
13909         variants.
13910         * linux-low.h: Include gdb_proc_service.h.
13911         (struct process_info_private): New.
13912         (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
13913         <lwpid_of>: Use ptid_get_lwp.
13914         (get_lwp_thread): Adjust.
13915         (struct lwp_info): Add `dead' member.
13916         (find_lwp_pid): Declare.
13917         * linux-low.c (thread_db_active): Delete.
13918         (new_inferior): Adjust comment.
13919         (inferior_pid): Delete.
13920         (linux_add_process): New.
13921         (handle_extended_wait): Adjust.
13922         (add_lwp): Change unsigned long to ptid.
13923         (linux_create_inferior): Add process to processes table.  Adjust
13924         to use ptids.  Don't set new_inferior here.
13925         (linux_attach_lwp): Rename to ...
13926         (linux_attach_lwp_1): ... this.  Add `initial' argument.  Handle
13927         it.  Adjust to use ptids.
13928         (linux_attach_lwp): New.
13929         (linux_attach): Add process to processes table.  Don't set
13930         new_inferior here.
13931         (struct counter): New.
13932         (second_thread_of_pid_p, last_thread_of_process_p): New.
13933         (linux_kill_one_lwp): Add `args' parameter.  Handle it.  Adjust to
13934         multiple processes.
13935         (linux_kill): Add `pid' argument.  Handle it.  Adjust to multiple
13936         processes.  Remove process from process table.
13937         (linux_detach_one_lwp): Add `args' parameter.  Handle it.  Adjust
13938         to multiple processes.
13939         (any_thread_of): New.
13940         (linux_detach): Add `pid' argument, and handle it.  Remove process
13941         from processes table.
13942         (linux_join): Add `pid' argument.  Handle it.
13943         (linux_thread_alive): Change unsighed long argument to ptid_t.
13944         Consider dead lwps as not being alive.
13945         (status_pending_p): Rename `dummy' argument to `arg'.  Filter out
13946         threads we're not interested in.
13947         (same_lwp, find_lwp_pid): New.
13948         (linux_wait_for_lwp): Change `pid' argument's type from int to
13949         ptid_t.  Adjust.
13950         (linux_wait_for_event): Rename to ...
13951         (linux_wait_for_event_1): ... this.  Change `pid' argument's type
13952         from int to ptid_t.  Adjust.
13953         (linux_wait_for_event): New.
13954         (linux_wait_1): Add `ptid' argument.  Change return type to
13955         ptid_t.  Adjust.  Use last_thread_of_process_p.  Remove processes
13956         that exit from the process table.
13957         (linux_wait): Add `ptid' argument.  Change return type to ptid_t.
13958         Adjust.
13959         (mark_lwp_dead): New.
13960         (wait_for_sigstop): Adjust to use ptids.  If a process exits while
13961         stopping all threads, mark its main lwp as dead.
13962         (linux_set_resume_request, linux_resume_one_thread): Adjust to use
13963         ptids.
13964         (fetch_register, usr_store_inferior_registers)
13965         (regsets_fetch_inferior_registers)
13966         (regsets_store_inferior_registers, linux_read_memory)
13967         (linux_write_memory): Inline `inferior_pid'.
13968         (linux_look_up_symbols): Adjust to use per-process
13969         `thread_db_active'.
13970         (linux_request_interrupt): Adjust to use ptids.
13971         (linux_read_auxv): Inline `inferior_pid'.
13972         (initialize_low): Don't reference thread_db_active.
13973         * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
13974         * proc-service.c (ps_lgetregs): Use find_lwp_pid.
13975         (ps_getpid): Return the pid of the current inferior.
13976         * thread-db.c (proc_handle, thread_agent): Delete.
13977         (thread_db_create_event, thread_db_enable_reporting): Adjust to
13978         per-process data.
13979         (find_one_thread): Change argument type to ptid_t.  Adjust to
13980         per-process data.
13981         (maybe_attach_thread): Adjust to per-process data and ptids.
13982         (thread_db_find_new_threads): Ditto.
13983         (thread_db_init): Ditto.
13984         * spu-low.c (spu_create_inferior, spu_attach): Add process to
13985         processes table.  Adjust to use ptids.
13986         (spu_kill, spu_detach): Adjust interface.  Remove process from
13987         processes table.
13988         (spu_join, spu_thread_alive): Adjust interface.
13989         (spu_wait): Adjust interface.  Remove process from processes
13990         table.  Adjust to use ptids.
13991         * win32-low.c (current_inferior_tid): Delete.
13992         (current_inferior_ptid): New.
13993         (debug_event_ptid): New.
13994         (thread_rec): Take a ptid.  Adjust.
13995         (child_add_thread): Add `pid' argument.  Adjust to use ptids.
13996         (child_delete_thread): Ditto.
13997         (do_initial_child_stuff): Add `attached' argument.  Add process to
13998         processes table.
13999         (child_fetch_inferior_registers, child_store_inferior_registers):
14000         Adjust.
14001         (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14002         (win32_attach): Pass 1 to do_initial_child_stuff.
14003         (win32_kill): Adjust interface.  Remove process from processes
14004         table.
14005         (win32_detach): Ditto.
14006         (win32_join): Adjust interface.
14007         (win32_thread_alive): Take a ptid.
14008         (win32_resume): Adjust to use ptids.
14009         (get_child_debug_event): Ditto.
14010         (win32_wait): Adjust interface.  Remove exiting process from
14011         processes table.
14012
14013 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
14014
14015         Non-stop mode support.
14016
14017         * server.h (non_stop): Declare.
14018         (gdb_client_data, handler_func): Declare.
14019         (delete_file_handler, add_file_handler, start_event_loop):
14020         Declare.
14021         (handle_serial_event, handle_target_event, push_event)
14022         (putpkt_notif): Declare.
14023         * target.h (enum resume_kind): New.
14024         (struct thread_resume): Replace `step' field by `kind' field.
14025         (TARGET_WNOHANG): Define.
14026         (struct target_ops) <wait>: Add `options' argument.
14027         <supports_non_stop, async, start_non_stop>: New fields.
14028         (target_supports_non_stop, target_async): New.
14029         (start_non_stop): Declare.
14030         (mywait): Add `options' argument.
14031         * target.c (mywait): Add `options' argument.  Print child exit
14032         notifications here.
14033         (start_non_stop): New.
14034         * server.c (non_stop, own_buf, mem_buf): New globals.
14035         (struct vstop_notif): New.
14036         (notif_queue): New global.
14037         (queue_stop_reply, push_event, discard_queued_stop_replies)
14038         (send_next_stop_reply): New.
14039         (start_inferior): Adjust to use resume_kind.  Adjust to mywait
14040         interface changes.
14041         (attach_inferior): In non-stop mode, don't wait for the target
14042         here.
14043         (handle_general_set): Handle QNonStop.
14044         (handle_query): When handling qC, return the current general
14045         thread, instead of the first thread of the list.
14046         (handle_query): If the backend supports non-stop mode, include
14047         QNonStop+ in the qSupported query response.
14048         (handle_v_cont): Adjust to use resume_kind.  Handle resume_stop
14049         and non-stop mode.
14050         (handle_v_attach, handle_v_run): Handle non-stop mode.
14051         (handle_v_stopped): New.
14052         (handle_v_requests): Report support for vCont;t.  Handle vStopped.
14053         (myresume): Adjust to use resume_kind.  Handle non-stop.
14054         (queue_stop_reply_callback): New.
14055         (handle_status): Handle non-stop mode.
14056         (main): Clear non_stop flag on reconnection.  Use the event-loop.
14057         Refactor serial protocol handling from here ...
14058         (process_serial_event): ... to this new function.  When GDB
14059         selects any thread, select one here.  In non-stop mode, wait until
14060         GDB acks all pending events before exiting.
14061         (handle_serial_event, handle_target_event): New.
14062         * remote-utils.c (remote_open): Install remote_desc in the event
14063         loop.
14064         (remote_close): Remove remote_desc from the event loop.
14065         (putpkt_binary): Rename to...
14066         (putpkt_binary_1): ... this.  Add `is_notic' argument.  Handle it.
14067         (putpkt_binary): New as wrapper around putpkt_binary_1.
14068         (putpkt_notif): New.
14069         (prepare_resume_reply): In non-stop mode, don't change the
14070         general_thread.
14071         * event-loop.c: New.
14072         * Makefile.in (OBJ): Add event-loop.o.
14073         (event-loop.o): New rule.
14074
14075         * linux-low.h (pid_of): Moved here.
14076         (lwpid_of): New.
14077         (get_lwp_thread): Use lwpid_of.
14078         (struct lwp_info): Delete `lwpid' field.  Add `suspended' field.
14079         * linux-low.c (pid_of): Delete.
14080         (inferior_pid): Use lwpid_of.
14081         (linux_event_pipe): New.
14082         (target_is_async_p): New.
14083         (delete_lwp): New.
14084         (handle_extended_wait): Use lwpid_of.
14085         (add_lwp): Don't set lwpid field.
14086         (linux_attach_lwp): Adjust debug output.  Use lwpid_of.
14087         (linux_kill_one_lwp): If killing a running lwp, stop it first.
14088         Use lwpid_of.  Adjust to linux_wait_for_event interface changes.
14089         (linux_detach_one_lwp): If detaching from a running lwp, stop it
14090         first.  Adjust to linux_wait_for_event interface changes.  Use
14091         lwpid_of.
14092         (linux_detach): Don't delete the main lwp here.
14093         (linux_join): Use my_waitpid.  Avoid signal_pid.  Use lwpid_of.
14094         (status_pending_p): Don't consider explicitly suspended lwps.
14095         (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14096         pointer.  Add OPTIONS argument.  Change return type to int.  Use
14097         my_waitpid instead of sleeping.  Handle WNOHANG.  Use lwpid_of.
14098         (linux_wait_for_event): Take an integer pid instead of a lwp_info
14099         pointer.  Add status pointer argument.  Return a pid instead of a
14100         status.  Use lwpid_of.  Adjust to linux_wait_for_lwp interface
14101         changes.  In non-stop mode, don't switch to a random thread.
14102         (linux_wait): Rename to...
14103         (linux_wait_1): ... this.  Add target_options argument, and handle
14104         it.  Adjust to use resume_kind.  Use lwpid_of.  In non-stop mode,
14105         don't handle the continue thread.  Handle TARGET_WNOHANG.  Merge
14106         clean exit and signal exit code.  Don't stop all threads in
14107         non-stop mode.  In all-stop mode, only stop all threads when
14108         reporting a stop to GDB.  Handle explicit thread stop requests.
14109         (async_file_flush, async_file_mark): New.
14110         (linux_wait): New.
14111         (send_sigstop): Use lwpid_of.
14112         (wait_for_sigstop): Use lwpid_of.  Adjust to linux_wait_for_event
14113         interface changes.  In non-stop mode, don't switch to a random
14114         thread.
14115         (linux_resume_one_lwp): Use lwpid_of.
14116         (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14117         (linux_resume_one_thread): ... this.  Handle resume_stop.  In
14118         non-stop mode, don't look for pending flag in all threads.
14119         (resume_status_pending_p): Don't consider explicitly suspended
14120         threads.
14121         (my_waitpid): Reimplement.  Emulate __WALL.
14122         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14123         Use lwpid_of.
14124         (sigchld_handler, linux_supports_non_stop, linux_async)
14125         (linux_start_non_stop): New.
14126         (linux_target_ops): Register linux_supports_non_stop, linux_async
14127         and linux_start_non_stop.
14128         (initialize_low): Install SIGCHLD handler.
14129         * thread-db.c (thread_db_create_event, find_one_thread)
14130         (thread_db_get_tls_address): Use lwpid_of.
14131         * win32-low.c (win32_detach): Adjust to use resume_kind.
14132         (win32_wait): Add `options' argument.
14133         * spu-low.c (spu_resume): Adjust to use resume_kind.
14134         (spu_wait): Add `options' argument.
14135
14136 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
14137
14138         Decouple target code from remote protocol.
14139
14140         * target.h (enum target_waitkind): New.
14141         (struct target_waitstatus): New.
14142         (struct target_ops) <wait>: Return an unsigned long.  Take a
14143         target_waitstatus pointer instead of a char pointer.
14144         (mywait): Likewise.
14145         * target.c (mywait): Change prototype to return an unsigned long.
14146         Take a target_waitstatus pointer instead of a char pointer.  Adjust.
14147         * server.h (thread_from_wait, old_thread_from_wait): Delete
14148         declarations.
14149         (prepare_resume_reply): Change prototype to take a
14150         target_waitstatus.
14151         * server.c (thread_from_wait, old_thread_from_wait): Delete.
14152         (last_status, last_ptid): New.
14153         (start_inferior): Remove "statusptr" argument.  Adjust.  Return a
14154         pid instead of a signal.
14155         (attach_inferior): Remove "status" and "signal" parameters.
14156         Adjust.
14157         (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14158         not as an address.
14159         (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14160         (handle_v_requests, myresume): Remove "status" and "signal"
14161         parameters.  Adjust.
14162         (handle_status): New.
14163         (main): Delete local `status'.  Adjust.
14164         * remote-utils.c: Include target.h.
14165         (prepare_resume_reply): Change prototype to take a
14166         target_waitstatus.  Adjust.
14167
14168         * linux-low.c (linux_wait): Adjust to new target_ops->wait
14169         interface.
14170         * spu-low.c (spu_wait): Adjust.
14171         * win32-low.c (enum target_waitkind, struct target_waitstatus):
14172         Delete.
14173         (win32_wait): Adjust.
14174
14175 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
14176
14177         * target.h (struct thread_resume): Delete leave_stopped member.
14178         (struct target_ops): Add a `n' argument to the `resume' callback.
14179         * server.c (start_inferior): Adjust.
14180         (handle_v_cont, myresume): Adjust.
14181         * linux-low.c (check_removed_breakpoint): Adjust to resume
14182         interface change, and to removed leave_stopped field.
14183         (resume_ptr): Delete.
14184         (struct thread_resume_array): New.
14185         (linux_set_resume_request): Add new `arg' parameter.  Adjust to
14186         resume interface change.
14187         (linux_continue_one_thread, linux_queue_one_thread)
14188         (resume_status_pending_p): Check if the resume field is NULL
14189         instead of checking the leave_stopped member.
14190         (linux_resume): Adjust to the target resume interface change.
14191         * spu-low.c (spu_resume): Adjust to the target resume interface
14192         change.
14193         * win32-low.c (win32_detach, win32_resume): Ditto.
14194
14195 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
14196
14197         * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14198         flag.
14199         (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14200         pending.
14201         (linux_continue_one_thread): Only preserve the stepping flag if
14202         there's a pending breakpoint.
14203
14204 2009-03-31  Pedro Alves  <pedro@codesourcery.com>
14205
14206         * server.c (main): After the inferior having exited, call
14207         remote_close before exiting gdbserver.
14208
14209 2009-03-25  Thiago Jung Bauermann  <bauerman@br.ibm.com>
14210
14211         Fix size of FPSCR in Power 7 processors.
14212         * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14213         (PPC_FEATURE_HAS_DFP): New #define.
14214         (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14215         size of the FPSCR.
14216
14217 2009-03-23  Pedro Alves  <pedro@codesourcery.com>
14218
14219         * server.c (handle_query) Whitespace and formatting.
14220
14221 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
14222
14223         * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14224         linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14225         linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14226         linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14227         regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14228         thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14229         Makefile.in, configure.ac: Fix whitespace throughout.
14230         * configure: Regenerate.
14231
14232 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
14233
14234         * inferiors.c (find_inferior): Make it safe for the callback
14235         function to delete the currently iterated inferior.
14236
14237 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
14238
14239         * Makefile.in (linuw_low_h): Move higher.
14240         (thread-db.o): Depend on $(linux_low_h).
14241
14242 2009-03-17  Pedro Alves  <pedro@codesourcery.com>
14243
14244         Rename "process" to "lwp" throughout.
14245
14246         * linux-low.c (all_processes): Rename to...
14247         (all_lwps): ... this.
14248         (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14249         (add_process): Rename to ...
14250         (add_lwp): ... this.  Adjust.
14251         (linux_create_inferior): Adjust.
14252         (linux_attach_lwp): Adjust.
14253         (linux_attach): Adjust.
14254         (linux_kill_one_process): Rename to ...
14255         (linux_kill_one_lwp): ... this.  Adjust.
14256         (linux_kill): Adjust.
14257         (linux_detach_one_process): Rename to ...
14258         (linux_detach_one_lwp): ... this.  Adjust.
14259         (linux_detach): Adjust.
14260         (check_removed_breakpoint): Adjust.
14261         (status_pending_p): Adjust.
14262         (linux_wait_for_process): Rename to ...
14263         (linux_wait_for_lwp): ... this.  Adjust.
14264         (linux_wait_for_event): Adjust.
14265         (send_sigstop): Adjust.
14266         (wait_for_sigstop): Adjust.
14267         (stop_all_processes): Rename to ...
14268         (stop_all_lwps): ... this.
14269         (linux_resume_one_process): Rename to ...
14270         (linux_resume_one_lwp): ... this.  Adjust.
14271         (linux_set_resume_request, linux_continue_one_thread)
14272         (linux_queue_one_thread, resume_status_pending_p)
14273         (usr_store_inferior_registers, regsets_store_inferior_registers)
14274         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14275         Adjust.
14276         * linux-low.h (get_process): Rename to ...
14277         (get_lwp): ... this.  Adjust.
14278         (get_thread_process): Rename to ...
14279         (get_thread_lwp): ... this.  Adjust.
14280         (get_process_thread): Rename to ...
14281         (get_lwp_thread): ... this.  Adjust.
14282         (struct process_info): Rename to ...
14283         (struct lwp_info): ... this.
14284         (all_processes): Rename to ...
14285         (all_lwps): ... this.
14286         * proc-service.c (ps_lgetregs): Adjust.
14287         * thread-db.c (thread_db_create_event, find_one_thread)
14288         (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14289
14290 2009-03-14  Pedro Alves  <pedro@codesourcery.com>
14291
14292         * server.c (handle_query): Handle "qAttached".
14293
14294 2009-03-13  Nathan Sidwell  <nathan@codesourcery.com>
14295
14296         * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14297         GPLv3, update license URL.
14298
14299 2009-03-01  Doug Evans  <dje@google.com>
14300
14301         * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14302         (server_h): Add gdb_signals.h.
14303         (signals.o): Update.
14304         * server.h (target_signal_from_host,target_signal_to_host_p)
14305         (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14306
14307 2009-02-14  Pierre Muller  <muller@ics.u-strasbg.fr>
14308
14309         * remote-utils.c (getpkt): Also generate remote-debug
14310         information if noack_mode is set.
14311
14312 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
14313
14314         * server.c (handle_query): Report qXfer:siginfo:read and
14315         qXfer:siginfo:write as supported and handle them.
14316         * target.h (struct target_ops) <qxfer_siginfo>: New field.
14317         * linux-low.c (linux_xfer_siginfo): New.
14318         (linux_target_ops): Set it.
14319
14320 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
14321
14322         * server.c (gdbserver_usage): Mention --remote-debug.
14323         (main): Accept '--remote-debug' switch.
14324
14325 2009-01-18  Doug Evans  <dje@google.com>
14326
14327         * regcache.c (new_register_cache): No need to check result of xcalloc.
14328         * server.c (handle_search_memory): Back out calls to xmalloc,
14329         result is checked and error is returned to user upon failure.
14330         (handle_query): Ditto.  Add more checks for result of malloc.
14331         (handle_v_cont): Check result of malloc, report error back to
14332         user upon failure.
14333         (handle_v_run): Ditto.  Call freeargv.
14334         * server.h (freeargv): Declare.
14335         * utils.c (freeargv): New fn.
14336
14337 2009-01-15  Doug Evans  <dje@google.com>
14338
14339         * gdbreplay.c (perror_with_name): Make arg const char *.
14340         * server.h (target_signal_to_name): Make return type const char *.
14341         * thread-db.c (thread_db_err_str): Make return type const char *.
14342         * utils.c (perror_with_name): Make arg const char *.
14343
14344 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
14345
14346         * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14347         when handling a EXIT_PROCESS_DEBUG_EVENT.
14348
14349 2009-01-06  Joel Brobecker  <brobecker@adacore.com>
14350
14351         * gdbreplay.c (gdbreplay_version): Update copyright year.
14352         * server.c (gdbserver_version): Likewise.
14353
14354 2009-01-05  Doug Evans  <dje@google.com>
14355
14356         * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14357         (handle_extended_wait): Improve comment.
14358
14359 2008-12-13  Doug Evans  <dje@google.com>
14360
14361         * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14362         * server.h (ATTR_MALLOC): New macro.
14363         (xmalloc,xcalloc,xstrdup): Declare.
14364         * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14365         * inferiors.c: Ditto.
14366         * linux-low.c: Ditto.
14367         * mem-break.c: Ditto.
14368         * regcache.c: Ditto.
14369         * remote-utils.c: Ditto.
14370         * server.c: Ditto.
14371         * target.c: Ditto.
14372         * win32-low.c: Ditto.
14373
14374 2008-12-12  Doug Evans  <dje@google.com>
14375
14376         * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14377         in debugging printf.
14378
14379         * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14380
14381 2008-12-09  Doug Evans  <dje@google.com>
14382
14383         * linux-low.h (struct process_info): Delete member tid, unused.
14384         * thread-db.c (find_one_thread): Update.
14385         (maybe_attach_thread): Update.
14386
14387 2008-12-02  Pedro Alves  <pedro@codesourcery.com>
14388
14389         * target.h (struct target_ops): Add qxfer_osdata member.
14390         * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14391         and dirent.h.
14392         (linux_qxfer_osdata): New functions.
14393         (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14394         callback.
14395         * server.c (handle_query): Handle "qXfer:osdata:read:".
14396         * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14397         (buffer_xml_printf): New functions.
14398         * server.h (struct buffer): New.
14399         (buffer_grow_str, buffer_grow_str0): New macros.
14400         (buffer_grow, buffer_free, buffer_init, buffer_finish)
14401         (buffer_xml_printf): Declare.
14402
14403 2008-11-24  Doug Evans  <dje@google.com>
14404
14405         * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14406
14407 2008-11-24  Daniel Jacobowitz  <dan@codesourcery.com>
14408
14409         * server.c (handle_v_run): Always use the supplied argument list.
14410
14411 2008-11-19  Bob Wilson  <bob.wilson@acm.org>
14412
14413         * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14414         (xtensa_regmap_table): Add entry for scompare1.
14415
14416 2008-11-18  Thiago Jung Bauermann  <bauerman@br.ibm.com>
14417
14418         * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14419         powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14420         powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14421         powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14422         powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14423         powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14424         * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14425         XML target descriptions.
14426         * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14427         when inferior is running on an ISA 2.05 or later processor.  Add
14428         special case to return offset for full 64-bit slot of FPSCR when
14429         in 32-bits.
14430
14431 2008-11-14  Daniel Gutson  <dgutson@codesourcery.com>
14432
14433         * Makefile.in (SFILES, clean): Added sparc64 files.
14434         (reg-sparc64.o, reg-sparc64.c): New.
14435         * configure.srv (sparc*-*-linux*): New configuration.
14436         * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14437         syscall arguments for SPARC.
14438         (regsets_store_inferior_registers): Likewise.
14439         * linux-sparc-low.c: New file.
14440
14441 2008-10-21  Doug Evans  <dje@google.com>
14442
14443         * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14444         (READLINE_DIR,READLINE_DEP): Delete.
14445         (INTERNAL_CFLAGS): Update.
14446         (LINTFLAGS): Update.
14447
14448 2008-10-10  Pedro Alves  <pedro@codesourcery.com>
14449
14450         * server.c (handle_v_run): If GDB didn't specify an argv, use the
14451         whole argv from the last run, not just argv[0].
14452
14453 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
14454
14455         * regcache.c (new_register_cache): Return NULL if the register
14456         cache size isn't known yet.
14457         (free_register_cache): Avoid dereferencing a NULL regcache.
14458
14459 2008-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
14460
14461         * configure.srv: Merge MIPS and MIPS64.
14462
14463 2008-08-24  Maciej W. Rozycki  <macro@linux-mips.org>
14464
14465         * Makefile.in (uninstall): Apply $(EXEEXT) too.
14466
14467 2008-08-18  Luis Machado  <luisgpm@br.ibm.com>
14468
14469         * Makefile.in: Add required vsx dependencies.
14470
14471         * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14472         Declare init_registers_powerpc_vsx32l.
14473         Declare init_registers_powerpc_vsx64l.
14474         Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14475         (ppc_arch_setup): Check for VSX in hwcap.
14476         (ppc_fill_vsxregset): New function.
14477         (ppc_store_vsxregset): New function.
14478         Add new VSX entry in regset_info target_regsets.
14479
14480         * configure.srv: Add new VSX dependencies.
14481
14482 2008-08-12  Pedro Alves  <pedro@codesourcery.com>
14483
14484         * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14485         (remote_open): Set or clear transport_is_reliable.
14486         (putpkt_binary): Don't expect acks in noack mode.
14487         (getpkt): Don't send ack/nac in noack mode.
14488         * server.c (handle_general_set): Handle QStartNoAckMode.
14489         (handle_query): If connected by tcp pass QStartNoAckMode+ in
14490         qSupported.
14491         (main): Reset noack_mode on every connection.
14492         * server.h (noack_mode): Declare.
14493
14494 2008-08-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14495
14496         * Makefile.in (GDBREPLAY_OBS): New variable.
14497         (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14498
14499 2008-08-05  Ulrich Weigand  <uweigand@de.ibm.com>
14500             Daniel Jacobowitz  <dan@codesourcery.com>
14501
14502         * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14503         (usr_store_inferior_registers): Likewise.
14504         (regsets_store_inferior_registers): Likewise.
14505
14506 2008-07-31  Rolf Jansen  <rj@surtec.com>
14507             Pedro Alves  <pedro@codesourcery.com>
14508
14509         * configure.ac: Check for memmem declaration.
14510         * server.c [HAVE_MALLOC_H]: Include malloc.h.
14511         (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14512         (disable_packet_qfThreadInfo): Unconditionally compile.
14513         * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14514         * configure, config.in: Regenerate.
14515
14516 2008-07-28  Doug Kwan  <dougkwan@google.com>
14517
14518         * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14519         (linux_write_memory): Remove declaration of errno.
14520
14521 2008-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
14522
14523         * linux-low.c (handle_extended_wait): Do not use "status"
14524         variable uninitialized.
14525
14526 2008-07-07  Pedro Alves  <pedro@codesourcery.com>
14527
14528         * server.c (handle_v_attach): Inhibit reporting dll changes.
14529
14530 2008-06-27  Pedro Alves  <pedro@codesourcery.com>
14531
14532         * remote-utils.c (prepare_resume_reply): If requested, don't
14533         output "thread:TID" in the T stop reply.
14534
14535         * server.c (disable_packet_vCont, disable_packet_Tthread)
14536         (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14537         (handle_query): If requested, disable support for qC, qfThreadInfo
14538         and qsThreadInfo.
14539         (handle_v_requests): If requested, disable support for vCont.
14540         (gdbserver_show_disableable): New.
14541         (main): Handle --disable-packet and --disable-packet=LIST.
14542
14543         * server.h (disable_packet_vCont, disable_packet_Tthread)
14544         (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14545
14546 2008-06-20  Carlos O'Donell  <carlos@codesourcery.com>
14547
14548         * server.c (gdbserver_usage): Mention --version.
14549
14550 2008-06-06  Daniel Jacobowitz  <dan@codesourcery.com>
14551
14552         * Makefile.in (gdbreplay.o): New rule.
14553
14554 2008-06-06  Joseph Myers  <joseph@codesourcery.com>
14555
14556         * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14557         message, not gdbserver.
14558
14559 2008-06-05  Vladimir Prus  <vladimir@codesourcery.com>
14560             Nathan Sidwell  <nathan@codesourcery.com>
14561             Joseph Myers  <joseph@codesourcery.com>
14562
14563         * acinclude.m4: Include ../../config/acx.m4.
14564         * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14565         * configure, config.in: Regenerate.
14566         * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14567         * server.c (gdbserver_version): Print PKGVERSION.
14568         (gdbsrever_usage): Add stream parameter.  Print REPORT_BUGS_TO.
14569         (main): Adjust gdbserver_usage calls.
14570         * gdbreplay.c (version, host_name): Add declarations.
14571         (gdbreplay_version, gdbreplay_usage): New.
14572         (main): Accept --version and --help options.
14573
14574 2008-06-04  Daniel Jacobowitz  <dan@codesourcery.com>
14575
14576         * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14577         (arm_breakpoint_at): Handle Thumb.
14578         (the_low_target): Add comment.
14579
14580 2008-05-29  Ulrich Weigand  <uweigand@de.ibm.com>
14581
14582         * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14583
14584 2008-05-09  Doug Evans  <dje@google.com>
14585
14586         * server.h (decode_search_memory_packet): Declare.
14587         * remote-utils.c (decode_search_memory_packet): New fn.
14588         * server.c (handle_search_memory_1): New fn.
14589         (handle_search_memory): New fn.
14590         (handle_query): Process qSearch:memory packets.
14591
14592 2008-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
14593
14594         * regcache.c (registers_length): Remove.
14595         (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14596         full register packet.
14597         * regcache.h (registers_length): Remove prototype.
14598         * server.h (PBUFSIZ): Define to 16384.
14599
14600 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
14601
14602         * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14603         powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14604         powerpc-64l.o, and powerpc-altivec64l.o.
14605         Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14606         rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14607         rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14608         rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14609         rs6000/power-linux.xml, and rs6000/power64-linux.xml
14610         to srv_xmlfiles.
14611
14612         * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14613         (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14614         (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14615         (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14616         (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14617         (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14618         (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14619         (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14620         (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14621         (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14622         (clean): Update.
14623
14624         * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14625         (init_registers_powerpc_32l): ... this new prototype.
14626         (init_registers_powerpc_32): Remove, replace by ...
14627         (init_registers_powerpc_altivec32l): ... this new prototype.
14628         (init_registers_powerpc_e500): Remove, replace by ...
14629         (init_registers_powerpc_e500l): ... this new prototype.
14630         (init_registers_ppc64): Remove, replace by ...
14631         (init_registers_powerpc_64l): ... this new prototype.
14632         (init_registers_powerpc_64): Remove, replace by ...
14633         (init_registers_powerpc_altivec64l): ... this new prototype.
14634         (ppc_num_regs): Set to 73.
14635         (PT_ORIG_R3, PT_TRAP): Define if necessary.
14636         (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14637         (ppc_cannot_store_register): Handle orig_r3 and trap.
14638         (ppc_arch_setup): Update init_registers_... calls.
14639         (ppc_fill_gregset): Handle orig_r3 and trap.
14640
14641         * inferiors.c (clear_inferiors): Reset current_inferior.
14642
14643 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
14644
14645         * acinclude.m4: Add override.m4.
14646         * configure: Regenerate.
14647
14648 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
14649
14650         * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14651         initial call to init_register_ppc64.
14652
14653 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
14654
14655         * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14656         single powerpc*-*-linux* case.
14657         (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14658
14659 2008-04-17  Ulrich Weigand  <uweigand@de.ibm.com>
14660
14661         * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14662         srv_regobj.  Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14663         from reg_xmlfiles.
14664         * linux-ppc-low.c: Include <elf.h>.
14665         (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14666         (ppc_hwcap): New global variable.
14667         (ppc_regmap): Remove __SPE__ #ifdef sections.
14668         (ppc_regmap_e500): New global variable.
14669         (ppc_cannot_store_register): Update __SPE__ special case.
14670         (ppc_get_hwcap): New function.
14671         (ppc_arch_setup): Use it to determine whether inferior supports
14672         AltiVec or SPE registers.  Set the_low_target.regmap if appropriate.
14673         (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14674         Do not access registers if target does not support AltiVec.
14675         (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14676         Do not access registers if target does not support SPE.
14677         (target_regsets): Unconditionally include AltiVec and SPE regsets.
14678
14679 2008-04-17  Daniel Jacobowitz  <dan@codesourcery.com>
14680
14681         * linux-low.c (disabled_regsets, num_regsets): New.
14682         (use_regsets_p): Delete.
14683         (linux_wait_for_process): Clear disabled_regsets.
14684         (regsets_fetch_inferior_registers): Check and set it.
14685         (regsets_store_inferior_registers): Likewise.
14686         (linux_fetch_registers, linux_store_registers): Do not use
14687         use_regsets_p.
14688         (initialize_low): Allocate disabled_regsets.
14689
14690 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
14691
14692         * Makefile.in (LIBOBJS): New.
14693         (OBS): Use LIBOBJS.
14694         (memmem.o): New rule.
14695         * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14696         * configure: Regenerated.
14697
14698 2008-04-04  Ulrich Weigand  <uweigand@de.ibm.com>
14699
14700         * server.c (handle_query): Never return "unsupported" for
14701         qXfer:features:read queries.
14702
14703 2008-03-27  Ulrich Weigand  <uweigand@de.ibm.com>
14704
14705         * server.c (get_features_xml): Fix inverted condition.
14706         (handle_query): Always support qXfer:feature:read.
14707
14708 2008-03-10  Daniel Jacobowitz  <dan@codesourcery.com>
14709
14710         * server.c (wrapper_argv): New.
14711         (start_inferior): Handle wrapper_argv.  If set, expect an extra
14712         trap.
14713         (gdbserver_usage): Document --wrapper.
14714         (main): Parse --wrapper.
14715
14716 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
14717
14718         * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14719         powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14720         * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14721         (ppc_set_pc): Likewise.
14722         (ppc_arch_setup): New function.
14723         (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14724         of collect_register.
14725         (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14726
14727 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
14728
14729         * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14730         instead of linux-ppc64-low.o.
14731         * linux-ppc64-low.c: Remove file.
14732         * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14733         (linux-ppc64-low.o): Remove rule.
14734
14735         * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14736         (init_registers_powerpc_64): Likewise.
14737         (ppc_regmap): Conditionally define depending on __powerpc64__.
14738         (ppc_cannot_store_register): Do not special-case "fpscr" when
14739         compiled on __powerpc64__.
14740         (ppc_collect_ptrace_register): New function.
14741         (ppc_supply_ptrace_register): New function.
14742         (ppc_breakpoint): Change type to "unsigned int".
14743         (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14744         (the_low_target): Conditionally provide initializers for the
14745         arch_setup member depending on __powerpc64__.  Install
14746         collect_ptrace_register and supply_ptrace_register members.
14747
14748 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
14749
14750         * regcache.h (gdbserver_xmltarget): Add extern declaration.
14751         * server.c (gdbserver_xmltarget): Define.
14752         (get_features_xml): Use it to replace "target.xml" and arch_string.
14753
14754         * configure.srv: Remove srv_xmltarget.  Add XML files that were
14755         mentioned there to srv_xmlfiles instead.  Remove conditional tests
14756         on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14757         srv_xmlfiles and srv_regobj to include all possible choices.
14758         * configure.ac (srv_xmltarget): Remove.
14759         (srv_xmlfiles): Do not add "target.xml".
14760         (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14761         checks for supplementary target information.
14762         * configure: Regenerate.
14763         * Makefile.in (XML_TARGET): Remove.
14764         (target.xml): Remove rule.
14765         (clean): Do not clean up target.xml.
14766         (.PRECIOUS): Do not mention target.xml.
14767
14768         * target.h (struct target_ops): Remove arch_string member.
14769         * linux-low.c (linux_arch_string): Remove.
14770         (linux_target_ops): Remove arch_string initializer.
14771         * linux-low.h (struct linux_target_ops): Remove arch_string member.
14772         * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14773         * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14774         * spu-low.c (spu_arch_string): Remove.
14775         (spu_target_ops): Remove arch_string initializer.
14776         * win32-low.c (win32_arch_string): Remove.
14777         (win32_target_ops): Remove arch_string initializer.
14778         * win32-low.h (struct win32_target_ops): Remove arch_string member.
14779         * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14780         * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14781
14782 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
14783
14784         * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14785         by collect_ptrace_register and supply_ptrace_register hooks.
14786         * linux-low.c (fetch_register): Use supply_ptrace_register callback
14787         instead of checking for the_low_target.left_pad_xfer.
14788         (usr_store_inferior_registers): Use collect_ptrace_register callback
14789         instead of checking for the_low_target.left_pad_xfer.
14790
14791         * linux-s390-low.c (s390_collect_ptrace_register): New function.
14792         (s390_supply_ptrace_register): Likewise.
14793         (s390_fill_gregset): Call s390_collect_ptrace_register.
14794         (the_low_target): Update.
14795
14796         * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14797         (ppc_supply_ptrace_register): Likewise.
14798         (the_low_target): Update.
14799
14800         * linux-i386-low.c (the_low_target): Update.
14801         * linux-x86-64-low.c (the_low_target): Update.
14802
14803 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
14804
14805         * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14806         reg-s390.o and reg-s390x.o.
14807
14808         * linux-low.c (new_inferior): New global variable.
14809         (linux_create_inferior, linux_attach): Set it.
14810         (linux_wait_for_process): Call the_low_target.arch_setup after the
14811         target has stopped for the first time.
14812         (initialize_low): Do not call the_low_target.arch_setup.
14813
14814         * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14815         (s390_set_pc): Likewise.
14816         (s390_arch_setup): New function.
14817         (the_low_target): Use s390_arch_setup as arch_setup routine.
14818
14819         * regcache.c (realloc_register_cache): New function.
14820         (set_register_cache): Call it for each existing regcache.
14821
14822 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
14823
14824         * server.h (init_registers): Remove prototype.
14825
14826         * linux-low.h (struct linux_target_ops): Add arch_setup field.
14827         * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14828         instead of init_registers ().
14829         * linux-arm-low.c (init_registers_arm): Add prototype.
14830         (init_registers_arm_with_iwmmxt): Likewise.
14831         (the_low_target): Add initializer for arch_setup field.
14832         * linux-cris-low.c (init_registers_cris): Add prototype.
14833         (the_low_target): Add initializer for arch_setup field.
14834         * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14835         (the_low_target): Add initializer for arch_setup field.
14836         * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14837         (the_low_target): Add initializer for arch_setup field.
14838         * linux-ia64-low.c (init_registers_ia64): Add prototype.
14839         (the_low_target): Add initializer for arch_setup field.
14840         * linux-m32r-low.c (init_registers_m32r): Add prototype.
14841         (the_low_target): Add initializer for arch_setup field.
14842         * linux-m68k-low.c (init_registers_m68k): Add prototype.
14843         (the_low_target): Add initializer for arch_setup field.
14844         * linux-mips-low.c (init_registers_mips_linux): Add prototype.
14845         (init_registers_mips64_linux): Likewise.
14846         (the_low_target): Add initializer for arch_setup field.
14847         * linux-ppc-low.c (init_registers_ppc): Add prototype.
14848         (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
14849         (the_low_target): Add initializer for arch_setup field.
14850         * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
14851         (init_registers_powerpc_64): Likewise.
14852         (the_low_target): Add initializer for arch_setup field.
14853         * linux-s390-low.c (init_registers_s390): Add prototype.
14854         (init_registers_s390x): Likewise.
14855         (the_low_target): Add initializer for arch_setup field.
14856         * linux-sh-low.c (init_registers_sh): Add prototype.
14857         (the_low_target): Add initializer for arch_setup field.
14858         * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
14859         (the_low_target): Add initializer for arch_setup field.
14860         * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
14861         (the_low_target): Add initializer for arch_setup field.
14862
14863         * win32-low.h (struct win32_target_ops): Add arch_setup field.
14864         * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
14865         instead of init_registers ().
14866         * win32-arm-low.c (init_registers_arm): Add prototype.
14867         (the_low_target): Add initializer for arch_setup field.
14868         * win32-i386-low.c (init_registers_i386): Add prototype.
14869         (the_low_target): Add initializer for arch_setup field.
14870
14871         * spu-low.c (init_registers_spu): Add prototype.
14872         (initialize_low): Call initialie_registers_spu () instead of
14873         initialize_registers ().
14874
14875 2008-02-19  Pedro Alves  <pedro@codesourcery.com>
14876
14877         * server.c (handle_v_requests): When handling the vRun and vAttach
14878         packets, if already debugging a process, don't kill it.  Return an
14879         error instead.
14880
14881 2008-02-17  Daniel Jacobowitz  <dan@codesourcery.com>
14882
14883         * server.c (handle_query): Correct length check.
14884
14885 2008-02-14  Pedro Alves  <pedro_alves@portugalmail.pt>
14886
14887         * win32-low.c (do_initial_child_stuff): Add process handle
14888         parameter.  Set current_process_handle and current_process_id from the
14889         parameters. Clear globals.
14890         (win32_create_inferior): Don't set current_process_handle and
14891         current_process_id here.  Instead pass them on the call to
14892         do_initial_child_stuff.
14893         (win32_attach): Likewise.
14894         (win32_clear_inferiors): New.
14895         (win32_kill): Don't close the current process handle or the
14896         current thread handle here.  Instead call win32_clear_inferiors.
14897         (win32_detach): Don't open a new handle to the process.  Call
14898         win32_clear_inferiors.
14899         (win32_join): Don't rely on current_process_handle; open a new
14900         handle using the process id.
14901         (win32_wait): Call win32_clear_inferiors when the inferior process
14902         has exited.
14903
14904 2008-02-14  Daniel Jacobowitz  <dan@codesourcery.com>
14905
14906         * server.c (monitor_show_help): Add "exit".
14907
14908 2008-02-11  Maxim Grigoriev  <maxim2405@gmail.com>
14909
14910         * Makefile.in (SFILES): Add linux-xtensa-low.c.
14911         (clean): Add reg-xtensa.c.
14912         (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
14913         * configure.srv (xtensa*-*-linux*) New target.
14914         * linux-xtensa-low.c: New.
14915         * xtensa-xtregs.c: New.
14916
14917 2008-02-01  Pedro Alves  <pedro_alves@portugalmail.pt>
14918
14919         * hostio.c: Don't include errno.h.
14920         (errno_to_fileio_errno): Move to hostio-errno.
14921         * hostio.c: (hostio_error): Remove the error parameter.  Defer the
14922         error number outputting to the target->hostio_last_error callback.
14923         (hostio_packet_error): Use FILEIO_EINVAL directly.
14924         (handle_open, handle_pread, hostio_error, handle_unlink): Update
14925         calls to hostio_error.
14926         * hostio-errno.c: New.
14927         * server.h (hostio_last_error_from_errno): Declare.
14928         * target.h (target_ops): Add hostio_last_error member.
14929         * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
14930         as hostio_last_error handler.
14931         * spu-low.c (spu_target_ops): Likewise.
14932         * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
14933         (wince_hostio_last_error): New functions.
14934         (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
14935         as hostio_last_error handler.
14936         (win32_target_ops) [!_WIN32_WCE]: Register
14937         hostio_last_error_from_errno as hostio_last_error handler.
14938         * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
14939         (hostio-errno.o): New rule.
14940         * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
14941         * configure.srv (srv_hostio_err_objs): New variable.  Default to
14942         hostio-errno.o.
14943         (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
14944         * configure: Regenerate.
14945
14946 2008-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
14947
14948         * linux-low.c (linux_attach_lwp): Do not _exit after errors.
14949         (linux_kill, linux_detach): Clean up the process list.
14950         * remote-utils.c (remote_open): Improve port number parsing.
14951         (putpkt_binary, input_interrupt): Only send interrupts if the target
14952         is running.
14953         * server.c (extended_protocol): Make static.
14954         (attached): Define earlier.
14955         (exit_requested, response_needed, program_argv): New variables.
14956         (target_running): New.
14957         (start_inferior): Clear attached here.
14958         (attach_inferior): Set attached here.
14959         (require_running): Define.
14960         (handle_query): Use require_running and target_running.  Implement
14961         "monitor exit".
14962         (handle_v_attach, handle_v_run): New.
14963         (handle_v_requests): Use require_running.  Handle vAttach and vRun.
14964         (gdbserver_usage): Update.
14965         (main): Redo argument parsing.  Handle --debug and --multi.  Handle
14966         --attach along with other options or after the port.  Save
14967         program_argv.  Support no initial program.  Resynchronize
14968         communication with GDB after an error.  Handle "monitor exit".
14969         Use require_running and target_running.  Always allow the extended
14970         protocol.  Do not error out for Hc0 or Hc-1.  Do not automatically
14971         restart in extended mode.
14972         * README: Refer to the GDB manual.  Update --attach usage.
14973
14974 2007-12-20  Andreas Schwab  <schwab@suse.de>
14975
14976         * linux-low.c (STACK_SIZE): Define.
14977         (linux_tracefork_child): Use it.  Use __clone2 on ia64.
14978         (linux_test_for_tracefork): Likewise.
14979
14980 2007-12-18  Daniel Jacobowitz  <dan@codesourcery.com>
14981
14982         * linux-low.c (linux_wait_for_event): Update messages.  Do not
14983         reinsert auto-delete breakpoints.
14984         * mem-break.c (struct breakpoint): Change return type of handler to
14985         int.
14986         (set_breakpoint_at): Update handler type.
14987         (reinsert_breakpoint_handler): Return 1 instead of calling
14988         delete_breakpoint.
14989         (reinsert_breakpoint_by_bp): Check for the original breakpoint before
14990         setting a new one.
14991         (check_breakpoints): Delete auto-delete breakpoints and return 2.
14992         * mem-break.h (set_breakpoint_at): Update handler type.
14993         * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
14994         * win32-low.c (auto_delete_breakpoint): New.
14995         (get_child_debug_event): Use it.
14996
14997 2007-12-16  Daniel Jacobowitz  <dan@codesourcery.com>
14998
14999         * configure.ac: Check for pread and pwrite.
15000         * hostio.c (handle_pread): Fall back to lseek and read.
15001         (handle_pwrite): Fall back to lseek and write.
15002         * config.in, configure: Regenerated.
15003
15004 2007-12-07  Daniel Jacobowitz  <dan@codesourcery.com>
15005
15006         * server.c (myresume): Add own_buf argument.
15007         (main): Update calls.
15008
15009 2007-12-06  Daniel Jacobowitz  <dan@codesourcery.com>
15010
15011         * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15012         * remote-utils.c (remote_open): Do not call disable_async_io.
15013         (block_async_io): Delete.
15014         (unblock_async_io): Make static.
15015         (initialize_async_io): New.
15016         * server.c (handle_v_cont): Handle async I/O here.
15017         (myresume): Likewise.  Move other common resume tasks here...
15018         (main): ... from here.  Call initialize_async_io.  Disable async
15019         I/O before the main loop.
15020         * server.h (initialize_async_io): Declare.
15021         (block_async_io, unblock_async_io): Delete prototypes.
15022         * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15023
15024 2007-12-06  Mick Davis  <mickd@goanna.iinet.net.au>
15025
15026         * remote-utils.c (readchar): Allow binary data in received messages.
15027
15028 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
15029
15030         * win32-low.c (attaching): New global.
15031         (win32_create_inferior): Clear the `attaching' global.
15032         (win32_attach): Set the `attaching' global.
15033         (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15034         attaching.  Only set a breakpoint at the entry point if not
15035         attaching.
15036
15037 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
15038
15039         * server.c (main): Don't report dll events on the initial
15040         connection on attaches.
15041
15042 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
15043
15044         * server.c (main): Relax numerical bases supported for the pid of
15045         the --attach command line argument.
15046
15047 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
15048
15049         * win32-low.c (win32_attach): Call OpenProcess before
15050         DebugActiveProcess, not after.  Add last error output to error
15051         call.
15052
15053 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
15054
15055         * win32-low.c (win32_get_thread_context)
15056         (win32_set_thread_context): New functions.
15057         (thread_rec): Use win32_get_thread_context.
15058         (continue_one_thread, win32_resume): Use win32_set_thread_context.
15059         * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15060         field.
15061
15062 2007-12-03  Leo Zayas
15063             Pedro Alves  <pedro_alves@portugalmail.pt>
15064
15065         * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15066         global variables.
15067         (child_add_thread): Minor cleanup.
15068         (child_continue): Resume artificially suspended threads before
15069         calling ContinueDebugEvent.
15070         (suspend_one_thread): New.
15071         (fake_breakpoint_event): New.
15072         (get_child_debug_event): Change return type to int.  Check here if
15073         gdb sent an interrupt request.  If a soft interrupt was requested,
15074         fake a breakpoint event.  Return 0 if there is no event to handle,
15075         and 1 otherwise.
15076         (win32_wait): Don't check here if gdb sent an interrupt request.
15077         Ensure there is a valid event to handle.
15078         (win32_request_interrupt): Add soft interruption method as last
15079         resort.
15080
15081 2007-12-03  Leo Zayas
15082             Pedro Alves  <pedro_alves@portugalmail.pt>
15083
15084         * win32-low.h (win32_thread_info): Add descriptions to the
15085         structure members.  Replace `suspend_count' counter by a
15086         `suspended' flag.
15087         * win32-low.c (thread_rec): Update condition of when to get the
15088         context from the inferior.  Rely on ContextFlags being set if it
15089         has already been retrieved.  Only suspend the inferior thread if
15090         we haven't already.  Warn if that fails.
15091         (continue_one_thread): s/suspend_count/suspended/.  Only call
15092         ResumeThread once.  Warn if that fails.
15093
15094 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
15095
15096         * win32-low.c (win32_wait): Don't read from the inferior when it
15097         has already exited.
15098
15099 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
15100
15101         * Makefile.in (win32_low_h): New variable.
15102         (win32-low.o): Add dependency on $(win32_low_h).
15103         (win32-arm-low.o, win32-i386-low.o): New rules.
15104
15105 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
15106
15107         * hostio.c: Correct copyright year.
15108
15109 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
15110
15111         * Makefile.in (OBS): Add hostio.o.
15112         (hostio.o): New rule.
15113         * server.h (handle_vFile): Declare.
15114         * hostio.c: New file.
15115         * server.c (handle_v_requests): Take packet_len and new_packet_len
15116         for binary packets.  Call handle_vFile.
15117         (main): Update call to handle_v_requests.
15118
15119 2007-11-05  Daniel Jacobowitz  <dan@codesourcery.com>
15120
15121         * linux-low.c: Include <sched.h>.
15122
15123 2007-11-01  Daniel Jacobowitz  <dan@codesourcery.com>
15124
15125         * linux-low.c (linux_tracefork_grandchild): New.
15126         (linux_tracefork_child): Use clone.
15127         (linux_test_for_tracefork): Use clone; allocate and free a stack.
15128
15129 2007-10-31  Joel Brobecker  <brobecker@adacore.com>
15130
15131         * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15132
15133 2007-10-24  Daniel Jacobowitz  <dan@codesourcery.com>
15134
15135         * linux-low.c (handle_extended_wait): Handle unexpected signals.
15136
15137 2007-10-23  Daniel Jacobowitz  <dan@codesourcery.com>
15138
15139         * inferiors.c (change_inferior_id): Delete.
15140         (add_pid_to_list, pull_pid_from_list): New.
15141         * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15142         (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15143         (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15144         (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15145         (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15146         (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15147         (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15148         (using_threads): Always set to 1.
15149         (handle_extended_wait): New.
15150         (add_process): Do not set TID.
15151         (linux_create_inferior): Set must_set_ptrace_flags.
15152         (linux_attach_lwp): Remove TID argument.  Do not check using_threads.
15153         Use PTRACE_SETOPTIONS.  Call new_thread_notify.  Update all callers.
15154         (linux_thread_alive): Rename TID argument to LWPID.
15155         (linux_wait_for_process): Handle unknown processes.  Do not use TID.
15156         (linux_wait_for_event): Do not use TID or check using_threads.  Update
15157         call to dead_thread_notify.  Call handle_extended_wait.
15158         (linux_create_inferior): Use PTRACE_SETOPTIONS.
15159         (send_sigstop): Delete sigstop_sent.
15160         (wait_for_sigstop): Avoid TID.
15161         (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15162         (linux_test_for_tracefork): New.
15163         (linux_lookup_signals): Use thread_db_active and
15164         linux_supports_tracefork_flag.
15165         (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15166         * linux-low.h (get_process_thread): Avoid TID.
15167         (struct process_ifo): Move thread_known and tid to the end.  Remove
15168         sigstop_sent.
15169         (linux_attach_lwp, thread_db_init): Update prototypes.
15170         * server.h (change_inferior_id): Delete prototype.
15171         (add_pid_to_list, pull_pid_from_list): New prototypes.
15172         * thread-db.c (thread_db_use_events): New.
15173         (find_first_thread): Rename to...
15174         (find_one_thread): ...this.  Update callers and messages.  Do not
15175         call fatal.  Check thread_db_use_events.  Do not call
15176         change_inferior_id or new_thread_notify.
15177         (maybe_attach_thread): Update.  Do not call new_thread_notify.
15178         (thread_db_init): Set thread_db_use_events.  Check use_events.
15179         * utils.c (fatal, warning): Correct message prefix.
15180
15181 2007-10-15  Daniel Jacobowitz  <dan@codesourcery.com>
15182
15183         * Makefile.in (clean): Remove new files.
15184         (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15185         (powerpc-64.o, powerpc-64.c): New rules.
15186         * configure.srv: Use alternate register sets for powerpc64-*-linux*
15187         with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15188         with SPE.
15189         * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15190         SPE targets.
15191         (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15192         (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15193         (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15194         (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15195         (target_regsets): Add AltiVec and SPE register sets.
15196         * configure.ac: Check for AltiVec and SPE.
15197         * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15198         (ppc_fill_vrregset, ppc_store_vrregset): New.
15199         (target_regsets): Add AltiVec register set.
15200         * configure: Regenerated.
15201
15202 2007-09-19  Daniel Jacobowitz  <dan@codesourcery.com>
15203
15204         * linux-low.c (O_LARGEFILE): Define.
15205         (linux_read_memory): Use /proc/PID/mem.
15206         * configure.ac: Use AC_GNU_SOURCE.  Check for pread64.
15207         * configure, config.in: Regenerated.
15208
15209 2007-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
15210
15211         * linux-low.c (linux_wait_for_event): Do not pass signals while
15212         single-stepping.
15213
15214 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
15215
15216         * win32-low.c (create_process): New.
15217         (win32_create_inferior): Use create_process instead of
15218         CreateProcess.  If create_process failed retry appending an ".exe"
15219         suffix.  Store the GetLastError result immediatelly after
15220         create_process calls and use it on the call to error.
15221
15222 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
15223
15224         * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15225
15226 2007-08-23  Joel Brobecker  <brobecker@adacore.com>
15227
15228         * configure.ac: Switch license to GPLv3.
15229
15230 2007-08-01  Michael Snyder  <msnyder@access-company.com>
15231
15232         * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15233
15234 2007-07-31  Pedro Alves  <pedro_alves@portugalmail.pt>
15235
15236         * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15237         typedef.
15238         (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15239         (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL.  Get
15240         CloseToolhelp32Snapshot.
15241         (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15242         CloseToolhelp32Snapshot.
15243
15244 2007-07-27  Michael Snyder  <michael.snyder@access-company.com>
15245
15246         * server.c (main): Check for inferior exit before main loop.
15247
15248 2007-07-18  Pedro Alves  <pedro_alves@portugalmail.pt>
15249
15250         * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15251         instead of on tmp_desc.
15252
15253 2007-07-17  Pedro Alves  <pedro_alves@portugalmail.pt>
15254             Daniel Jacobowitz  <dan@codesourcery.com>
15255
15256         * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15257         (add_thread): Minor cleanups.
15258         (clear_inferiors): Move lower in the file.  Clear the DLL
15259         list.
15260         (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15261         * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15262         (xml_escape_text): New.
15263         * server.c (handle_query): Handle qXfer:libraries:read.  Report it
15264         for qSupported.
15265         (handle_v_cont): Report errors.
15266         (gdbserver_version): Update.
15267         (main): Correct size of own_buf.  Do not report initial DLL events.
15268         * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15269         (unloaded_dll, xml_escape_text): New.
15270         * win32-low.c (enum target_waitkind): Update comments.
15271         (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15272         (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15273         (win32_EnumProcessModules, win32_GetModuleInformation)
15274         (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15275         (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15276         (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15277         (win32_Module32First, win32_Module32Next, load_toolhelp)
15278         (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15279         (get_child_debug_event): Handle DLL events.
15280         (win32_wait): Likewise.
15281
15282 2007-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
15283
15284         * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15285         * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15286
15287 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
15288
15289         * win32-low.c (handle_output_debug_string): Ignore event if not
15290         waiting.
15291
15292 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
15293
15294         * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15295
15296 2007-07-03  Daniel Jacobowitz  <dan@codesourcery.com>
15297
15298         * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15299
15300 2007-07-02  Daniel Jacobowitz  <dan@codesourcery.com>
15301
15302         * inferiors.c (change_inferior_id): Add comment.
15303         * linux-low.c (check_removed_breakpoint): Add an early
15304         prototype.  Improve debug output.
15305         (linux_attach): Doc update.
15306         (linux_detach_one_process, linux_detach): Clean up before releasing
15307         each process.
15308         (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15309         * linux-low.h (struct process_info): Doc improvement.
15310         * mem-break.c (delete_all_breakpoints): New.
15311         * mem-break.h (delete_all_breakpoints): New prototype.
15312         * thread-db.c (find_first_thread): New.
15313         (thread_db_create_event): Call it instead of
15314         thread_db_find_new_threads.  Clean up unused variables.
15315         (maybe_attach_thread): Remove first thread handling.
15316         (thread_db_find_new_threads): Use find_first_thread.
15317         (thread_db_get_tls_address): Likewise.
15318
15319 2007-06-27  Daniel Jacobowitz  <dan@codesourcery.com>
15320
15321         * thread-db.c (thread_db_find_new_threads): Add prototype.
15322         (thread_db_create_event): Check for the main thread before adding
15323         a new thread.
15324         (maybe_attach_thread): Only enable event reporting if TID == 0.
15325         (thread_db_get_tls_address): Check for new threads.
15326
15327 2007-06-20  Daniel Jacobowitz  <dan@codesourcery.com>
15328
15329         * linux-low.c (linux_create_inferior): Try execv before execvp.
15330         * spu-low.c (spu_create_inferior): Likewise.
15331
15332 2007-06-13  Mike Frysinger  <vapier@gentoo.org>
15333
15334         * linux-low.c (linux_create_inferior): Change execv to execvp.
15335         * spu-low.c (spu_create_inferior): Likewies.
15336
15337 2007-06-13  Daniel Jacobowitz  <dan@codesourcery.com>
15338
15339         * Makefile.in (clean): Clean new files instead of deleted ones.
15340         (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15341         (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15342         rules.
15343         * configure.srv: Specify XML files and new regformats for MIPS and
15344         MIPS64 GNU/Linux.
15345         * linux-mips-low.c (mips_num_regs): Set to only used registers.
15346         (mips_regmap): Do not fetch $0.  Remove unused registers.  Add
15347         an entry for the restart register.
15348         (mips_cannot_fetch_register, mips_cannot_store_register)
15349         (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15350         register names to match the XML descriptions.
15351         (mips_fill_gregset, mips_store_gregset): Likewise.  Handle the
15352         restart register instead of $0.
15353
15354 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
15355             Markus Deuling  <deuling@de.ibm.com>
15356
15357         * remote-utils.c (decode_xfer_write): New function.
15358         * server.h (decode_xfer_write): Add prototype.
15359         * server.c (handle_query): Add PACKET_LEN argument.  Support
15360         qXfer:spu:read and qXfer:spu:write packets.
15361         (main): Pass packet_len to handle_query.
15362         * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15363         * target.h (target_ops): Add qxfer_spu.
15364
15365 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
15366
15367         * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15368         accessing non-seekable spufs files.
15369
15370 2007-05-16  Markus Deuling  <deuling@de.ibm.com>
15371
15372         * server.c (handle_query): Add reply for qC packet.
15373
15374 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
15375             Leo Zayas  <lerele@champenstudios@com>
15376
15377         * server.h (check_remote_input_interrupt_request): New function.
15378         * remote_utils.c (INVALID_DESCRIPTOR): New define.
15379         (remote_desc): Initialize with INVALID_DESCRIPTOR.
15380         (input_interrupt): Expose on USE_WIN32API too.  Fix whitespace.
15381         (check_remote_input_interrupt_request): New function.
15382         * server.h (check_remote_input_interrupt_request): Declare.
15383         * win32-low.c (winapi_DebugBreakProcess,
15384         winapi_GenerateConsoleCtrlEvent): New typedefs.
15385         (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15386         to 250 ms.
15387         (win32_wait): Check for remote interrupt request
15388         with check_remote_input_interrupt_request.
15389         (win32_request_interrupt): New function.
15390         (win32_target_op): Set request_interrupt to win32_request_interrupt.
15391
15392 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
15393
15394         * win32-low.c (debug_registers_changed,
15395         debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15396         CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15397         CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15398         (thread_rec): Get context using the low target.
15399         (child_add_thread): Call thread_added on the low target,
15400         which does the same thing.
15401         (regptr): Delete.
15402         (do_initial_child_stuff): Remove debug registers references.
15403         Set context using the low target.  Resume threads after
15404         setting the contexts.
15405         (child_continue): Remove dead variable.  Remove debug
15406         registers references.
15407         (child_fetch_inferior_registers): Go through the low target.
15408         (do_child_store_inferior_registers): Remove.
15409         (child_store_inferior_registers): Go through the low target.
15410         (win32_resume): Remove debug registers references.
15411         Set context using the low target.
15412         (handle_exception): Change return type to void.  Don't record
15413         context here.  Set status to TARGET_WAITKIND_SPURIOUS on a
15414         first chance exception.
15415         (get_child_debug_event): Change return type to void.  Remove
15416         goto loop.  Always return after waiting for debug event.
15417         (win32_wait): Convert to switch statement.  Handle spurious
15418         events.
15419
15420         * win32-i386-low.c (debug_registers_changed,
15421         debug_registers_used): New.
15422         (initial_stuff): Rename to ...
15423         (i386_initial_stuff): ... this.  Clear debug registers
15424         state variables.
15425         (store_debug_registers): Delete.
15426         (i386_get_thread_context): New.
15427         (load_debug_registers): Delete.
15428         (i386_set_thread_context): New.
15429         (i386_thread_added): New.
15430         (single_step): Rename to ...
15431         (i386_single_step): ... this.
15432         (do_fetch_inferior_registers): Rename to ...
15433         (i386_fetch_inferior_register): ... this.
15434         (i386_store_inferior_register): New.
15435         (the_low_target): Adapt to new interface.
15436
15437         * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15438         (arm_get_thread_context): New.
15439         (arm_set_thread_context): New.
15440         (regptr): New.
15441         (do_fetch_inferior_registers): Rename to ...
15442         (arm_fetch_inferior_register): ... this.
15443         (arm_store_inferior_register): New.
15444         (arm_wince_breakpoint): Reimplement as unsigned long.
15445         (arm_wince_breakpoint_len): Define.
15446         (the_low_target): Adapt to new interface.
15447
15448         * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15449         load_debug_registers.  Add get_thread_context, set_thread_context,
15450         thread_added and store_inferior_register.  Rename
15451         fetch_inferior_registers to fetch_inferior_register.
15452         (regptr): Remove declaration.
15453
15454 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
15455
15456         * linux-low.c (linux_detach): Change return type to int.  Return 0.
15457         * spu-low.c (spu_detach): Likewise.
15458
15459 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
15460
15461         * target.h (target_ops): Change return type of detach to int.
15462         Add join.
15463         (join_inferior): New.
15464         * server.c (main): Don't skip detach support on mingw32.
15465         If the inferior doesn't support detaching return error.
15466         Call join_inferior instead of using waitpid.
15467         * linux-low.c (linux_join): New.
15468         (linux_target_op): Add linux_join.
15469         * spu-low.c (spu_join): New.
15470         (spu_target_ops): Add spu_join.
15471         * win32-low.c (win32_detach): Adapt to new interface.
15472         Reopen current_process_handle before detaching.  Issue a child
15473         resume before detaching.
15474         (win32_join): New.
15475         (win32_target_op): Add win32_join.
15476
15477 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
15478
15479         * win32-low.c (win32-attach): Fix return value.
15480         * target.h (target_ops): Describe ATTACH return values.
15481
15482 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
15483
15484         * win32-low.c (GETPROCADDRESS): Define.
15485         (winapi_DebugActiveProcessStop): Add WINAPI.  typedef as pointer.
15486         (winapi_DebugSetProcessKillOnExit): Likewise.
15487         (win32_create_inferior): Force usage of ansi CreateProcessA.
15488         (win32_attach): Use GETPROCADDRESS.
15489         (win32_detach): Likewise.
15490
15491 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
15492
15493         * win32-low.c (win32_wait): Don't use WSTOPSIG.
15494
15495 2007-03-30  Pedro Alves  <pedro_alves@portugalmail.pt>
15496
15497         * win32-low.c: Commit leftover changes from 2007-03-29.
15498
15499 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
15500
15501         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15502         fields short instead of int.  Add explicit padding.
15503         (i387_cache_to_fsave): Remove unnecessary casts.
15504         (i387_fsave_to_cache): Doc fix.
15505         (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15506
15507 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
15508
15509         * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15510         (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15511
15512 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
15513
15514         * configure.srv (arm*-*-mingw32ce*): Move near the other
15515         arm targets.
15516
15517 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
15518
15519         * configure.ac: Add errno checking.
15520         (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15521         sys/file.h and malloc.h.
15522         (AC_CHECK_DECLS): Add perror.
15523         (srv_mingwce): Handle.
15524         * configure.srv (i[34567]86-*-cygwin*): Add
15525         win32-i386-low.o to srv_tgtobj.
15526         (i[34567]86-*-mingw*): Likewise.
15527         (arm*-*-mingw32ce*): Add case.
15528         * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15529         HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15530         [__MINGW32CE__] (strerror): New function.
15531         [__MINGW32CE__] (errno): Define to GetLastError.
15532         [__MINGW32CE__] (COUNTOF): New macro.
15533         (remote_open): Remove extra close call.
15534         * mem-break.c (delete_breakpoint_at): New function.
15535         * mem-break.h (delete_breakpoint_at): Declare.
15536         * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15537         HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15538         [USE_WIN32API] (read, write): Add char* casts.
15539         * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15540         * server.h: Include wincecompat.h on Windows CE.
15541         [HAVE_ERRNO_H]: Check.
15542         (perror): Declare if not declared.
15543         * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15544         (perror_with_name): Remove errno declaration.
15545         * wincecompat.h: New.
15546         * wincecompat.c: New.
15547         * win32-low.h: New.
15548         * win32-arm-low.c: New.
15549         * win32-i386-low.c: New.
15550         (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15551         (OUTMSG2): Make it safe.
15552         (_T): New macro.
15553         (COUNTOF): New macro.
15554         (NUM_REGS): Get it from the low target.
15555         (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15556         CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15557         (thread_rec): Let low target handle debug registers.
15558         (child_add_thread): Likewise.
15559         (child_init_thread_list): Likewise.
15560         (continue_one_thread): Likewise.
15561         (regptr): New.
15562         (do_child_fetch_inferior_registers): Move to ...
15563         * win32-i386-low.c: ... here, and rename to ...
15564         (do_fetch_inferior_registers): ... this.
15565         * win32-low.c (child_fetch_inferior_registers):
15566         Go through the low target.
15567         (do_child_store_inferior_registers): Use regptr.
15568         (strwinerror): New function.
15569         (win32_create_inferior): Handle Windows CE.
15570         Use strwinerror instead of strerror on Windows error
15571         codes.  Add program to the error output.
15572         Don't close the main thread handle on Windows CE.
15573         (win32_attach): Use coredll.dll on Windows CE.
15574         (win32_kill): Close current process and current
15575         thread handles.
15576         (win32_detach): Use coredll.dll on Windows CE.
15577         (win32_resume): Let low target handle debug registers, and
15578         step request.
15579         (handle_exception): Add/Remove initial breakpoint.  Avoid
15580         non-existant WSTOPSIG on Windows CE.
15581         (win32_read_inferior_memory): Cast to remove warning.
15582         (win32_arch_string): Go through the low target.
15583         (initialize_low): Call set_breakpoint_data with the low
15584         target's breakpoint.
15585         * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15586         FOP_REGNUM, mappings): Move to ...
15587         * win32-i386-low.c: ... here.
15588         * win32-low.c (win32_thread_info): Move to ...
15589         * win32-low.h: ... here.
15590         * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15591         win32-arm-low.c and wincecompat.c.
15592         (all:): Add $EXEEXT.
15593         (install-only:): Likewise.
15594         (gdbserver:): Likewise.
15595         (gdbreplay:): Likewise.
15596         * config.in: Regenerate.
15597         * configure: Regenerate.
15598
15599 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
15600
15601         * win32-low.c: Rename typedef thread_info to
15602         win32_thread_info throughout.
15603
15604 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
15605
15606         * win32-i386-low.c: Rename to ...
15607         * win32-low.c: ... this.
15608         * configure.srv: Replace win32-i386-low.o with win32-low.o.
15609         * Makefile.in: Likewise.
15610
15611 2007-03-27  Pedro Alves  <pedro_alves@portugalmail.pt>
15612
15613         * remote-utils.c (monitor_output): Constify msg parameter.
15614         * server.h (monitor_output): Likewise.
15615         * win32-i386-low.c (handle_output_debug_string): New.
15616         (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15617         handle_output_debug_string.
15618         (get_child_debug_event): Likewise.
15619
15620 2007-03-27  Mat Hostetter  <mat@lcs.mit.edu>
15621
15622         * server.c (main): Correct strtoul check.
15623
15624 2007-03-27  Jon Ringle  <jon@ringle.org>
15625
15626         * linux-low.c: Check __ARCH_HAS_MMU__ also.
15627
15628 2007-03-27  Brooks Moses  <brooks.moses@codesourcery.com>
15629
15630         * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15631
15632 2007-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
15633
15634         * terminal.h: Check HAVE_SGTTY_H.
15635
15636 2007-02-27  Mat Hostetter  <mat@lcs.mit.edu>
15637
15638         * remote-utils.c (remote_open): Print out the assigned port number.
15639
15640 2007-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
15641
15642         * remote-utils.c (monitor_output): New function.
15643         * server.c (debug_threads): Define here.
15644         (monitor_show_help): New function.
15645         (handle_query): Handle qRcmd.
15646         (main): Do not handle 'd' packet.
15647         * server.h (debug_threads, remote_debug, monitor_output): Declare.
15648         * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15649         of debug_threads.
15650
15651 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
15652
15653         * Makefile.in (EXEEXT): New.
15654         (clean): Use $(EXEEXT).
15655
15656 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
15657
15658         * target.h (target_ops): Rename send_signal to request_interrupt,
15659         and remove enum target_signal parameter.
15660         * linux-low.c (linux_request_interrupt): Rename from
15661         linux_send_signal, and always send SIGINT.
15662         * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15663         and always send SIGINT.
15664         * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15665         of send_signal.
15666         (input_interrupt): Likewise.
15667
15668 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
15669
15670         * server.c (get_features_xml): Check if target implemented
15671         arch_string.
15672         * win32-i386-low.c (win32_arch_string): New.
15673         (win32_target_ops): Add win32_arch_string as arch_string member.
15674
15675 2007-02-22  Markus Deuling  <deuling@de.ibm.com>
15676
15677         * spu-low.c (spu_arch_string): New.
15678         (spu_target_ops): Add spu_arch_string.
15679
15680 2007-02-16  Daniel Jacobowitz  <dan@codesourcery.com>
15681
15682         * remote-utils.c: Remove HAVE_TERMINAL_H check.
15683         * configure.ac: Do not check for terminal.h.
15684         * configure, config.in: Regenerated.
15685
15686 2007-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
15687
15688         * Makefile.in (OBS): Add $(XML_BUILTIN).
15689         (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15690         (clean): Update.
15691         (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15692         (arm-with-iwmmxt.c): New.
15693         * config.in, configure: Regenerate.
15694         * configure.ac: Check for iWMMXt.  Handle srv_xmltarget,
15695         srv_xmlbuiltin, and srv_xmlfiles.  Define USE_XML.
15696         * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15697         (arm*-*-linux*): Add iWMMXt and regset support.
15698         * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15699         (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15700         (arm_store_wmmxregset, target_regsets): New.
15701         * server.c (get_features_xml): Take annex argument.  Check builtin
15702         XML documents.
15703         (handle_query): Handle multiple annexes.
15704
15705 2007-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
15706
15707         * remote-utils.c [USE_WIN32API] (read, write): Define.
15708         (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15709         write.
15710
15711 2007-01-09  Daniel Jacobowitz  <dan@codesourcery.com>
15712
15713         * linux-i386-low.c (the_low_target): Set arch_string.
15714         * linux-x86-64-low.c (the_low_target): Likewise.
15715         * linux-low.c (linux_arch_string): New.
15716         (linux_target_ops): Add it.
15717         * linux-low.h (struct linux_target_ops): Add arch_string.
15718         * server.c (write_qxfer_response): Use const void * for DATA.
15719         (get_features_xml): New.
15720         (handle_query): Handle qXfer:features:read.  Report it for qSupported.
15721         * target.h (struct target_ops): Add arch_string method.
15722
15723 2007-01-03  Denis Pilat  <denis.pilat@st.com>
15724             Daniel Jacobowitz  <dan@codesourcery.com>
15725
15726         * linux-low.c (linux_kill): Handle being called with no threads.
15727         * win32-i386-low.c (win32_kill): Likewise.
15728         (get_child_debug_event): Clear current_process_handle.
15729
15730 2006-12-30  Denis PILAT  <denis.pilat@st.com>
15731             Daniel Jacobowitz  <dan@codesourcery.com>
15732
15733         * remote-utils.c (remote_open): Check the type of specified
15734         serial port devices before opening them.
15735         * server.c (main): Kill the inferior if an error occurs during
15736         the first remote_open.
15737
15738 2006-12-05  Markus Deuling  <deuling@de.ibm.com>
15739
15740         * README: Update supported targets.
15741
15742 2006-11-28  Daniel Jacobowitz  <dan@codesourcery.com>
15743
15744         * Makefile.in (clean): Remove reg-mips64.c.
15745         (reg-mips64.c, reg-mips64.o): New rules.
15746         * configure.srv: Handle mips64.  Include regset support for mips.
15747         * linux-mips-low.c (union mips_register): New.
15748         (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15749         (mips_breakpoint, mips_breakpoint_at): Use int.
15750         (mips_collect_register, mips_supply_register)
15751         (mips_collect_register_32bit, mips_supply_register_32bit)
15752         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15753         (mips_store_fpregset, target_regsets): New.
15754         * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15755
15756 2006-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
15757
15758         * configure.srv: Add target "spu*-*-*".
15759         * Makefile.in (clean): Remove reg-spu.c.
15760         (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15761         * spu-low.c: New file.
15762
15763 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
15764
15765         * configure.ac: Correct td_thr_tls_get_addr test.
15766         * configure: Regenerated.
15767
15768 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
15769
15770         * linux-low.c (linux_wait_for_event): Reformat.  Use the
15771         pass_signals array.
15772         * remote-utils.c (decode_address_to_semicolon): New.
15773         * server.c (pass_signals, handle_general_set): New.
15774         (handle_query): Mention QPassSignals for qSupported.
15775         (main): Call handle_general_set.
15776         * server.h (pass_signals, decode_address_to_semicolon): New.
15777
15778 2006-11-06  Daniel Jacobowitz  <dan@codesourcery.com>
15779
15780         * server.c (handle_query): Correct error handling for read_auxv.
15781
15782 2005-10-19  Ulrich Weigand  <uweigand@de.ibm.com>
15783
15784         * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15785         and srv_linux_thread_db to yes.
15786         * linux-s390-low.c (s390_fill_gregset): New function.
15787         (target_regsets): Define data structure.
15788
15789 2006-10-17  Daniel Jacobowitz  <dan@codesourcery.com>
15790
15791         * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15792         * configure.ac: Use it.  Define HAVE_TD_THR_TLS_GET_ADDR.
15793         * config.in, configure: Regenerated.
15794         * inferiors.c (gdb_id_to_thread): New function.
15795         (gdb_id_to_thread_id): Use it.
15796         * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15797         * linux-low.h (struct process_info): Add th member.
15798         (thread_db_get_tls_address): New prototype.
15799         * remote-utils.c (decode_address): Make non-static.
15800         * server.c (handle_query): Handle qGetTLSAddr.
15801         * server.h (gdb_id_to_thread, decode_address): New prototypes.
15802         * target.h (struct target_ops): Add get_tls_address.
15803         * thread-db.c (maybe_attach_thread): Save the thread handle.
15804         (thread_db_get_tls_address): New.
15805
15806 2006-09-28  Daniel Jacobowitz  <dan@codesourcery.com>
15807
15808         * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15809         (linux_resume_one_process): Take a siginfo_t *.  Update all
15810         callers.  Queue it if necessary.  Use PTRACE_SETSIGINFO.
15811         (struct pending_signals): Add a siginfo_t.
15812         (linux_wait_for_process): Always set last_status.
15813         (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15814         (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15815         * linux-low.h (struct process_info): Add last_status.
15816
15817 2006-09-21  Daniel Jacobowitz  <dan@codesourcery.com>
15818
15819         * remote-utils.c (try_rle): New function.
15820         (putpkt_binary): Use it.
15821
15822 2006-08-19  Daniel Jacobowitz  <dan@codesourcery.com>
15823
15824         * Makefile.in (clean): Clean reg-x86-64-linux.c.
15825         (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15826         * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15827         * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15828         (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15829         point registers.
15830
15831 2006-08-08  Richard Sandiford  <richard@codesourcery.com>
15832
15833         * server.c (terminal_fd): New variable.
15834         (old_foreground_pgrp): Likewise.
15835         (restore_old_foreground_pgrp): New function.
15836         (start_inferior): Record the terminal file descriptor in terminal_fd
15837         and its original foreground group in old_foreground_pgrp.  Register
15838         restore_old_foreground_pgrp with atexit().
15839
15840 2006-07-26  Daniel Jacobowitz  <dan@codesourcery.com>
15841
15842         * server.c (handle_query): Correct qPart to qXfer.
15843
15844 2006-07-22  Daniel Jacobowitz  <dan@codesourcery.com>
15845
15846         * configure.ac: Check for more headers which are missing on
15847         Windows.  Automatically supply -lwsock32 and USE_WIN32API.
15848         * configure.srv: Add Cygwin and mingw32.
15849         * remote-utils.c: Don't include headers unconditionally which
15850         are missing on mingw32.  Include <winsock.h> for mingw32.
15851         (remote_open): Adjust for mingw32 support.  Flush
15852         standard error after writing to it.
15853         (remote_close, putpkt_binary, input_interrupt, block_async_io)
15854         (unblock_async_io, enable_async_io, disable_async_io)
15855         (readchar, getpkt): Update for Winsock support.
15856         (prepare_resume_reply): Expect a protocol signal number.
15857         * server.c: Disable <sys/wait.h> on mingw32.
15858         (start_inferior): Adjust for mingw32 support.  Flush
15859         standard error after writing to it.
15860         (attach_inferior): Likewise.  Use protocol signal
15861         numbers.
15862         (main): Skip 'D' packet on mingw32.  Use protocol signal numbers
15863         and names.
15864         * win32-i386-low.c: New file.
15865         * Makefile.in (XM_CLIBS): Set.
15866         (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
15867         (win32-i386-low.o): New dependency rule.
15868         * linux-low.c (linux_wait): Use target signal numbers.
15869         * target.h (struct target_ops): Doc fix.
15870         * server.h (target_signal_to_name): New prototype.
15871         * gdbreplay.c: Don't include headers unconditionally which
15872         are missing on mingw32.  Include <winsock.h> for mingw32.
15873         (remote_close, remote_open): Adjust for Winsock support.
15874         * configure, config.in: Regenerated.
15875
15876 2006-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
15877
15878         * server.c (decode_xfer_read, write_qxfer_response): New.
15879         (handle_query): Take a packet length argument.  Handle
15880         qXfer:auxv:read instead of qPart:auxv:read.  Mention it in
15881         the qSupported response.
15882         (main): Update call to handle_query.
15883
15884 2006-06-22  Daniel Jacobowitz  <dan@codesourcery.com>
15885
15886         * remote-utils.c (remote_escape_output, remote_unescape_input): New.
15887         (putpkt_binary): Renamed from putpkt and adjusted for binary
15888         data.
15889         (putpkt): New wrapper for putpkt_binary.
15890         (readchar): Don't mask off the high bit.
15891         (decode_X_packet): New function.
15892         * server.c (main): Call putpkt_binary if a handler sets the packet
15893         length.  Save the length of the incoming packet.  Handle 'X'.
15894         * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
15895
15896 2006-06-21  Daniel Jacobowitz  <dan@codesourcery.com>
15897
15898         * server.c (handle_query): Handle qSupported.
15899
15900 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
15901
15902         * remote-utils.c (all_symbols_looked_up): New variable.
15903         (look_up_one_symbol): Check it.
15904         * server.h (look_up_one_symbol): New declaration.
15905         * thread-db.c (thread_db_init): Set all_symbols_looked_up.
15906
15907 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
15908
15909         * Makefile.in (linux-arm-low.o): Update dependencies.
15910         * linux-arm-low.c: Include "gdb_proc_service.h".
15911         (PTRACE_GET_THREAD_AREA): Define.
15912         (ps_get_thread_area): New function.
15913
15914 2006-05-09  Nathan Sidwell  <nathan@codesourcery.com>
15915
15916         * configure.srv (m68k*-*-uclinux*): New target.
15917         * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
15918         (linux_resume_one_process): Remove extraneous cast.
15919         (linux_read_offsets): New.
15920         (linux_target_op): Add linux_read_offsets on mmuless systems.
15921         * server.c (handle_query): Add qOffsets logic.
15922         * target.h (struct target_ops): Add read_offsets.
15923
15924 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
15925
15926         * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
15927         (PTRACE_GET_THREAD_AREA): Define.
15928         (ps_get_thread_area): New function.
15929         * Makefile.in (linux-i386-low.o, linux-mips-low.o)
15930         (linux-x86-64-low.o): Update.
15931
15932 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
15933
15934         * configure.ac: Remove checks for prfpregset_t.
15935         * gdb_proc_service.h: New file.
15936         * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
15937         new "gdb_proc_service.h".
15938         * proc-service.c: Likewise.
15939         (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
15940         (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
15941         * Makefile.in (gdb_proc_service_h): Updated.
15942         * configure, config.in: Regenerated.
15943
15944 2006-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
15945
15946         * remote-utils.c (prepare_resume_reply): Move declaration
15947         of gdb_id_from_wait to the top of the block.
15948
15949 2006-02-15  Daniel Jacobowitz  <dan@codesourcery.com>
15950
15951         * linux-low.c (regsets_store_inferior_registers): Read the regset
15952         from the target before filling it.
15953
15954 2006-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
15955
15956         * server.c (attach_inferior): Return SIGTRAP for a successful
15957         attach.
15958
15959 2006-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
15960
15961         * Makefile.in (OBS): Add version.o.
15962         (STAGESTUFF): Delete.
15963         (version.o): Add dependencies.
15964         (version.c): Replace rule.
15965         (clean): Remove version.c.
15966         * server.c (gdbserver_version): New.
15967         (gdbserver_usage): Use printf.
15968         (main): Handle --version and --help.
15969         * server.h (version, host_name): Add declarations.
15970
15971 2005-12-23  Eli Zaretskii  <eliz@gnu.org>
15972
15973         * linux-arm-low.c:
15974         * linux-arm-low.c:
15975         * inferiors.c:
15976         * i387-fp.h:
15977         * i387-fp.c:
15978         * gdbreplay.c:
15979         * regcache.c:
15980         * proc-service.c:
15981         * mem-break.h:
15982         * mem-break.c:
15983         * linux-x86-64-low.c:
15984         * linux-sh-low.c:
15985         * linux-s390-low.c:
15986         * linux-ppc64-low.c:
15987         * linux-ppc-low.c:
15988         * linux-mips-low.c:
15989         * linux-m68k-low.c:
15990         * linux-m32r-low.c:
15991         * linux-low.h:
15992         * linux-low.c:
15993         * linux-ia64-low.c:
15994         * linux-i386-low.c:
15995         * linux-crisv32-low.c:
15996         * thread-db.c:
15997         * terminal.h:
15998         * target.h:
15999         * target.c:
16000         * server.h:
16001         * server.c:
16002         * remote-utils.c:
16003         * regcache.h:
16004         * utils.c:
16005         * Makefile.in:
16006         * configure.ac:
16007         * gdbserver.1: Add (C) after Copyright.  Update the FSF
16008         address.
16009
16010 2005-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
16011
16012         * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16013         (arm_breakpoint_at): Recognize both breakpoints.
16014         (the_low_target): Use the correct breakpoint instruction.
16015
16016 2005-11-02  Daniel Jacobowitz  <dan@codesourcery.com>
16017
16018         * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16019         * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16020         (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16021         (the_low_target): Update.
16022
16023 2005-10-25  Andreas Schwab  <schwab@suse.de>
16024
16025         * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16026
16027         * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16028         (ia64_num_regs): Reduce to 462.
16029
16030 2005-09-17  Daniel Jacobowitz  <dan@codesourcery.com>
16031
16032         * acinclude.m4: Correct quoting.
16033         * aclocal.m4: Regenerated.
16034
16035         Suggested by SZOKOVACS Robert <szo@ies.hu>:
16036         * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16037         (thread_db_init): Call thread_db_err_str.
16038         * configure.ac: Check for TD_VERSION.
16039         * config.in, configure: Regenerated.
16040
16041 2005-07-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16042
16043         * server.h (error, fatal, warning): Add ATTR_FORMAT.
16044
16045 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
16046
16047         * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16048         is not available.  Define HAVE_PTRACE_GETREGS if it is.
16049         * config.in, configure: Regenerated.
16050         * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16051         * linux-i386-low.c, linux-m68k-low.c: Update to use
16052         HAVE_PTRACE_GETREGS.
16053         * linux-low.c (regsets_fetch_inferior_registers)
16054         (regsets_store_inferior_registers): Only return 0 if we processed
16055         GENERAL_REGS.
16056         * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16057         * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16058
16059 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
16060
16061         * inferiors.c (struct thread_info): Add gdb_id.
16062         (add_thread): Add gdb_id argument.
16063         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16064         * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16065         calls to add_thread.
16066         * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16067         * server.c (handle_query): Use thread_to_gdb_id.
16068         (handle_v_cont, main): Use gdb_id_to_thread_id.
16069         * server.h (add_thread): Update prototype.
16070         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16071         prototypes.
16072
16073 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
16074
16075         * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16076         left-padded registers.
16077         * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16078         * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16079
16080 2005-07-01  Steve Ellcey  <sje@cup.hp.com>
16081
16082         * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16083         * configure: Regenerate.
16084         * config.in: Regenerate.
16085         * server.h (NEED_DECLARATION_STRERROR):
16086         Replace with !HAVE_DECL_STRERROR.
16087
16088 2005-06-16  Daniel Jacobowitz  <dan@codesourcery.com>
16089
16090         * linux-low.c (linux_wait, linux_send_signal): Don't test
16091         an unsigned long variable for > 0 if it could be MAX_ULONG.
16092         * server.c (myresume): Likewise.
16093         * target.c (set_desired_inferior): Likewise.
16094
16095 2005-06-13  Mark Kettenis  <kettenis@gnu.org>
16096
16097         * configure.ac: Simplify and improve check for socklen_t.
16098         * configure, config.in: Regenerate.
16099
16100 2005-06-12  Daniel Jacobowitz  <dan@codesourcery.com>
16101
16102         * acconfig.h: Remove.
16103         * configure.ac: Add a test for socklen_t.  Use three-argument
16104         AC_DEFINE throughout.
16105         * config.in: Regenerated using autoheader 2.59.
16106         * configure: Regenerated.
16107
16108         * gdbreplay.c (socklen_t): Provide a default.
16109         (remote_open): Use socklen_t.
16110         * remote-utils.c (socklen_t): Provide a default.
16111         (remote_open): Use socklen_t.
16112         (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16113         unsigned char.
16114
16115         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16116         char for buffers.
16117         * linux-low.c (linux_read_memory, linux_write_memory)
16118         (linux_read_auxv): Likewise.
16119         * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16120         (check_mem_write): Likewise.
16121         * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16122         Likewise.
16123         * regcache.c (struct inferior_rgcache_data, registers_to_string)
16124         (registers_from_string, register_data): Likewise.
16125         * server.c (handle_query, main): Likewise.
16126         * server.h (convert_ascii_to_int, convert_int_to_ascii)
16127         (decode_M_packet): Likewise.
16128         * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16129         * target.h (struct target_ops): Update read_memory, write_memory,
16130         and read_auxv.
16131         (read_inferior_memory, write_inferior_memory): Update.
16132         * linux-low.h (struct linux_target_ops): Change type of breakpoint
16133         to unsigned char *.
16134         * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16135         linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16136         linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16137         linux-s390-low.c, linux-sh-low.c: Update for changes in
16138         read_inferior_memory and the_low_target->breakpoint.
16139
16140 2005-05-28  Daniel Jacobowitz  <dan@codesourcery.com>
16141
16142         * Makefile.in (SFILES): Add linux-ppc64-low.c.
16143         (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16144         * configure.srv: Add powerpc64-*-linux*.
16145         * linux-ppc64-low.c: New file.
16146
16147 2005-05-23  Orjan Friberg  <orjanf@axis.com>
16148
16149         * linux-cris-low.c: New file with support for CRIS.
16150         * linux-crisv32-low.c: Ditto for CRISv32.
16151         * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16152         (clean): Add reg-cris.c and reg-crisv32.c.
16153         Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16154         reg-crisv32.o, and reg-crisv32.c to make rules.
16155         * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16156         recognized targets.
16157
16158 2005-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
16159
16160         * linux-low.c (fetch_register): Ensure buffer size is a multiple
16161         of sizeof (PTRACE_XFER_TYPE).
16162         (usr_store_inferior_registers): Likewise.  Zero out excess bytes.
16163
16164 2005-05-12  Orjan Friberg  <orjanf@axis.com>
16165
16166         * target.h (struct target_ops): Add insert_watchpoint,
16167         remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16168         pointers for hardware watchpoint support.
16169         * linux-low.h (struct linux_target_ops): Ditto.
16170         * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16171         (linux_stopped_by_watchpoint, linux_stopped_data_address): New.  Add
16172         to linux_target_ops.
16173         * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16174         reply packet.
16175         * server.c (main): Recognize 'Z' and 'z' packets.
16176
16177 2005-05-10  Ulrich Weigand  <uweigand@de.ibm.com>
16178
16179         * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16180         (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16181         (the_low_target): Add new members.
16182
16183 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
16184
16185         * proc-service.c (ps_lgetregs): Search all_processes instead of
16186         all_threads.
16187
16188 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
16189
16190         * server.c (start_inferior): Change return type to int.
16191         (attach_inferior): Change sigptr to int *.
16192         (handle_v_cont, handle_v_requests): Change signal to int *.
16193         (main): Change signal to int.
16194
16195 2005-04-15  Kei Sakamoto  <sakamoto.kei@renesas.com>
16196
16197         * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16198         * configure.srv: Add m32r*-*-linux*.
16199         * linux-m32r-low.c: New file.
16200
16201 2005-03-04  Daniel Jacobowitz  <dan@codesourcery.com>
16202
16203         * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16204
16205 2005-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
16206
16207         * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16208         Take unsigned long arguments for PIDs.
16209         * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16210         (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16211         (wait_for_sigstop, linux_resume_one_process)
16212         (regsets_fetch_inferior_registers, linux_send_signal)
16213         (linux_read_auxv): Likewise.  Update the types of variables holding
16214         PIDs.  Update format string specifiers.
16215         * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16216         * remote-utils.c (prepare_resume_reply): Likewise.
16217         * server.c (cont_thread, general_thread, step_thread)
16218         (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16219         unsigned long.
16220         (handle_query): Update format specifiers.
16221         (handle_v_cont, main): Use strtoul for thread IDs.
16222         * server.h (struct inferior_list_entry): Use unsigned long for ID.
16223         (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16224         (general_thread, step_thread, thread_from_wait)
16225         (old_thread_from_wait): Update.
16226         * target.h (struct thread_resume): Use unsigned long for THREAD.
16227         (struct target_ops): Use unsigned long for arguments to attach and
16228         thread_alive.
16229
16230 2005-02-24  Daniel Jacobowitz  <dan@codesourcery.com>
16231
16232         * acinclude.m4: Include bfd/bfd.m4 directly.
16233         * configure.ac: Use AC_ARG_PROGRAM.  Suggested by Aron Griffis
16234         <agriffis@toolchain.org>.
16235         * aclocal.m4, configure: Regenerated.
16236
16237 2005-01-07  Andrew Cagney  <cagney@gnu.org>
16238
16239         * configure.ac: Rename configure.in, require autoconf 2.59.
16240         * configure: Re-generate.
16241
16242 2004-12-08  Daniel Jacobowitz  <dan@debian.org>
16243
16244         * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area.  Reset
16245         LIBS when finished.
16246         * aclocal.m4: Regenerated.
16247         * configure: Regenerated.
16248
16249 2004-11-21  Andreas Schwab  <schwab@suse.de>
16250
16251         * linux-m68k-low.c (m68k_num_gregs): Define.
16252         (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16253         (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16254         (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16255         (m68k_breakpoint_at): New.  Add to the_low_target.
16256
16257         * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16258         srv_linux_thread_db to yes.
16259
16260 2004-10-20  Joel Brobecker  <brobecker@gnat.com>
16261
16262         * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16263         (ARCH_SET_FS): Likewise.
16264         (ARCH_GET_FS): Likewise.
16265         (ARCH_GET_GS): Likewise.
16266
16267 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
16268
16269         * linux-i386-low.c (ps_get_thread_area): New.
16270         * linux-x86-64-low.c (ps_get_thread_area): New.
16271         * linux-low.c: Include <sys/syscall.h>.
16272         (linux_kill_one_process): Don't kill the first thread here.
16273         (linux_kill): Kill the first thread here.
16274         (kill_lwp): New function.
16275         (send_sigstop, linux_send_signal): Use it.
16276         * proc-service.c: Clean up #ifdefs.
16277         (fpregset_info): Delete.
16278         (ps_lgetregs): Update and enable implementation.
16279         (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16280         implementations.
16281         * remote-utils.c (struct sym_cache, symbol_cache): New.
16282         (input_interrupt): Print a clearer message.
16283         (async_io_enabled): New variable.
16284         (enable_async_io, disable_async_io): Use it.  Update comments.
16285         (look_up_one_symbol): Use the symbol cache.
16286         * thread-db.c (thread_db_look_up_symbols): New function.
16287         (thread_db_init): Update comments.  Call thread_db_look_up_symbols.
16288
16289 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
16290
16291         * configure.in: Test for -rdynamic.
16292         * configure: Regenerated.
16293         * Makefile (INTERNAL_LDFLAGS): New.
16294         (gdbserver, gdbreplay): Use it.
16295
16296 2004-09-02  Andrew Cagney  <cagney@gnu.org>
16297
16298         * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16299
16300 2004-03-23  Daniel Jacobowitz  <drow@mvista.com>
16301
16302         * linux-low.c (linux_wait): Clear all_processes list also.
16303
16304 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
16305
16306         * linux-low.c: Include <errno.h>.  Remove extern declaration of
16307         errno.
16308
16309 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
16310
16311         * gdbreplay.c, server.h, utils.c: Update copyright years.
16312
16313 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
16314
16315         * server.c (main): Print child status or termination signal from
16316         variable 'signal', not 'sig'.
16317
16318 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
16319
16320         * linux-low.c (linux_read_memory): Change return type to
16321         int.  Check for and return error from ptrace().
16322         * target.c (read_inferior_memory): Change return type to int.  Pass
16323         back return status from the_target->read_memory().
16324         * target.h (struct target_ops): Adapt *read_memory() prototype.
16325         Update comment.
16326         (read_inferior_memory): Adapt prototype.
16327         * server.c (main): Return an error packet if
16328         read_inferior_memory() returns an error.
16329
16330 2004-03-04  Daniel Jacobowitz  <drow@mvista.com>
16331
16332         * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16333         Unify with other clean targets.
16334
16335 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
16336
16337         * server.c (handle_v_cont): Call set_desired_inferior.
16338
16339 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
16340
16341         * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16342
16343 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
16344
16345         * linux-low.c (linux_wait): Unblock async I/O.
16346         (linux_resume): Block and enable async I/O.
16347         * remote-utils.c (block_async_io, unblock_async_io): New functions.
16348         * server.h (block_async_io, unblock_async_io): Add prototypes.
16349
16350 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
16351
16352         * remote-utils.c (remote_open): Print a status notice after
16353         opening a TCP port.
16354         * server.c (attach_inferior): Print a status notice after
16355         attaching.
16356
16357 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
16358
16359         * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16360
16361 2004-02-26  Daniel Jacobowitz  <drow@mvista.com>
16362
16363         * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16364         error packet.
16365         * server.c, target.h: Update copyright years.
16366
16367 2004-02-25  Roland McGrath  <roland@redhat.com>
16368
16369         * target.h (struct target_ops): New member `read_auxv'.
16370         * server.c (handle_query): Handle qPart:auxv:read: query using that.
16371         * linux-low.c (linux_read_auxv): New function.
16372         (linux_target_ops): Initialize `read_auxv' member to that.
16373
16374 2004-02-17  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16375
16376         Committed by Jim Blandy  <jimb@redhat.com>.
16377
16378         * linux-s390-low.c (s390_num_regs): Update.
16379         (s390_regmap): Remove control registers.  Use __s390x__ predefine
16380         instead of GPR_SIZE to distiguish s390 and s390x targets.
16381
16382 2004-01-31  Daniel Jacobowitz  <drow@mvista.com>
16383
16384         * linux-low.c: Update copyright year.
16385         (check_removed_breakpoint): Clear pending_is_breakpoint.
16386         (linux_set_resume_request, linux_queue_one_thread)
16387         (resume_status_pending_p): New functions.
16388         (linux_continue_one_thread): Use process->resume.
16389         (linux_resume): Only resume threads if there are no pending events.
16390         * linux-low.h (struct process_info): Add resume request
16391         pointer.
16392
16393 2004-01-30  Daniel Jacobowitz  <drow@mvista.com>
16394
16395         * regcache.c (new_register_cache): Clear the allocated register
16396         buffer.  Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16397
16398 2003-10-13  Daniel Jacobowitz  <drow@mvista.com>
16399
16400         * linux-low.c (linux_resume): Take a struct thread_resume *
16401         argument.
16402         (linux_wait): Update call.
16403         (resume_ptr): New static variable.
16404         (linux_continue_one_thread): Renamed from
16405         linux_continue_one_process.  Use resume_ptr.
16406         (linux_resume): Use linux_continue_one_thread.
16407         * server.c (handle_v_cont, handle_v_requests): New functions.
16408         (myresume): New function.
16409         (main): Handle 'v' case.
16410         * target.h (struct thread_resume): New type.
16411         (struct target_ops): Change argument of "resume" to struct
16412         thread_resume *.
16413         (myresume): Delete macro.
16414
16415 2003-08-08  H.J. Lu  <hongjiu.lu@intel.com>
16416
16417         * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16418         (uninstall): Support DESTDIR.
16419
16420 Mon Jul 21 20:09:34 UTC 2003  Brendan Conoboy  <blc@redhat.com>
16421
16422         * configure.srv: Add xscale*linux copy of arm*linux entry.
16423
16424 2003-07-24  Daniel Jacobowitz  <drow@mvista.com>
16425
16426         * linux-arm-low.c (arm_reinsert_addr): New function.
16427         (the_low_target): Add arm_reinsert_addr.
16428
16429 2003-07-08  Mark Kettenis  <kettenis@gnu.org>
16430
16431         * mem-break.c: Remove whitespace at end of file.
16432
16433 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
16434
16435         * configure.in: Check whether we need to prototype strerror.
16436         * server.h: Optionally prototype strerror.
16437         * gdbreplay.c (perror_with_name): Use strerror.
16438         * linux-low.c (linux_attach_lwp): Use strerror.
16439         * utils.c (perror_with_name): Use strerror.
16440         * config.in, configure: Regenerated.
16441
16442 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
16443
16444         * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16445         SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16446
16447 2003-06-20  Daniel Jacobowitz  <drow@mvista.com>
16448
16449         * Makefile.in (SFILES): Update.
16450         * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16451         low-sun3.c: Remove files.
16452
16453 2003-06-17  Daniel Jacobowitz  <drow@mvista.com>
16454
16455         * linux-low.c: Move comment to linux_thread_alive where it belonged.
16456         (linux_detach_one_process, linux_detach): New functions.
16457         (linux_target_ops): Add linux_detach.
16458         * server.c (main): Handle 'D' packet.
16459         * target.h (struct target_ops): Add "detach" member.
16460         (detach_inferior): Define.
16461
16462 2003-06-13  Mark Kettenis  <kettenis@gnu.org>
16463
16464         From Kelley Cook  <kelleycook@wideopenwest.com>:
16465         * configure.srv: Accept i[34567]86 variants.
16466
16467 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
16468
16469         * linux-low.c (linux_wait_for_event): Correct comment typos.
16470         (linux_resume_one_process): Call check_removed_breakpoint.
16471         (linux_send_signal): New function.
16472         (linux_target_ops): Add linux_send_signal.
16473         * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16474         of kill.
16475         * target.h (struct target_ops): Add send_signal.
16476
16477 2003-05-29  Jim Blandy  <jimb@redhat.com>
16478
16479         * linux-low.c (usr_store_inferior_registers): Transfer buf in
16480         PTRACE_XFER_TYPE-sized chunks, not int-sized chunks.  Otherwise,
16481         if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16482         away part of the register's value.
16483
16484 2003-03-26  Daniel Jacobowitz  <drow@mvista.com>
16485
16486         * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16487         (linux_wait_for_event, linux_init_signals): Likewise.
16488
16489 2003-03-17  Daniel Jacobowitz  <drow@mvista.com>
16490
16491         * configure.in: Check for stdlib.h.
16492         * configure: Regenerated.
16493         * config.in: Regenerated.
16494
16495 2003-01-04  Andreas Schwab  <schwab@suse.de>
16496
16497         * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16498
16499 2003-01-02  Andrew Cagney  <ac131313@redhat.com>
16500
16501         * Makefile.in: Remove obsolete code.
16502
16503 2002-11-20  Daniel Jacobowitz  <drow@mvista.com>
16504
16505         * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16506         defined(PT_FPR0_HI).
16507
16508 2002-11-17  Stuart Hughes  <seh@zee2.com>
16509
16510         * linux-arm-low.c (arm_num_regs): Increase.
16511         (arm_regmap): Include status register.
16512
16513 2002-11-17  Daniel Jacobowitz  <drow@mvista.com>
16514
16515         * linux-low.c (register_addr): Remove incorrect -1 check.
16516
16517 2002-08-29  Daniel Jacobowitz  <drow@mvista.com>
16518
16519         * linux-low.c (linux_create_inferior): Call setpgid.  Return
16520         the new PID.
16521         (unstopped_p, linux_signal_pid): Remove.
16522         (linux_target_ops): Remove linux_signal_pid.
16523         * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16524         global instead of target method.
16525         * target.h (struct target_ops): Remove signal_pid.  Update comment
16526         for create_inferior.
16527         * server.c (signal_pid): New variable.
16528         (create_inferior): Set signal_pid.  Block SIGTTOU and SIGTTIN in
16529         gdbserver.  Set the child to be the foreground process group.
16530         (attach_inferior): Set signal_pid.
16531
16532 2002-08-23  Daniel Jacobowitz  <drow@mvista.com>
16533
16534         * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16535
16536 2002-08-20  Jim Blandy  <jimb@redhat.com>
16537
16538         * Makefile.in (LDFLAGS): Allow the configure script to establish a
16539         default for this.
16540
16541 2002-08-01  Andrew Cagney  <cagney@redhat.com>
16542
16543         * Makefile.in: Make chill references obsolete.
16544
16545 2002-07-24  Kevin Buettner  <kevinb@redhat.com>
16546
16547         * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16548         * configure: Regenerate.
16549         * config.in: Regenerate.
16550
16551 2002-07-09  David O'Brien  <obrien@FreeBSD.org>
16552
16553         * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16554         (perror_with_name, remote_close, remote_open, expect, play): Static.
16555
16556 2002-07-04  Michal Ludvig  <mludvig@suse.cz>
16557
16558         * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16559         byte offsets instead of an array of indexes.
16560         (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16561
16562 2002-06-13  Daniel Jacobowitz  <drow@mvista.com>
16563
16564         * regcache.c: Add comment.
16565
16566 2002-06-11  Daniel Jacobowitz  <drow@mvista.com>
16567
16568         * thread-db.c: New file.
16569         * proc-service.c: New file.
16570         * acinclude.m4: New file.
16571         * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16572         proc-service.o, and thread-db.o.
16573         (linux-low.o): Add USE_THREAD_DB.
16574         * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16575         HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16576         * aclocal.m4: Regenerated.
16577         * config.in: Regenerated.
16578         * configure: Regenerated.
16579         * configure.in: Check for proc_service.h, sys/procfs.h,
16580         thread_db.h, and linux/elf.h headrs.
16581         Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16582         PRFPREGSET_T_BROKEN.  Introduce srv_thread_depfiles and USE_THREAD_DB.
16583         Check for -lthread_db and thread support.
16584         * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16585         PowerPC, and SuperH.
16586         * i387-fp.c: Constify arguments.
16587         * i387-fp.h: Likewise.
16588         * inferiors.c: (struct thread_info): Renamed from
16589         `struct inferior_info'.  Remove PID member.  Use generic inferior
16590         list header.  All uses updated.
16591         (inferiors, signal_pid): Removed.
16592         (all_threads): New variable.
16593         (get_thread): Define.
16594         (add_inferior_to_list): New function.
16595         (for_each_inferior): New function.
16596         (change_inferior_id): New function.
16597         (add_inferior): Removed.
16598         (remove_inferior): New function.
16599         (add_thread): New function.
16600         (free_one_thread): New function.
16601         (remove_thread): New function.
16602         (clear_inferiors): Use for_each_inferior and free_one_thread.
16603         (find_inferior): New function.
16604         (find_inferior_id): New function.
16605         (inferior_target_data): Update argument type.
16606         (set_inferior_target_data): Likewise.
16607         (inferior_regcache_data): Likewise.
16608         (set_inferior_regcache_data): Likewise.
16609         * linux-low.c (linux_bp_reinsert): Remove.
16610         (all_processes, stopping_threads, using_thrads)
16611         (struct pending_signals, debug_threads, pid_of): New.
16612         (inferior_pid): Replace with macro.
16613         (struct inferior_linux_data): Remove.
16614         (get_stop_pc, add_process): New functions.
16615         (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16616         Use add_process and add_thread.
16617         (linux_attach_lwp): New function, based on old linux_attach.  Use
16618         add_process and add_thread.  Set stop_expected for new threads.
16619         (linux_attach): New function.
16620         (linux_kill_one_process): New function.
16621         (linux_kill): Kill all LWPs.
16622         (linux_thread_alive): Use find_inferior_id.
16623         (check_removed_breakpoints, status_pending_p): New functions.
16624         (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16625         Update.  Use WNOHANG.  Wait for cloned processes also.  Update process
16626         struct for the found process.
16627         (linux_wait_for_event): New function.
16628         (linux_wait): Use it.  Support LWPs.
16629         (send_sigstop, wait_for_sigstop, stop_all_processes)
16630         (linux_resume_one_process, linux_continue_one_process): New functions.
16631         (linux_resume): Support LWPs.
16632         (REGISTER_RAW_SIZE): Remove.
16633         (fetch_register): Use register_size instead.  Call supply_register.
16634         (usr_store_inferior_registers): Likewise.  Call collect_register.
16635         Fix recursive case.
16636         (regsets_fetch_inferior_registers): Improve error message.
16637         (regsets_store_inferior_registers): Add debugging.
16638         (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16639         (unstopped_p, linux_signal_pid): New functions.
16640         (linux_target_ops): Add linux_signal_pid.
16641         (linux_init_signals): New function.
16642         (initialize_low): Call it.  Initialize using_threads.
16643         * regcache.c (inferior_regcache_data): Add valid
16644         flag.
16645         (get_regcache): Fetch registers lazily.  Add fetch argument
16646         and update all callers.
16647         (regcache_invalidate_one, regcache_invalidate): New
16648         functions.
16649         (new_register_cache): Renamed from create_register_cache.
16650         Return the new regcache.
16651         (free_register_cache): Change argument to a void *.
16652         (registers_to_string, registers_from_string): Call get_regcache
16653         with fetch flag set.
16654         (register_data): Make static.  Pass fetch flag to get_regcache.
16655         (supply_register): Call get_regcache with fetch flag clear.
16656         (collect_register): Call get_regcache with fetch flag set.
16657         (collect_register_as_string): New function.
16658         * regcache.h: Update.
16659         * remote-utils.c (putpkt): Flush after debug output and use
16660         stderr.
16661         Handle input interrupts while waiting for an ACK.
16662         (input_interrupt): Use signal_pid method.
16663         (getpkt): Flush after debug output and use stderr.
16664         (outreg): Use collect_register_as_string.
16665         (new_thread_notify, dead_thread_notify): New functions.
16666         (prepare_resume_reply): Check using_threads.  Set thread_from_wait
16667         and general_thread.
16668         (look_up_one_symbol): Flush after debug output.
16669         * server.c (step_thread, server_waiting): New variables.
16670         (start_inferior): Don't use signal_pid.  Update call to mywait.
16671         (attach_inferior): Update call to mywait.
16672         (handle_query): Handle qfThreadInfo and qsThreadInfo.
16673         (main): Don't fetch/store registers explicitly.  Use
16674         set_desired_inferior.  Support proposed ``Hs'' packet.  Update
16675         calls to mywait.
16676         * server.h: Update.
16677         (struct inferior_list, struct_inferior_list_entry): New.
16678         * target.c (set_desired_inferior): New.
16679         (write_inferior_memory): Constify.
16680         (mywait): New function.
16681         * target.h: Update.
16682         (struct target_ops): New signal_pid method.
16683         (mywait): Removed macro, added prototype.
16684
16685         * linux-low.h (regset_func): Removed.
16686         (regset_fill_func, regset_store_func): New.
16687         (enum regset_type): New.
16688         (struct regset_info): Add type field.  Use new operation types.
16689         (struct linux_target_ops): stop_pc renamed to get_pc.
16690         Add decr_pc_after_break and breakpoint_at.
16691         (get_process, get_thread_proess, get_process_thread)
16692         (strut process_info, all_processes, linux_attach_lwp)
16693         (thread_db_init): New.
16694
16695         * linux-arm-low.c (arm_get_pc, arm_set_pc,
16696         arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16697         (the_low_target): Add new members.
16698         * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16699         (i386_store_fpxregset): Constify.
16700         (target_regsets): Add new kind identifier.
16701         (i386_get_pc): Renamed from i386_stop_pc.  Simplify.
16702         (i386_set_pc): Add debugging.
16703         (i386_breakpoint_at): New function.
16704         (the_low_target): Add new members.
16705         * linux-mips-low.c (mips_get_pc, mips_set_pc)
16706         (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16707         (mips_breakpoint_at): New.
16708         (the_low_target): Add new members.
16709         * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16710         (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16711         (the_low_target): Add new members.
16712         * linux-sh-low.c (sh_get_pc, sh_set_pc)
16713         (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16714         (the_low_target): Add new members.
16715         * linux-x86-64-low.c (target_regsets): Add new kind
16716         identifier.
16717
16718 2002-05-15  Daniel Jacobowitz  <drow@mvista.com>
16719
16720         From Martin Pool <mbp@samba.org>:
16721         * server.c (gdbserver_usage): New function.
16722         (main): Call it.
16723
16724 2002-05-14  Daniel Jacobowitz  <drow@mvista.com>
16725
16726         * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16727         stop_at -> stop_pc.
16728
16729 2002-05-04  Andrew Cagney  <ac131313@redhat.com>
16730
16731         * Makefile.in: Remove obsolete code.
16732
16733 2002-04-24  Michal Ludvig  <mludvig@suse.cz>
16734
16735         * linux-low.c (regsets_fetch_inferior_registers),
16736         (regsets_store_inferior_registers): Removed cast to int from
16737         ptrace() calls.
16738         * regcache.h: Added declaration of struct inferior_info.
16739
16740 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
16741
16742         * inferiors.c (struct inferior_info): Add regcache_data.
16743         (add_inferior): Call create_register_cache.
16744         (clear_inferiors): Call free_register_cache.
16745         (inferior_regcache_data, set_inferior_regcache_data): New functions.
16746         * regcache.c (struct inferior_regcache_data): New.
16747         (registers): Remove.
16748         (get_regcache): New function.
16749         (create_register_cache, free_register_cache): New functions.
16750         (set_register_cache): Don't initialize the register cache here.
16751         (registers_to_string, registers_from_string, register_data): Call
16752         get_regcache.
16753         * regcache.h: Add prototypes.
16754         * server.h: Likewise.
16755
16756 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
16757
16758         * mem-break.c: New file.
16759         * mem-break.h: New file.
16760         * Makefile.in: Add mem-break.o rule; update server.h
16761         dependencies.
16762         * inferiors.c (struct inferior_info): Add target_data
16763         member.
16764         (clear_inferiors): Free target_data member if set.
16765         (inferior_target_data, set_inferior_target_data): New functions.
16766         * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16767         (i386_stop_pc, i386_set_pc): New.  Add to the_low_target.
16768         * linux-low.c (linux_bp_reinsert): New variable.
16769         (struct inferior_linux_data): New.
16770         (linux_create_inferior): Use set_inferior_target_data.
16771         (linux_attach): Likewise.  Call add_inferior.
16772         (linux_wait_for_one_inferior): New function.
16773         (linux_wait): Call it.
16774         (linux_write_memory): Add const.
16775         (initialize_low): Call set_breakpoint_data.
16776         * linux-low.h (struct linux_target_ops): Add breakpoint
16777         handling members.
16778         * server.c (attach_inferior): Remove extra add_inferior
16779         call.
16780         * server.h: Include mem-break.h.  Update inferior.c
16781         prototypes.
16782         * target.c (read_inferior_memory)
16783         (write_inferior_memory): New functions.
16784         * target.h (read_inferior_memory)
16785         (write_inferior_memory): Change macros to prototypes.
16786         (struct target_ops): Update comments.  Add const to write_memory
16787         definition.
16788
16789 2002-04-11  Daniel Jacobowitz  <drow@mvista.com>
16790
16791         * linux-low.c (usr_store_inferior_registers): Support
16792         registers which are allowed to fail to store.
16793         * linux-low.h (linux_target_ops): Likewise.
16794         * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16795         (ppc_cannot_store_register): FPSCR may not be storable.
16796
16797 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
16798
16799         * server.h: Include <string.h> if HAVE_STRING_H.
16800         * ChangeLog: Correct paths in last ChangeLog entry.
16801
16802 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
16803
16804         * linux-low.h: Remove obsolete prototypes.
16805         (struct linux_target_ops): New.
16806         (extern the_low_target): New.
16807         * linux-low.c (num_regs, regmap): Remove declarations.
16808         (register_addr): Use the_low_target explicitly.
16809         (fetch_register): Likewise.
16810         (usr_fetch_inferior_registers): Likewise.
16811         (usr_store_inferior_registers): Likewise.
16812         * linux-arm-low.c (num_regs): Remove.
16813         (arm_num_regs): Define.
16814         (arm_regmap): Renamed from regmap, made static.
16815         (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16816         made static.
16817         (arm_cannot_store_register): Renamed from cannot_store_register,
16818         made static.
16819         (the_low_target): New.
16820         * linux-i386-low.c (num_regs): Remove.
16821         (i386_num_regs): Define.
16822         (i386_regmap): Renamed from regmap, made static.
16823         (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16824         made static.
16825         (i386_cannot_store_register): Renamed from cannot_store_register,
16826         made static.
16827         (the_low_target): New.
16828         * linux-ia64-low.c (num_regs): Remove.
16829         (ia64_num_regs): Define.
16830         (ia64_regmap): Renamed from regmap, made static.
16831         (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16832         made static.
16833         (ia64_cannot_store_register): Renamed from cannot_store_register,
16834         made static.
16835         (the_low_target): New.
16836         * linux-m68k-low.c (num_regs): Remove.
16837         (m68k_num_regs): Define.
16838         (m68k_regmap): Renamed from regmap, made static.
16839         (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
16840         made static.
16841         (m68k_cannot_store_register): Renamed from cannot_store_register,
16842         made static.
16843         (the_low_target): New.
16844         * linux-mips-low.c (num_regs): Remove.
16845         (mips_num_regs): Define.
16846         (mips_regmap): Renamed from regmap, made static.
16847         (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
16848         made static.
16849         (mips_cannot_store_register): Renamed from cannot_store_register,
16850         made static.
16851         (the_low_target): New.
16852         * linux-ppc-low.c (num_regs): Remove.
16853         (ppc_num_regs): Define.
16854         (ppc_regmap): Renamed from regmap, made static.
16855         (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
16856         made static.
16857         (ppc_cannot_store_register): Renamed from cannot_store_register,
16858         made static.
16859         (the_low_target): New.
16860         * linux-s390-low.c (num_regs): Remove.
16861         (s390_num_regs): Define.
16862         (s390_regmap): Renamed from regmap, made static.
16863         (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
16864         made static.
16865         (s390_cannot_store_register): Renamed from cannot_store_register,
16866         made static.
16867         (the_low_target): New.
16868         * linux-sh-low.c (num_regs): Remove.
16869         (sh_num_regs): Define.
16870         (sh_regmap): Renamed from regmap, made static.
16871         (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
16872         made static.
16873         (sh_cannot_store_register): Renamed from cannot_store_register,
16874         made static.
16875         (the_low_target): New.
16876         * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
16877         (the_low_target): New.
16878
16879 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
16880
16881         * Makefile.in: Add stamp-h target.
16882         * configure.in: Create stamp-h.
16883         * configure: Regenerated.
16884
16885 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
16886
16887         * inferiors.c: New file.
16888         * target.c: New file.
16889         * target.h: New file.
16890         * Makefile.in:  Add target.o and inferiors.o.  Update
16891         dependencies.
16892         * linux-low.c (inferior_pid): New static variable,
16893         moved from server.c.
16894         (linux_create_inferior): Renamed from create_inferior.
16895         Call add_inferior.  Return 0 on success instead of a PID.
16896         (linux_attach): Renamed from myattach.
16897         (linux_kill): Renamed from kill_inferior.  Call clear_inferiors ().
16898         (linux_thread_alive): Renamed from mythread_alive.
16899         (linux_wait): Renamed from mywait.  Call clear_inferiors () if the
16900         child dies.
16901         (linux_resume): Renamed from myresume.  Add missing ``return 0''.
16902         (regsets_store_inferior_registers): Correct error message.
16903         Add missing ``return 0''.
16904         (linux_fetch_registers): Renamed from fetch_inferior_registers.
16905         (linux_store_registers): Renamed from store_inferior_registers.
16906         (linux_read_memory): Renamed from read_inferior_memory.
16907         (linux_write_memory): Renamed from write_inferior_memory.
16908         (linux_target_ops): New structure.
16909         (initialize_low): Call set_target_ops ().
16910         * remote-utils.c (unhexify): New function.
16911         (hexify): New function.
16912         (input_interrupt): Send signals to ``signal_pid''.
16913         * server.c (inferior_pid): Remove.
16914         (start_inferior): Update create_inferior call.
16915         (attach_inferior): Call add_inferior.
16916         (handle_query): New function.
16917         (main): Call handle_query for `q' packets.
16918         * server.h: Include "target.h".  Remove obsolete prototypes.
16919         Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
16920
16921 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
16922
16923         * Makefile.in: Add WARN_CFLAGS.  Update configury
16924         dependencies.
16925         * configure.in: Check for <string.h>
16926         * configure: Regenerate.
16927         * config.in: Regenerate.
16928         * gdbreplay.c: Include needed system headers.
16929         (remote_open): Remove strchr prototype.
16930         * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
16931         * regcache.c (supply_register): Change buf argument to const void *.
16932         (supply_register_by_name): Likewise.
16933         (collect_register): Change buf argument to void *.
16934         (collect_register_by_name): Likewise.
16935         * regcache.h: Add missing prototypes.
16936         * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
16937         * server.c (handle_query): New function.
16938         (attached): New static variable, moved out of main.
16939         (main): Quiet longjmp clobber warnings.
16940         * server.h: Add ATTR_NORETURN and ATTR_FORMAT.  Update prototypes.
16941         * utils.c (error): Remove NORETURN.
16942         (fatal): Likewise.