[PATCH 2/57][Arm][GAS] Add support for MVE instructions: vpst, vadd, vsub and vabd
[binutils-gdb.git] / gdb / gdbserver / ChangeLog
blob2e98158aa6f4ab7e731792269292a7dc77a8479a
1 2019-05-06  Kevin Buettner  <kevinb@redhat.com>
3         * linux-x86-low.c (x86_fill_gregset): Don't compile 64-bit
4         sign extension code on 32-bit builds.
6 2019-05-03  Eli Zaretskii  <eliz@gnu.org>
8         * remote-utils.c:
9         * gdbreplay.c [USE_WIN32API]: Remove the _WIN32_WINNT override.
11 2019-04-19  Tom Tromey  <tom@tromey.com>
13         * server.c (struct vstop_notif): Derive from notif_event.
14         <base>: Remove.
15         (queue_stop_reply): Update.
16         (remove_all_on_match_ptid): Change type.  Rewrite.
17         (discard_queued_stop_replies): Rewrite.
18         (in_queued_stop_replies_ptid): Change type.
19         (in_queued_stop_replies): Rewrite.
20         (notif_stop): Update.
21         (queue_stop_reply_callback): Update.
22         (captured_main): Don't call initialize_notif.
23         (push_stop_notification): Update.
24         * notif.c (notif_write_event, handle_notif_ack)
25         (notif_event_enque, notif_push): Update.
26         (notif_event_xfree, initialize_notif): Remove.
27         * notif.h (struct notif_event): Include <list>, not
28         "common/queue.h".
29         (struct notif_server) <queue>: Now a std::list.
30         (notif_event_p): Remove typedef.
31         (initialize_notif): Don't declare.
32         (struct notif_event): Add virtual destructor.
34 2019-04-17  Alan Hayward  <alan.hayward@arm.com>
36         * ax.c (ax_vdebug): Call debug_printf.
37         * debug.c (debug_write): New function.
38         * debug.h (debug_write): New declaration.
39         * linux-low.c (sigchld_handler): Call debug_write.
41 2019-04-17  Alan Hayward  <alan.hayward@arm.com>
43         * debug.c (debug_set_output): New function.
44         (debug_vprintf): Send output to debug_file.
45         (debug_flush): Likewise.
46         * debug.h (debug_set_output): New declaration.
47         * server.c (handle_monitor_command): Add debug-file option.
48         (captured_main): Likewise.
50 2019-04-17  Alan Hayward  <alan.hayward@arm.com>
52         * debug.c (remote_debug): Add definition.
53         * debug.h (remote_debug): Add declaration.
54         * hostio.c (remote_debug): Remove declaration.
55         * remote-utils.c (struct ui_file): Likewise.
56         (remote_debug): Likewise.
57         * remote-utils.h (remote_debug): Likewise,
58         * server.c (remote_debug): Remove definition.
60 2019-04-10  Kevin Buettner  <kevinb@redhat.com>
62         * linux-x86-low.c (x86_fill_gregset): Sign extend EAX value
63         when using a 64-bit gdbserver.
65 2019-04-09  Tom Tromey  <tromey@adacore.com>
67         * linux-low.c (select_event_lwp): Use find_thread_in_random.
69 2019-04-08  Tom Tromey  <tom@tromey.com>
71         * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
72         throw.
73         (linux_resume_one_lwp): Likewise.
75 2019-04-08  Tom Tromey  <tom@tromey.com>
77         * gdbreplay.c: Update.
78         * linux-low.c: Update.
79         * server.c: Update.
81 2019-04-08  Tom Tromey  <tom@tromey.com>
83         * server.c: Use C++ exception handling.
84         * linux-low.c: Use C++ exception handling.
85         * gdbreplay.c: Use C++ exception handling.
87 2019-04-08  Tom Tromey  <tom@tromey.com>
89         * server.c (handle_btrace_general_set, handle_qxfer_btrace)
90         (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
91         (captured_main, main): Update.
92         * gdbreplay.c (main): Update.
94 2019-04-05  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
96         * linux-low.c (linux_get_auxv): Remove static.  Return auxv entry
97         value in argument pointer, return 1 if the entry is found and 0
98         otherwise.  Move comment.
99         (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
100         * linux-low.h (linux_get_auxv): Declare.
101         * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
103 2019-04-05  Tom Tromey  <tromey@adacore.com>
105         * server.c (gdbserver_usage): Use upper-case for metasyntactic
106         variables.
108 2019-03-28  Alan Hayward  <alan.hayward@arm.com>
110         * linux-low.c (AT_HWCAP2): Add define if not already included.
112 2019-03-26  Alan Hayward  <alan.hayward@arm.com>
114         * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
115         (aarch64_arch_setup): Call linux_get_hwcap.
116         * linux-arm-low.c (arm_get_hwcap): Remove function.
117         (arm_read_description): Call linux_get_hwcap.
118         * linux-low.c (linux_get_auxv): New function.
119         (linux_get_hwcap): Likewise.
120         (linux_get_hwcap2): Likewise.
121         * linux-low.h (linux_get_hwcap): New declaration.
122         (linux_get_hwcap2): Likewise.
123         * linux-ppc-low.c (ppc_get_auxv): Remove function.
124         (ppc_arch_setup): Call linux_get_hwcap.
125         * linux-s390-low.c (s390_get_hwcap): Remove function.
126         (s390_arch_setup): Call linux_get_hwcap.
128 2019-03-22  Alan Hayward  <alan.hayward@arm.com>
129             Jiong Wang  <jiong.wang@arm.com>
131         * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
132         * linux-low.c (regsets_store_inferior_registers): Allow optional reads
133         to fail.
134         * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
136 2019-03-22  Alan Hayward  <alan.hayward@arm.com>
137             Jiong Wang  <jiong.wang@arm.com>
139         * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
140         (aarch64_get_hwcap): New function.
141         (aarch64_arch_setup): Read APIA hwcap.
143 2019-03-22  Alan Hayward  <alan.hayward@arm.com>
144             Jiong Wang  <jiong.wang@arm.com>
146         * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
147         (initialize_low_tracepoint): Likewise.
148         * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
149         * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
150         * linux-aarch64-tdesc.c (struct target_desc): Likewise.
151         (aarch64_linux_read_description): Likewise.
152         * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
154 2019-03-12  John Baldwin  <jhb@FreeBSD.org>
156         * linux-x86-tdesc.c (i386_linux_read_description): Update call to
157         i386_create_target_description for 'segments' parameter.
158         * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
159         * nto-x86-low.c (nto_x86_arch_setup): Likewise.
160         * win32-i386-low.c (i386_arch_setup): Likewise.
162 2019-03-12  Tom Tromey  <tromey@adacore.com>
164         * linux-low.c (iterate_over_lwps): Update.
166 2019-03-06  Tom Tromey  <tom@tromey.com>
168         * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
169         (captured_main): Use SCOPE_EXIT.
171 2019-03-04  Sergio Durigan Junior  <sergiodj@redhat.com>
173         * configure.srv: Use '$enable_unittest' instead of '$development'
174         when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
175         case.
177 2019-02-27  Tom Tromey  <tromey@adacore.com>
179         * gdbreplay.c (logchar): Handle \r\n.
181 2019-02-07  Alan Hayward  <alan.hayward@arm.com>
183         * linux-low.c (linux_attach): Add process before lwp.
184         * server.c (attach_inferior): Check if already attached.
186 2019-02-07  Tom Tromey  <tom@tromey.com>
188         * x86-tdesc.h: Rename include guard.
189         * x86-low.h: Add include guard.
190         * wincecompat.h: Rename include guard.
191         * win32-low.h: Add include guard.
192         * utils.h: Rename include guard.
193         * tracepoint.h: Rename include guard.
194         * tdesc.h: Rename include guard.
195         * target.h: Rename include guard.
196         * server.h: Rename include guard.
197         * remote-utils.h: Rename include guard.
198         * regcache.h: Rename include guard.
199         * nto-low.h: Rename include guard.
200         * notif.h: Add include guard.
201         * mem-break.h: Rename include guard.
202         * lynx-low.h: Add include guard.
203         * linux-x86-tdesc.h: Add include guard.
204         * linux-s390-tdesc.h: Add include guard.
205         * linux-ppc-tdesc-init.h: Add include guard.
206         * linux-low.h: Add include guard.
207         * linux-aarch64-tdesc.h: Add include guard.
208         * linux-aarch32-low.h: Add include guard.
209         * inferiors.h: Rename include guard.
210         * i387-fp.h: Rename include guard.
211         * hostio.h: Rename include guard.
212         * gdbthread.h: Rename include guard.
213         * gdb_proc_service.h: Rename include guard.
214         * event-loop.h: Rename include guard.
215         * dll.h: Rename include guard.
216         * debug.h: Rename include guard.
217         * ax.h: Rename include guard.
219 2018-01-30  Szabolcs Nagy  <szabolcs.nagy@arm.com>
221         PR gdb/23985
222         * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
223         (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
225 2019-01-25  Tom Tromey  <tom@tromey.com>
227         * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
229 2019-01-25  Tom Tromey  <tom@tromey.com>
231         * win32-low.c: Fix common/ includes.
232         * win32-i386-low.c: Fix common/ includes.
233         * tracepoint.c: Fix common/ includes.
234         * thread-db.c: Fix common/ includes.
235         * target.h: Fix common/ includes.
236         * symbol.c: Fix common/ includes.
237         * spu-low.c: Fix common/ includes.
238         * server.h: Fix common/ includes.
239         * server.c: Fix common/ includes.
240         * remote-utils.c: Fix common/ includes.
241         * regcache.h: Fix common/ includes.
242         * regcache.c: Fix common/ includes.
243         * nto-x86-low.c: Fix common/ includes.
244         * notif.h: Fix common/ includes.
245         * mem-break.h: Fix common/ includes.
246         * lynx-low.c: Fix common/ includes.
247         * lynx-i386-low.c: Fix common/ includes.
248         * linux-x86-tdesc-selftest.c: Fix common/ includes.
249         * linux-x86-low.c: Fix common/ includes.
250         * linux-low.c: Fix common/ includes.
251         * inferiors.h: Fix common/ includes.
252         * i387-fp.c: Fix common/ includes.
253         * hostio.c: Fix common/ includes.
254         * hostio-errno.c: Fix common/ includes.
255         * gdbthread.h: Fix common/ includes.
256         * gdbreplay.c: Fix common/ includes.
257         * fork-child.c: Fix common/ includes.
258         * event-loop.c: Fix common/ includes.
259         * ax.c: 
260         (enum gdb_agent_op): Fix common/ includes.
262 2019-01-21  Tom Tromey  <tom@tromey.com>
264         * tracepoint.c: Fix includes.
265         * remote-utils.c: Fix includes.
266         * linux-x86-low.c: Fix includes.
268 2019-01-01  Joel Brobecker  <brobecker@adacore.com>
270         * gdbreplay.c (gdbreplay_version): Update copyright year in
271         version message.
272         * server.c (gdbserver_version): Likewise.
274 2018-12-05  Alan Hayward  <alan.hayward@arm.com>
276         * linux-low.c (add_lwp): Switch ordering.
278 2018-11-29  Tom Tromey  <tom@tromey.com>
280         * win32-low.c (win32_join): Take pid, not process.
281         * target.h (struct target_ops) <join>: Change argument type.
282         (join_inferior): Change argument name.
283         * spu-low.c (spu_join): Take pid, not process.
284         * server.c (handle_detach): Preserve pid before destroying
285         process.
286         * lynx-low.c (lynx_join): Take pid, not process.
287         * linux-low.c (linux_join): Take pid, not process.
289 2018-11-23  Alan Hayward  <alan.hayward@arm.com>
291         * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
292         (aarch64_cannot_fetch_register): Likewise.
293         (struct linux_target_ops): Update references.
295 2018-10-31  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
297         * linux-ppc-low.c: Include nat/linux-ptrace.h.
299 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
301         * configure.srv (ipa_ppc_linux_regobj): Add
302         powerpc-isa207-htm-vsx32l-ipa.o and
303         powerpc-isa207-htm-vsx64l-ipa.o.
304         (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
305         powerpc-isa207-htm-vsx64l.o to srv_regobj.  Add
306         rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
307         rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
308         rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
309         rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
310         rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
311         and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
312         * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
313         <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
314         (init_registers_powerpc_isa207_htm_vsx32l)
315         (init_registers_powerpc_isa207_htm_vsx64l): Declare.
316         * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
317         (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
318         (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
319         (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
320         (ppc_store_tm_ctarregset): New functions.
321         (ppc_regsets): Add entries for HTM regsets.
322         (ppc_arch_setup): Set htm in features struct when needed.  Set
323         sizes for the HTM regsets.
324         (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
325         (initialize_low_arch): Call
326         init_registers_powerpc_isa207_htm_vsx32l and
327         init_registers_powerpc_isa207_htm_vsx64l.
328         * linux-ppc-ipa.c (get_ipa_tdesc): Handle
329         PPC_TDESC_ISA207_HTM_VSX.
330         (initialize_low_tracepoint): Call
331         init_registers_powerpc_isa207_htm_vsx32l and
332         init_registers_powerpc_isa207_htm_vsx64l.
334 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
336         * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
337         rs6000/power-linux-pmu.xml to srv_xmlfiles.
338         * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
339         (ppc_store_pmuregset): New functions.
340         (ppc_regsets): Add entries for ebb and pmu regsets.
341         (ppc_arch_setup): Set isa207 in features struct if the ebb and
342         pmu regsets are available.  Set sizes for these regsets.
344 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
346         * configure.srv (ipa_ppc_linux_regobj): Add
347         powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
348         (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
349         powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
350         rs6000/powerpc-isa207-vsx32l.xml, and
351         rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
352         * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
353         <PPC_TDESC_ISA207_VSX>: New enum value.
354         (init_registers_powerpc_isa207_vsx32l): Declare.
355         (init_registers_powerpc_isa207_vsx64l): Declare.
356         * linux-ppc-low.c (ppc_fill_tarregset): New function.
357         (ppc_store_tarregset): New function.
358         (ppc_regsets): Add entry for the TAR regset.
359         (ppc_arch_setup): Set isa207 in features struct when needed.  Set
360         size for the TAR regsets.
361         (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
362         (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
363         and init_registers_powerpc_isa207_vsx64l.
364         * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
365         (initialize_low_tracepoint): Call
366         init_registers_powerpc_isa207_vsx32l and
367         init_registers_powerpc_isa207_vsx64l.
369 2018-10-26  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
370             Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
372         * configure.srv (ipa_ppc_linux_regobj): Add
373         powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
374         powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
375         (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
376         powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
377         rs6000/power-dscr.xml, rs6000/power-ppr.xml,
378         rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
379         rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
380         * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
381         <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
382         (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
383         (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
384         * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
385         (ppc_hwcap): Add comment.
386         (ppc_hwcap2): New global.
387         (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
388         (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
389         (ppc_regsets): Add entries for the DSCR and PPR regsets.
390         (ppc_arch_setup): Get AT_HWCAP2.  Set ppr_dscr in features struct
391         when needed.  Set sizes for the the DSCR and PPR regsets.
392         (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
393         (initialize_low_arch): Call
394         init_registers_powerpc_isa205_ppr_dscr_vsx32l and
395         init_registers_powerpc_isa205_ppr_dscr_vsx64l.
396         * linux-ppc-ipa.c (get_ipa_tdesc): Handle
397         PPC_TDESC_ISA205_PPR_DSCR_VSX.
398         (initialize_low_tracepoint): Call
399         init_registers_powerpc_isa205_ppr_dscr_vsx32l and
400         init_registers_powerpc_isa205_ppr_dscr_vsx64l.
402 2018-10-26  Pedro Franco de Carvalho  <pedromfc@linux.ibm.com>
404         * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
406 2018-10-10  Sergio Durigan Junior  <sergiodj@redhat.com>
407             Simon Marchi <simark@simark.ca>
409         * acinclude.m4: Include "../selftest.m4".
410         * configure: Regenerate.
411         * configure.ac: Use "GDB_AC_SELFTEST".
412         * configure.srv: Use "$enable_unittests" instead of
413         "$development" when checking whether unit tests have been
414         enabled.
415         * server.c (captured_main): Update message informing that
416         selftests have been disabled.
418 2018-10-04  Tom Tromey  <tom@tromey.com>
420         * configure: Rebuild.
422 2018-10-04  Tom Tromey  <tom@tromey.com>
424         * server.c (handle_status): Rename inner "thread".
425         (process_serial_event): Declare "res" in 'm' case.
426         * linux-low.c (last_thread_of_process_p, find_lwp_pid)
427         (iterate_over_lwps): Rename inner "thread".
428         (linux_qxfer_libraries_svr4): Rename inner "len".
429         * gdbthread.h (find_thread_in_random): Rename inner "thread".
431 2018-10-01  Gary Benson <gbenson@redhat.com>
433         * gdb_proc_service.h: Moved common code to
434         common/gdb_proc_service.h.
436 2018-10-01  Gary Benson <gbenson@redhat.com>
438         * gdb_proc_service.h: Synchronize comments and whitespace with
439         GDB's version of this file.
441 2018-09-25  Tom Tromey  <tom@tromey.com>
443         * configure: Rebuild.
444         * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
446 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
448         * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
449         (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
450         ($(IPA_LIB)): Sort IPA_OBJS.
452 2018-09-16  Simon Marchi  <simon.marchi@polymtl.ca>
454         * Makefile.in: Remove references to $(ADD_DEPS).
456 2018-09-16  Tom Tromey  <tom@tromey.com>
458         * remote-utils.c (remote_open): Use GNU style for metasyntactic
459         variables.
460         * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
461         variables.
463 2018-09-05  Tom Tromey  <tom@tromey.com>
465         * configure: Rebuild.
467 2018-08-28  Simon Marchi  <simon.marchi@polymtl.ca>
469         PR build/23399
470         * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
472 2018-08-27  Tom Tromey  <tom@tromey.com>
474         PR build/23087:
475         * configure: Rebuild.
477 2018-08-27  Tom Tromey  <tom@tromey.com>
479         * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
480         (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
481         (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
482         (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
483         (s390x_emit_stack_adjust): Add casts to unsigned char.
485 2018-08-22  Simon Marchi  <simon.marchi@ericsson.com>
487         PR gdb/23374
488         PR gdb/23375
489         * server.h (struct client_state) <disable_randomization>:
490         Initialize to 1.
492 2018-07-22  Simon Marchi  <simon.marchi@polymtl.ca>
494         * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
495         variable.
496         (mips_supply_ptrace_register): Likewise.
498 2018-07-22  Tom Tromey  <tom@tromey.com>
500         * configure: Rebuild.
502 2018-07-22  Tom Tromey  <tom@tromey.com>
504         * win32-low.c (win32_create_inferior): Remove unused variables.
505         * gdbreplay.c (remote_open): Remove unused variable.
506         * remote-utils.c (remote_prepare): Remove unused variable.
507         * x86-tdesc.h (X86_TDESC_H): Define.
508         (amd64_expedite_regs): Define conditionally.
509         (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
510         * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
511         * remote-utils.c (readchar): Remove unused variable.
513 2018-07-13  Pedro Alves  <palves@redhat.com>
515         * linux-low.c (linux_kill): Change parameter to process_info
516         pointer instead of pid.  Adjust.
517         * lynx-low.c (lynx_kill): Likewise.
518         * nto-low.c (nto_kill): Likewise.
519         * spu-low.c (spu_kill): Likewise.
520         * win32-low.c (win32_kill): Likewise.
521         * server.c (handle_v_kill, kill_inferior_callback)
522         (detach_or_kill_for_exit): Adjust.
523         * target.c (kill_inferior): Change parameter to process_info
524         pointer instead of pid.  Adjust.
525         * target.h (struct target_ops) <kill>: Change parameter to
526         process_info pointer instead of pid.  Adjust all implementations
527         and callers.
528         (kill_inferior): Likewise.
530 2018-07-13  Pedro Alves  <palves@redhat.com>
532         * linux-low.c (linux_detach, linux_join): Change parameter to
533         process_info pointer instead of pid.  Adjust.
534         * lynx-low.c (lynx_detach, lynx_join): Likewise.
535         * nto-low.c (nto_detach): Likewise.
536         * spu-low.c (spu_detach, spu_join): Likewise.
537         * win32-low.c (win32_detach, win32_join): Likewise.
538         * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
539         * target.h (struct target_ops) <detach, join>: Change parameter to
540         process_info pointer instead of pid.  Adjust all implementations
541         and callers.
542         (detach_inferior, join_inferior): Rename 'pid' parameter to
543         'proc'.
545 2018-07-11  Sergio Durigan Junior  <sergiodj@redhat.com>
546             Jan Kratochvil  <jan.kratochvil@redhat.com>
547             Paul Fertser  <fercerpav@gmail.com>
548             Tsutomu Seki  <sekiriki@gmail.com>
550         * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
551         (OBS): Add 'common/netstuff.o'.
552         (GDBREPLAY_OBS): Likewise.
553         * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
554         (remote_open): Implement support for IPv6
555         connections.
556         * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
557         and 'wspiapi.h'.
558         (handle_accept_event): Accept connections from IPv6 sources.
559         (remote_prepare): Handle IPv6-style hostnames; implement
560         support for IPv6 connections.
561         (remote_open): Implement support for printing connections from
562         IPv6 sources.
564 2018-07-11  Pedro Alves  <palves@redhat.com>
566         PR gdb/23377
567         * mem-break.c (any_persistent_commands): Add process_info
568         parameter and use it instead of relying on the current process.
569         Change return type to bool.
570         * mem-break.h (any_persistent_commands): Add process_info
571         parameter and change return type to bool.
572         * server.c (handle_detach): Remove require_running_or_return call.
573         Look up the process_info for the process we're about to detach.
574         If not found, return back error to GDB.  Adjust
575         any_persistent_commands call to pass down a process pointer.
577 2018-07-11  Pedro Alves  <palves@redhat.com>
579         * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
580         (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
581         instead of collect_register_by_name.
582         * regcache.c (regcache_raw_get_unsigned_by_name): New.
583         * regcache.h (regcache_raw_get_unsigned_by_name): New.
585 2018-07-04  Vyacheslav Barinov  <v.barinov@samsung.com>
586             Pedro Alves  <palves@redhat.com>
588         * linux-low.c (initialize_low): Call linux_proc_init_warnings.
590 2018-07-03  Tom Tromey  <tom@tromey.com>
592         * linux-low.c: Update.
593         * lynx-low.c: Update.
594         * mem-break.c: Update.
595         * nto-low.c: Update.
596         * remote-utils.c: Update.
597         * server.c: Update.
598         * spu-low.c: Update.
599         * target.c: Update.
600         * win32-low.c: Update.
602 2018-07-03  Tom Tromey  <tom@tromey.com>
604         * server.c: Update.
606 2018-07-03  Tom Tromey  <tom@tromey.com>
608         * linux-low.c: Update.
610 2018-07-03  Tom Tromey  <tom@tromey.com>
612         * target.c: Update.
614 2018-07-03  Tom Tromey  <tom@tromey.com>
616         * linux-low.c: Update.
617         * linux-mips-low.c: Update.
618         * lynx-low.c: Update.
619         * nto-low.c: Update.
620         * remote-utils.c: Update.
621         * server.c: Update.
622         * spu-low.c: Update.
623         * target.c: Update.
624         * thread-db.c: Update.
626 2018-07-03  Tom Tromey  <tom@tromey.com>
628         * linux-low.c: Update.
629         * linux-mips-low.c: Update.
630         * lynx-low.c: Update.
631         * mem-break.c: Update.
632         * nto-low.c: Update.
633         * remote-utils.c: Update.
634         * server.c: Update.
635         * spu-low.c: Update.
636         * target.c: Update.
637         * tracepoint.c: Update.
639 2018-07-03  Tom Tromey  <tom@tromey.com>
641         * linux-low.c: Update.
642         * linux-ppc-low.c: Update.
643         * linux-x86-low.c: Update.
644         * proc-service.c: Update.
645         * server.c: Update.
646         * spu-low.c: Update.
647         * thread-db.c: Update.
648         * win32-low.c: Update.
650 2018-07-03  Tom Tromey  <tom@tromey.com>
652         * linux-low.c: Update.
653         * lynx-low.c: Update.
654         * nto-low.c: Update.
655         * remote-utils.c: Update.
656         * spu-low.c: Update.
657         * thread-db.c: Update.
658         * win32-low.c: Update.
660 2018-06-29  Joel Brobecker  <brobecker@adacore.com>
662         * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
663         parameter in call to 'amd64_create_target_description'.
665 2018-06-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
667         * x86-tdesc.h: Remove executable permission flag.
669 2018-06-19  Simon Marchi  <simon.marchi@ericsson.com>
671         * configure.ac: Remove AC_PREREQ, add missing quoting.
672         * configure: Re-generate.
673         * config.in: Re-generate.
674         * aclocal.m4: Re-generate.
676 2018-06-18  Simon Marchi  <simon.marchi@ericsson.com>
678         * tracepoint.h (current_traceframe): Remove declaration.
680 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
682         * linux-aarch64-low.c (is_sve_tdesc): New function.
683         (aarch64_sve_regs_copy_to_regcache): Likewise.
684         (aarch64_sve_regs_copy_from_regcache): Likewise.
685         (aarch64_regs_info): Add SVE checks.
686         (initialize_low_arch): Initialize SVE.
688 2018-06-18  Alan Hayward  <alan.hayward@arm.com>
690         * Makefile.in: Add aarch64-sve-linux-ptrace.c.
692 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
694         * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
695         (initialize_low_tracepoint): Likewise
696         * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
697         * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
698         param.
699         * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
700         checks.
701         * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
703 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
705         * server.h (PBUFSIZ): Increase size
707 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
709         * regcache.c (regcache::raw_compare): New function.
710         * regcache.h (regcache::raw_compare): New declaration.
712 2018-06-11  Alan Hayward  <alan.hayward@arm.com>
714         * regcache.c (new_register_cache): Use new.
715         (free_register_cache): Use delete.
716         (register_data): Use const.
717         (supply_register): Move body inside regcache.
718         (regcache::raw_supply): New override function.
719         (collect_register): Move body inside regcache.
720         (regcache::raw_collect): New override function.
721         (regcache::get_register_status): New override function.
722         * regcache.h (struct regcache): Inherit from reg_buffer_common.
724 2018-06-09  Tom Tromey  <tom@tromey.com>
726         * event-loop.c (gdb_event, gdb_event_p): Remove typedefs.  Don't
727         declare queue.
728         (event_queue): Use std::queue.
729         (gdb_event_xfree): Remove.
730         (initialize_event_loop, process_event, wait_for_event): Update.
732 2018-06-08  Stan Cox  <scox@redhat.com>
734         * win32-low.c (win32_create_inferior):  last_ptid and last_status
735         moved to client_state.
737 2018-06-08  Pedro Alves  <palves@redhat.com>
739         * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
740         common/common-exceptions.o, common/common-utils.o,
741         common/errors.o, common/print-utils.o and utils.o.
742         * gdbreplay.c: Include "common-defs.h" instead of the two
743         'config.h's here.  Don't include stdio.h, errno.h, stdlib.h,
744         string.h or alloca.h.
745         (perror_with_name): Delete.
746         (remote_open): Use xstrdup instead of strdup.
747         (main): Rename to ...
748         (captured_main): ... this.
749         (main): New.
751 2018-06-08  Tom Tromey  <tom@tromey.com>
753         * linux-low.c (linux_low_read_btrace): Update.
755 2018-06-04  Stan Cox  <scox@redhat.com>
757         * server.h (struct client_state): New.
758         * server.c (cont_thread, general_thread, multi_process)
759         (report_fork_events, report_vfork_events, report_exec_events)
760         (report_thread_events, swbreak_feature, hwbreak_feature)
761         (vCont_supported, disable_randomization, pass_signals)
762         (program_signals, program_signals_p, last_status, last_ptid, own_buf):
763         Moved to client_state.
764         * remote-utils.c (remote_debug, noack_mode)
765         (transport_is_reliable): Moved to client_state.
766         * tracepoint.c (current_traceframe): Moved to client_state.
768         Update all callers.
769         * server.c, remote-utils.c, tracepoint.c, fork-child.c,
770         linux-low.c, remote-utils.h, target.c: Use client_state.
772 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
774         * configure.srv: Add new c/h file.
776 2018-05-31  Alan Hayward  <alan.hayward@arm.com>
778         * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
779         null VQ.
781 2018-05-25  Maciej W. Rozycki  <macro@mips.com>
783         * gdb.arch/mips-fpregset-core.exp: New test.
784         * gdb.arch/mips-fpregset-core.c: New test source.
786 2018-05-23  Erik Kurzinger  <ekurzinger@nvidia.com>
788         PR server/23198
789         * hostio.c (require_int): Do not report overflow for integers
790         between 0xfffffff and 0x7fffffff.
792 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
794         * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
795         (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
796         (mips_collect_ptrace_register, mips_supply_ptrace_register): New
797         functions.
798         (the_low_target): Wire them.
800 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
802         * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
803         Set vscr_offset to 0 in little-endian mode and 12 in big-endian
804         mode. Call collect_register_by_name with vscr using
805         vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
806         (ppc_store_vrregset): Add and set vscr_offset variable as in
807         ppc_fill_vrregset. Call supply_register_by_name with vscr using
808         vscr_offset.
810 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
812         * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
813         (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
814         PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
816 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
818         * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
819         (ppc_store_vsxregset): Likewise.
820         (ppc_fill_vrregset): Likewise.
821         (ppc_store_vrregset): Likewise.
822         (ppc_fill_evrregset): Likewise.
823         (ppc_store_evrregset): Likewise.
824         (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
825         (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
826         needed.
828 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
830         * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
831         wordsize of the inferior. Call ppc_linux_target_wordsize.
833 2018-05-22  Pedro Franco de Carvalho  <pedromfc@linux.vnet.ibm.com>
835         * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
836         * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
837         * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
838         * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
839         (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
840         (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
841         (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
842         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
843         (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
844         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
845         (tdesc_powerpc_e500l): Remove.
846         * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
847         linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
848         * linux-ppc-low.c: Include arch/ppc-linux-common.h,
849         arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
850         linux-ppc-tdesc.h.
851         (ppc_arch_setup): Remove target description matching code. Fill a
852         ppc_linux_features struct and call ppc_linux_match_description
853         with it.
855 2018-05-22  Maciej W. Rozycki  <macro@mips.com>
857         * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
858         width of the requested register exceeds the width of the
859         `ptrace' data type.
860         (mips_cannot_store_register): Likewise.
862 2018-05-21  Maciej W. Rozycki  <macro@mips.com>
864         * linux-mips-low.c (mips_fetch_register): New function.  Update
865         preceding comment.
866         (mips_store_gregset): Supply 0 rather than $restart for $zero.
867         (the_low_target): Wire `mips_fetch_register'.
869 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
871         * lynx-i386-low.c (LYNXOS_178): New macro.
872         [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
873         the layout on LynxOS-178.
874         (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
875         handle floating point registers that are not supported by
876         LynxOS-178.
878 2018-05-10  Tom Tromey  <tom@tromey.com>
880         * configure: Rebuild.
882 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
884         PR server/23158:
885         * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
886         * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
887         Use it to set the expedite_regs field in the given tdesc.
888         * x86-tdesc.h: New file.
889         * linux-aarch64-tdesc.c (aarch64_linux_read_description):
890         Adjust following the addition of the new expedite_regs parameter
891         to init_target_desc.
892         * linux-tic6x-low.c (tic6x_read_description): Likewise.
893         * linux-x86-tdesc.c: #include "x86-tdesc.h".
894         (i386_linux_read_description, amd64_linux_read_description):
895         Adjust following the addition of the new expedite_regs parameter
896         to init_target_desc.
897         * lynx-i386-low.c: #include "x86-tdesc.h".
898         (lynx_i386_arch_setup): Adjust following the addition of the new
899         expedite_regs parameter to init_target_desc.
900         * nto-x86-low.c: #include "x86-tdesc.h".
901         (nto_x86_arch_setup): Adjust following the addition of the new
902         expedite_regs parameter to init_target_desc.
903         * win32-i386-low.c: #include "x86-tdesc.h".
904         (i386_arch_setup): Adjust following the addition of the new
905         expedite_regs parameter to init_target_desc.
907 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
909         PR server/23158:
910         * win32-low.c (win32_create_inferior): Add call to my_wait
911         setting last_status global.
913 2018-05-10  Joel Brobecker  <brobecker@adacore.com>
915         PR server/23158:
916         * win32-low.c (create_process): Only call gdb_tilde_expand if
917         inferior_cwd is not NULL.
919 2018-05-08  Andrew Burgess  <andrew.burgess@embecosm.com>
921         * i387-fp.c (i387_cache_to_xsave): Only write x87 control
922         registers to the cache if their values have changed.
923         (i387_xsave_to_cache): Provide default values for x87 control
924         registers when these features are available, but disabled.
925         * regcache.c (supply_register_by_name_zeroed): New function.
926         * regcache.h (supply_register_by_name_zeroed): Declare new
927         function.
929 2018-05-07  Tom Tromey  <tom@tromey.com>
931         * configure: Rebuild.
933 2018-05-04  Tom Tromey  <tom@tromey.com>
935         * configure: Rebuild.
937 2018-05-04  Jan Kratochvil  <jan.kratochvil@redhat.com>
938             Pedro Alves <palves@redhat.com>
940         * linux-aarch64-low.c (aarch64_stopped_data_address):
941         Likewise.
943 2018-04-27  Tom Tromey  <tom@tromey.com>
945         * configure: Rebuild.
947 2018-04-23  Tom Tromey  <tom@tromey.com>
949         * configure: Rebuild.
951 2018-04-19  Simon Marchi  <simon.marchi@ericsson.com>
953         * Makefile.in (depcomp): Add "..".
954         (all_deps_files): New and use it.
956 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
958         * configure.srv (aarch64*-*-linux*): Don't include xml.
959         (i[34567]86-*-cygwin*): Likewise.
960         (i[34567]86-*-linux*): Likewise.
961         (i[34567]86-*-lynxos*): Likewise.
962         (i[34567]86-*-mingw32ce*): Likewise.
963         (i[34567]86-*-mingw*): Likewise.
964         (i[34567]86-*-nto*): Likewise.
965         (tic6x-*-uclinux): Likewise.
966         (x86_64-*-linux*): Likewise.
967         (x86_64-*-mingw*): Likewise.
968         (x86_64-*-cygwin*): Likewise.
970 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
972         * tdesc.c: Remove xml parameter.
974 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
976         * server.c (get_features_xml): Remove cast.
977         * tdesc.c (void target_desc::accept): Fill in function.
978         (tdesc_get_features_xml): Remove old xml creation.
979         (print_xml_feature::visit_pre): Add xml vistor.
980         * tdesc.h (struct target_desc): Make xmltarget mutable.
981         (tdesc_get_features_xml): Remove declaration.
983 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
985         * tdesc.c (tdesc_architecture_name): Add new function.
986         (tdesc_osabi_name): Likewise.
987         (tdesc_get_features_xml): Use new functions.
989 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
991         * tdesc.c (tdesc_create_flags): Remove.
992         (tdesc_add_flag): Likewise.
993         (tdesc_named_type): Likewise.
994         (tdesc_create_union): Likewise.
995         (tdesc_create_struct): Likewise.
996         (tdesc_create_vector): Likewise.
997         (tdesc_add_bitfield): Likewise.
998         (tdesc_add_field): Likewise.
999         (tdesc_set_struct_size): Likewise.
1001 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
1003         * tdesc.c (~target_desc): Remove implictly deleted items.
1004         (init_target_desc): Iterate all features.
1005         (tdesc_get_features_xml): Use vector.
1006         (tdesc_create_feature): Create feature.
1007         * tdesc.h (tdesc_feature) Remove
1008         (target_desc): Add features.
1010 2018-04-18  Alan Hayward  <alan.hayward@arm.com>
1012         * Makefile.in: Add common/tdesc.c
1013         * tdesc.c (init_target_desc): init all reg_defs from register
1014         vector.
1015         (tdesc_create_reg): Create tdesc_reg.
1016         * tdesc.h (tdesc_feature): Add register vector.
1018 2018-03-30  Simon Marchi  <simon.marchi@polymtl.ca>
1020         * tdesc.h (struct target_desc) <features>: Change type to
1021         std::vector<std::string>.
1022         * tdesc.c (target_desc::~target_desc): Adjust to std::vector
1023         changes.
1024         (tdesc_get_features_xml): Likewise.
1025         (tdesc_create_feature): Likewise.
1027 2018-03-26  Alan Hayward  <alan.hayward@arm.com>
1029         * regcache.c (find_register_by_number): Return a ref.
1030         (find_regno): Use references.
1031         (register_size): Likewise.
1032         (register_data): Likewise.
1033         * tdesc.c (target_desc::~target_desc): Remove free calls.
1034         (target_desc::operator==): Use std::vector compare.
1035         (init_target_desc): Use reference.
1036         (tdesc_create_reg): Use reg constructors.
1037         * tdesc.h (struct target_desc): Replace pointer with object.
1039 2018-03-23  Alan Hayward  <alan.hayward@arm.com>
1041         * regcache.c (find_register_by_number): Make static.
1042         (find_regno): Use find_register_by_number
1043         * regcache.h (struct reg): Remove declaration.
1045 2018-03-23  Alan Hayward  <alan.hayward@arm.com>
1047         * tdesc.c (target_desc::~target_desc): Move to here.
1048         (target_desc::operator==): Likewise.
1049         * tdesc.h (target_desc::~target_desc): Move from here.
1050         (target_desc::operator==): Likewise.
1052 2018-03-22  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1054         * linux-s390-low.c (s390_get_wordsize): Correct brace style.
1056 2018-03-21  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1058         * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
1059         S390_TDESC_GS.
1060         * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
1061         (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
1062         and init_registers_s390_gs_linux64.
1064 2018-03-21  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1066         * linux-s390-low.c (s390_fill_gs): Remove function.
1067         (s390_fill_gsbc): Remove function.
1068         (s390_regsets): Set fill functions for the guarded storage regsets
1069         to NULL.
1071 2018-03-21  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1073         * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1074         the word size.  Add comment.
1075         (s390_get_wordsize): New function.
1076         (s390_arch_setup): No longer select a temporary tdesc to fetch the
1077         pswm with it.  Instead, use s390_get_wordsize to determine the
1078         word size first and derive the correct tdesc from that directly.
1080 2018-03-16  Simon Marchi  <simon.marchi@polymtl.ca>
1082         * Makefile.in: Include silent-rules.mk.
1083         (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1084         (COMPILE): Add ECHO_CXX.
1085         (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1086         (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1087         ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1088         (version-generated.c): Add ECHO_GEN.
1089         (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1090         (IPAGENT_COMPILE): Add ECHO_CXX.
1091         (%-generated.c): Add ECHO_REGDAT.
1093 2018-03-14  Tom Tromey  <tom@tromey.com>
1095         PR cli/14977:
1096         * ax.c (ax_printf): Special case for NULL.
1098 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
1100         * linux-low.c (linux_qxfer_libraries_svr4): Use
1101         xml_escape_text_append.
1103 2018-03-08  Simon Marchi  <simon.marchi@polymtl.ca>
1105         * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1107 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
1109         * server.c (handle_general_set): Remove unnecessary xstrdup.
1111 2018-03-02  Simon Marchi  <simon.marchi@polymtl.ca>
1113         * server.c (parse_debug_format_options): Adjust to
1114         delim_string_to_char_ptr_vec changes.
1115         * thread-db.c (thread_db_load_search): Adjust to
1116         dirnames_to_char_ptr_vec changes.
1118 2018-03-01  Markus Metzger  <markus.t.metzger@intel.com>
1120         * target.h (target_enable_btrace, target_disable_btrace)
1121         (target_read_btrace, target_read_btrace_conf): Turn macro into
1122         inline function.  Throw error if target method is not defined.
1123         * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1124         check for btrace target method.  Be prepared to handle exceptions
1125         from btrace target methods.
1127 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
1129         * server.c (captured_main): Change order of error message printed
1130         when the current working directory cannot be found.
1132 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
1134         * server.c: Include "filenames.h" and "pathstuff.h".
1135         (program_name): Delete variable.
1136         (program_path): New anonymous class.
1137         (get_exec_wrapper): Use "program_path" instead of
1138         "program_name".
1139         (handle_v_run): Likewise.
1140         (captured_main): Likewise.
1141         (process_serial_event): Likewise.
1143 2018-02-28  Sergio Durigan Junior  <sergiodj@redhat.com>
1145         * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1146         (OBJS): Add "pathstuff.o".
1147         * server.c (current_directory): New global variable.
1148         (captured_main): Initialize "current_directory".
1150 2018-02-26  Alan Hayward  <alan.hayward@arm.com>
1152         * tdesc.c: Use common/tdesc.h.
1153         * tdesc.h: Likewise.
1155 2018-02-20  Alan Hayward  <alan.hayward@arm.com>
1156             Simon Marchi  <simon.marchi@ericsson.com>
1158         * Makefile.in: Switch order of make rules.
1160 2018-02-19  Alan Hayward  <alan.hayward@arm.com>
1162         * Makefile.in: Add common directory in build.
1163         * configure.ac: Add common reference.
1164         * configure: Regenerate.
1166 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
1168         * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1169         * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1170         * spu-low.c (spu_target_ops): Likewise.
1171         * win32-low.c (win32_target_ops): Likewise.
1172         * server.c (supported_btrace_packets): Report packets unconditionally.
1173         * target.h (target_ops) <supports_btrace>: Remove.
1174         (target_supports_btrace): Remove.
1176 2018-02-09  Markus Metzger  <markus.t.metzger@intel.com>
1178         * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1179         (handle_btrace_disable): Change return type to void.  Use exceptions
1180         to report errors.
1181         (handle_btrace_general_set): Catch exception and copy message to
1182         return message.
1184 2018-02-08  Tom Tromey  <tom@tromey.com>
1186         * linux-low.c (install_software_single_step_breakpoints): Use
1187         make_scoped_restore.
1188         * inferiors.c (make_cleanup_restore_current_thread): Remove.
1189         (do_restore_current_thread_cleanup): Remove.
1190         * gdbthread.h (make_cleanup_restore_current_thread): Don't
1191         declare.
1193 2018-02-08  Tom Tromey  <tom@tromey.com>
1195         * mem-break.c (set_raw_breakpoint_at): Use
1196         gdb::unique_xmalloc_ptr.
1198 2018-01-30  Pedro Alves  <palves@redhat.com>
1200         PR gdb/13211
1201         * target.c (target_terminal::terminal_state): Rename to ...
1202         (target_terminal::m_terminal_state): ... this.
1204 2018-01-19  James Clarke  <jrtc27@jrtc27.com>
1206         * linux-low.c (handle_extended_wait): Surround call to
1207         thread_db_notice_clone with #ifdef USE_THREAD_DB.
1209 2018-01-17  Simon Marchi  <simon.marchi@ericsson.com>
1211         * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1212         linux_ptrace_attach_fail_reason_string now returning an
1213         std::string.
1214         (linux_attach): Likewise.
1215         * thread-db.c (attach_thread): Likewise.
1217 2018-01-17  Eldar Abusalimov  <eldar.abusalimov@jetbrains.com>
1219         PR gdb/21559
1220         * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1221         checking for fs_base/gs_base fields in struct user_regs_struct.
1222         * configure: Regenerate.
1224 2018-01-16  Yao Qi  <yao.qi@linaro.org>
1226         PR gdb/18749
1227         * linux-low.c (fetch_register): Call supply_register instead of
1228         error.
1230 2018-01-08  Yao Qi  <yao.qi@linaro.org>
1231             Simon Marchi  <simon.marchi@ericsson.com>
1233         * Makefile.in (OBS): Remove selftest.o.
1234         * configure.ac: Set srv_selftest_objs if $development is true.
1235         (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1236         * configure: Re-generated.
1237         * server.c (captured_main): Wrap variable selftest_filter with
1238         GDB_SELF_TEST.
1240 2018-01-07  Simon Marchi  <simon.marchi@polymtl.ca>
1242         * server.c (parse_debug_format_options): Return std::string.
1243         (handle_monitor_command, captured_main): Adjust.
1245 2018-01-05  Pedro Alves  <palves@redhat.com>
1247         PR gdb/18653
1248         * server.c (captured_main): Pass quiet=false to
1249         save_original_signals_state.
1251 2018-01-01  Joel Brobecker  <brobecker@adacore.com>
1253         * gdbreplay.c (gdbreplay_version): Update copyright year in
1254         version message.
1255         * server.c (gdbserver_version): Likewise.
1257 2017-12-08  Tom Tromey  <tom@tromey.com>
1259         * ax.c (ax_printf): Update.
1261 2017-12-07  Yao Qi  <yao.qi@linaro.org>
1263         * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1264         aarch64_linux_read_description.
1265         * linux-amd64-ipa.c (idx2mask): New array.
1266         (get_ipa_tdesc): Move idx2mask out.
1267         (initialize_low_tracepoint): Initialize target descriptions.
1268         * linux-i386-ipa.c (idx2mask): New array.
1269         (get_ipa_tdesc): Move idx2mask out.
1270         (initialize_low_tracepoint): Initialize target descriptions.
1272 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
1274         * tdesc.c (struct tdesc_type): Change return type.
1275         (tdesc_add_flag): Change parameter type.
1276         (tdesc_add_bitfield): Likewise.
1277         (tdesc_add_field): Likewise.
1278         (tdesc_set_struct_size): Likewise.
1280 2017-12-05  Simon Marchi  <simon.marchi@ericsson.com>
1282         * regcache.c (registers_to_string): Remove unused variable.
1284 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1286         * inferiors.c (for_each_inferior_with_data): Remove.
1287         * inferiors.h (for_each_inferior_with_data): Remove.
1288         * server.c (handle_qxfer_threads_worker): Change parameter type.
1289         (handle_qxfer_threads_proper): Use for_each_thread.
1291 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1293         * inferiors.c (for_each_inferior): Remove.
1294         (clear_inferiors): Use for_each_thread.
1295         * inferiors.h (for_each_inferior): Remove.
1296         * linux-low.c (linux_wait_for_event_filtered): Use
1297         for_each_thread.
1298         (linux_stabilize_threads): Likewise.
1299         * regcache.c (regcache_release): Likewise.
1300         * server.c (gdb_wants_all_threads_stopped): Likewise.
1301         (clear_pending_status_callback): Remove.
1302         (handle_status): Use for_each_thread.
1303         (captured_main): Likewise.
1304         * win32-low.c (child_init_thread_list): Likewise.
1305         (win32_clear_inferiors): Likewise.
1306         (fake_breakpoint_event): Likewise.
1308 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1310         * inferiors.h (find_inferior): Remove.
1311         * inferiors.c (find_inferior): Remove.
1313 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1315         * linux-low.c (resume_status_pending_p): Update comment.
1316         (need_step_over_p): Update comment.
1318 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1320         * linux-low.c (proceed_one_lwp): Return void, change parameter
1321         type.
1322         (unsuspend_and_proceed_one_lwp): Likewise.
1323         (proceed_all_lwps): Use for_each_thread.
1324         (unstop_all_lwps): Likewise.
1326 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1328         * linux-low.c (linux_resume_one_thread): Return void, take
1329         parameter directly.
1330         (linux_resume): Use for_each_thread.
1332 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1334         * linux-low.c (send_sigstop_callback): Return void, change
1335         parameter type.  Rename to...
1336         (send_sigstop): ... this.
1337         (suspend_and_send_sigstop_callback): Return void, change parameter
1338         type.  Rename to...
1339         (suspend_and_send_sigstop): ... this.
1340         (stop_all_lwps): Use for_each_thread.
1342 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1344         * linux-low.c (lwp_running): Return bool, remove unused
1345         argument.
1346         (linux_stabilize_threads): Use find_thread.
1348 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1350         * linux-low.c (select_singlestep_lwp_callback): Remove.
1351         (count_events_callback): Remove.
1352         (select_event_lwp_callback): Remove.
1353         (select_event_lwp): Use find_thread/for_each_thread.
1355 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1357         * linux-low.c (not_stopped_callback): Return bool, take filter
1358         argument directly.
1359         (linux_wait_for_event_filtered): Use find_thread.
1360         (linux_wait_1): Likewise.
1362 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1364         * linux-low.c (same_lwp): Remove.
1365         (find_lwp_pid): Use find_thread.
1367 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1369         * linux-low.c (delete_lwp_callback): Remove.
1370         (linux_mourn): Use for_each_thread.
1372 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1374         * linux-low.c (linux_detach_lwp_callback): Return void, remove
1375         args parameter, don't check for pid.
1376         (linux_detach): Use for_each_thread.
1378 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1380         * linux-low.c (struct counter): Remove.
1381         (second_thread_of_pid_p): Remove.
1382         (last_thread_of_process_p): Use find_thread.
1384 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1386         * inferiors.c (find_inferior_in_random): Remove.
1387         * inferiors.h (find_inferior_in_random): Remove.
1388         * linux-low.c (status_pending_p_callback): Return bool, accept
1389         parameter ptid directly.
1390         (linux_wait_for_event_filtered): Use find_thread_in_random.
1391         (linux_wait_1): Likewise.
1393 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1395         * inferiors.c (find_inferior_id): Remove.
1396         (find_thread_ptid): Move implemention from find_inferior_id to
1397         here.
1398         * inferiors.h (find_inferior_id): Remove.
1399         * server.c (handle_status): Use find_thread_ptid.
1400         (process_serial_event): Likewise.
1401         * thread-db.c (find_one_thread): Likewise.
1402         (thread_db_thread_handle): Likewise.
1403         * win32-low.c (thread_rec): Likewise.
1404         (child_delete_thread): Likewise.
1405         (win32_thread_alive): Likewise.
1406         (get_child_debug_event): Likewise.
1408 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1410         * linux-mips-low.c (update_watch_registers_callback): Return
1411         void, remove pid_p parameter, don't check for pid.
1412         (mips_insert_point, mips_remove_point): Use for_each_thread.
1414 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1416         * lynx.low (lynx_delete_thread_callback): Remove.
1417         (lynx_mourn): Use for_each_thread.
1419 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1421         * regcache.c (regcache_invalidate_one): Remove.
1422         (regcache_invalidate_pid): use for_each_thread.
1424 2017-11-26  Tom Tromey  <tom@tromey.com>
1426         * linux-low.c (linux_create_inferior): Update.
1428 2017-11-24  Ulrich Weigand  <uweigand@de.ibm.com>
1430         * spu-low.c (spu_create_inferior): Fix typo in argument name.
1432 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
1434         * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1435         * linux-aarch64-low.c (initialize_low_arch): Call init func.
1436         * linux-aarch64-tdesc-selftest.c: New file.
1437         * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1439 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
1441         * configure.srv: Add new file.
1442         * linux-aarch64-low.c (initialize_low_arch): Call init func.
1443         * linux-aarch64-tdesc-selftest.c: New file.
1444         * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1446 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
1448         * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1449         * linux-aarch64-low.c (initialize_low_arch): Remove init.
1450         * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1452 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
1454         * configure.srv: Add new files.
1455         * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1456         aarch64_linux_read_description.
1457         * linux-aarch64-low.c (aarch64_linux_read_description):
1458         Merge with aarch64_arch_setup.
1459         (aarch64_arch_setup): Call aarch64_linux_read_description.
1460         * linux-aarch64-tdesc.c: New file.
1461         * linux-aarch64-tdesc.h: New file.
1463 2017-11-24  Yao Qi  <yao.qi@linaro.org>
1465         * configure.srv: Set $srv_regobj for tic6x-linux.
1466         * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1467         (tic6x_read_description): Move some code to tic6x_arch_setup.
1468         (tic6x_tdesc_test): New function.
1469         (initialize_low_arch): Call selftests::register_test.
1471 2017-11-22  Yao Qi  <yao.qi@linaro.org>
1473         * remote-utils.c (prepare_resume_reply): Use memcpy.
1475 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1477         * linux-low.c (kill_one_lwp_callback): Return void, take
1478         argument directly, don't filter on pid.
1479         (linux_kill): Use for_each_thread.
1481 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1483         * linux-low.c (need_step_over_p): Return bool, remove dummy
1484         argument.
1485         (linux_resume, proceed_all_lwps): Use find_thread.
1487 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1489         * linux-low.c (resume_status_pending_p): Return bool, remove
1490         flag_p argument.
1491         (linux_resume): Use find_thread.
1493 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1495         * linux-low.c (struct thread_resume_array): Remove.
1496         (linux_set_resume_request): Return void, take arguments
1497         directly.
1498         (linux_resume): Use for_each_thread.
1500 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1502         * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1503         return bool, remove data argument.
1504         (linux_stabilize_threads): Use find_thread.
1506 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1508         * linux-low.c (unsuspend_one_lwp): Remove.
1509         (unsuspend_all_lwps): Use for_each_thread, inline code from
1510         unsuspend_one_lwp.
1512 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1514         * gdbthread.h (find_thread): Add overload with ptid_t filter.
1515         * linux-low.c (struct iterate_over_lwps_args): Remove.
1516         (iterate_over_lwps_filter): Remove.
1517         (iterate_over_lwps): Use find_thread.
1519 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1521         * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1522         (linux_handle_new_gdb_connection): Use for_each_thread, inline
1523         code from reset_lwp_ptrace_options_callback.
1525 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1527         * linux-arm-low.c (struct update_registers_data): Remove.
1528         (update_registers_callback): Return void, take arguments
1529         directly, don't check thread's pid.
1530         (arm_insert_point, arm_remove_point): Use for_each_thread.
1532 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1534         * win32-low.c (continue_one_thread): Return void, take argument
1535         directly.
1536         (child_continue): Use for_each_thread.
1538 2017-11-19  Simon Marchi  <simon.marchi@ericsson.com>
1540         * win32-i386-low.c (update_debug_registers_callback): Rename
1541         to ...
1542         (update_debug_registers): ... this, return void, remove pid_p arg.
1543         (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1545 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
1547         * inferiors.h (struct process_info): Add constructor, initialize
1548         fields..
1549         <syscalls_to_catch>: Change type to std::vector<int>.
1550         * inferiors.c (add_process): Allocate process_info with new.
1551         (remove_process): Free process_info with delete.
1552         * linux-low.c (handle_extended_wait): Adjust.
1553         (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1554         * server.c (handle_general_set): Adjust.
1556 2017-11-16  Pedro Alves  <palves@redhat.com>
1558         * remote-utils.c (remote_close): Block SIGIO signals instead of
1559         uninstalling the SIGIO handler.
1561 2017-11-16  Alan Hayward  <alan.hayward@arm.com>
1563         * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1565 2017-11-16  Yao Qi  <yao.qi@linaro.org>
1567         * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1568         (tic6x_store_gregset): Likewise.
1569         (tic6x_usrregs_info): Move it up.
1571 2017-11-15  Alan Hayward  <alan.hayward@arm.com>
1573         * Makefile.in: Update arch rules.
1574         * configure.srv: Explicitly mark arch/ files.
1576 2017-11-13  Andreas Schwab  <schwab@suse.de>
1578         * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1579         function.
1580         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1582 2017-11-06  Pedro Alves  <palves@redhat.com>
1584         * config.in, configure: Regenerate.
1586 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1588         * target.c (struct thread_search): Remove.
1589         (thread_search_callback): Remove.
1590         (prepare_to_access_memory): Use for_each_thread instead of
1591         find_inferior.  Inline code from thread_search_callback.
1593 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1595         * server.c (struct visit_actioned_threads_data): Remove.
1596         (visit_actioned_threads): Change prototype to take arguments
1597         directly.
1598         (resume): Use find_thread instead of find_inferior.
1600 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1602         * server.c (queue_stop_reply_callback): Change prototype, return
1603         void.
1604         (find_status_pending_thread_callback): Remove.
1605         (handle_status): Replace find_inferior with find_thread and
1606         for_each_thread.
1608 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
1610         * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1611         with REGNO.
1612         (aarch64_store_gregset): Likewise.
1613         (aarch64_fill_fpregset): Likewise.
1614         (aarch64_store_fpregset): Likewise.
1616 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
1618         * gdbthread.h (find_thread, for_each_thread): New functions.
1619         * inferiors.c (thread_of_pid): Remove.
1620         (find_any_thread_of_pid): Use find_thread.
1621         * linux-low.c (num_lwps): Use for_each_thread.
1623 2017-10-17  Yao Qi  <yao.qi@linaro.org>
1625         * Makefile.in: Remove one rule.
1626         * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1628 2017-10-17  Yao Qi  <yao.qi@linaro.org>
1630         * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1631         Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1633 2017-10-17  Yao Qi  <yao.qi@linaro.org>
1635         * configure.srv: Rename arm.o with arch/arm.o.
1637 2017-10-17  Yao Qi  <yao.qi@linaro.org>
1639         * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1640         (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1641         (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1642         (arch-i386.o, arch-amd64.o): Remove rules.
1643         (arch/%.o): New rule.
1644         Update POSTCOMPILE and COMPILE.pre.
1645         * configure.ac: Invoke AC_CONFIG_COMMANDS.
1646         * configure: Re-generated.
1647         * configure.srv: Replace arch-i386.o with arch/i386.o.
1648         Replace arch-amd64.o with arch/amd64.o.
1650 2017-10-16  Yao Qi  <yao.qi@linaro.org>
1652         * configure: Regenerated.
1654 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1656         * inferiors.h: (struct inferior_list): Remove.
1657         (struct inferior_list_entry); Remove.
1658         (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1659         A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1660         get_first_inferior): Remove.
1661         (for_each_inferior, for_each_inferior_with_data, find_inferior,
1662         find_inferior_id, find_inferior_in_random): Change signature.
1663         * inferiors.c (all_threads): Change type to
1664         std::list<thread_info *>.
1665         (get_thread): Remove macro.
1666         (find_inferior, find_inferior_id): Change signature, implement
1667         using find_thread.
1668         (find_inferior_in_random): Change signature, implement using
1669         find_thread_in_random.
1670         (for_each_inferior, for_each_inferior_with_data): Change
1671         signature, implement using for_each_thread.
1672         (add_inferior_to_list, remove_inferior): Remove.
1673         (add_thread, get_first_thread, thread_of_pid,
1674         find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1675         (get_first_inferior, one_inferior_p, clear_inferior_list):
1676         Remove.
1677         (clear_inferiors, get_thread_process): Update.
1678         * gdbthread.h: Include <list>.
1679         (struct thread_info) <entry>: Remove field.
1680         <id>: New field.
1681         (all_threads): Change type to std::list<thread_info *>.
1682         (get_first_inferior): Add doc.
1683         (find_thread, for_each_thread, find_thread_in_random): New
1684         functions.
1685         (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1686         * linux-arm-low.c (update_registers_callback): Update.
1687         * linux-low.c (second_thread_of_pid_p): Update.
1688         (kill_one_lwp_callback, linux_detach_lwp_callback,
1689         delete_lwp_callback, status_pending_p_callback, same_lwp,
1690         find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1691         iterate_over_lwps, not_stopped_callback,
1692         resume_stopped_resumed_lwps, count_events_callback,
1693         select_singlestep_lwp_callback, select_event_lwp_callback,
1694         unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1695         suspend_and_send_sigstop_callback, wait_for_sigstop,
1696         stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1697         lwp_running, linux_set_resume_request, resume_status_pending_p,
1698         need_step_over_p, start_step_over, linux_resume_one_thread,
1699         proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1700         reset_lwp_ptrace_options_callback): Update.
1701         * linux-mips-low.c (update_watch_registers_callback): Update.
1702         * regcache.c (regcache_invalidate_one, regcache_invalidate):
1703         Update.
1704         (free_register_cache_thread_one): Remove.
1705         (regcache_release): Update.
1706         * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1707         handle_qxfer_threads_worker): Update.
1708         (handle_query): Update, use list iterator.
1709         (visit_actioned_threads, handle_pending_status,
1710         queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1711         clear_pending_status_callback, set_pending_status_callback,
1712         find_status_pending_thread_callback, handle_status,
1713         process_serial_event): Update.
1714         * target.c (thread_search_callback): Update.
1715         * thread-db.c (thread_db_get_tls_address): Update.
1716         * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1717         Update.
1718         * win32-i386-low.c (update_debug_registers_callback): Update.
1719         * win32-low.c (delete_thread_info, child_delete_thread,
1720         continue_one_thread, suspend_one_thread,
1721         get_child_debug_event): Adjust.
1723 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1725         * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1726         * inferiors.h: Include <list>.
1727         (struct process_info) <entry>: Remove field.
1728         <pid>: New field.
1729         (pid_of): Change macro to function.
1730         (ptid_of, lwpid_of): Remove macro.
1731         (all_processes): Change type to std::list<process_info *>.
1732         (ALL_PROCESSES): Remove macro.
1733         (for_each_process, find_process): New function.
1734         * inferiors.c (all_processes): Change type to
1735         std::list<process_info *>.
1736         (find_thread_process): Adjust.
1737         (add_process): Likewise.
1738         (remove_process): Likewise.
1739         (find_process_pid): Likewise.
1740         (get_first_process): Likewise.
1741         (started_inferior_callback): Remove.
1742         (have_started_inferiors_p): Adjust.
1743         (attached_inferior_callback): Remove.
1744         (have_attached_inferiors_p): Adjust.
1745         * linux-low.c (check_zombie_leaders): Likewise.
1746         * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1747         (x86_linux_update_xmltarget): Adjust.
1748         * server.c (handle_query): Likewise.
1749         (gdb_reattached_process): Remove.
1750         (handle_status): Adjust.
1751         (kill_inferior_callback): Likewise.
1752         (detach_or_kill_inferior): Remove.
1753         (print_started_pid): Likewise.
1754         (print_attached_pid): Likewise.
1755         (detach_or_kill_for_exit): Update.
1756         (process_serial_event): Likewise.
1757         * linux-arm-low.c (arm_new_fork): Likewise.
1759 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
1761         * dll.h: Include <list>.
1762         (struct dll_info): Add constructor.
1763         <entry>: Remove field.
1764         (all_dlls): Change type to std::list<dll_info>.
1765         * dll.c: Include <algorithm>.
1766         (get_dll): Remove macro.
1767         (all_dlls): Change type to std::list<dll_info *>.
1768         (free_one_dll): Remove.
1769         (match_dll): Likewise.
1770         (loaded_dll): Adjust.
1771         (unloaded_dll): Adjust to all_dlls type change, use
1772         std::find_if.  Inline code from match_dll.
1773         (clear_dlls): Adjust to all_dlls type change.
1774         * server.c (emit_dll_description): Remove.
1775         (handle_qxfer_libraries): Adjust to all_dlls type change,
1776         integrate emit_dll_description's functionality.
1778 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1780         * linux-low.h (struct linux_target_ops) <delete_process>: New
1781         field.
1782         * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1783         * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1784         (struct linux_target_ops): Add delete_process callback.
1785         * linux-arm-low.c (arm_delete_process): New.
1786         (struct linux_target_ops): Add delete_process callback.
1787         * linux-bfin-low.c (struct linux_target_ops): Likewise.
1788         * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1789         * linux-m32r-low.c (struct linux_target_ops): Likewise.
1790         * linux-mips-low.c (mips_linux_delete_process): New.
1791         (struct linux_target_ops): Add delete_process callback.
1792         * linux-ppc-low.c (struct linux_target_ops): Likewise.
1793         * linux-s390-low.c (struct linux_target_ops): Likewise.
1794         * linux-sh-low.c (struct linux_target_ops): Likewise.
1795         * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1796         * linux-tile-low.c (struct linux_target_ops): Likewise.
1797         * linux-x86-low.c (x86_linux_delete_process): New.
1798         (struct linux_target_ops): Add delete_process callback.
1799         * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1801 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
1803         * linux-aarch64-low.c (the_low_target): Add thread delete
1804         callback.
1805         * linux-arm-low.c (arm_delete_thread): New function.
1806         (the_low_target): Add thread delete callback.
1807         * linux-bfin-low.c (the_low_target): Likewise.
1808         * linux-crisv32-low.c (the_low_target): Likewise.
1809         * linux-low.c (delete_lwp): Invoke delete_thread callback if
1810         set.
1811         * linux-low.h (struct linux_target_ops) <delete_thread>: New
1812         field.
1813         * linux-m32r-low.c (the_low_target): Add thread delete callback.
1814         * linux-mips-low.c (mips_linux_delete_thread): New function.
1815         (the_low_target): Add thread delete callback.
1816         * linux-ppc-low.c (the_low_target): Likewise.
1817         * linux-s390-low.c (the_low_target): Likewise.
1818         * linux-sh-low.c (the_low_target): Likewise.
1819         * linux-tic6x-low.c (the_low_target): Likewise.
1820         * linux-tile-low.c (the_low_target): Likewise.
1821         * linux-x86-low.c (the_low_target): Likewise.
1822         * linux-xtensa-low.c (the_low_target): Likewise.
1824 2017-10-06  Yuanhui Zhang  <asmwarrior@gmail.com>
1826         * win32-low.c: Include "common-inferior.h".
1828 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1830         * inferiors.c (set_inferior_cwd): New function.
1831         * server.c (handle_general_set): Handle QSetWorkingDir packet.
1832         (handle_query): Inform that QSetWorkingDir is supported.
1833         * win32-low.c (create_process): Pass the inferior's cwd to
1834         CreateProcess.
1836 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1838         * inferiors.c (current_inferior_cwd): New global variable.
1839         (get_inferior_cwd): New function.
1840         * inferiors.h (struct process_info) <cwd>: New field.
1842 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
1844         * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1845         (OBS): Add gdb_tilde_expand.o.
1847 2017-10-02  Simon Marchi  <simon.marchi@ericsson.com>
1849         * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1850         * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1852 2017-09-29  Pedro Alves  <palves@redhat.com>
1854         * ax.c (gdb_parse_agent_expr): Constify.
1855         * ax.h (gdb_parse_agent_expr): Constify.
1856         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1857         Constify.
1858         * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1859         * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1860         * remote-utils.h (read_ptid): Constify.
1861         * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1862         (process_point_options, process_serial_event): Constify.
1863         * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1864         (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1865         (cmd_qtbuffer): Constify.
1867 2017-09-29  Pedro Alves  <palves@redhat.com>
1869         * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1870         fails.
1872 2017-09-29  Pedro Alves  <palves@redhat.com>
1874         * linux-low.c (handle_extended_wait): Pass parent thread instead
1875         of process to thread_db_notice_clone.
1876         * linux-low.h (thread_db_notice_clone): Replace parent process
1877         parameter with parent thread parameter.
1878         * thread-db.c (find_one_thread): Add comment.
1879         (thread_db_notice_clone): Replace parent process parameter with
1880         parent thread parameter.  Temporarily switch to the parent thread.
1882 2017-09-26  Sergio Durigan Junior  <sergiodj@redhat.com>
1884         * gdbthread.h: Include "common-gdbthread.h".
1885         * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1886         "if" when validating the ptid.
1887         * remote-utils.c: Include "gdbthread.h".
1888         (prepare_resume_reply): Use "switch_to_thread".
1889         * target.c (done_accessing_memory): Likewise.
1891 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
1893         * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1894         s390x-gs-linux64.o to srv_regobj.  Add s390-gs-linux64.xml,
1895         s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1896         srv_xmlfiles.  Add s390-gs-linux64-ipa.o and
1897         s390x-gs-linux64-ipa.o to ipa_obj.
1898         * linux-s390-low.c (HWCAP_S390_GS): New define.
1899         (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1900         New functions.
1901         (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1902         (s390_arch_setup): Check for guarded-storage support and choose
1903         appropriate tdesc.
1904         (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1905         init_registers_s390x_gs_linux64.
1906         * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1907         enum value.
1908         (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1909         (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1911 2017-09-22  Simon Marchi  <simon.marchi@ericsson.com>
1913         * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1915 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1917         * linux-low.h (struct lwp_info): Add new field, thread_handle.
1918         (thread_db_thread_handle): Declare.
1919         * linux-low.c (linux_target_ops): Initialize thread_handle.
1920         * server.c (handle_qxfer_threads_worker): Add support for
1921         "handle" attribute.
1922         * target.h (struct target_ops): Add new function pointer,
1923         thread_handle.
1924         (target_thread_handle): Define.
1925         * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1926         field in lwp.
1927         (thread_db_thread_handle): New function.
1929 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
1931         * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1932         * linux-low.h (thread_db_notice_clone): Declare.
1933         * thread-db.c (thread_db_notice_clone): New function.
1935 2017-09-21  Pedro Alves  <palves@redhat.com>
1937         * server.c (gdb_read_memory, handle_status, process_serial_event)
1938         (handle_serial_event, handle_target_event): Adjust to
1939         set_desired_thread prototype change.
1940         * target.c (set_desired_thread): Remove 'use_general' parameter
1941         and adjust.
1942         * target.h (set_desired_thread): Remove 'use_general' parameter.
1944 2017-09-20  Tom Tromey  <tom@tromey.com>
1946         * target.c (target_terminal::terminal_state): Define.
1947         (target_terminal::init): Rename from target_terminal_init.
1948         (target_terminal::inferior): Rename from
1949         target_terminal_inferior.
1950         (target_terminal::ours): Rename from target_terminal_ours.
1951         (target_terminal::ours_for_output, target_terminal::info): New.
1953 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1955         * server.c (accumulate_file_name_length): Remove.
1956         (emit_dll_description): Adjust to std::string change.
1957         (handle_qxfer_libraries): Use std::string to hold document.
1959 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1961         * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1962         return type of xml_escape_text.
1963         * server.c (emit_dll_description): Likewise.
1965 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
1967         * server.c (captured_main): Accept argument for --selftest.
1968         Update run_tests call.
1969         * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1970         when registering selftests.
1972 2017-09-16  Sergio Durigan Junior  <sergiodj@redhat.com>
1974         * regcache.c (get_thread_regcache): Update code to use "std::vector"
1975         instead of "VEC" for "target_desc.reg_defs".
1976         (regcache_cpy): Likewise.
1977         (registers_to_string): Likewise.
1978         (registers_from_string): Likewise.
1979         (find_regno): Likewise.
1980         (supply_regblock): Likewise.
1981         (regcache_raw_read_unsigned): Likewise.
1982         * tdesc.c (init_target_desc): Likewise.
1983         (tdesc_create_reg): Likewise.
1984         * tdesc.h: Remove declaration of "tdesc_reg_p".  Include <vector>.
1985         (struct target_desc) <reg_defs>: Convert to "std::vector".
1986         (target_desc): Do not initialize "reg_defs".
1987         (~target_desc): Update code to use "std::vector" instead of "VEC"
1988         for "target_desc.reg_defs".
1989         (operator==): Likewise.
1991 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
1993         * inferiors.h (thread_to_gdb_id): Remove.
1994         * inferiors.c (thread_to_gdb_id): Remove.
1995         * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1996         * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1997         lynx_store_registers, lynx_read_memory, lynx_write_memory):
1998         Likewise.
1999         * nto-low.c (nto_fetch_registers, nto_store_registers,
2000         nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
2002 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
2004         * inferiors.h (gdb_id_to_thread_id): Remove.
2005         * inferiors.c (gdb_id_to_thread_id): Remove.
2006         * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
2007         removal.  Move pid declaration closer to where it's used.
2009 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
2011         * server.c (handle_detach): New function.
2012         (process_serial_event): Move code out, call handle_detach.
2014 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
2016         * server.c (require_running): Rename to ...
2017         (require_running_or_return): ... this ...
2018         (require_running_or_break): ... and this.
2019         (handle_query, process_serial_event): Adjust.
2021 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
2023         * linux-low.c (linux_set_resume_request): Remove unused
2024         variables.
2026 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
2028         * server.c (first_thread_of): Remove.
2029         (process_serial_event): Replace usage of first_thread_of with
2030         find_any_thread_of_pid.
2031         * tracepoint.c (same_process_p): Remove.
2032         (gdb_agent_about_to_close): Replace usage of same_process_p with
2033         find_any_thread_of_pid.
2034         * linux-x86-low.c (same_process_callback): Remove.
2035         (x86_arch_setup_process_callback): Replace usage of
2036         same_process_callback with find_any_thread_of_pid.
2037         * thread-db.c (any_thread_of): Remove.
2038         (switch_to_process): Replace usage of any_thread_of with
2039         find_any_thread_of_pid.
2040         * inferiors.c (thread_pid_matches_callback): Remove.
2041         (find_thread_process): Adjust to use find_any_thread_of_pid.
2043 2017-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2045         * regcache.c (get_thread_regcache): Guard calls to "memset"
2046           with "!VEC_empty".
2048 2017-09-10  Sergio Durigan Junior  <sergiodj@redhat.com>
2050         * linux-low.c (handle_extended_wait): Use
2051         "allocate_target_description" instead of "XNEW".
2052         * linux-x86-low.c (initialize_low_arch): Likewise.
2054 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2056         * configure.srv (srv_i386_regobj): Remove.
2057         (srv_amd64_regobj): Remove.
2058         (srv_regobj): Set it to "" for x86 non-linux targets.
2059         * linux-x86-tdesc.c (i386_linux_read_description):
2060         * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
2061         (init_registers_i386): Remove the declaration.
2062         (tdesc_i386): Remove the declaration.
2063         (lynx_i386_arch_setup): Call i386_create_target_description.
2064         * nto-x86-low.c: Likewise.
2065         * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
2066         [!__x86_64__]: include arch/i386.h.
2067         (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2069 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2071         * configure.srv (srv_amd64_linux_xmlfiles): Remove
2072         i386/amd64-XXX-linux from it.
2074 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2076         * configure.srv: Empty srv_amd64_linux_regobj if $development is
2077         false.
2078         (ipa_amd64_linux_regobj): Remove.
2079         (ipa_x32_linux_regobj): Remove.
2081 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2083         * Makefile.in (arch-amd64.o): New rule.
2084         * configure.srv: Append arch-amd64.o.
2085         * linux-amd64-ipa.c: Include common/x86-xstate.h.
2086         (get_ipa_tdesc): Call amd64_linux_read_description.
2087         (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2088         and init_registers_amd64_XXX.
2089         * linux-x86-low.c (x86_linux_read_description): Call
2090         amd64_linux_read_description.
2091         (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2092         (initialize_low_arch): Don't call init_registers_x32_XXX and
2093         init_registers_amd64_XXX.
2094         * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2095         and tdesc_amd64_XXX.
2096         [__x86_64__] (amd64_tdesc_test): New function.
2097         (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2098         and init_registers_amd64_XXX.
2099         * linux-x86-tdesc.c: Include arch/amd64.h.
2100         (xcr0_to_tdesc_idx): New function.
2101         (i386_linux_read_description): New function.
2102         (amd64_get_ipa_tdesc_idx): New function.
2103         * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2104         (amd64_get_ipa_tdesc): Declare.
2106 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2108         * configure.srv (srv_i386_linux_xmlfiles): Remove
2109         i386/i386-XXX-linux.xml from it.
2111 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2113         * configure.srv: Set srv_i386_linux_regobj empty if $development
2114         is false.
2115         * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2116         initialize_low_tdesc.
2117         * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2118         with #if initialize_low_tdesc.
2119         * linux-x86-tdesc-selftest.c: New file.
2120         * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2122 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2124         * Makefile.in (arch-i386.o): New rule.
2125         * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2126         (x86_64-*-linux*): Likewise.
2127         * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2128         include arch/i386.h.
2129         (i386_linux_read_description): Remove code and call
2130         i386_create_target_description.
2131         * tdesc.c (allocate_target_description): New function.
2132         * tdesc.h (set_tdesc_architecture): Remove declaration.
2133         (set_tdesc_osabi): Likewise.
2135 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2137         * linux-x86-tdesc.c: Don't include <inttypes.h>.
2138         (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2139         set_tdesc_architecture and set_tdesc_osabi.  Remove code setting
2140         .xmltarget.
2141         * server.c (get_features_xml): Call tdesc_get_features_xml.
2142         * tdesc.c (set_tdesc_architecture): New function.
2143         (set_tdesc_osabi): New function.
2144         (tdesc_get_features_xml): New function.
2145         (tdesc_create_feature): Add an argument.
2146         * tdesc.h (struct target_desc) <features>: New field.
2147         <arch, osabi>: New field.
2148         (~target_desc): xfree features, arch, and osabi.
2149         (target_desc::oerator==): Don't compare .xmltarget.
2150         [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2151         (set_tdesc_osabi): Likewise.
2152         (tdesc_get_features_xml): Likewise.
2154 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2156         * linux-x86-tdesc.c: Include selftest.h.
2157         (i386_tdesc_test): New function.
2158         (initialize_low_tdesc): Call selftests::register_test.
2159         * tdesc.h: Include regdef.h.
2160         (target_desc): Override operator == and !=.
2162 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2164         * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2165         (ipa_obj): Likewise.
2166         * linux-i386-ipa.c: Include common/x86-xstate.h
2167         (get_ipa_tdesc): Call i386_linux_read_description.
2168         (initialize_low_tracepoint): Don't call  init_registers_XXX
2169         functions, call initialize_low_tdesc instead.
2170         * linux-x86-low.c (x86_linux_read_description): Call
2171         i386_linux_read_description.
2172         (initialize_low_arch): Don't call init_registers_i386_XXX
2173         functions, call initialize_low_tdesc.
2174         * linux-x86-tdesc.c: New file.
2175         * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2176         (i386_get_ipa_tdesc_idx): Declare.
2177         (i386_get_ipa_tdesc): Declare.
2178         (initialize_low_tdesc): Declare.
2180 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2182         * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2183         instead of 0.
2185 2017-09-05  Yao Qi  <yao.qi@linaro.org>
2187         * Makefile.in (IPA_OBJS): Add vec-ipa.o
2188         * regcache.c (get_thread_regcache): Use VEC_length.
2189         (init_register_cache): Likewise.
2190         (regcache_cpy): Likewise.
2191         (registers_to_string): Iterate reg_defs via VEC_iterate.
2192         (find_regno): Likewise.
2193         (find_register_by_number): Use VEC_index.
2194         (register_size): Call find_register_by_number.
2195         (register_data): Call find_register_by_number.
2196         (supply_regblock): Use VEC_length.
2197         (regcache_raw_read_unsigned): Likewise.
2198         * tdesc.c (init_target_desc): Iterate reg_defs via
2199         VEC_iterate.
2200         (default_description): Update initializer.
2201         (copy_target_description): Don't update field num_registers.
2202         * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2203         <num_registers>: Remove.
2205 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
2207         * Makefile.in (.SECONDARY): Define target.
2209 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
2211         * linux-low.c (linux_wait_1): Adjust.
2212         * server.c (queue_stop_reply_callback): Adjust.
2214 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
2216         * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2217         QEnvironmentUnset and QEnvironmentReset packets.
2218         (handle_query): Inform remote that QEnvironmentHexEncoded,
2219         QEnvironmentUnset and QEnvironmentReset are supported.
2221 2017-08-25  Simon Marchi  <simon.marchi@ericsson.com>
2223         * inferiors.h (inferior_target_data): Rename to ...
2224         (thread_target_data): ... this.
2225         (inferior_regcache_data): Rename to ...
2226         (thread_regcache_data): ... this.
2227         (set_inferior_regcache_data): Rename to ...
2228         (set_thread_regcache_data): ... this.
2229         * inferiors.c (inferior_target_data): Rename to ...
2230         (thread_target_data): ... this.
2231         (inferior_regcache_data): Rename to ...
2232         (thread_regcache_data): ... this.
2233         (set_inferior_regcache_data): Rename to ...
2234         (set_thread_regcache_data): ... this.
2235         (free_one_thread): Update.
2236         * linux-low.h (get_thread_lwp): Update.
2237         * regcache.c (get_thread_regcache): Update.
2238         (regcache_invalidate_thread): Update.
2239         (free_register_cache_thread): Update.
2240         * win32-i386-low.c (update_debug_registers_callback): Update.
2241         (win32_get_current_dr): Update.
2242         * win32-low.c (thread_rec): Update.
2243         (delete_thread_info): Update.
2244         (continue_one_thread): Update.
2245         (suspend_one_thread): Update.
2247 2017-08-24  Simon Marchi  <simon.marchi@ericsson.com>
2249         * inferiors.c (set_inferior_target_data): Remove.
2250         * inferiors.h (set_inferior_target_data): Remove.
2252 2017-08-18  Yao Qi  <yao.qi@linaro.org>
2254         * Makefile.in (OBS): Add selftest.o.
2255         * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2256         * configure, config.in: Re-generated.
2257         * server.c: Include common/sefltest.h.
2258         (captured_main): Handle option --selftest.
2260 2017-08-09  Yao Qi  <yao.qi@linaro.org>
2262         * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2263         i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2264         i386-avx-mpx.o and i386-mmx.o.
2265         (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2266         amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2267         (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2268         i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2269         i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2270         (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2271         i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2272         i386/amd64-avx-mpx.xml.
2274 2017-08-09  Yao Qi  <yao.qi@linaro.org>
2276         * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2277         and x32-avx-avx512.o.
2278         (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2279         i386/x32-avx-avx512.xml.
2281 2017-07-26  Simon Marchi  <simon.marchi@ericsson.com>
2283         * tracepoint.h (enum class fast_tpoint_collect_result): New
2284         enumeration.
2285         (fast_tracepoint_collecting): Change return type to
2286         fast_tpoint_collect_result.
2287         * tracepoint.c (fast_tracepoint_collecting): Likewise.
2288         * linux-low.h: Include tracepoint.h.
2289         (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2290         fast_tpoint_collect_result.
2291         * linux-low.c (handle_tracepoints): Adjust.
2292         (linux_fast_tracepoint_collecting): Change return type to
2293         fast_tpoint_collect_result.
2294         (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2295         linux_wait_1, stuck_in_jump_pad_callback,
2296         lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2297         proceed_one_lwp): Adjust to type change.
2299 2017-07-10  Yao Qi  <yao.qi@linaro.org>
2301         * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2303 2017-06-29  Yao Qi  <yao.qi@linaro.org>
2305         * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2306         Remove.
2307         [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2309 2017-06-20  Simon Marchi  <simon.marchi@ericsson.com>
2311         * Makefile.in (IPA_OBJS): Sort and format one item per line.
2313 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
2315         * linux-low.c (linux_create_inferior): Adjust code to access the
2316         environment information via 'gdb_environ' class.
2317         * lynx-low.c (lynx_create_inferior): Likewise.
2318         * server.c (our_environ): Make it an instance of 'gdb_environ'.
2319         (get_environ): Return a pointer to 'our_environ'.
2320         (captured_main): Initialize 'our_environ'.
2321         * server.h (get_environ): Adjust prototype.
2322         * spu-low.c (spu_create_inferior): Adjust code to access the
2323         environment information via 'gdb_environ' class.
2325 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
2327         * linux-low.c (linux_read_memory, linux_write_memory): Remove
2328         usage of "register" keyword.
2330 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
2332         * configure: Re-generate.
2334 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
2336         * configure: Re-generate.
2338 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
2340         * Makefile.in (COMPILE.pre): Add "-x c++".
2342 2017-06-09  Sergio Durigan Junior  <sergiodj@redhat.com>
2344         * fork-child.c: Conditionally include <signal.h>.
2346 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
2348         * server.c (handle_general_set): Handle new packet
2349         "QStartupWithShell".
2350         (handle_query): Add "QStartupWithShell" to the list of supported
2351         packets.
2352         (gdbserver_usage): Add help text explaining the
2353         new "--startup-with-shell" and "--no-startup-with-shell" CLI
2354         options.
2355         (captured_main): Recognize and act upon the presence of the new
2356         CLI options.
2358 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
2359             Pedro Alves  <palves@redhat.com>
2361         * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2362         * configure: Regenerate.
2363         * configure.srv (srv_linux_obj): Add "fork-child.o" and
2364         "fork-inferior.o".
2365         (i[34567]86-*-lynxos*): Likewise.
2366         (spu*-*-*): Likewise.
2367         * fork-child.c: New file.
2368         * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2369         and "environ.h".
2370         (linux_ptrace_fun): New function.
2371         (linux_create_inferior): Adjust function prototype to reflect
2372         change on "target.h".  Adjust function code to use
2373         "fork_inferior".
2374         (linux_request_interrupt): Delete "signal_pid".
2375         * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2376         (lynx_ptrace_fun): New function.
2377         (lynx_create_inferior): Adjust function prototype to reflect
2378         change on "target.h".  Adjust function code to use
2379         "fork_inferior".
2380         * nto-low.c (nto_create_inferior): Adjust function prototype and
2381         code to reflect change on "target.h".  Update comments.
2382         * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2383         "common-terminal.h" and "environ.h".
2384         (terminal_fd): Moved to fork-child.c.
2385         (old_foreground_pgrp): Likewise.
2386         (restore_old_foreground_pgrp): Likewise.
2387         (last_status): Make it global.
2388         (last_ptid): Likewise.
2389         (our_environ): New variable.
2390         (startup_with_shell): Likewise.
2391         (program_name): Likewise.
2392         (program_argv): Rename to...
2393         (program_args): ...this.
2394         (wrapper_argv): New variable.
2395         (start_inferior): Delete function.
2396         (get_exec_wrapper): New function.
2397         (get_exec_file): Likewise.
2398         (get_environ): Likewise.
2399         (prefork_hook): Likewise.
2400         (post_fork_inferior): Likewise.
2401         (postfork_hook): Likewise.
2402         (postfork_child_hook): Likewise.
2403         (handle_v_run): Update code to deal with arguments coming from the
2404         remote host.  Update calls from "start_inferior" to
2405         "create_inferior".
2406         (captured_main): Likewise.  Initialize environment variable.  Call
2407         "have_job_control".
2408         * server.h (post_fork_inferior): New prototype.
2409         (get_environ): Likewise.
2410         (last_status): Declare.
2411         (last_ptid): Likewise.
2412         (signal_pid): Likewise.
2413         * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2414         (spu_ptrace_fun): New function.
2415         (spu_create_inferior): Adjust function prototype to reflect change
2416         on "target.h".  Adjust function code to use "fork_inferior".
2417         * target.c (target_terminal_init): New function.
2418         (target_terminal_inferior): Likewise.
2419         (target_terminal_ours): Likewise.
2420         * target.h: Include <vector>.
2421         (struct target_ops) <create_inferior>: Update prototype.
2422         (create_inferior): Update macro.
2423         * utils.c (gdb_flush_out_err): New function.
2424         * win32-low.c (win32_create_inferior): Adjust function prototype
2425         and code to reflect change on "target.h".
2427 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
2429         * inferiors.c (switch_to_thread): New function.
2431 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
2433         * Makefile.in (SFILE): Add "common/job-control.c".
2434         (OBS): Add "job-control.o".
2436 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
2438         * Makefile: Remove "@host_makefile_frag@".
2440 2017-05-05  Pedro Alves  <palves@redhat.com>
2442         * configure: Regenerate.
2444 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
2446         * configure: Regenerate.
2448 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
2450         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2451         software_single_step change of return type to
2452         std::vector<CORE_ADDR>.
2453         * linux-low.c (install_software_single_step_breakpoints):
2454         Likewise.
2455         * linux-low.h (install_software_single_step_breakpoints):
2456         Likewise.
2458 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2460         * remote-utils.c: Include "gdb_termios.h" instead of
2461         "terminal.h".
2462         * terminal.h: Delete file.
2464 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
2466         * server.c: Include <vector>.
2467         <program_argv, wrapper_argv>: Convert to std::vector.
2468         (start_inferior): Rewrite function to use C++.
2469         (handle_v_run): Likewise.  Update code that calculates the argv
2470         based on the vRun packet; use C++.
2471         (captured_main): Likewise.
2473 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
2475         * server.c (handle_v_cont): Initialize thread_resume::thread
2476         with null_ptid.
2478 2017-04-05  Pedro Alves  <palves@redhat.com>
2480         * configure: Regenerate.
2482 2017-04-05  Pedro Alves  <palves@redhat.com>
2484         * gdbreplay.c (sync_error): Constify.
2485         * linux-x86-low.c (push_opcode): Constify.
2487 2017-04-05  Pedro Alves  <palves@redhat.com>
2489         * win32-low.c (get_child_debug_event)
2490         <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2491         Report TARGET_WAITKIND_SPURIOUS instead.
2493 2017-04-05  Pedro Alves  <palves@redhat.com>
2495         * remote-utils.c (remote_prepare, remote_open): Constify.
2496         * remote-utils.h (remote_prepare, remote_open): Constify.
2497         * server.c (captured_main): Constify 'port' handling.
2499 2017-04-04  Simon Marchi  <simon.marchi@ericsson.com>
2501         * Makefile.in (clean): Clear .deps.
2503 2017-03-31  Simon Marchi  <simon.marchi@polymtl.ca>
2505         * .gitignore: Remove generated files, replace with wildcard.
2506         * (clean): Replace removal of generated files with wildcard.
2507         (version.c): Replace with...
2508         (version-generated.c): ...this.
2509         (xml-builtin.c): Replace with...
2510         (xml-builtin-generated.c): ...this.
2511         (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2512         (%.c: *regformats*): Replace with...
2513         (%-generated.c: *regformats*): ...this.
2515 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
2517         * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2518         (xtensa_fill_gregset): Call collect_register_by_name for
2519         threadptr register.
2520         (xtensa_store_gregset): Call supply_register_by_name for
2521         threadptr register.
2523 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
2525         * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2526         for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2527         (xtensa_store_gregset): Call supply_register for all registers in
2528         a0_regnum..a0_regnum + C0_NREGS range.
2530 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
2532         * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2533         (ax-ipa.o: ax.c): Remove.
2534         (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2535         (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2536         (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2537         (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2538         (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2540 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
2542         * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2543         (print-utils-ipa.o: ../common/print-utils.c): Remove.
2544         (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2545         (errors-ipa.o: ../common/errors.c): Remove.
2546         (format-ipa.o: ../common/format.c): Remove.
2547         (common-utils-ipa.o: ../common/common-utils.c): Remove.
2549 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
2551         * Makefile.in (%-ipa.o: %.c): New rule.
2552         (tracepoint-ipa.o: tracepoint.c): Remove.
2553         (utils-ipa.o: utils.c): Remove.
2554         (remote-utils-ipa.o: remote-utils.c): Remove.
2555         (regcache-ipa.o: regcache.c): Remove.
2556         (i386-linux-ipa.o: i386-linux.c): Remove.
2557         (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2558         (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2559         (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2560         (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2561         (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2562         (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2563         (amd64-linux-ipa.o: amd64-linux.c): Remove.
2564         (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2565         (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2566         (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2567         (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2568         (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2569         (aarch64-ipa.o: aarch64.c): Remove.
2570         (s390-linux32-ipa.o: s390-linux32.c): Remove.
2571         (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2572         (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2573         (s390-linux64-ipa.o: s390-linux64.c): Remove.
2574         (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2575         (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2576         (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2577         (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2578         (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2579         (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2580         (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2581         (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2582         (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2583         (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2584         (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2585         (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2586         (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2587         (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2588         (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2589         (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2590         (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2591         (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2592         (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2593         (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2594         (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2595         (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2596         (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2597         (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2598         (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2599         (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2600         (tdesc-ipa.o: tdesc.c): Remove.
2601         (x32-linux-ipa.o: x32-linux.c): Remove.
2602         (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2603         (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2605 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
2607         * Makefile.in (%.o: ../arch/%.c): New rule.
2608         (arm.o: ../arch/arm.c): Remove.
2609         (arm-linux.o: ../arch/arm-linux.c): Remove.
2610         (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2611         (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2613 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
2615         * Makefile.in (%.o: ../nat/%.c): New rule.
2616         (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2617         (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2618         (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2619         (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2620         (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2621         (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2622         (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2623         (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2624         (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2625         (linux-personality.o: ../nat/linux-personality.c): Remove.
2626         (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2627         (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2628         (x86-linux.o: ../nat/x86-linux.c): Remove.
2629         (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2630         (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2632 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
2634         * Makefile.in (%.o: ../common/%.c): New rule.
2635         (signals.o: ../common/signals.c): Remove.
2636         (print-utils.o: ../common/print-utils.c): Remove.
2637         (rsp-low.o: ../common/rsp-low.c): Remove.
2638         (common-utils.o: ../common/common-utils.c): Remove.
2639         (posix-strerror.o: ../common/posix-strerror.c): Remove.
2640         (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2641         (vec.o: ../common/vec.c): Remove.
2642         (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2643         (xml-utils.o: ../common/xml-utils.c): Remove.
2644         (ptid.o: ../common/ptid.c): Remove.
2645         (buffer.o: ../common/buffer.c): Remove.
2646         (format.o: ../common/format.c): Remove.
2647         (filestuff.o: ../common/filestuff.c): Remove.
2648         (agent.o: ../common/agent.c): Remove.
2649         (errors.o: ../common/errors.c): Remove.
2650         (environ.o: ../common/environ.c): Remove.
2651         (common-debug.o: ../common/common-debug.c): Remove.
2652         (cleanups.o: ../common/cleanups.c): Remove.
2653         (common-exceptions.o: ../common/common-exceptions.c): Remove.
2654         (fileio.o: ../common/fileio.c): Remove.
2655         (common-regcache.o: ../common/common-regcache.c): Remove.
2656         (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2657         (new-op.o: ../common/new-op.c): Remove.
2658         (btrace-common.o: ../common/btrace-common.c): Remove.
2660 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
2662         * Makefile.in (%.o: ../target/%.c): New rule.
2663         (waitstatus.o: ../target/waitstatus.c): Remove.
2665 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
2667         * Makefile.in
2668         (%.c: ../regformats/%.dat,
2669         (%.c: ../regformats/arm/%.dat,
2670         (%.c: ../regformats/i386/%.dat,
2671         (%.c: ../regformats/rs6000/%.dat): New rules.
2672         (aarch64.c): Remove.
2673         (reg-arm.c): Remove.
2674         (arm-with-iwmmxt.c): Remove.
2675         (arm-with-vfpv2.c): Remove.
2676         (arm-with-vfpv3.c): Remove.
2677         (arm-with-neon.c): Remove.
2678         (reg-bfin.c): Remove.
2679         (reg-cris.c): Remove.
2680         (reg-crisv32.c): Remove.
2681         (i386.c): Remove.
2682         (i386-linux.c): Remove.
2683         (i386-avx.c): Remove.
2684         (i386-avx-linux.c): Remove.
2685         (i386-avx-avx512.c): Remove.
2686         (i386-avx-avx512-linux.c): Remove.
2687         (i386-mpx.c): Remove.
2688         (i386-mpx-linux.c): Remove.
2689         (i386-avx-mpx-avx512-pku.c): Remove.
2690         (i386-avx-mpx-avx512-pku-linux.c): Remove.
2691         (i386-avx-mpx.c): Remove.
2692         (i386-avx-mpx-linux.c): Remove.
2693         (i386-mmx.c): Remove.
2694         (i386-mmx-linux.c): Remove.
2695         (reg-ia64.c): Remove.
2696         (reg-m32r.c): Remove.
2697         (reg-m68k.c): Remove.
2698         (reg-cf.c): Remove.
2699         (mips-linux.c): Remove.
2700         (mips-dsp-linux.c): Remove.
2701         (mips64-linux.c): Remove.
2702         (mips64-dsp-linux.c): Remove.
2703         (nios2-linux.c): Remove.
2704         (powerpc-32.c): Remove.
2705         (powerpc-32l.c): Remove.
2706         (powerpc-altivec32l.c): Remove.
2707         (powerpc-cell32l.c): Remove.
2708         (powerpc-vsx32l.c): Remove.
2709         (powerpc-isa205-32l.c): Remove.
2710         (powerpc-isa205-altivec32l.c): Remove.
2711         (powerpc-isa205-vsx32l.c): Remove.
2712         (powerpc-e500l.c): Remove.
2713         (powerpc-64l.c): Remove.
2714         (powerpc-altivec64l.c): Remove.
2715         (powerpc-cell64l.c): Remove.
2716         (powerpc-vsx64l.c): Remove.
2717         (powerpc-isa205-64l.c): Remove.
2718         (powerpc-isa205-altivec64l.c): Remove.
2719         (powerpc-isa205-vsx64l.c): Remove.
2720         (s390-linux32.c): Remove.
2721         (s390-linux32v1.c): Remove.
2722         (s390-linux32v2.c): Remove.
2723         (s390-linux64.c): Remove.
2724         (s390-linux64v1.c): Remove.
2725         (s390-linux64v2.c): Remove.
2726         (s390-te-linux64.c): Remove.
2727         (s390-vx-linux64.c): Remove.
2728         (s390-tevx-linux64.c): Remove.
2729         (s390x-linux64.c): Remove.
2730         (s390x-linux64v1.c): Remove.
2731         (s390x-linux64v2.c): Remove.
2732         (s390x-te-linux64.c): Remove.
2733         (s390x-vx-linux64.c): Remove.
2734         (s390x-tevx-linux64.c): Remove.
2735         (tic6x-c64xp-linux.c): Remove.
2736         (tic6x-c64x-linux.c): Remove.
2737         (tic6x-c62x-linux.c): Remove.
2738         (reg-sh.c): Remove.
2739         (reg-sparc64.c): Remove.
2740         (reg-spu.c): Remove.
2741         (amd64.c): Remove.
2742         (amd64-linux.c): Remove.
2743         (amd64-avx.c): Remove.
2744         (amd64-avx-linux.c): Remove.
2745         (amd64-avx-avx512.c): Remove.
2746         (amd64-avx-avx512-linux.c): Remove.
2747         (amd64-mpx.c): Remove.
2748         (amd64-mpx-linux.c): Remove.
2749         (amd64-avx-mpx-avx512-pku.c): Remove.
2750         (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2751         (amd64-avx-mpx.c): Remove.
2752         (amd64-avx-mpx-linux.c): Remove.
2753         (x32.c): Remove.
2754         (x32-linux.c): Remove.
2755         (x32-avx.c): Remove.
2756         (x32-avx-linux.c): Remove.
2757         (x32-avx-avx512.c): Remove.
2758         (x32-avx-avx512-linux.c): Remove.
2759         (reg-xtensa.c): Remove.
2760         (reg-tilegx.c): Remove.
2761         (reg-tilegx32.c): Remove.
2763 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
2765         * Makefile.in (SFILES): Add "common/environ.c".
2766         (OBJS): Add "common/environ.h".
2768 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
2770         * configure.ac: Check if the fs_base and gs_base members of
2771         `struct user_regs_struct' exist.
2772         * config.in: Regenerated.
2773         * configure: Likewise.
2775 2017-01-09  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2777         * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2778         target_read_memory.
2779         * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2780         (get_next_pcs_syscall_next_pc): Likewise.
2782 2016-12-23  Luis Machado  <lgustavo@codesourcery.com>
2784         * win32-i386-low.c: Fix incorrect reference to a couple source files.
2785         * nto-x86-low.c: Likewise.
2787 2016-11-30  Simon Marchi  <simon.marchi@polymtl.ca>
2789         * Makefile.in: Include disable-implicit-rules.mk.
2791 2016-11-23  Pedro Alves  <palves@redhat.com>
2793         * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2794         (debug_vprintf): Use std::chrono::steady_clock instead of
2795         gettimeofday.  Use '.' instead of ':'.
2796         * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2797         (get_timestamp): Use std::chrono::steady_clock instead of
2798         gettimeofday.
2800 2016-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
2802         * Makefile.in: Fix whitespace formatting.
2804 2016-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
2806         * Makefile.in (SFILES, OBS): Flatten list and order
2807         alphabetically.
2809 2016-11-23  Pedro Alves  <palves@redhat.com>
2811         * event-loop.c (handle_file_event): Use warning.
2812         * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2813         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2814         Use warning.
2816 2016-11-23  Pedro Alves  <palves@redhat.com>
2818         * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2819         output.
2820         * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2821         * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2822         debug_printf and debug_flush for debug output.
2823         * server.c (handle_general_set): Likewise.
2824         * thread-db.c (try_thread_db_load): Use debug_printf for debug
2825         output.
2827 2016-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
2829         * Makefile.in (.c.o): Replace rule with ...
2830         (%.o: %.c): ... this one.
2832 2016-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
2834         * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2835         prefixed with @GMAKE_FALSE@.  Update comment related to non-GNU
2836         make.
2837         * configure.ac: Remove checks for the make program.
2838         * configure: Re-generate.
2840 2016-10-28  Pedro Alves  <palves@redhat.com>
2842         * Makefile.in (CXX_DIALECT): Get from configure.
2843         (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2844         * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2845         * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2846         * config.in: Regenerate.
2847         * configure: Regenerate.
2849 2016-10-27  Yao Qi  <yao.qi@linaro.org>
2851         * linux-low.c (linux_supports_range_stepping): Return true if
2852         can_software_single_step return true.
2854 2016-10-27  Yao Qi  <yao.qi@linaro.org>
2856         * inferiors.c (find_inferior_in_random): New function.
2857         * inferiors.h (find_inferior_in_random): Declare.
2858         * linux-low.c (linux_wait_for_event_filtered): Call
2859         find_inferior_in_random instead of find_inferior.
2861 2016-10-27  Yao Qi  <yao.qi@linaro.org>
2863         * linux-low.c (linux_wait_1): If single-step breakpoints are
2864         inserted, remove them.
2866 2016-10-26  Pedro Alves  <palves@redhat.com>
2868         * linux-low.c (handle_extended_wait): Link parent/child fork
2869         threads.
2870         (linux_wait_1): Unlink them.
2871         (linux_set_resume_request): Ignore resume requests for
2872         already-resumed and unhandled fork child threads.
2873         * linux-low.h (struct lwp_info) <fork_relative>: New field.
2874         * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2875         New functions.
2876         (handle_v_requests) <vCont>: Don't call require_running.
2877         * server.h (in_queued_stop_replies): New declaration.
2879 2016-10-24  Yao Qi  <yao.qi@linaro.org>
2881         PR server/20733
2882         * linux-aarch64-low.c (append_insns): Cast the return value to
2883         'uint32_t *'.
2885 2016-10-10  Yao Qi  <yao.qi@linaro.org>
2887         * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2889 2016-10-06  Sergio Durigan Junior  <sergiodj@redhat.com>
2891         * target.c (target_supports_multi_process): New function, moved
2892         from...
2893         * target.h (target_supports_multi_process): ... here.  Remove
2894         macro.
2896 2016-10-05  Tom Tromey  <tom@tromey.com>
2898         PR remote/20655:
2899         * tracepoint.c (handle_tracepoint_bkpts): Check
2900         ipa_error_tracepoint, not ipa_stopping_tracepoint.
2902 2016-10-05  Yao Qi  <yao.qi@linaro.org>
2904         * configure.srv: Update the path of arm-*.xml files.
2906 2016-10-05  Terry Guo  <terry.guo@arm.com>
2907             Yao Qi  <yao.qi@linaro.org>
2909         * Makefile.in: Adjust the path of rules.
2910         * configure.srv: Update the path of xml files.
2911         * regformats/arm-with-iwmmxt.dat: Regenerated.
2912         * regformats/arm-with-neon.dat: Likewise.
2913         * regformats/arm-with-vfpv2.dat: Likewise.
2914         * regformats/arm-with-vfpv3.dat Likewise.
2916 2016-09-30  Yao Qi  <yao.qi@linaro.org>
2918         PR gdbserver/20627
2919         * target.c (target_stop_and_wait): Don't call
2920         target_continue_no_signal, use resume_stop instead.
2922 2016-09-26  Yao Qi  <yao.qi@linaro.org>
2924         * linux-low.c (linux_wait_1): Call debug_exit.
2926 2016-09-23  Pedro Alves  <palves@redhat.com>
2928         * Makefile.in (SFILES): Add common/new-op.c.
2929         (OBS): Add common/new-op.o.
2930         (new-op.o): New rule.
2932 2016-09-21  Simon Marchi  <simon.marchi@ericsson.com>
2934         * .gitinore: Ignore more files.
2936 2016-09-21  Yao Qi  <yao.qi@linaro.org>
2938         * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2939         23.
2941 2016-09-19  Sergio Durigan Junior  <sergiodj@redhat.com>
2943         * server.c (start_inferior): Call target_mourn_inferior instead of
2944         mourn_inferior; pass ptid_t argument to it.
2945         (resume): Likewise.
2946         (handle_target_event): Likewise.
2947         * target.c (target_mourn_inferior): New function.
2948         * target.h (mourn_inferior): Delete macro.
2950 2016-09-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
2952         * linux-low.c (lwp_is_stepping): New function.
2954 2016-09-06  Carl Love  <cel@us.ibm.com>
2956         * server.c (start_inferior):  Fixed comment, requested comment change
2957         didn't get updated correctly.  Removed reference to ptrace () call as
2958         it is only true on Linux systems.
2960 2016-09-06  Carl Love  <cel@us.ibm.com>
2962         * server.c (start_inferior):  Do not call
2963         function target_post_create_inferior () if the
2964         inferior process has already exited.
2966 2016-09-05  Pedro Alves  <palves@redhat.com>
2968         * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2969         (COMPILE.pre, CC_LD): Use CXX directly.
2970         (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2971         * acinclude.m4: Don't include build-with-cxx.m4.
2972         * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2973         * configure: Regenerate.
2975 2016-09-02  Akash Trehan  <akash.trehan123@gmail.com>
2977         PR gdb/19495
2978         * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2979         call writing data to own_buf.
2981 2016-09-01  Sergio Durigan Junior  <sergiodj@redhat.com>
2983         * target.c (mywait): Call target_wait instead of
2984         the_target->wait.
2985         (target_wait): New function.
2987 2016-09-01  Sergio Durigan Junior  <sergiodj@redhat.com>
2989         * server.c (start_inferior): New variable 'ptid'.  Replace calls
2990         to the_target->resume by target_continue{,_no_signal}, depending
2991         on the case.
2992         * target.c (target_stop_and_wait): Call target_continue_no_signal
2993         instead of the_target->resume.
2994         (target_continue): New function.
2996 2016-08-31  Antoine Tremblay  <antoine.tremblay@ericsson.com>
2998         * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
3000 2016-08-25  Adhemerval Zanella  <adhemerval.zanella@linaro.org>
3002         PR server/20491
3003         * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
3004         ps_prochandle.
3005         * linux-aarch64-low.c (ps_get_thread_area): Likewise.
3006         * linux-arm-low.c (ps_get_thread_area): Likewise.
3007         * linux-crisv32-low.c (ps_get_thread_area): Likewise.
3008         * linux-m68k-low.c (ps_get_thread_area): Likewise.
3009         * linux-mips-low.c (ps_get_thread_area): Likewise.
3010         * linux-nios2-low.c (ps_get_thread_area): Likewise.
3011         * linux-tic6x-low.c (ps_get_thread_area): Likewise.
3012         * linux-x86-low.c (ps_get_thread_area): Likewise.
3013         * linux-xtensa-low.c (ps_get_thread_area): Likewise.
3015 2016-08-19  Pedro Alves  <palves@redhat.com>
3017         * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
3019 2016-08-19  Pedro Alves  <palves@redhat.com>
3021         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
3022         comment.  Use memcpy instead of casting through unsigned long.
3024 2016-08-19  Pedro Alves  <palves@redhat.com>
3026         * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
3027         allocating around 0x80000000.
3029 2016-08-19  Pedro Alves  <palves@redhat.com>
3031         PR gdb/20415
3032         * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
3033         (x32-avx512-linux-ipa.o): New rules.
3034         * configure.ac (x86_64-*-linux*): New x32 check.
3035         * configure.srv (ipa_x32_linux_regobj): New.
3036         (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
3037         * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
3038         descriptions.
3039         (initialize_low_tracepoint) [__ILP32__]: Initialize x32
3040         descriptions.
3041         * configure: Regenerate.
3043 2016-08-09  Pedro Alves  <palves@redhat.com>
3045         PR gdb/18653
3046         * Makefile.in (OBS): Add signals-state-save-restore.o.
3047         (signals-state-save-restore.o): New rule.
3048         * config.in: Regenerate.
3049         * configure: Regenerate.
3050         * linux-low.c: Include "signals-state-save-restore.h".
3051         (linux_create_inferior): Call
3052         restore_original_signals_state.
3053         * server.c: Include "dispositions-save-restore.h".
3054         (captured_main): Call save_original_signals_state.
3056 2016-08-05  Pedro Alves  <palves@redhat.com>
3058         * configure: Regenerate.
3060 2016-08-04  Yao Qi  <yao.qi@linaro.org>
3062         * linux-low.c (regsets_fetch_inferior_registers): Check
3063         errno is ESRCH or not.
3065 2016-08-02  Yao Qi  <yao.qi@linaro.org>
3067         * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3068         <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3069         (thread_db_load_search): Update.
3070         (try_thread_db_load_1): Don't look for td_ta_event_addr,
3071         td_ta_set_event and td_ta_event_getmsg.
3073 2016-07-26  Pedro Alves  <palves@redhat.com>
3075         PR server/20414
3076         * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3077         of unsigned long for 64-bit registers and use uint32_t instead of
3078         unsigned int for 32-bit registers.
3080 2016-07-26  Pedro Alves  <palves@redhat.com>
3082         * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3083         to 'ptrace'.
3085 2016-07-21  Tom Tromey  <tom@tromey.com>
3087         * configure: Rebuild.
3089 2016-07-21  Yao Qi  <yao.qi@linaro.org>
3091         * mem-break.c (find_gdb_breakpoint): Cast bp to
3092         'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3094 2016-07-21  Yao Qi  <yao.qi@linaro.org>
3096         * server.c (handle_v_requests): Support s and S actions
3097         if target_supports_software_single_step return true.
3099 2016-07-21  Yao Qi  <yao.qi@linaro.org>
3101         * linux-low.c (resume_stopped_resumed_lwps): If resume request
3102         is resume_step, call maybe_hw_step.
3103         (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3104         and unstop them.
3105         (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3106         breakpoints or not.
3107         (proceed_one_lwp): If resume request is resume_step, install
3108         reinsert breakpoints and call maybe_hw_step.
3110 2016-07-21  Yao Qi  <yao.qi@linaro.org>
3112         * linux-low.c (proceed_one_lwp): Declare.
3113         (linux_resume_one_thread): Remove local variable 'step'.
3114         Lift code enqueue signal.  Call proceed_one_lwp instead of
3115         linux_resume_one_lwp.
3117 2016-07-21  Yao Qi  <yao.qi@linaro.org>
3119         * linux-low.c (linux_resume_one_thread): Call
3120         enqueue_pending_signal.
3122 2016-07-21  Yao Qi  <yao.qi@linaro.org>
3124         * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3125         * inferiors.c (do_restore_current_thread_cleanup): New function.
3126         (make_cleanup_restore_current_thread): Likewise.
3127         * linux-low.c (install_software_single_step_breakpoints): Call
3128         make_cleanup_restore_current_thread.  Switch current_thread to
3129         thread.
3131 2016-07-21  Yao Qi  <yao.qi@linaro.org>
3133         * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3134         (set_reinsert_breakpoint): New parameter ptid.  Callers updated.
3135         (clone_one_breakpoint): Likewise.
3136         (delete_reinsert_breakpoints): Change parameter to thread.
3137         Callers updated.
3138         (has_reinsert_breakpoints): Likewise.
3139         (uninsert_reinsert_breakpoints): Likewise.
3140         (reinsert_reinsert_breakpoints): Likewise.
3141         * mem-break.h (set_reinsert_breakpoint): Update declaration.
3142         (delete_reinsert_breakpoints): Likewise.
3143         (reinsert_reinsert_breakpoints): Likewise.
3144         (uninsert_reinsert_breakpoints): Likewise.
3145         (has_reinsert_breakpoints): Likewise.
3147 2016-07-21  Yao Qi  <yao.qi@linaro.org>
3149         * inferiors.c (get_thread_process): Make parameter const.
3150         * inferiors.h (get_thread_process): Update declaration.
3151         * mem-break.c (clone_all_breakpoints): Remove all parameters.
3152         Add new parameters child_thread and parent_thread.  Callers
3153         updated.
3154         * mem-break.h (clone_all_breakpoints): Update declaration.
3156 2016-07-21  Yao Qi  <yao.qi@linaro.org>
3158         * mem-break.c (struct breakpoint) <cond_list>: Remove.
3159         <command_list, handler>: Remove.
3160         (struct gdb_breakpoint): New.
3161         (struct other_breakpoint): New.
3162         (struct reinsert_breakpoint): New.
3163         (is_gdb_breakpoint): New function.
3164         (any_persistent_commands): Update command_list if
3165         is_gdb_breakpoint returns true.
3166         (set_breakpoint): Create breakpoints according to their types.
3167         (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3168         (set_gdb_breakpoint_1): Likewise.
3169         (set_gdb_breakpoint): Likewise.
3170         (clear_breakpoint_conditions): Change parameter type to
3171         'struct gdb_breakpoint *'.
3172         (clear_breakpoint_commands): Likewise.
3173         (clear_breakpoint_conditions_and_commands): Likewise.
3174         (add_condition_to_breakpoint): Likewise.
3175         (add_breakpoint_condition): Likewise.
3176         (add_commands_to_breakpoint): Likewise.
3177         (check_breakpoints): Check other_breakpoint.
3178         (clone_one_breakpoint): Clone breakpopint according to its type.
3179         * mem-break.h (struct gdb_breakpoint): Declare.
3180         (set_gdb_breakpoint): Update declaration.
3181         (clear_breakpoint_conditions_and_commands): Likewise.
3182         (add_breakpoint_condition): Likewise.
3183         (add_breakpoint_commands): Likewise.
3184         * server.c (process_point_options): Change parameter type to
3185         'struct gdb_breakpoint *'.
3187 2016-07-21  Yao Qi  <yao.qi@linaro.org>
3189         * mem-break.c (set_breakpoint_at): Rename it to ...
3190         (set_breakpoint_type_at): ... it.
3191         (set_breakpoint_at): Call set_breakpoint_type_at.
3192         (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3193         * mem-break.h (set_breakpoint_at): Update comments.
3195 2016-07-12  Chung-Lin Tang  <cltang@codesourcery.com>
3197         * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3198         to buf parameter.
3199         (nios2_store_gregset): Likewise.
3201 2016-07-01  Pedro Alves  <palves@redhat.com>
3202             Antoine Tremblay  <antoine.tremblay@ericsson.com>
3204         * linux-low.c: Change interface to take the target lwp_info
3205         pointer directly and return void.  Handle detaching from a zombie
3206         thread.
3207         (linux_detach_lwp_callback): New function.
3208         (linux_detach): Detach from the leader thread after detaching from
3209         the clone threads.
3211 2016-06-28  Yao Qi  <yao.qi@linaro.org>
3213         * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3214         for variable new_offset.
3215         (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3216         (aarch64_ftrace_insn_reloc_cb): Likewise.
3217         (aarch64_ftrace_insn_reloc_tb): Likewise.
3218         (aarch64_install_fast_tracepoint_jump_pad): Likewise.  Use
3219         PRIx64 instead of PRIx32.
3221 2016-06-28  Yao Qi  <yao.qi@linaro.org>
3223         * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3224         (the_low_target): Install arm_get_syscall_trapinfo.
3226 2016-06-28  Yao Qi  <yao.qi@linaro.org>
3228         * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3229         function.
3230         (the_low_target): Install aarch64_get_syscall_trapinfo.
3232 2016-06-28  Yao Qi  <yao.qi@linaro.org>
3234         * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3235         Callers updated.
3236         * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3237         Remove parameter sysno.
3238         * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3239         sysret.
3241 2016-06-21  Andreas Arnez  <arnez@linux.vnet.ibm.com>
3243         * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3244         (s390_emit_ne_goto): Likewise.
3245         (s390_emit_lt_goto): Likewise.
3246         (s390_emit_le_goto): Likewise.
3247         (s390_emit_gt_goto): Likewise.
3248         (s390_emit_ge_goto): Likewise.
3249         (s390x_emit_eq_goto): Likewise.
3250         (s390x_emit_ne_goto): Likewise.
3251         (s390x_emit_lt_goto): Likewise.
3252         (s390x_emit_le_goto): Likewise.
3253         (s390x_emit_gt_goto): Likewise.
3254         (s390x_emit_ge_goto): Likewise.
3255         (s390_emit_ops_impl): Mark variable static.
3256         (s390x_emit_ops): Likewise.
3258 2016-06-17  Yao Qi  <yao.qi@linaro.org>
3260         * linux-low.c (handle_extended_wait): Call
3261         uninsert_reinsert_breakpoints for the parent process.  Remove
3262         reinsert breakpoints from the child process.  Reinsert them to
3263         the parent process when vfork is done.
3264         * mem-break.c (uninsert_reinsert_breakpoints): New function.
3265         (reinsert_reinsert_breakpoints): New function.
3266         * mem-break.h (uninsert_reinsert_breakpoints): Declare
3267         (reinsert_reinsert_breakpoints): Declare.
3269 2016-06-17  Yao Qi  <yao.qi@linaro.org>
3271         * linux-low.c (handle_extended_wait): If the parent is doing
3272         step-over, remove the reinsert breakpoints from the forked child.
3274 2016-06-17  Yao Qi  <yao.qi@linaro.org>
3276         * linux-low.c (unsuspend_all_lwps): Declare.
3277         (linux_low_filter_event): If thread exited, call finish_step_over.
3278         If step-over is finished, unsuspend other threads.
3280 2016-06-17  Yao Qi  <yao.qi@linaro.org>
3282         * linux-low.c (linux_resume_one_lwp_throw): Assert
3283         has_reinsert_breakpoints returns false.
3284         * mem-break.c (delete_disabled_breakpoints): Assert
3285         bp type isn't reinsert_breakpoint.
3287 2016-06-17  Yao Qi  <yao.qi@linaro.org>
3289         * linux-low.c (maybe_hw_step): New function.
3290         (linux_resume_one_lwp_throw): Call maybe_hw_step.
3291         (finish_step_over): Switch current_thread to lwp temporarily,
3292         and assert has_reinsert_breakpoints returns true.
3293         (proceed_one_lwp): Call maybe_hw_step.
3294         * mem-break.c (has_reinsert_breakpoints): New function.
3295         * mem-break.h (has_reinsert_breakpoints): Declare.
3297 2016-06-02  Jon Turney  <jon.turney@dronecode.org.uk>
3299         * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3301 2016-05-17  Yao Qi  <yao.qi@linaro.org>
3303         * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3304         instead of find_inferior.
3306 2016-05-05  Yao Qi  <yao.qi@linaro.org>
3308         * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3309         Initialize res to zero.
3311 2016-05-05  Yao Qi  <yao.qi@linaro.org>
3313         * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3314         to uint32_t.
3316 2016-05-04  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3318         * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3319         used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3320         (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3322 2016-04-28  Par Olsson  <par.olsson@windriver.com>
3323             Simon Marchi  <simon.marchi@ericsson.com>
3325         * tracepoint.c (write_inferior_int8): New function.
3326         (cmd_qtenable_disable): Write enable flag using
3327         write_inferior_int8.
3329 2016-04-25  Yao Qi  <yao.qi@linaro.org>
3331         * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3332         (need_step_over_p): Return zero if the LWP has pending signals
3333         can be delivered on software single step target.
3335 2016-04-25  Yao Qi  <yao.qi@linaro.org>
3337         * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3338         return instead of error.
3340 2016-04-22  Yao Qi  <yao.qi@linaro.org>
3342         * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3343         to 23.
3345 2016-04-22  Yao Qi  <yao.qi@linaro.org>
3347         * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3348         signal when stepping over breakpoint with software single
3349         step.
3351 2016-04-21  Pedro Alves  <palves@redhat.com>
3353         * linux-s390-low.c (s390_collect_ptrace_register)
3354         (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3355         add casts.
3356         (s390_check_regset): Use void * instead of gdb_byte *.
3358 2016-04-20  Pedro Alves  <palves@redhat.com>
3360         * configure: Renegerate.
3362 2016-04-20  Yao Qi  <yao.qi@linaro.org>
3364         * linux-aarch32-low.c: Include "arch/arm-linux.h".
3365         (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3366         number 16.
3367         (arm_store_gregset): Likewise.
3369 2016-04-16  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3371         * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3372         i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3373         (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3374         (amd64-avx-mpx-linux.c): New rules.
3375         (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3376         * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3377         (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3378         (srv_amd64_regobj): Add amd64-avx-mpx.o.
3379         (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3380         (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3381         (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3382         (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3383         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3384         (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3385         (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3386         * linux-x86-low.c (x86_linux_read_description): Add case for
3387         X86_XSTATE_AVX_MPX_MASK.
3388         (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3389         (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3390         init_registers_i386_avx_mpx_linux.
3391         * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3392         (initialize_low_tracepoint): Call
3393         init_registers_i386_avx_mpx_linux.
3394         * linux-amd64-ipa.c (get_ipa_tdesc):  Add case for avx_mpx.
3395         (initialize_low_tracepoint): Call
3396         init_registers_amd64_avx_mpx_linux.
3397         * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3398         (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3399         (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3400         declarations.
3402 2016-04-18  Pedro Alves  <palves@redhat.com>
3404         * configure: Regenerate.
3406 2016-04-13  Antoine Tremblay  <antoine.tremblay@ericsson.com>
3408         * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3409         (aarch64_emit_sub): Likewise.
3411 2016-04-12  Pedro Alves  <palves@redhat.com>
3413         * utils.c (prepare_to_throw_exception): Delete.
3415 2016-04-05  Simon Marchi  <simon.marchi@ericsson.com>
3417         * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3419 2016-04-05  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3421         * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3423 2016-04-03  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3425         * linux-aarch64-ipa.c: Add <elf.h> include.
3426         * linux-ppc-ipa.c: Add <elf.h> include.
3427         * linux-s390-ipa.c: Add <elf.h> include.
3429 2016-03-31  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3431         * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3432         (get_raw_reg_ptr): Likewise.
3433         (get_trace_state_variable_value_ptr): Likewise.
3434         (set_trace_state_variable_value_ptr): Likewise.
3435         (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3436         char *.
3438 2016-03-31  Wei-cheng Wang  <cole945@gmail.com>
3439             Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3441         PR/17221
3442         * linux-ppc-low.c (emit_insns): New function.
3443         (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3444         (ppc_emit_prologue): New function.
3445         (ppc_emit_epilogue): New function.
3446         (ppc_emit_add): New function.
3447         (ppc_emit_sub): New function.
3448         (ppc_emit_mul): New function.
3449         (ppc_emit_lsh): New function.
3450         (ppc_emit_rsh_signed): New function.
3451         (ppc_emit_rsh_unsigned): New function.
3452         (ppc_emit_ext): New function.
3453         (ppc_emit_zero_ext): New function.
3454         (ppc_emit_log_not): New function.
3455         (ppc_emit_bit_and): New function.
3456         (ppc_emit_bit_or): New function.
3457         (ppc_emit_bit_xor): New function.
3458         (ppc_emit_bit_not): New function.
3459         (ppc_emit_equal): New function.
3460         (ppc_emit_less_signed): New function.
3461         (ppc_emit_less_unsigned): New function.
3462         (ppc_emit_ref): New function.
3463         (ppc_emit_const): New function.
3464         (ppc_emit_reg): New function.
3465         (ppc_emit_pop): New function.
3466         (ppc_emit_stack_flush): New function.
3467         (ppc_emit_swap): New function.
3468         (ppc_emit_stack_adjust): New function.
3469         (ppc_emit_call): New function.
3470         (ppc_emit_int_call_1): New function.
3471         (ppc_emit_void_call_2): New function.
3472         (ppc_emit_if_goto): New function.
3473         (ppc_emit_goto): New function.
3474         (ppc_emit_eq_goto): New function.
3475         (ppc_emit_ne_goto): New function.
3476         (ppc_emit_lt_goto): New function.
3477         (ppc_emit_le_goto): New function.
3478         (ppc_emit_gt_goto): New function.
3479         (ppc_emit_ge_goto): New function.
3480         (ppc_write_goto_address): New function.
3481         (ppc_emit_ops_impl): New static variable.
3482         (ppc64v1_emit_prologue): New function.
3483         (ppc64v2_emit_prologue): New function.
3484         (ppc64_emit_epilogue): New function.
3485         (ppc64_emit_add): New function.
3486         (ppc64_emit_sub): New function.
3487         (ppc64_emit_mul): New function.
3488         (ppc64_emit_lsh): New function.
3489         (ppc64_emit_rsh_signed): New function.
3490         (ppc64_emit_rsh_unsigned): New function.
3491         (ppc64_emit_ext): New function.
3492         (ppc64_emit_zero_ext): New function.
3493         (ppc64_emit_log_not): New function.
3494         (ppc64_emit_bit_and): New function.
3495         (ppc64_emit_bit_or): New function.
3496         (ppc64_emit_bit_xor): New function.
3497         (ppc64_emit_bit_not): New function.
3498         (ppc64_emit_equal): New function.
3499         (ppc64_emit_less_signed): New function.
3500         (ppc64_emit_less_unsigned): New function.
3501         (ppc64_emit_ref): New function.
3502         (ppc64_emit_const): New function.
3503         (ppc64v1_emit_reg): New function.
3504         (ppc64v2_emit_reg): New function.
3505         (ppc64_emit_pop): New function.
3506         (ppc64_emit_stack_flush): New function.
3507         (ppc64_emit_swap): New function.
3508         (ppc64v1_emit_call): New function.
3509         (ppc64v2_emit_call): New function.
3510         (ppc64v1_emit_int_call_1): New function.
3511         (ppc64v2_emit_int_call_1): New function.
3512         (ppc64v1_emit_void_call_2): New function.
3513         (ppc64v2_emit_void_call_2): New function.
3514         (ppc64_emit_if_goto): New function.
3515         (ppc64_emit_eq_goto): New function.
3516         (ppc64_emit_ne_goto): New function.
3517         (ppc64_emit_lt_goto): New function.
3518         (ppc64_emit_le_goto): New function.
3519         (ppc64_emit_gt_goto): New function.
3520         (ppc64_emit_ge_goto): New function.
3521         (ppc64v1_emit_ops_impl): New static variable.
3522         (ppc64v2_emit_ops_impl): New static variable.
3523         (ppc_emit_ops): New function.
3524         (linux_low_target): Wire in ppc_emit_ops.
3526 2016-03-31  Wei-cheng Wang  <cole945@gmail.com>
3527             Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3529         PR/17221
3530         * Makefile.in: Add powerpc-*-ipa.o
3531         * configure.srv: Add ipa_obj for powerpc*-linux.
3532         * linux-ppc-ipa.c: New file.
3533         * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3534         includes.
3535         (PPC_FIELD): New macro.
3536         (PPC_SEXT): New macro.
3537         (PPC_OP6): New macro.
3538         (PPC_BO): New macro.
3539         (PPC_LI): New macro.
3540         (PPC_BD): New macro.
3541         (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3542         (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3543         (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3544         (ppc_get_thread_area): New function.
3545         (is_elfv2_inferior): New function.
3546         (gen_ds_form): New function.
3547         (GEN_STD): New macro.
3548         (GEN_STDU): New macro.
3549         (GEN_LD): New macro.
3550         (GEN_LDU): New macro.
3551         (gen_d_form): New function.
3552         (GEN_ADDI): New macro.
3553         (GEN_ADDIS): New macro.
3554         (GEN_LI): New macro.
3555         (GEN_LIS): New macro.
3556         (GEN_ORI): New macro.
3557         (GEN_ORIS): New macro.
3558         (GEN_LWZ): New macro.
3559         (GEN_STW): New macro.
3560         (GEN_STWU): New macro.
3561         (gen_xfx_form): New function.
3562         (GEN_MFSPR): New macro.
3563         (GEN_MTSPR): New macro.
3564         (GEN_MFCR): New macro.
3565         (GEN_MTCR): New macro.
3566         (GEN_SYNC): New macro.
3567         (GEN_LWSYNC): New macro.
3568         (gen_x_form): New function.
3569         (GEN_OR): New macro.
3570         (GEN_MR): New macro.
3571         (GEN_LWARX): New macro.
3572         (GEN_STWCX): New macro.
3573         (GEN_CMPW): New macro.
3574         (gen_md_form): New function.
3575         (GEN_RLDICL): New macro.
3576         (GEN_RLDICR): New macro.
3577         (gen_i_form): New function.
3578         (GEN_B): New macro.
3579         (GEN_BL): New macro.
3580         (gen_b_form): New function.
3581         (GEN_BNE): New macro.
3582         (GEN_LOAD): New macro.
3583         (GEN_STORE): New macro.
3584         (gen_limm): New function.
3585         (gen_atomic_xchg): New function.
3586         (gen_call): New function.
3587         (ppc_relocate_instruction): New function.
3588         (ppc_install_fast_tracepoint_jump_pad): New function.
3589         (ppc_get_min_fast_tracepoint_insn_len): New function.
3590         (ppc_get_ipa_tdesc_idx): New function.
3591         (the_low_target): Wire in the new functions.
3592         (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3593         tdescs.
3594         * linux-ppc-tdesc.h: New file.
3596 2016-03-31  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3598         * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3599         (alloc_jump_pad_buffer): New function.
3600         * linux-amd64-ipa.c: Add <sys/mman.h> include.
3601         (alloc_jump_pad_buffer): New function.
3602         * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3603         * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3604         (alloc_jump_pad_buffer): New function.
3605         * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3606         (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3607         * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3608         (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3610 2016-03-30  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3612         * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3613         * linux-amd64-ipa.c: Likewise.
3614         * linux-i386-ipa.c: Likewise.
3615         * linux-s390-ipa.c: Likewise.
3616         * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3617         ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3618         set_trace_state_variable_value_ptr.
3619         (struct ipa_sym_addresses): Likewise.
3620         (symbol_list): Likewise.
3621         (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3622         accessing gdb_collect directly.
3623         (gdb_collect_ptr_type): New typedef.
3624         (get_raw_reg_ptr_type): New typedef.
3625         (get_trace_state_variable_value_ptr_type): New typedef.
3626         (set_trace_state_variable_value_ptr_type): New typedef.
3627         (gdb_collect_ptr): New global.
3628         (get_raw_reg_ptr): New global.
3629         (get_trace_state_variable_value_ptr): New global.
3630         (set_trace_state_variable_value_ptr): New global.
3631         (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3632         accessing get_raw_reg directly.
3633         (get_get_tsv_func_addr): Likewise for
3634         get_trace_state_variable_value_ptr.
3635         (get_set_tsv_func_addr): Likewise for
3636         set_trace_state_variable_value_ptr.
3637         * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3639 2016-03-30  Simon Marchi  <simon.marchi@ericsson.com>
3641         * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3643 2016-03-30  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3645         * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3646         packets.
3647         (relocate_instruction): Remove own_buf.
3648         * server.c (own_buf): Make global.
3649         (handle_v_requests): Make global.
3650         * server.h (own_buf): New declaration.
3651         (handle_v_requests): New prototype.
3653 2016-03-29  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3655         PR 18377
3656         * linux-s390-low.c (add_insns): New function.
3657         (s390_emit_prologue): New function.
3658         (s390_emit_epilogue): New function.
3659         (s390_emit_add): New function.
3660         (s390_emit_sub): New function.
3661         (s390_emit_mul): New function.
3662         (s390_emit_lsh): New function.
3663         (s390_emit_rsh_signed): New function.
3664         (s390_emit_rsh_unsigned): New function.
3665         (s390_emit_ext): New function.
3666         (s390_emit_log_not): New function.
3667         (s390_emit_bit_and): New function.
3668         (s390_emit_bit_or): New function.
3669         (s390_emit_bit_xor): New function.
3670         (s390_emit_bit_not): New function.
3671         (s390_emit_equal): New function.
3672         (s390_emit_less_signed): New function.
3673         (s390_emit_less_unsigned): New function.
3674         (s390_emit_ref): New function.
3675         (s390_emit_if_goto): New function.
3676         (s390_emit_goto): New function.
3677         (s390_write_goto_address): New function.
3678         (s390_emit_litpool): New function.
3679         (s390_emit_const): New function.
3680         (s390_emit_call): New function.
3681         (s390_emit_reg): New function.
3682         (s390_emit_pop): New function.
3683         (s390_emit_stack_flush): New function.
3684         (s390_emit_zero_ext): New function.
3685         (s390_emit_swap): New function.
3686         (s390_emit_stack_adjust): New function.
3687         (s390_emit_set_r2): New function.
3688         (s390_emit_int_call_1): New function.
3689         (s390_emit_void_call_2): New function.
3690         (s390_emit_eq_goto): New function.
3691         (s390_emit_ne_goto): New function.
3692         (s390_emit_lt_goto): New function.
3693         (s390_emit_le_goto): New function.
3694         (s390_emit_gt_goto): New function.
3695         (s390_emit_ge_goto): New function.
3696         (s390x_emit_prologue): New function.
3697         (s390x_emit_epilogue): New function.
3698         (s390x_emit_add): New function.
3699         (s390x_emit_sub): New function.
3700         (s390x_emit_mul): New function.
3701         (s390x_emit_lsh): New function.
3702         (s390x_emit_rsh_signed): New function.
3703         (s390x_emit_rsh_unsigned): New function.
3704         (s390x_emit_ext): New function.
3705         (s390x_emit_log_not): New function.
3706         (s390x_emit_bit_and): New function.
3707         (s390x_emit_bit_or): New function.
3708         (s390x_emit_bit_xor): New function.
3709         (s390x_emit_bit_not): New function.
3710         (s390x_emit_equal): New function.
3711         (s390x_emit_less_signed): New function.
3712         (s390x_emit_less_unsigned): New function.
3713         (s390x_emit_ref): New function.
3714         (s390x_emit_if_goto): New function.
3715         (s390x_emit_const): New function.
3716         (s390x_emit_call): New function.
3717         (s390x_emit_reg): New function.
3718         (s390x_emit_pop): New function.
3719         (s390x_emit_stack_flush): New function.
3720         (s390x_emit_zero_ext): New function.
3721         (s390x_emit_swap): New function.
3722         (s390x_emit_stack_adjust): New function.
3723         (s390x_emit_int_call_1): New function.
3724         (s390x_emit_void_call_2): New function.
3725         (s390x_emit_eq_goto): New function.
3726         (s390x_emit_ne_goto): New function.
3727         (s390x_emit_lt_goto): New function.
3728         (s390x_emit_le_goto): New function.
3729         (s390x_emit_gt_goto): New function.
3730         (s390x_emit_ge_goto): New function.
3731         (s390_emit_ops): New function.
3732         (struct linux_target_ops): Fill in emit_ops hook.
3734 2016-03-29  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3736         PR 18377
3737         * Makefile.in: Add s390 IPA files.
3738         * configure.srv: Build IPA for s390.
3739         * linux-s390-ipa.c: New file.
3740         * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3741         (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3742         (tdesc_s390_linux32): Likewise.
3743         (init_registers_s390_linux32v1): Likewise.
3744         (tdesc_s390_linux32v1): Likewise.
3745         (init_registers_s390_linux32v2): Likewise.
3746         (tdesc_s390_linux32v2): Likewise.
3747         (init_registers_s390_linux64): Likewise.
3748         (tdesc_s390_linux64): Likewise.
3749         (init_registers_s390_linux64v1): Likewise.
3750         (tdesc_s390_linux64v1): Likewise.
3751         (init_registers_s390_linux64v2): Likewise.
3752         (tdesc_s390_linux64v2): Likewise.
3753         (init_registers_s390_te_linux64): Likewise.
3754         (tdesc_s390_te_linux64): Likewise.
3755         (init_registers_s390_vx_linux64): Likewise.
3756         (tdesc_s390_vx_linux64): Likewise.
3757         (init_registers_s390_tevx_linux64): Likewise.
3758         (tdesc_s390_tevx_linux64): Likewise.
3759         (init_registers_s390x_linux64): Likewise.
3760         (tdesc_s390x_linux64): Likewise.
3761         (init_registers_s390x_linux64v1): Likewise.
3762         (tdesc_s390x_linux64v1): Likewise.
3763         (init_registers_s390x_linux64v2): Likewise.
3764         (tdesc_s390x_linux64v2): Likewise.
3765         (init_registers_s390x_te_linux64): Likewise.
3766         (tdesc_s390x_te_linux64): Likewise.
3767         (init_registers_s390x_vx_linux64): Likewise.
3768         (tdesc_s390x_vx_linux64): Likewise.
3769         (init_registers_s390x_tevx_linux64): Likewise.
3770         (tdesc_s390x_tevx_linux64): Likewise.
3771         (have_hwcap_s390_vx): New static variable.
3772         (s390_arch_setup): Fill have_hwcap_s390_vx.
3773         (s390_get_thread_area): New function.
3774         (s390_ft_entry_gpr_esa): New const.
3775         (s390_ft_entry_gpr_zarch): New const.
3776         (s390_ft_entry_misc): New const.
3777         (s390_ft_entry_fr): New const.
3778         (s390_ft_entry_vr): New const.
3779         (s390_ft_main_31): New const.
3780         (s390_ft_main_64): New const.
3781         (s390_ft_exit_fr): New const.
3782         (s390_ft_exit_vr): New const.
3783         (s390_ft_exit_misc): New const.
3784         (s390_ft_exit_gpr_esa): New const.
3785         (s390_ft_exit_gpr_zarch): New const.
3786         (append_insns): New function.
3787         (s390_relocate_instruction): New function.
3788         (s390_install_fast_tracepoint_jump_pad): New function.
3789         (s390_get_min_fast_tracepoint_insn_len): New function.
3790         (s390_get_ipa_tdesc_idx): New function.
3791         (struct linux_target_ops): Wire in the above functions.
3792         (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3793         * linux-s390-tdesc.h: New file.
3795 2016-03-29  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3797         * linux-s390-low.c (s390_supports_tracepoints): New function.
3798         (struct linux_target_ops): Fill supports_tracepoints hook.
3800 2016-03-18  Yao Qi  <yao.qi@linaro.org>
3802         * linux-low.c (lwp_signal_can_be_delivered): New function.
3803         (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3805 2016-03-18  Yao Qi  <yao.qi@linaro.org>
3807         * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3808         0 if signal is enqueued.  Remove 'signal' from one debugging
3809         message.  Move one debugging message to some lines below.
3810         Remove code setting 'signal' to 0.
3812 2016-03-18  Yao Qi  <yao.qi@linaro.org>
3814         * linux-low.c (linux_low_filter_event): Remove redundant
3815         WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3817 2016-03-09  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3819         * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3820         (struct linux_target_ops): Wire in the above.
3822 2016-03-03  Yao Qi  <yao.qi@linaro.org>
3824         * linux-low.c: Update comments to start_step_over.
3826 2016-03-03  Yao Qi  <yao.qi@linaro.org>
3828         PR server/19736
3829         * linux-low.c (handle_extended_wait): Set child suspended
3830         if event_lwp->bp_reinsert isn't zero.
3832 2016-03-02  Yao Qi  <yao.qi@linaro.org>
3834         * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3835         enqueue_pending_signal.
3837 2016-03-02  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3839         * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3840         is actually loaded.
3842 2016-02-25  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3844         * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3845         (s390_regmap_3264) [!__s390x__]: New global.
3846         (s390_collect_ptrace_register): Skip map entries containing -1.
3847         (s390_supply_ptrace_register): Ditto.
3848         (s390_fill_gprs_high): New function.
3849         (s390_store_gprs_high): New function.
3850         (s390_regsets): Add NT_S390_HIGH_GPRS.
3851         (s390_get_hwcap): Enable on 31-bit.
3852         (have_hwcap_s390_high_gprs): Enable on 31-bit.
3853         (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3854         Detect NT_S390_HIGH_GPRS.
3855         (s390_usrregs_info_3264): Enable on 31-bit.
3856         (s390_regs_info): Enable regs_info_3264 on 31-bit.
3857         (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3859 2016-02-25  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3861         PR gdb/13808
3862         * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3863         * configure.srv: Ditto.
3864         * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3865         (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3866         * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3867         (init_registers_amd64_linux): Remove prototype.
3868         (tdesc_amd64_linux): Remove declaration.
3869         (get_ipa_tdesc): New function.
3870         (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3871         initialize remaining tdescs.
3872         * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3873         (init_registers_i386_linux): Remove prototype.
3874         (tdesc_i386_linux): Remove declaration.
3875         (get_ipa_tdesc): New function.
3876         (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3877         initialize remaining tdescs.
3878         * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3879         (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3880         * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3881         * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3882         (x86_get_ipa_tdesc_idx): New function.
3883         (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3884         * linux-x86-tdesc.h: New file.
3885         * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3886         (target_get_ipa_tdesc_idx): New macro.
3887         * tracepoint.c (ipa_tdesc_idx): New macro.
3888         (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3889         (symbol_list): Add ipa_tdesc_idx.
3890         (cmd_qtstart): Write ipa_tdesc_idx in the target.
3891         (ipa_tdesc): Remove.
3892         (ipa_tdesc_idx): New variable.
3893         (get_context_regcache): Use get_ipa_tdesc.
3894         (gdb_collect): Ditto.
3895         (gdb_probe): Ditto.
3896         * tracepoint.h (get_ipa_tdesc): New prototype.
3897         (ipa_tdesc): Remove.
3899 2016-02-24  Pedro Alves  <palves@redhat.com>
3901         * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3902         (save_stop_reason): ... this.  Use GDB_ARCH_IS_TRAP_HWBKPT and
3903         handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3904         Factor out common code between the USE_SIGTRAP_SIGINFO and
3905         !USE_SIGTRAP_SIGINFO blocks.
3906         (linux_low_filter_event): Call save_stop_reason instead of
3907         check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3908         Update comments.
3909         (linux_wait_1): Update comments.
3911 2016-02-24  Wei-cheng Wang  <cole945@gmail.com>
3913         * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3914         (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3915         (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3916         ppc_insert_point, ppc_remove_point.
3918 2016-02-17  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3920         * linux-s390-low.c (s390_supports_z_point_type): New function.
3921         (struct linux_target_ops): Wire s390_supports_z_point_type in.
3923 2016-02-16  Yao Qi  <yao.qi@linaro.org>
3925         * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3926         PC.  Get pc from regcache_read_pc.
3928 2016-02-12  Yao Qi  <yao.qi@linaro.org>
3930         * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3931         or linux_get_pc_32bit.
3932         (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3934 2016-02-12  Yao Qi  <yao.qi@linaro.org>
3936         * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3937         arm_linux_get_next_pcs_fixup.
3939 2016-02-12  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3941         * tracepoint.c (x_tracepoint_action_download): Change
3942         write_inferior_data_ptr to write_inferior_data_pointer.
3943         (cmd_qtstart): Likewise.
3944         (write_inferior_data_ptr): Remove.
3945         (download_agent_expr): Change write_inferior_data_ptr to
3946         write_inferior_data_pointer.
3947         (download_tracepoint_1): Likewise.
3948         (download_tracepoint): Likewise.
3949         (download_trace_state_variables): Likewise.
3951 2016-02-11  Wei-cheng Wang  <cole945@gmail.com>
3952             Marcin KoÅ›cielnicki  <koriakin@0x04.net>
3954         * tracepoint.c (struct tracepoint_action_ops): Remove.
3955         (struct tracepoint_action): Remove ops.
3956         (m_tracepoint_action_download, r_tracepoint_action_download)
3957         (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3958         size and offset accordingly.
3959         (m_tracepoint_action_ops, r_tracepoint_action_ops)
3960         (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3961         (tracepoint_action_send, tracepoint_action_download): New functions.
3962         Helpers for trace action handlers.
3963         (add_tracepoint_action): Remove setup actions ops.
3964         (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3966 2016-02-10  Yao Qi  <yao.qi@linaro.org>
3968         * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3970 2016-02-09  Simon Marchi  <simon.marchi@ericsson.com>
3972         * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3973         to AC_OUTPUT.
3974         * configure: Regenerate.
3976 2016-02-09  Simon Marchi  <simon.marchi@ericsson.com>
3978         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3979         void * to gdb_byte *.
3980         * linux-low.c (siginfo_fixup): Likewise.
3981         (linux_xfer_siginfo): Likewise.
3982         * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3983         Likewise.
3984         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3986 2016-02-02  Walfred Tedeschi  <walfred.tedeschi@intel.com>
3988         * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3989         to srv_tgtobj.
3990         (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3991         to srv_tgtobj.
3992         * linux-x86-low.c [__x86_64__]: Include
3993         "nat/amd64-linux-siginfo.h".
3994         (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3995         (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3996         (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3997         (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3998         (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3999         (cpt_si_fd, si_timerid, si_overrun): Move from
4000         nat/amd64-linux-siginfo.c.
4001         * Makefile.in (amd64-linux-siginfo.o:): New rule.
4003 2016-01-28  Simon Marchi  <simon.marchi@ericsson.com>
4005         * server.c (skip_to_semicolon):  Remove.
4006         (process_point_options): Use strchrnul instead of
4007         skip_to_semicolon.
4009 2016-01-26  Yao Qi  <yao.qi@linaro.org>
4011         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
4012         * linux-low.c (install_software_single_step_breakpoints): Don't
4013         call regcache_read_pc.
4014         * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
4015         argument pc.
4017 2016-01-26  Yao Qi  <yao.qi@linaro.org>
4019         * linux-low.c (install_software_single_step_breakpoints): Call
4020         regcache_read_pc instead of get_pc.
4022 2016-01-26  Yao Qi  <yao.qi@linaro.org>
4024         * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
4025         (unblock_async_io): Rename to ...
4026         (block_unblock_async_io): ... it.  New function.
4027         (enable_async_io): Don't install SIGIO handler.  Unblock it
4028         instead.
4029         (disable_async_io): Don't ignore SIGIO.  Block it instead.
4030         (initialize_async_io): Install SIGIO handler.  Don't call
4031         unblock_async_io.
4033 2016-01-26  Yao Qi  <yao.qi@linaro.org>
4035         * remote-utils.c (getpkt): If the buffer isn't empty, and the
4036         first character is '\003', call *the_target->request_interrupt.
4038 2016-01-25  Yao Qi  <yao.qi@linaro.org>
4040         * remote-utils.c (new_thread_notify): Remove.
4041         (dead_thread_notify): Likewise.
4042         * remote-utils.h (new_thread_notify): Remove declaration.
4043         (dead_thread_notify): Likewise.
4045 2016-01-23  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
4047         * gdb.trace/pending.exp: Fix expected message on continue.
4049 2016-01-22  Marcin KoÅ›cielnicki  <koriakin@0x04.net>
4051         * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
4052         it works properly on big-endian machines where sizeof (CORE_ADDR)
4053         != sizeof (void *).
4055 2016-01-21  Pedro Alves  <palves@redhat.com>
4057         * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
4058         (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
4059         * configure: Regenerate.
4061 2016-01-21  Yao Qi  <yao.qi@linaro.org>
4063         * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
4064         is_thumb and set it according to CPSR saved on the stack.
4065         (get_next_pcs_syscall_next_pc): Pass is_thumb to
4066         arm_sigreturn_next_pc.
4068 2016-01-18  Yao Qi  <yao.qi@linaro.org>
4070         * linux-low.c (linux_set_pc_64bit): New function.
4071         (linux_get_pc_64bit): New function.
4072         * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4073         Declare.
4074         * linux-sparc-low.c (debug_threads): Remove declaration.
4075         (sparc_get_pc): Remove.
4076         (the_low_target): Use linux_get_pc_64bit instead of
4077         sparc_get_pc.
4078         * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4079         (the_low_target): Use linux_get_pc_64bit and
4080         linux_set_pc_64bit.
4082 2016-01-18  Yao Qi  <yao.qi@linaro.org>
4084         * linux-arm-low.c (debug_threads): Remove declaration.
4085         (arm_get_pc, arm_set_pc): Remove.
4086         (the_low_target): Use linux_get_pc_32bit and
4087         linux_set_pc_32bit.
4088         * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4089         (the_low_target): Use linux_get_pc_32bit and
4090         linux_set_pc_32bit.
4091         * linux-cris-low.c (debug_threads): Remove declaration.
4092         (cris_get_pc, cris_set_pc,): Remove.
4093         (the_low_target): Use linux_get_pc_32bit and
4094         linux_set_pc_32bit.
4095         * linux-crisv32-low.c (debug_threads): Remove declaration.
4096         (cris_get_pc, cris_set_pc): Remove.
4097         (the_low_target): Use linux_get_pc_32bit and
4098         linux_set_pc_32bit.
4099         * linux-low.c: Include inttypes.h.
4100         (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4101         * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4102         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4103         (the_low_target): Use linux_get_pc_32bit and
4104         linux_set_pc_32bit.
4105         * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4106         (the_low_target): Use linux_get_pc_32bit and
4107         linux_set_pc_32bit.
4108         * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4109         (the_low_target): Use linux_get_pc_32bit and
4110         linux_set_pc_32bit.
4111         * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4112         (the_low_target): Use linux_get_pc_32bit and
4113         linux_set_pc_32bit.
4114         * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4115         (the_low_target): Use linux_get_pc_32bit and
4116         linux_set_pc_32bit.
4118 2016-01-18  Gary Benson  <gbenson@redhat.com>
4120         * configure.ac (AC_FUNC_FORK): New check.
4121         * config.in: Regenerate.
4122         * configure: Likewise.
4124 2016-01-14  Yao Qi  <yao.qi@linaro.org>
4126         * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4127         * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4128         * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4129         arm_get_next_pcs_ctor.
4131 2016-01-12  Josh Stone  <jistone@redhat.com>
4132             Philippe Waroquiers  <philippe.waroquiers@skynet.be>
4134         * inferiors.h: Include "gdb_vecs.h".
4135         (struct process_info): Add syscalls_to_catch.
4136         * inferiors.c (remove_process): Free syscalls_to_catch.
4137         * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4138         syscall_return stops.
4139         * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4140         * server.c (handle_general_set): Handle QCatchSyscalls.
4141         (handle_query): Report support for QCatchSyscalls.
4142         * target.h (struct target_ops): Add supports_catch_syscall.
4143         (target_supports_catch_syscall): New macro.
4144         * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4145         (struct lwp_info): Add syscall_state.
4146         * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4147         Maintain syscall_state and syscalls_to_catch across exec.
4148         (get_syscall_trapinfo): New function, proxy to the_low_target.
4149         (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4150         (linux_low_filter_event): Toggle syscall_state entry/return for
4151         syscall traps, and set it ignored for all others.
4152         (gdb_catching_syscalls_p): New function.
4153         (gdb_catch_this_syscall_p): New function.
4154         (linux_wait_1): Handle SYSCALL_SIGTRAP.
4155         (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4156         (linux_supports_catch_syscall): New function.
4157         (linux_target_ops): Install it.
4158         * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4159         (the_low_target): Install it.
4161 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
4163         * acinclude.m4: Include new ../warning.m4 file.
4164         * configure: Regenerated.
4165         * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4167 2016-01-12  Mike Frysinger  <vapier@gentoo.org>
4169         * ax.c (is_goto_target): Mark static.
4170         * linux-low.c (register_addr): Likewise.
4171         (linux_fetch_registers, linux_store_registers): Likewise.
4172         * mem-break.c (any_persistent_commands): Fix old prototype.
4173         (add_commands_to_breakpoint): Mark static.
4174         * regcache.c (find_register_by_name): Delete unused func.
4175         * remote-utils.c (hex_or_minus_one): Mark static.
4176         * server.c (monitor_show_help): Mark static.
4177         (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4178         handle_v_requests): Likewise.
4180 2016-01-12  Pedro Alves  <palves@redhat.com>
4182         Remove use of the registered trademark symbol throughout.
4184 2016-01-08  Yao Qi  <yao.qi@linaro.org>
4186         * remote-utils.c (getpkt): If c is '\003', call target hook
4187         request_interrupt.
4189 2016-01-06  Yao Qi  <yao.qi@linaro.org>
4191         * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4192         linux-aarch32-low.c.
4193         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4194         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4195         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4196         (thumb2_breakpoint): Declare.
4197         * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4198         linux-aarch32-low.h.
4199         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4200         (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4201         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4203 2016-01-01  Joel Brobecker  <brobecker@adacore.com>
4205         * gdbreplay.c (gdbreplay_version): Change copyright year in
4206         version message.
4207         * server.c (gdbserver_version): Likewise.
4209 2015-12-28  Patrick Palka  <patrick@parcs.ath.cx>
4211         * server.c (crc32_table): Delete.
4212         (crc32): Use libiberty's xcrc32 function.
4214 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
4216         * lynx-low.c (lynx_delete_thread_callback): New function.
4217         (lynx_mourn): Properly delete our process and all of its
4218         threads.  Remove call to clear_inferiors.
4220 2015-12-22  Joel Brobecker  <brobecker@adacore.com>
4222         * target.c (thread_search_callback): Add check that
4223         the thread_stopped target callback is not NULL before
4224         calling it.
4226 2015-12-21  Yao Qi  <yao.qi@linaro.org>
4228         * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4229         arm breakpoint.
4231 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4233         * server.c (handle_query): Call target_supports_software_single_step.
4235 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4237         * linux-low.c (single_step): New function.
4238         (linux_resume_one_lwp_throw): Call single_step.
4239         (start_step_over): Likewise.
4241 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4243         * Makefile.in (SFILES): Append arch/arm-linux.c,
4244         arch/arm-get-next-pcs.c.
4245         (arm-linux.o): New rule.
4246         (arm-get-next-pcs.o): New rule.
4247         * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4248         arm-linux.o.
4249         * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro.  Moved
4250         to linux-aarch32-low.c.
4251         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4252         (arm_breakpoint_len, thumb_breakpoint): Likewise.
4253         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4254         (thumb2_breakpoint_len): Likewise.
4255         (arm_is_thumb_mode): Make non-static.
4256         * linux-aarch32-low.h (arm_abi_breakpoint): New macro.  Moved
4257         from linux-aarch32-low.c.
4258         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4259         (arm_breakpoint_len, thumb_breakpoint): Likewise.
4260         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4261         (thumb2_breakpoint_len): Likewise.
4262         (arm_is_thumb_mode): New declaration.
4263         * linux-arm-low.c: Include arch/arm-linux.h
4264         aarch/arm-get-next-pcs.h, sys/syscall.h.
4265         (get_next_pcs_ops): New struct.
4266         (get_next_pcs_addr_bits_remove): New function.
4267         (get_next_pcs_is_thumb): New function.
4268         (get_next_pcs_read_memory_unsigned_integer): Likewise.
4269         (arm_sigreturn_next_pc): Likewise.
4270         (get_next_pcs_syscall_next_pc): Likewise.
4271         (arm_gdbserver_get_next_pcs): Likewise.
4272         (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4273         Initialize.
4274         * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4275         * server.h: Include gdb_vecs.h.
4277 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4279         * Makefile.in (SFILES): Append common/common-regcache.c.
4280         (OBS): Append common-regcache.o.
4281         (common-regcache.o): New rule.
4282         * regcache.c (init_register_cache): Initialize cache to
4283         REG_UNAVAILABLE.
4284         (regcache_raw_read_unsigned): New function.
4285         * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4286         register_status enum.
4288 2015-12-18  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4290         * linux-aarch64-low.c (the_low_targets): Rename
4291         breakpoint_reinsert_addr to get_next_pcs.
4292         * linux-arm-low.c (the_low_targets): Likewise.
4293         * linux-bfin-low.c (the_low_targets): Likewise.
4294         * linux-cris-low.c (the_low_targets): Likewise.
4295         * linux-crisv32-low.c (the_low_targets): Likewise.
4296         * linux-low.c (can_software_single_step): Likewise.
4297         (install_software_single_step_breakpoints): New function.
4298         (start_step_over): Use install_software_single_step_breakpoints.
4299         * linux-low.h: New CORE_ADDR vector.
4300         (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4301         get_next_pcs.
4302         * linux-mips-low.c (the_low_targets): Likewise.
4303         * linux-nios2-low.c (the_low_targets): Likewise.
4304         * linux-sparc-low.c (the_low_targets): Likewise.
4306 2015-12-17  Pedro Alves  <palves@redhat.com>
4308         * linux-low.c (linux_kill_one_lwp): Remove references to
4309         LinuxThreads.
4310         (kill_lwp): Remove HAVE_TKILL_SYSCALL check.  No longer fall back
4311         to 'kill'.
4312         (linux_init_signals): Delete.
4313         (initialize_low): Adjust.
4314         * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4316 2015-12-16  Pedro Alves  <palves@redhat.com>
4318         * configure.ac (compiler warning flags): When testing a
4319         -Wno-foo option, check whether -Wfoo works instead.
4320         * configure: Regenerate.
4322 2015-12-11  Don Breazeal  <donb@codesourcery.com>
4324         * server.c (process_serial_event): Don't exit from gdbserver
4325         in remote mode if there are still active inferiors.
4327 2015-12-11  Yao Qi  <yao.qi@linaro.org>
4329         * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4330         arm_breakpoint_at if the process is 32-bit.
4332 2015-12-11  Yao Qi  <yao.qi@linaro.org>
4334         * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4335         arm breakpoint.
4337 2015-12-07  Yao Qi  <yao.qi@linaro.org>
4339         * configure.srv: Append arm.o to srv_tgtobj for
4340         aarch64*-*-linux* target.
4341         * linux-aarch32-low.c (arm_abi_breakpoint): New macro.  Moved
4342         from linux-arm-low.c.
4343         (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4344         (arm_breakpoint_len, thumb_breakpoint): Likewise.
4345         (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4346         (thumb2_breakpoint_len): Likewise.
4347         (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4348         (arm_breakpoint_kinds): Likewise.
4349         (arm_breakpoint_kind_from_pc): Likewise.
4350         (arm_sw_breakpoint_from_kind): Likewise.
4351         (arm_breakpoint_kind_from_current_state): Likewise.
4352         * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4353         (arm_sw_breakpoint_from_kind): Declare.
4354         (arm_breakpoint_kind_from_current_state): Declare.
4355         (arm_breakpoint_at): Declare.
4356         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4357         arm_sw_breakpoint_from_kind if process is 32-bit.
4358         (aarch64_breakpoint_kind_from_pc): New function.
4359         (aarch64_breakpoint_kind_from_current_state): New function.
4360         (the_low_target): Initialize fields breakpoint_kind_from_pc
4361         and breakpoint_kind_from_current_state.
4362         * linux-arm-low.c (arm_breakpoint_kinds): Move to
4363         linux-aarch32-low.c.
4364         (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4365         (arm_breakpoint, arm_breakpoint_len): Likewise.
4366         (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4367         (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4368         (arm_is_thumb_mode): Likewise.
4369         (arm_breakpoint_at): Likewise.
4370         (arm_breakpoint_kind_from_pc): Likewise.
4371         (arm_sw_breakpoint_from_kind): Likewise.
4372         (arm_breakpoint_kind_from_current_state): Likewise.
4374         Revert:
4375         2015-08-04  Yao Qi  <yao.qi@linaro.org>
4377         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4378         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4379         * server.c (extended_protocol): Remove "static".
4380         * server.h (extended_protocol): Declare it.
4382 2015-12-04  Josh Stone  <jistone@redhat.com>
4384         * target.h (struct target_ops) <arch_setup>: Rename to ...
4385         (struct target_ops) <post_create_inferior>: ... this.
4386         (target_arch_setup): Rename to ...
4387         (target_post_create_inferior): ... this, calling post_create_inferior.
4388         * server.c (start_inferior): Update target_arch_setup calls to
4389         target_post_create_inferior.
4390         * linux-low.c (linux_low_ptrace_options): Forward declare.
4391         (linux_arch_setup): Update its comment for general use.
4392         (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4393         (struct linux_target_ops): Use linux_post_create_inferior.
4394         * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4395         to post_create_inferior.
4396         * nto-low.c (struct nto_target_ops): Likewise.
4397         * spu-low.c (struct spu_target_ops): Likewise.
4398         * win32-low.c (struct win32_target_ops): Likewise.
4400 2015-12-03  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4402         * linux-arm-low.c: Remove duplicate arch/arm.h include.
4404 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4406         * linux-arm-low.c (arm_reinsert_addr): Remove function.
4407         (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4408         * linux-cris-low.c (cris_reinsert_addr> Remove function.
4409         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4410         * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4411         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4412         * linux-mips-low.c (mips_reinsert_addr): Remove function.
4413         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4414         * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4415         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4416         * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4417         (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4419 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4421         * linux-low.c (linux_look_up_symbols): Don't call
4422         linux_supports_traceclone.
4423         * linux-low.h (thread_db_init): Remove use_events argument.
4424         * thread-db.c (thread_db_use_event): Remove global variable.
4425         (struct thread_db) <td_thr_event_enable_p>: Remove field.
4426         (struct thread_db) <td_create_bp>: Remove field.
4427         (thread_db_create_event): Remove function.
4428         (thread_db_enable_reporting): Likewise.
4429         (find_one_thread): Don't check for thread_db_use_events.
4430         (attach_thread): Likewise.
4431         (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4432         (try_thread_db_load_1): Don't check for thread_db_use_events.
4433         (thread_db_init): Remove use_events argument and thread events
4434         handling.
4435         (remove_thread_event_breakpoints): Remove function.
4436         (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4438 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4440         * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4441         New function.
4442         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4443         * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4444         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4445         * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4446         (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4447         Initialize.
4448         * linux-crisv32-low.c (cris_supports_hardware_single_step):
4449         New function.
4450         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4451         * linux-low.c (can_hardware_single_step): Use
4452         supports_hardware_single_step.
4453         (can_software_single_step): New function.
4454         (start_step_over): Call can_software_single_step.
4455         (linux_supports_hardware_single_step): New function.
4456         (struct target_ops) <supports_software_single_step>: Initialize.
4457         * linux-low.h (struct linux_target_ops)
4458         <supports_hardware_single_step>: Initialize.
4459         * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4460         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4461         * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4462         (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4463         * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4464         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4465         * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4466         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4467         * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4468         (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4469         Initialize.
4470         * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4471         (struct linux_target_ops) <tile_supports_hardware_single_step>:
4472         Initialize.
4473         * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4474         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4475         * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4476         New function.
4477         (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4478         * target.h (struct target_ops): <supports_software_single_step>:
4479         New field.
4480         (target_supports_software_single_step): New macro.
4482 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4484         * linux-low.c (linux_wait_1): Fix pc advance condition.
4485         * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4486         * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4488 2015-11-30  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4490         * linux-arm-low.c (arm_is_thumb_mode): New function.
4491         (arm_breakpoint_at): Use arm_is_thumb_mode.
4492         (arm_breakpoint_kind_from_current_state): New function.
4493         (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4494         Initialize.
4495         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4496         (linux_breakpoint_kind_from_current_state): New function.
4497         (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4498         * linux-low.h (struct linux_target_ops)
4499         <breakpoint_kind_from_current_state>: New field.
4500         * target.h (struct target_ops): Likewise.
4501         (target_breakpoint_kind_from_current_state): New macro.
4503 2015-11-30  Pedro Alves  <palves@redhat.com>
4505         * linux-low.c (linux_resume): Wake up the event loop before
4506         returning.
4508 2015-11-30  Pedro Alves  <palves@redhat.com>
4510         * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4511         check.
4512         (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4513         to -1.
4514         * target.c (struct thread_search): New structure.
4515         (thread_search_callback): New function.
4516         (prev_general_thread): New global.
4517         (prepare_to_access_memory, done_accessing_memory): New functions.
4518         * target.h (prepare_to_access_memory, done_accessing_memory):
4519         Replace macros with function declarations.
4521 2015-11-30  Pedro Alves  <palves@redhat.com>
4523         PR 14618
4524         * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4525         report TARGET_WAITKIND_NO_RESUMED.
4526         * remote-utils.c (prepare_resume_reply): Handle
4527         TARGET_WAITKIND_NO_RESUMED.
4528         * server.c (report_no_resumed): New global.
4529         (handle_query) <qSupported>: Handle "no-resumed+".  Report
4530         "no-resumed+" support.
4531         (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4532         return error if the client doesn't support no-resumed events.
4533         (push_stop_notification): New function.
4534         (handle_target_event): Use it.  Report TARGET_WAITKIND_NO_RESUMED
4535         events if the client supports them.
4537 2015-11-30  Pedro Alves  <palves@redhat.com>
4539         * linux-low.c (thread_still_has_status_pending_p): Don't check
4540         vCont;t here.
4541         (lwp_resumed): New function.
4542         (status_pending_p_callback): Return early if the LWP is not
4543         supposed to be resumed.
4545 2015-11-30  Pedro Alves  <palves@redhat.com>
4547         * linux-low.c (handle_extended_wait): Assert that the LWP's
4548         waitstatus is TARGET_WAITKIND_IGNORE.  If GDB wants to hear about
4549         thread create events, leave the new child's status pending.
4550         (linux_low_filter_event): If GDB wants to hear about thread exit
4551         events, leave the LWP marked dead and don't delete it.
4552         (linux_wait_for_event_filtered): Don't check for thread exit.
4553         (filter_exit_event): New function.
4554         (linux_wait_1): Use it, when returning an exit event.
4555         (linux_resume_one_lwp_throw): Assert that the LWP's
4556         waitstatus is TARGET_WAITKIND_IGNORE.
4557         * remote-utils.c (prepare_resume_reply): Handle
4558         TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4559         * server.c (report_thread_events): New global.
4560         (handle_general_set): Handle QThreadEvents.
4561         (handle_query) <qSupported>: Handle and report QThreadEvents+;
4562         (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4563         TARGET_WAITKIND_THREAD_EXITED.
4564         * server.h (report_thread_events): Declare.
4566 2015-11-30  Pedro Alves  <palves@redhat.com>
4568         * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4569         the thread's last_resume_kind was resume_stop.
4571 2015-11-30  Pedro Alves  <palves@redhat.com>
4573         * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4574         before returning.
4576 2015-11-30  Pedro Alves  <palves@redhat.com>
4578         * server.c (handle_v_requests): Handle vCtrlC.
4580 2015-11-30  Pedro Alves  <palves@redhat.com>
4582         * gdbthread.h (find_any_thread_of_pid): Declare.
4583         * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4584         functions.
4585         * server.c (handle_query): If current_thread is NULL, look for
4586         another thread of the selected process.
4588 2015-11-26  Daniel Colascione  <dancol@dancol.org>
4589             Simon Marchi  <simon.marchi@ericsson.com>
4591         * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4592         * server.c (handle_qxfer_threads_worker): Refactor to include thread
4593         name in reply.
4594         * target.h (struct target_ops) <thread_name>: New field.
4595         (target_thread_name): New macro.
4597 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
4599         * regcache.h (regcache_invalidate_pid): Add declaration.
4600         * regcache.c (regcache_invalidate_pid): New function, extracted
4601         from regcache_invalidate.
4602         (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4603         Add trivial documentation comment.
4604         * lynx-low.c: Use regcache_invalidate_pid instead of
4605         regcache_invalidate.
4607 2015-11-23  Joel Brobecker  <brobecker@adacore.com>
4609         * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4610         and Elf64_auxv_t if the target is Android.
4612 2015-11-22  Doug Evans  <xdje42@gmail.com>
4614         * target.h: #include <sys/types.h>.
4616 2015-11-19  Pedro Alves  <palves@redhat.com>
4618         * linux-low.c (linux_process_qsupported): Change prototype.
4619         Adjust.
4620         * linux-low.h (struct linux_target_ops) <process_qsupported>:
4621         Change prototype.
4622         * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4623         and adjust to loop over all features.
4624         * server.c (handle_query) <qSupported>: Adjust to call
4625         target_process_qsupported once, passing it a vector of unprocessed
4626         features.
4627         * target.h (struct target_ops) <process_qsupported>: Change
4628         prototype.
4629         (target_process_qsupported): Adjust.
4631 2015-11-19  Pedro Alves  <palves@redhat.com>
4633         * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4634         mode.
4635         * configure: Regenerate.
4637 2015-11-19  Pedro Alves  <palves@redhat.com>
4639         * configure: Regenerate.
4641 2015-11-19  Yao Qi  <yao.qi@linaro.org>
4643         * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4644         type to uint32_t.
4646 2015-11-19  Yao Qi  <yao.qi@linaro.org>
4648         * linux-aarch64-low.c (enum aarch64_operand_type): New.
4649         (struct aarch64_operand): Move enum out.
4651 2015-11-19  Yao Qi  <yao.qi@linaro.org>
4653         * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4654         struct user_fpsimd_state *.
4655         (aarch64_store_fpregset): Likewise.
4657 2015-11-19  Yao Qi  <yao.qi@linaro.org>
4659         * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4660         struct user_pt_regs *.
4661         (aarch64_store_gregset): Likewise.
4663 2015-11-18  Pedro Alves  <palves@redhat.com>
4665         * Makefile.in (all_object_files): Add $IPA_OBJS.
4667 2015-11-17  Pedro Alves  <palves@redhat.com>
4669         * win32-low.c (win32_resume): Use gdb_signal_from_host,
4670         GDB_SIGNAL_0 and gdb_signal_to_string.
4672 2015-11-17  Pedro Alves  <palves@redhat.com>
4674         * win32-low.c (handle_output_debug_string): Remove parameter.
4675         (win32_kill): Remove our_status local and adjust call to
4676         handle_output_debug_string.
4677         (get_child_debug_event): Adjust call to
4678         handle_output_debug_string.
4680 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
4682         * linux-mips-low.c (mips_fill_gregset): Add cast.
4683         (mips_store_gregset): Likewise.
4684         (mips_fill_fpregset): Likewise.
4685         (mips_store_fpregset): Likewise.
4687 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
4689         * linux-mips-low.c (mips_add_watchpoint): Rename private to
4690         priv.
4692 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
4694         * linux-mips-low.c (mips_linux_new_thread): Change type of
4695         watch_type to enum target_hw_bp_type.
4697 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
4699                 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4700                 Change return type to arm_hwbp_type.
4702 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
4704         * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4705         (arm_store_gregset): Likewise.
4706         * linux-arm-low.c (arm_get_hwcap): Likewise.
4707         (arm_read_description): Likewise.
4709 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
4711         * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4713 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
4715         * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4716         (ppc_fill_vsxregset): Likewise.
4717         (ppc_store_vsxregset): Likewise.
4718         (ppc_fill_vrregset): Likewise.
4719         (ppc_store_vrregset): Likewise.
4720         (ppc_fill_evrregset): Likewise.
4721         (ppc_store_evrregset): Likewise.
4723 2015-11-03  Simon Marchi  <simon.marchi@polymtl.ca>
4725         * linux-ppc-low.c (ppc_usrregs_info): Remove
4726         forward-declaration.
4727         (ppc_arch_setup): Move lower in file.
4729 2015-10-30  Simon Marchi  <simon.marchi@ericsson.com>
4731         * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4732         (ps_pdwrite): Likewise.
4734 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4736         * linux-arm-low.c (arm_new_thread): Move pointer dereference
4737         to after assert checks.
4739 2015-10-29  Simon Marchi  <simon.marchi@ericsson.com>
4741         * proc-service.c (ps_pdread): Add/adjust casts.
4742         (ps_pdwrite): Add/adjust casts.
4744 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
4746         * server.c (handle_search_memory_1): Cast return value of
4747         memmem.
4749 2015-10-29  Simon Marchi  <simon.marchi@polymtl.ca>
4751         * server.c (write_qxfer_response): Change type of data to
4752         gdb_byte *.
4754 2015-10-29  Pedro Alves  <palves@redhat.com>
4756         * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4758 2015-10-29  Pedro Alves  <palves@redhat.com>
4760         * tracepoint.c (clear_installed_tracepoints): Add casts.
4762 2015-10-29  Pedro Alves  <palves@redhat.com>
4764         * server.c (handle_v_cont, process_serial_event): Add enum
4765         gdb_signal casts to signal parsing code.
4767 2015-10-29  Pedro Alves  <palves@redhat.com>
4769         * linux-low.h (NULL_REGSET): Define.
4770         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4771         * linux-arm-low.c (arm_regsets): Likewise.
4772         * linux-crisv32-low.c (cris_regsets): Likewise.
4773         * linux-m68k-low.c (m68k_regsets): Likewise.
4774         * linux-mips-low.c (mips_regsets): Likewise.
4775         * linux-nios2-low.c (nios2_regsets): Likewise.
4776         * linux-ppc-low.c (ppc_regsets): Likewise.
4777         * linux-s390-low.c (s390_regsets): Likewise.
4778         * linux-sh-low.c (sh_regsets): Likewise.
4779         * linux-sparc-low.c (sparc_regsets): Likewise.
4780         * linux-tic6x-low.c (tic6x_regsets): Likewise.
4781         * linux-tile-low.c (tile_regsets): Likewise.
4782         * linux-x86-low.c (x86_regsets): Likewise.
4783         * linux-xtensa-low.c (xtensa_regsets): Likewise.
4785 2015-10-29  Pedro Alves  <palves@redhat.com>
4787         * linux-low.h (NULL_REGSET): Define.
4788         * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4789         * linux-arm-low.c (arm_regsets): Likewise.
4790         * linux-crisv32-low.c (cris_regsets): Likewise.
4791         * linux-m68k-low.c (m68k_regsets): Likewise.
4792         * linux-mips-low.c (mips_regsets): Likewise.
4793         * linux-nios2-low.c (nios2_regsets): Likewise.
4794         * linux-ppc-low.c (ppc_regsets): Likewise.
4795         * linux-s390-low.c (s390_regsets): Likewise.
4796         * linux-sh-low.c (sh_regsets): Likewise.
4797         * linux-sparc-low.c (sparc_regsets): Likewise.
4798         * linux-tic6x-low.c (tic6x_regsets): Likewise.
4799         * linux-tile-low.c (tile_regsets): Likewise.
4800         * linux-x86-low.c (x86_regsets): Likewise.
4801         * linux-xtensa-low.c (xtensa_regsets): Likewise.
4803 2015-10-26  Doug Evans  <dje@google.com>
4805         * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4807 2015-10-26  Doug Evans  <dje@google.com>
4809         * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4811 2015-10-26  Doug Evans  <dje@google.com>
4813         * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4814         for debug_printf.
4815         (attach_thread, find_new_threads_callback): Ditto.
4817 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4819         * mem-break.h (set_breakpoint_data): Remove.
4821 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4823         * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4824         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4825         (initialize_low): Remove set_breakpoint_data call.
4826         * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4827         (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4828         (initialize_low): Remove set_breakpoint_data call.
4829         * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4830         (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4831         (initialize_low): Remove set_breakpoint_data call.
4833 2015-10-23  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4835         * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4836         * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4837         * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4838         * target.h (target_breakpoint_kind_from_pc): New macro.
4840 2015-10-22  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4842         * linux-low.c (default_breakpoint_kind_from_pc): New function.
4843         (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4844         the default breakpoint kind.
4846 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4848         * linux-arm-low.c (arm_supports_z_point_type): Add software
4849         breakpoint support.
4851 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4853         * linux-arm-low.c: Refactor breakpoint definitions.
4854         (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4855         (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4857 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4859         * Makefile.in: Add arm.c/o.
4860         * configure.srv: Likewise.
4861         * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4862         (arm_breakpoint_kind_from_pc): New function.
4863         (arm_sw_breakpoint_from_kind): Return proper kind.
4864         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4866 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4868         * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4869         removal.
4870         * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4871         (struct raw_breakpoint) <size>: Remove.
4872         (struct raw_breakpoint) <kind>: Add.
4873         (bp_size): New function.
4874         (bp_opcode): Likewise.
4875         (find_raw_breakpoint_at): Adjust for kind.
4876         (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4877         (remove_memory_breakpoint): Adjust for kind call bp_size.
4878         (set_raw_breakpoint_at): Adjust for kind.
4879         (set_breakpoint): Likewise.
4880         (set_breakpoint_at): Call breakpoint_kind_from_pc.
4881         (delete_raw_breakpoint): Adjust for kind.
4882         (delete_breakpoint): Likewise.
4883         (find_gdb_breakpoint): Likewise.
4884         (set_gdb_breakpoint_1): Likewise.
4885         (set_gdb_breakpoint): Likewise.
4886         (delete_gdb_breakpoint_1): Likewise.
4887         (delete_gdb_breakpoint): Likewise.
4888         (uninsert_raw_breakpoint): Likewise.
4889         (reinsert_raw_breakpoint): Likewise.
4890         (set_breakpoint_data): Remove.
4891         (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4892         (check_mem_read): Adjust for kind call bp_size.
4893         (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4894         (clone_one_breakpoint): Adjust for kind.
4895         * mem-break.h (set_gdb_breakpoint): Likewise.
4896         (delete_gdb_breakpoint): Likewise.
4897         * server.c (process_serial_event): Likewise.
4899 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4901         * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4902         (struct linux_target_ops) <breakpoint>: Remove.
4903         (struct linux_target_ops) <breakpoint_len>: Remove.
4904         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4905         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4906         * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4907         (arm_sw_breakpoint_from_kind): New function.
4908         * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4909         (struct linux_target_ops) <breakpoint>: Remove.
4910         (struct linux_target_ops) <breakpoint_len>: Remove.
4911         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4912         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4913         * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4914         (struct linux_target_ops) <breakpoint>: Remove.
4915         (struct linux_target_ops) <breakpoint_len>: Remove.
4916         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4917         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4918         * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4919         (struct linux_target_ops) <breakpoint>: Remove.
4920         (struct linux_target_ops) <breakpoint_len>: Remove.
4921         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4922         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4923         * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4924         and sw_breakpoint_from_kind to increment the pc.
4925         (linux_breakpoint_kind_from_pc): New function.
4926         (linux_sw_breakpoint_from_kind): New function.
4927         (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4928         (initialize_low): Call breakpoint_kind_from_pc and
4929         sw_breakpoint_from_kind to replace breakpoint_data/len.
4930         * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4931         New field.
4932         (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4933         * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4934         (struct linux_target_ops) <breakpoint>: Remove.
4935         (struct linux_target_ops) <breakpoint_len>: Remove.
4936         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4937         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4938         * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4939         (struct linux_target_ops) <breakpoint>: Remove.
4940         (struct linux_target_ops) <breakpoint_len>: Remove.
4941         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4942         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4943         * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4944         (struct linux_target_ops) <breakpoint>: Remove.
4945         (struct linux_target_ops) <breakpoint_len>: Remove.
4946         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4947         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4948         * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4949         (struct linux_target_ops) <breakpoint>: Remove.
4950         (struct linux_target_ops) <breakpoint_len>: Remove.
4951         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4952         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4953         * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4954         (struct linux_target_ops) <breakpoint>: Remove.
4955         (struct linux_target_ops) <breakpoint_len>: Remove.
4956         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4957         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4958         * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4959         (struct linux_target_ops) <breakpoint>: Remove.
4960         (struct linux_target_ops) <breakpoint_len>: Remove.
4961         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4962         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4963         * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4964         (struct linux_target_ops) <breakpoint>: Remove.
4965         (struct linux_target_ops) <breakpoint_len>: Remove.
4966         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4967         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4968         * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4969         (struct linux_target_ops) <breakpoint>: Remove.
4970         (struct linux_target_ops) <breakpoint_len>: Remove.
4971         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4972         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4973         * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4974         (struct linux_target_ops) <breakpoint>: Remove.
4975         (struct linux_target_ops) <breakpoint_len>: Remove.
4976         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4977         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4978         * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4979         * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4980         (struct linux_target_ops) <breakpoint>: Remove.
4981         (struct linux_target_ops) <breakpoint_len>: Remove.
4982         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4983         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4984         * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4985         (struct linux_target_ops) <breakpoint>: Remove.
4986         (struct linux_target_ops) <breakpoint_len>: Remove.
4987         (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4988         (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4990 2015-10-21  Antoine Tremblay  <antoine.tremblay@ericsson.com>
4992         * linux-cris-low.c (cris_get_pc): Remove void arg.
4994 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
4996         * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4997         variable name.
4999 2015-10-16  Aleksandar Ristovski  <aristovski@qnx.com>
5001         * inferiors.c (thread_pid_matches_callback): New function.
5002         (find_thread_process): New function.
5003         (remove_thread): Reset current_thread.
5004         (remove_process): Assert threads have been removed first.
5006 2015-10-15  Yao Qi  <yao.qi@linaro.org>
5008         * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
5009         if it is 3.
5010         (aarch64_remove_point): Likewise.
5011         * regcache.c (regcache_register_size): New function.
5013 2015-10-12  Yao Qi  <yao.qi@linaro.org>
5015         * linux-aarch64-low.c: Update all callers as emit_load_store
5016         is renamed to aarch64_emit_load_store.
5018 2015-10-12  Yao Qi  <yao.qi@linaro.org>
5020         * linux-aarch64-low.c: Update all callers of function renaming
5021         from emit_insn to aarch64_emit_insn.
5023 2015-10-12  Yao Qi  <yao.qi@linaro.org>
5025         * linux-aarch64-low.c (enum aarch64_opcodes): Move to
5026         arch/aarch64-insn.h.
5027         (struct aarch64_memory_operand): Likewise.
5028         (ENCODE): Likewise.
5029         (emit_insn): Move to arch/aarch64-insn.c.
5030         (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
5031         (emit_load_store): Move to arch/aarch64-insn.c.
5032         (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
5033         (can_encode_int32): Remove.
5035 2015-10-12  Yao Qi  <yao.qi@linaro.org>
5037         * linux-aarch64-low.c (extract_signed_bitfield): Remove.
5038         (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5039         (aarch64_relocate_instruction): Likewise.
5040         (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
5041         (struct aarch64_insn_visitor): Likewise.
5043 2015-10-12  Yao Qi  <yao.qi@linaro.org>
5045         * linux-aarch64-low.c (struct aarch64_insn_data): New.
5046         (struct aarch64_insn_visitor): New.
5047         (struct aarch64_insn_relocation_data): New.
5048         (aarch64_ftrace_insn_reloc_b): New function.
5049         (aarch64_ftrace_insn_reloc_b_cond): Likewise.
5050         (aarch64_ftrace_insn_reloc_cb): Likewise.
5051         (aarch64_ftrace_insn_reloc_tb): Likewise.
5052         (aarch64_ftrace_insn_reloc_adr): Likewise.
5053         (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
5054         (aarch64_ftrace_insn_reloc_others): Likewise.
5055         (visitor): New.
5056         (aarch64_relocate_instruction): Use visitor.
5058 2015-10-12  Yao Qi  <yao.qi@linaro.org>
5060         * linux-aarch64-low.c (aarch64_relocate_instruction): Return
5061         int.  Add argument buf.
5062         (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
5063         aarch64_relocate_instruction.
5065 2015-10-12  Yao Qi  <yao.qi@linaro.org>
5067         * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5068         argument insn.  Remove local variable insn.  Don't call
5069         target_read_uint32.
5070         (aarch64_install_fast_tracepoint_jump_pad): Call
5071         target_read_uint32.
5073 2015-09-30  Yao Qi  <yao.qi@linaro.org>
5075         * linux-aarch64-low.c (emit_movk): Shorten a long line.
5076         (emit_load_store_pair): Likewise.
5078 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
5080         * dll.c (match_dll): Add cast(s).
5081         (unloaded_dll): Likewise.
5082         * linux-low.c (second_thread_of_pid_p): Likewise.
5083         (delete_lwp_callback): Likewise.
5084         (count_events_callback): Likewise.
5085         (select_event_lwp_callback): Likewise.
5086         (linux_set_resume_request): Likewise.
5087         * server.c (accumulate_file_name_length): Likewise.
5088         (emit_dll_description): Likewise.
5089         (handle_qxfer_threads_worker): Likewise.
5090         (visit_actioned_threads): Likewise.
5091         * thread-db.c (any_thread_of): Likewise.
5092         * tracepoint.c (same_process_p): Likewise.
5093         (match_blocktype): Likewise.
5094         (build_traceframe_info_xml): Likewise.
5096 2015-09-25  Simon Marchi  <simon.marchi@ericsson.com>
5098         * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5099         assignment.
5100         (gdb_unparse_agent_expr): Likewise.
5101         * hostio.c (require_data): Likewise.
5102         (handle_pread): Likewise.
5103         * linux-low.c (disable_regset): Likewise.
5104         (fetch_register): Likewise.
5105         (store_register): Likewise.
5106         (get_dynamic): Likewise.
5107         (linux_qxfer_libraries_svr4): Likewise.
5108         * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5109         (set_fast_tracepoint_jump): Likewise.
5110         (uninsert_fast_tracepoint_jumps_at): Likewise.
5111         (reinsert_fast_tracepoint_jumps_at): Likewise.
5112         (validate_inserted_breakpoint): Likewise.
5113         (clone_agent_expr): Likewise.
5114         * regcache.c (init_register_cache): Likewise.
5115         * remote-utils.c (putpkt_binary_1): Likewise.
5116         (decode_M_packet): Likewise.
5117         (decode_X_packet): Likewise.
5118         (look_up_one_symbol): Likewise.
5119         (relocate_instruction): Likewise.
5120         (monitor_output): Likewise.
5121         * server.c (handle_search_memory): Likewise.
5122         (handle_qxfer_exec_file): Likewise.
5123         (handle_qxfer_libraries): Likewise.
5124         (handle_qxfer): Likewise.
5125         (handle_query): Likewise.
5126         (handle_v_cont): Likewise.
5127         (handle_v_run): Likewise.
5128         (captured_main): Likewise.
5129         * target.c (write_inferior_memory): Likewise.
5130         * thread-db.c (try_thread_db_load_from_dir): Likewise.
5131         * tracepoint.c (init_trace_buffer): Likewise.
5132         (add_tracepoint_action): Likewise.
5133         (add_traceframe): Likewise.
5134         (add_traceframe_block): Likewise.
5135         (cmd_qtdpsrc): Likewise.
5136         (cmd_qtdv): Likewise.
5137         (cmd_qtstatus): Likewise.
5138         (response_source): Likewise.
5139         (response_tsv): Likewise.
5140         (cmd_qtnotes): Likewise.
5141         (gdb_collect): Likewise.
5142         (initialize_tracepoint): Likewise.
5144 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
5146         * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5147         (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5148         <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5149         <NOP>: New.
5150         (enum aarch64_condition_codes): New enum.
5151         (w0): New static global.
5152         (fp): Likewise.
5153         (lr): Likewise.
5154         (struct aarch64_memory_operand) <type>: New
5155         MEMORY_OPERAND_POSTINDEX type.
5156         (postindex_memory_operand): New helper function.
5157         (emit_ret): New function.
5158         (emit_load_store_pair): New function, factored out of emit_stp
5159         with support for MEMORY_OPERAND_POSTINDEX.
5160         (emit_stp): Rewrite using emit_load_store_pair.
5161         (emit_ldp): New function.
5162         (emit_load_store): Likewise.
5163         (emit_ldr): Mention post-index instruction in comment.
5164         (emit_ldrh): New function.
5165         (emit_ldrb): New function.
5166         (emit_ldrsw): Mention post-index instruction in comment.
5167         (emit_str): Likewise.
5168         (emit_subs): New function.
5169         (emit_cmp): Likewise.
5170         (emit_and): Likewise.
5171         (emit_orr): Likewise.
5172         (emit_orn): Likewise.
5173         (emit_eor): Likewise.
5174         (emit_mvn): Likewise.
5175         (emit_lslv): Likewise.
5176         (emit_lsrv): Likewise.
5177         (emit_asrv): Likewise.
5178         (emit_mul): Likewise.
5179         (emit_sbfm): Likewise.
5180         (emit_sbfx): Likewise.
5181         (emit_ubfm): Likewise.
5182         (emit_ubfx): Likewise.
5183         (emit_csinc): Likewise.
5184         (emit_cset): Likewise.
5185         (emit_nop): Likewise.
5186         (emit_ops_insns): New helper function.
5187         (emit_pop): Likewise.
5188         (emit_push): Likewise.
5189         (aarch64_emit_prologue): New function.
5190         (aarch64_emit_epilogue): Likewise.
5191         (aarch64_emit_add): Likewise.
5192         (aarch64_emit_sub): Likewise.
5193         (aarch64_emit_mul): Likewise.
5194         (aarch64_emit_lsh): Likewise.
5195         (aarch64_emit_rsh_signed): Likewise.
5196         (aarch64_emit_rsh_unsigned): Likewise.
5197         (aarch64_emit_ext): Likewise.
5198         (aarch64_emit_log_not): Likewise.
5199         (aarch64_emit_bit_and): Likewise.
5200         (aarch64_emit_bit_or): Likewise.
5201         (aarch64_emit_bit_xor): Likewise.
5202         (aarch64_emit_bit_not): Likewise.
5203         (aarch64_emit_equal): Likewise.
5204         (aarch64_emit_less_signed): Likewise.
5205         (aarch64_emit_less_unsigned): Likewise.
5206         (aarch64_emit_ref): Likewise.
5207         (aarch64_emit_if_goto): Likewise.
5208         (aarch64_emit_goto): Likewise.
5209         (aarch64_write_goto_address): Likewise.
5210         (aarch64_emit_const): Likewise.
5211         (aarch64_emit_call): Likewise.
5212         (aarch64_emit_reg): Likewise.
5213         (aarch64_emit_pop): Likewise.
5214         (aarch64_emit_stack_flush): Likewise.
5215         (aarch64_emit_zero_ext): Likewise.
5216         (aarch64_emit_swap): Likewise.
5217         (aarch64_emit_stack_adjust): Likewise.
5218         (aarch64_emit_int_call_1): Likewise.
5219         (aarch64_emit_void_call_2): Likewise.
5220         (aarch64_emit_eq_goto): Likewise.
5221         (aarch64_emit_ne_goto): Likewise.
5222         (aarch64_emit_lt_goto): Likewise.
5223         (aarch64_emit_le_goto): Likewise.
5224         (aarch64_emit_gt_goto): Likewise.
5225         (aarch64_emit_ge_got): Likewise.
5226         (aarch64_emit_ops_impl): New static global variable.
5227         (aarch64_emit_ops): New target function, return
5228         &aarch64_emit_ops_impl.
5229         (struct linux_target_ops): Install it.
5231 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
5233         * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5234         * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5235         aarch64-ipa.o.
5236         * linux-aarch64-ipa.c: New file.
5237         * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5238         and endian.h.
5239         (aarch64_get_thread_area): New target method.
5240         (extract_signed_bitfield): New helper function.
5241         (aarch64_decode_ldr_literal): New function.
5242         (enum aarch64_opcodes): New enum.
5243         (struct aarch64_register): New struct.
5244         (struct aarch64_operand): New struct.
5245         (x0): New static global.
5246         (x1): Likewise.
5247         (x2): Likewise.
5248         (x3): Likewise.
5249         (x4): Likewise.
5250         (w2): Likewise.
5251         (ip0): Likewise.
5252         (sp): Likewise.
5253         (xzr): Likewise.
5254         (aarch64_register): New helper function.
5255         (register_operand): Likewise.
5256         (immediate_operand): Likewise.
5257         (struct aarch64_memory_operand): New struct.
5258         (offset_memory_operand): New helper function.
5259         (preindex_memory_operand): Likewise.
5260         (enum aarch64_system_control_registers): New enum.
5261         (ENCODE): New macro.
5262         (emit_insn): New helper function.
5263         (emit_b): New function.
5264         (emit_bcond): Likewise.
5265         (emit_cb): Likewise.
5266         (emit_tb): Likewise.
5267         (emit_blr): Likewise.
5268         (emit_stp): Likewise.
5269         (emit_ldp_q_offset): Likewise.
5270         (emit_stp_q_offset): Likewise.
5271         (emit_load_store): Likewise.
5272         (emit_ldr): Likewise.
5273         (emit_ldrsw): Likewise.
5274         (emit_str): Likewise.
5275         (emit_ldaxr): Likewise.
5276         (emit_stxr): Likewise.
5277         (emit_stlr): Likewise.
5278         (emit_data_processing_reg): Likewise.
5279         (emit_data_processing): Likewise.
5280         (emit_add): Likewise.
5281         (emit_sub): Likewise.
5282         (emit_mov): Likewise.
5283         (emit_movk): Likewise.
5284         (emit_mov_addr): Likewise.
5285         (emit_mrs): Likewise.
5286         (emit_msr): Likewise.
5287         (emit_sevl): Likewise.
5288         (emit_wfe): Likewise.
5289         (append_insns): Likewise.
5290         (can_encode_int32_in): New helper function.
5291         (aarch64_relocate_instruction): New function.
5292         (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5293         (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5294         (struct linux_target_ops): Install aarch64_get_thread_area,
5295         aarch64_install_fast_tracepoint_jump_pad and
5296         aarch64_get_min_fast_tracepoint_insn_len.
5298 2015-09-21  Pierre Langlois  <pierre.langlois@arm.com>
5300         * Makefile.in (aarch64-insn.o): New rule.
5301         * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5303 2015-09-21  Yao Qi  <yao.qi@linaro.org>
5305         * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5307 2015-09-21  Yao Qi  <yao.qi@linaro.org>
5309         * tracepoint.c (max_jump_pad_size): Remove.
5311 2015-09-18  Yao Qi  <yao.qi@linaro.org>
5313         * linux-aarch64-low.c: Don't include sys/uio.h.
5314         (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5316 2015-09-16  Wei-cheng Wang  <cole945@gmail.com>
5318         * tracepoint.c (eval_result_type): Change prototype.
5319         (condition_true_at_tracepoint): Fix argument to compiled_cond.
5321 2015-09-15  Pedro Alves  <palves@redhat.com>
5323         * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5324         Check whether to report exec events instead of checking whether
5325         multiprocess is enabled.
5327 2015-09-15  Pedro Alves  <palves@redhat.com>
5329         PR remote/18965
5330         * remote-utils.c (prepare_resume_reply): Merge
5331         TARGET_WAITKIND_VFORK_DONE switch case with the
5332         TARGET_WAITKIND_FORKED case.
5334 2015-09-15  Yao Qi  <yao.qi@linaro.org>
5336         * server.c (handle_query): Check string comparison using
5337         "else if" instead of "if".
5339 2015-09-15  Yao Qi  <yao.qi@linaro.org>
5341         * server.c (vCont_supported): New global variable.
5342         (handle_query): Set vCont_supported to 1 if "vContSupported+"
5343         matches.  Append ";vContSupported+" to own_buf.
5344         (handle_v_requests): Append ";s;S" to own_buf if target supports
5345         hardware single step or vCont_supported is false.
5346         (capture_main): Set vCont_supported to zero.
5348 2015-09-15  Yao Qi  <yao.qi@linaro.org>
5350         * linux-low.c (linux_supports_conditional_breakpoints): Rename
5351         it to ...
5352         (linux_supports_hardware_single_step): ... New function.
5353         (linux_target_ops): Update.
5354         * lynx-low.c (lynx_target_ops): Set field
5355         supports_hardware_single_step to target_can_do_hardware_single_step.
5356         * nto-low.c (nto_target_ops): Likewise.
5357         * spu-low.c (spu_target_ops): Likewise.
5358         * win32-low.c (win32_target_ops): Likewise.
5359         * target.c (target_can_do_hardware_single_step): New function.
5360         * target.h (struct target_ops) <supports_conditional_breakpoints>:
5361         Remove.  <supports_hardware_single_step>: New field.
5362         (target_supports_conditional_breakpoints): Remove.
5363         (target_supports_hardware_single_step): New macro.
5364         (target_can_do_hardware_single_step): Declare.
5365         * server.c (handle_query): Use target_supports_hardware_single_step
5366         instead of target_supports_conditional_breakpoints.
5368 2015-09-15  Yao Qi  <yao.qi@linaro.org>
5370         * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5371         function.
5372         (struct linux_target_ops the_low_target): Install
5373         aarch64_linux_siginfo_fixup.
5375 2015-09-11  Don Breazeal  <donb@codesourcery.com>
5376             Luis Machado  <lgustavo@codesourcery.com>
5378         * linux-low.c (linux_mourn): Static declaration.
5379         (linux_arch_setup): Move in front of
5380         handle_extended_wait.
5381         (linux_arch_setup_thread): New function.
5382         (handle_extended_wait): Handle exec events.  Call
5383         linux_arch_setup_thread.  Make event_lwp argument a
5384         pointer-to-a-pointer.
5385         (check_zombie_leaders): Do not check stopped threads.
5386         (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5387         (linux_low_filter_event): Add lwp and thread for exec'ing
5388         non-leader thread if leader thread has been deleted.
5389         Refactor code into linux_arch_setup_thread and call it.
5390         Pass child lwp pointer by reference to handle_extended_wait.
5391         (linux_wait_for_event_filtered): Update comment.
5392         (linux_wait_1): Prevent clobbering exec event status.
5393         (linux_supports_exec_events): New function.
5394         (linux_target_ops) <supports_exec_events>: Initialize new member.
5395         * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5396         new member.
5397         * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5398         * server.c (report_exec_events): New global variable.
5399         (handle_query): Handle qSupported query for exec-events feature.
5400         (captured_main): Initialize report_exec_events.
5401         * server.h (report_exec_events): Declare new global variable.
5402         * target.h (struct target_ops) <supports_exec_events>: New
5403         member.
5404         (target_supports_exec_events): New macro.
5405         * win32-low.c (win32_target_ops) <supports_exec_events>:
5406         Initialize new member.
5408 2015-09-09  Markus Metzger  <markus.t.metzger@intel.com>
5410         * linux-low.c (linux_low_enable_btrace): Remove.
5411         (linux_target_ops): Replace linux_low_enable_btrace with
5412         linux_enable_btrace.
5414 2015-09-03  Yao Qi  <yao.qi@linaro.org>
5416         * linux-aarch64-low.c (aarch64_insert_point): Call
5417         aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5418         returns true.
5420 2015-08-27  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5422         * linux-low.c (check_stopped_by_breakpoint): Use
5423         GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5425 2015-08-27  Pedro Alves  <palves@redhat.com>
5427         * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5429 2015-08-26  Simon Marchi  <simon.marchi@ericsson.com>
5431         * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5432         the XNEW-family equivalent.
5433         (compile_bytecodes): Likewise.
5434         * dll.c (loaded_dll): Likewise.
5435         * event-loop.c (append_callback_event): Likewise.
5436         (create_file_handler): Likewise.
5437         (create_file_event): Likewise.
5438         * hostio.c (handle_open): Likewise.
5439         * inferiors.c (add_thread): Likewise.
5440         (add_process): Likewise.
5441         * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5442         * linux-arm-low.c (arm_new_process): Likewise.
5443         (arm_new_thread): Likewise.
5444         * linux-low.c (add_to_pid_list): Likewise.
5445         (linux_add_process): Likewise.
5446         (handle_extended_wait): Likewise.
5447         (add_lwp): Likewise.
5448         (enqueue_one_deferred_signal): Likewise.
5449         (enqueue_pending_signal): Likewise.
5450         (linux_resume_one_lwp_throw): Likewise.
5451         (linux_resume_one_thread): Likewise.
5452         (linux_read_memory): Likewise.
5453         (linux_write_memory): Likewise.
5454         * linux-mips-low.c (mips_linux_new_process): Likewise.
5455         (mips_linux_new_thread): Likewise.
5456         (mips_add_watchpoint): Likewise.
5457         * linux-x86-low.c (initialize_low_arch): Likewise.
5458         * lynx-low.c (lynx_add_process): Likewise.
5459         * mem-break.c (set_raw_breakpoint_at): Likewise.
5460         (set_breakpoint): Likewise.
5461         (add_condition_to_breakpoint): Likewise.
5462         (add_commands_to_breakpoint): Likewise.
5463         (clone_agent_expr): Likewise.
5464         (clone_one_breakpoint): Likewise.
5465         * regcache.c (new_register_cache): Likewise.
5466         * remote-utils.c (look_up_one_symbol): Likewise.
5467         * server.c (queue_stop_reply): Likewise.
5468         (start_inferior): Likewise.
5469         (queue_stop_reply_callback): Likewise.
5470         (handle_target_event): Likewise.
5471         * spu-low.c (fetch_ppc_memory): Likewise.
5472         (store_ppc_memory): Likewise.
5473         * target.c (set_target_ops): Likewise.
5474         * thread-db.c (thread_db_load_search): Likewise.
5475         (try_thread_db_load_1): Likewise.
5476         * tracepoint.c (add_tracepoint): Likewise.
5477         (add_tracepoint_action): Likewise.
5478         (create_trace_state_variable): Likewise.
5479         (cmd_qtdpsrc): Likewise.
5480         (cmd_qtro): Likewise.
5481         (add_while_stepping_state): Likewise.
5482         * win32-low.c (child_add_thread): Likewise.
5483         (get_image_name): Likewise.
5485 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5487         * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5489 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5491         * Makefile.in (aarch64-linux.o): New rule.
5492         * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5493         srv_tgtobj.
5494         * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5495         (aarch64_init_debug_reg_state): Make it extern.
5496         (aarch64_linux_prepare_to_resume): Remove.
5498 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5500         * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5501         lwp_arch_private_info and ptid_of_lwp.
5503 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5505         * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5506         Find proc_info by find_process_pid.  All callers updated.
5508 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5510         * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5511         Remove.
5512         (debug_reg_change_callback): Remove.
5513         (aarch64_notify_debug_reg_change): Remove.
5515 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5517         * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5518         Call current_lwp_ptid.
5520 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5522         * linux-aarch64-low.c (debug_reg_change_callback): Use
5523         debug_printf.
5525 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5527         * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5529 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5531         * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5533 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5535         * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5536         the code.
5538 2015-08-25  Yao Qi  <yao.qi@linaro.org>
5540         * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5541         Remove.
5542         (debug_reg_change_callback): Remove argument entry and add argument
5543         lwp.  Remove local variable thread.  Don't print thread id in the
5544         debugging output.  Don't check whether pid of thread equals to pid.
5545         (aarch64_notify_debug_reg_change): Don't set param.pid.  Call
5546         iterate_over_lwps instead find_inferior.
5548 2015-08-24  Pedro Alves  <palves@redhat.com>
5550         * inferiors.c (get_first_process): New function.
5551         * inferiors.h (get_first_process): New declaration.
5552         * remote-utils.c (read_ptid): Default to the first process in the
5553         list, instead of to the current thread's process.
5555 2015-08-24  Pedro Alves  <palves@redhat.com>
5557         * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5558         * event-loop.c: Likewise.
5559         * remote-utils.c: Likewise.
5560         * tracepoint.c: Likewise.
5562 2015-08-24  Pedro Alves  <palves@redhat.com>
5564         * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5565         ptid_get_lwp.
5567 2015-08-21  Pedro Alves  <palves@redhat.com>
5569         * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5570         instead of literal 1.
5572 2015-08-21  Pedro Alves  <palves@redhat.com>
5574         * tdesc.c (default_description): Explicitly zero-initialize.
5576 2015-08-21  Pedro Alves  <palves@redhat.com>
5578         PR gdb/18749
5579         * inferiors.c (remove_thread): Discard any pending stop reply for
5580         this thread.
5581         * server.c (remove_all_on_match_pid): Rename to ...
5582         (remove_all_on_match_ptid): ... this.  Work with a filter ptid
5583         instead of a pid.
5584         (discard_queued_stop_replies): Change parameter to a ptid.  Now
5585         extern.
5586         (handle_v_kill, kill_inferior_callback, captured_main)
5587         (process_serial_event): Adjust.
5588         * server.h (discard_queued_stop_replies): Declare.
5590 2015-08-21  Pedro Alves  <palves@redhat.com>
5592         * linux-low.c (wait_for_sigstop): Always switch to no thread
5593         selected if the previously current thread dies.
5594         * lynx-low.c (lynx_request_interrupt): Use the first thread's
5595         process instead of the current thread's.
5596         * remote-utils.c (input_interrupt): Don't check if there's no
5597         current thread.
5598         * server.c (gdb_read_memory, gdb_write_memory): If setting the
5599         current thread to the general thread fails, error out.
5600         (handle_qxfer_auxv, handle_qxfer_libraries)
5601         (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5602         (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5603         (handle_query): Check if there's a thread selected instead of
5604         checking whether there's any thread in the thread list.
5605         (handle_qxfer_threads, handle_qxfer_btrace)
5606         (handle_qxfer_btrace_conf): Don't error out early if there's no
5607         thread in the thread list.
5608         (handle_v_cont, myresume): Don't set the current thread to the
5609         continue thread.
5610         (process_serial_event) <Hg handling>: Also set thread_id if the
5611         previous general thread is still alive.
5612         (process_serial_event) <g/G handling>: If setting the current
5613         thread to the general thread fails, error out.
5614         * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5615         thread's lwp instead of the current thread's.
5616         * target.c (set_desired_thread): If the desired thread was not
5617         found, leave the current thread pointing to NULL.  Return an int
5618         (boolean) indicating success.
5619         * target.h (set_desired_thread): Change return type to int.
5621 2015-08-20  Max Filippov  <jcmvbkbc@gmail.com>
5623         * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5624         * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5625         #includes.
5626         (ps_get_thread_area): New function.
5628 2015-08-19  Gary Benson  <gbenson@redhat.com>
5630         * hostio.c (handle_pread): Do not attempt to read more data
5631         than hostio_reply_with_data can fit in a packet.
5633 2015-08-18  Joel Brobecker  <brobecker@adacore.com>
5635         * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5637 2015-08-14  Matthew Fortune  <matthew.fortune@imgtec.com>
5639         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5641 2015-08-06  Pedro Alves  <palves@redhat.com>
5643         * tracepoint.c (expr_eval_result): Now an int.
5645 2015-08-06  Pedro Alves  <palves@redhat.com>
5647         * gdbthread.h (struct regcache): Forward declare.
5648         (struct thread_info) <regcache_data>: Now a struct regcache
5649         pointer.
5650         * inferiors.c (inferior_regcache_data)
5651         (set_inferior_regcache_data): Now work with struct regcache
5652         pointers.
5653         * inferiors.h (struct regcache): Forward declare.
5654         (inferior_regcache_data, set_inferior_regcache_data): Now work
5655         with struct regcache pointers.
5656         * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5657         (free_register_cache_thread): Remove struct regcache pointer
5658         casts.
5660 2015-08-06  Pedro Alves  <palves@redhat.com>
5662         * server.c (captured_main): On error, print the exception message
5663         to stderr, and if run_once is set, throw a quit.
5665 2015-08-06  Pedro Alves  <palves@redhat.com>
5667         * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5668         the current thread.
5670 2015-08-06  Pedro Alves  <palves@redhat.com>
5672         * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5673         reading beyond the passed in buffer length.
5675 2015-08-06  Pierre Langlois  <pierre.langlois@arm.com>
5677         * tracepoint.c (symbol_list) <required>: Remove.
5679 2015-08-06  Pedro Alves  <palves@redhat.com>
5681         * linux-low.c (handle_extended_wait): Set the fork child's suspend
5682         count if stopping and suspending threads.
5683         (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5684         stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5685         (linux_detach): Complete an ongoing step-over.
5686         (lwp_suspended_inc, lwp_suspended_decr): New functions.  Use
5687         throughout.
5688         (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5689         (linux_wait_1): If passing a signal to the inferior after
5690         finishing a step-over, unsuspend and re-resume all lwps.  If we
5691         see a single-step event but the thread should be continuing, don't
5692         pass the trap to gdb.
5693         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5694         internal_error instead of gdb_assert.
5695         (enqueue_pending_signal): New function.
5696         (check_ptrace_stopped_lwp_gone): Add debug output.
5697         (start_step_over): Use internal_error instead of gdb_assert.
5698         (complete_ongoing_step_over): New function.
5699         (linux_resume_one_thread): Don't resume a suspended thread.
5700         (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5701         it stepping.
5703 2015-08-06  Pedro Alves  <palves@redhat.com>
5705         * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5706         (linux_thread_alive): Use lwp_is_marked_dead.
5707         (extended_event_reported): Delete.
5708         (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5709         instead of extended_event_reported.
5710         (mark_lwp_dead): Don't set the 'dead' flag.  Store the waitstatus
5711         as well.
5712         (lwp_is_marked_dead): New function.
5713         (lwp_running): Use lwp_is_marked_dead.
5714         * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5715         comment.
5717 2015-08-06  Pedro Alves  <palves@redhat.com>
5719         * linux-low.c (linux_wait_1): Move fork event output out of the
5720         !report_to_gdb check.  Pass event_child->waitstatus to
5721         target_waitstatus_to_string instead of ourstatus.
5723 2015-08-04  Yao Qi  <yao.qi@linaro.org>
5725         * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5726         if current_thread is 32 bit.
5728 2015-08-04  Yao Qi  <yao.qi@linaro.org>
5730         * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5731         0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5732         * server.c (extended_protocol): Remove "static".
5733         * server.h (extended_protocol): Declare it.
5735 2015-08-04  Yao Qi  <yao.qi@linaro.org>
5737         * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5738         both aarch64 and aarch32.
5739         (aarch64_set_pc): Likewise.
5741 2015-08-04  Yao Qi  <yao.qi@linaro.org>
5743         * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5744         to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5745         arm-with-neon.xml to srv_xmlfiles.
5746         * linux-aarch64-low.c: Include linux-aarch32-low.h.
5747         (is_64bit_tdesc): New function.
5748         (aarch64_linux_read_description): New function.
5749         (aarch64_arch_setup): Call aarch64_linux_read_description.
5750         (regs_info): Rename to regs_info_aarch64.
5751         (aarch64_regs_info): Return right regs_info.
5752         (initialize_low_arch): Call initialize_low_arch_aarch32.
5754 2015-08-04  Yao Qi  <yao.qi@linaro.org>
5756         * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5757         * linux-aarch32-low.c: New file.
5758         * linux-aarch32-low.h: New file.
5759         * linux-arm-low.c (arm_fill_gregset): Move it to
5760         linux-aarch32-low.c.
5761         (arm_store_gregset): Likewise.
5762         (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5763         (arm_store_vfpregset): Call arm_store_vfpregset_num.
5764         (arm_arch_setup): Check if PTRACE_GETREGSET works.
5765         (regs_info): Rename to regs_info_arm.
5766         (arm_regs_info): Return regs_info_aarch32 if
5767         have_ptrace_getregset is 1 and target description is
5768         arm_with_neon or arm_with_vfpv3.
5769         (initialize_low_arch): Don't call init_registers_arm_with_neon.
5770         Call initialize_low_arch_aarch32 instead.
5772 2015-08-04  Yao Qi  <yao.qi@linaro.org>
5774         * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5775         * linux-low.c: ... here.
5776         * linux-low.h (have_ptrace_getregset): Declare it.
5778 2015-08-04  Pedro Alves  <palves@redhat.com>
5780         * thread-db.c (struct thread_db): Use new typedefs.
5781         (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5782         CHK calls.
5783         (disable_thread_event_reporting): Cast result of dlsym to
5784         destination function pointer type.
5785         (thread_db_mourn): Use td_ta_delete_ftype.
5787 2015-08-03  Sandra Loosemore  <sandra@codesourcery.com>
5789         * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5790         arch variant.
5791         (CDX_BREAKPOINT): Define for R2.
5792         (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5793         (the_low_target): Add comments.
5795 2015-07-30  Yao Qi  <yao.qi@linaro.org>
5797         * linux-arm-low.c (arm_hwcap): Remove it.
5798         (arm_read_description): New local variable arm_hwcap.  Don't
5799         set arm_hwcap to zero.
5801 2015-07-30  Yao Qi  <yao.qi@linaro.org>
5803         * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5804         Use regcache->tdesc instead.
5805         (arm_store_wmmxregset): Likewise.
5806         (arm_fill_vfpregset): Likewise.
5807         (arm_store_vfpregset): Likewise.
5809 2015-07-30  Yao Qi  <yao.qi@linaro.org>
5811         * linux-arm-low.c: Include arch/arm.h.
5812         (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5813         (arm_store_gregset): Likewise.
5815 2015-07-29  Simon Marchi  <simon.marchi@ericsson.com>
5817         * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5818         ptrace's 4th parameter.
5820 2015-07-27  Yao Qi  <yao.qi@linaro.org>
5822         * configure.srv (case aarch64*-*-linux*): Don't set
5823         srv_linux_usrregs.
5825 2015-07-24  Pedro Alves  <palves@redhat.c: Likewise.om>
5827         * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5828         sys/ptrace.h.
5829         * linux-arm-low.c: Likewise.
5830         * linux-cris-low.c: Likewise.
5831         * linux-crisv32-low.c: Likewise.
5832         * linux-low.c: Likewise.
5833         * linux-m68k-low.c: Likewise.
5834         * linux-mips-low.c: Likewise.
5835         * linux-nios2-low.c: Likewise.
5836         * linux-s390-low.c: Likewise.
5837         * linux-sparc-low.c: Likewise.
5838         * linux-tic6x-low.c: Likewise.
5839         * linux-tile-low.c: Likewise.
5840         * linux-x86-low.c: Likewise.
5842 2015-07-24  Pedro Alves  <palves@redhat.com>
5844         * config.in: Regenerate.
5845         * configure: Regenerate.
5847 2015-07-24  Pedro Alves  <palves@redhat.com>
5849         * acinclude.m4: Include ../ptrace.m4.
5850         * configure.ac: Call GDB_AC_PTRACE.
5851         * config.in, configure: Regenerate.
5853 2015-07-24  Yao Qi  <yao.qi@linaro.org>
5855         * linux-low.c (linux_create_inferior): Remove setting to
5856         proc->priv->new_inferior.
5857         (linux_attach): Likewise.
5858         (linux_low_filter_event): Likewise.
5859         * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5861 2015-07-24  Yao Qi  <yao.qi@linaro.org>
5863         * linux-low.c (linux_arch_setup): New function.
5864         (linux_low_filter_event): If proc->tdesc is NULL and
5865         proc->attached is true, call the_low_target.arch_setup.
5866         Otherwise, keep status pending, and return.
5867         (linux_resume_one_lwp_throw): Don't call get_pc if
5868         thread->while_stepping isn't NULL.  Don't call
5869         get_thread_regcache if proc->tdesc is NULL.
5870         (need_step_over_p): Return 0 if proc->tdesc is NULL.
5871         (linux_target_ops): Install arch_setup.
5872         * server.c (start_inferior): Call the_target->arch_setup.
5873         * target.h (struct target_ops) <arch_setup>: New field.
5874         (target_arch_setup): New marco.
5875         * lynx-low.c (lynx_target_ops): Update.
5876         * nto-low.c (nto_target_ops): Update.
5877         * spu-low.c (spu_target_ops): Update.
5878         * win32-low.c (win32_target_ops): Update.
5880 2015-07-24  Yao Qi  <yao.qi@linaro.org>
5882         * linux-low.c (linux_add_process): Don't set
5883         proc->priv->new_inferior.
5884         (linux_create_inferior): Set proc->priv->new_inferior to 1.
5885         (linux_attach): Likewise.
5887 2015-07-24  Yao Qi  <yao.qi@linaro.org>
5889         * server.c (start_inferior): Code refactor.
5891 2015-07-24  Yao Qi  <yao.qi@linaro.org>
5893         * server.c (process_serial_event): Set general_thread.
5895 2015-07-21  Yao Qi  <yao.qi@linaro.org>
5897         * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5898         aarch64_linux_get_debug_reg_capacity.
5900 2015-07-17  Yao Qi  <yao.qi@linaro.org>
5902         * Makefile.in (aarch64-linux-hw-point.o): New rule.
5903         * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5904         * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5905         (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5906         (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5907         (AARCH64_HWP_ALIGNMENT): Likewise.
5908         (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5909         (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5910         (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5911         (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5912         (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5913         (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5914         (struct aarch64_debug_reg_state): Likewise.
5915         (struct arch_lwp_info): Likewise.
5916         (aarch64_align_watchpoint): Likewise.
5917         (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5918         (aarch64_watchpoint_length): Likewise.
5919         (aarch64_point_encode_ctrl_reg): Likewise
5920         (aarch64_point_is_aligned): Likewise.
5921         (aarch64_align_watchpoint): Likewise.
5922         (aarch64_linux_set_debug_regs):
5923         (aarch64_dr_state_insert_one_point): Likewise.
5924         (aarch64_dr_state_remove_one_point): Likewise.
5925         (aarch64_handle_breakpoint): Likewise.
5926         (aarch64_handle_aligned_watchpoint): Likewise.
5927         (aarch64_handle_unaligned_watchpoint): Likewise.
5928         (aarch64_handle_watchpoint): Likewise.
5930 2015-07-17  Yao Qi  <yao.qi@linaro.org>
5932         * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5933         and don't aarch64_get_debug_reg_state.  All callers update.
5934         (aarch64_handle_aligned_watchpoint): Likewise.
5935         (aarch64_handle_unaligned_watchpoint): Likewise.
5936         (aarch64_handle_watchpoint): Likewise.
5937         (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5938         (aarch64_remove_point): Likewise.
5940 2015-07-17  Yao Qi  <yao.qi@linaro.org>
5942         * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5943         debug_printf.
5944         (aarch64_handle_unaligned_watchpoint): Likewise.
5946 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
5948         Revert the previous 3 commits:
5949         Move gdb_regex* to common/
5950         Move linux_find_memory_regions_full & co.
5951         gdbserver build-id attribute generator
5953 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
5954             Jan Kratochvil  <jan.kratochvil@redhat.com>
5956         gdbserver build-id attribute generator.
5957         * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5958         (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5959         (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5960         (find_phdr): New.
5961         (get_dynamic): Use find_pdhr to traverse program headers.
5962         (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5963         (compare_mapping_entry_range, struct find_memory_region_callback_data)
5964         (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5965         (get_hex_build_id): New.
5966         (linux_qxfer_libraries_svr4): Add optional build-id attribute
5967         to reply XML document.
5969 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
5970             Jan Kratochvil  <jan.kratochvil@redhat.com>
5972         * target.c: Include target/target-utils.h and fcntl.h.
5973         (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5974         (target_fileio_read_stralloc): New functions.
5976 2015-07-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
5978         * Makefile.in (OBS): Add gdb_regex.o.
5979         (gdb_regex.o): New.
5980         * config.in: Rebuilt.
5981         * configure: Rebuilt.
5983 2015-07-15  Aleksandar Ristovski  <aristovski@qnx.com
5984             Jan Kratochvil  <jan.kratochvil@redhat.com>
5986         Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5987         * Makefile.in (OBS): Add target-utils.o.
5988         (linux-maps.o, target-utils.o): New.
5989         * configure.srv (srv_linux_obj): Add linux-maps.o.
5991 2015-07-15  Pierre Langlois  <pierre.langlois@arm.com>
5993         * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5994         function, return 1.
5995         (the_low_target): Install it.
5997 2015-07-14  Pedro Alves  <palves@redhat.com>
5999         * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
6000         Instead, ignore ECHILD, and throw an error for other errnos.
6002 2015-07-10  Pedro Alves  <palves@redhat.com>
6004         * event-loop.c (struct callback_event) <data>: Change type to
6005         gdb_client_data instance instead of gdb_client_data pointer.
6006         (append_callback_event): Adjust.
6008 2015-07-10  Pierre Langlois  <pierre.langlois@arm.com>
6010         * linux-aarch64-low.c: Add comments for each linux_target_ops
6011         method.  Remove comments already covered in target_ops and
6012         linux_target_ops definitions.
6013         (the_low_target): Add comments for each unimplemented method.
6015 2015-07-09  Yao Qi  <yao.qi@linaro.org>
6017         * linux-aarch64-low.c (aarch64_regmap): Remove.
6018         (aarch64_usrregs_info): Remove.
6019         (regs_info): Set field usrregs to NULL.
6021 2015-07-02  Markus Metzger  <markus.t.metzger@intel.com>
6023         * linux-low.c: Include "rsp-low.h"
6024         (linux_low_encode_pt_config, linux_low_encode_raw): New.
6025         (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
6026         (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
6027         (handle_btrace_enable_pt): New.
6028         (handle_btrace_general_set): Support "pt".
6029         (handle_btrace_conf_general_set): Support "pt:size".
6031 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
6033         * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
6034         Z_PACKET_SW_BP.
6036 2015-06-29  Pierre Langlois  <pierre.langlois@arm.com>
6038         * linux-aarch64-low.c: Remove comment about endianness.
6039         (aarch64_breakpoint): Change type to gdb_byte[].  Set to "brk #0".
6040         (aarch64_breakpoint_at): Change type of insn to gdb_byte[].  Use
6041         memcmp.
6043 2015-06-24  Gary Benson  <gbenson@redhat.com>
6045         * linux-i386-ipa.c (stdint.h): Do not include.
6046         * lynx-i386-low.c (stdint.h): Likewise.
6047         * lynx-ppc-low.c (stdint.h): Likewise.
6048         * mem-break.c (stdint.h): Likewise.
6049         * thread-db.c (stdint.h): Likewise.
6050         * tracepoint.c (stdint.h): Likewise.
6051         * win32-low.c (stdint.h): Likewise.
6053 2015-06-18  Simon Marchi  <simon.marchi@ericsson.com>
6055         * server.c (write_qxfer_response): Update call to
6056         remote_escape_output.
6058 2015-06-15  Aleksandar Ristovski  <aristovski@qnx.com
6059             Jan Kratochvil  <jan.kratochvil@redhat.com>
6061         Merge multiple hex conversions.
6062         * gdbreplay.c (tohex): Rename to 'fromhex'.
6063         (logchar): Use fromhex.
6065 2015-06-10  Jan Kratochvil  <jan.kratochvil@redhat.com>
6067         * server.c (handle_qxfer_libraries): Set `version' attribute for
6068         <library-list>.
6070 2015-06-10  Gary Benson  <gbenson@redhat.com>
6072         * target.h (struct target_ops) <multifs_open>: New field.
6073         <multifs_unlink>: Likewise.
6074         <multifs_readlink>: Likewise.
6075         * linux-low.c (nat/linux-namespaces.h): New include.
6076         (linux_target_ops): Initialize the_target->multifs_open,
6077         the_target->multifs_unlink and the_target->multifs_readlink.
6078         * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6079         * hostio.c (hostio_fs_pid): New static variable.
6080         (hostio_handle_new_gdb_connection): New function.
6081         (handle_setfs): Likewise.
6082         (handle_open): Use the_target->multifs_open as appropriate.
6083         (handle_unlink): Use the_target->multifs_unlink as appropriate.
6084         (handle_readlink): Use the_target->multifs_readlink as
6085         appropriate.
6086         (handle_vFile): Handle vFile:setfs packets.
6087         * server.c (handle_query): Call hostio_handle_new_gdb_connection
6088         after target_handle_new_gdb_connection.
6090 2015-06-10  Gary Benson  <gbenson@redhat.com>
6092         * configure.ac (AC_CHECK_FUNCS): Add setns.
6093         * config.in: Regenerate.
6094         * configure: Likewise.
6095         * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6096         (linux-namespaces.o): New rule.
6097         * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6099 2015-06-09  Gary Benson <gbenson@redhat.com>
6101         * hostio.c (handle_open): Process mode argument with
6102         fileio_to_host_mode.
6104 2015-06-01  Yao Qi  <yao.qi@linaro.org>
6106         * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6107         * linux-x86-low.c: Likewise.
6109 2015-05-28  Don Breazeal  <donb@codesourcery.com>
6111         * linux-low.c (handle_extended_wait): Initialize
6112         thread_info.last_resume_kind for new fork children.
6114 2015-05-15  Pedro Alves  <palves@redhat.com>
6116         * target.h (target_handle_new_gdb_connection): Rewrite using if
6117         wrapped in do/while.
6119 2015-05-14  Joel Brobecker  <brobecker@adacore.com>
6121         * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6122         * configure, config.in: Regenerate.
6123         * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6124         Declare typedef.
6126 2015-05-12  Don Breazeal  <donb@codesourcery.com>
6128         * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6129         PTRACE_EVENT_VFORK_DONE.
6130         (linux_low_ptrace_options, extended_event_reported): Add vfork
6131         events.
6132         * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6133         and "vforkdone" for RSP 'T' Stop Reply Packet.
6134         * server.h (report_vfork_events): Declare
6135         global variable.
6137 2015-05-12  Don Breazeal  <donb@codesourcery.com>
6139         * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6140         (the_low_target) <new_fork>: Initialize new member.
6141         * linux-arm-low.c (arm_new_fork): New function.
6142         (the_low_target) <new_fork>: Initialize new member.
6143         * linux-low.c (handle_extended_wait): Call new target function
6144         new_fork.
6145         * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6146         * linux-mips-low.c (mips_add_watchpoint): New function
6147         extracted from mips_insert_point.
6148         (the_low_target) <new_fork>: Initialize new member.
6149         (mips_linux_new_fork): New function.
6150         (mips_insert_point): Call mips_add_watchpoint.
6151         * linux-x86-low.c (x86_linux_new_fork): New function.
6152         (the_low_target) <new_fork>: Initialize new member.
6154 2015-05-12  Don Breazeal  <donb@codesourcery.com>
6156         * linux-low.c (handle_extended_wait): Implement return value,
6157         rename argument 'event_child' to 'event_lwp', handle
6158         PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6159         (linux_low_ptrace_options): New function.
6160         (linux_low_filter_event): Call linux_low_ptrace_options,
6161         use different argument fo linux_enable_event_reporting,
6162         use return value from handle_extended_wait.
6163         (extended_event_reported): New function.
6164         (linux_wait_1): Call extended_event_reported and set
6165         status to report fork events.
6166         (linux_write_memory): Add pid to debug message.
6167         (reset_lwp_ptrace_options_callback): New function.
6168         (linux_handle_new_gdb_connection): New function.
6169         (linux_target_ops): Initialize new structure member.
6170         * linux-low.h (struct lwp_info) <waitstatus>: New member.
6171         * lynx-low.c: Initialize new structure member.
6172         * remote-utils.c (prepare_resume_reply): Implement stop reason
6173         "fork" for "T" stop message.
6174         * server.c (handle_query): Call handle_new_gdb_connection.
6175         * server.h (report_fork_events): Declare global flag.
6176         * target.h (struct target_ops) <handle_new_gdb_connection>:
6177         New member.
6178         (target_handle_new_gdb_connection): New macro.
6179         * win32-low.c: Initialize new structure member.
6181 2015-05-12  Don Breazeal  <donb@codesourcery.com>
6183         * mem-break.c (APPEND_TO_LIST): Define macro.
6184         (clone_agent_expr): New function.
6185         (clone_one_breakpoint): New function.
6186         (clone_all_breakpoints): New function.
6187         * mem-break.h: Declare new functions.
6189 2015-05-12  Don Breazeal  <donb@codesourcery.com>
6191         * linux-low.c (linux_supports_fork_events): New function.
6192         (linux_supports_vfork_events): New function.
6193         (linux_target_ops): Initialize new structure members.
6194         (initialize_low): Call linux_check_ptrace_features.
6195         * lynx-low.c (lynx_target_ops): Initialize new structure
6196         members.
6197         * server.c (report_fork_events, report_vfork_events):
6198         New global flags.
6199         (handle_query): Add new features to qSupported packet and
6200         response.
6201         (captured_main): Initialize new global variables.
6202         * target.h (struct target_ops) <supports_fork_events>:
6203         New member.
6204         <supports_vfork_events>: New member.
6205         (target_supports_fork_events): New macro.
6206         (target_supports_vfork_events): New macro.
6207         * win32-low.c (win32_target_ops): Initialize new structure
6208         members.
6210 2015-05-12  Gary Benson <gbenson@redhat.com>
6212         * server.c (handle_qxfer_exec_file): Use current process
6213         if annex is empty.
6215 2015-05-08  Sandra Loosemore  <sandra@codesourcery.com>
6217         * linux-nios2-low.c: Include elf/common.h.  Adjust comments.
6218         Remove HAVE_PTRACE_GETREGS conditionals.
6219         (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6220         instead of PTRACE_GETREGS and PTRACE_SETREGS.
6222 2015-05-08  Yao Qi  <yao.qi@linaro.org>
6224         * linux-low.c (linux_supports_conditional_breakpoints): New
6225         function.
6226         (linux_target_ops): Install new target method.
6227         * lynx-low.c (lynx_target_ops): Install NULL hook for
6228         supports_conditional_breakpoints.
6229         * nto-low.c (nto_target_ops): Likewise.
6230         * spu-low.c (spu_target_ops): Likewise.
6231         * win32-low.c (win32_target_ops): Likewise.
6232         * server.c (handle_query): Check
6233         target_supports_conditional_breakpoints.
6234         * target.h (struct target_ops) <supports_conditional_breakpoints>:
6235         New field.
6236         (target_supports_conditional_breakpoints): New macro.
6238 2015-05-06  Pedro Alves  <palves@redhat.com>
6240         PR server/18081
6241         * server.c (start_inferior): If the process exits, mourn it.
6243 2015-04-21  Gary Benson <gbenson@redhat.com>
6245         * hostio.c (fileio_open_flags_to_host): Factored out to
6246         fileio_to_host_openflags in common/fileio.c.  Single use
6247         updated.
6249 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
6251         * linux-xtensa-low.c (xtensa_fill_gregset)
6252         (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6253         XCHAL_HAVE_LOOP.
6255 2015-04-17  Max Filippov  <jcmvbkbc@gmail.com>
6257         * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6258         (regs_info): Replace usrregs pointer with NULL.
6260 2015-04-17  Gary Benson  <gbenson@redhat.com>
6262         * target.h (struct target_ops) <pid_to_exec_file>: New field.
6263         * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6264         * server.c (handle_qxfer_exec_file): New function.
6265         (qxfer_packets): Add exec-file entry.
6266         (handle_query): Report qXfer:exec-file:read as supported packet.
6268 2015-04-14  Romain Naour <romain.naour@openwide.fr>  (tiny change)
6270         * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6272 2015-04-09  Gary Benson <gbenson@redhat.com>
6274         * hostio-errno.c (errno_to_fileio_error): Remove function.
6275         Update caller to use remote_fileio_to_fio_error.
6277 2015-04-09  Yao Qi  <yao.qi@linaro.org>
6279         * linux-low.c (linux_insert_point): Call
6280         insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6281         (linux_remove_point): Call remove_memory_breakpoint if type is
6282         raw_bkpt_type_sw.
6283         * linux-x86-low.c (x86_insert_point): Don't call
6284         insert_memory_breakpoint.
6285         (x86_remove_point): Don't call remove_memory_breakpoint.
6287 2015-04-01  Pedro Alves  <palves@redhat.com>
6288             Cleber Rosa  <crosa@redhat.com>
6290         * server.c (gdbserver_usage): Reorganize and extend the usage
6291         message.
6293 2015-03-24  Pedro Alves  <palves@redhat.com>
6295         * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6296         output.  Also dump TRAP_TRACE.
6297         (linux_low_filter_event): In debug output, distinguish a
6298         resume_stop SIGSTOP from a delayed SIGSTOP.
6300 2015-03-24  Gary Benson  <gbenson@redhat.com>
6302         * linux-x86-low.c (x86_linux_new_thread): Moved to
6303         nat/x86-linux.c.
6304         (x86_linux_prepare_to_resume): Likewise.
6306 2015-03-24  Gary Benson  <gbenson@redhat.com>
6308         * Makefile.in (x86-linux-dregs.o): New rule.
6309         * configure.srv: Add x86-linux-dregs.o to relevant targets.
6310         * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6311         (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6312         (x86_linux_dr_get): Likewise.
6313         (x86_linux_dr_set): Likewise.
6314         (update_debug_registers_callback): Likewise.
6315         (x86_linux_dr_set_addr): Likewise.
6316         (x86_linux_dr_get_addr): Likewise.
6317         (x86_linux_dr_set_control): Likewise.
6318         (x86_linux_dr_get_control): Likewise.
6319         (x86_linux_dr_get_status): Likewise.
6320         (x86_linux_update_debug_registers): Likewise.
6322 2015-03-24  Gary Benson  <gbenson@redhat.com>
6324         * linux-x86-low.c (x86_linux_update_debug_registers):
6325         New function, factored out from...
6326         (x86_linux_prepare_to_resume): ...this.
6328 2015-03-24  Gary Benson  <gbenson@redhat.com>
6330         * linux-x86-low.c (x86_linux_dr_get): Update comments.
6331         (x86_linux_dr_set): Likewise.
6332         (update_debug_registers_callback): Likewise.
6333         (x86_linux_dr_set_addr): Likewise.
6334         (x86_linux_dr_get_addr): Likewise.
6335         (x86_linux_dr_set_control): Likewise.
6336         (x86_linux_dr_get_control): Likewise.
6337         (x86_linux_dr_get_status): Likewise.
6338         (x86_linux_prepare_to_resume): Likewise.
6340 2015-03-24  Gary Benson  <gbenson@redhat.com>
6342         * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6343         Use perror_with_name.  Pass string through gettext.
6344         (x86_linux_dr_set): Likewise.
6346 2015-03-24  Gary Benson  <gbenson@redhat.com>
6348         * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6349         (x86_linux_dr_set_addr): ...this.
6350         (x86_dr_low_get_addr): Rename to...
6351         (x86_linux_dr_get_addr): ...this.
6352         (x86_dr_low_set_control): Rename to...
6353         (x86_linux_dr_set_control): ...this.
6354         (x86_dr_low_get_control): Rename to...
6355         (x86_linux_dr_get_control): ...this.
6356         (x86_dr_low_get_status): Rename to...
6357         (x86_linux_dr_get_status): ...this.
6358         (x86_dr_low): Update with new function names.
6360 2015-03-24  Gary Benson  <gbenson@redhat.com>
6362         * Makefile.in (x86-linux.o): New rule.
6363         * configure.srv: Add x86-linux.o to relevant targets.
6364         * linux-low.c (lwp_set_arch_private_info): New function.
6365         (lwp_arch_private_info): Likewise.
6366         * linux-x86-low.c: Include nat/x86-linux.h.
6367         (arch_lwp_info): Removed structure.
6368         (update_debug_registers_callback):
6369         Use lwp_set_debug_registers_changed.
6370         (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6371         and lwp_set_debug_registers_changed.
6372         (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6374 2015-03-24  Gary Benson  <gbenson@redhat.com>
6376         * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6377         * linux-arm-low.c (arm_new_thread): Likewise.
6378         * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6379         * linux-mips-low.c (mips_linux_new_thread): Likewise.
6380         * linux-x86-low.c (x86_linux_new_thread): Likewise.
6381         * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6383 2015-03-24  Gary Benson  <gbenson@redhat.com>
6385         * linux-low.c (ptid_of_lwp): New function.
6386         (lwp_is_stopped): Likewise.
6387         (lwp_stop_reason): Likewise.
6388         * linux-x86-low.c (update_debug_registers_callback):
6389         Use lwp_is_stopped.
6390         (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6391         lwp_stop_reason.
6393 2015-03-24  Gary Benson  <gbenson@redhat.com>
6395         * linux-low.h (linux_stop_lwp): Remove declaration.
6397 2015-03-24  Gary Benson  <gbenson@redhat.com>
6399         * linux-low.h: Include nat/linux-nat.h.
6400         * linux-low.c (iterate_over_lwps_args): New structure.
6401         (iterate_over_lwps_filter): New function.
6402         (iterate_over_lwps): Likewise.
6403         * linux-x86-low.c (update_debug_registers_callback):
6404         Update signature to what iterate_over_lwps expects.
6405         Remove PID check that iterate_over_lwps now performs.
6406         (x86_dr_low_set_addr): Use iterate_over_lwps.
6407         (x86_dr_low_set_control): Likewise.
6409 2015-03-24  Gary Benson  <gbenson@redhat.com>
6411         * linux-x86-low.c (x86_debug_reg_state): New function.
6412         (x86_linux_prepare_to_resume): Use the above.
6414 2015-03-24  Gary Benson  <gbenson@redhat.com>
6416         * linux-low.c (current_lwp_ptid): New function.
6417         * linux-x86-low.c: Include nat/linux-nat.h.
6418         (x86_dr_low_get_addr): Use current_lwp_ptid.
6419         (x86_dr_low_get_control): Likewise.
6420         (x86_dr_low_get_status): Likewise.
6422 2015-03-20  Pedro Alves  <palves@redhat.com>
6424         * tracepoint.c (cmd_qtstatus): Make "str" const.
6426 2015-03-20  Pedro Alves  <palves@redhat.com>
6428         * server.c (handle_general_set): Make "req_str" const.
6430 2015-03-19  Pedro Alves  <palves@redhat.com>
6432         * linux-low.c (linux_resume_one_lwp): Rename to ...
6433         (linux_resume_one_lwp_throw): ... this.  Don't handle ESRCH here,
6434         instead call perror_with_name.
6435         (check_ptrace_stopped_lwp_gone): New function.
6436         (linux_resume_one_lwp): Reimplement as wrapper around
6437         linux_resume_one_lwp_throw that swallows errors if the LWP is
6438         gone.
6440 2015-03-19  Pedro Alves  <palves@redhat.com>
6442         * linux-low.c (count_events_callback, select_event_lwp_callback):
6443         No longer check whether the thread has resume_stop as last resume
6444         kind.
6446 2015-03-19 Pedro Alves  <palves@redhat.com>
6448         * linux-low.c (count_events_callback, select_event_lwp_callback):
6449         Use the lwp's status_pending_p field, not the thread's.
6451 2015-03-19  Pedro Alves  <palves@redhat.com>
6453         * linux-low.c (select_event_lwp_callback): Update comments to
6454         no longer mention SIGTRAP.
6456 2015-03-18  Gary Benson  <gbenson@redhat.com>
6458         * server.c (handle_query): Do not report vFile:fstat as supported.
6460 2015-03-11  Gary Benson  <gbenson@redhat.com>
6462         * hostio.c (sys/types.h): New include.
6463         (sys/stat.h): Likewise.
6464         (common-remote-fileio.h): Likewise.
6465         (handle_fstat): New function.
6466         (handle_vFile): Handle vFile:fstat packets.
6468 2015-03-11  Gary Benson  <gbenson@redhat.com>
6470         * configure.ac (AC_CHECK_MEMBERS): Add checks for
6471         struct stat.st_blocks and struct stat.st_blksize.
6472         * configure: Regenerate.
6473         * config.in: Likewise.
6474         * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6475         (OBS): Add common-remote-fileio.o.
6476         (common-remote-fileio.o): New rule.
6478 2015-03-09  Pedro Alves  <palves@redhat.com>
6480         * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6481         'struct sockaddr' pointer in 'accept' call.
6483 2015-03-09  Pedro Alves  <palves@redhat.com>
6485         Revert:
6486         2015-03-07  Pedro Alves  <palves@redhat.com>
6487         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6488         or <winsock2.h> here.  Instead include "gdb_socket.h".
6489         (remote_open): Use union gdb_sockaddr_u.
6490         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6491         or <winsock2.h> here.  Instead include "gdb_socket.h".
6492         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6493         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6494         or <sys/un.h>.
6495         (init_named_socket, gdb_agent_helper_thread): Use union
6496         gdb_sockaddr_u.
6498 2015-03-07  Pedro Alves  <palves@redhat.com>
6500         * configure.ac (build_warnings): Move
6501         -Wdeclaration-after-statement to the C-specific set.
6502         * configure: Regenerate.
6504 2015-03-07  Pedro Alves  <palves@redhat.com>
6506         * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6507         or <winsock2.h> here.  Instead include "gdb_socket.h".
6508         (remote_open): Use union gdb_sockaddr_u.
6509         * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6510         or <winsock2.h> here.  Instead include "gdb_socket.h".
6511         (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6512         * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6513         or <sys/un.h>.
6514         (init_named_socket, gdb_agent_helper_thread): Use union
6515         gdb_sockaddr_u.
6517 2015-03-07  Pedro Alves  <palves@redhat.com>
6519         Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6520         instead.
6522 2015-03-06  Yao Qi  <yao.qi@linaro.org>
6524         * linux-aarch64-low.c (aarch64_insert_point): Use
6525         show_debug_regs as a boolean.
6526         (aarch64_remove_point): Likewise.
6528 2015-03-05  Pedro Alves  <palves@redhat.com>
6530         * lynx-low.c (lynx_target_ops): Install NULL hooks for
6531         stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6532         stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6533         * nto-low.c (nto_target_ops): Likewise.
6534         * spu-low.c (spu_target_ops): Likewise.
6535         * win32-low.c (win32_target_ops): Likewise.
6537 2015-03-04  Pedro Alves  <palves@redhat.com>
6539         * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6540         Decide whether a breakpoint triggered based on the SIGTRAP's
6541         siginfo.si_code.
6542         (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6543         breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6544         (linux_low_filter_event): Check for breakpoints before checking
6545         watchpoints.
6546         (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6547         siginfo.si_code.
6548         (linux_stopped_by_sw_breakpoint)
6549         (linux_supports_stopped_by_sw_breakpoint)
6550         (linux_stopped_by_hw_breakpoint)
6551         (linux_supports_stopped_by_hw_breakpoint): New functions.
6552         (linux_target_ops): Install new target methods.
6554 2015-03-04  Pedro Alves  <palves@redhat.com>
6556         * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6557         * server.c (swbreak_feature, hwbreak_feature): New globals.
6558         (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6559         (captured_main): Clear swbreak_feature and hwbreak_feature.
6560         * server.h (swbreak_feature, hwbreak_feature): Declare.
6561         * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6562         supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6563         supports_stopped_by_hw_breakpoint>: New fields.
6564         (target_supports_stopped_by_sw_breakpoint)
6565         (target_stopped_by_sw_breakpoint)
6566         (target_supports_stopped_by_hw_breakpoint)
6567         (target_stopped_by_hw_breakpoint): Declare.
6569 2015-03-04  Pedro Alves  <palves@redhat.com>
6571         enum lwp_stop_reason -> enum target_stop_reason
6572         * linux-low.c (check_stopped_by_breakpoint): Adjust.
6573         (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6574         (linux_wait_1, stuck_in_jump_pad_callback)
6575         (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6576         (linux_stopped_by_watchpoint):
6577         * linux-low.h (enum lwp_stop_reason): Delete.
6578         (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6579         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6581 2015-03-04  Yao Qi  <yao.qi@linaro.org>
6583         * Makefile.in (SFILES): Add linux-aarch64-low.c.
6585 2015-03-03  Gary Benson  <gbenson@redhat.com>
6587         * hostio.c (handle_vFile): Fix prefix lengths.
6589 2015-03-03  Markus Metzger  <markus.t.metzger@intel.com>
6591         * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6592         ptr_bits.
6594 2015-03-02  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6596         * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6597         (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6598         (clean): Add "rm -f" for above C files.
6599         * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6600         s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6601         (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6602         s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6603         * linux-s390-low.c (HWCAP_S390_VX): New macro.
6604         (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6605         (init_registers_s390x_vx_linux64)
6606         (init_registers_s390x_tevx_linux64)
6607         (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6608         (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6609         declarations.
6610         (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6611         (s390_store_vxrs_high): New functions.
6612         (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6613         NT_S390_VXRS_HIGH.
6614         (s390_arch_setup): Add logic for selecting one of the new target
6615         descriptions.  Activate the new vector regsets if applicable.
6616         (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6617         init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6618         and init_registers_s390x_tevx_linux64.
6620 2015-03-01  Pedro Alves  <palves@redhat.com>
6622         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6623         parameter.
6625 2015-02-27  Pedro Alves  <palves@redhat.com>
6627         * linux-x86-low.c (u_debugreg_offset): New function.
6628         (x86_linux_dr_get, x86_linux_dr_set): Use it.
6630 2015-02-27  Pedro Alves  <palves@redhat.com>
6632         * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6633         [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6634         [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6635         ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6636         (ps_lsetfpregs, ps_getpid)
6637         (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6638         (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6639         (ps_lsetxregs, ps_plog): Declare.
6641 2015-02-27  Pedro Alves  <palves@redhat.com>
6643         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6644         IP_AGENT_EXPORT_FUNC.
6645         * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6646         IP_AGENT_EXPORT_FUNC.
6647         * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6648         (IP_AGENT_EXPORT): Delete.
6649         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6650         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6651         (gdb_trampoline_buffer_error, collecting, gdb_collect)
6652         (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6653         (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6654         (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6655         (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6656         (traceframe_read_count, traceframe_write_count)
6657         (traceframes_created, trace_state_variables, get_raw_reg)
6658         (get_trace_state_variable_value, set_trace_state_variable_value)
6659         (ust_loaded, helper_thread_id, cmd_buf): Use
6660         IPA_SYM_EXPORTED_NAME.
6661         (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6662         (tracepoints) Use IP_AGENT_EXPORT_VAR.
6663         (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6664         IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6665         (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6666         (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6667         EXTERN_C_PUSH/EXTERN_C_POP.
6668         (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6669         (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6670         wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6671         (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6672         (traceframe_write_count, traceframe_read_count)
6673         (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6674         (about_to_request_buffer_space, get_trace_state_variable_value)
6675         (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6676         (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6677         EXTERN_C_PUSH/EXTERN_C_POP.
6678         (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6679         (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6680         (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6681         and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6682         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6683         (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6684         (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6685         * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6686         Define.
6687         (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6688         (IP_AGENT_EXPORT_VAR_DECL): Define.
6689         (tracing): Declare.
6690         (gdb_agent_get_raw_reg): Declare.
6692 2015-02-27  Tom Tromey  <tromey@redhat.com>
6693             Pedro Alves  <palves@redhat.com>
6695         Rename symbols whose names are reserved C++ keywords throughout.
6697 2015-02-27  Pedro Alves  <palves@redhat.com>
6699         * Makefile.in (COMPILER): New, get it from autoconf.
6700         (CXX): Get from autoconf instead.
6701         (COMPILE.pre): Use COMPILER.
6702         (CC-LD): Rename to ...
6703         (CC_LD): ... this.  Use COMPILER.
6704         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6705         (CXX_FOR_TARGET): Default to g++ instead of gcc.
6706         * acinclude.m4: Include build-with-cxx.m4.
6707         * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6708         Disable -Werror by default if building in C++ mode.
6709         (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6710         -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6711         the C++ compiler.  Save/restore CXXFLAGS too.
6712         * configure: Regenerate.
6714 2015-02-27  Pedro Alves  <palves@redhat.com>
6716         * acinclude.m4: Include libiberty.m4.
6717         * configure.ac: Call libiberty_INIT.
6718         * config.in, configure: Regenerate.
6720 2015-02-26  Pedro Alves  <palves@redhat.com>
6722         * linux-low.c (linux_wait_1): When incrementing the PC past a
6723         program breakpoint always use the_low_target.breakpoint_len as
6724         increment, rather than the maximum between that and
6725         the_low_target.decr_pc_after_break.
6727 2015-02-23  Pedro Alves  <palves@redhat.com>
6729         * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6730         thread was doing a step-over; always adjust the PC if
6731         we stepped over a permanent breakpoint.
6732         (linux_wait_1): If we stepped over breakpoint that was on top of a
6733         permanent breakpoint, manually advance the PC past it.
6735 2015-02-23  Pedro Alves  <palves@redhat.com>
6737         * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6738         modes.
6739         (x86_fill_gregset, x86_store_gregset): Use it when handling
6740         $orig_eax.
6742 2015-02-20  Pedro Alves  <palves@redhat.com>
6744         * thread-db.c: Include "nat/linux-procfs.h".
6745         (thread_db_init): Skip listing new threads if the kernel supports
6746         PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6748 2015-02-20  Pedro Alves  <palves@redhat.com>
6750         * linux-low.c (status_pending_p_callback): Use ptid_match.
6752 2015-02-19  Antoine Tremblay  <antoine.tremblay@ericsson.com>
6754         PR breakpoints/16812
6755         * linux-low.c (wstatus_maybe_breakpoint): Remove.
6756         (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6757         (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6759 2015-02-10  Antoine Tremblay <antoine.tremblay@ericsson.com>
6761         PR breakpoints/15956
6762         * tracepoint.c (cmd_qtinit): Add check for current_thread.
6764 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
6766         * linux-low.c (linux_low_btrace_conf): Print size.
6767         * server.c (handle_btrace_conf_general_set): New.
6768         (hanle_general_set): Call handle_btrace_conf_general_set.
6769         (handle_query): Report Qbtrace-conf:bts:size as supported.
6771 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
6773         * linux-low.c (linux_low_enable_btrace): Update parameters.
6774         (linux_low_btrace_conf): New.
6775         (linux_target_ops)<to_btrace_conf>: Initialize.
6776         * server.c (current_btrace_conf): New.
6777         (handle_btrace_enable): Rename to ...
6778         (handle_btrace_enable_bts): ... this.  Pass &current_btrace_conf
6779         to target_enable_btrace.  Update comment.  Update users.
6780         (handle_qxfer_btrace_conf): New.
6781         (qxfer_packets): Add btrace-conf entry.
6782         (handle_query): Report qXfer:btrace-conf:read as supported packet.
6783         * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6784         (target_ops)<read_btrace_conf>: New.
6785         (target_enable_btrace): Update parameters.
6786         (target_read_btrace_conf): New.
6788 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
6790         * server.c (handle_btrace_general_set): Remove call to
6791         target_supports_btrace.
6792         (supported_btrace_packets): New.
6793         (handle_query): Call supported_btrace_packets.
6794         * target.h: include btrace-common.h.
6795         (btrace_target_info): Removed.
6796         (supports_btrace, target_supports_btrace): Update parameters.
6798 2015-02-09  Markus Metzger  <markus.t.metzger@intel.com>
6800         * Makefile.in (SFILES): Add common/btrace-common.c.
6801         (OBS): Add common/btrace-common.o.
6802         (btrace-common.o): Add build rules.
6803         * linux-low: Include btrace-common.h.
6804         (linux_low_read_btrace): Use struct btrace_data.  Call
6805         btrace_data_init and btrace_data_fini.
6807 2015-02-06  Pedro Alves  <palves@redhat.com>
6809         * thread-db.c (find_new_threads_callback): Add debug output.
6811 2015-02-04  Pedro Alves  <palves@redhat.com>
6813         * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6814         (resume_stopped_resumed_lwps): New function.
6815         (linux_wait_for_event_filtered): Use it.
6817 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
6819         * Makefile.in (SFILES): Add linux-personality.c.
6820         (linux-personality.o): New rule.
6821         * configure.srv (srv_linux_obj): Add linux-personality.o to the
6822         list of objects to be built.
6823         * linux-low.c: Include nat/linux-personality.h.
6824         (linux_create_inferior): Remove code to disable address space
6825         randomization (moved to ../nat/linux-personality.c).  Create
6826         cleanup to disable address space randomization.
6828 2015-01-15  Sergio Durigan Junior  <sergiodj@redhat.com>
6830         * Makefile.in (posix-strerror.o): New rule.
6831         (mingw-strerror.o): Likewise.
6832         * configure: Regenerated.
6833         * configure.ac: Source file ../common/common.host.  Initialize new
6834         variable srv_host_obs.  Add srv_host_obs to GDBSERVER_DEPFILES.
6836 2015-01-14  Yao Qi  <yao@codesourcery.com>
6838         * Makefile.in (SFILES): Add nat/ppc-linux.c.
6839         (ppc-linux.o): New rule.
6840         * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6841         * configure.ac: AC_CHECK_FUNCS(getauxval).
6842         * config.in: Re-generated.
6843         * configure: Re-generated.
6844         * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6845         ppc64_64bit_inferior_p
6847 2015-01-14  Yao Qi  <yao@codesourcery.com>
6849         * linux-ppc-low.c: Include "nat/ppc-linux.h".
6850          (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6851         (PPC_FEATURE_HAS_ALTIVEC,  PPC_FEATURE_HAS_SPE): Likewise.
6852         (PT_ORIG_R3, PT_TRAP): Likewise.
6853         (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6854         (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6855         (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6857 2015-01-10  Joel Brobecker  <brobecker@adacore.com>
6859         * i387-fp.c (i387_cache_to_xsave): In look over
6860         num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6861         zmmh_low_space field by use of zmmh_high_space.
6863 2015-01-09  Pedro Alves  <palves@redhat.com>
6865         * linux-low.c (step_over_bkpt): Move higher up in the file.
6866         (handle_extended_wait): Don't store the stop_pc here.
6867         (get_stop_pc): Adjust comments and rename to ...
6868         (check_stopped_by_breakpoint): ... this.  Record whether the LWP
6869         stopped for a software breakpoint or hardware breakpoint.
6870         (thread_still_has_status_pending_p): New function.
6871         (status_pending_p_callback): Use
6872         thread_still_has_status_pending_p.  If the event is no longer
6873         interesting, resume the LWP.
6874         (handle_tracepoints): Add assert.
6875         (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6876         (wstatus_maybe_breakpoint): New function.
6877         (cancel_breakpoint): Delete function.
6878         (check_stopped_by_watchpoint): New function, factored out from
6879         linux_low_filter_event.
6880         (lp_status_maybe_breakpoint): Delete function.
6881         (linux_low_filter_event): Remove filter_ptid argument.
6882         Leave thread group exits pending here.  Store the LWP's stop PC.
6883         Always leave events pending.
6884         (linux_wait_for_event_filtered): Pull all events out of the
6885         kernel, and leave them all pending.
6886         (count_events_callback, select_event_lwp_callback): Consider all
6887         events.
6888         (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6889         (select_event_lwp): Only give preference to the stepping LWP in
6890         all-stop mode.  Adjust comments.
6891         (ignore_event): New function.
6892         (linux_wait_1): Delete 'retry' label.  Use ignore_event.  Remove
6893         references to cancel_breakpoints.  Adjust to renames.  Also give
6894         equal priority to all LWPs that have had events in non-stop mode.
6895         If reporting a software breakpoint event, unadjust the LWP's PC.
6896         (linux_wait): If linux_wait_1 returned an ignored event, retry.
6897         (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6898         Adjust.
6899         (linux_resume_one_lwp): Store the LWP's PC.  Adjust.
6900         (resume_status_pending_p): Use thread_still_has_status_pending_p.
6901         (linux_stopped_by_watchpoint): Adjust.
6902         (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6903         * linux-low.h (enum lwp_stop_reason): New.
6904         (struct lwp_info) <stop_pc>: Adjust comment.
6905         <stopped_by_watchpoint>: Delete field.
6906         <stop_reason>: New field.
6907         * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6908         * mem-break.c (software_breakpoint_inserted_here)
6909         (hardware_breakpoint_inserted_here): New function.
6910         * mem-break.h (software_breakpoint_inserted_here)
6911         (hardware_breakpoint_inserted_here): Declare.
6912         * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6913         (cancel_breakpoints): Delete.
6914         * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6915         (upload_fast_traceframes): Remove references to
6916         cancel_breakpoints.
6918 2015-01-09  Pedro Alves  <palves@redhat.com>
6920         * thread-db.c (find_new_threads_callback): Ignore thread if the
6921         kernel thread ID is -1.
6923 2015-01-09  Pedro Alves  <palves@redhat.com>
6925         * linux-low.c (linux_attach_fail_reason_string): Move to
6926         nat/linux-ptrace.c, and rename.
6927         (linux_attach_lwp): Update comment.
6928         (attach_proc_task_lwp_callback): New function.
6929         (linux_attach): Adjust to rename and use
6930         linux_proc_attach_tgid_threads.
6931         (linux_attach_fail_reason_string): Delete declaration.
6933 2015-01-01  Joel Brobecker  <brobecker@adacore.com>
6935         * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6936         * server.c (gdbserver_version): Likewise.
6938 2014-12-29  Sergio Durigan Junior  <sergiodj@redhat.com>
6940         * remote-utils.c: Include ctype.h.
6941         (input_interrupt): Explicitly handle the case when the char
6942         received is the NUL byte.  Improve the printing of non-ASCII
6943         characters.
6945 2014-12-16  Joel Brobecker  <brobecker@adacore.com>
6947         * linux-low.c (linux_low_filter_event): Update call to
6948         linux_enable_event_reporting following the addition of
6949         a new parameter to that function.
6951 2014-12-16  Catalin Udma  <catalin.udma@freescale.com>
6953         PR server/17457
6954         * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6955         (AARCH64_FPCR_REGNO): Likewise.
6956         (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6957         (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6958         (aarch64_store_fpregset): Likewise.
6960 2014-12-15  Joel Brobecker  <brobecker@adacore.com>
6962         * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6963         Remove FIXME comment about assumption about N.
6965 2014-12-13  Joel Brobecker  <brobecker@adacore.com>
6967         * configure.ac: If large-file support is disabled in GDBserver,
6968         pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6969         * configure: Regenerate.
6971 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6973         * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6974         warning upon ENODATA from ptrace.
6975         * linux-s390-low.c (s390_store_tdb): New.
6976         (s390_regsets): Add regset for NT_S390_TDB.
6978 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6980         * linux-low.c (regsets_store_inferior_registers): Skip regsets
6981         without a fill_function.
6982         * linux-s390-low.c (s390_fill_last_break): Remove.
6983         (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6984         (s390_arch_setup): Use regset's size instead of fill_function for
6985         loop end condition.
6987 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6989         * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6990         the regset's store function when ptrace returned an error.
6991         * regcache.c (get_thread_regcache): Invalidate register cache
6992         before fetching inferior's registers.
6994 2014-12-12  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6996         * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6997         while-loop as for-loop.
6998         (regsets_store_inferior_registers): Likewise.
7000 2014-11-28  Yao Qi  <yao@codesourcery.com>
7002         * configure.ac(AC_CHECK_FUNCS): Remove readlink.
7003         * config.in, configure: Re-generate.
7004         * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
7005         is defined.
7007 2014-11-21  Yao Qi  <yao@codesourcery.com>
7009         * configure.ac: Don't invoke AC_FUNC_ALLOCA.
7010         (AC_CHECK_HEADERS): Remove malloc.h.
7011         * configure: Re-generated.
7012         * config.in: Re-generated.
7013         * server.h: Don't include alloca.h and malloc.h.
7014         * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
7015         Don't include malloc.h.
7017 2014-11-17  Joel Brobecker  <brobecker@adacore.com>
7019         * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
7020         corresponding ERRNO check in same block.
7022 2014-11-12  Pedro Alves  <palves@redhat.com>
7024         * server.c (cont_thread): Update comment.
7025         (start_inferior, attach_inferior): No longer clear cont_thread.
7026         (handle_v_cont): No longer set cont_thread.
7027         (captured_main): Clear cont_thread each time a GDB connects.
7029 2014-11-12  Pedro Alves  <palves@redhat.com>
7031         * linux-low.c (linux_wait_1): Don't force a wait for the Hc
7032         thread, and don't resume all threads if the Hc thread has exited.
7034 2014-11-12  Pedro Alves  <palves@redhat.com>
7036         * linux-low.c (linux_request_interrupt): Always send a SIGINT to
7037         the process group instead of to a specific LWP.
7039 2014-10-15  Pedro Alves  <palves@redhat.com>
7041         PR server/17487
7042         * win32-arm-low.c (arm_set_thread_context): Remove current_event
7043         parameter.
7044         (arm_set_thread_context): Delete.
7045         (the_low_target): Adjust.
7046         * win32-i386-low.c (debug_registers_changed)
7047         (debug_registers_used): Delete.
7048         (update_debug_registers_callback): New function.
7049         (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
7050         needing to update their debug registers.
7051         (win32_get_current_dr): New function.
7052         (x86_dr_low_get_addr, x86_dr_low_get_control)
7053         (x86_dr_low_get_status): Fetch the debug register from the thread
7054         record's context.
7055         (i386_initial_stuff): Adjust.
7056         (i386_get_thread_context): Remove current_event parameter.  Don't
7057         clear debug_registers_changed nor copy DR values to
7058         debug_reg_state.
7059         (i386_set_thread_context): Delete.
7060         (i386_prepare_to_resume): New function.
7061         (i386_thread_added): Mark the thread as needing to update irs
7062         debug registers.
7063         (the_low_target): Remove i386_set_thread_context and install
7064         i386_prepare_to_resume.
7065         * win32-low.c (win32_get_thread_context): Adjust.
7066         (win32_set_thread_context): Use SetThreadContext
7067         directly.
7068         (win32_prepare_to_resume): New function.
7069         (win32_require_context): New function, factored out from ...
7070         (thread_rec): ... this.
7071         (continue_one_thread): Call win32_prepare_to_resume on each thread
7072         we're about to continue.
7073         (win32_resume): Call win32_prepare_to_resume on the event thread.
7074         * win32-low.h (struct win32_thread_info)
7075         <debug_registers_changed>: New field.
7076         (struct win32_target_ops): Change prototype of set_thread_context,
7077         delete set_thread_context and add prepare_to_resume.
7078         (win32_require_context): New declaration.
7080 2014-10-08  Gary Benson  <gbenson@redhat.com>
7082         * server.h: Do not include common-exceptions.h.
7084 2014-10-08  Gary Benson  <gbenson@redhat.com>
7086         * server.h: Do not include cleanups.h.
7088 2014-09-30  James Hogan  <james.hogan@imgtec.com>
7090         * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7091         mips64-dsp-linux.c.
7093 2014-09-23  Yao Qi  <yao@codesourcery.com>
7095         * linux-low.c (lp_status_maybe_breakpoint): New function.
7096         (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7097         (count_events_callback): Likewise.
7098         (select_event_lwp_callback): Likewise.
7099         (cancel_breakpoints_callback): Likewise.
7101 2014-09-19  Don Breazeal  <donb@codesourcery.com>
7103         * linux-low.c (handle_extended_wait): Call
7104         linux_ptrace_get_extended_event.
7105         (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7106         linux_is_extended_waitstatus.
7108 2014-09-16  Joel Brobecker  <brobecker@adacore.com>
7110         * Makefile.in (CPPFLAGS): Define.
7111         (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7112         (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7114 2014-09-16  Gary Benson  <gbenson@redhat.com>
7116         * inferiors.h (current_inferior): Renamed as...
7117         (current_thread): New variable.  All uses updated.
7118         * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7119         (maybe_move_out_of_jump_pad): Likewise.
7120         (cancel_breakpoint): Likewise.
7121         (linux_low_filter_event): Likewise.
7122         (wait_for_sigstop): Likewise.
7123         (linux_resume_one_lwp): Likewise.
7124         (need_step_over_p): Likewise.
7125         (start_step_over): Likewise.
7126         (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7127         * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7128         * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7129         and save_inferior as saved_thread.
7130         * regcache.c (get_thread_regcache): Renamed saved_inferior as
7131         saved_thread.
7132         (regcache_invalidate_thread): Likewise.
7133         * remote-utils.c (prepare_resume_reply): Likewise.
7134         * thread-db.c (thread_db_get_tls_address): Likewise.
7135         (disable_thread_event_reporting): Likewise.
7136         (remove_thread_event_breakpoints): Likewise.
7137         * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7138         as saved_thread.
7139         * target.h (set_desired_inferior): Renamed as...
7140         (set_desired_thread): New declaration.  All uses updated.
7141         * server.c (myresume): Updated comment to reference thread instead
7142         of inferior.
7143         (handle_serial_event): Likewise.
7144         (handle_target_event): Likewise.
7146 2014-09-12  Tom Tromey  <tromey@redhat.com>
7147             Gary Benson  <gbenson@redhat.com>
7149         * regcache.h: Include common-regcache.h.
7150         (regcache_read_pc): Don't declare.
7151         * regcache.c (get_thread_regcache_for_ptid): New function.
7153 2014-09-11  Tom Tromey  <tromey@redhat.com>
7154             Gary Benson  <gbenson@redhat.com>
7156         * symbol.c: New file.
7157         * Makefile.in (SFILES): Add symbol.c.
7158         (OBS): Add symbol.o.
7160 2014-09-11  Gary Benson  <gbenson@redhat.com>
7162         * target.c (target_stop_ptid, target_continue_ptid): New
7163         functions.
7165 2014-09-11  Tom Tromey  <tromey@redhat.com>
7166             Gary Benson  <gbenson@redhat.com>
7168         * target.h: Include target/target.h.
7169         * target.c (target_read_memory, target_read_uint32)
7170         (target_write_memory): New functions.
7172 2014-09-11  Gary Benson  <gbenson@redhat.com>
7174         * server.h (debug_hw_points): Don't declare.
7175         * server.c (debug_hw_points): Don't define.  Replace all uses
7176         with show_debug_regs.
7177         * linux-aarch64-low.c (debug_hw_points): Don't define.  Replace
7178         all uses with show_debug_regs.
7180 2014-09-08  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
7182         * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7183         endianness into account.
7184         (ppc_supply_ptrace_register): Likewise.
7186 2014-09-03  James Hogan  <james.hogan@imgtec.com>
7188         * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7189         to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7191 2014-09-03  Gary Benson  <gbenson@redhat.com>
7193         * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7194         ALL_DEBUG_ADDRESS_REGISTERS.
7196 2014-09-02  Gary Benson  <gbenson@redhat.com>
7198         * i386-low.h: Renamed as...
7199         * x86-low.h: New file.  All type, function and variable name
7200         prefixes changed from "i386_" to "x86_".  All references updated.
7201         * i386-low.c: Renamed as...
7202         * x86-low.c: New file.  All type, function and variable name
7203         prefixes changed from "i386_" to "x86_".  All references updated.
7205 2014-09-02  Gary Benson  <gbenson@redhat.com>
7207         * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7208         (x86_linux_new_thread): Likewise.
7210 2014-08-29  Gary Benson  <gbenson@redhat.com>
7212         * server.h (setjmp.h): Do not include.
7213         (toplevel): Do not declare.
7214         (common-exceptions.h): Include.
7215         (cleanups.h): Likewise.
7216         * server.c (toplevel): Do not define.
7217         (exit_code): New static global.
7218         (detach_or_kill_for_exit_cleanup): New function.
7219         (main): New function.  Original main renamed to...
7220         (captured_main): New function.
7221         * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7223 2014-08-29  Gary Benson  <gbenson@redhat.com>
7225         * Makefile.in (SFILES): Add common/common-exceptions.c.
7226         (OBS): Add common-exceptions.o.
7227         (common-exceptions.o): New rule.
7228         * utils.c (prepare_to_throw_exception): New function.
7230 2014-08-29  Gary Benson  <gbenson@redhat.com>
7232         * config.in: Regenerate.
7233         * configure: Likewise.
7235 2014-08-29  Gary Benson  <gbenson@redhat.com>
7237         * Makefile.in (SFILES): Add common/cleanups.c.
7238         (OBS): cleanups.o.
7239         (cleanups.o): New rule.
7241 2014-08-29  Gary Benson  <gbenson@redhat.com>
7243         * utils.c (internal_vwarning): New function.
7245 2014-08-28  Gary Benson  <gbenson@redhat.com>
7247         * utils.h (fatal): Remove declaration.
7248         * utils.c (fatal): Remove function.
7250 2014-08-28  Gary Benson  <gbenson@redhat.com>
7252         * tracepoint.c (gdb_agent_init): Replace fatal with
7253         perror_with_name.
7254         (initialize_tracepoint): Likewise.
7256 2014-08-28  Gary Benson  <gbenson@redhat.com>
7258         * remote-utils.c (remote_prepare): Replace fatal with error.
7260 2014-08-28  Gary Benson  <gbenson@redhat.com>
7262         * linux-low.c (linux_async): Replace fatal with warning.
7263         Tidy up and return.
7264         (linux_start_non_stop): Return -1 if linux_async failed.
7266 2014-08-28  Gary Benson  <gbenson@redhat.com>
7268         * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7269         gdb_assert.
7270         (i386_dr_low_get_addr): Remove vague comment.
7271         * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7272         gdb_assert.
7274 2014-08-28  Gary Benson  <gbenson@redhat.com>
7276         * inferiors.c (get_thread_process): Replace check with gdb_assert.
7277         * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7278         internal_error.
7279         (linux_resume_one_lwp): Likewise.
7280         * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7281         gdb_assert.
7282         * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7283         with internal_error.
7284         * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7285         (init_register_cache): Replace fatal with gdb_assert_not_reached.
7286         (find_register_by_name): Replace fatal with internal_error.
7287         (find_regno): Likewise.
7288         * tdesc.c (init_target_desc): Replace check with gdb_assert.
7289         * thread-db.c (thread_db_create_event): Likewise.
7290         (thread_db_load_search): Likewise.
7291         (try_thread_db_load_1): Likewise.
7292         * tracepoint.c (get_jump_space_head): Replace fatal with
7293         internal_error.
7294         (claim_trampoline_space): Likewise.
7295         (have_fast_tracepoint_trampoline_buffer): Likewise.
7296         (cmd_qtstart): Likewise.
7297         (stop_tracing): Likewise.
7298         (fast_tracepoint_collecting): Likewise.
7299         (target_malloc): Likewise.
7300         (download_tracepoint): Likewise.
7301         (download_trace_state_variables): Replace check with gdb_assert.
7302         (upload_fast_traceframes): Replace fatal with internal_error.
7304 2014-08-19  Tom Tromey  <tromey@redhat.com>
7305             Gary Benson  <gbenson@redhat.com>
7307         * Makefile.in (SFILES): Add common/common-debug.c.
7308         (OBS): Add common-debug.o.
7309         (common-debug.o): New rule.
7310         * debug.h (debug_printf): Don't declare.
7311         * debug.c (debug_printf): Renamed and rewritten as...
7312         (debug_vprintf): New function.
7314 2014-08-19  Gary Benson  <gbenson@redhat.com>
7316         * utils.h: Do not include print-utils.h.
7318 2014-08-19  Tom Tromey  <tromey@redhat.com>
7319             Gary Benson  <gbenson@redhat.com>
7321         * server.h: Add static assertion.
7322         (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7324 2014-08-19  Tom Tromey  <tromey@redhat.com>
7325             Gary Benson  <gbenson@redhat.com>
7327         * Makefile.in (SFILES): Add common/errors.c.
7328         (OBS): Add errors.o.
7329         (IPA_OBS): Add errors-ipa.o.
7330         (errors.o): New rule.
7331         (errors-ipa.o): Likewise.
7332         * utils.h (perror_with_name, error, warning): Don't declare.
7333         * utils.c (warning): Renamed and rewritten as...
7334         (vwarning): New function.
7335         (error): Renamed and rewritten as...
7336         (verror): New function.
7337         (internal_error): Renamed and rewritten as...
7338         (internal_verror): New function.
7340 2014-08-07  Gary Benson  <gbenson@redhat.com>
7342         * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7343         * configure: Regenerate.
7344         * config.in: Likewise.
7345         * server.h: Do not include errno.h.
7346         * event-loop.c: Likewise.
7347         * hostio-errno.c: Likewise.
7348         * linux-low.c: Likewise.
7349         * remote-utils.c: Likewise.
7350         * spu-low.c: Likewise.
7351         * utils.c: Likewise.
7352         * gdbreplay.c: Unconditionally include errno.h.
7354 2014-08-07  Gary Benson  <gbenson@redhat.com>
7356         * server.h: Do not include string.h.
7357         * event-loop.c: Likewise.
7358         * linux-low.c: Likewise.
7359         * regcache.c: Likewise.
7360         * remote-utils.c: Likewise.
7361         * spu-low.c: Likewise.
7362         * utils.c: Likewise.
7364 2014-08-07  Gary Benson  <gbenson@redhat.com>
7366         * server.h: Do not include gdb_assert.h.
7368 2014-08-07  Gary Benson  <gbenson@redhat.com>
7370         * server.h: Do not include common-utils.h.
7372 2014-08-07  Gary Benson  <gbenson@redhat.com>
7374         * server.h: Do not include ptid.h.
7375         * notif.h: Likewise.
7377 2014-08-07  Gary Benson  <gbenson@redhat.com>
7379         * server.h: Do not include gdb_locale.h.
7381 2014-08-07  Gary Benson  <gbenson@redhat.com>
7383         * server.h: Do not include gdb/signals.h.
7384         * win32-low.c: Likewise.
7386 2014-08-07  Gary Benson  <gbenson@redhat.com>
7388         * server.h: Do not include pathmax.h.
7390 2014-08-07  Gary Benson  <gbenson@redhat.com>
7392         * server.h: Do not include libiberty.h.
7393         * linux-bfin-low.c: Likewise.
7395 2014-08-07  Gary Benson  <gbenson@redhat.com>
7397         * server.h: Do not include ansidecl.h.
7399 2014-08-07  Gary Benson  <gbenson@redhat.com>
7401         * linux-x86-low.c: Do not include stddef.h.
7402         * lynx-ppc-low.c: Likewise.
7403         * tracepoint.c: Likewise.
7405 2014-08-07  Gary Benson  <gbenson@redhat.com>
7407         * server.h: Do not include stdarg.h.
7408         * nto-low.c: Likewise.
7410 2014-08-07  Gary Benson  <gbenson@redhat.com>
7412         * server.h: Do not include stdlib.h.
7413         * inferiors.c: Likewise.
7414         * linux-low.c: Likewise.
7415         * regcache.c: Likewise.
7416         * spu-low.c: Likewise.
7417         * tracepoint.c: Likewise.
7418         * utils.c: Likewise.
7420 2014-08-07  Gary Benson  <gbenson@redhat.com>
7422         * server.h: Do not include stdio.h.
7423         * linux-low.c: Likewise.
7424         * remote-utils.c: Likewise.
7425         * spu-low.c: Likewise.
7426         * utils.c: Likewise.
7427         * wincecompat.c: Likewise.
7429 2014-08-06  Gary Benson  <gbenson@redhat.com>
7431         * regcache.c (init_register_cache): Move conditionals inside if.
7433 2014-08-06  Gary Benson  <gbenson@redhat.com>
7435         * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7437 2014-07-31  Gary Benson  <gbenson@redhat.com>
7439         * ax.h: Do not include server.h.
7440         * gdbthread.h: Likewise.
7441         * lynx-low.h: Likewise.
7442         * notif.h: Likewise.
7444 2014-07-30  Gary Benson  <gbenson@redhat.com>
7446         * server.h: Include common-defs.h.
7447         Do not include config.h or build-gnulib-gdbserver/config.h.
7449 2014-07-30  Gary Benson  <gbenson@redhat.com>
7451         * hostio-errno.c: Move server.h to top of includes list.
7452         * inferiors.c: Likewise.
7453         * linux-x86-low.c: Likewise.
7454         * notif.c: Include server.h.
7456 2014-07-24  Tom Tromey  <tromey@redhat.com>
7457             Gary Benson  <gbenson@redhat.com>
7459         * server.h (CORE_ADDR): Now unsigned.
7461 2014-07-16  Pedro Alves  <palves@redhat.com>
7463         * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7465 2014-07-15  Pedro Alves  <palves@redhat.com>
7467         * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7468         copy.
7470 2014-07-11  Pedro Alves  <palves@redhat.com>
7472         * linux-low.c (kill_wait_lwp): New function, based on
7473         kill_one_lwp_callback, but use my_waitpid directly.
7474         (kill_one_lwp_callback, linux_kill): Use it.
7476 2014-06-23  Pedro Alves  <palves@redhat.com>
7478         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7479         before setting DR0..DR3.
7481 2014-06-20  Gary Benson  <gbenson@redhat.com>
7483         * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7484         * configure: Regenerated.
7485         * config.in: Likewise.
7487 2014-06-20  Gary Benson  <gbenson@redhat.com>
7489         * Makefile.in (SFILES): Update locations for files moved
7490         from common to nat.
7491         (object file files): Reordered.
7493 2014-06-20  Gary Benson  <gbenson@redhat.com>
7495         * i386-low.h (i386_dr_low_can_set_addr): Removed.
7496         (i386_dr_low_set_addr): Likewise.
7497         (i386_dr_low_get_addr): Likewise.
7498         (i386_dr_low_can_set_control): Likewise.
7499         (i386_dr_low_set_control): Likewise.
7500         (i386_dr_low_get_control): Likewise.
7501         (i386_dr_low_get_status): Likewise.
7502         (i386_get_debug_register_length): Likewise.
7503         * linux-x86-low.c (i386_dr_low_set_addr):
7504         Changed signature.  Made static.
7505         (i386_dr_low_get_addr): Likewise.
7506         (i386_dr_low_set_control): Likewise.
7507         (i386_dr_low_get_control): Likewise.
7508         (i386_dr_low_get_status): Likewise.
7509         (i386_dr_low): New global variable.
7510         * win32-i386-low.c (i386_dr_low_set_addr):
7511         Changed signature.  Made static.
7512         (i386_dr_low_get_addr): Likewise.
7513         (i386_dr_low_set_control): Likewise.
7514         (i386_dr_low_get_control): Likewise.
7515         (i386_dr_low_get_status): Likewise.
7516         (i386_dr_low): New global variable.
7518 2014-06-20  Marcus Shawcroft  <marcus.shawcroft@arm.com>
7520         * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7521         * Makefile.in (AR, AR_FLAGS): Define.
7522         * configure: Regenerate.
7524 2014-06-19  Gary Benson  <gbenson@redhat.com>
7526         * Makefile.in (i386-dregs.o): New rule.
7527         * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7528         * i386-low.c (target.h): Remove include.
7529         (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7530         (DR_CONTROL_SHIFT): Likewise.
7531         (DR_CONTROL_SIZE): Likewise.
7532         (DR_RW_EXECUTE): Likewise.
7533         (DR_RW_WRITE): Likewise.
7534         (DR_RW_READ): Likewise.
7535         (DR_RW_IORW): Likewise.
7536         (DR_LEN_1): Likewise.
7537         (DR_LEN_2): Likewise.
7538         (DR_LEN_4): Likewise.
7539         (DR_LEN_8): Likewise.
7540         (DR_LOCAL_ENABLE_SHIFT): Likewise.
7541         (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7542         (DR_ENABLE_SIZE): Likewise.
7543         (DR_LOCAL_SLOWDOWN): Likewise.
7544         (DR_GLOBAL_SLOWDOWN): Likewise.
7545         (DR_CONTROL_RESERVED): Likewise.
7546         (I386_DR_CONTROL_MASK): Likewise.
7547         (I386_DR_VACANT): Likewise.
7548         (I386_DR_LOCAL_ENABLE): Likewise.
7549         (I386_DR_GLOBAL_ENABLE): Likewise.
7550         (I386_DR_DISABLE): Likewise.
7551         (I386_DR_SET_RW_LEN): Likewise.
7552         (I386_DR_GET_RW_LEN): Likewise.
7553         (I386_DR_WATCH_HIT): Likewise.
7554         (i386_wp_op_t): Likewise.
7555         (i386_show_dr): Likewise.
7556         (i386_length_and_rw_bits): Likewise.
7557         (i386_insert_aligned_watchpoint): Likewise.
7558         (i386_remove_aligned_watchpoint): Likewise.
7559         (i386_handle_nonaligned_watchpoint): Likewise.
7560         i386_update_inferior_debug_regs(): Likewise.
7561         (i386_dr_insert_watchpoint): Likewise.
7562         (i386_dr_remove_watchpoint): Likewise.
7563         (i386_dr_region_ok_for_watchpoint): Likewise.
7564         (i386_dr_stopped_data_address): Likewise.
7565         (i386_dr_stopped_by_watchpoint): Likewise.
7567 2014-06-19  Gary Benson  <gbenson@redhat.com>
7569         * i386-low.c (i386_dr_show): Renamed to
7570         i386_show_dr and made static.  All uses updated.
7571         (i386_dr_length_and_rw_bits): Renamed to
7572         i386_length_and_rw_bits and made static.
7573         All uses updated.
7574         (i386_dr_insert_aligned_watchpoint): Renamed to
7575         i386_insert_aligned_watchpoint and made static.
7576         All uses updated.
7577         (i386_dr_remove_aligned_watchpoint): Renamed to
7578         i386_remove_aligned_watchpoint and made static.
7579         All uses updated.
7580         (i386_dr_update_inferior_debug_regs): Renamed to
7581         i386_update_inferior_debug_regs and made static.
7582         All uses updated.
7584 2014-06-18  Gary Benson  <gbenson@redhat.com>
7586         * i386-low.h (i386_dr_low_can_set_addr): New macro.
7587         (i386_dr_low_can_set_control): Likewise.
7588         (i386_get_debug_register_length): Likewise.
7589         * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7590         (i386_dr_low_can_set_control): Likewise.
7591         (i386_get_debug_register_length): Likewise.
7593 2014-06-17  Gary Benson  <gbenson@redhat.com>
7595         * i386-low.h (i386-dregs.h): New include.
7596         (DR_FIRSTADDR): Now in i386-dregs.h.
7597         (DR_LASTADDR): Likewise.
7598         (DR_NADDR): Likewise.
7599         (DR_STATUS): Likewise.
7600         (DR_CONTROL): Likewise.
7601         (i386_debug_reg_state): Likewise.
7602         (i386_dr_insert_watchpoint): Likewise.
7603         (i386_dr_remove_watchpoint): Likewise.
7604         (i386_dr_region_ok_for_watchpoint): Likewise.
7605         (i386_dr_stopped_data_address): Likewise.
7606         (i386_dr_stopped_by_watchpoint): Likewise.
7607         * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7609 2014-06-18  Gary Benson  <gbenson@redhat.com>
7611         * i386-low.h (i386_low_insert_watchpoint): Renamed to
7612         i386_dr_insert_watchpoint.
7613         (i386_low_remove_watchpoint): Renamed to
7614         i386_dr_remove_watchpoint.
7615         (i386_low_region_ok_for_watchpoint): Renamed to
7616         i386_dr_region_ok_for_watchpoint.
7617         (i386_low_stopped_data_address): Renamed to
7618         i386_dr_stopped_data_address.
7619         (i386_low_stopped_by_watchpoint): Renamed to
7620         i386_dr_stopped_by_watchpoint.
7621         * i386-low.c (i386_show_dr): Renamed to
7622         i386_dr_show and made nonstatic.  All uses updated.
7623         (i386_length_and_rw_bits): Renamed to
7624         i386_dr_length_and_rw_bits and made nonstatic.
7625         All uses updated.
7626         (i386_insert_aligned_watchpoint): Renamed to
7627         i386_dr_insert_aligned_watchpoint and made nonstatic.
7628         All uses updated.
7629         (i386_remove_aligned_watchpoint): Renamed to
7630         i386_dr_remove_aligned_watchpoint and made nonstatic.
7631         All uses updated.
7632         (i386_update_inferior_debug_regs): Renamed to
7633         i386_dr_update_inferior_debug_regs and made nonstatic.
7634         All uses updated.
7635         (i386_low_insert_watchpoint): Renamed to
7636         i386_dr_insert_watchpoint.  All uses updated.
7637         (i386_low_remove_watchpoint): Renamed to
7638         i386_dr_remove_watchpoint.  All uses updated.
7639         (i386_low_region_ok_for_watchpoint): Renamed to
7640         i386_dr_region_ok_for_watchpoint.  All uses updated.
7641         (i386_low_stopped_data_address): Renamed to
7642         i386_dr_stopped_data_address.  All uses updated.
7643         (i386_low_stopped_by_watchpoint): Renamed to
7644         i386_dr_stopped_by_watchpoint.  All uses updated.
7646 2014-06-18  Gary Benson  <gbenson@redhat.com>
7648         * i386-low.c (i386_dr_low_can_set_addr): New macro.
7649         (i386_dr_low_can_set_control): Likewise.
7650         (i386_insert_aligned_watchpoint): New check.
7652 2014-06-18  Gary Benson  <gbenson@redhat.com>
7654         * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7655         Renamed to state.
7657 2014-06-18  Gary Benson  <gbenson@redhat.com>
7659         * i386-low.c (i386_length_and_rw_bits): Use internal_error
7660         instead of fatal and error.
7661         (i386_handle_nonaligned_watchpoint): Likewise.
7663 2014-06-18  Gary Benson  <gbenson@redhat.com>
7665         * i386-low.c (i386_get_debug_register_length): New macro.
7666         (TARGET_HAS_DR_LEN_8): Remove conditional.  Use above macro.
7667         (i386_show_dr): Use debug_printf instead of fprintf.  Use
7668         phex to format values.
7670 2014-06-18  Gary Benson  <gbenson@redhat.com>
7672         * i386-low.h: Comment changes.
7673         * i386-low.c: Likewise.
7675 2014-06-18  Gary Benson  <gbenson@redhat.com>
7677         * i386-low.c: Whitespace changes.
7679 2014-06-12  Tom Tromey  <tromey@redhat.com>
7681         * utils.c (freeargv): Remove.
7683 2014-06-12  Tom Tromey  <tromey@redhat.com>
7685         * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7686         * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7687         (parse_debug_format_options): Likewise.
7688         (gdbserver_usage): Likewise.
7689         * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7690         (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7691         (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7692         against libiberty.
7693         ($(LIBGNU)): Depend on libiberty.
7694         (all-lib): Recurse into all subdirs.
7695         (install-only): Invoke "install" target in subdirs.
7696         (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7697         targets.
7698         * configure: Rebuild.
7699         * configure.ac: Add ACX_CONFIGURE_DIR for libiberty.  Don't check
7700         for vasprintf, vsnprintf, or gettimeofday.
7701         * configure.srv: Don't add safe-ctype.o or lbasename.o to
7702         srv_tgtobj.
7704 2014-06-05  Joel Brobecker  <brobecker@adacore.com>
7706         * development.sh: Delete.
7707         * Makefile.in (config.status): Adjust dependency on development.sh.
7708         * configure.ac: Adjust development.sh source call.
7709         * configure: Regenerate.
7711 2014-06-02  Pedro Alves  <palves@redhat.com>
7713         * ax.c (gdb_free_agent_expr): New function.
7714         * ax.h (gdb_free_agent_expr): New declaration.
7715         * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7716         list.
7717         (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7718         static.
7719         (clear_breakpoint_conditions_and_commands): New function.
7720         * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7721         (clear_breakpoint_conditions_and_commands): New declaration.
7723 2014-05-23  Ramana Radhakrishnan  <ramana.radhakrishnan@arm.com>
7725         * linux-aarch64-low.c (asm/ptrace.h): Include.
7727 2014-05-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
7729         Fix TLS access for -static -pthread.
7730         * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7731         (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7732         (thread_db_load_search, try_thread_db_load_1): Initialize it.
7734 2014-05-20  Pedro Alves  <palves@redhat.com>
7736         * linux-aarch64-low.c (aarch64_insert_point)
7737         (aarch64_remove_point): No longer check whether the type is
7738         supported here.  Adjust to new interface.
7739         (the_low_target): Install aarch64_supports_z_point_type as
7740         supports_z_point_type method.
7741         * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7742         (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7743         instead of a Z packet char.  Adjust.
7744         (arm_supports_z_point_type): New function.
7745         (arm_insert_point, arm_remove_point): Adjust to new interface.
7746         (the_low_target): Install arm_supports_z_point_type.
7747         * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7748         (cris_insert_point, cris_remove_point): Adjust to new interface.
7749         Don't check whether the type is supported here.
7750         (the_low_target): Install cris_supports_z_point_type.
7751         * linux-low.c (linux_supports_z_point_type): New function.
7752         (linux_insert_point, linux_remove_point): Adjust to new interface.
7753         * linux-low.h (struct linux_target_ops) <insert_point,
7754         remove_point>: Take an enum raw_bkpt_type instead of a char.  Add
7755         raw_breakpoint pointer parameter.
7756         <supports_z_point_type>: New method.
7757         * linux-mips-low.c (mips_supports_z_point_type): New function.
7758         (mips_insert_point, mips_remove_point): Adjust to new interface.
7759         Use mips_supports_z_point_type.
7760         (the_low_target): Install mips_supports_z_point_type.
7761         * linux-ppc-low.c (the_low_target): Install NULL as
7762         supports_z_point_type method.
7763         * linux-s390-low.c (the_low_target): Install NULL as
7764         supports_z_point_type method.
7765         * linux-sparc-low.c (the_low_target): Install NULL as
7766         supports_z_point_type method.
7767         * linux-x86-low.c (x86_supports_z_point_type): New function.
7768         (x86_insert_point): Adjust to new insert_point interface.  Use
7769         insert_memory_breakpoint.  Adjust to new
7770         i386_low_insert_watchpoint interface.
7771         (x86_remove_point): Adjust to remove_point interface.  Use
7772         remove_memory_breakpoint.  Adjust to new
7773         i386_low_remove_watchpoint interface.
7774         (the_low_target): Install x86_supports_z_point_type.
7775         * lynx-low.c (lynx_target_ops): Install NULL as
7776         supports_z_point_type callback.
7777         * nto-low.c (nto_supports_z_point_type): New.
7778         (nto_insert_point, nto_remove_point): Adjust to new interface.
7779         (nto_target_ops): Install nto_supports_z_point_type.
7780         * mem-break.c: Adjust intro comment.
7781         (struct raw_breakpoint) <raw_type, size>: New fields.
7782         <inserted>: Update comment.
7783         <shlib_disabled>: Delete field.
7784         (enum bkpt_type) <gdb_breakpoint>: Delete value.
7785         <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7786         gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7787         (raw_bkpt_type_to_target_hw_bp_type): New function.
7788         (find_enabled_raw_code_breakpoint_at): New function.
7789         (find_raw_breakpoint_at): New type and size parameters.  Use them.
7790         (insert_memory_breakpoint): New function, based off
7791         set_raw_breakpoint_at.
7792         (remove_memory_breakpoint): New function.
7793         (set_raw_breakpoint_at): Reimplement.
7794         (set_breakpoint): New, based on set_breakpoint_at.
7795         (set_breakpoint_at): Reimplement.
7796         (delete_raw_breakpoint): Go through the_target->remove_point
7797         instead of assuming memory breakpoints.
7798         (find_gdb_breakpoint_at): Delete.
7799         (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7800         (find_gdb_breakpoint): New function.
7801         (set_gdb_breakpoint_at): Delete.
7802         (z_type_supported): New function.
7803         (set_gdb_breakpoint_1): New function, loosely based off
7804         set_gdb_breakpoint_at.
7805         (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7806         (delete_gdb_breakpoint_at): Delete.
7807         (delete_gdb_breakpoint_1): New function, loosely based off
7808         delete_gdb_breakpoint_at.
7809         (delete_gdb_breakpoint): New function.
7810         (clear_gdb_breakpoint_conditions): Rename to ...
7811         (clear_breakpoint_conditions): ... this.  Don't handle a NULL
7812         breakpoint.
7813         (add_condition_to_breakpoint): Make static.
7814         (add_breakpoint_condition): Take a struct breakpoint pointer
7815         instead of an address.  Adjust.
7816         (gdb_condition_true_at_breakpoint): Rename to ...
7817         (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7818         z_type parameter.
7819         (gdb_condition_true_at_breakpoint): Reimplement.
7820         (add_breakpoint_commands): Take a struct breakpoint pointer
7821         instead of an address.  Adjust.
7822         (gdb_no_commands_at_breakpoint): Rename to ...
7823         (gdb_no_commands_at_breakpoint_z_type): ... this.  Add z_type
7824         parameter.  Return true if no breakpoint was found.  Change debug
7825         output.
7826         (gdb_no_commands_at_breakpoint): Reimplement.
7827         (run_breakpoint_commands): Rename to ...
7828         (run_breakpoint_commands_z_type): ... this.  Add z_type parameter,
7829         and change return type to boolean.
7830         (run_breakpoint_commands): New function.
7831         (gdb_breakpoint_here): Also check for Z1 breakpoints.
7832         (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7833         breakpoint.  Go through the_target->remove_point instead of
7834         assuming memory breakpoint.
7835         (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7836         software and hardware breakpoints.
7837         (reinsert_raw_breakpoint): Go through the_target->insert_point
7838         instead of assuming memory breakpoint.
7839         (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7840         software and hardware breakpoints.
7841         (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7842         Check both software and hardware breakpoints.
7843         (validate_inserted_breakpoint): Assert the breakpoint is a
7844         software breakpoint.  Set the inserted flag to -1 instead of
7845         setting shlib_disabled.
7846         (delete_disabled_breakpoints): Adjust.
7847         (validate_breakpoints): Only validate software breakpoints.
7848         Adjust to inserted flag change.
7849         (check_mem_read, check_mem_write): Skip breakpoint types other
7850         than software breakpoints.  Adjust to inserted flag change.
7851         * mem-break.h (enum raw_bkpt_type): New enum.
7852         (raw_breakpoint, struct process_info): Forward declare.
7853         (Z_packet_to_target_hw_bp_type): Delete declaration.
7854         (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7855         (set_gdb_breakpoint, delete_gdb_breakpoint)
7856         (clear_breakpoint_conditions): New declarations.
7857         (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7858         (breakpoint_inserted_here): Update comment.
7859         (add_breakpoint_condition, add_breakpoint_commands): Replace
7860         address parameter with a breakpoint pointer parameter.
7861         (gdb_breakpoint_here): Update comment.
7862         (delete_gdb_breakpoint_at): Delete.
7863         (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7864         * server.c (process_point_options): Take a struct breakpoint
7865         pointer instead of an address.  Adjust.
7866         (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7867         delete_gdb_breakpoint.
7868         * spu-low.c (spu_target_ops): Install NULL as
7869         supports_z_point_type method.
7870         * target.h: Include mem-break.h.
7871         (struct target_ops) <prepare_to_access_memory>: Update comment.
7872         <supports_z_point_type>: New field.
7873         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7874         instead of a char.  Also take a raw breakpoint pointer.
7875         * win32-arm-low.c (the_low_target): Install NULL as
7876         supports_z_point_type.
7877         * win32-i386-low.c (i386_supports_z_point_type): New function.
7878         (i386_insert_point, i386_remove_point): Adjust to new interface.
7879         (the_low_target): Install i386_supports_z_point_type.
7880         * win32-low.c (win32_supports_z_point_type): New function.
7881         (win32_insert_point, win32_remove_point): Adjust to new interface.
7882         (win32_target_ops): Install win32_supports_z_point_type.
7883         * win32-low.h (struct win32_target_ops):
7884         <supports_z_point_type>: New method.
7885         <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7886         instead of a char.  Also take a raw breakpoint pointer.
7888 2014-05-20  Pedro Alves  <palves@redhat.com>
7890         * mem-break.h: Include break-common.h.
7891         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7892         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7893         (Z_packet_to_target_hw_bp_type): New declaration.
7894         * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7895         * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7896         (Z_PACKET_ACCESS_WP): Delete macros.
7897         (Z_packet_to_hw_type): Delete function.
7898         * i386-low.h: Don't include break-common.h here.
7899         (Z_packet_to_hw_type): Delete declaration.
7900         * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7901         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7902         * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7903         Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7904         * linux-aarch64-low.c: Don't include break-common.h here.
7905         (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7906         (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7907         (Z_packet_to_target_hw_bp_type): Delete function.
7908         * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7909         function.
7910         (mips_insert_point, mips_remove_point): Use
7911         Z_packet_to_target_hw_bp_type.
7913 2014-05-20  Pedro Alves  <palves@redhat.com>
7915         * linux-aarch64-low.c: Include break-common.h.
7916         (enum target_point_type): Delete.
7917         (Z_packet_to_point_type): Rename to ...
7918         (Z_packet_to_target_hw_bp_type): ... this, and return a
7919         target_hw_bp_type instead.
7920         (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7921         instead of an enum target_point_type.
7922         (aarch64_point_encode_ctrl_reg): Likewise.  Compute type mask from
7923         breakpoint type.
7924         (aarch64_dr_state_insert_one_point)
7925         (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7926         (aarch64_handle_aligned_watchpoint)
7927         (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7928         Take an enum target_hw_bp_type instead of an enum
7929         target_point_type.
7930         (aarch64_supports_z_point_type): New function.
7931         (aarch64_insert_point, aarch64_remove_point): Use it.  Adjust to
7932         use Z_packet_to_target_hw_bp_type.
7934 2014-05-20  Joel Brobecker  <brobecker@adacore.com>
7936         * configure.ac: Only use -Werror by default when DEVELOPMENT
7937         is true.
7938         * configure: Regenerate.
7940 2014-05-19  Jan Kratochvil  <jan.kratochvil@redhat.com>
7942         Fix gdbserver qGetTLSAddr for x86_64 -m32.
7943         * linux-x86-low.c (X86_64_USER_REGS): New.
7944         (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7946 2014-04-28  Yao Qi  <yao@codesourcery.com>
7948         * Makefile.in (i386-avx512.c): Fix the typo of generated file
7949         name.
7951 2014-04-25  Pedro Alves  <palves@redhat.com>
7953         PR server/16255
7954         * linux-low.c (linux_attach_fail_reason_string): New function.
7955         (linux_attach_lwp): Delete.
7956         (linux_attach_lwp_1): Rename to ...
7957         (linux_attach_lwp): ... this.  Take a ptid instead of a pid as
7958         argument.  Remove "initial" parameter.  Return int instead of
7959         void.  Don't error or warn here.
7960         (linux_attach): Adjust to call linux_attach_lwp.  Call error on
7961         failure to attach to the tgid.  Call warning when failing to
7962         attach to an lwp.
7963         * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7964         argument.  Remove "initial" parameter.  Return int instead of
7965         void.  Don't error or warn here.
7966         (linux_attach_fail_reason_string): New declaration.
7967         * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7968         interface change.  Use linux_attach_fail_reason_string.
7970 2014-04-24  Michael Sturm  <michael.sturm@mintel.com>
7971             Walfred Tedeschi  <walfred.tedeschi@intel.com>
7973         * Makefile.in: Added rules to handle new files
7974         i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7975         amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7976         * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7977         (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7978         (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7979         (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7980         x32-avx512-linux.o.
7981         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7982         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7983         (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7984         i386/x32-avx512.xml.
7985         (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7986         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7987         i386/x32-avx512-linux.xml.
7988         * i387-fp.c (num_avx512_k_registers): New constant for number
7989         of K registers.
7990         (num_avx512_zmmh_low_registers): New constant for number of
7991         lower ZMM registers (0-15).
7992         (num_avx512_zmmh_high_registers): New constant for number of
7993         higher ZMM registers (16-31).
7994         (num_avx512_ymmh_registers): New contant for number of higher
7995         YMM registers (ymm16-31 added by avx521 on x86_64).
7996         (num_avx512_xmm_registers): New constant for number of higher
7997         XMM registers (xmm16-31 added by AVX512 on x86_64).
7998         (struct i387_xsave): Add space for AVX512 registers.
7999         (i387_cache_to_xsave): Change raw buffer size to 64 characters.
8000         Add code to handle AVX512 registers.
8001         (i387_xsave_to_cache): Add code to handle AVX512 registers.
8002         * linux-x86-low.c (init_registers_amd64_avx512_linux): New
8003         prototypei from generated file.
8004         (tdesc_amd64_avx512_linux): Likewise.
8005         (init_registers_x32_avx512_linux): Likewise.
8006         (tdesc_x32_avx512_linux): Likewise.
8007         (init_registers_i386_avx512_linux): Likewise.
8008         (tdesc_i386_avx512_linux): Likewise.
8009         (x86_64_regmap): Add AVX512 registers.
8010         (x86_linux_read_description): Add code to handle AVX512 XSTATE
8011         mask.
8012         (initialize_low_arch): Add code to initialize AVX512 registers.
8014 2014-04-23  Pedro Alves  <palves@redhat.com>
8016         * mem-break.c (find_gdb_breakpoint_at): Make static.
8017         * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
8019 2014-04-23  Pedro Alves  <palves@redhat.com>
8021         * i386-low.c: Don't include break-common.h here.
8022         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8023         prototype to take target_hw_bp_type as argument instead of a Z
8024         packet char.
8025         * i386-low.h: Include break-common.h here.
8026         (Z_packet_to_hw_type): Declare.
8027         (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
8028         prototypes.
8029         * linux-x86-low.c (x86_insert_point): Convert the packet number to
8030         a target_hw_bp_type before calling i386_low_insert_watchpoint.
8031         (x86_remove_point): Convert the packet number to a
8032         target_hw_bp_type before calling i386_low_remove_watchpoint.
8033         * win32-i386-low.c (i386_insert_point): Convert the packet number
8034         to a target_hw_bp_type before calling i386_low_insert_watchpoint.
8035         (i386_remove_point): Convert the packet number to a
8036         target_hw_bp_type before calling i386_low_remove_watchpoint.
8038 2014-04-23  Pedro Alves  <palves@redhat.com>
8040         * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
8042 2014-04-10  Pedro Alves  <palves@redhat.com>
8044         * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
8045         Check if the condition or command is NULL before checking if the
8046         breakpoint is known.  On success, return true.
8047         * mem-break.h (add_breakpoint_condition): Document return.
8048         (add_breakpoint_commands): Add describing comment.
8049         * server.c (skip_to_semicolon): New function.
8050         (process_point_options): Use it.
8052 2014-04-09  Pedro Alves  <palves@redhat.com>
8054         * linux-low.c (linux_read_loadmap): Pass current_inferior directly
8055         to lwpid_of.
8057 2014-02-27  Pedro Alves  <palves@redhat.com>
8059         PR 12702
8060         * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
8061         macros.
8062         * linux-low.c (delete_lwp, handle_extended_wait): Add debug
8063         output.
8064         (last_thread_of_process_p): Take a PID argument instead of a
8065         thread pointer.
8066         (linux_wait_for_lwp): Delete.
8067         (num_lwps, check_zombie_leaders, not_stopped_callback): New
8068         functions.
8069         (linux_low_filter_event): New function, party factored out from
8070         linux_wait_for_event.
8071         (linux_wait_for_event): Rename to ...
8072         (linux_wait_for_event_filtered): ... this.  Add new filter ptid
8073         argument.  Partly rewrite.  Always use waitpid(-1, WNOHANG) and
8074         sigsuspend.  Check for zombie leaders.
8075         (linux_wait_for_event): Reimplement as wrapper around
8076         linux_wait_for_event_filtered.
8077         (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED.  Assume that if
8078         a normal or signal exit is seen, it's the whole process exiting.
8079         (wait_for_sigstop): No longer a for_each_inferior callback.
8080         Rewrite on top of linux_wait_for_event_filtered.
8081         (stop_all_lwps): Call wait_for_sigstop directly.
8082         * server.c (resume, handle_target_event): Handle
8083         TARGET_WAITKIND_NO_RESUMED.
8085 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
8087         * win32-low.c (psapi_get_dll_name,
8088         * win32_CreateToolhelp32Snapshot): Delete.
8089         (win32_CreateToolhelp32Snapshot, win32_Module32First)
8090         (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8091         Delete.
8092         (handle_load_dll): Add function description.
8093         Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8095 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
8097         * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8098         Add comment.
8099         (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8100         base address when calling win32_add_one_solib.
8101         (handle_load_dll): Delete local variable load_addr.
8102         Remove 0x1000 offset applied to DLL base address when calling
8103         win32_add_one_solib.
8104         (handle_unload_dll): Add comment.
8106 2014-02-26  Joel Brobecker  <brobecker@adacore.com>
8108         * win32-low.c (win32_add_all_dlls): Renames
8109         win32_ensure_ntdll_loaded.  Rewrite function documentation.
8110         Adjust implementation to always load all DLLs.
8111         Add 0x1000 offset to DLL base address when calling
8112         win32_add_one_solib.
8113         (child_initialization_done): New static global.
8114         (do_initial_child_stuff): Set child_initialization_done to
8115         zero during child initialization, and 1 after.  Replace call
8116         to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8117         Add comment.
8118         (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8119         (handle_unload_dll): Add function documentation.
8120         (get_child_debug_event): Ignore load and unload DLL events
8121         during child initialization.
8123 2014-02-20  Doug Evans  <dje@google.com>
8125         Remove global all_lwps.
8126         * inferiors.h (ptid_of): Move here from linux-low.h.
8127         (pid_of, lwpid_of): Ditto.
8128         * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8129         parameter is a struct thread_info * now.
8130         (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8131         directly.  Pass &all_threads to find_inferior instead of &all_lwps.
8132         (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8133         directly.
8134         (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8135         (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8136         * linux-arm-low.c (update_registers_callback): Update, "entry"
8137         parameter is a struct thread_info * now.
8138         Fetch lwpid from current_inferior directly.
8139         (arm_insert_point): Pass &all_threads to find_inferior instead of
8140         &all_lwps.
8141         (arm_remove_point): Ditto.
8142         (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8143         (arm_prepare_to_resume): Fetch pid from thread.
8144         (arm_read_description): Fetch lwpid from current_inferior directly.
8145         * linux-low.c (all_lwps): Delete.
8146         (delete_lwp): Delete call to remove_inferior.
8147         (handle_extended_wait): Fetch lwpid from thread.
8148         (add_lwp): Don't set lwp->entry.id.  Remove call to
8149         add_inferior_to_list.
8150         (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8151         (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8152         (kill_one_lwp_callback): Ditto.
8153         (linux_kill): Don't dereference NULL pointer.
8154         Fetch ptid,lwpid from thread.
8155         (get_detach_signal): Fetch ptid from thread.
8156         (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8157         Simplify call to regcache_invalidate_thread.
8158         (delete_lwp_callback): Update, "entry" parameter is a
8159         struct thread_info * now.  Fetch pid from thread.
8160         (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8161         (status_pending_p_callback): Update, "entry" parameter is a
8162         struct thread_info * now.  Fetch ptid from thread.
8163         (find_lwp_pid): Update, "entry" parameter is a
8164         struct thread_info * now.
8165         (linux_wait_for_lwp): Fetch pid from thread.
8166         (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8167         (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8168         (enqueue_one_deferred_signal): Fetch lwpid from thread.
8169         (dequeue_one_deferred_signal): Ditto.
8170         (cancel_breakpoint): Fetch ptid from current_inferior.
8171         (linux_wait_for_event): Pass &all_threads to find_inferior,
8172         not &all_lwps.  Fetch ptid, lwpid from thread.
8173         (count_events_callback): Update, "entry" parameter is a
8174         struct thread_info * now.
8175         (select_singlestep_lwp_callback): Ditto.
8176         (select_event_lwp_callback): Ditto.
8177         (cancel_breakpoints_callback): Ditto.
8178         (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8179         not &all_lwps.
8180         (select_event_lwp): Ditto.  Fetch ptid from event_thread.
8181         (unsuspend_one_lwp): Update, "entry" parameter is a
8182         struct thread_info * now.
8183         (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8184         not &all_lwps.
8185         (linux_stabilize_threads): Ditto.  And for for_each_inferior.
8186         Fetch lwpid from thread, not lwp.
8187         (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8188         Pass &all_threads to find_inferior, not &all_lwps.
8189         (send_sigstop): Fetch lwpid from thread, not lwp.
8190         (send_sigstop_callback): Update, "entry" parameter is a
8191         struct thread_info * now.
8192         (suspend_and_send_sigstop_callback): Ditto.
8193         (wait_for_sigstop): Ditto.  Fetch ptid, lwpid from thread, lwp.
8194         (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8195         struct thread_info * now.
8196         (move_out_of_jump_pad_callback): Ditto.  Fetch ptid, lwpid
8197         from thread, lwp.
8198         (lwp_running): Update, "entry" parameter is a
8199         struct thread_info * now.
8200         (stop_all_lwps): Fetch ptid from thread.
8201         Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8202         (linux_resume_one_lwp): Fetch lwpid from thread.
8203         (linux_set_resume_request): Update, "entry" parameter is a
8204         struct thread_info * now.  Fetch pid, lwpid from thread.
8205         (resume_status_pending_p): Update, "entry" parameter is a
8206         struct thread_info * now.
8207         (need_step_over_p): Ditto.  Fetch lwpid from thread.
8208         (start_step_over): Fetch lwpid from thread.
8209         (linux_resume_one_thread): Update, "entry" parameter is a
8210         struct thread_info * now.  Fetch lwpid from thread.
8211         (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8212         (proceed_one_lwp): Update, "entry" parameter is a
8213         struct thread_info * now.  Fetch lwpid from thread.
8214         (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8215         struct thread_info * now.
8216         (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8217         (unstop_all_lwps): Ditto.  Fetch lwpid from thread.
8218         (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8219         directly.
8220         (regsets_store_inferior_registers): Ditto.
8221         (fetch_register, store_register): Ditto.
8222         (linux_read_memory, linux_write_memory): Ditto.
8223         (linux_request_interrupt): Ditto.
8224         (linux_read_auxv): Ditto.
8225         (linux_xfer_siginfo): Ditto.
8226         (linux_qxfer_spu): Ditto.
8227         (linux_qxfer_libraries_svr4): Ditto.
8228         * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8229         moved to inferiors.h.
8230         (get_lwp): Delete.
8231         (get_thread_lwp): Update.
8232         (struct lwp_info): Delete member "entry".  Simplify comment for
8233         member "thread".
8234         (all_lwps): Delete.
8235         * linux-mips-low.c (mips_read_description): Fetch lwpid from
8236         current_inferior directly.
8237         (update_watch_registers_callback): Update, "entry" parameter is a
8238         struct thread_info * now.  Fetch pid from thread.
8239         (mips_linux_prepare_to_resume): Fetch ptid from thread.
8240         (mips_insert_point): Fetch lwpid from current_inferior.
8241         Pass &all_threads to find_inferior, not &all_lwps.
8242         (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8243         (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8244         directly.
8245         (mips_stopped_data_address): Ditto.
8246         * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8247         directly.
8248         * linux-tile-low.c (tile_arch_setup): Ditto.
8249         * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8250         (update_debug_registers_callback): Update, "entry" parameter is a
8251         struct thread_info * now.  Fetch pid from thread.
8252         (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8253         Pass &all_threads to find_inferior, not &all_lwps.
8254         (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8255         (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8256         Pass &all_threads to find_inferior, not &all_lwps.
8257         (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8258         (i386_dr_low_get_status): Ditto.
8259         (x86_linux_prepare_to_resume): Fetch ptid from thread.
8260         (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8261         (x86_linux_read_description): Ditto.
8262         * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8264 2014-02-20  Doug Evans  <dje@google.com>
8266         * inferiors.c (get_first_inferior): Fix buglet.
8268 2014-02-19  Doug Evans  <dje@google.com>
8270         * gdbthread.h (add_thread): Change result type to struct thread_info *.
8271         * inferiors.c (add_thread): Change result type to struct thread_info *.
8272         All callers updated.
8273         (add_lwp): Call add_thread here instead of in callers.
8274         All callers updated.
8275         * linux-low.h (get_lwp_thread): Rewrite.
8276         (struct lwp_info): New member "thread".
8278 2014-02-19  Doug Evans  <dje@google.com>
8280         * linux-low.c (add_lwp): Change result to struct lwp_info *.
8281         All callers updated.
8283 2014-02-19  Doug Evans  <dje@google.com>
8285         * inferiors.c (add_thread): Fix whitespace.
8287 2014-02-19  Doug Evans  <dje@google.com>
8289         * dll.c (clear_dlls): Replace accessing list implemention details
8290         with API function.
8291         * gdbthread.h (get_first_thread): Declare.
8292         * inferiors.c (for_each_inferior_with_data): New function.
8293         (get_first_thread): New function.
8294         (find_thread_ptid): Simplify.
8295         (get_first_inferior): New function.
8296         (clear_list): Delete.
8297         (one_inferior_p): New function.
8298         (clear_inferior_list): New function.
8299         (clear_inferiors): Update.
8300         * inferiors.h (for_each_inferior_with_data): Declare.
8301         (clear_inferior_list): Declare.
8302         (one_inferior_p): Declare.
8303         (get_first_inferior): Declare.
8304         * linux-low.c (linux_wait_for_event): Replace accessing list
8305         implemention details with API function.
8306         * server.c (target_running): Ditto.
8307         (accumulate_file_name_length): New function.
8308         (emit_dll_description): New function.
8309         (handle_qxfer_libraries): Replace accessing list implemention
8310         details with API function.
8311         (handle_qxfer_threads_worker): New function.
8312         (handle_qxfer_threads_proper): Replace accessing list implemention
8313         details with API function.
8314         (handle_query): Ditto.
8315         (visit_actioned_threads_callback_ftype): New typedef.
8316         (visit_actioned_threads_data): New struct.
8317         (visit_actioned_threads): Rewrite to be find_inferior callback.
8318         (resume): Call find_inferior.
8319         (handle_status): Replace accessing list implemention
8320         details with API function.
8321         (process_serial_event): Replace accessing list implemention details
8322         with API function.
8323         * target.c (set_desired_inferior): Replace accessing list implemention
8324         details with API function.
8325         * tracepoint.c (same_process_p): New function.
8326         (gdb_agent_about_to_close): Replace accessing list implemention
8327         details with API function.
8328         * win32-low.c (child_delete_thread): Replace accessing list
8329         implemention details with API function.
8330         (match_dll_by_basename): New function.
8331         (dll_is_loaded_by_basename): New function.
8332         (win32_ensure_ntdll_loaded): Replace accessing list implemention
8333         details call to dll_is_loaded_by_basename.
8335 2014-02-19  Doug Evans  <dje@google.com>
8337         * dll.h (struct dll_info): Add comment.
8338         * gdbthread.h (struct thread_info): Add comment.
8339         (current_ptid): Simplify.
8340         * inferiors.c (add_process): Update.
8341         (remove_process): Update.
8342         * inferiors.h (struct process_info): Rename member "head" to "entry".
8343         * linux-low.c (delete_lwp): Update.
8344         (add_lwp): Update.
8345         (last_thread_of_process_p): Update.
8346         (kill_one_lwp_callback, linux_kill): Update.
8347         (status_pending_p_callback): Update.
8348         (wait_for_sigstop): Update.  Simplify read of ptid.
8349         (start_step_over): Update.
8350         * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8351         (get_lwp_thread): Update.
8352         (struct lwp_info): Rename member "head" to "entry".
8353         * regcache.h (inferior_list_entry): Delete.
8354         * server.c (kill_inferior_callback): Update.
8355         (detach_or_kill_inferior_callback): Update.
8356         (print_started_pid): Update.
8357         (print_attached_pid): Update.
8358         (process_serial_event): Simplify read of ptid.
8359         * thread-db.c (thread_db_create_event): Update.
8360         (thread_db_get_tls_address): Update.
8361         * win32-low.c (current_inferior_ptid): Simplify.
8363 2014-02-19  Tom Tromey  <tromey@redhat.com>
8365         * target.h (struct target_ops) <supports_btrace>: Add target_ops
8366         argument.
8367         (target_supports_btrace): Update.
8369 2014-02-14  Yao Qi  <yao@codesourcery.com>
8371         * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8372         (rsp-low-ipa.o): New target.
8374 2014-02-12  Tom Tromey  <tromey@redhat.com>
8376         * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8377         convert_ascii_to_int.
8378         * regcache.c (registers_to_string): Likewise.
8379         * remote-utils.c (decode_M_packet): Likewise.
8380         * server.c (process_serial_event): Likewise.
8382 2014-02-12  Tom Tromey  <tromey@redhat.com>
8384         * server.c (handle_query, handle_v_run): Use hex2bin, not
8385         unhexify.
8386         * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8388 2014-02-12  Tom Tromey  <tromey@redhat.com>
8390         * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8391         convert_int_to_ascii.
8392         * regcache.c (registers_to_string, collect_register_as_string):
8393         Likewise.
8394         * remote-utils.c (look_up_one_symbol, relocate_instruction):
8395         Likewise.
8396         * server.c (process_serial_event): Likewise.
8397         * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8398         (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8400 2014-02-12  Tom Tromey  <tromey@redhat.com>
8402         * remote-utils.c (look_up_one_symbol, monitor_output): Use
8403         bin2hex, not hexify.
8404         * tracepoint.c (cmd_qtstatus): Likewise.
8406 2014-02-12  Tom Tromey  <tromey@redhat.com>
8408         * remote-utils.c (monitor_output): Pass explicit length to
8409         hexify.
8411 2014-02-12  Tom Tromey  <tromey@redhat.com>
8413         * tracepoint.c: Include rsp-low.h.
8414         * server.c: Include rsp-low.h.
8415         * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8416         (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8417         declare.
8418         * remote-utils.c: Include rsp-low.h.
8419         (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8420         (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8421         (convert_int_to_ascii, convert_ascii_to_int): Move to
8422         common/rsp-low.c.
8423         * regcache.c: Include rsp-low.h.
8424         * ax.c: Include rsp-low.h.
8425         * Makefile.in (SFILES): Add common/rsp-low.c.
8426         (OBS): Add rsp-low.o.
8427         (rsp-low.o): New target.
8429 2014-02-12  Tom Tromey  <tromey@redhat.com>
8431         * utils.h (pulongest, plongest, phex_nz): Don't declare.
8432         Include print-utils.h.
8433         * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8434         (plongest, thirty_two, phex_nz): Remove.
8435         * Makefile.in (SFILES): Add common/print-utils.c.
8436         (OBS): Add print-utils.o.
8437         (print-utils-ipa.o): New target.
8438         (print-utils.o): New target.
8439         (IPA_OBJS): Add print-utils-ipa.o.
8441 2014-02-06  Tom Tromey  <tromey@redhat.com>
8443         * Makefile.in (SFILES): Fix indentation.
8445 2014-02-05  Doug Evans  <dje@google.com>
8447         * linux-low.c (linux_wait_for_event): Improve comment.
8448         (linux_wait_1): Keep current_inferior in sync with event_child.
8450 2014-01-22  Doug Evans  <dje@google.com>
8452         * gdbthread.h (gdb_id_to_thread): Delete, unused.
8454 2014-01-22  Doug Evans  <dje@google.com>
8456         * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8457         * configure: Regenerate.
8458         * config.in: Regenerate.
8459         * Makefile.in (SFILES): Add debug.c.
8460         (OBS): Add debug.o.
8461         * debug.c: New file.
8462         * debug.h: New file.
8463         * linux-aarch64-low.c (*): Update all debugging printfs to use
8464         debug_printf instead of fprintf.
8465         * linux-arm-low.c (*): Ditto.
8466         * linux-cris-low.c (*): Ditto.
8467         * linux-crisv32-low.c (*): Ditto.
8468         * linux-m32r-low.c (*): Ditto.
8469         * linux-sparc-low.c (*): Ditto.
8470         * linux-x86.c (*): Ditto.
8471         * linux-low.c (*): Ditto.
8472         (linux_wait_1): Add calls to debug_enter, debug_exit.
8473         (linux_wait): Remove redundant debugging printf.
8474         (stop_all_lwps): Add calls to debug_enter, debug_exit.
8475         (linux_resume, unstop_all_lwps): Ditto.
8476         * mem-break.c (*): Update all debugging printfs to use
8477         debug_printf instead of fprintf.
8478         * remote-utils.c (*): Ditto.
8479         * thread-db.c (*): Ditto.
8480         * server.c #include <ctype.h>, "gdb_vecs.h".
8481         (debug_threads): Moved to debug.c.
8482         (*): Update all debugging printfs to use debug_printf instead of
8483         fprintf.
8484         (start_inferior): Replace call to fflush with call to debug_flush.
8485         (monitor_show_help): Mention set debug-format.
8486         (parse_debug_format_options): New function.
8487         (handle_monitor_command): Handle "monitor set debug-format".
8488         (gdbserver_usage): Mention --debug-format.
8489         (main): Parse --debug-format.
8490         * server.h (debug_threads): Declaration moved to debug.h.
8491         #include "debug.h".
8492         * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8493         trace_debug_1 that uses debug_printf.
8494         (tracepoint_look_up_symbols): Update all debugging printfs to use
8495         debug_printf instead of fprintf.
8497 2014-01-20  Baruch Siach  <baruch@tkos.co.il>
8499         * linux-xtensa-low.c: Include asm/ptrace.h instead of
8500         sys/ptrace.h.
8502 2014-01-17  Pedro Alves  <palves@redhat.com>
8504         PR build/16445
8505         * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8506         defined after including gdb_proc_service.h.
8508 2014-01-16  Doug Evans  <dje@google.com>
8510         * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8511         (match_dll): Use it.
8513 2014-01-16  Markus Metzger  <markus.t.metzger@intel.com>
8515         * target.h (target_ops) <read_btrace>: Change parameters and
8516         return type to allow error reporting.
8517         * server.c (handle_qxfer_btrace): Support delta reads.  Pass
8518         trace reading errors on.
8519         * linux-low.c (linux_low_read_btrace): Pass trace reading
8520         errors on.
8521         (linux_low_disable_btrace): New.
8523 2014-01-15  Doug Evans  <dje@google.com>
8525         * inferiors.c (thread_id_to_gdb_id): Delete.
8526         * inferiors.h (thread_id_to_gdb_id): Delete.
8528 2014-01-13  Eli Zaretskii  <eliz@gnu.org>
8530         * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8531         "-I$(srcdir)/../".  Fixes MinGW compilation errors with old GCC
8532         versions.
8534 2014-01-08  Pedro Alves  <palves@redhat.com>
8536         * server.c (handle_status): Don't discard previous queued stop
8537         replies or thread's pending status here.
8538         (main) <disconnection>: Do it here instead.
8540 2014-01-08  Pedro Alves  <palves@redhat.com>
8542         * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8543         * server.c (visit_actioned_threads, handle_pending_status): New
8544         function.
8545         (handle_v_cont): Factor out parts to ...
8546         (resume): ... this new function.  If in all-stop, and a thread
8547         being resumed has a pending status, report it without actually
8548         resuming.
8549         (myresume): Adjust to use the new 'resume' function.
8550         (clear_pending_status_callback, set_pending_status_callback)
8551         (find_status_pending_thread_callback): New functions.
8552         (handle_status): Handle the case of multiple threads having
8553         interesting statuses to report.  Report threads' real last signal
8554         instead of always reporting GDB_SIGNAL_TRAP.  Look for a thread
8555         with an interesting thread to report the status for, instead of
8556         always reporting the status of the first thread.
8558 2014-01-01  Joel Brobecker  <brobecker@adacore.com>
8560         * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8561         * gdbreplay.c (gdbreplay_version): Likewise.
8563 2013-12-18  Yufeng Zhang  <yufeng.zhang@arm.com>
8565         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8566         iov.iov_len with the real length in use.
8568 2013-12-13  Joel Brobecker  <brobecker@adacore.com>
8570         * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8571         * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8572         for all targets that use win32-low.c.
8573         * win32-low.c (win32_ensure_ntdll_loaded): New function.
8574         (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8576 2013-12-13  Pedro Alves  <palves@redhat.com>
8578         * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8579         if equal to TARGET_WAITKIND_LOADED.
8580         * win32-low.c (cached_status): New static global.
8581         (win32_wait): Add declaration.
8582         (do_initial_child_stuff): Flush all initial pending debug events
8583         up to the initial breakpoint.
8584         (win32_wait): If CACHED_STATUS was set, return that instead
8585         of doing a real wait.  Remove the code resuming the execution
8586         of the inferior after receiving a TARGET_WAITKIND_LOADED event
8587         during the initial phase.  Also remove the code changing
8588         OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8589         TARGET_WAITKIND_STOPPED.
8591 2013-12-11  Yao Qi  <yao@codesourcery.com>
8593         * notif.c (handle_notif_ack): Return 0 if no notification
8594         matches.
8596 2013-11-20  Doug Evans  <dje@google.com>
8598         * linux-low.c (linux_set_resume_request): Fix comment.
8600 2013-11-20  Doug Evans  <dje@google.com>
8602         * linux-low.c (resume_status_pending_p): Tweak comment.
8604 2013-11-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
8606         * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8607         amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8608         * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8609         (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8610         (srv_amd64_regobj): Add amd64-mpx.o.
8611         (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8612         (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8613         (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8614         * i387-fp.c (num_pl_bnd_register) Added constant.
8615         (num_pl_bnd_cfg_registers) Added constant.
8616         (struct i387_xsave) Added reserved area and MPX fields.
8617         (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8618         * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8619         function.
8620         (tdesc_i386_mpx_linux): Add MPX amd64 target.
8621         (init_registers_amd64_mpx_linux): Declare new function.
8622         (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8623         (x86_64_regmap): Add MPX registers.
8624         (x86_linux_read_description): Add MPX case.
8625         (initialize_low_arch): Initialize MPX targets.
8627 2013-11-18  Tom Tromey  <tromey@redhat.com>
8629         * configure: Rebuild.
8630         * configure.ac: Don't check for stdlib.h.
8631         * gdbreplay.c: Unconditionally include stdlib.h.
8633 2013-11-18  Tom Tromey  <tromey@redhat.com>
8635         * config.in: Rebuild.
8636         * configure: Rebuild.
8637         * configure.ac: Don't use AC_HEADER_DIRENT.
8639 2013-11-18  Tom Tromey  <tromey@redhat.com>
8641         * server.h: Don't check HAVE_STRING_H.
8642         * gdbreplay.c: Don't check HAVE_STRING_H.
8643         * configure: Rebuild.
8645 2013-11-18  Tom Tromey  <tromey@redhat.com>
8647         * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8648         LIBGNU.
8650 2013-11-08  Tom Tromey  <tromey@redhat.com>
8652         * configure, config.in: Rebuild.
8653         * configure.ac: Remove unused configury.
8655 2013-11-08  Tom Tromey  <tromey@redhat.com>
8657         * acinclude.m4: Include common.m4, codeset.m4.
8658         * configure, config.in: Rebuild.
8659         * configure.ac: Use GDB_AC_COMMON.
8661 2013-11-06  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8663         * linux-s390-low.c (HWCAP_S390_TE): New define.
8664         (s390_arch_setup): Consider the TE field in the HWCAP for
8665         determining 'have_regset_tdb'.
8667 2013-10-16  Sergio Durigan Junior  <sergiodj@redhat.com>
8669         PR gdb/16014
8670         * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8671         call to sizeof.
8673 2013-10-02  Pedro Alves  <palves@redhat.com>
8675         * server.c (process_serial_event): Don't output "GDBserver
8676         exiting" if GDB is connected through stdio.
8677         * target.c (mywait): Likewise, be silent if GDB is connected
8678         through stdio.
8680 2013-10-01  Joel Brobecker  <brobecker@adacore.com>
8682         * lynx-low.c (lynx_add_threads_after_attach): New function.
8683         (lynx_attach): Remove call to add_thread.  Add call to
8684         lynx_add_threads_after_attach instead.
8686 2013-09-28  Mike Frysinger  <vapier@gentoo.org>
8688         * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8689         * config.in, configure: Regenerated.
8691 2013-09-18  Yao Qi  <yao@codesourcery.com>
8693         PR server/15959
8694         * server.c (start_inferior): Clear 'resume_info'.
8696 2013-09-16  Jiong Wang  <jiwang@tilera.com>
8698         * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8699         for each register.
8701 2013-09-16  Jiong Wang  <jiwang@tilera.com>
8703         * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8704         linux-tile-low.o to srv_tgtobj.
8706 2013-09-16  Will Newton  <will.newton@linaro.org>
8708         * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8709         out regs.
8711 2013-09-06  Pedro Alves  <palves@redhat.com>
8713         * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8714         (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8715         (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8716         (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8717         (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8718         (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8720 2013-09-06  Pedro Alves  <palves@redhat.com>
8722         * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8723         explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8725 2013-09-06  Pedro Alves  <palves@redhat.com>
8727         * linux-amd64-ipa.c: Include tracepoint.h.
8728         * linux-i386-ipa.c: Include tracepoint.h.
8730 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
8732         * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8733         (ps_get_thread_area): New function.
8735 2013-09-06  Ricard Wanderlof  <ricardw@axis.com>
8737         * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8738         (initialize_low_arch): Call init_registers_crisv32 rather than
8739         init_register_crisv32.
8741 2013-09-05  Pedro Alves  <palves@redhat.com>
8743         * server.h (handle_vFile, hostio_last_error_from_errno): Move
8744         to ...
8745         * hostio.h: ... this new file.
8746         * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8747         win32-low.c: Include hostio.h.
8749 2013-09-05  Pedro Alves  <palves@redhat.com>
8751         * server.h (gdb_client_data, handler_func, callback_handler_func)
8752         (delete_file_handler, add_file_handler, append_callback_event)
8753         (delete_callback_event, start_event_loop, initialize_event_loop):
8754         Move to event-loop.h and include it.
8755         * event-loop.h: New file.
8757 2013-09-05  Pedro Alves  <palves@redhat.com>
8759         * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8760         * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8761         (loaded_dll, unloaded_dll): Move to ...
8762         * dll.h: ... this new file.
8763         * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8765 2013-09-05  Pedro Alves  <palves@redhat.com>
8767         * server.h (current_process, get_thread_process, all_processes)
8768         (add_inferior_to_list, for_each_inferior, current_inferior)
8769         (remove_inferior, add_process, remove_process, find_process_pid)
8770         (have_started_inferiors_p, have_attached_inferiors_p)
8771         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8772         (clear_inferiors, find_inferior, find_inferior_id)
8773         (inferior_target_data, set_inferior_target_data)
8774         (inferior_regcache_data, set_inferior_regcache_data): Move to
8775         inferiors.h, and include it.
8776         * inferiors.h: New file.
8778 2013-09-05  Pedro Alves  <palves@redhat.com>
8780         * server.h (struct emit_ops, current_insn_ptr, emit_error):
8781         Move ...
8782         * ax.h: ... here.
8784 2013-09-05  Pedro Alves  <palves@redhat.com>
8786         * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8787         tracepoint.h.
8788         * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8789         (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8790         (handle_tracepoint_general_set, handle_tracepoint_query)
8791         (tracepoint_finished_step, tracepoint_was_hit)
8792         (release_while_stepping_state_list, current_traceframe)
8793         (in_readonly_region, traceframe_read_mem)
8794         (fetch_traceframe_registers, traceframe_read_sdata)
8795         (traceframe_read_info, struct fast_tpoint_collect_status)
8796         (fast_tracepoint_collecting, force_unlock_trace_buffer)
8797         (handle_tracepoit_bkpts, initialize_low_tracepoint)
8798         (supply_fast_tracepoint_registers)
8799         (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8800         (ipa_tdesc, claim_trampoline_space)
8801         (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8802         (agent_mem_read, agent_get_trace_state_variable_value)
8803         (agent_set_trace_state_variable_value, agent_tsv_read)
8804         (agent_mem_read_string, get_raw_reg_func_addr)
8805         (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8806         * tracepoint.h: ... this new file.
8808 2013-09-05  Pedro Alves  <palves@redhat.com>
8810         * server.h (perror_with_name, error, fatal, warning, paddress)
8811         (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8812         include it.
8813         * utils.h: New file.
8815 2013-09-05  Pedro Alves  <palves@redhat.com>
8817         * server.h (remote_debug, noack_mode, transport_is_reliable)
8818         (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8819         (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8820         (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8821         (write_enn, initialize_async_io, enable_async_io)
8822         (disable_async_io, check_remote_input_interrupt_request)
8823         (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8824         (dead_thread_notify, prepare_resume_reply)
8825         (decode_address_to_semicolon, decode_address, decode_m_packet)
8826         (decode_M_packet, decode_X_packet, decode_xfer_write)
8827         (decode_search_memory_packet, unhexify, hexify)
8828         (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8829         (look_up_one_symbol, relocate_instruction)
8830         (monitor_output): Move to remote-utils.h, and include it.
8831         * remote-utils.h: New file.
8833 2013-09-05  Pedro Alves  <palves@redhat.com>
8835         * server.h (_): Delete.
8837 2013-09-02  Pedro Alves  <palves@redhat.com>
8839         * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8840         (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8841         allocated.
8842         (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8844 2013-09-02  Pierre Muller  <muller@sourceware.org>
8846         * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8847         or WriteProcessMemory complete successfully and handle
8848         ERROR_PARTIAL_COPY error.
8850 2013-09-02  Pedro Alves  <palves@redhat.com>
8852         * server.c (gdb_read_memory): Return -1 on traceframe memory read
8853         error instead of EIO.
8855 2013-08-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
8857         PR server/15604
8858         * linux-low.c: Include filestuff.h.
8859         (linux_create_inferior) <pid == 0>: Call close_most_fds.
8860         * lynx-low.c: Include filestuff.h.
8861         (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8862         * server.c: Include filestuff.h.
8863         (main): Call notice_open_fds.
8864         * spu-low.c: Include filestuff.h.
8865         (spu_create_inferior) <pid == 0>: Call close_most_fds.
8867 2013-08-22  Luis Machado  <lgustavo@codesourcery.com>
8869         * Makefile.in: Explain why ../target and ../nat are not
8870         listed as include file search paths.
8871         (linux-waitpid.o): New object file rule.
8872         * configure.srv (srv_native_linux_obj): New variable.
8873         Replace all occurrences of linux native object files with
8874         $srv_native_linux_obj.
8875         * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8876         (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8877         (linux_enable_event_reporting): Remove declaration.
8878         (my_waitpid): Moved to common/linux-waitpid.c.
8879         (linux_wait_for_event): Pass ptid when calling
8880         linux_enable_event_reporting.
8881         (linux_supports_tracefork_flag): Remove.
8882         (linux_enable_event_reporting): Likewise.
8883         (linux_tracefork_grandchild): Remove.
8884         (STACK_SIZE): Moved to common/linux-ptrace.c.
8885         (linux_tracefork_child): Remove.
8886         (linux_test_for_tracefork): Remove.
8887         (linux_look_up_symbols): Call linux_supports_traceclone.
8888         (initialize_low): Remove call to linux_test_for_tracefork.
8889         * linux-low.h (PTRACE_TYPE_ARG3): Move to
8890         common/linux-ptrace.h.
8891         (PTRACE_TYPE_ARG4): Likewise.
8892         Include linux-ptrace.h.
8894 2013-08-21  Pedro Alves  <palves@redhat.com>
8896         * config.in: Renegerate.
8898 2013-08-19  Luis Machado  <lgustavo@codesourcery.com>
8900         * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8901         (SFILES): Remove $(srcdir)/common/target-common.c and
8902         add $(srcdir)/target/waitstatus.c.
8903         (OBS): Remove target-common.o and add waitstatus.o.
8904         (server_h): Remove $(srcdir)/../common/target-common.h and
8905         add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8906         and $(srcdir)/../target/waitstatus.h.
8907         (target-common.o): Remove.
8908         (waitstatus.o): New target object file.
8909         * target.h: Do not include target-common.h and
8910         include target/resume.h, target/wait.h and
8911         target/waitstatus.h.
8913 2013-08-13  Luis Machado  <lgustavo@codesourcery.com>
8915         * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8916         to PTRACE_TYPE_ARG3.
8917         * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8918         to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8919         PTRACE_TYPE_ARG4.
8920         * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8921         (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8923 2013-07-27  Jie Zhang  <jie@codesourcery.com>
8924             Daniel Jacobowitz  <dan@codesourcery.com>
8925             Yao Qi  <yao@codesourcery.com>
8927         * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8928         (mips-linux-watch.o): New rule.
8929         (mips_linux_watch_h): New variable.
8930         * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8931         srv_tgtobj.
8932         * linux-mips-low.c: Include mips-linux-watch.h.
8933         (struct arch_process_info, struct arch_lwp_info): New.
8934         (update_watch_registers_callback): New function.
8935         (mips_linux_new_process, mips_linux_new_thread) New functions.
8936         (mips_linux_prepare_to_resume, mips_insert_point): New
8937         functions.
8938         (mips_remove_point, mips_stopped_by_watchpoint): New
8939         functions.
8940         (rsp_bp_type_to_target_hw_bp_type): New function.
8941         (mips_stopped_data_address): New function.
8942         (the_low_target): Add watchpoint support functions.
8944 2013-07-27  Yao Qi  <yao@codesourcery.com>
8946         * i386-low.c: Include break-common.h.
8947         (enum target_hw_bp_type): Remove.
8949 2013-07-24  Luis Machado  <lgustavo@codesourcery.com>
8951         * Makefile.in (SFILES): /common/target-common.c.
8952         (OBS): Add target-common.o.
8953         (server_h): Add $(srcdir)/../common/target-common.h.
8954         (target-common.o): New target.
8955         * server.c (queue_stop_reply_callback): Free
8956         status string after use.
8957         * target.c (target_waitstatus_to_string): Remove.
8958         * target.h: Include target-common.h.
8959         (resume_kind): Likewise.
8960         (target_waitkind): Likewise.
8961         (target_waitstatus): Likewise.
8962         (TARGET_WNOHANG): Likewise.
8964 2013-07-04  Yao Qi  <yao@codesourcery.com>
8966         * Makefile.in (host_alias): Use @host_noncanonical@.
8967         (target_alias): Use @target_noncanonical@.
8968         * configure.ac: Use ACX_NONCANONICAL_TARGET and
8969         ACX_NONCANONICAL_HOST.
8970         * configure: Regenerated.
8972         Revert:
8973         2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
8975         * configure.ac (version_host, version_target): Set and AC_SUBST them.
8976         * configure: Rebuild.
8977         * Makefile.in (version_host, version_target): Get from configure.
8978         (version.c): Use $(version_host) and $(version_target).
8980 2013-07-03  Pedro Alves  <palves@redhat.com>
8982         * Makefile.in (config.status): Depend on development.sh.
8983         * acinclude.m4: Include libmcheck.m4.
8984         * configure: Regenerate.
8986 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
8988         * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8989         attribute inside the parentheses.
8990         (winapi_DebugSetProcessKillOnExit): Ditto.
8991         (winapi_DebugBreakProcess): Ditto.
8992         (winapi_GenerateConsoleCtrlEvent): Ditto.
8994 2013-07-02  Mircea Gherzan  <mircea.gherzan@intel.com>
8996         * notif.h (notif_event): Add a dummy member to avoid compiler
8997         errors.
8999 2013-07-01  Pedro Alves  <palves@redhat.com>
9001         * hostio.c (HOSTIO_PATH_MAX): Define.
9002         (require_filename, handle_open, handle_unlink, handle_readlink):
9003         Use it.
9005 2013-07-01  Pedro Alves  <palves@redhat.com>
9007         * server.h: Include "pathmax.h".
9008         * linux-low.c: Don't include sys/param.h.
9009         (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
9010         MAXPATHLEN.
9011         * win32-low.c: Don't include sys/param.h.
9012         (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
9014 2013-07-01  Pedro Alves  <palves@redhat.com>
9016         * event-loop.c: Don't check HAVE_UNISTD_H before including
9017         <unistd.h>.
9018         * gdbreplay.c: Likewise.
9019         * remote-utils.c: Likewise.
9020         * server.c: Likewise.
9021         * configure.ac: Don't check for unistd.h.
9022         * configure: Regenerate.
9024 2013-06-28  Tom Tromey  <tromey@redhat.com>
9026         * Makefile.in (version.c): Use version.in, not
9027         common/version.in.
9029 2013-06-28  Mircea Gherzan  <mircea.gherzan@intel.com>
9031         * configure.ac (version_host, version_target): Set and AC_SUBST them.
9032         * configure: Rebuild.
9033         * Makefile.in (version_host, version_target): Get from configure.
9034         (version.c): Use $(version_host) and $(version_target).
9036 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
9038         Fix trace-status to output user name without trailing colon.
9039         * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
9041 2013-06-10  Dmitry Kozlov <ddk@codesourcery.com>
9043         Fix trace-status to output proper start-time and stop-time.
9044         * tracepoint.c (cmd_qtstatus): Modify trace-status output to
9045         output start time and stop time in hex as gdb expects.
9047 2013-06-26  Pedro Alves  <pedro@codesourcery.com>
9049         * tracepoint.c (build_traceframe_info_xml): Output trace state
9050         variables present in the trace buffer.
9052 2013-06-24  Tom Tromey  <tromey@redhat.com>
9054         * Makefile.in (version.c): Use bfd/version.h, common/version.in,
9055         create-version.sh.
9056         (version.o): Remove.
9057         * gdbreplay.c: Include version.h.
9058         (version, host_name): Don't declare.
9059         * server.h: Include version.h.
9060         (version, host_name): Don't declare.
9062 2013-06-12  Pedro Alves  <palves@redhat.com>
9064         * linux-x86-low.c (linux_is_elf64): Delete global.
9065         (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
9066         with local linux_pid_exe_is_elf_64_file use.
9068 2013-06-11  Pedro Alves  <palves@redhat.com>
9070         * linux-low.c (regset_disabled, disable_regset): New functions.
9071         (regsets_fetch_inferior_registers)
9072         (regsets_store_inferior_registers): Use them.
9073         (initialize_regsets_info); Don't allocate the disabled_regsets
9074         array here.
9075         * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9076         comment.
9078 2013-06-11  Pedro Alves  <palves@redhat.com>
9080         * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9081         xmalloc.
9083 2013-06-11  Pedro Alves  <palves@redhat.com>
9085         * linux-x86-low.c (initialize_low_arch): Call
9086         init_registers_x32_avx_linux.
9088 2013-06-09  Jan Kratochvil  <jan.kratochvil@redhat.com>
9090         Fix compatibility with Android Bionic.
9091         * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9092         it is not empty.
9094 2013-06-07  Pedro Alves  <palves@redhat.com>
9096         PR server/14823
9097         * Makefile.in (OBS): Add tdesc.o.
9098         (IPA_OBJS): Add tdesc-ipa.o.
9099         (tdesc-ipa.o): New rule.
9100         * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9101         interface.
9102         * linux-low.c (new_inferior): Delete.
9103         (disabled_regsets, num_regsets): Delete.
9104         (linux_add_process): Adjust to set the new per-process
9105         new_inferior flag.
9106         (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9107         (linux_wait_for_lwp): Adjust.  Only call arch_setup if the event
9108         was a stop.  When calling arch_setup, switch the current inferior
9109         to the thread that got an event.
9110         (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9111         (regsets_fetch_inferior_registers)
9112         (regsets_store_inferior_registers): New regsets_info parameter.
9113         Adjust to use it.
9114         (linux_register_in_regsets): New regs_info parameter.  Adjust to
9115         use it.
9116         (register_addr, fetch_register, store_register): New usrregs_info
9117         parameter.  Adjust to use it.
9118         (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9119         parameter regs_info.  Adjust to use it.
9120         (linux_fetch_registers): Get the current inferior's regs_info, and
9121         adjust to use it.
9122         (linux_store_registers): Ditto.
9123         [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9124         (initialize_low): Don't initialize the target_regsets here.  Call
9125         initialize_low_arch.
9126         * linux-low.h (target_regsets): Delete declaration.
9127         (struct regsets_info): New.
9128         (struct usrregs_info): New.
9129         (struct regs_info): New.
9130         (struct process_info_private) <new_inferior>: New field.
9131         (struct linux_target_ops): Delete the num_regs, regmap, and
9132         regset_bitmap fields.  New field regs_info.
9133         [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9134         * i387-fp.c (num_xmm_registers): Delete.
9135         (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9136         calls to new interface.
9137         (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9138         (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9139         Infer the number of xmm registers from the regcache's target
9140         description.
9141         * i387-fp.h (num_xmm_registers): Delete.
9142         * inferiors.c (add_thread): Don't install the thread's regcache
9143         here.
9144         * proc-service.c (gregset_info): Fetch the current inferior's
9145         regs_info.  Adjust to use it.
9146         * regcache.c: Include tdesc.h.
9147         (register_bytes, reg_defs, num_registers)
9148         (gdbserver_expedite_regs): Delete.
9149         (get_thread_regcache): If the thread doesn't have a regcache yet,
9150         create one, instead of aborting gdbserver.
9151         (regcache_invalidate_one): Rename to ...
9152         (regcache_invalidate_thread): ... this.
9153         (regcache_invalidate_one): New.
9154         (regcache_invalidate): Only invalidate registers of the current
9155         process.
9156         (init_register_cache): Add target_desc parameter, and use it.
9157         (new_register_cache): Ditto.  Assert the target description has a
9158         non zero registers_size.
9159         (regcache_cpy): Add assertions.  Adjust.
9160         (realloc_register_cache, set_register_cache): Delete.
9161         (registers_to_string, registers_from_string): Adjust.
9162         (find_register_by_name, find_regno, find_register_by_number)
9163         (register_cache_size): Add target_desc parameter, and use it.
9164         (free_register_cache_thread, free_register_cache_thread_one)
9165         (regcache_release, register_cache_size): New.
9166         (register_size): Add target_desc parameter, and use it.
9167         (register_data, supply_register, supply_register_zeroed)
9168         (supply_regblock, supply_register_by_name, collect_register)
9169         (collect_register_as_string, collect_register_by_name): Adjust.
9170         * regcache.h (struct target_desc): Forward declare.
9171         (struct regcache) <tdesc>: New field.
9172         (init_register_cache, new_register_cache): Add target_desc
9173         parameter.
9174         (regcache_invalidate_thread): Declare.
9175         (regcache_invalidate_one): Delete declaration.
9176         (regcache_release): Declare.
9177         (find_register_by_number, register_cache_size, register_size)
9178         (find_regno): Add target_desc parameter.
9179         (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9180         declarations.
9181         * remote-utils.c: Include tdesc.h.
9182         (outreg, prepare_resume_reply): Adjust.
9183         * server.c: Include tdesc.h.
9184         (gdbserver_xmltarget): Delete declaration.
9185         (get_features_xml, process_serial_event): Adjust.
9186         * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9187         declare.
9188         (struct process_info) <tdesc>: New field.
9189         (ipa_tdesc): Declare.
9190         * tdesc.c: New file.
9191         * tdesc.h: New file.
9192         * tracepoint.c: Include tdesc.h.
9193         [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9194         (get_context_regcache): Adjust to pass ipa_tdesc down.
9195         (do_action_at_tracepoint): Adjust to get the register cache size
9196         from the context regcache's description.
9197         (traceframe_walk_blocks): Adjust to get the register cache size
9198         from the current trace frame's description.
9199         (traceframe_get_pc): Adjust to get current trace frame's
9200         description and pass it down.
9201         (gdb_collect): Adjust to get the register cache size from the
9202         IPA's description.
9203         * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9204         (gdbserver_xmltarget): Delete.
9205         (initialize_low_tracepoint): Set the ipa's target description.
9206         * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9207         (initialize_low_tracepoint): Set the ipa's target description.
9208         * linux-x86-low.c: Include tdesc.h.
9209         [__x86_64__] (is_64bit_tdesc): New.
9210         (ps_get_thread_area, x86_get_thread_area): Use it.
9211         (i386_cannot_store_register): Rename to ...
9212         (x86_cannot_store_register): ... this.  Use is_64bit_tdesc.
9213         (i386_cannot_fetch_register): Rename to ...
9214         (x86_cannot_fetch_register): ... this.  Use is_64bit_tdesc.
9215         (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9216         to new interface.
9217         (target_regsets): Rename to ...
9218         (x86_regsets): ... this.
9219         (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9220         interface.
9221         (x86_siginfo_fixup): Use is_64bit_tdesc.
9222         [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9223         (tdesc_x32_avx_linux, tdesc_x32_linux)
9224         (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9225         Declare.
9226         (x86_linux_update_xmltarget): Delete.
9227         (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9228         (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9229         (AMD64_LINUX_USER64_CS): New.
9230         (x86_linux_read_description): New, based on
9231         x86_linux_update_xmltarget.
9232         (same_process_callback): New.
9233         (x86_arch_setup_process_callback): New.
9234         (x86_linux_update_xmltarget): New.
9235         (x86_regsets_info): New.
9236         (amd64_linux_regs_info): New.
9237         (i386_linux_usrregs_info): New.
9238         (i386_linux_regs_info): New.
9239         (x86_linux_regs_info): New.
9240         (x86_arch_setup): Reimplement.
9241         (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9242         (x86_emit_ops): Ditto.
9243         (the_low_target): Adjust.  Install x86_linux_regs_info,
9244         x86_cannot_fetch_register, and x86_cannot_store_register.
9245         (initialize_low_arch): New.
9246         * linux-ia64-low.c (tdesc_ia64): Declare.
9247         (ia64_fetch_register): Adjust.
9248         (ia64_usrregs_info, regs_info): New globals.
9249         (ia64_regs_info): New function.
9250         (the_low_target): Adjust.
9251         (initialize_low_arch): New function.
9252         * linux-sparc-low.c (tdesc_sparc64): Declare.
9253         (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9254         Adjust.
9255         (sparc_arch_setup): New function.
9256         (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9257         (the_low_target): Adjust.
9258         (initialize_low_arch): New function.
9259         * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9260         (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9261         (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9262         (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9263         (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9264         (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9265         (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9266         (tdesc_powerpc_isa205_vsx64l): Declare.
9267         (ppc_cannot_store_register, ppc_collect_ptrace_register)
9268         (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9269         (ppc_set_pc, ppc_get_hwcap): Adjust.
9270         (ppc_usrregs_info): Forward declare.
9271         (!__powerpc64__) ppc_regmap_adjusted: New global.
9272         (ppc_arch_setup): Adjust to the current process'es target
9273         description.
9274         (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9275         (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9276         (ppc_store_evrregset): Adjust.
9277         (target_regsets): Rename to ...
9278         (ppc_regsets): ... this, and make static.
9279         (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9280         (ppc_regs_info): New function.
9281         (the_low_target): Adjust.
9282         (initialize_low_arch): New function.
9283         * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9284         (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9285         (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9286         (tdesc_s390x_linux64v2): Declare.
9287         (s390_collect_ptrace_register, s390_supply_ptrace_register)
9288         (s390_fill_gregset, s390_store_last_break): Adjust.
9289         (target_regsets): Rename to ...
9290         (s390_regsets): ... this, and make static.
9291         (s390_get_pc, s390_set_pc): Adjust.
9292         (s390_get_hwcap): New target_desc parameter, and use it.
9293         [__s390x__] (have_hwcap_s390_high_gprs): New global.
9294         (s390_arch_setup): Adjust to set the current process'es target
9295         description.  Don't adjust the regmap.
9296         (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9297         [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9298         (regs_info_3264): New globals.
9299         (s390_regs_info): New function.
9300         (the_low_target): Adjust.
9301         (initialize_low_arch): New function.
9302         * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9303         (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9304         [__mips64] (init_registers_mips_linux)
9305         (init_registers_mips_dsp_linux): Delete defines.
9306         [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9307         (have_dsp): New global.
9308         (mips_read_description): New, based on mips_arch_setup.
9309         (mips_arch_setup): Reimplement.
9310         (get_usrregs_info): New function.
9311         (mips_cannot_fetch_register, mips_cannot_store_register)
9312         (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9313         (mips_fill_fpregset, mips_store_fpregset): Adjust.
9314         (target_regsets): Rename to ...
9315         (mips_regsets): ... this, and make static.
9316         (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9317         (dsp_regs_info, regs_info): New globals.
9318         (mips_regs_info): New function.
9319         (the_low_target): Adjust.
9320         (initialize_low_arch): New function.
9321         * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9322         (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9323         Declare.
9324         (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9325         (arm_read_description): New, with bits factored from
9326         arm_arch_setup.
9327         (arm_arch_setup): Reimplement.
9328         (target_regsets): Rename to ...
9329         (arm_regsets): ... this, and make static.
9330         (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9331         (arm_regs_info): New function.
9332         (the_low_target): Adjust.
9333         (initialize_low_arch): New function.
9334         * linux-m68k-low.c (tdesc_m68k): Declare.
9335         (target_regsets): Rename to ...
9336         (m68k_regsets): ... this, and make static.
9337         (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9338         (m68k_regs_info): New function.
9339         (m68k_arch_setup): New function.
9340         (the_low_target): Adjust.
9341         (initialize_low_arch): New function.
9342         * linux-sh-low.c (tdesc_sharch): Declare.
9343         (target_regsets): Rename to ...
9344         (sh_regsets): ... this, and make static.
9345         (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9346         (sh_regs_info, sh_arch_setup): New functions.
9347         (the_low_target): Adjust.
9348         (initialize_low_arch): New function.
9349         * linux-bfin-low.c (tdesc_bfin): Declare.
9350         (bfin_arch_setup): New function.
9351         (bfin_usrregs_info, regs_info): New globals.
9352         (bfin_regs_info): New function.
9353         (the_low_target): Adjust.
9354         (initialize_low_arch): New function.
9355         * linux-cris-low.c (tdesc_cris): Declare.
9356         (cris_arch_setup): New function.
9357         (cris_usrregs_info, regs_info): New globals.
9358         (cris_regs_info): New function.
9359         (the_low_target): Adjust.
9360         (initialize_low_arch): New function.
9361         * linux-cris-low.c (tdesc_crisv32): Declare.
9362         (cris_arch_setup): New function.
9363         (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9364         (cris_regs_info): New function.
9365         (the_low_target): Adjust.
9366         (initialize_low_arch): New function.
9367         * linux-m32r-low.c (tdesc_m32r): Declare.
9368         (m32r_arch_setup): New function.
9369         (m32r_usrregs_info, regs_info): New globals.
9370         (m32r_regs_info): Adjust.
9371         (initialize_low_arch): New function.
9372         * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9373         (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9374         (tic6x_usrregs_info): Forward declare.
9375         (tic6x_read_description): New function, based on ...
9376         (tic6x_arch_setup): ... this.  Reimplement.
9377         (target_regsets): Rename to ...
9378         (tic6x_regsets): ... this, and make static.
9379         (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9380         (tic6x_regs_info): New function.
9381         (the_low_target): Adjust.
9382         (initialize_low_arch): New function.
9383         * linux-xtensa-low.c (tdesc_xtensa): Declare.
9384         (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9385         (target_regsets): Rename to ...
9386         (xtensa_regsets): ... this, and make static.
9387         (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9388         globals.
9389         (xtensa_arch_setup, xtensa_regs_info): New functions.
9390         (the_low_target): Adjust.
9391         (initialize_low_arch): New function.
9392         * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9393         (nios2_arch_setup): Set the current process'es tdesc.
9394         (target_regsets): Rename to ...
9395         (nios2_regsets): ... this.
9396         (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9397         (nios2_regs_info): New function.
9398         (the_low_target): Adjust.
9399         (initialize_low_arch): New function.
9400         * linux-aarch64-low.c (tdesc_aarch64): Declare.
9401         (aarch64_arch_setup): Set the current process'es tdesc.
9402         (target_regsets): Rename to ...
9403         (aarch64_regsets): ... this.
9404         (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9405         (aarch64_regs_info): New function.
9406         (the_low_target): Adjust.
9407         (initialize_low_arch): New function.
9408         * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9409         globals.
9410         (target_regsets): Rename to ...
9411         (tile_regsets): ... this.
9412         (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9413         (tile_regs_info): New function.
9414         (tile_arch_setup): Set the current process'es tdesc.
9415         (the_low_target): Adjust.
9416         (initialize_low_arch): New function.
9417         * spu-low.c (tdesc_spu): Declare.
9418         (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9419         * win32-arm-low.c (tdesc_arm): Declare.
9420         (arm_arch_setup): New function.
9421         (the_low_target): Install arm_arch_setup instead of
9422         init_registers_arm.
9423         * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9424         (init_windows_x86): Rename to ...
9425         (i386_arch_setup): ... this.  Set `win32_tdesc'.
9426         (the_low_target): Adjust.
9427         * win32-low.c (win32_tdesc): New global.
9428         (child_add_thread): Don't create the thread cache here.
9429         (do_initial_child_stuff): Set the new process'es tdesc.
9430         * win32-low.h (struct target_desc): Forward declare.
9431         (win32_tdesc): Declare.
9432         * lynx-i386-low.c (tdesc_i386): Declare global.
9433         (lynx_i386_arch_setup): Set `lynx_tdesc'.
9434         * lynx-low.c (lynx_tdesc): New global.
9435         (lynx_add_process): Set the new process'es tdesc.
9436         * lynx-low.h (struct target_desc): Forward declare.
9437         (lynx_tdesc): Declare global.
9438         * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9439         (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9440         * nto-low.c (nto_tdesc): New global.
9441         (do_attach): Set the new process'es tdesc.
9442         * nto-low.h (struct target_desc): Forward declare.
9443         (nto_tdesc): Declare.
9444         * nto-x86-low.c (tdesc_i386): Declare.
9445         (nto_x86_arch_setup): Set `nto_tdesc'.
9447 2013-06-04  Gary Benson  <gbenson@redhat.com>
9449         * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9450         to qSupported response when appropriate.
9451         (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9452         with nonzero-length annex.
9453         * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9454         arguments supplied in annex.
9456 2013-05-31  Doug Evans  <dje@google.com>
9458         PR server/15594
9459         * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9460         64 bits in 64-cross-32 environment.
9462 2013-05-28  Pedro Alves  <palves@redhat.com>
9464         * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9465         (aarch64-without-fpu.c): Delete rule.
9466         * configure.srv (aarch64*-*-linux*): Remove references to
9467         aarch64-without-fpu.o and aarch64-without-fpu.xml.
9468         * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9469         declaration.
9471 2013-05-24  Pedro Alves  <palves@redhat.com>
9473         * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9474         instead of strchr/decode_address.  Error if the range isn't split
9475         with a ','.  Don't assume there's be a ':' in the action.
9477 2013-05-23  Yao Qi  <yao@codesourcery.com>
9478             Pedro Alves  <palves@redhat.com>
9480         * linux-low.c (lwp_in_step_range): New function.
9481         (linux_wait_1): If the thread was range stepping and stopped
9482         outside the stepping range, report the stop to GDB.  Otherwise,
9483         continue stepping.  Add range stepping debug output.
9484         (linux_set_resume_request): Copy the step range from the resume
9485         request to the lwp.
9486         (linux_supports_range_stepping): New.
9487         (linux_target_ops) <supports_range_stepping>: Set to
9488         linux_supports_range_stepping.
9489         * linux-low.h (struct linux_target_ops)
9490         <supports_range_stepping>: New field.
9491         (struct lwp_info) <step_range_start, step_range_end>: New fields.
9492         * linux-x86-low.c (x86_supports_range_stepping): New.
9493         (the_low_target) <supports_range_stepping>: Set to
9494         x86_supports_range_stepping.
9495         * server.c (handle_v_cont): Handle 'r' action.
9496         (handle_v_requests): Append ";r" if the target supports range
9497         stepping.
9498         * target.h (struct thread_resume) <step_range_start,
9499         step_range_end>: New fields.
9500         (struct target_ops) <supports_range_stepping>:
9501         New field.
9502         (target_supports_range_stepping): New macro.
9504 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
9506         * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9507         confusion in comment.
9509 2013-05-17  Joel Brobecker  <brobecker@adacore.com>
9511         * lynx-low.c (struct process_info_private): New type.
9512         (lynx_add_process): New function.
9513         (lynx_create_inferior, lynx_attach): Replace calls to
9514         add_process by calls to lynx_add_process.
9515         (lynx_resume): If PTID is null, then try using
9516         current_process()->private->last_wait_event_ptid.
9517         Add comments.
9518         (lynx_clear_inferiors): Delete.  The contents of that function
9519         has been inlined in lynx_mourn;
9520         (lynx_wait_1): Save the ptid in the process's private data.
9521         (lynx_mourn): Free the process' private data.  Replace call
9522         to lynx_clear_inferiors by call to clear_inferiors.
9524 2013-05-17  Yao Qi  <yao@codesourcery.com>
9526         * i386-low.c (i386_length_and_rw_bits): Move the comment to
9527         the right place.
9529 2013-05-16  Luis Machado  <lgustavo@codesourcery.com>
9531         * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9532         PT_DATA_ADDR and PT_TEXT_END_ADDR.  Update comments.
9533         (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9534         PT_TEXT_END_ADDR guards.  Update comments.
9535         (linux_target_op) <read_offsets>: Conditionally define to
9536         linux_read_offsets if the target is UCLIBC and if it defines
9537         PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9539 2013-05-06  Sandra Loosemore  <sandra@codesourcery.com>
9540             Andrew Jenner  <andrew@codesourcery.com>
9542         * Makefile.in (SFILES): Add linux-nios2-low.c.
9543         (clean): Add action to delete nios2-linux.c.
9544         (nios2-linux.c): New rule.
9545         * configure.srv: Add nios2*-*-linux*.
9546         * linux-nios2-low.c: New.
9548 2013-05-03  Hafiz Abid Qadeer  <abidh@codesourcery.com>
9550         * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9552 2013-04-25  Hui Zhu  <hui@codesourcery.com>
9554         PR gdb/15186
9555         * ax.c (ax_printf): Add fflush.
9557 2013-04-22  Tom Tromey  <tromey@redhat.com>
9559         * Makefile.in (SFILES): Add filestuff.c.
9560         (OBS): Add filestuff.o.
9561         (filestuff.o): New target.
9562         * config.in, configure: Rebuild.
9563         * configure.ac: Check for fdwalk, pipe2.
9565 2013-04-17  Pedro Alves  <palves@redhat.com>
9567         * configure.ac (USE_THREAD_DB): Delete variable.
9568         (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9569         Don't AC_SUBST USE_THREAD_DB.
9570         * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9571         * config.in, configure: Regenerate.
9573 2013-04-16  Pedro Alves  <palves@redhat.com>
9575         * linux-low.h (struct lwp_info) <thread_known>: Move under
9576         the USE_THREAD_DB #ifdef.
9578 2013-04-16  Pedro Alves  <palves@redhat.com>
9580         * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9581         (linux-low.o): Delete rule.
9582         * linux-low.h: Always include "gdb_thread_db.h" instead of
9583         conditionally including thread_db.h.
9584         (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9585         HAVE_THREAD_DB_H.
9587 2013-04-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
9589         * Makefile.in (install-only): Fix make install regression.
9591 2013-04-05  Jan Kratochvil  <jan.kratochvil@redhat.com>
9593         Convert man pages to texinfo, new gdbinit.5 texinfo page.
9594         * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9595         installation.
9596         * gdbserver.1: Remove.
9598 2013-03-22  Pedro Alves  <palves@redhat.com>
9600         * linux-low.c (handle_extended_wait): Don't call
9601         linux_enable_event_reporting.
9603 2013-03-15  Tony Theodore  <tonyt@logyst.com>
9605         PR build/9098:
9606         * Makefile.in (SHELL): Use @SHELL@.
9608 2013-03-14  Sergio Durigan Junior  <sergiodj@redhat.com>
9610         * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9611         compiler warning.
9613 2013-03-13  Joel Brobecker  <brobecker@adacore.com>
9615         * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9616         Remove extraneous NULL element.
9618 2013-03-13  Yao Qi  <yao@codesourcery.com>
9620         * tracepoint.c (traceframe_read_tsv): Look for the last matched
9621         'V' block in trace frame.
9623 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
9625         * target.h (struct target_ops): Add btrace ops.
9626         (target_supports_btrace): New macro.
9627         (target_enable_btrace): New macro.
9628         (target_disable_btrace): New macro.
9629         (target_read_btrace): New macro.
9630         * gdbthread.h (struct thread_info): Add btrace field.
9631         * server.c: Include btrace-common.h.
9632         (handle_btrace_general_set): New function.
9633         (handle_btrace_enable): New function.
9634         (handle_btrace_disable): New function.
9635         (handle_general_set): Call handle_btrace_general_set.
9636         (handle_qxfer_btrace): New function.
9637         (struct qxfer qxfer_packets[]): Add btrace entry.
9638         * inferiors.c (remove_thread): Disable btrace.
9639         * linux-low: Include linux-btrace.h.
9640         (linux_low_enable_btrace): New function.
9641         (linux_low_read_btrace): New function.
9642         (linux_target_ops): Add btrace ops.
9643         * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9644         Add srv_linux_btrace=yes.
9645         (x86_64-*-linux*): Add linux-btrace.o.
9646         Add srv_linux_btrace=yes.
9647         * configure.ac: Define HAVE_LINUX_BTRACE.
9648         * config.in: Regenerated.
9649         * configure: Regenerated.
9651 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
9653         * server.c (handle_qxfer): Preserve error message if -3 is
9654         returned.
9655         (qxfer): Document the -3 return value.
9657 2013-03-11  Markus Metzger  <markus.t.metzger@intel.com>
9659         * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9660         (linux_btrace_h): New variable.
9661         (linux-btrace.o): New rule.
9663 2013-03-08  Stan Shebs  <stan@codesourcery.com>
9664             Hafiz Abid Qadeer  <abidh@codesourcery.com>
9666         * tracepoint.c (trace_buffer_size): New global.
9667         (DEFAULT_TRACE_BUFFER_SIZE): New define.
9668         (init_trace_buffer): Change to one-argument function. Allocate
9669         trace buffer memory.
9670         (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9671         handle QTBuffer:size packet.
9672         (cmd_bigqtbuffer_size): New function.
9673         (initialize_tracepoint): Call init_trace_buffer with
9674         DEFAULT_TRACE_BUFFER_SIZE.
9675         * server.c (handle_query): Add QTBuffer:size in the
9676         supported packets.
9678 2013-03-07  Yao Qi  <yao@codesourcery.com>
9680         * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9681         (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9682         of -1.
9683         (cmd_qtsp): Adjust condition.  Do post increment.
9684         Set cur_action and cur_step_action back to 0.
9686 2013-03-07  Jeremy Bennett  <jeremy.bennett@embecosm.com>
9688         PR server/15236
9689         * linux-low.c (linux_write_memory): Return early success if LEN is
9690         zero.
9692 2013-03-05  Corinna Vinschen  <vinschen@redhat.de>
9694         * configure.srv: Add x86_64-*-cygwin* as target.
9696 2013-02-28  Tom Tromey  <tromey@redhat.com>
9698         * configure.ac: Invoke AC_SYS_LARGEFILE.
9699         * configure, config.in: Rebuild.
9701 2013-02-28  Corinna Vinschen  <vinschen@redhat.com>
9703         * win32-low.c: Throughout, fix format strings and casts of
9704         printf-like functions to avoid type related warnings on all
9705         platforms.
9706         (get_child_debug_event): Print dwDebugEventCode as hex since
9707         that's how it's usually documented.
9709 2013-02-28  Yao Qi  <yao@codesourcery.com>
9711         * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9712         pulongest.
9714 2013-02-27  Jiong Wang  <jiwang@tilera.com>
9716         * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9717         (reg-tilegx32.c): New rule.
9718         * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9719         * linux-tile-low.c (tile_arch_setup): New function.  Invoke
9720         different register info initializer according to elf class.
9721         (init_registers_tilgx32): New function.  The tilegx32 register info
9722         initializer.
9723         (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9724         (tile_store_gregset): Likewise.
9726 2013-02-27  Yao Qi  <yao@codesourcery.com>
9728         * server.c (process_point_options): Print debug message when
9729         debug_threads is true.
9731 2013-02-26  Yao Qi  <yao@codesourcery.com>
9733         * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9735 2013-02-19  Pedro Alves  <palves@redhat.com>
9736             Kai Tietz <ktietz@redhat.com>
9738         PR gdb/15161
9740         * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9741         instead of strtoul to extract address from packet.
9742         (process_serial_event) <'z'>: Likewise.
9744 2013-02-18  Yao Qi  <yao@codesourcery.com>
9746         * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9748 2013-02-14  Pedro Alves  <palves@redhat.com>
9750         Plug memory leak.
9752         * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9753         TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9755 2013-02-14  Pedro Alves  <palves@redhat.com>
9757         * tracepoint.c (cmd_qtdpsrc): Use savestring.
9759 2013-02-14  Pedro Alves  <palves@redhat.com>
9761         * tracepoint.c (save_string): Delete.
9762         (add_tracepoint_action): Use savestring instead of save_string.
9764 2013-02-12  Pedro Alves  <palves@redhat.com>
9766         * linux-xtensa-low.c: Ditto.
9767         * xtensa-xtregs.c: Ditto.
9769 2013-02-12  Sanimir Agovic  <sanimir.agovic@intel.com>
9771         * thread-db.c (thread_db_get_tls_address): NULL pointer check
9772         thread_db.
9774 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
9776         * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9777         aarch64_num_wp_regs and aarch64_num_bp_regs to
9778         AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9780 2013-02-07  Marcus Shawcroft  <marcus.shawcroft@arm.com>
9782         * linux-aarch64-low.c (ps_get_thread_area): Replace
9783         PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9785 2013-02-04  Jim MacArthur  <jim.macarthur@arm.com>
9786             Marcus Shawcroft  <marcus.shawcroft@arm.com>
9787             Nigel Stephens  <nigel.stephens@arm.com>
9788             Yufeng Zhang  <yufeng.zhang@arm.com>
9790         * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9791         (aarch64.c, aarch64-without-fpu.c): New targets.
9792         * configure.srv (aarch64*-*-linux*): New.
9793         * linux-aarch64-low.c: New file.
9795 2013-02-04  Marcus Shawcroft  <marcus.shawcroft@arm.com>
9797         * linux-low.c (handle_extended_wait, linux_create_inferior)
9798         (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9799         (dequeue_one_deferred_signal, linux_resume_one_thread)
9800         (fetch_register, linux_write_memory, linux_enable_event_reporting)
9801         (linux_tracefork_grandchild, linux_test_for_tracefork)
9802         (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9803         PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9804         where the argument is 0.
9806 2013-01-25  Yao Qi  <yao@codesourcery.com>
9808         * event-loop.c: Include "queue.h".
9809         (gdb_event_p): New typedef.
9810         (struct gdb_event) <next_event>: Remove.
9811         (event_queue): Change to QUEUE(gdb_event_p).
9812         (async_queue_event): Remove.
9813         (gdb_event_xfree): New.
9814         (initialize_event_loop): New.
9815         (process_event): Use API from QUEUE.
9816         (wait_for_event): Likewise.
9817         * server.c (main): Call initialize_event_loop.
9818         * server.h (initialize_event_loop): Declare.
9820 2013-01-18  Yao Qi  <yao@codesourcery.com>
9822         * ax.h (struct eval_agent_expr_context): New.
9823         (gdb_eval_agent_expr): Update declaration.
9824         * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9825         TFRAME.  Add new argument CTX.
9826         * server.h (struct eval_agent_expr_context): Declare.
9827         (agent_mem_read, agent_tsv_read): Update declaration.
9828         (agent_mem_read_string): Likewise.
9829         * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9830         (add_traceframe_block): Add new argument TPOINT.
9831         Increase TPOINT->traceframe_usage.
9832         (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9833         eval_tracepoint_agent_expr.
9834         (condition_true_at_tracepoint): Likewise.
9835         (agent_mem_read): Remove argument TFRAME.  Add argument CTX.
9836         (agent_mem_read_string, agent_tsv_read): Likewise.
9838 2013-01-16  Yao Qi  <yao@codesourcery.com>
9840         * linux-low.c (linux_resume_one_lwp): Don't check
9841         'lwp->bp_reinsert != 0'.
9843 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
9844             Pedro Alves  <palves@redhat.com>
9846         * lynx-low.c (ptrace_request_to_str): Define a temporary
9847         macro and use it to simplify this function's implementation.
9849 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
9851         * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9852         sets errno.
9854 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
9856         * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9858 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
9860         * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9862 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
9864         * lynx-low.c (lynx_resume): Use the resume_info parameter
9865         to determine the ptid for the lynx_ptrace call, unless
9866         it is equal to minus_one_ptid, in which case we use the
9867         ptid of the current_inferior.
9868         (lynx_wait_1): After having received a thread create/exit
9869         event, resume the inferior's execution using the signaling
9870         thread's ptid, rather than the old ptid.
9872 2013-01-07  Joel Brobecker  <brobecker@adacore.com>
9874         * lynx-low.c (lynx_resume): Delete variable ret.
9876 2013-01-01  Joel Brobecker  <brobecker@adacore.com>
9878         * gdbreplay.c (gdbreplay_version): Update copyright year.
9879         * server.c (gdbserver_version): Likewise.
9881 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
9883         * lynx-low.c (lynx_wait_1): Add debug trace before adding
9884         new thread.
9886 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
9888         * lynx-low.c (ptrace_request_to_str): Add handling for
9889         PTRACE_GETTRACESIG.
9891 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
9893         * lynx-low.c (lynx_attach): Delete variable new_process.
9895 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
9897         * lynx-low.c (lynx_create_inferior): Delete variable
9898         new_process.
9900 2012-12-17  Joel Brobecker  <brobecker@adacore.com>
9902         * lynx-low.c (ptrace_request_to_str): Do not handle
9903         PTRACE_GETTHREADLIST if this macro does not exist.
9905 2012-12-15  Yao Qi  <yao@codesourcery.com>
9907         * Makefile.in (OBS): Add notif.o.
9908         * notif.c, notif.h: New.
9909         * server.c: Include "notif.h".
9910         (struct vstop_notif) <next>: Remove.
9911         <base>: New field.
9912         (queue_stop_reply): Update.
9913         (push_event, send_next_stop_reply): Remove.
9914         (discard_queued_stop_replies): Update.
9915         (notif_stop): New variable.
9916         (handle_v_stopped): Remove.
9917         (handle_v_requests): Don't call handle_v_stopped.  Call
9918         handle_ack_notif instead.
9919         (queue_stop_reply_callback): Call notif_event_enque instead
9920         of queue_stop_reply.
9921         (handle_status): Don't call send_next_stop_reply, call
9922         notif_write_event instead.
9923         (kill_inferior_callback): Likewise.
9924         (detach_or_kill_inferior_callback): Likewise.
9925         (main): Call initialize_notif.
9926         (process_serial_event): Call QUEUE_is_empty.
9927         (handle_target_event): Call notif_push instead of push event.
9928         * server.h (push_event): Remove declaration.
9930 2012-12-10  Tom Tromey  <tromey@redhat.com>
9932         * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9933         (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9934         macros.
9935         (.c.o): Rewrite.
9936         (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9937         (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9938         (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9939         (amd64-linux-ipa.o, ax.o): Rewrite.
9940         (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9941         (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9942         (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9943         (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9944         (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9945         (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9946         (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9947         (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9948         (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9949         (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9950         (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9951         (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9952         (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9953         (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9954         (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9955         (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9956         (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9957         (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9958         (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9959         (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9960         (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9961         (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9962         (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9963         (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9964         (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9965         (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9966         (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9967         (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9968         (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9969         (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9970         (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9971         (reg-tilegx.o): Remove.
9972         (all_object_files): New macro.
9973         Include .deps files.
9974         * aclocal.m4, configure: Rebuild.
9975         * acinclude.m4: Include depstand.m4, lead-dot.m4.
9976         * configure.ac: Invoke ZW_CREATE_DEPDIR,
9977         ZW_PROG_COMPILER_DEPENDENCIES.  Compute GMAKE condition.
9979 2012-12-05  Tom Tromey  <tromey@redhat.com>
9981         PR gdb/14917:
9982         * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9984 2012-11-28  Markus Metzger  <markus.t.metzger@intel.com>
9986         * configure.ac: Check for linux/perf_event.h.
9987         * config.in: Regenerated.
9988         * configure: Regenerated.
9990 2012-11-26  Maxime Villard  <rustyBSD@gmx.fr>
9992         * hostio.c (handle_readlink): Decrease buffer size
9993         parameter passed to readlink by one byte.
9995 2012-11-26  Yao Qi  <yao@codesourcery.com>
9997         * configure.ac (build_warnings): Append '-Wempty-body'.
9998         * configure: Regenerated.
9999         * linux-low.c (linux_create_inferior): Use braces for empty 'if'
10000         body.
10002 2012-11-15  Pierre Muller  <muller@sourceware.org>
10004         * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
10005         * config.in: Regenerate.
10006         * configure: Regenerate.
10007         * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
10008         Use "gdb_wait.h" header instead of <sys/wait.h> header.
10009         * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10010         * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
10011         header.
10012         * server.c: Remove HAVE_WAIT_H conditional.  Use "gdb_wait.h" header
10013         instead of <sys/wait.h> header.
10014         * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
10016 2012-11-13 Markus Metzger  <markus.t.metzger@intel.com>
10018         * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
10019         (various make rules): Remove -DGDBSERVER
10021 2012-11-09  Yao Qi  <yao@codesourcery.com>
10023         * spu-low.c (current_ptid): Move it to ..
10024         * gdbthread.h: ... here.  New.
10025         * remote-utils.c (read_ptid): Use macro 'current_ptid'.
10026         * server.c (myresume, process_serial_event): Likewise.
10027         * thread-db.c (thread_db_find_new_threads): Likewise.
10028         * tracepoint.c (run_inferior_command): Likewise.
10030 2012-10-01  Andrew Burgess  <aburgess@broadcom.com>
10032         * server.c (handle_search_memory_1): Include access length in
10033         warning message.
10035 2012-09-05  Michael Brandt  <michael.brandt@axis.com>
10037         * linux-crisv32-low.c: Fix compile errors.
10039 2012-09-04  Yao Qi  <yao@codesourcery.com>
10041         * tracepoint.c (cmd_qtsv): Adjust debug message.
10042         Don't check CUR_TPOINT.
10044 2012-08-28  Yao Qi  <yao@codesourcery.com>
10046         * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
10047         * server.h: Include 'libiberty.h' and 'ansidecl.h'.
10048         (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
10049         Remove declarations of xmalloc, xreallloc, xstrdup and
10050         freeargv.
10051         * Makefile.in (libiberty_h): New.
10052         (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
10053         (linux-bfin-low.o): Append dependency 'libiberty.h'.
10055 2012-08-23  Yao Qi  <yao@codesourcery.com>
10057         * server.h: Remove declaration of 'xsnprintf'.
10059 2012-08-22  Keith Seitz  <keiths@redhat.com>
10061         * server.h: Include build-gnulib-gbserver/config.h.
10062         * gdbreplay.c: Likewise.
10064 2012-08-08  Doug Evans  <dje@google.com>
10066         * Makefile.in (SFILES): Add gdb_vecs.c.
10067         (OBS): Add gdb_vecs.o.
10068         (gdb_vecs_h, host_defs_h): New variables.
10069         (thread-db.o): Add $(gdb_vecs_h) dependency.
10070         (gdb_vecs.o): New rule.
10071         * thread-db.c: #include "gdb_vecs.h".
10072         (thread_db_load_search): Use a vector to iterate over path elements.
10073         Handle text appearing after "$pdir".
10075         * configure.ac: Add check for strstr.
10076         * config.in: Regenerate.
10077         * configure: Regenerate.
10079 2012-08-02  Ulrich Weigand  <ulrich.weigand@linaro.org>
10081         * hostio.c (handle_pread): If pread fails, fall back to attempting
10082         lseek/read.
10083         (handle_pwrite): Likewise for pwrite.
10085 2012-08-01  Ulrich Weigand  <ulrich.weigand@linaro.org>
10087         * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10088         between unsupported TYPE and unimplementable ADDR/LEN combination.
10089         (arm_insert_point): Act on new return value.
10091 2012-07-31  Pedro Alves  <palves@redhat.com>
10093         * server.c (process_point_options): Only skip tokens if we find
10094         one that is unrecognized.  Don't treat 'X' specially while
10095         skipping unrecognized tokens.
10097 2012-07-30  Ulrich Weigand  <ulrich.weigand@linaro.org>
10099         * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10100         to 4-byte-align HW breakpoint addresses for Thumb.
10102 2012-07-27  Yao Qi  <yao@codesourcery.com>
10104         PR remote/14161.
10106         * server.h: Declare gdb_agent_about_to_close.
10107         * target.c (kill_inferior): Include "agent.h".
10108         New.  Send command 'kill'.
10109         * target.h (kill_inferior): Removed macro.
10110         * tracepoint.c (gdb_agent_about_to_close): New.
10111         (gdb_agent_helper_thread): Handle command 'close'.
10112         Wait endlessly until the inferior stops.
10113         Install gdb_agent_remove_socket to atexit hook.
10114         (agent_socket_name): New static variable.
10115         (gdb_agent_socket_init): Replace local variable 'name' with
10116         'agent_socket_name'.
10117         (gdb_agent_remove_socket): New.
10119 2012-07-27  Yao Qi  <yao@codesourcery.com>
10121         * server.c (process_point_options): Stop at 'X' when parsing.
10123 2012-07-19  Michael Eager  <eager@eagercon.com>
10125         * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10126         to hw_execute.
10127         * linux-x86-low.c (x86_insert_point, x86_remove_point):
10128         Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10129         hardware breakpoint.
10131 2012-07-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
10133         * gdbserver/linux-low.c (initialize_low): Call
10134         linux_ptrace_init_warnings.
10136 2012-07-02  Doug Evans  <dje@google.com>
10138         * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10139         pointer to int.
10141 2012-07-02  Stan Shebs  <stan@codesourcery.com>
10143         * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10144         (ax.o): Add it to build rule.
10145         (ax-ipa.o): Ditto.
10146         (OBS): Add format.o.
10147         (IPA_OBS): Add format.o.
10148         * server.c (handle_query): Claim support for breakpoint commands.
10149         (process_point_options): Add command case.
10150         (process_serial_event): Leave running if there are printfs in
10151         effect.
10152         * mem-break.h (any_persistent_commands): Declare.
10153         (add_breakpoint_commands): Declare.
10154         (gdb_no_commands_at_breakpoint): Declare.
10155         (run_breakpoint_commands): Declare.
10156         * mem-break.c (struct point_command_list): New struct.
10157         (struct breakpoint): New field command_list.
10158         (any_persistent_commands): New function.
10159         (add_commands_to_breakpoint): New function.
10160         (add_breakpoint_commands): New function.
10161         (gdb_no_commands_at_breakpoint): New function.
10162         (run_breakpoint_commands): New function.
10163         * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10164         locally.
10165         * ax.c: Include format.h.
10166         (ax_printf): New function.
10167         (gdb_eval_agent_expr): Add printf opcode.
10169 2012-06-13  Yao Qi  <yao@codesourcery.com>
10171         * server.c (start_inferior): Remove duplicated writes to fields
10172         'last_resume_kind' and 'last_status' of 'current_inferior'.
10174 2012-06-12  Yao Qi  <yao@codesourcery.com>
10175             Pedro Alves  <palves@redhat.com>
10177         * linux-low.c (linux_set_resume_request): Simplify predicate.  Add
10178         comment.
10179         * server.c (handle_v_cont): Extend comment.
10181 2012-06-11  Yao Qi  <yao@codesourcery.com>
10183         * linux-low.c (linux_attach): Add 'static'.
10185 2012-06-06  Yao Qi  <yao@codesourcery.com>
10187         * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10189 2012-06-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
10191         Fix gcc -flto compilation warning.
10192         * server.c (main): Make variable multi_mode and attach volatile.
10194 2012-05-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
10196         * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10197         if the platform doesn't know about it.
10199 2012-05-30  Jeff Kenton  <jkenton@tilera.com>
10201         * Makefile.in (SFILES): Add linux-tile-low.c.
10202         (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10203         * configure.srv: Handle tilegx-*-linux*.
10204         * linux-tile-low.c: New file.
10206 2012-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
10208         * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10210 2012-05-24  Pedro Alves  <palves@redhat.com>
10212         PR gdb/7205
10214         Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10216 2012-05-24  Pedro Alves  <palves@redhat.com>
10218         PR gdb/7205
10220         Replace target_signal with gdb_signal throughout.
10222 2012-05-22  Maciej W. Rozycki  <macro@codesourcery.com>
10224         * linux-low.c (linux_store_registers): Avoid the copying sequence
10225         when no data has been retrieved by ptrace.
10227 2012-05-22  Will Deacon  <will.deacon@arm.com>
10229         * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10230         Include asm/ptrace.h.
10231         (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10232         already defined.
10234 2012-05-21  Maciej W. Rozycki  <macro@codesourcery.com>
10236         * linux-low.c (linux_store_registers): Don't re-retrieve data
10237         with ptrace that has already been obtained from /proc.  Always
10238         copy any data retrieved with ptrace to the buffer supplied.
10240 2012-05-11  Yao Qi  <yao@codesourcery.com>
10241             Pedro Alves  <palves@redhat.com>
10243         * linux-low.c (enum stopping_threads_kind): New.
10244         (stopping_threads): Change type to `enum stopping_threads_kind'.
10245         (handle_extended_wait): If stopping and suspending threads, leave
10246         the new_lwp suspended too.
10247         (linux_wait_for_event): Adjust.
10248         (stop_all_lwps): Set `stopping_threads' to
10249         STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10250         whether we're suspending threads or just stopping them.  Assert no
10251         recursion happens.
10253 2012-04-29  Yao Qi  <yao@codesourcery.com>
10255         * server.h: Move some code to ...
10256         * gdbthread.h: ... here.  New.
10257         * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10258         (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10259         (nto-low.o, win32-low.o): Likewise.
10260         * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10261         * regcache.c, remote-utils.c, server.c: Likewise.
10262         * target.c, tracepoint.c, win32-low.c: Likewise.
10264 2012-04-24  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
10266         * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10267         (PTRACE_ARG4_TYPE): Likewise.
10268         (PTRACE_XFER_TYPE): Likewise.
10269         * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10270         ptrace to PTRACE_ARG3_TYPE.
10271         * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10272         (PTRACE_ARG4_TYPE): Likewise.
10273         (PTRACE_XFER_TYPE): Likewise.
10274         (linux_detach_one_lwp): Cast fourth argument of
10275         ptrace to long then PTRACE_ARG4_TYPE.
10276         (regsets_fetch_inferior_registers): Cast third argument of
10277         ptrace to long then PTRACE_ARG3_TYPE.
10278         (regsets_store_inferior_registers): Likewise.
10280 2012-04-20  Pedro Alves  <palves@redhat.com>
10282         * configure: Regenerate.
10284 2012-04-19  Pedro Alves  <palves@redhat.com>
10286         * Makefile.in (GNULIB_BUILDDIR): New.
10287         (LIBGNU, INCGNU, GNULIB_H): Adjust.
10288         (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10289         (all, install-only, uninstall, clean-info, all-lib, clean): No
10290         longer pass GNULIB_FLAGS_TO_PASS.  Use subdir_do.
10291         (maintainer-clean realclean distclean): Use subdir_do.
10292         (subdir_do): New.
10293         (gnulib/import/Makefile): Adjust.  Replace gnulib/import with
10294         $(GNULIB_BUILDDIR).  Don't pass argument to config.status.
10295         * acinclude.m4: Include acx_configure_dir.m4.
10296         * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10297         calls.  Call AC_PROG_RANLIB.  Configure gnulib using
10298         ACX_CONFIGURE_DIR.
10299         (GNULIB): New.
10300         (GNULIB_STDINT_H): Adjust.
10301         (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10302         * gdbreplay.c: Include build-gnulib/config.h.
10303         * server.h: Likewise.
10304         * aclocal.m4: Regenerate.
10305         * config.in: Regenerate.
10306         * configure: Regenerate.
10308 2012-04-19  Pedro Alves  <palves@redhat.com>
10310         * Makefile.in (LIBGNU, INCGNU): Adjust.
10311         (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10312         (all, install-only, uninstall, clean-info, all-lib, clean)
10313         (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10314         * configure.ac: Adjust AC_OUTPUT output.
10315         * aclocal.m4: Regenerate.
10316         * configure: Regenerate.
10318 2012-04-19  Pedro Alves  <palves@redhat.com>
10320         * Makefile.in (generated_files): New.
10321         (server_h): Remove the explicit dependency on config.h, and depend
10322         on $generated_files.
10324 2012-04-19  Pedro Alves  <palves@redhat.com>
10326         * Makefile.in (INCGNU): Add -Ignulib.
10328 2012-04-19  Pedro Alves  <palves@redhat.com>
10330         * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10331         (INCGNU): ... this, and spell out -I here.
10332         (GNULIB_LIB): Rename to ...
10333         (LIBGNU): ... this.
10334         (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10336 2012-04-19  Pedro Alves  <palves@redhat.com>
10338         * config.in: Regenerate.
10340 2012-04-19  Pedro Alves  <palves@redhat.com>
10342         * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10343         * server.h (memmem): Remove declaration.
10344         * config.in: Regenerate.
10345         * configure: Regenerate.
10347 2012-04-19  Yao Qi  <yao@codesourcery.com>
10349         * Makefile.in (SFILES): Add common/vec.c.
10350         (OBS): Add vec.o.
10351         (vec.o): New rule.
10353 2012-04-19  Yao Qi  <yao@codesourcery.com>
10355         * remote-utils.c (prepare_resume_reply): Replace with macro
10356         target_core_of_thread.
10357         * server.c (handle_qxfer_threads_proper): Likewise.
10358         * target.h (traget_core_of_thread): New macro.
10360 2012-04-18  Pedro Alves  <palves@redhat.com>
10362         * aclocal.m4: Regenerate.
10363         * configure: Regenerate.
10365 2012-04-16  Yao Qi  <yao@codesourcery.com>
10367         * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10368         duplicated on address.
10370 2012-04-16  Yao Qi  <yao@codesourcery.com>
10372         * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10373         (struct tracepoint_action_ops) <send>: New field.
10374         (m_tracepoint_action_send, r_tracepoint_action_send): New.
10375         (agent_expr_send, x_tracepoint_action_send): New.
10376         (l_tracepoint_action_send): New.
10377         (cmd_qtdp): Download and install tracepoint
10378         according to `use_agent'.
10379         (run_inferior_command): Add one more parameter `len'.
10380         Update callers.
10381         (tracepoint_send_agent): New.
10382         (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10384 2012-04-16  Yao Qi  <yao@codesourcery.com>
10386         * tracepoint.c (download_tracepoints): Moved to ...
10387         (cmd_qtstart): ... here.
10389 2012-04-14  Yao Qi  <yao@codesourcery.com>
10391         * tracepoint.c: Include inttypes.h.
10392         (struct collect_memory_action): Use sized types.
10393         (struct tracepoint): Likewise.
10394         (cmd_qtdp, stop_tracing): Update print specifiers.
10395         (cmd_qtp, response_tracepoint): Likewise.
10396         (collect_data_at_tracepoint): Likewise.
10397         (collect_data_at_step): Likewise.
10399 2012-04-14  Yao Qi  <yao@codesourcery.com>
10401         Import gnulib module inttypes.
10402         * aclocal.m4, config.in, configure: Regenerated.
10404 2012-04-14  Yao Qi  <yao@codesourcery.com>
10406         * Makefile.in (maintainer-clean, realclean, distclean): Remove
10407         Makefile and config.status at last.
10409 2012-04-13  Yao Qi  <yao@codesourcery.com>
10411         * tracepoint.c: Include stdint.h unconditionally.
10413 2012-04-13  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
10415         * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10416         on BFD_HAVE_SYS_PROCFS_TYPE.
10417         * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10418         * configure: Regenerate.
10419         * config.in: Likewise.
10421 2012-04-13  H.J. Lu  <hongjiu.lu@intel.com>
10423         * Makefile.in (clean): Also remove x32.c x32-linux.c
10424         x32-avx.c x32-avx-linux.c.
10425         (x32.o): New target.
10426         (x32.c): Likewise.
10427         (x32-linux.o): Likewise.
10428         (x32-linux.c): Likewise.
10429         (x32-avx.o): Likewise.
10430         (x32-avx.c): Likewise.
10431         (x32-avx-linux.o): Likewise.
10432         (x32-avx-linux.c): Likewise.
10434         * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10435         (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10436         (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10437         (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10438         (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10439         i386/x32-avx-linux.xml.
10441         * linux-x86-low.c (init_registers_x32_linux): New prototype.
10442         (init_registers_x32_avx_linux): Likwise.
10443         (x86_linux_update_xmltarget): Call init_registers_x32_linux
10444         or init_registers_x32_avx_linux if linux_is_elf64 is false.
10446 2012-04-13  Pedro Alves  <palves@redhat.com>
10448         * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10449         (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10450         (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10451         (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10452         the sub-make.
10454 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
10456         * linux-x86-low.c (compat_x32_clock_t): New.
10457         (compat_x32_siginfo_t): Likewise.
10458         (compat_x32_siginfo_from_siginfo): Likewise.
10459         (siginfo_from_compat_x32_siginfo): Likewise.
10460         (linux_is_elf64): Likewise.
10461         (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10462         and siginfo_from_compat_x32_siginfo for x32.
10463         (x86_arch_setup): Set linux_is_elf64.
10465 2012-04-12  H.J. Lu  <hongjiu.lu@intel.com>
10467         PR gdb/13969
10468         * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10469         e_machine field.
10470         (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10471         * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10472         * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10473         compatible with process.
10475 2012-04-12  Yao Qi  <yao@codesourcery.com>
10477         * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10478         (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10479         (install-only, install-info, clean): Handle sub dir gnulib.
10480         (all-lib, am--refresh): New targets.
10481         (memmem.o): Remove target.
10482         * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10483         Invoke gl_EARLY.  Invoke AC_CHECK_PROGS for make.
10484         (AC_REPLACE_FUNCS): Remove memmem.
10485         Invoke gl_INIT and AM_INIT_AUTOMAKE.
10486         (AC_OUTPUT): Generate Makefile in gnulib/.
10487         * aclocal.m4, config.in, configure: Regenerated.
10489 2012-04-10  Maciej W. Rozycki  <macro@codesourcery.com>
10491         * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10493 2012-04-05  Pedro Alves  <palves@redhat.com>
10495         -Werror=strict-aliasing
10497         * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10498         pointer.
10500 2012-04-04  Pedro Alves  <palves@redhat.com>
10502         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10503         (sparc_store_gregset_from_stack, sparc_store_gregset)
10504         (sparc_breakpoint_at): Fix formatting.
10506 2012-03-30  Thiago Jung Bauermann  <thiago.bauermann@linaro.org>
10508         * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10509         are available.
10510         * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10511         [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10512         * config.in: Regenerate.
10513         * configure: Likewise.
10515 2012-03-29  Pedro Alves  <palves@redhat.com>
10517         * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10518         Correct ptrace arguments.
10520 2012-03-28  Pedro Alves  <palves@redhat.com>
10522         * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10523         (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10524         (IA64_FR1_REGNUM): New defines.
10525         (ia64_fetch_register): New.
10526         (the_low_target): Install it.
10527         * linux-low.h (struct linux_target_ops) <fetch_register>: New
10528         field.
10529         * linux-low.c (linux_fetch_registers): Try the
10530         the_low_target.fetch_register hook first.
10532         * linux-arm-low.c (the_low_target): Adjust.
10533         * linux-bfin-low.c (the_low_target): Adjust.
10534         * linux-cris-low.c (the_low_target): Adjust.
10535         * linux-crisv32-low.c (the_low_target): Adjust.
10536         * linux-m32r-low.c (the_low_target): Adjust.
10537         * linux-m68k-low.c (the_low_target): Adjust.
10538         * linux-mips-low.c (the_low_target): Adjust.
10539         * linux-ppc-low.c (the_low_target): Adjust.
10540         * linux-s390-low.c (the_low_target): Adjust.
10541         * linux-sh-low.c (the_low_target): Adjust.
10542         * linux-sparc-low.c (the_low_target): Adjust.
10543         * linux-tic6x-low.c (the_low_target): Adjust.
10544         * linux-x86-low.c (the_low_target): Adjust.
10545         * linux-xtensa-low.c (the_low_target): Adjust.
10547 2012-03-26  Pedro Alves  <palves@redhat.com>
10549         * server.c (handle_qxfer_libraries): Don't bail early if
10550         the_target->qxfer_libraries_svr4 is not NULL.
10552 2012-03-26  Pedro Alves  <palves@redhat.com>
10554         * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10556 2012-03-23  Pedro Alves  <palves@redhat.com>
10558         * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10559         "library-list-svr4" element's start tag when the the DSO list is
10560         empty.
10562 2012-03-23  Pedro Alves  <palves@redhat.com>
10564         * linux-low.c (read_one_ptr): Read the inferior's pointer through
10565         a variable whose type size is the same as the inferior's pointer
10566         size.
10568 2012-03-21  Thomas Schwinge  <thomas@codesourcery.com>
10570         * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10571         struct siginfo.
10572         * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10573         * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10574         * linux-low.h: Include <signal.h>.
10575         (struct siginfo): Remove forward declaration.
10576         (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10577         struct siginfo.
10579 2012-03-21  Mike Frysinger  <vapier@gentoo.org>
10581         * .gitignore: Ignore more files.
10583 2012-03-19  Pedro Alves  <palves@redhat.com>
10584             Jan Kratochvil  <jan.kratochvil@redhat.com>
10586         * server.c (cont_thread, general_thread): Add describing comments.
10587         (start_inferior): Clear `cont_thread'.
10588         (handle_v_cont): Don't set `cont_thread' if resuming all threads
10589         of a process.
10591 2012-03-15  Yao Qi  <yao@codesourcery.com>
10593         * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10594         handling to ...
10595         (cmd_qtdp): ... here.
10597 2012-03-15  Yao Qi  <yao@codesourcery.com>
10599         * tracepoint.c (struct tracepoint_action_ops): New.
10600         (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10601         (m_tracepoint_action_download): New.
10602         (r_tracepoint_action_download): New.
10603         (x_tracepoint_action_download): New.
10604         (l_tracepoint_action_download): New.
10605         (add_tracepoint_action): Install `action->ops' according type.
10606         (download_tracepoint_1): Move code `download' function pointer
10607         of various tracepoint_action_ops.
10609 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
10611         * linux-low.c (linux_attach_lwp_1): New variable buffer.  Call
10612         linux_ptrace_attach_warnings.
10614 2012-03-13  Jan Kratochvil  <jan.kratochvil@redhat.com>
10616         * Makefile.in (linux-ptrace.o): New.
10617         * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10618         (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10619         (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10620         (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10621         (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10622         of these targets.
10623         * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10625 2012-03-08  Yao Qi  <yao@codesourcery.com>
10626             Pedro Alves  <palves@redhat.com>
10628         Fix PR server/13392.
10629         * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10630         offset of JMP insn.
10631         * tracepoint.c (remove_tracepoint): New.
10632         (cmd_qtdp): Call remove_tracepoint when failed to install.
10634 2012-03-07  Pedro Alves  <palves@redhat.com>
10636         * linux-low.c (get_detach_signal): New.
10637         (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10638         Pass on pending signals to PTRACE_DETACH.  Check the result of the
10639         ptrace call.
10640         * server.c (program_signals, program_signals_p): New.
10641         (handle_general_set): Handle QProgramSignals.
10642         * server.h (program_signals, program_signals_p): Declare.
10644 2012-03-05  Pedro Alves  <palves@redhat.com>
10645             Jan Kratochvil  <jan.kratochvil@redhat.com>
10647         * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10648         New comment why.
10650 2012-03-03  Yao Qi  <yao@codesourcery.com>
10652         * tracepoint.c (tracepoint_look_up_symbols): Update call to
10653         agent_look_up_symbols.
10655 2012-03-03  Yao Qi  <yao@codesourcery.com>
10657         * Makefile.in (linux-low.o): Keep dependence on agent.h.
10658         (linux-x86-low.o): Likewise.
10659         * server.h: Remove in_process_agent_loaded.
10660         * tracepoint.c (in_process_agent_loaded): Removed.  Moved it
10661         common/agent.c.
10662         Update callers.
10664 2012-03-03  Yao Qi  <yao@codesourcery.com>
10666         * tracepoint.c (gdb_agent_capability): New global.
10667         (in_process_agent_loaded_ust): Renamed to
10668         `in_process_agent_supports_ust'.
10669         Update callers.
10670         (in_process_agent_supports_ust): Call agent_capability_check.
10671         (clear_installed_tracepoints): Assert that agent supports
10672         agent.
10674 2012-03-03  Yao Qi  <yao@codesourcery.com>
10676         * linux-low.c (linux_supports_agent): New.
10677         (linux_target_ops): Initialize field `supports_agent' with
10678         linux_supports_agent.
10679         * target.h (struct target_ops) <supports_agent>: New.
10680         (target_supports_agent): New macro.
10681         * server.c (handle_general_set): Handle packet 'QAgent'.
10682         (handle_query): Send `QAgent+'.
10683         * Makefile.in (server.o): Depends on agent.h.
10685 2012-03-03  Yao Qi  <yao@codesourcery.com>
10687         * Makefile.in (OBS): Add agent.o.
10688         Add new rule for agent.o.
10689         Track dependence of tracepoint.c on agent.h.
10690         * tracepoint.c (run_inferior_command_1):
10691         (run_inferior_command): Call agent_run_command.
10692         (gdb_ust_connect_sync_socket): Deleted.  Move it to
10693         common/agent.c.
10694         (resume_thread, stop_thread): Likewise.
10695         (gdb_ust_socket_init): Renamed to ...
10696         (gdb_agent_socket_init): ... New.
10697         (gdb_ust_thread): Renamed to ...
10698         (gdb_agent_helper_thread): ... New.
10699         (gdb_ust_init): Move some code to ...
10700         (gdb_agent_init): ... here.  New.
10701         [HAVE_UST]: Call gdb_ust_init.
10702         (initialize_tracepoint_ftlib):  Call gdb_agent_init.
10703         * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10704         * config.in, configure: Regenerated.
10706 2012-03-02  Pedro Alves  <palves@redhat.com>
10708         * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10709         * linux-low.c (struct simple_pid_list): New.
10710         (stopped_pids): New a struct simple_pid_list pointer.
10711         (add_to_pid_list, pull_pid_from_list): New.
10712         (handle_extended_wait): Don't assume the first signal new children
10713         report is SIGSTOP.  Adjust call to pull_pid_from_list.
10714         (linux_wait_for_lwp): Adjust.
10716 2012-03-02  Yao Qi  <yao@codesourcery.com>
10718         * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10719         debug log.
10721 2012-03-02  Yao Qi  <yao@codesourcery.com>
10723         * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10724         `stop_pc' and `tpoint'.  Update caller.
10726 2012-03-01  Maciej W. Rozycki  <macro@codesourcery.com>
10728         * linux-low.h (linux_target_ops): Add regset_bitmap member.
10729         * linux-low.c (use_linux_regsets): New macro.
10730         [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10731         [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10732         (linux_register_in_regsets): New function.
10733         (usr_fetch_inferior_registers): Skip registers covered by
10734         regsets.
10735         (usr_store_inferior_registers): Likewise.
10736         (usr_fetch_inferior_registers): New macro.
10737         (usr_store_inferior_registers): Likewise.
10738         (linux_fetch_registers): Handle mixed regset/non-regset targets.
10739         (linux_store_registers): Likewise.
10740         * linux-mips-low.c (init_registers_mips_dsp_linux): New
10741         prototype.
10742         (init_registers_mips64_dsp_linux): Likewise.
10743         (init_registers_mips_linux): New macro.
10744         (init_registers_mips_dsp_linux): Likewise.
10745         (mips_dsp_num_regs): Likewise.
10746         (DSP_BASE, DSP_CONTROL): New fallback macros.
10747         (mips_base_regs): New macro.
10748         (mips_regmap): Use it.  Fix the size.
10749         (mips_dsp_regmap): New variable.
10750         (mips_dsp_regset_bitmap): Likewise.
10751         (mips_arch_setup): New function.
10752         (mips_cannot_fetch_register): Use the_low_target.regmap rather
10753         than mips_regmap.
10754         (mips_cannot_store_register): Likewise.
10755         (the_low_target): Update .arch_setup, .num_regs and .regmap
10756         initializers.  Add .regset_bitmap initializer.
10757         * linux-arm-low.c (the_low_target): Add .regset_bitmap
10758         initializer.
10759         * linux-bfin-low.c (the_low_target): Likewise.
10760         * linux-cris-low.c (the_low_target): Likewise.
10761         * linux-crisv32-low.c (the_low_target): Likewise.
10762         * linux-ia64-low.c (the_low_target): Likewise.
10763         * linux-m32r-low.c (the_low_target): Likewise.
10764         * linux-m68k-low.c (the_low_target): Likewise.
10765         * linux-ppc-low.c (the_low_target): Likewise.
10766         * linux-s390-low.c (the_low_target): Likewise.
10767         * linux-sh-low.c (the_low_target): Likewise.
10768         * linux-sparc-low.c (the_low_target): Likewise.
10769         * linux-tic6x-low.c (the_low_target): Likewise.
10770         * linux-x86-low.c (the_low_target): Likewise.
10771         * linux-xtensa-low.c (the_low_target): Likewise.
10772         * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10773         mips64-dsp-linux.o to srv_regobj.  Add mips-dsp-linux.xml,
10774         mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10775         srv_xmlfiles.
10776         * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10777         (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10779 2012-02-29  Yao Qi  <yao@codesourcery.com>
10780             Pedro Alves  <palves@redhat.com>
10782         * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10783         `step_over_finished' is true.
10785 2012-02-27  Pedro Alves  <palves@redhat.com>
10787         * linux-low.c (pid_is_stopped): Delete, moved to common/.
10788         (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10790 2012-02-27  Pedro Alves  <palves@redhat.com>
10792         PR server/9684
10793         * linux-low.c (pid_is_stopped): New.
10794         (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10796 2012-02-25  Luis Machado  <lgustavo@codesourcery.com>
10798         * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10799         of conditions.
10801 2012-02-24  Maciej W. Rozycki  <macro@codesourcery.com>
10803         * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10805 2012-02-24  Luis Machado  <lgustavo@codesourcery>
10807         * server.c (handle_query): Advertise support for target-side
10808         breakpoint condition evaluation.
10809         (process_point_options): New function.
10810         (process_serial_event): When inserting a breakpoint, check for
10811         a target-side condition that should be evaluated.
10813         * mem-break.c: Include regcache.h and ax.h.
10814         (point_cond_list_t): New data structure.
10815         (breakpoint) <cond_list>: New field.
10816         (find_gdb_breakpoint_at): Make non-static.
10817         (delete_gdb_breakpoint_at): Clear any target-side
10818         conditions.
10819         (clear_gdb_breakpoint_conditions): New function.
10820         (add_condition_to_breakpoint): Likewise.
10821         (add_breakpoint_condition): Likewise.
10822         (gdb_condition_true_at_breakpoint): Likewise.
10823         (gdb_breakpoint_here): Return result directly instead
10824         of going through a local variable.
10826         * mem-break.h (find_gdb_breakpoint_at): New prototype.
10827         (clear_gdb_breakpoint_conditions): Likewise.
10828         (add_breakpoint_condition): Likewise.
10829         (gdb_condition_true_at_breakpoint): Likewise.
10831         * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10832         (need_step_over_p): Take target-side breakpoint condition into
10833         consideration.
10835 2012-02-24  Luis Machado  <lgustavo@codesourcery>
10837         * server.h: Include tracepoint.h.
10838         (agent_mem_read, agent_get_trace_state_variable_value,
10839         agent_set_trace_state_variable_value,
10840         agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10841         get_set_tsv_func_addr): New prototypes.
10843         * ax.h: New include file.
10844         * ax.c: New source file.
10846         * tracepoint.c: Include ax.h.
10847         (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10848         agent_expr, eval_result_type): Move to ax.h.
10849         (parse_agent_expr): Rename to ...
10850         (gdb_parse_agent_expr): ... this, make it non-static and move
10851         to ax.h.
10852         (unparse_agent_expr) Rename to ...
10853         (gdb_unparse_agent_expr): ... this, make it non-static and move
10854         to ax.h.
10855         (eval_agent_expr): Rename to ...
10856         (eval_tracepoint_agent_expr): ... this.
10857         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10858         forward declarations.
10859         (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10860         (agent_get_trace_state_variable_value): New function.
10861         (agent_set_trace_state_variable_value): New function.
10862         (cmd_qtdp): Call gdb_parse_agent_expr (...).
10863         (response_tracepoint): Call gdb_unparse_agent_expr (...).
10864         (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10865         (condition_true_at_tracepoint): Likewise.
10866         (parse_agent_expr): Rename to ...
10867         (gdb_parse_agent_expr): ... this and move to ax.c.
10868         (unparse_agent_expr): Rename to ...
10869         (gdb_unparse_agent_expr): ... this and move to ax.c.
10870         (gdb_agent_op_name): Move to ax.c.
10871         (eval_agent_expr): Rename to ...
10872         (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10873         and move to ax.c.
10874         (eval_tracepoint_agent_expr): New function.
10875         (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10876         non-static.
10877         (current_insn_ptr, emit_error, struct bytecode_address): Move to
10878         ax.c.
10879         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10880         emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10881         emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10882         emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10883         emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10884         emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10885         emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10886         emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10887         (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10888         (compile_bytecodes): Remove forward declaration.
10889         (is_goto_target): Move to ax.c.
10890         (compile_bytecodes): Move to ax.c and call
10891         agent_get_trace_state_variable_value (...) and
10892         agent_set_trace_state_variable_value (...).
10894         * Makefile.in: Update ax.c and IPA dependencies.
10896 2012-02-24  Pedro Alves  <palves@redhat.com>
10898         * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10899         (cmd_bigqtbuffer_circular): ... this.  Only handle
10900         'QTBuffer:circular:'.
10901         (handle_tracepoint_general_set): Adjust.
10903 2012-02-16  Yao Qi  <yao@codesourcery.com>
10905         * inferiors.c: Move code to ...
10906         * dll.c: .... here.  New.
10907         * server.h: Declare clear_dlls.
10908         * Makefile.in (SFILES): Add dll.c.
10909         (OBS): Add dll.o
10910         (dll.o): New rule.
10912 2012-02-11  Yao Qi  <yao@codesourcery.com>
10914         * server.c: (handle_monitor_command): Add a new parameter
10915         `own_buf'.
10916         (handle_query): Update caller.
10918 2012-02-09  Joel Brobecker  <brobecker@adacore.com>
10920         * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10921         * configure, config.in: Regenerate.
10922         * hostio.c: Provide an alternate implementation if HAVE_READLINK
10923         is not defined.
10925 2012-02-02  Pedro Alves  <palves@redhat.com>
10927         Try SIGKILL first, then PTRACE_KILL.
10928         * linux-low.c (linux_kill_one_lwp): New.
10929         (linux_kill_one_lwp): Rename to ...
10930         (kill_one_lwp_callback): ... this.  Use the new
10931         linux_kill_one_lwp.
10933 2012-02-02  Pedro Alves  <palves@redhat.com>
10935         * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10936         inferior.
10938 2012-01-27  Pedro Alves  <palves@redhat.com>
10940         * linux-low.c (linux_child_pid_to_exec_file): Delete.
10941         (elf_64_file_p): Make static.
10942         (linux_pid_exe_is_elf_64_file): New.
10943         * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10944         Delete declarations.
10945         (linux_pid_exe_is_elf_64_file): Declare.
10946         * linux-x86-low.c (x86_arch_setup): Use
10947         linux_pid_exe_is_elf_64_file.
10949 2012-01-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
10951         * linux-low.c (linux_wait_for_event_1): Rename to ...
10952         (linux_wait_for_event): ... here and merge it with former
10953         linux_wait_for_event - new variable wait_ptid, use it.
10954         (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10956 2012-01-23  Pedro Alves  <palves@redhat.com>
10958         * server.c (main): Avoid yet another case of infinite loop while
10959         detaching/killing after a longjmp.
10961 2012-01-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
10963         Code cleanup.
10964         * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10966 2012-01-20  Ulrich Weigand  <ulrich.weigand@linaro.org>
10968         * hostio.c (handle_readlink): New function.
10969         (handle_vFile): Call it to handle "vFile:readlink" packets.
10971 2012-01-20  Pedro Alves  <palves@redhat.com>
10972             Ulrich Weigand  <ulrich.weigand@linaro.org>
10974         * server.c (handle_v_requests): Only support vAttach and vRun to
10975         start multiple processes when in extended protocol mode.
10977 2012-01-17  Pedro Alves  <palves@redhat.com>
10979         * tracepoint.c (initialize_tracepoint): Use mmap instead of
10980         memalign plus mprotect to allocate the scratch buffer.
10982 2012-01-13  Pedro Alves  <palves@redhat.com>
10984         * server.c (attach_inferior): Clear `cont_thread'.
10986 2012-01-13  Pedro Alves  <palves@redhat.com>
10988         * server.c (main): Avoid infinite loop while detaching/killing
10989         after a longjmp.
10991 2012-01-09  Doug Evans  <dje@google.com>
10993         * server.c (start_inferior): Set last_ptid in --wrapper case.
10995 2012-01-06  Yao Qi  <yao@codesourcery.com>
10997         * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10998         defined.
10999         [IN_PROCESS_AGENT] (debug_agent): New global variable.
11001 2012-01-04  Yao Qi  <yao@codesourcery.com>
11003         * tracepoint.c (cmd_qtdp): Print debug message
11004         for static tracepoint.
11006 2012-01-04  Yao Qi  <yao@codesourcery.com>
11008         * tracepoint.c (trace_vdebug): Differentiate debug message
11009         between gdbserver and IPA.
11011 2012-01-03  Yao Qi  <yao@codesourcery.com>
11013         * tracepoint.c (tracepoint_was_hit): Don't collect for
11014         static tracepoint.
11016 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
11018         * terminal.h: Reformat copyright header.
11020 2012-01-02  Joel Brobecker  <brobecker@adacore.com>
11022         * server.c (gdbserver_version): Update copyright year.
11023         * gdbreplay.c (gdbreplay_version): Likewise.
11025 2011-12-18  Jan Kratochvil  <jan.kratochvil@redhat.com>
11027         * linux-low.c (linux_create_inferior): Put empty if clause for write.
11029         Revert:
11030         2011-12-18  Hui Zhu  <teawater@gmail.com>
11031         * linux-low.c (linux_create_inferior): Save return value to ret.
11033 2011-12-18  Hui Zhu  <teawater@gmail.com>
11035         * linux-low.c (linux_create_inferior): Save return value to ret.
11037 2011-12-16  Doug Evans  <dje@google.com>
11039         * linux-low.c (linux_create_inferior): If stdio connection,
11040         redirect stdin from /dev/null, stdout to stderr.
11041         * remote-utils.c (remote_is_stdio): New static global.
11042         (remote_connection_is_stdio): New function.
11043         (remote_prepare): Handle stdio connection.
11044         (remote_open): Ditto.
11045         (remote_close): Don't close stdin for stdio connections.
11046         (read_prim,write_prim): New functions.  Replace all calls to
11047         read/write to these.
11048         * server.c (main): Watch for "-" argument.  Move call to
11049         remote_prepare before start_inferior.
11050         * server.h (STDIO_CONNECTION_NAME): New macro.
11051         (remote_connection_is_stdio): Declare.
11053         * remote-utils.c (prepare_resume_reply): Remove extraneous \n
11054         in debugging output.
11056 2011-12-15  Yao Qi  <yao@codesourcery.com>
11058         * tracepoint.c: Include sys/syscall.h.
11059         (gdb_ust_thread): Remove preprocessor conditional.
11061 2011-12-14  Pedro Alves  <pedro@codesourcery.com>
11063         * linux-low.c (linux_detach_one_lwp): Call
11064         the_low_target.prepare_to_resume before detaching.
11066 2011-12-14  Yao Qi  <yao@codesourcery.com>
11068         * tracepoint.c (gdb_ust_thread): Don't ignore return value
11069         of write.
11071 2011-12-14  Yao Qi  <yao@codesourcery.com>
11073         * i386-low.c (i386_low_stopped_data_address): Initialize local
11074         variable `control'.
11076 2011-12-13  Pedro Alves  <pedro@codesourcery.com>
11078         PR remote/13492
11080         * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11081         DR_CONTROL unless necessary.  Extend comments.
11082         * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11083         DR0-3 if not used.  If any watchpoint was set, clear DR_STATUS.
11085 2011-12-13  Yao Qi  <yao@codesourcery.com>
11087         * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11088         macros.
11089         (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11091 2011-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
11093         * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11094         Print new debug message for such case.
11096 2011-12-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
11098         Fix overlapping memcpy.
11099         * mem-break.c (set_raw_breakpoint_at): New variable buf.  Use it for
11100         the read_inferior_memory transfer.
11101         (delete_fast_tracepoint_jump): New variable buf.  Use it for the
11102         write_inferior_memory transfer.
11103         (set_fast_tracepoint_jump): New variable buf.  Use it for the
11104         read_inferior_memory and write_inferior_memory transfers.
11105         (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11106         (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11107         Use it for the write_inferior_memory transfer.
11108         (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11109         buffers.
11111 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
11113         * linux-low.c (fetch_register, store_register): Make code
11114         consistent, fix formatting.
11116 2011-12-06  Maciej W. Rozycki  <macro@codesourcery.com>
11118         * linux-low.c (usr_store_inferior_registers): Factor out code
11119         to handle individual registers into...
11120         (store_register): ... this new function.
11122 2011-12-06  Ulrich Weigand  <uweigand@de.ibm.com>
11124         * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11125         (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11126         (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11127         (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11128         (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11129         (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11130         * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11131         (srv_xmlfiles): Add new XML files.
11133         * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11134         and <sys/uio.h>.
11135         (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11136         (init_registers_s390_linux32v1): Add prototype.
11137         (init_registers_s390_linux32v2): Likewise.
11138         (init_registers_s390_linux64v1): Likewise.
11139         (init_registers_s390_linux64v2): Likewise.
11140         (init_registers_s390x_linux64v1): Likewise.
11141         (init_registers_s390x_linux64v2): Likewise.
11142         (s390_num_regs): Increment to 52.
11143         (s390_regmap): Add orig_r2 register.
11144         (s390_num_regs_3264): Increment to 68.
11145         (s390_regmap_3264): Add orig_r2 register.
11146         (s390_collect_ptrace_register): Handle orig_r2 register.
11147         (s390_supply_ptrace_register): Likewise.
11148         (s390_fill_last_break): New function.
11149         (s390_store_last_break): Likewise.
11150         (s390_fill_system_call): New function.
11151         (s390_store_system_call): Likewise.
11152         (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11153         register sets.
11154         (s390_check_regset): New function.
11155         (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11156         NT_S390_SYSTEM_CALL regsets and use appropriate description.
11157         Update target_regsets for available register sets.
11159 2011-12-02  Paul Pluzhnikov  <ppluzhnikov@google.com>
11160             Jan Kratochvil  <jan.kratochvil@redhat.com>
11162         * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11163         (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11164         New.
11165         (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11166         * linux-low.h (struct process_info_private): New member r_debug.
11167         * server.c (handle_qxfer_libraries): Call
11168         the_target->qxfer_libraries_svr4.
11169         (handle_qxfer_libraries_svr4): New function.
11170         (qxfer_packets): New entry "libraries-svr4".
11171         (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11172         * target.h (struct target_ops): New member qxfer_libraries_svr4.
11173         * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11174         PACKET_qXfer_libraries_svr4.
11176 2011-11-30  Ulrich Weigand  <uweigand@de.ibm.com>
11178         * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11179         PSW address/mask between 8-byte and 16-byte formats.
11180         (s390_supply_ptrace_register): Likewise.
11181         (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11182         basic addressing mode bit.
11184 2011-11-24  Stan Shebs  <stan@codesourcery.com>
11186         * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11188 2011-11-17  Stan Shebs  <stan@codesourcery.com>
11190         * tracepoint.c (struct tracepoint): New field traceframe_usage.
11191         (tracing_start_time): New global.
11192         (tracing_stop_time): New global.
11193         (tracing_user_name): New global.
11194         (tracing_notes): New global.
11195         (tracing_stop_note): New global.
11196         (cmd_qtstart): Set traceframe_usage, start_time.
11197         (stop_tracing): Set stop_time.
11198         (cmd_qtstatus): Report additional status.
11199         (cmd_qtp): New function.
11200         (handle_tracepoint_query): Call it.
11201         (cmd_qtnotes): New function.
11202         (handle_tracepoint_general_set): Call it.
11203         (get_timestamp): Rename from tsv_get_timestamp.
11205 2011-11-14  Stan Shebs  <stan@codesourcery.com>
11206             Kwok Cheung Yeung  <kcy@codesourcery.com>
11208         * linux-x86-low.c (small_jump_insn): New.
11209         (i386_install_fast_tracepoint_jump_pad): Add arguments for
11210         trampoline and error message, build a trampoline and issue a small
11211         jump instruction to it.
11212         (x86_install_fast_tracepoint_jump_pad): Add arguments for
11213         trampoline and error message.
11214         (x86_get_min_fast_tracepoint_insn_len): New.
11215         (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11216         * linux-low.h (struct linux_target_ops): Add arguments to
11217         install_fast_tracepoint_jump_pad operation, add new operation.
11218         * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11219         arguments.
11220         (linux_get_min_fast_tracepoint_insn_len): New function.
11221         (linux_target_op): Add new operation.
11222         * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11223         (gdb_trampoline_buffer_end): Ditto.
11224         (gdb_trampoline_buffer_error): Ditto.
11225         (struct ipa_sym_addresses): Add fields for new IPA variables.
11226         (symbol_list): Add entries for new IPA variables.
11227         (struct tracepoint): Add fields to hold the address range of the
11228         trampoline used by the tracepoint.
11229         (trampoline_buffer_head): New static variable.
11230         (trampoline_buffer_tail): Ditto.
11231         (claim_trampoline_space): New function.
11232         (have_fast_tracepoint_trampoline_buffer): New function.
11233         (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11234         structure.
11235         (install_fast_tracepoint): Ditto, also add error buffer argument.
11236         (cmd_qtminftpilen): New function.
11237         (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11238         (fast_tracepoint_from_trampoline_address): New function.
11239         (fast_tracepoint_collecting): Handle trampoline as part of jump
11240         pad space.
11241         (set_trampoline_buffer_space): New function.
11242         (initialize_tracepoint): Initialize new IPA variables.
11243         * target.h (struct target_ops): Add arguments to
11244         install_fast_tracepoint_jump_pad operation, add new
11245         get_min_fast_tracepoint_insn_len operation.
11246         (target_get_min_fast_tracepoint_insn_len): New.
11247         (install_fast_tracepoint_jump_pad): Add arguments.
11248         * server.h (IPA_BUFSIZ): Define.
11249         * linux-i386-ipa.c: Include extra header files.
11250         (initialize_fast_tracepoint_trampoline_buffer): New function.
11251         (initialize_low_tracepoint): Call it.
11252         * server.h (set_trampoline_buffer_space): Declare.
11253         (claim_trampoline_space): Ditto.
11254         (have_fast_tracepoint_trampoline_buffer): Ditto.
11256 2011-11-14  Yao Qi  <yao@codesourcery.com>
11258         * server.c (handle_query): Handle InstallInTrace for qSupported.
11259         * tracepoint.c (add_tracepoint): Sort list.
11260         (install_tracepoint, download_tracepoint): New.
11261         (cmd_qtdp): Call them to install and download tracepoints.
11262         (sort_tracepoints): Removed.
11263         (cmd_qtstart): Update.
11265 2011-11-14  Yao Qi  <yao@codesourcery.com>
11267         * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11268         * mem-break.h: Declare.
11269         * tracepoint.c (cmd_qtstart): Move some code to ...
11270         (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11271         New.
11272         (download_tracepoints): Move some code to ...
11273         (download_tracepoint_1): ... here.  New.
11275 2011-11-08  Yao Qi  <yao@codesourcery.com>
11277         * remote-utils.c (relocate_instruction): A comment fix.
11279 2011-11-07  Joel Brobecker  <brobecker@adacore.com>
11281         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11282         (i386_dr_low_get_control, i386_dr_low_get_status): Use
11283         dr_status_mirror and dr_control_mirror from debug_reg_state.
11284         (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11285         (i386_initial_stuff): Remove use of deleted globals.
11286         (i386_get_thread_context, i386_set_thread_context,
11287         i386_thread_added): Use dr_status_mirror and dr_control_mirror
11288         from debug_reg_state.
11290 2011-11-05  Yao Qi  <yao@codesourcery.com>
11292         * tracepoint.c (gdb_collect): Loop over tracepoints of same
11293         address as TPOINT's.
11295 2011-11-02  Stan Shebs  <stan@codesourcery.com>
11297         * tracepoint.c (agent_mem_read_string): New function.
11298         (eval_agent_expr): Call it for tracenz.
11299         * server.c (handle_query): Report support for tracenz.
11301 2011-11-02  Yao Qi  <yao@codesourcery.com>
11303         * tracepoint.c (cmd_qtstart): Remove unused local variables.
11305 2011-11-02  Yao Qi  <yao@codesourcery.com>
11307         * target.h: Fix a typo in comment.
11309 2011-10-31  Pedro Alves  <pedro@codesourcery.com>
11311         * mem-break.c (check_mem_write): Add `myaddr' parameter.  Don't
11312         clobber the breakpoints' shadows with fast tracepoint jumps.
11313         * mem-break.h (check_mem_write): Add `myaddr' parameter.
11314         * target.c (write_inferior_memory): Also pass MYADDR down to
11315         check_mem_write.
11317 2011-10-07  Ulrich Weigand  <ulrich.weigand@linaro.org>
11319         * configure.ac: Check support for personality routine.
11320         * configure: Regenerate.
11321         * config.in: Likewise.
11322         * linux-low.c: Include <sys/personality.h>.
11323         Define ADDR_NO_RANDOMIZE if necessary.
11324         (linux_create_inferior): Disable address space randomization when
11325         forking inferior, if requested.
11326         (linux_supports_disable_randomization): New function.
11327         (linux_target_ops): Install it.
11328         * server.h (disable_randomization): Declare.
11329         * server.c (disable_randomization): New global variable.
11330         (handle_general_set): Handle QDisableRandomization.
11331         (handle_query): Likewise for qSupported.
11332         (main): Support --disable-randomization and --no-disable-randomization
11333         command line arguments.
11334         * target.h (struct target_ops): Add supports_disable_randomization.
11335         (target_supports_disable_randomization): New macro.
11337 2011-09-29  Mike Frysinger  <vapier@gentoo.org>
11339         * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11340         ifdef check.
11341         [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11342         [!PT_GETDSBT] (target_loadmap): New definition.
11343         (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11344         (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11345         LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11346         and PT_GETDSBT to LINUX_LOADMAP.
11347         [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11348         (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11350 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
11352         * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11353         (arm_linux_hwbp_cap): New static variable.
11354         (arm_linux_get_hwbp_cap): Replace by ...
11355         (arm_linux_init_hwbp_cap): ... this new function.
11356         (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11357         (arm_linux_get_hw_watchpoint_count): Likewise.
11358         (arm_linux_get_hw_watchpoint_max_length): Likewise.
11359         (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11360         (arm_prepare_to_resume): Use perror_with_name instead of error.
11362 2011-09-21  Ulrich Weigand  <ulrich.weigand@linaro.org>
11364         * linux-arm-low.c: Include <signal.h>.
11365         (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11366         (struct arm_linux_hwbp_cap): New data type.
11367         (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11368         (struct arm_linux_hw_breakpoint): New data type.
11369         (MAX_BPTS, MAX_WPTS): Define.
11370         (struct arch_process_info, struct arch_lwp_info): New data types.
11371         (arm_linux_get_hwbp_cap): New function.
11372         (arm_linux_get_hw_breakpoint_count): Likewise.
11373         (arm_linux_get_hw_watchpoint_count): Likewise.
11374         (arm_linux_get_hw_watchpoint_max_length): Likewise.
11375         (arm_hwbp_control_initialize): Likewise.
11376         (arm_hwbp_control_is_enabled): Likewise.
11377         (arm_hwbp_control_is_initialized): Likewise.
11378         (arm_hwbp_control_disable): Likewise.
11379         (arm_linux_hw_breakpoint_equal): Likewise.
11380         (arm_linux_hw_point_initialize): Likewise.
11381         (struct update_registers_data): New data structure.
11382         (update_registers_callback: New function.
11383         (arm_insert_point): Likewise.
11384         (arm_remove_point): Likewise.
11385         (arm_stopped_by_watchpoint): Likewise.
11386         (arm_stopped_data_address): Likewise.
11387         (arm_new_process): Likewise.
11388         (arm_new_thread): Likewise.
11389         (arm_prepare_to_resume): Likewise.
11390         (the_low_target): Register arm_insert_point, arm_remove_point,
11391         arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11392         arm_new_thread, and arm_prepare_to_resume.
11394 2011-09-15  Stan Shebs  <stan@codesourcery.com>
11396         * server.h (struct emit_ops): Add compare-goto fields.
11397         * tracepoint.c (gdb_agent_op_sizes): New table.
11398         (emit_eq_goto): New function.
11399         (emit_ne_goto): New function.
11400         (emit_lt_goto): New function.
11401         (emit_le_goto): New function.
11402         (emit_gt_goto): New function.
11403         (emit_ge_goto): New function.
11404         (is_goto_target): New function.
11405         (compile_bytecodes): Recognize special cases of compare-goto
11406         combinations and call specialized emitters for them.
11407         * linux-x86-low.c (amd64_emit_eq_goto): New function.
11408         (amd64_emit_ne_goto): New function.
11409         (amd64_emit_lt_goto): New function.
11410         (amd64_emit_le_goto): New function.
11411         (amd64_emit_gt_goto): New function.
11412         (amd64_emit_ge_goto): New function.
11413         (amd64_emit_ops): Add the new functions.
11414         (i386_emit_eq_goto): New function.
11415         (i386_emit_ne_goto): New function.
11416         (i386_emit_lt_goto): New function.
11417         (i386_emit_le_goto): New function.
11418         (i386_emit_gt_goto): New function.
11419         (i386_emit_ge_goto): New function.
11420         (i386_emit_ops): Add the new functions.
11422 2011-09-08  Stan Shebs  <stan@codesourcery.com>
11424         * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11425         (i386_emit_epilogue): Restore %ebx.
11427 2011-08-31  Jie Zhang  <jzhang918@gmail.com>
11429         * server.c (step_thread): Remove definition.
11430         (process_serial_event): Don't handle Hs.
11431         * server.h (step_thread): Remove declaration.
11432         * target.c (set_desired_inferior): Remove use of step_thread.
11434 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
11436         * linux-low.c: Include linux-procfs.h.
11437         (linux_attach_lwp_1): Update comments.
11438         (linux_attach): Scan for existing threads when attaching to a
11439         process that is the tgid.
11440         * Makefile.in: Update dependencies.
11442 2011-08-24  Luis Machado  <lgustavo@codesourcery.com>
11444         * configure.srv: Add linux-procfs.o dependencies.
11446 2011-08-14  Yao Qi  <yao@codesourcery.com>
11448         * target.h (struct target_ops): Fix indent.
11449         * win32-low.c (win32_target_ops): Fix comment.
11451 2011-08-14  Andrew Jenner  <andrew@codesourcery.com>
11452             Yao Qi  <yao@codesourcery.com>
11454         * Makefile.in (clean): Remove tic6x-*.c files.
11455         (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11456         (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11457         (tic6x-c64xp-linux.c): Likewise.
11458         * configure.srv: Add support for tic6x-*-uclinux.
11459         * linux-tic6x-low.c: New.
11460         * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11462 2011-08-14  Andrew Stubbs <ams@codesourcery.com>
11463             Yao Qi  <yao@codesourcery.com>
11465         * target.h (struct target_ops): Add read_loadmap.
11466         * linux-low.c (struct target_loadseg): New type.
11467         (struct target_loadmap): New type.
11468         (linux_read_loadmap): New function.
11469         (linux_target_ops): Add linux_read_loadmap.
11470         * server.c (handle_query): Support qXfer:fdpic:read packet.
11471         * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11472         to NULL.
11474 2011-08-05  Eli Zaretskii  <eliz@gnu.org>
11476         * win32-low.c: Include <stdint.h>.
11478 2011-07-22  Pedro Alves  <pedro@codesourcery.com>
11480         * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11481         to the inferior here.
11482         (i386_remove_aligned_watchpoint): Ditto.
11483         (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11484         fit part of the watchpoint in the debug registers.
11485         (i386_update_inferior_debug_regs): New.
11486         (i386_low_insert_watchpoint): Work on a local mirror of the debug
11487         registers, and only update the inferior on success.
11488         (i386_low_remove_watchpoint): Ditto.
11490 2011-07-22  Kwok Cheung Yeung  <kcy@codesourcery.com>
11492         * linux-low.c (compare_ints, unique, list_threads, show_process,
11493         linux_core_of_thread): Delete.
11494         (linux_target_ops): Change linux_core_of_thread to
11495         linux_common_core_of_thread.
11496         (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11497         * utils.c (malloc_failure): Change type of argument.
11498         (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11499         * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11500         common/linux-osdata.c, common/ptid.c and common/buffer.c.
11501         (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11502         (IPA_OBJS): Add common-utils-ipa.o.
11503         (ptid_h, linux_osdata_h): New macros.
11504         (server_h): Add common/common-utils.h, common/xml-utils.h,
11505         common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11506         common/ptid.h.
11507         (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11508         ptid.o, buffer.o): New rules.
11509         (linux-low.o): Add common/linux-osdata.h as a dependency.
11510         * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11511         * configure.ac: Add AC_HEADER_DIRENT check.
11512         * config.in: Regenerate.
11513         * configure: Regenerate.
11514         * remote-utils.c (xml_escape_text): Delete.
11515         (buffer_grow, buffer_free, buffer_init, buffer_finish,
11516         buffer_xml_printf): Move to common/buffer.c.
11517         * server.c (main): Remove call to initialize_inferiors.
11518         * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11519         ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11520         ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11521         internal_error, gdb_assert, gdb_assert_fail): Delete.
11522         (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11523         buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11524         common/buffer.h.
11525         * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11526         ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11527         initialize_inferiors): Delete.
11529 2011-07-20  Pedro Alves  <pedro@codesourcery.com>
11531         * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11532         symbol error.
11534 2011-05-31  Pedro Alves  <pedro@codesourcery.com>
11536         * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11537         assertion.
11538         * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11540 2011-05-26  Yao Qi  <yao@codesourcery.com>
11542         * Makefile.in (thread-db.o): Track dependence to
11543         common/gdb_thread_db.h.
11544         * thread-db.c: include gdb_thread_db.h from right place.
11546 2011-05-16  Adrian Cornish  <gnu@bluedreamer.com>
11548         * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11549         __FILE__ and __LINE__ to internal_error.
11551 2011-05-13  Doug Evans  <dje@google.com>
11553         * thread-db.c (try_thread_db_load_from_sdir): New function.
11554         (try_thread_db_load_from_dir): New function.
11555         (thread_db_load_search): Handle $sdir, ignore $pdir.
11556         Remove trying of system directories if search of
11557         libthread-db-search-path fails, that is now done via $sdir.
11559 2011-05-12  Kwok Cheung Yeung  <kcy@codesourcery.com>
11561         * server.c (handle_query): Add EnableDisableTracepoints to the list
11562         of supported features.
11563         * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11564         tracepoints.
11565         (cmd_qtenable_disable): New.
11566         (cmd_qtstart): Install tracepoints even if disabled.
11567         (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11568         receiving a QTEnable or QTDisable packet.
11569         (gdb_collect): Skip data collection if fast tracepoint is disabled.
11570         (ust_marker_to_static_tracepoint): Do not ignore disabled static
11571         tracepoints.
11572         (gdb_probe): Skip data collection if static tracepoint is disabled.
11574 2011-05-10  Doug Evans  <dje@google.com>
11576         * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11578 2011-05-04  Doug Evans  <dje@google.com>
11580         * linux-low.c (linux_join): Skip process lookup.
11581         * spu-low.c (spu_join): Ditto.
11582         * server.c (join_inferiors_callback): Delete.
11583         (process_serial_event): For 'D' packet (detach) call join_inferior
11584         directly.
11586 2011-05-04  Joseph Myers  <joseph@codesourcery.com>
11588         * README: Don't mention xscale*-*-linux*.
11589         * configure.srv (xscale*-*-linux*): Don't handle target.
11591 2011-04-27  Nathan Froyd  <froydnj@codesourcery.com>
11593         * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11594         casting pointers.
11595         (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11596         (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11597         (i386_emit_void_call_2): Likewise.
11599 2011-04-26  Yao Qi  <yao@codesourcery.com>
11601         * linux-low.c: Move common macros to linux-ptrace.h.
11602         Include linux-ptrace.h.
11603         * Makefile.in (linux_ptrace_h): New.
11604         (linux-low.o): Depends on linux-ptrace.h.
11606 2011-04-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
11608         * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11609         RUN_ONCE.  Comment for the LISTEN_DESC delete_file_handler call.
11610         (remote_prepare): New function with most of the TCP code from ...
11611         (remote_open): ... here.  Detect PORT here unconditionally.  Move also
11612         setting transport_is_reliable.
11613         * server.c (run_once): New variable.
11614         (gdbserver_usage): Document it.
11615         (main): Set run_once for `--once'.  Call remote_prepare.  Exit after
11616         the first run if RUN_ONCE.
11617         * server.h (run_once, remote_prepare): New declarations.
11619 2011-04-19  Tom Tromey  <tromey@redhat.com>
11621         * win32-low.c (handle_load_dll): Remove duplicate "the".
11623 2011-04-07  Pierre Muller  <muller@ics.u-strasbg.fr>
11625         Remove support for old Cygwin 1.5 versions.
11626         * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11627         function to avoid warning.
11628         (win32_add_one_solib): Use cygwin_conv_path function to avoid
11629         warning.
11631 2011-03-18  Pierre Muller  <muller@ics.u-strasbg.fr>
11633         * gdbserver/server.h (Macro _): Define it if not available.
11635 2011-03-14  Michael Snyder  <msnyder@vmware.com>
11637         * hostio.c (handle_close): Remove unnecessary null test.
11639 2011-03-10  Joel Brobecker  <brobecker@adacore.com>
11641         * Makefile.in (maintainer-clean realclean distclean): Remove
11642         "make ...  subdir_do" command.
11644 2011-03-10  Michael Snyder  <msnyder@vmware.com>
11646         * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11648         * server.c (handle_v_run): Free alloced buffer on early return.
11650 2011-03-09  Yao Qi  <yao@codesourcery.com>
11652         Revert:
11653         2011-03-04  Yao Qi  <yao@codesourcery.com>
11655         * Makefile.in: Remove GNU make feature --directory.
11657         2011-03-05  Yao Qi  <yao@codesourcery.com>
11659         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11660         (subdir_do): New make target.  Copied from gdb/Makefile.
11661         (maintainer-clean, realclean, distclean, clean): Call corresponding
11662         make targets in common/Makefile.
11664         2011-02-11  Yao Qi  <yao@codesourcery.com>
11666         * configure.ac: Call AC_PROG_RANLIB.
11667         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
11668         * configure: Regenerate.
11670 2011-03-07  Jan Kratochvil  <jan.kratochvil@redhat.com>
11672         * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11674 2011-03-06  Yao Qi  <yao@codesourcery.com>
11676         * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11678 2011-03-05  Yao Qi  <yao@codesourcery.com>
11680         * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11681         (subdir_do): New make target.  Copied from gdb/Makefile.
11682         (maintainer-clean, realclean, distclean, clean): Call corresponding
11683         make targets in common/Makefile.
11685 2011-03-04  Yao Qi  <yao@codesourcery.com>
11687         * Makefile.in: Remove GNU make feature --directory.
11689 2011-03-04  Michael Snyder  <msnyder@vmware.com>
11691         * server.c (queue_stop_reply): Call xmalloc not malloc.
11693 2011-03-02  Michael Snyder  <msnyder@vmware.com>
11695         * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11697 2011-02-28  Michael Snyder  <msnyder@vmware.com>
11699         * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11700         (cmd_qtframe): Ditto.
11701         (cmd_qtbuffer): Ditto.
11702         (cmd_bigqtbuffer): Ditto.
11704         * utils.c (decimal2str): Initialize 'width' to nine, then
11705         don't mess with it.
11707 2011-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
11709         * hostio.c (require_data): Free *data, not data.
11711 2011-02-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
11713         * hostio.c (require_data): Use free, not xfree.
11715 2011-02-27  Michael Snyder  <msnyder@vmware.com>
11717         * server.c (handle_query): Discard unused value.
11719         * hostio.c (require_data): Free malloc memory before returning
11720         error.
11722 2011-02-26  Michael Snyder  <msnyder@vmware.com>
11724         * linux-low.c (list_threads): Call closedir for dirent.
11726 2011-02-27  Michael Snyder  <msnyder@vmware.com>
11728         * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11729         a case statement falls through.
11731         * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11733         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11734         in comparison.
11736 2011-02-26  Michael Snyder  <msnyder@vmware.com>
11738         * utils.c (decimal2str): Eliminate dead code and dead param.
11739         (pulongest): Drop dead param from call to decimal2str.
11740         (plongest): Ditto.
11742 2011-02-24  Joel Brobecker  <brobecker@adacore.com>
11744         Revert the following patch (not approved yet):
11745         2011-02-21  Hui Zhu  <teawater@gmail.com>
11746         * tracepoint.c (tp_printf): New function.
11747         (eval_agent_expr): Handle gdb_agent_op_printf.
11749 2011-02-21  Hui Zhu  <teawater@gmail.com>
11751         * tracepoint.c (tp_printf): New function.
11752         (eval_agent_expr): Handle gdb_agent_op_printf.
11754 2011-02-18  Tom Tromey  <tromey@redhat.com>
11756         * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11757         (tracepoint.o): Likewise.
11758         * tracepoint.c (enum gdb_agent_op): Use ax.def.
11759         (gdb_agent_op_names): Likewise.
11761 2011-02-18  Tom Tromey  <tromey@redhat.com>
11763         * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11764         gdb_agent_op_rot>: New constants.
11765         (gdb_agent_op_names): Add pick and roll.
11766         (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11767         cases.
11769 2011-02-15  Jan Kratochvil  <jan.kratochvil@redhat.com>
11771         * aclocal.m4: Regenerated with aclocal-1.11.1.
11773 2011-02-14  Pedro Alves  <pedro@codesourcery.com>
11775         * server.c (handle_qxfer_traceframe_info): New.
11776         (qxfer_packets): Register "traceframe-info".
11777         (handle_query): Report support for qXfer:traceframe-info:read+.
11778         * tracepoint.c (match_blocktype): New.
11779         (traceframe_find_block_type): Rename to ...
11780         (traceframe_walk_blocks): ... this.  Add callback filter argument,
11781         and use it.
11782         (traceframe_find_block_type): New, reimplemented on top of
11783         traceframe_walk_blocks.
11784         (build_traceframe_info_xml): New.
11785         (traceframe_read_info): New.
11786         * server.h (traceframe_read_info): Declare.
11788 2011-02-11  Yao Qi  <yao@codesourcery.com>
11790         * configure.ac: Call AC_PROG_RANLIB.
11791         * Makefile.in: Remove signals.o from OBS.  Link libcommon.a.
11792         * configure: Regenerate.
11794 2011-02-07  Pedro Alves  <pedro@codesourcery.com>
11796         * server.c (gdb_read_memory): Change return semantics to allow
11797         partial transfers.
11798         (handle_search_memory_1): Adjust.
11799         (process_serial_event) <'m' packet>: Handle partial transfers.
11800         * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11802 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
11804         * regcache.c (init_register_cache): Initialize
11805         regcache->register_status.
11806         (free_register_cache): Release regcache->register_status.
11807         (regcache_cpy): Copy register_status.
11808         (registers_to_string): Print 'x's for unavailable registers.
11809         (supply_register): Mark the register's status valid or
11810         unavailable, depending on whether a buffer was passed in or not.
11811         (supply_register_zeroed): New.
11812         (supply_regblock): Mark the registers' status valid or
11813         unavailable, depending on whether a buffer was passed in or not.
11814         * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11815         (struct regcache): New `register_status' field.
11816         (supply_register_zeroed): Declare.
11817         * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11818         supply_register_zeroed, rather than passing a NULL buffer to
11819         supply_register.
11820         * tracepoint.c (fetch_traceframe_registers): Update comment.
11822 2011-01-28  Pedro Alves  <pedro@codesourcery.com>
11824         * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11825         buffer explicit.
11827 2011-01-25  Pedro Alves  <pedro@codesourcery.com>
11829         * server.h (decode_xfer_write): Change prototype.
11830         * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11831         and don't extract the annex here.
11832         * server.c (decode_xfer_read): Remove `annex' parameter,
11833         and don't extract the annex here.
11834         (decode_xfer): New.
11835         (struct qxfer): New.
11836         (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11837         (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11838         (handle_qxfer_statictrace): New functions, abstracted out from
11839         handle_query, and made to use the struct qxfer interface.
11840         (handle_threads_qxfer_proper): Rename to ...
11841         (handle_qxfer_threads_proper): ... this.
11842         (handle_threads_qxfer): Rename to ...
11843         (handle_qxfer_threads): ... this.  Adjust.
11844         (qxfer_packets): New array.
11845         (handle_qxfer): New function.
11846         (handle_query): Use handle_qxfer.
11848 2011-01-05  Michael Snyder  <msnyder@msnyder-server.eng.vmware.com>
11850         * gdbreplay.c: Shorten lines of >= 80 columns.
11851         * linux-low.c: Ditto.
11852         * linux-ppc-low.c: Ditto.
11853         * linux-s390-low.c: Ditto.
11854         * linux-sparc-low.c: Ditto.
11855         * linux-x86-low.c: Ditto.
11856         * linux-xtensa-low.c: Ditto.
11857         * mem-break.c: Ditto.
11858         * nto-low.c: Ditto.
11859         * regcache.h: Ditto.
11860         * remote-utils.c: Ditto.
11861         * server.c: Ditto.
11862         * server.h: Ditto.
11863         * thread-db.c: Ditto.
11864         * tracepoint.c: Ditto.
11865         * utils.c: Ditto.
11866         * win32-low.h: Ditto.
11868 2011-01-05  Joel Brobecker  <brobecker@adacore.com>
11870         * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11871         update.
11873 2011-01-01  Joel Brobecker  <brobecker@adacore.com>
11875         * server.c (gdbserver_version): Update copyright year in version
11876         output.
11877         * gdbreplay.c (gdbreplay_version): Ditto.
11879 2010-12-29  Jie Zhang  <jie.zhang@analog.com>
11881         * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11882         * linux-bfin-low.c: New file.
11883         * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11884         PT_DATA_ADDR for BFIN targets.
11885         * Makefile.in (SFILES): Add linux-bfin-low.c.
11886         (clean): Remove reg-bfin.c.
11887         (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11888         * README: Mention supported Blackfin targets.
11890 2010-12-23  Mike Frysinger  <vapier@gentoo.org>
11892         * .gitignore: New file.
11894 2010-11-16  Mike Frysinger  <vapier@gentoo.org>
11896         * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11898 2010-10-22  Jie Zhang  <jie@codesourcery.com>
11900         * Makefile.in: Add FLAGS_TO_PASS variable.
11901         (install): Remove dependency of install-only and recursively
11902         invoke make for install-only.
11904 2010-10-04  Doug Evans  <dje@google.com>
11906         * Makefile.in (uninstall): Use $(DESTDIR).
11908 2010-09-24  Pedro Alves  <pedro@codesourcery.com>
11910         PR gdb/11842
11912         * linux-x86-low.c (compat_siginfo_from_siginfo)
11913         (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11914         si_code is < 0.  Check for si_code == SI_TIMER before checking for
11915         si_code < 0.
11917 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
11919         * lynx-i386-low.c: New file.
11920         * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11922 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
11924         * lynx-low.c (ptrace_request_to_str): Remove handling for
11925         request values that have been removed in LynxOS 5.x.
11927 2010-09-13  Joel Brobecker  <brobecker@adacore.com>
11929         * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11930         <ptrace.h>
11932 2010-09-09  Nathan Sidwell  <nathan@codesourcery.com>
11934         * configure.ac: Add --enable-inprocess-agent option.
11935         * configure: Rebuilt.
11937 2010-09-06  Yao Qi  <yao@codesourcery.com>
11939         * linux-low.c (linux_kill): Remove unused variable.
11940         (linux_stabilize_threads): Likewise.
11941         * server.c (start_inferior): Likewise.
11942         (queue_stop_reply_callback): Likewise.
11943         * tracepoint.c (do_action_at_tracepoint): Likewise.
11945 2010-09-06  Yao Qi  <yao@codesourcery.com>
11947         * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11948         on return.
11950 2010-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
11952         * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11954 2010-09-06  Pedro Alves  <pedro@codesourcery.com>
11956         * Makefile.in (install-only): Replace $IPA_DEPFILES with
11957         "$(IPA_DEPFILES)".
11959 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
11961         * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11962         gdbserver/lynx-ppc-low.c: New files.
11963         * Makefile.in (lynx_low_h): New variable.
11964         (lynx-low.o, lynx-ppc-low.o): New rules.
11965         * configure.ac: On LynxOS, link with -lnetinet.
11966         * configure.srv: Add handling of powerpc-*-lynxos* targets.
11967         * configure: regenerate.
11969 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
11971         * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11972         * configure.ac: Add check for vasprintf and vsnprintf.
11973         * configure, config.in: Regenerate.
11974         * server.h (vasprintf, vsnprintf): Add conditional declarations.
11976 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
11978         * gdbreplay.c: Move include of alloca.h up, next to include of
11979         malloc.h.
11980         * server.h: Add include of malloc.h.
11981         * mem-break.c: Remove include of malloc.h.
11982         * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11984 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
11986         * Makefile.in (memmem.o): Build with -Wno-error.
11988 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
11990         * utils.c (xsnprintf): Make non-static.
11991         * server.h: Add xsnprintf declaration.
11992         * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11993         replace calls to snprintf by calls to xsnprintf throughout.
11995 2010-09-01  Joel Brobecker  <brobecker@adacore.com>
11997         * configure.ac: Add configure check for alloca.
11998         * configure, config.in: Regenerate.
11999         * server.h: Include alloca.h if it exists.
12000         * gdbreplay.c: Include alloca.h if it exists.
12002 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
12004         * linux-low.c (__SIGRTMIN): Define if not already defined.
12005         (linux_create_inferior): Check for __ANDROID__ rather than
12006         __SIGRTMIN.
12007         (enqueue_one_deferred_signal): Don't requeue non-RT signals that
12008         are already deferred.
12009         (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
12010         (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
12011         stopped and already has a pending signal to report.
12012         (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
12013         a pending signal to report or is moving out of a jump pad.
12014         (linux_init_signals): Check for __ANDROID__ rather than
12015         __SIGRTMIN.
12017 2010-08-28  Pedro Alves  <pedro@codesourcery.com>
12019         * linux-low.c (linux_stabilize_threads): Wrap debug output in a
12020         debug_threads check.  Avoid a linear search when not doing debug
12021         output.
12023 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
12025         * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
12026         (struct gdb_event) <fd>: Change type to gdb_fildes_t.
12027         (struct file_handler) <fd>: Change type to gdb_fildes_t.
12028         (process_event): Change local fd's type to gdb_fildes_t.
12029         (create_file_handler): Adjust prototype.
12030         (delete_file_handler): Adjust prototype.
12031         (handle_file_event): Adjust prototype.  Use pfildes.
12032         (create_file_event): Adjsut prototype.
12033         * remote-utils.c (remote_desc, listen_desc): Change type to
12034         gdb_fildes_t.
12035         * server.h: New gdb_fildes_t typedef.
12036         [USE_WIN32API]: Include winsock2.h.
12037         (delete_file_handler, add_file_handler): Adjust prototypes.
12038         (pfildes): Declare.
12039         * utils.c (pfildes): New.
12041 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
12043         * configure.ac (build_warnings): Add -Wno-char-subscripts.
12044         * configure: Regenerate.
12046 2010-08-27  Pedro Alves  <pedro@codesourcery.com>
12048         * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
12049         (linux_done_accessing_memory): ... this.
12050         (linux_target_ops): Adjust.
12051         * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
12052         * nto-low.c (nto_target_ops): Adjust comment.
12053         * server.c (gdb_read_memory, gdb_write_memory): Adjust.
12054         * spu-low.c (spu_target_ops): Adjust comment.
12055         * target.h (target_ops): Rename unprepare_to_access_memory field
12056         to done_accessing_memory.
12057         (unprepare_to_access_memory): Rename to ...
12058         (done_accessing_memory): ... this.
12060 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
12062         * linux-low.c (linux_prepare_to_access_memory): New.
12063         (linux_unprepare_to_access_memory): New.
12064         (linux_target_ops): Install them.
12065         * server.c (read_memory): Rename to ...
12066         (gdb_read_memory): ... this.  Use
12067         prepare_to_access_memory/prepare_to_access_memory.
12068         (write_memory): Rename to ...
12069         (gdb_write_memory): ... this.  Use
12070         prepare_to_access_memory/prepare_to_access_memory.
12071         (handle_search_memory_1): Adjust.
12072         (process_serial_event): Adjust.
12073         * target.h (struct target_ops): New fields
12074         prepare_to_access_memory and unprepare_to_access_memory.
12075         (prepare_to_access_memory, unprepare_to_access_memory): New.
12076         * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12077         prepare_to_access_memory/prepare_to_access_memory.
12078         * nto-low.c (nto_target_ops): Adjust.
12079         * spu-low.c (spu_target_ops): Adjust.
12080         * win32-low.c (win32_target_ops): Adjust.
12082 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
12084         * Makefile.in (WARN_CFLAGS): Get it from configure.
12085         (WERROR_CFLAGS): New.
12086         (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12087         * configure.ac: Introduce --enable-werror, which adds -Werror to
12088         the compiler command line.  Enabled by default.  Disable with
12089         --disable-werror.  Add -Wdeclaration-after-statement
12090         Wpointer-arith and -Wformat-nonliteral to warning flags.
12091         * configure: Regenerate.
12093 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
12095         * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12097 2010-08-26  Pedro Alves  <pedro@codesourcery.com>
12099         * gdbreplay.c (remote_error): New.
12100         (gdbchar): New.
12101         (expect): Use gdbchar.  Check for error reading from GDB.
12102         Clarify sync error output.
12103         (play): Check for errors writing to GDB.
12104         * linux-low.c (sigchld_handler): Really ignore `write' errors.
12105         * remote-utils.c (getpkt): Check for errors writing to the remote
12106         descriptor.
12108 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
12110         * linux-low.c (linux_wait_1): Move non-debugging code out of
12111         `debug_threads' control.
12113 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
12115         * linux-low.c (linux_wait_1): Don't set last_status here.
12116         * server.c (push_event, queue_stop_reply_callback): Assert we're
12117         not pushing a TARGET_WAITKIND_IGNORE event.
12118         (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12119         (myresume, handle_target_event): Set the thread's last_resume_kind
12120         and last_status from the target returned status.
12122 2010-08-25  Pedro Alves  <pedro@codesourcery.com>
12124         PR threads/10729
12126         * linux-x86-low.c (update_debug_registers_callback): New.
12127         (i386_dr_low_set_addr): Use it.
12128         (i386_dr_low_get_addr): New.
12129         (i386_dr_low_set_control): Use update_debug_registers_callback.
12130         (i386_dr_low_get_control): New.
12131         (i386_dr_low_get_status): Adjust.
12132         * linux-low.c (linux_stop_lwp): New.
12133         * linux-low.h (linux_stop_lwp): Declare.
12135         * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12136         argument instead of a i386_debug_reg_state.
12137         (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12138         a i386_debug_reg_state.
12139         (i386_insert_aligned_watchpoint): Adjust.
12140         (i386_remove_aligned_watchpoint): Adjust.
12141         (i386_low_stopped_data_address): Read the debug registers from the
12142         inferior instead of from the mirrors.
12143         * i386-low.h (struct i386_debug_reg_state): Extend comment.
12144         (i386_dr_low_get_addr): Declare.
12145         (i386_dr_low_get_control): Declare.
12146         (i386_dr_low_get_status): Change prototype.
12148         * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12149         (i386_dr_low_get_addr): New.
12150         (i386_dr_low_get_control): New.
12151         (i386_dr_low_get_status): Adjust prototype.  Return
12152         dr_status_mirror.
12153         (i386_initial_stuff): Clear dr_status_mirror and
12154         dr_control_mirror.
12155         (i386_get_thread_context): Adjust.
12156         (i386_set_thread_context): Adjust.
12157         (i386_thread_added): Adjust.
12159 2010-08-24  Pedro Alves  <pedro@codesourcery.com>
12161         * linux-low.h (linux_thread_area): Delete declaration.
12163 2010-08-11  Thomas Schwinge  <thomas@codesourcery.com>
12165         * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12166         after its termination.
12168 2010-08-09  Pedro Alves  <pedro@codesourcery.com>
12170         * linux-low.c (gdb_wants_lwp_stopped): Delete.
12171         (gdb_wants_all_stopped): Delete.
12172         (linux_wait_1): Don't call them.
12173         * server.c (handle_v_cont): Tag all threads as want-stopped.
12174         (gdb_wants_thread_stopped): Fix comments.  Tag the thread that
12175         stopped as "client-wants-stopped".
12177 2010-07-31  Pedro Alves  <pedro@codesourcery.com>
12179         * Makefile.in (signals_h): New.
12180         (server_h): Depend on it.
12181         (server.o): Don't depend on $(signals_def).
12182         (signals.o): Depend on $(signals_def).
12184 2010-07-31  Jan Kratochvil  <jan.kratochvil@redhat.com>
12186         * Makefile.in (signals_def): New.
12187         (server_h): Append include/gdb/signals.h and signals_def.
12188         (server.o): Append signals_def.
12190 2010-07-25  Jan Kratochvil  <jan.kratochvil@redhat.com>
12192         * server.c (handle_target_event): Use target_signal_to_host for
12193         resume_info.sig initialization.
12194         * target.h (struct thread_resume) <sig>: New comment.
12196 2010-07-20  Ozkan Sezer  <sezeroz@gmail.com>
12198         * server.c (handle_query): strcpy() the returned string from paddress()
12199         instead of sprintf().
12200         * utils.c (paddress): Return phex_nz().
12202 2010-07-07  Joel Brobecker  <brobecker@adacore.com>
12204         * server.c (handle_v_cont): Call mourn_inferior if process
12205         just exited.
12206         (myresume): Likewise.
12208 2010-07-01  Pedro Alves  <pedro@codesourcery.com>
12210         Static tracepoints, and integration with UST.
12212         * configure.ac: Handle --with-ust.  substitute ustlibs and ustinc.
12213         * mem-break.c (uninsert_all_breakpoints)
12214         (reinsert_all_breakpoints): New.
12215         * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12216         * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12217         (gdb_agent_ust_loaded, helper_thread_id)
12218         (gdb_agent_helper_thread_id): New macros.
12219         (struct ipa_sym_addresses): Add addr_ust_loaded,
12220         addr_helper_thread_id, addr_cmd_buf.
12221         (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12222         (in_process_agent_loaded_ust): New.
12223         (write_e_ust_not_loaded): New.
12224         (maybe_write_ipa_ust_not_loaded): New.
12225         (struct collect_static_trace_data_action): New.
12226         (enum tracepoint_type) <static_tracepoint>: New.
12227         (struct tracepoint) <handle>: Mention static tracepoints.
12228         (struct static_tracepoint_ctx): New.
12229         (CMD_BUF_SIZE): New.
12230         (add_tracepoint_action): Handle static tracepoint actions.
12231         (unprobe_marker_at): New.
12232         (clear_installed_tracepoints): Handle static tracepoints.
12233         (cmd_qtdp): Handle static tracepoints.
12234         (probe_marker_at): New.
12235         (cmd_qtstart): Handle static tracepoints.
12236         (response_tracepoint): Handle static tracepoints.
12237         (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12238         (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12239         (get_context_regcache): Handle static tracepoints.
12240         (do_action_at_tracepoint): Handle static tracepoint actions.
12241         (traceframe_find_block_type): Handle static trace data blocks.
12242         (traceframe_read_sdata): New.
12243         (download_tracepoints): Download static tracepoint actions.
12244         [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12245         (GDB_PROBE_NAME): New.
12246         (ust_ops): New.
12247         (GET_UST_SYM): New.
12248         (USTF): New.
12249         (dlsym_ust): New.
12250         (ust_marker_to_static_tracepoint): New.
12251         (gdb_probe): New.
12252         (collect_ust_data_at_tracepoint): New.
12253         (gdb_ust_probe): New.
12254         (UNIX_PATH_MAX, SOCK_DIR): New.
12255         (gdb_ust_connect_sync_socket): New.
12256         (resume_thread, stop_thread): New.
12257         (run_inferior_command): New.
12258         (init_named_socket): New.
12259         (gdb_ust_socket_init): New.
12260         (cstr_to_hexstr): New.
12261         (next_st): New.
12262         (first_marker, next_marker): New.
12263         (response_ust_marker): New.
12264         (cmd_qtfstm, cmd_qtsstm): New.
12265         (unprobe_marker_at, probe_marker_at): New.
12266         (cmd_qtstmat, gdb_ust_thread): New.
12267         (gdb_ust_init): New.
12268         (initialize_tracepoint_ftlib): Call gdb_ust_init.
12269         * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12270         (ST_REGENTRY): New.
12271         (x86_64_st_collect_regmap): New.
12272         (X86_64_NUM_ST_COLLECT_GREGS): New.
12273         (AMD64_RIP_REGNUM): New.
12274         (supply_static_tracepoint_registers): New.
12275         * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12276         (ST_REGENTRY): New.
12277         (i386_st_collect_regmap): New.
12278         (i386_NUM_ST_COLLECT_GREGS): New.
12279         (supply_static_tracepoint_registers): New.
12280         * server.c (handle_query): Handle qXfer:statictrace:read.
12281         <qSupported>: Report support for StaticTracepoints, and
12282         qXfer:statictrace:read features.
12283         * server.h (traceframe_read_sdata)
12284         (supply_static_tracepoint_registers): Declare.
12285         * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12286         (unpack_varlen_hex): Include in IPA build.
12287         * Makefile.in (ustlibs, ustinc): New.
12288         (IPA_OBJS): Add remote-utils-ipa.o.
12289         ($(IPA_LIB)): Link -ldl and -lpthread.
12290         (UST_CFLAGS): New.
12291         (IPAGENT_CFLAGS): Add UST_CFLAGS.
12292         * config.in, configure: Regenerate.
12294 2010-06-20  Ian Lance Taylor  <iant@google.com>
12295             Pedro Alves  <pedro@codesourcery.com>
12297         * linux-x86-low.c (always_true): Delete.
12298         (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12299         trying to fool the compiler with always_true.
12301 2010-06-20  Pedro Alves  <pedro@codesourcery.com>
12303         * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12304         conditions in gdbserver.
12306 2010-06-19  Ulrich Weigand  <uweigand@de.ibm.com>
12308         * spu-low.c (spu_read_memory): Wrap around local store limit.
12309         (spu_write_memory): Likewise.
12311 2010-06-15  Pedro Alves  <pedro@codesourcery.com>
12313         * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12314         (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12315         LONGEST uses.
12316         * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12317         uses.
12318         * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12319         uses with LONGEST uses.
12321 2010-06-14  Stan Shebs  <stan@codesourcery.com>
12322             Pedro Alves  <pedro@codesourcery.com>
12324         Bytecode compiler.
12326         * linux-x86-low.c: Include limits.h.
12327         (add_insns): New.
12328         (always_true): New.
12329         (EMIT_ASM): New.
12330         (EMIT_ASM32): New.
12331         (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12332         (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12333         (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12334         (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12335         (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12336         (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12337         (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12338         (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12339         (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12340         (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12341         (amd64_emit_void_call_2): New.
12342         (amd64_emit_ops): New.
12343         (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12344         (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12345         (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12346         (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12347         (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12348         (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12349         (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12350         (i386_emit_call, i386_emit_reg, i386_emit_pop)
12351         (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12352         (i386_emit_stack_adjust, i386_emit_int_call_1)
12353         (i386_emit_void_call_2): New.
12354         (i386_emit_ops): New.
12355         (x86_emit_ops): New.
12356         (the_low_target): Install x86_emit_ops.
12357         * server.h (struct emit_ops): New.
12358         (get_raw_reg_func_addr): Declare.
12359         (current_insn_ptr, emit_error): Declare.
12360         * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12361         (set_trace_state_variable_value): New defines.
12362         (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12363         addr_get_trace_state_variable_value and
12364         addr_set_trace_state_variable_value.
12365         (symbol_list): New fields for get_raw_reg,
12366         get_trace_state_variable_value and set_trace_state_variable_value.
12367         (condfn): New typedef.
12368         (struct tracepoint): New field `compiled_cond'.
12369         (do_action_at_tracepoint): Clear compiled_cond.
12370         (get_trace_state_variable_value, set_trace_state_variable_value):
12371         Export in the IPA.
12372         (condition_true_at_tracepoint): If there's a compiled condition,
12373         run that.
12374         (current_insn_ptr, emit_error): New globals.
12375         (struct bytecode_address): New.
12376         (get_raw_reg_func_addr): New.
12377         (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12378         (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12379         (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12380         (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12381         (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12382         (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12383         (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12384         (compile_tracepoint_condition, compile_bytecodes): New.
12385         * target.h (emit_ops): Forward declare.
12386         (struct target_ops): New field emit_ops.
12387         (target_emit_ops): New.
12388         * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12389         * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12390         * linux-low.c (linux_emit_ops): New.
12391         (linux_target_ops): Install it.
12392         * linux-low.h (struct linux_target_ops): New field emit_ops.
12394 2010-06-14  Ulrich Weigand  <uweigand@de.ibm.com>
12396         * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12397         * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12399 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
12400             Stan Shebs  <stan@codesourcery.com>
12402         * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12403         (all): Depend on $(extra_libraries).
12404         (install-only): Install the IPA.
12405         (IPA_OBJS, IPA_LIB): New.
12406         (clean): Remove the IPA lib.
12407         (IPAGENT_CFLAGS): New.
12408         (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12409         (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12410         (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12411         * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12412         * configure.ac: Check for atomic builtins support in the compiler.
12413         (IPA_DEPFILES, extra_libraries): Define.
12414         * configure.srv (ipa_obj): Add description.
12415         (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12416         (i[34567]86-*-linux*): Set ipa_obj.
12417         (x86_64-*-linux*): Set ipa_obj.
12418         * linux-low.c (stabilizing_threads): New.
12419         (supports_fast_tracepoints): New.
12420         (linux_detach): Stabilize threads before detaching.
12421         (handle_tracepoints): Handle internal tracing breakpoints.  Assert
12422         the lwp is either not stabilizing, or is moving out of a jump pad.
12423         (linux_fast_tracepoint_collecting): New.
12424         (maybe_move_out_of_jump_pad): New.
12425         (enqueue_one_deferred_signal): New.
12426         (dequeue_one_deferred_signal): New.
12427         (linux_wait_for_event_1): If moving out of a jump pad, defer
12428         pending signals to later.
12429         (linux_stabilize_threads): New.
12430         (linux_wait_1): Check if threads need moving out of jump pads, and
12431         do it if so.
12432         (stuck_in_jump_pad_callback): New.
12433         (move_out_of_jump_pad_callback): New.
12434         (lwp_running): New.
12435         (linux_resume_one_lwp): Handle moving out of jump pads.
12436         (linux_set_resume_request): Dequeue deferred signals.
12437         (need_step_over_p): Also step over fast tracepoint jumps.
12438         (start_step_over): Also uninsert fast tracepoint jumps.
12439         (finish_step_over): Also reinsert fast tracepoint jumps.
12440         (linux_install_fast_tracepoint_jump): New.
12441         (linux_target_ops): Install linux_stabilize_threads and
12442         linux_install_fast_tracepoint_jump_pad.
12443         * linux-low.h (linux_target_ops) <get_thread_area,
12444         install_fast_tracepoint_jump_pad>: New fields.
12445         (struct lwp_info) <collecting_fast_tracepoint,
12446         pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12447         (linux_get_thread_area): Declare.
12448         * linux-x86-low.c (jump_insn): New.
12449         (x86_get_thread_area): New.
12450         (append_insns): New.
12451         (push_opcode): New.
12452         (amd64_install_fast_tracepoint_jump_pad): New.
12453         (i386_install_fast_tracepoint_jump_pad): New.
12454         (x86_install_fast_tracepoint_jump_pad): New.
12455         (the_low_target): Install x86_get_thread_area and
12456         x86_install_fast_tracepoint_jump_pad.
12457         * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12458         (struct fast_tracepoint_jump): New.
12459         (fast_tracepoint_jump_insn): New.
12460         (fast_tracepoint_jump_shadow): New.
12461         (find_fast_tracepoint_jump_at): New.
12462         (fast_tracepoint_jump_here): New.
12463         (delete_fast_tracepoint_jump): New.
12464         (set_fast_tracepoint_jump): New.
12465         (uninsert_fast_tracepoint_jumps_at): New.
12466         (reinsert_fast_tracepoint_jumps_at): New.
12467         (set_breakpoint_at): Use write_inferior_memory.
12468         (uninsert_raw_breakpoint): Use write_inferior_memory.
12469         (check_mem_read): Mask out fast tracepoint jumps.
12470         (check_mem_write): Mask out fast tracepoint jumps.
12471         * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12472         (set_fast_tracepoint_jump): Declare.
12473         (delete_fast_tracepoint_jump)
12474         (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12475         (reinsert_fast_tracepoint_jumps_at): Declare.
12476         * regcache.c: Don't compile many functions when building the
12477         in-process agent library.
12478         (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12479         the register buffer in the heap.
12480         (free_register_cache): If the register buffer isn't owned by the
12481         regcache, don't free it.
12482         (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12483         pre-existing register caches.
12484         * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12485         type.
12486         (convert_ascii_to_int): : Constify `from' parameter type.
12487         (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12488         a `to_p' pointer to pointer parameter.  If TO_P is NULL, malloc
12489         the needed buffer in-place.
12490         (relocate_instruction): New.
12491         * server.c (handle_query) <qSymbols>: If the target supports
12492         tracepoints, give it a chance of looking up symbols.  Report
12493         support for fast tracepoints.
12494         (handle_status): Stabilize threads.
12495         (process_serial_event): Adjust.
12496         * server.h (struct fast_tracepoint_jump): Forward declare.
12497         (struct process_info) <fast_tracepoint_jumps>: New field.
12498         (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12499         (decode_X_packet, decode_M_packet): Adjust.
12500         (relocate_instruction): Declare.
12501         (in_process_agent_loaded): Declare.
12502         (tracepoint_look_up_symbols): Declare.
12503         (struct fast_tpoint_collect_status): Declare.
12504         (fast_tracepoint_collecting): Declare.
12505         (force_unlock_trace_buffer): Declare.
12506         (handle_tracepoint_bkpts): Declare.
12507         (initialize_low_tracepoint)
12508         (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12509         * target.h (struct target_ops) <stabilize_threads,
12510         install_fast_tracepoint_jump_pad>: New fields.
12511         (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12512         * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12513         [HAVE_STDINT_H]: Include stdint.h.
12514         (trace_debug_1): Rename to ...
12515         (trace_vdebug): ... this.
12516         (trace_debug): Rename to ...
12517         (trace_debug_1): ... this.  Add `level' parameter.
12518         (trace_debug): New.
12519         (ATTR_USED, ATTR_NOINLINE): New.
12520         (IP_AGENT_EXPORT): New.
12521         (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12522         (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12523         (about_to_request_buffer_space, trace_buffer_is_full)
12524         (stopping_tracepoint, expr_eval_result, error_tracepoint)
12525         (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12526         (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12527         (traceframe_write_count, traceframes_created)
12528         (trace_state_variables)
12529         New renaming defines.
12530         (struct ipa_sym_addresses): New.
12531         (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12532         (symbol_list): New.
12533         (ipa_sym_addrs): New.
12534         (all_tracepoint_symbols_looked_up): New.
12535         (in_process_agent_loaded): New.
12536         (write_e_ipa_not_loaded): New.
12537         (maybe_write_ipa_not_loaded): New.
12538         (tracepoint_look_up_symbols): New.
12539         (debug_threads) [IN_PROCESS_AGENT]: New.
12540         (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12541         (UNKNOWN_SIDE_EFFECTS): New.
12542         (stop_tracing): New.
12543         (flush_trace_buffer): New.
12544         (stop_tracing_bkpt): New.
12545         (flush_trace_buffer_bkpt): New.
12546         (read_inferior_integer): New.
12547         (read_inferior_uinteger): New.
12548         (read_inferior_data_pointer): New.
12549         (write_inferior_data_pointer): New.
12550         (write_inferior_integer): New.
12551         (write_inferior_uinteger): New.
12552         (struct collect_static_trace_data_action): Delete.
12553         (enum tracepoint_type): New.
12554         (struct tracepoint) <type>: New field `type'.
12555         <actions_str, step_actions, step_actions_str>: Only include in
12556         GDBserver.
12557         <orig_size, obj_addr_on_target, adjusted_insn_addr>
12558         <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12559         (tracepoints): Use IP_AGENT_EXPORT.
12560         (last_tracepoint): Don't include in the IPA.
12561         (stopping_tracepoint): Use IP_AGENT_EXPORT.
12562         (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12563         (alloced_trace_state_variables): New.
12564         (trace_state_variables): Use IP_AGENT_EXPORT.
12565         (traceframe_t): Delete unused variable.
12566         (circular_trace_buffer): Don't include in the IPA.
12567         (trace_buffer_start): Delete.
12568         (struct trace_buffer_control): New.
12569         (trace_buffer_free): Delete.
12570         (struct ipa_trace_buffer_control): New.
12571         (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12572         (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12573         New.
12574         (trace_buffer_ctrl): New.
12575         (TRACE_BUFFER_CTRL_CURR): New.
12576         (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12577         Reimplement as macros.
12578         (trace_buffer_wrap): Delete.
12579         (traceframe_write_count, traceframe_read_count)
12580         (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12581         (struct tracepoint_hit_ctx) <type>: New field.
12582         (struct fast_tracepoint_ctx): New.
12583         (memory_barrier): New.
12584         (cmpxchg): New.
12585         (record_tracepoint_error): Update atomically in the IPA.
12586         (clear_inferior_trace_buffer): New.
12587         (about_to_request_buffer_space): New.
12588         (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12589         updating the same buffer.
12590         (add_tracepoint): Default the tracepoint's type to trap
12591         tracepoint, and orig_size to -1.
12592         (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12593         internal variables.
12594         (create_trace_state_variable): New parameter `gdb'.  Handle it.
12595         (clear_installed_tracepoints): Clear fast tracepoint jumps.
12596         (cmd_qtdp): Handle fast tracepoints.
12597         (cmd_qtdv): Adjust.
12598         (max_jump_pad_size): New.
12599         (gdb_jump_pad_head): New.
12600         (get_jump_space_head): New.
12601         (claim_jump_space): New.
12602         (sort_tracepoints): New.
12603         (MAX_JUMP_SIZE): New.
12604         (cmd_qtstart): Handle fast tracepoints.  Sync tracepoints with the
12605         IPA.
12606         (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12607         support.  Upload fast traceframes, and delete internal IPA
12608         breakpoints.
12609         (stop_tracing_handler): New.
12610         (flush_trace_buffer_handler): New.
12611         (cmd_qtstop): Upload fast tracepoints.
12612         (response_tracepoint): Handle fast tracepoints.
12613         (tracepoint_finished_step): Upload fast traceframes.  Set the
12614         tracepoint hit context's tracepoint type.
12615         (handle_tracepoint_bkpts): New.
12616         (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12617         type.  Add comment about fast tracepoints.
12618         (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12619         non-existing action_str field.
12620         (get_context_regcache): Handle fast tracepoints.
12621         (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12622         to the regcache.
12623         (fast_tracepoint_from_jump_pad_address): New.
12624         (fast_tracepoint_from_ipa_tpoint_address): New.
12625         (collecting_t): New.
12626         (force_unlock_trace_buffer): New.
12627         (fast_tracepoint_collecting): New.
12628         (collecting): New.
12629         (gdb_collect): New.
12630         (write_inferior_data_ptr): New.
12631         (target_tp_heap): New.
12632         (target_malloc): New.
12633         (download_agent_expr): New.
12634         (UALIGN): New.
12635         (download_tracepoints): New.
12636         (download_trace_state_variables): New.
12637         (upload_fast_traceframes): New.
12638         (IPA_FIRST_TRACEFRAME): New.
12639         (IPA_NEXT_TRACEFRAME_1): New.
12640         (IPA_NEXT_TRACEFRAME): New.
12641         [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12642         [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12643         (gdb_jump_pad_buffer_end): New.
12644         [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12645         (initialize_tracepoint): Adjust.
12646         [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12647         buffer.  Initialize the low module.
12648         * utils.c (PREFIX, TOOLNAME): New.
12649         (malloc_failure): Use PREFIX.
12650         (error): In the IPA, an error causes an exit.
12651         (fatal, warning): Use PREFIX.
12652         (internal_error): Use TOOLNAME.
12653         (NUMCELLS): Increase to 10.
12654         * configure, config.in: Regenerate.
12656 2010-06-01  Pedro Alves  <pedro@codesourcery.com>
12658         * server.c (handle_query) <qSupported>: Do two passes over the
12659         qSupported string to avoid nesting strtok.
12661 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
12663         * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12664         (CDEPS): New.
12665         * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping.  Test also
12666         -Wl,--dynamic-list.
12667         * configure: Regenerate.
12668         * proc-service.list: New.
12670 2010-05-28  Jan Kratochvil  <jan.kratochvil@redhat.com>
12672         * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12673         New comment.
12675 2010-05-26  Ozkan Sezer  <sezeroz@gmail.com>
12677         * gdbreplay.c (remote_open): Check error return from socket() call by
12678         its equality to -1 not by it being negative.
12679         * remote-utils.c (remote_open): Likewise.
12681 2010-05-23  Pedro Alves  <pedro@codesourcery.com>
12683         * config.h: Regenerate.
12685 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
12687         * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12688         doesn't provide PTRACE_GET_THREAD_AREA.
12690 2010-05-19  Maxim Kuvyrkov  <maxim@codesourcery.com>
12692         * linux-m68k-low.c: Include <asm/ptrace.h>
12693         (ps_get_thread_area): Implement.
12695 2010-05-03  Doug Evans  <dje@google.com>
12697         * event-loop.c (struct callback_event): New struct.
12698         (callback_list): New global.
12699         (append_callback_event, delete_callback_event): New functions.
12700         (process_callback): New function.
12701         (start_event_loop): Call it.
12702         * remote-utils.c (NOT_SCHEDULED): Define.
12703         (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12704         moved out of readchar.
12705         (readchar): Rewrite.  Call reschedule before returning.
12706         (reset_readchar): New function.
12707         (remote_close): Call it.
12708         (process_remaining, reschedule): New functions.
12709         * server.h (callback_handler_func): New typedef.
12710         (append_callback_event, delete_callback_event): Declare.
12712 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
12714         * proc-service.c (ps_pglobal_lookup): Use
12715         thread_db_look_up_one_symbol.
12716         * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12717         parameter.  Use it instead of all_symbols_looked_up.
12718         * server.h (struct process_info) <all_symbols_looked_up>: Delete
12719         field.
12720         (all_symbols_looked_up): Don't declare.
12721         (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12722         * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12723         field.
12724         (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12725         Set all_symbols_looked_up here.
12726         (thread_db_look_up_one_symbol): New.
12727         (thread_db_get_tls_address): Adjust.
12728         (thread_db_load_search, try_thread_db_load_1): Always allocate the
12729         thread_db object on the heap, and tentatively set it in the
12730         process structure.
12731         (thread_db_init): Don't set all_symbols_looked_up here.
12732         * linux-low.h (thread_db_look_up_one_symbol): Declare.
12734 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
12736         * linux-low.c (linux_kill, linux_detach): Adjust.
12737         (status_pending_p_callback): Remove redundant statement.  Check
12738         for !TARGET_WAITIKIND_IGNORE, instead of
12739         TARGET_WAITKIND_STOPPED.
12740         (handle_tracepoints): Make sure LWP is locked.  Adjust.
12741         (linux_wait_for_event_1): Adjust.
12742         (linux_cancel_breakpoints): New.
12743         (unsuspend_one_lwp): New.
12744         (unsuspend_all_lwps): New.
12745         (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12746         (send_sigstop_callback): Change return type to int, add new
12747         `except' parameter and handle it.
12748         (suspend_and_send_sigstop_callback): New.
12749         (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12750         pass them down.  If SUSPEND, also increment the lwp's suspend
12751         count.
12752         (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12753         (need_step_over_p): Don't consider suspended LWPs.
12754         (start_step_over): Adjust.
12755         (proceed_one_lwp): Change return type to int, add new `except'
12756         parameter and handle it.
12757         (unsuspend_and_proceed_one_lwp): New.
12758         (proceed_all_lwps): Use find_inferior instead of
12759         for_each_inferior.
12760         (unstop_all_lwps): Add `unsuspend' parameter.  If UNSUSPEND, them
12761         also decrement the suspend count of LWPs.  Pass `except' down,
12762         instead of hacking its suspend count.
12763         (linux_pause_all): Add `freeze' parameter.  Adjust.
12764         (linux_unpause_all): New.
12765         (linux_target_ops): Install linux_unpause_all.
12766         * server.c (handle_status): Adjust.
12767         * target.h (struct target_ops): New fields `unpause_all' and
12768         `cancel_breakpoints'.  Add new parameter to `pause_all'.
12769         (pause_all): Add new `freeze' parameter.
12770         (unpause_all): New.
12771         (cancel_breakpoints): New.
12772         * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12773         cancel breakpoints.
12774         (cmd_qtstart): Pause threads.
12775         (stop_tracing): Pause threads, and cancel breakpoints.
12776         * win32-low.c (win32_target_ops): Adjust.
12778 2010-05-03  Pedro Alves  <pedro@codesourcery.com>
12780         * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12781         the inferior right away from here...
12782         (linux_wait_1): ... to here, and adjust to check the thread's
12783         last_resume_kind instead of the lwp's step or stop_expected flags.
12785 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
12787         * README: Use consistent `GDB' and `GDBserver' spellings.
12789 2010-05-02  Pedro Alves  <pedro@codesourcery.com>
12791         * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12792         (linux_kill): Stop all lwps here.  Don't delete the main lwp here.
12793         (linux_detach_one_lwp): Assume the lwp is stopped.
12794         (any_thread_of): Delete.
12795         (linux_detach): Stop all lwps here.  Don't blindly delete all
12796         breakpoints.
12797         (delete_lwp_callback): New.
12798         (linux_mourn): Delete all lwps of the process that is gone.
12799         (linux_wait_1): Don't delete the last lwp of the process here.
12800         * mem-break.h (mark_breakpoints_out): Declare.
12801         * mem-break.c (mark_breakpoints_out): New.
12802         (free_all_breakpoints): Use it.
12803         * server.c (handle_target_event): If the process is gone, mark
12804         breakpoints out.
12805         * thread-db.c (struct thread_db) <create_bp>: New field.
12806         (thread_db_enable_reporting): Fix prototype.  Store a thread event
12807         breakpoint reference in the thread_db struct.
12808         (thread_db_load_search): Clear the thread_db object.
12809         (try_thread_db_load_1): Ditto.
12810         (switch_to_process): New.
12811         (disable_thread_event_reporting): Use it.
12812         (remove_thread_event_breakpoints): New.
12813         (thread_db_detach, thread_db_mourn): Use it.
12815 2010-05-01  Pedro Alves  <pedro@codesourcery.com>
12817         * linux-low.c (linux_enable_event_reporting): New.
12818         (linux_wait_for_event_1, handle_extended_wait): Use it.
12820 2010-04-30  Pedro Alves  <pedro@codesourcery.com>
12822         * linux-low.c (linux_kill_one_lwp, linux_kill)
12823         (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12824         (send_sigstop): Take an lwp_info as parameter instead.  Queue a
12825         SIGSTOP even if the LWP is stopped.
12826         (send_sigstop_callback): New.
12827         (stop_all_lwps): Use send_sigstop_callback instead.
12828         (linux_resume_one_thread): Adjust.
12829         (proceed_one_lwp): Still proceed an LWP that the client has
12830         requested to stop, if we haven't reported it as stopped yet.  Make
12831         sure that LWPs the client want stopped, have a pending SIGSTOP.
12833 2010-04-26  Doug Evans  <dje@google.com>
12835         * server.c (handle_general_set): Make static.
12837         * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12838         Print received char after testing for error/eof instead of before.
12839         (input_interrupt): Tweak comment.
12841 2010-04-23  Doug Evans  <dje@google.com>
12843         * server.c (start_inferior): Print inferior argv if --debug.
12845 2010-04-21  Aleksandar Ristovski  <aristovski@qnx.com>
12847         * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12848         * nto-x86-low.c: Include server.h
12850 2010-04-20  Pierre Muller  <muller@ics.u-strasbg.fr>
12852         * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12853         be consistent with other sources of this directory.
12854         (init_registers_amd64): Correct name of source file of this function
12855         in the comment.
12857 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
12859         * configure.srv (x86_64-*-mingw*): New configuration for Windows
12860         64-bit executables.
12862 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
12864         * win32-i386-low.c: Add 64-bit support.
12865         (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12866         (init_registers_amd64): Declare.
12867         (mappings): Add 64-bit version of array.
12868         (init_windows_x86): New function.
12869         (the_low_target): Change init_arch field to init_windows_x86.
12871 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
12873         * win32-low.c: Adapt to support also 64-bit architecture.
12874         (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12875         (get_image_name): Use SIZE_T type for local variable `done'.
12876         (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12877         (toolhelp_get_dll_name): Idem.
12878         (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12879         Use uintptr_t typecast to avoid warning.
12880         (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12881         (handle_exception): Use phex_nz to avoid warning.
12882         (win32_wait): Remove unused local variable `process'.
12884 2010-04-19  Pierre Muller  <muller@ics.u-strasbg.fr>
12886         * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12887         `amd64-avx.o'.
12889 2010-04-17  Pierre Muller  <muller@ics.u-strasbg.fr>
12891         * configure.ac: Use `ws2_32' library for srv_mingw.
12892         * configure: Regenerate.
12893         * gdbreplay.c: Include winsock2.h instead of winsock.h.
12894         * remote-utils.c: Likewise.
12896 2010-04-17  H.J. Lu  <hongjiu.lu@intel.com>
12898         * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12899         if __x86_64__ is defined.
12901 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
12903         * configure: Regenerate.
12905 2010-04-16  Pierre Muller  <muller@ics.u-strasbg.fr>
12907         * server.c (handle_query): Handle 'qGetTIBAddr' query.
12908         * target.h (target_ops): New get_tib_address field.
12909         * win32-low.h (win32_thread_info): Add thread_local_base field.
12910         * win32-low.c (child_add_thread): Add tlb argument.
12911         Set thread_local_base field to TLB.
12912         (get_child_debug_event): Adapt to child_add_thread change.
12913         (win32_get_tib_address): New function.
12914         (win32_target_ops): Set get_tib_address field to
12915         win32_get_tib_address.
12916         * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12918 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
12920         * linux-low.c (linux_mourn): Also remove the process.
12921         * server.c (handle_target_event): Don't remove the process here.
12922         * nto-low.c (nto_mourn): New.
12923         (nto_target_ops): Install it.
12924         * spu-low.c (spu_mourn): New.
12925         (spu_target_ops): Install it.
12926         * win32-low.c (win32_mourn): New.
12927         (win32_target_ops): Install it.
12929 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
12931         * server.h (buffer_xml_printf): Remove redundant `;'.
12933 2010-04-12  Pedro Alves  <pedro@codesourcery.com>
12935         * regcache.c (set_register_cache): Invalidate regcaches before
12936         changing the register cache layout.
12937         (regcache_invalidate_one): Allow a NULL regcache.
12938         * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12939         regcaches before changing the register cache layout or the target
12940         regsets.
12942 2010-04-12  H.J. Lu  <hongjiu.lu@intel.com>
12944         * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12945         variable warning on Linux/x86-64.
12947 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
12949         GDBserver disconnected tracing support.
12951         * linux-low.c (linux_remove_process): Delete.
12952         (add_lwp): Don't set last_resume_kind here.
12953         (linux_kill): Use `mourn'.
12954         (linux_detach): Use `thread_db_detach', and `mourn'.
12955         (linux_mourn): New.
12956         (linux_attach_lwp_1): Adjust comment.
12957         (linux_attach): last_resume_kind moved the thread_info; adjust.
12958         (status_pending_p_callback): Adjust.
12959         (linux_wait_for_event_1): Adjust.
12960         (count_events_callback, select_singlestep_lwp_callback)
12961         (select_event_lwp_callback, cancel_breakpoints_callback)
12962         (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12963         (proceed_one_lwp): Adjust.
12964         (linux_async): Add debug output.
12965         (linux_thread_stopped): New.
12966         (linux_pause_all): New.
12967         (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12968         linux_pause_all.
12969         * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12970         (thread_db_free): Delete declaration.
12971         (thread_db_detach, thread_db_mourn): Declare.
12972         * thread-db.c (thread_db_init): Use thread_db_mourn.
12973         (thread_db_free): Delete, split in two.
12974         (disable_thread_event_reporting): New.
12975         (thread_db_detach): New.
12976         (thread_db_mourn): New.
12978         * server.h (struct thread_info) <last_resume_kind>: New field.
12979         <attached>: Add comment.
12980         <gdb_detached>: New field.
12981         (handler_func): Change return type to int.
12982         (handle_serial_event, handle_target_event): Ditto.
12983         (gdb_connected): Declare.
12984         (tracing): Delete.
12985         (disconnected_tracing): Declare.
12986         (stop_tracing): Declare.
12988         * server.c (handle_query) <qSupported>: Report support for
12989         disconnected tracing.
12990         (queue_stop_reply_callback): Account for running threads.
12991         (gdb_wants_thread_stopped): New.
12992         (gdb_wants_all_threads_stopped): New.
12993         (gdb_reattached_process): New.
12994         (handle_status): Clear the `gdb_detached' flag of all processes.
12995         In all-stop, stop all threads.
12996         (main): Be sure to leave tfind mode.  Handle disconnected tracing.
12997         (process_serial_event): If the remote connection breaks, or if an
12998         exit was forced with "monitor exit", force an event loop exit.
12999         Handle disconnected tracing on detach.
13000         (handle_serial_event): Adjust.
13001         (handle_target_event): If GDB isn't connected, forward events back
13002         to the inferior, unless the last process exited, in which case,
13003         exit gdbserver.  Adjust interface.
13005         * remote-utils.c (remote_open): Don't block in accept.  Instead
13006         register an event loop source on the listen socket file
13007         descriptor.  Refactor bits into ...
13008         (listen_desc): ... this new global.
13009         (gdb_connected): ... this new function.
13010         (enable_async_notification): ... this new function.
13011         (handle_accept_event): ... this new function.
13012         (remote_close): Clear remote_desc.
13014         * inferiors.c (add_thread): Set the new thread's last_resume_kind.
13016         * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
13017         New fields.
13018         (mourn_inferior): Define.
13019         (target_process_qsupported): Avoid the dangling else problem.
13020         (thread_stopped): Define.
13021         (pause_all): Define.
13022         (target_waitstatus_to_string): Declare.
13023         * target.c (target_waitstatus_to_string): New.
13025         * tracepoint.c (tracing): Make extern.
13026         (disconnected_tracing): New.
13027         (stop_tracing): Make extern.  Handle tracing stops due to GDB
13028         disconnecting.
13029         (cmd_qtdisconnected): New.
13030         (cmd_qtstatus): Report disconnected tracing status in trace reply.
13031         (handle_tracepoint_general_set): Handle QTDisconnected.
13033         * event-loop.c (event_handler_func): Change return type to int.
13034         (process_event): Bail out if the event handler wants the event
13035         loop to stop.
13036         (handle_file_event): Ditto.
13037         (start_event_loop): Bail out if the event handler wants the event
13038         loop to stop.
13040         * nto-low.c (nto_target_ops): Adjust.
13041         * spu-low.c (spu_wait): Don't remove the process here.
13042         (spu_target_ops): Adjust.
13043         * win32-low.c (win32_wait): Don't remove the process here.
13044         (win32_target_ops): Adjust.
13046 2010-04-11  Pedro Alves  <pedro@codesourcery.com>
13048         * regcache.c (realloc_register_cache): Invalidate inferior's
13049         regcache before recreating it.
13051 2010-04-09  Pedro Alves  <pedro@codesourcery.com>
13053         * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
13055 2010-04-09  Stan Shebs  <stan@codesourcery.com>
13056             Pedro Alves  <pedro@codesourcery.com>
13058         * server.h (LONGEST): New.
13059         (struct thread_info) <while_stepping>: New field.
13060         (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
13061         Declare.
13062         (initialize_tracepoint, handle_tracepoint_general_set)
13063         (handle_tracepoint_query, tracepoint_finished_step)
13064         (tracepoint_was_hit, release_while_stepping_state_list):
13065         (current_traceframe): Declare.
13066         * server.c (handle_general_set): Handle tracepoint packets.
13067         (read_memory): New.
13068         (write_memory): New.
13069         (handle_search_memory_1): Use read_memory.
13070         (handle_query): Report support for conditional tracepoints, trace
13071         state variables, and tracepoint sources.  Handle tracepoint
13072         queries.
13073         (main): Initialize the tracepoints module.
13074         (process_serial_event): Handle traceframe reads/writes.
13076         * linux-low.c (handle_tracepoints): New.
13077         (linux_wait_1): Call it.
13078         (linux_resume_one_lwp): Handle while-stepping.
13079         (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13080         (linux_target_ops): Install them.
13081         * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13082         New field.
13083         * linux-x86-low.c (x86_supports_tracepoints): New.
13084         (the_low_target). Install it.
13086         * mem-break.h (delete_breakpoint): Declare.
13087         * mem-break.c (delete_breakpoint): Make external.
13089         * target.h (struct target_ops): Add `supports_tracepoints',
13090         `read_pc', and `write_pc' fields.
13091         (target_supports_tracepoints): Define.
13092         * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13093         (phex_nz): New.
13095         * regcache.h (struct regcache) <registers_owned>: New field.
13096         (init_register_cache, regcache_cpy): Declare.
13097         (regcache_read_pc, regcache_write_pc): Declare.
13098         (register_cache_size): Declare.
13099         (supply_regblock): Declare.
13100         * regcache.c (init_register_cache): New.
13101         (new_register_cache): Use it.
13102         (regcache_cpy): New.
13103         (register_cache_size): New.
13104         (supply_regblock): New.
13105         (regcache_read_pc, regcache_write_pc): New.
13107         * tracepoint.c: New.
13109         * Makefile.in (OBS): Add tracepoint.o.
13110         (tracepoint.o): New rule.
13112 2010-04-08  H.J. Lu  <hongjiu.lu@intel.com>
13114         * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13115         (i386-mmx.o): New.
13116         (i386-mmx.c): Likewise.
13117         (i386-mmx-linux.o): Likewise.
13118         (i386-mmx-linux.c): Likewise.
13120         * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13121         (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13122         (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13123         (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13125         * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13126         (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13127         and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13129 2010-04-07  H.J. Lu  <hongjiu.lu@intel.com>
13131         * Makefile.in (clean): Updated.
13132         (i386-avx.o): New.
13133         (i386-avx.c): Likewise.
13134         (i386-avx-linux.o): Likewise.
13135         (i386-avx-linux.c): Likewise.
13136         (amd64-avx.o): Likewise.
13137         (amd64-avx.c): Likewise.
13138         (amd64-avx-linux.o): Likewise.
13139         (amd64-avx-linux.c): Likewise.
13141         * configure.srv (srv_i386_regobj): Add i386-avx.o.
13142         (srv_i386_linux_regobj): Add i386-avx-linux.o.
13143         (srv_amd64_regobj): Add amd64-avx.o.
13144         (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13145         (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13146         (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13147         (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13148         (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13149         (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13150         (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13152         * i387-fp.c: Include "i386-xstate.h".
13153         (i387_xsave): New.
13154         (i387_cache_to_xsave): Likewise.
13155         (i387_xsave_to_cache): Likewise.
13156         (x86_xcr0): Likewise.
13158         * i387-fp.h (i387_cache_to_xsave): Likewise.
13159         (i387_xsave_to_cache): Likewise.
13160         (x86_xcr0): Likewise.
13162         * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13163         * linux-crisv32-low.c (target_regsets): Likewise.
13164         * linux-m68k-low.c (target_regsets): Likewise.
13165         * linux-mips-low.c (target_regsets): Likewise.
13166         * linux-ppc-low.c (target_regsets): Likewise.
13167         * linux-s390-low.c (target_regsets): Likewise.
13168         * linux-sh-low.c (target_regsets): Likewise.
13169         * linux-sparc-low.c (target_regsets): Likewise.
13170         * linux-xtensa-low.c (target_regsets): Likewise.
13172         * linux-low.c: Include <sys/uio.h>.
13173         (regsets_fetch_inferior_registers): Support nt_type.
13174         (regsets_store_inferior_registers): Likewise.
13175         (linux_process_qsupported): New.
13176         (linux_target_ops): Add linux_process_qsupported.
13178         * linux-low.h (regset_info): Add nt_type.
13179         (linux_target_ops): Add process_qsupported.
13181         * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13182         and <sys/uio.h>.
13183         (init_registers_i386_avx_linux): New.
13184         (init_registers_amd64_avx_linux): Likewise.
13185         (xmltarget_i386_linux_no_xml): Likewise.
13186         (xmltarget_amd64_linux_no_xml): Likewise.
13187         (PTRACE_GETREGSET): Likewise.
13188         (PTRACE_SETREGSET): Likewise.
13189         (x86_fill_xstateregset): Likewise.
13190         (x86_store_xstateregset): Likewise.
13191         (use_xml): Likewise.
13192         (x86_linux_update_xmltarget): Likewise.
13193         (x86_linux_process_qsupported): Likewise.
13194         (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13195         (x86_arch_setup): Don't call init_registers_amd64_linux nor
13196         init_registers_i386_linux here.  Call
13197         x86_linux_update_xmltarget.
13198         (the_low_target): Add x86_linux_process_qsupported.
13200         * server.c (handle_query): Call target_process_qsupported.
13202         * target.h (target_ops): Add process_qsupported.
13203         (target_process_qsupported): New.
13205 2010-04-03  Pedro Alves  <pedro@codesourcery.com>
13207         * inferiors.c (add_thread): Set last_status kind to
13208         TARGET_WAITKIND_IGNORE.
13209         * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13210         fetch.  Use ptid_of.  Avoid unnecessary get_lwp_thread calls.
13211         (linux_wait_1): Move `thread' local definition to block that uses
13212         it.  Don't NULL initialize `event_child'.
13213         (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13214         Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13215         * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13217 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
13219         * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13220         an extended waitstatus, or by a watchpoint.
13221         (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13222         thread was stepping or has been stopped by a watchpoint.
13224 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
13226         * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13227         (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13228         of another, then delete the previous, and validate all
13229         breakpoints.
13230         (validate_inserted_breakpoint): New.
13231         (delete_disabled_breakpoints): New.
13232         (validate_breakpoints): New.
13233         (check_mem_read): Validate breakpoints before trusting their
13234         shadow.  Delete disabled breakpoints.
13235         (check_mem_write): Validate breakpoints before trusting they
13236         should be inserted.  Delete disabled breakpoints.
13237         * mem-break.h (validate_breakpoints):
13238         * server.c (handle_query): Validate breakpoints when we see a
13239         qSymbol query.
13241 2010-04-01  Pedro Alves  <pedro@codesourcery.com>
13243         * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13244         there's a GDB breakpoint at stop_pc.  Always report a trap to GDB
13245         if we could tell there's a GDB breakpoint at stop_pc.
13246         (need_step_over_p): Don't do a step over if we find a GDB
13247         breakpoint at the resume PC.
13249         * mem-break.c (struct raw_breakpoint): New.
13250         (enum bkpt_type): New type `gdb_breakpoint'.
13251         (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13252         fields.  New field `raw'.
13253         (find_raw_breakpoint_at): New.
13254         (set_raw_breakpoint_at): Handle refcounting.  Create a raw
13255         breakpoint instead.
13256         (set_breakpoint_at): Adjust.
13257         (delete_raw_breakpoint): New.
13258         (release_breakpoint): New.
13259         (delete_breakpoint): Rename to...
13260         (delete_breakpoint_1): ... this.  Add proc parameter.  Use
13261         release_breakpoint.  Return ENOENT.
13262         (delete_breakpoint): Reimplement.
13263         (find_breakpoint_at): Delete.
13264         (find_gdb_breakpoint_at): New.
13265         (delete_breakpoint_at): Delete.
13266         (set_gdb_breakpoint_at): New.
13267         (delete_gdb_breakpoint_at): New.
13268         (gdb_breakpoint_here): New.
13269         (set_reinsert_breakpoint): Use release_breakpoint.
13270         (uninsert_breakpoint): Rename to ...
13271         (uninsert_raw_breakpoint): ... this.
13272         (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13273         (reinsert_raw_breakpoint): Change parameter type to
13274         raw_breakpoint.
13275         (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13276         instead.
13277         (check_breakpoints): Adjust.  Use release_breakpoint.
13278         (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13279         (breakpoint_inserted_here): Ditto.
13280         (check_mem_read): Adjust to iterate over raw breakpoints instead.
13281         Don't trust the breakpoint's shadow if it is not inserted.
13282         (check_mem_write): Adjust to iterate over raw breakpoints instead.
13283         (delete_all_breakpoints): Adjust.
13284         (free_all_breakpoints): Mark all breakpoints as uninserted, and
13285         use delete_breakpoint_1.
13287         * mem-break.h (breakpoints_supported): Delete declaration.
13288         (set_gdb_breakpoint_at): Declare.
13289         (gdb_breakpoint_here): Declare.
13290         (delete_breakpoint_at): Delete.
13291         (delete_gdb_breakpoint_at): Declare.
13293         * server.h (struct raw_breakpoint): Forward declare.
13294         (struct process_info): New field `raw_breakpoints'.
13296         * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13297         breakpoints.
13299 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
13301         * linux-low.c (status_pending_p_callback): Fix comment.
13302         (linux_wait_for_event_1): Move most of the internal breakpoint
13303         handling from here...
13304         (linux_wait_1): ... to here.
13305         (count_events_callback): New.
13306         (select_singlestep_lwp_callback): New.
13307         (select_event_lwp_callback): New.
13308         (cancel_breakpoints_callback): New.
13309         (select_event_lwp): New.
13310         (linux_wait_1): Simplify internal breakpoint handling.  Give equal
13311         priority to all LWPs that have had events that should be reported
13312         to the client.  Cancel breakpoints when about to reporting the
13313         event to the client, not while stopping lwps.  No longer cancel
13314         finished single-steps here.
13315         (cancel_finished_single_step): Delete.
13316         (cancel_finished_single_steps): Delete.
13318 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
13320         * mem-break.c (enum bkpt_type): New.
13321         (struct breakpoint): New field `type'.
13322         (set_breakpoint_at): Change return type to struct breakpoint
13323         pointer.  Set type to `other_breakpoint' by default.
13324         (delete_breakpoint): Rewrite, supporting more than one breakpoint
13325         in the breakpoint list.
13326         (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13327         (reinsert_breakpoint): Rename to ...
13328         (reinsert_raw_breakpoint): ... this.
13329         (reinsert_breakpoints_at): Adjust.
13330         * mem-break.h (struct breakpoint): Declare.
13331         (set_breakpoint_at): Change return type to struct breakpoint
13332         pointer.
13334 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
13336         * server.c (handle_query): Assign, not compare.
13338 2010-03-24  Pedro Alves  <pedro@codesourcery.com>
13340         Teach linux gdbserver to step-over-breakpoints.
13342         * linux-low.c (can_hardware_single_step): New.
13343         (supports_breakpoints): New.
13344         (handle_extended_wait): If stopping threads, read the stop pc of
13345         the new cloned LWP.
13346         (get_pc): New.
13347         (get_stop_pc): Add `lwp' parameter.  Handle it.  Bail out if the
13348         low target doesn't support retrieving the PC.
13349         (add_lwp): Set last_resume_kind to resume_continue.
13350         (linux_attach_lwp_1): Adjust comments.  Always set stop_expected.
13351         (linux_attach): Don't clear stop_expected.  Set the lwp's
13352         last_resume_kind to resume_stop.
13353         (linux_detach_one_lwp): Don't check for removed breakpoints.
13354         (check_removed_breakpoint): Delete.
13355         (status_pending_p): Rename to ...
13356         (status_pending_p_callback): ... this.  Don't check for removed
13357         breakpoints.  Don't consider threads that are stopped from GDB's
13358         perspective.
13359         (linux_wait_for_lwp): Always read the stop_pc here.
13360         (cancel_breakpoint): New.
13361         (step_over_bkpt): New global.
13362         (linux_wait_for_event_1): Implement stepping over breakpoints.
13363         (gdb_wants_lwp_stopped): New.
13364         (gdb_wants_all_stopped): New.
13365         (linux_wait_1): Tag threads as gdb-wants-stopped.  Cancel finished
13366         single-step traps here.  Store the thread's last reported target
13367         wait status.
13368         (send_sigstop): Don't clear stop_expected.  Always set it,
13369         instead.
13370         (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13371         (cancel_finished_single_step): New.
13372         (cancel_finished_single_steps): New.
13373         (wait_for_sigstop): Don't cancel finished single-step traps here.
13374         (linux_resume_one_lwp): Don't check for removed breakpoints.
13375         Don't set `step' on non-hardware step archs.
13376         (linux_set_resume_request): Ignore resume_stop requests if already
13377         stopping or stopped.  Set the lwp's last_resume_kind.
13378         (resume_status_pending_p): Don't check for removed breakpoints.
13379         (need_step_over_p): New.
13380         (start_step_over): New.
13381         (finish_step_over): New.
13382         (linux_resume_one_thread): Always queue a sigstop for resume_stop
13383         requests.  Clear the thread's last reported target waitstatus.
13384         Don't use the `suspended' flag.  Don't consider pending breakpoints.
13385         (linux_resume): Start a step-over if necessary.
13386         (proceed_one_lwp): New.
13387         (proceed_all_lwps): New.
13388         (unstop_all_lwps): New.
13389         * linux-low.h (struct lwp_info): Rewrite comment for the
13390         `suspended' flag.  Add the `stop_pc' field.  Delete the
13391         `pending_stop_pc' field.  Tweak the `stepping' flag's comment.
13392         Add `'last_resume_kind' and `need_step_over' fields.
13393         * inferiors.c (struct thread_info): Delete, moved elsewhere.
13394         * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13395         Delete `breakpoint_to_reinsert' field.  New flag `inserted'.
13396         (set_raw_breakpoint_at): New.
13397         (set_breakpoint_at): Rewrite to use it.
13398         (reinsert_breakpoint_handler): Delete.
13399         (set_reinsert_breakpoint): New.
13400         (reinsert_breakpoint_by_bp): Delete.
13401         (delete_reinsert_breakpoints): New.
13402         (uninsert_breakpoint): Rewrite.
13403         (uninsert_breakpoints_at): New.
13404         (reinsert_breakpoint): Rewrite.
13405         (reinsert_breakpoints_at): New.
13406         (check_breakpoints): Rewrite.
13407         (breakpoint_here): New.
13408         (breakpoint_inserted_here): New.
13409         (check_mem_read): Adjust.
13410         * mem-break.h (breakpoints_supported, breakpoint_here)
13411         (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13412         (reinsert_breakpoint_by_bp): Delete declaration.
13413         (delete_reinsert_breakpoints): Declare.
13414         (reinsert_breakpoint): Delete declaration.
13415         (reinsert_breakpoints_at): Declare.
13416         (uninsert_breakpoint): Delete declaration.
13417         (uninsert_breakpoints_at): Declare.
13418         (check_breakpoints): Adjust prototype.
13419         * server.h: Adjust include order.
13420         (struct thread_info): Declare here.  Add a `last_status' field.
13422 2010-03-23  Michael Snyder  <msnyder@vmware.com>
13424         * server.c (crc32): New function.
13425         (handle_query): Add handling for 'qCRC:' request.
13427 2010-03-23  Pedro Alves  <pedro@codesourcery.com>
13429         * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13430         lwp had been stopped by a watchpoint.
13432 2010-03-16  Pedro Alves  <pedro@codesourcery.com>
13434         * server.h (internal_error): Declare.
13435         (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13436         * utils.c (internal_error): New function.
13438 2010-03-15  Andreas Schwab  <schwab@redhat.com>
13440         * configure.srv: Fix typo setting srv_regobj.
13442 2010-03-15  Pedro Alves  <pedro@codesourcery.com>
13444         * linux-low.c (fetch_register): Avoid passing a non string literal
13445         format to `error'.
13446         (usr_store_inferior_registers): Ditto.
13448 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
13450         * linux-low.c (linux_write_memory): Bail out early if peeking
13451         memory failed.
13453 2010-03-14  Pedro Alves  <pedro@codesourcery.com>
13455         * linux-low.h (struct lwp_info): New fields
13456         `stopped_by_watchpoint' and `stopped_data_address'.
13457         * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13458         here, and cache them in the lwp object.
13459         (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13460         directly.
13461         (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13462         field.
13463         (linux_stopped_by_watchpoint): Rewrite.
13464         (linux_stopped_data_address): Rewrite.
13466 2010-03-06  Simo Melenius  <simo.melenius@iki.fi>
13468         * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13469         switching the current inferior, not before.
13471 2010-03-01  H.J. Lu  <hongjiu.lu@intel.com>
13473         * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13474         reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13475         i386-linux.c and amd64-linux.c.
13476         (reg-i386.o): Removed.
13477         (reg-i386.c): Likewise.
13478         (reg-i386-linux.o): Likewise.
13479         (reg-i386-linux.c): Likewise.
13480         (reg-x86-64.o): Likewise.
13481         (reg-x86-64.c): Likewise.
13482         (reg-x86-64-linux.o): Likewise.
13483         (reg-x86-64-linux.c): Likewise.
13484         (i386.o): New.
13485         (i386.c): Likewise.
13486         (i386-linux.o): Likewise.
13487         (i386-linux.c): Likewise.
13488         (amd64.o): Likewise.
13489         (amd64.c): Likewise.
13490         (amd64-linux.o): Likewise.
13491         (amd64-linux.c): Likewise.
13493         * configure.srv (srv_i386_regobj): New.
13494         (srv_i386_linux_regobj): Likewise.
13495         (srv_amd64_regobj): Likewise.
13496         (srv_amd64_linux_regobj): Likewise.
13497         (srv_i386_32bit_xmlfiles): Likewise.
13498         (srv_i386_64bit_xmlfiles): Likewise.
13499         (srv_i386_xmlfiles): Likewise.
13500         (srv_amd64_xmlfiles): Likewise.
13501         (srv_i386_linux_xmlfiles): Likewise.
13502         (srv_amd64_linux_xmlfiles): Likewise.
13503         (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj.  Set
13504         srv_xmlfiles to $srv_i386_xmlfiles.
13505         (i[34567]86-*-mingw32ce*): Likewise.
13506         (i[34567]86-*-mingw*): Likewise.
13507         (i[34567]86-*-nto*): Likewise.
13508         (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13509         and $srv_amd64_linux_regobj.  Set srv_xmlfiles to
13510         $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13511         (x86_64-*-linux*): Likewise.
13513         * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13514         (init_registers_amd64_linux): New.
13515         (x86_arch_setup): Replace init_registers_x86_64_linux with
13516         init_registers_amd64_linux.
13518 2010-02-23  Maxim Kuvyrkov  <maxim@codesourcery.com>
13520         * configure.ac: Check for libdl.  If it is not available link against
13521         static libthread_db.
13522         * configure: Regenerate.
13524 2010-02-22  Pedro Alves  <pedro@codesourcery.com>
13526         PR9605
13528         * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13529         handing a read watchpoint.
13530         (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13532 2010-02-12  Doug Evans  <dje@google.com>
13534         * linux-low.c (linux_supports_tracefork_flag): Document.
13535         (linux_look_up_symbols): Add comment.
13537 2010-02-03  H.J. Lu  <hongjiu.lu@intel.com>
13539         * regcache.c (supply_register): Clear regcache if buf is NULL.
13541 2010-02-02  Nicolas Roche  <roche@sourceware.org>
13542             Joel Brobecker  <brobecker@adacore.com>
13544         * inferiors.c (find_inferior): Add function documentation.
13545         (unloaded_dll): Handle the case where the unloaded dll has not
13546         been previously registered in the dll list.
13548 2010-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
13550         * linux-arm-low.c (thumb_breakpoint_len): Delete.
13551         (thumb2_breakpoint): New.
13552         (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13554 2010-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
13556         * linux-low.c (get_stop_pc): Check for SIGTRAP.
13557         (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13558         breakpoints.
13560 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
13562         * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13564 2010-01-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13566         * linux-s390-low.c (s390_collect_ptrace_register)
13567         (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13569 2010-01-21  Doug Evans  <dje@google.com>
13571         * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13572         (PTRACE_ARG4_TYPE): New macro.
13573         (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13574         (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13575         (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13576         (usr_store_inferior_registers): Ditto.
13577         (linux_read_memory, linux_write_memory): Ditto.
13578         (linux_test_for_tracefork): Ditto.
13580         * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13581         Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13583 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
13585         * proc-service.c (ps_lgetregs): Don't refetch registers from the
13586         target.
13588 2010-01-21  Pedro Alves  <pedro@codesourcery.com>
13590         * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13591         prototype to take a regcache.  Adjust.
13593 2010-01-20  Pedro Alves  <pedro@codesourcery.com>
13595         * regcache.h (struct thread_info): Forward declare.
13596         (struct regcache): New.
13597         (new_register_cache): Adjust prototype.
13598         (get_thread_regcache): Declare.
13599         (free_register_cache): Adjust prototype.
13600         (registers_to_string, registers_from_string): Ditto.
13601         (supply_register, supply_register_by_name, collect_register)
13602         (collect_register_as_string, collect_register_by_name): Ditto.
13603         * regcache.c (struct inferior_regcache_data): Delete.
13604         (get_regcache): Rename to ...
13605         (get_thread_regcache): ... this.  Adjust.  Switch inferior before
13606         fetching registers.
13607         (regcache_invalidate_one): Adjust.
13608         (regcache_invalidate): Fix prototype.
13609         (new_register_cache): Return the new register cache.
13610         (free_register_cache): Change prototype.
13611         (realloc_register_cache): Adjust.
13612         (registers_to_string): Change prototype to take a regcache.  Adjust.
13613         (registers_from_string): Ditto.
13614         (register_data): Ditto.
13615         (supply_register): Ditto.
13616         (supply_register_by_name): Ditto.
13617         (collect_register): Ditto.
13618         (collect_register_as_string): Ditto.
13619         (collect_register_by_name): Ditto.
13620         * server.c (process_serial_event): Adjust.
13621         * linux-low.h (regset_fill_func, regset_store_func): Change
13622         prototype.
13623         (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13624         Change prototype.
13625         * linux-low.c (get_stop_pc): Adjust.
13626         (check_removed_breakpoint): Adjust.
13627         (linux_wait_for_event): Adjust.
13628         (linux_resume_one_lwp): Adjust.
13629         (fetch_register): Add regcache parameter.  Adjust.
13630         (usr_store_inferior_registers): Ditto.
13631         (regsets_fetch_inferior_registers): Ditto.
13632         (regsets_store_inferior_registers): Ditto.
13633         (linux_fetch_registers, linux_store_registers): Ditto.
13634         * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13635         regcache.  Adjust.
13636         (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13637         Ditto.
13638         * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13639         prototype to take a regcache.
13640         (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13641         * remote-utils.c (convert_ascii_to_int, outreg)
13642         (prepare_resume_reply): Change prototype to take a regcache.
13643         Adjust.
13644         * target.h (struct target_ops) <fetch_registers, store_registers>:
13645         Change prototype to take a regcache.
13646         (fetch_inferior_registers, store_inferior_registers): Change
13647         prototype to take a regcache.  Adjust.
13648         * proc-service.c (ps_lgetregs): Adjust.
13649         * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13650         (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13651         (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13652         take a regcache.  Adjust.
13653         * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13654         (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13655         (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13656         (arm_breakpoint_at): Change prototype to take a regcache.  Adjust.
13657         * linux-cris-low.c (cris_get_pc, cris_set_pc)
13658         (cris_cannot_fetch_register):
13659         (cris_breakpoint_at): Change prototype to take a regcache.
13660         Adjust.
13661         * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13662         cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13663         to take a regcache.  Adjust.
13664         (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13665         Adjust.
13666         * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13667         take a regcache.  Adjust.
13668         * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13669         (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13670         (m68k_set_pc): Change prototype to take a regcache.  Adjust.
13671         * linux-mips-low.c (mips_get_pc):
13672         (mips_set_pc): Change prototype to take a regcache.  Adjust.
13673         (mips_reinsert_addr): Adjust.
13674         (mips_collect_register): Change prototype to take a regcache.
13675         Adjust.
13676         (mips_supply_register):
13677         (mips_collect_register_32bit, mips_supply_register_32bit)
13678         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13679         (mips_store_fpregset): Ditto.
13680         * linux-ppc-low.c (ppc_supply_ptrace_register)
13681         (ppc_supply_ptrace_register): Ditto.
13682         (parse_spufs_run): Adjust.
13683         (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13684         (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13685         (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13686         take a regcache.  Adjust.
13687         * linux-s390-low.c (s390_collect_ptrace_register)
13688         (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13689         (s390_set_pc): Change prototype to take a regcache.  Adjust.
13690         (s390_arch_setup): Adjust.
13691         * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13692         (sh_fill_gregset): Change prototype to take a regcache.  Adjust.
13693         * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13694         (sparc_fill_gregset, sparc_store_gregset_from_stack)
13695         (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13696         regcache.  Adjust.
13697         (sparc_breakpoint_at): Adjust.
13698         * linux-xtensa-low.c (xtensa_fill_gregset):
13699         (xtensa_store_gregset):
13700         (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13701         (xtensa_set_pc): Change prototype to take a regcache.  Adjust.
13702         * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13703         prototype to take a regcache.  Adjust.
13704         * win32-arm-low.c (arm_fetch_inferior_register)
13705         (arm_store_inferior_register): Change prototype to take a
13706         regcache.  Adjust.
13707         * win32-i386-low.c (i386_fetch_inferior_register)
13708         (i386_store_inferior_register): Change prototype to take a
13709         regcache.  Adjust.
13710         * win32-low.c (child_fetch_inferior_registers)
13711         (child_store_inferior_registers): Change prototype to take a
13712         regcache.  Adjust.
13713         (win32_wait): Adjust.
13714         (win32_fetch_inferior_registers): Change prototype to take a
13715         regcache.  Adjust.
13716         (win32_store_inferior_registers): Adjust.
13717         * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13718         store_inferior_register>: Change prototype to take a regcache.
13720 2010-01-20  Doug Evans  <dje@google.com>
13722         * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13723         #ifdef.
13724         (linux_wait_for_event1, linux_init_signals): Ditto.
13725         (W_STOPCODE): Provide definition if missing.
13727 2010-01-13  Vladimir Prus  <vladimir@codesourcery.com>
13729         * linux-low.c (linux_core_of_thread): New.
13730         (compare_ints, show_process, list_threads): New.
13731         (linux_qxfer_osdata): Report threads and cores.
13732         (linux_target_op): Register linux_core_of_thread.
13733         * remote-utils.c (prepare_resume_reply): Report the core.
13734         (buffer_xml_printf): Support %d specifier.
13735         * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13736         New.
13737         (handle_query): Handle qXfer:threads.  Announce availability
13738         thereof.
13739         * target.h (struct target_ops): New field core_of_thread.
13741 2010-01-04  Ulrich Weigand  <uweigand@de.ibm.com>
13743         * Makefile.in (clean): Remove new generated files.
13744         (reg-s390.o, reg-s390.c): Remove rules.
13745         (reg-s390x.o, reg-s390x.c): Likewise.
13746         (s390-linux32.o, s390-linux32.c): Add rules.
13747         (s390-linux64.o, s390-linux64.c): Likewise.
13748         (s390x-linux64.o, s390x-linux64.c): Likewise.
13749         * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13750         * linux-s390-low.c: Include <elf.h>.
13751         (HWCAP_S390_HIGH_GPRS): Define if undefined.
13752         (init_registers_s390): Remove prototype.
13753         (init_registers_s390x): Likewise.
13754         (init_registers_s390_linux32): Add prototype.
13755         (init_registers_s390_linux64): Likewise.
13756         (init_registers_s390x_linux64): Likewise.
13757         (s390_num_regs_3264): New define.
13758         (s390_regmap_3264): New global variable.
13759         (s390_cannot_fetch_register): Remove obsolete check.
13760         (s390_cannot_store_register): Likewise.
13761         (s390_collect_ptrace_register): Handle upper/lower register halves.
13762         (s390_supply_ptrace_register): Likewise.
13763         (s390_fill_gregset): Update to register number changes.
13764         (s390_get_hwcap): New routine.
13765         (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13766         Install appropriate regmap and register set.
13768 2010-01-01  Joel Brobecker  <brobecker@adacore.com>
13770         * server.c (gdbserver_version): Update copyright year to 2010.
13771         * gdbreplay.c (gdbreplay_version): Likewise.
13773 2009-12-28  Doug Evans  <dje@google.com>
13775         * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13776         elf/external.h.  Include <elf.h> instead but only if necessary.
13778 2009-12-28  Pedro Alves  <pedro@codesourcery.com>
13780         * linux-low.c (linux_remove_process): Remove `detaching'
13781         parameter.  Don't release/detach from thread_db here.
13782         (linux_kill): Release/detach from thread_db here, ...
13783         (linux_detach): ... and here, before actually detaching.
13784         (linux_wait_1): ... and here, when a process exits.
13785         * thread-db.c (any_thread_of): New.
13786         (thread_db_free): Switch the current inferior to a thread of the
13787         passed in process.
13789 2009-12-21  Doug Evans  <dje@google.com>
13791         * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13793         * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13794         Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13795         warning ifndef __NR_tkill.  Move setting of errno there too.
13796         Delete unnecessary resetting of errno after syscall.
13797         Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13799         * configure.ac: Check for dladdr.
13800         * config.in: Regenerate.
13801         * configure: Regenerate.
13802         * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13803         (try_thread_db_load): Update.
13805         * linux-low.c (my_waitpid): Delete unnecessary prototype.
13807 2009-12-18  Doug Evans  <dje@google.com>
13809         * event-loop.c: Include unistd.h if it exists.
13811         * linux-low.c (my_waitpid): Move definition away from being in
13812         between linux_tracefork_child/linux_test_for_tracefork.
13814         * gdb_proc_service.h (psaddr_t): Fix type.
13815         * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13816         signature to match glibc.
13818 2009-12-16  Doug Evans  <dje@google.com>
13820         * linux-low.c (linux_read_memory): Fix argument to read.
13822 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
13824         * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13825         events, don't leave current_inferior pointing at null.
13827 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
13829         * win32-low.c (LOG): Delete.
13830         (OUTMSG): Output to stderr.
13831         (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13832         on compile time LOG macro.
13833         (win32_wait): Fix debug output.
13835 2009-11-26  Pedro Alves  <pedro@codesourcery.com>
13837         * win32-low.c (win32_add_one_solib): If the dll name is
13838         "ntdll.dll", prepend the system directory to the dll path.
13840 2009-11-17  Daniel Jacobowitz  <dan@codesourcery.com>
13842         * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13844 2009-11-17  Nathan Sidwell  <nathan@codesourcery.com>
13845             Vladimir Prus  <vladimir@codesourcery.com>
13847         * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13848         * configure.ac: Check for __mcoldfire__ and set
13849         gdb_cv_m68k_is_coldfire.
13850         * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13851         reg-cf.o and reg-m68k.o.
13852         * configure: Regenerated.
13854 2009-11-16  Pedro Alves  <pedro@codesourcery.com>
13856         * linux-low.c (linux_remove_process): Add `detaching' parameter.
13857         Pass it to thread_db_free.
13858         (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13859         proper `detaching' argument to linux_remove_process.
13860         * linux-low.h (thread_db_free): Add `detaching' parameter.
13861         * thread-db.c (thread_db_init): Pass false as `detaching' argument
13862         to thread_db_free.
13863         (thread_db_free): Add `detaching' parameter.  Only
13864         call td_ta_clear_event if detaching from process.
13866 2009-11-12  Maxim Kuvyrkov  <maxim@codesourcery.com>
13868         * thread-db.c (thread_db_free): Fix typo.
13870 2009-11-11  Paul Pluzhnikov  <ppluzhnikov@google.com>
13872         PR gdb/10838
13873         * thread-db.c (thread_db_free): Call td_ta_clear_event.
13875 2009-11-03  Nathan Sidwell  <nathan@codesourcery.com>
13877         * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13878         with an i686 compiler.
13879         * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13880         needed.
13881         * configure: Rebuilt.
13883 2009-10-29  Sandra Loosemore  <sandra@codesourcery.com>
13885         PR gdb/10783
13887         * server.c (handle_search_memory_1): Correct read_addr initialization
13888         in loop for searching subsequent chunks.
13890 2009-10-29  Paul Pluzhnikov  <ppluzhnikov@google.com>
13892         * configure.ac: New --with-libthread-db option.
13893         * thread-db.c: Allow direct dependence on libthread_db.
13894         (thread_db_free): Adjust.
13895         * config.in: Regenerate.
13896         * configure: Likewise.
13898 2009-10-28  Paul Pluzhnikov  <ppluzhnikov@google.com>
13900         PR gdb/10757
13901         * thread-db.c (attach_thread): New function.
13902         (maybe_attach_thread): Return success/failure.
13903         (find_new_threads_callback): Adjust.
13904         (thread_db_find_new_threads): Loop until no new threads.
13906 2009-10-13  Pedro Alves  <pedro@codesourcery.com>
13908         * proc-service.c (ps_lgetregs): Formatting.
13910 2009-10-08  Paul Pluzhnikov  <ppluzhnikov@google.com>
13912         * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13913         * configure.ac: Adjust.
13914         * linux-low.h (struct process_info_private): Move members to struct
13915         thread_db.
13916         (thread_db_free, thread_db_handle_monitor_command): New prototype.
13917         * linux-low.c (linux_remove_process): Adjust.
13918         (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13919         * server.c (handle_query): Move code ...
13920         (handle_monitor_command): ... here. New function.
13921         * target.h (struct target_ops): New member.
13922         * thread-db.c (struct thread_db): New.
13923         (libthread_db_search_path): New variable.
13924         (thread_db_create_event, thread_db_enable_reporting)
13925         (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13926         (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13927         (try_thread_db_load_1, dladdr_to_soname): New functions.
13928         (try_thread_db_load, thread_db_load_search): New functions.
13929         (thread_db_init): Search for libthread_db.
13930         (thread_db_free): New function.
13931         (thread_db_handle_monitor_command): Likewise.
13932         * config.in: Regenerate.
13933         * configure: Regenerate.
13935 2009-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
13937         * spu-low.c (spu_kill): Wait for inferior to terminate.
13938         Call clear_inferiors.
13939         (spu_detach): Call clear_inferiors.
13941 2009-08-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13943         * aclocal.m4: Regenerate.
13944         * config.in: Likewise.
13945         * configure: Likewise.
13947 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
13949         * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13950         (parse_spufs_run): New function.
13951         (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13952         (ppc_breakpoint_at): Handle SPU breakpoints.
13954 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
13956         * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13957         (SPUFS_MAGIC): Define.
13958         (spu_enumerate_spu_ids): New function.
13959         (linux_qxfer_spu): New function.
13960         (linux_target_ops): Install linux_qxfer_spu.
13962 2009-07-31  Ulrich Weigand  <uweigand@de.ibm.com>
13964         * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13965         and powerpc-cell64l.o to srv_regobj.  Add rs6000/powerpc-cell32l.xml
13966         and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13967         * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13968         (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13969         (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13970         * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13971         (init_registers_powerpc_cell32l): Add prototype.
13972         (init_registers_powerpc_cell64l): Likewise.
13973         (ppc_arch_setup): Detect Cell/B.E. architecture.
13975 2009-07-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
13977         * Makefile.in (datarootdir): New variable.
13979 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
13981         * linux-low.c (linux_write_memory): Update debugging output.
13982         * Makefile.in (clean): Add new descriptions.
13983         (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13984         (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13985         * configure.srv: Add new files for arm*-*-linux*.
13986         * linux-arm-low.c: Add new declarations.
13987         (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13988         (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13989         (HWCAP_VFPv3D16): New.
13990         (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13991         instead of __IWMMXT__.
13992         (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13993         (arm_arch_setup): New.
13994         (target_regsets): Remove #ifdef.  Add VFP regset.
13995         (the_low_target): Use arm_arch_setup.
13997 2009-07-28  Daniel Jacobowitz  <dan@codesourcery.com>
13999         * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
14000         the main thread again.
14002 2009-07-06  Aleksandar Ristovski  <aristovski@qnx.com>
14004         Adding Neutrino gdbserver.
14005         * configure: Regenerated.
14006         * configure.ac: Add case for srv_qnx and set LIBS accordingly.
14007         * configure.srv (i[34567]86-*-nto*): New target.
14008         * nto-low.c, nto-low.h, nto-x86-low.c: New files.
14009         * remote-utils.c [__QNX__]: Include sys/iomgr.h
14010         (nto_comctrl) [__QNX__]: New function.
14011         (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
14013 2009-07-05  Danny Backx  <dannybackx@users.sourceforge.net>
14015         * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
14016         srv_tgtobj.
14018 2009-07-04  Danny Backx  <dannybackx@users.sourceforge.net>
14019             Pedro Alves  <pedro@codesourcery.com>
14021         * win32-i386-low.c (i386_get_thread_context): Handle systems that
14022         don't support CONTEXT_EXTENDED_REGISTERS.
14023         (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
14024         (the_low_target): Install them.
14025         * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
14026         failing with ERROR_PIPE_NOT_CONNECTED.
14028 2009-06-30  Doug Evans  <dje@google.com>
14029             Pierre Muller  <muller@ics.u-strasbg.fr>
14031         Add h/w watchpoint support to x86-linux, win32-i386.
14032         * Makefile.in (SFILES): Add i386-low.c
14033         (i386_low_h): Define.
14034         (i386-low.o): Add dependencies.
14035         (linux-x86-low.o): Add i386-low.h dependency.
14036         (win32-i386-low.o): Ditto.
14037         * i386-low.c: New file.
14038         * i386-low.h: New file.
14039         * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
14040         (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
14041         * linux-low.c (linux_add_process): Initialize arch_private.
14042         (linux_remove_process): Free arch_private.
14043         (add_lwp): Initialize arch_private.
14044         (delete_lwp): Free arch_private.
14045         (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
14046         provided.
14047         * linux-low.h (process_info_private): New member arch_private.
14048         (lwp_info): New member arch_private.
14049         (linux_target_ops): New members new_process, new_thread,
14050         prepare_to_resume.
14051         (ptid_of): New macro.
14052         * linux-x86-low.c: Include stddef.h, i386-low.h.
14053         (arch_process_info): New struct.
14054         (arch_lwp_info): New struct.
14055         (x86_linux_dr_get, x86_linux_dr_set): New functions.
14056         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14057         (i386_dr_low_get_status): New function.
14058         (x86_insert_point, x86_remove_point): New functions.
14059         (x86_stopped_by_watchpoint): New function.
14060         (x86_stopped_data_address): New function.
14061         (x86_linux_new_process, x86_linux_new_thread): New functions.
14062         (x86_linux_prepare_to_resume): New function.
14063         (the_low_target): Add entries for insert_point, remove_point,
14064         stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
14065         prepare_to_resume.
14066         * server.c (debug_hw_points): New global.
14067         (monitor_show_help): Document set debug-hw-points.
14068         (handle_query): Process "set debug-hw-points".
14069         * server.h (debug_hw_points): Declare.
14070         (paddress): Declare.
14071         * utils.c (NUMCELLS, CELLSIZE): New macros.
14072         (get_sell, xsnprintf, paddress): New functions.
14073         * win32-arm-low.c (the_low_target): Add entries for insert_point,
14074         remove_point, stopped_by_watchpoint, stopped_data_address.
14075         * win32-i386-low.c: Include i386-low.h.
14076         (debug_reg_state): Replaces dr.
14077         (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14078         (i386_dr_low_get_status): New function.
14079         (i386_insert_point, i386_remove_point): New functions.
14080         (i386_stopped_by_watchpoint): New function.
14081         (i386_stopped_data_address): New function.
14082         (i386_initial_stuff): Update.
14083         (get_thread_context,set_thread_context,i386_thread_added): Update.
14084         (the_low_target): Add entries for insert_point,
14085         remove_point, stopped_by_watchpoint, stopped_data_address.
14086         * win32-low.c (win32_insert_watchpoint): New function.
14087         (win32_remove_watchpoint): New function.
14088         (win32_stopped_by_watchpoint): New function.
14089         (win32_stopped_data_address): New function.
14090         (win32_target_ops): Add entries for insert_watchpoint,
14091         remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14092         * win32-low.h (win32_target_ops): New members insert_point,
14093         remove_point, stopped_by_watchpoint, stopped_data_address.
14095 2009-06-25  Pedro Alves  <pedro@codesourcery.com>
14097         * server.c (process_serial_event): Re-return unsupported, not
14098         error, if the type isn't recognized.  Re-allow supporting only
14099         insert or remove packets.  Also call require_running for
14100         breakpoints.  Add missing break statement to default case.  Tidy.
14101         * target.h (struct target_ops): Rename insert_watchpoint to
14102         insert_point, and remove_watchpoint to remove_point.
14104         * linux-low.h (struct linux_target_ops): Likewise.
14105         * linux-low.c (linux_insert_watchpoint): Rename to ...
14106         (linux_insert_point): ... this.  Adjust.
14107         (linux_remove_watchpoint): Rename to ...
14108         (linux_remove_point): ... this.  Adjust.
14109         (linux_target_ops): Adjust.
14110         * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14111         (cris_insert_point): ... this.
14112         (cris_remove_watchpoint): Rename to ...
14113         (cris_remove_point): ... this.
14114         (the_low_target): Adjust.
14116 2009-06-24  Pierre Muller  <muller@ics.u-strasbg.fr>
14118         * server.c (handle_v_kill): Pass signal_pid to
14119         kill_inferior if multi_process is zero.
14121 2009-06-23  Aleksandar Ristovski  <aristovski@qnx.com>
14123         * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14124         * target.h (target_ops): Comment for *_watchpoint to make it clear
14125         the functions can get types '0' and '1'.
14127 2009-06-22  Aleksandar Ristovski  <aristovski@qnx.com>
14129         * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14130         * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14131         * regcache.c (get_regcache): Likewise.
14132         * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14133         * win32-low.c (child_fetch_inferior_registers): Remove check for
14134         regno 0.
14136 2009-06-19  Aleksandar Ristovski  <aristovski@qnx.com>
14137             Pedro Alves <pedro@codesourcery.com>
14139         * target.h (struct target_ops) <supports_multi_process>: New
14140         callback.
14141         (target_supports_multi_process): New.
14142         * server.c (handle_query): Even if GDB reports support, only
14143         enable multi-process if the target also supports it.  Report
14144         multi-process support only if the target backend supports it.
14145         * linux-low.c (linux_supports_multi_process): New function.
14146         (linux_target_ops): Install it as target_supports_multi_process
14147         callback.
14149 2009-05-24  Doug Evans  <dje@google.com>
14151         Global renaming of find_thread_pid to find_thread_ptid.
14152         * server.h (find_thread_ptid): Renamed from find_thread_pid.
14153         * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14154         All callers updated.
14156         * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14157         to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14158         directly.
14160         * linux-low.c (get_stop_pc): Print pc if debug_threads.
14161         (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14162         (linux_resume_one_lwp): Ditto.
14164 2009-05-23  Doug Evans  <dje@google.com>
14166         * linux-low.c (linux_resume_one_lwp): Change type of first arg
14167         from struct inferior_list_entry * to struct lwp_info *.
14168         All callers updated.
14170 2009-05-13  Doug Evans  <dje@google.com>
14172         * linux-x86-low.c: Don't include assert.h.
14173         (x86_siginfo_fixup): Use fatal, not assert.
14174         (x86_arch_setup): Fix comment.
14176 2009-05-12  Doug Evans  <dje@google.com>
14178         Biarch support for i386/amd64 gdbserver.
14179         * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14180         Add linux-x86-low.c.
14181         (linux-i386-low.o, linux-x86-64-low.o): Delete.
14182         (linux-x86-low.o): Add.
14183         * linux-x86-64-low.c: Delete.
14184         * linux-i386-low.c: Delete.
14185         * linux-x86-low.c: New file.
14186         * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14187         linux-x86-low.o.
14188         (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14189         linux-x86-low.o.
14190         (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14191         * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14192         (linux_child_pid_to_exec_file): New function.
14193         (elf_64_header_p, elf_64_file_p): New functions.
14194         (siginfo_fixup): New function.
14195         (linux_xfer_siginfo): New local inf_siginfo.  Call siginfo_fixup to
14196         give target a chance to convert layout.
14197         * linux-low.h (linux_target_ops): New member siginfo_fixup.
14198         (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14200 2009-05-07  Doug Evans  <dje@google.com>
14202         * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14203         (regsets_store_inferior_registers): Ditto.
14205 2009-05-06  Pedro Alves  <pedro@codesourcery.com>
14207         PR server/10048
14209         * linux-low.c (must_set_ptrace_flags): Delete.
14210         (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14211         of the global.
14212         (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here.  Set
14213         `lwp->must_set_ptrace_flags' instead.
14214         (linux_wait_for_event_1): Set ptrace options here.
14215         (linux_wait_1): ... not here.
14217 2009-04-30  Doug Evans  <dje@google.com>
14219         * inferiors.c (started_inferior_callback): New function.
14220         (attached_inferior_callback): New function.
14221         (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14222         * server.c (print_started_pid, print_attached_pid): New functions.
14223         (detach_or_kill_for_exit): New function.
14224         (main): Call it instead of for_each_inferior (kill_inferior_callback).
14225         * server.h (have_started_inferiors_p): Declare.
14226         (have_attached_inferiors_p): Declare.
14228         * inferiors.c (remove_process): Fix memory leak, free process.
14229         * linux-low.c (linux_remove_process): New function.
14230         (linux_kill): Call it instead of remove_process.
14231         (linux_detach, linux_wait_1): Ditto.
14233 2009-04-19  Danny Backx  <dannybackx@users.sourceforge.net>
14235         * configure.srv: Add x86 Windows CE target.
14237 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
14239         * inferiors.c (get_thread_process): Make global.
14240         * server.h (get_thread_process): Add prototype.
14241         * thread-db.c (find_one_thread): Use get_thread_process
14242         instead of current_process.
14243         (thread_db_get_tls_address): Do not crash if called when
14244         thread layer is not yet initialized.
14246 2009-04-03  Ulrich Weigand  <uweigand@de.ibm.com>
14248         * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14249         * spu-low.c (current_tid): Rename to ...
14250         (current_ptid): ... this.
14251         (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14252         spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14253         ptid_get_lwp (current_ptid) instead of current_tid.
14254         (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14255         instead of current_tid.  Use find_process_pid to verify pid
14256         argument is valid.  Pass proper argument to remove_process.
14257         (spu_thread_alive): Compare current_ptid instead of current_tid.
14258         (spu_resume): Likewise.
14260 2009-04-02  Pedro Alves  <pedro@codesourcery.com>
14262         * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14263         variable.
14265 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
14267         Implement the multiprocess extensions, and add linux multiprocess
14268         support.
14270         * server.h (ULONGEST): Declare.
14271         (struct ptid, ptid_t): New.
14272         (minus_one_ptid, null_ptid): Declare.
14273         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14274         (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14275         (struct inferior_list_entry): Change `id' type from unsigned from
14276         to ptid_t.
14277         (struct sym_cache, struct breakpoint, struct
14278         process_info_private): Forward declare.
14279         (struct process_info): Declare.
14280         (current_process): Declare.
14281         (all_processes): Declare.
14282         (initialize_inferiors): Declare.
14283         (add_thread): Adjust to use ptid_t.
14284         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14285         (add_process, remove_process, find_thread_pid): Declare.
14286         (find_inferior_id): Adjust to use ptid_t.
14287         (cont_thread, general_thread, step_thread): Change type to ptid_t.
14288         (multi_process): Declare.
14289         (push_event): Adjust to use ptid_t.
14290         (read_ptid, write_ptid): Declare.
14291         (prepare_resume_reply): Adjust to use ptid_t.
14292         (clear_symbol_cache): Declare.
14293         * inferiors.c (all_processes): New.
14294         (null_ptid, minus_one_ptid): New.
14295         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14296         (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14297         (add_thread): Change unsigned long to ptid.  Remove gdb_id
14298         parameter.  Adjust.
14299         (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14300         (gdb_id_to_thread): Rename to ...
14301         (find_thread_pid): ... this.  Change unsigned long to ptid.
14302         (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14303         (loaded_dll, pull_pid_from_list): Adjust.
14304         (add_process, remove_process, find_process_pid)
14305         (get_thread_process, current_process, initialize_inferiors): New.
14306         * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14307         (struct target_waitstatus) <related_pid>: Ditto.
14308         (struct target_ops) <kill, detach>: Add `pid' argument.  Change
14309         return type to int.
14310         (struct target_ops) <join>: Add `pid' argument.
14311         (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14312         (struct target_ops) <wait>: Add `ptid' field.  Change return type
14313         to ptid.
14314         (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14315         (mywait): Add `ptid' argument.  Change return type to ptid_t.
14316         (target_pid_to_str): Declare.
14317         * target.c (set_desired_inferior): Adjust to use ptids.
14318         (mywait): Add new `ptid' argument.  Adjust.
14319         (target_pid_to_str): New.
14320         * mem-break.h (free_all_breakpoints): Declare.
14321         * mem-break.c (breakpoints): Delelete.
14322         (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14323         (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14324         to use per-process breakpoint list.
14325         (free_all_breakpoints): New.
14326         * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14327         (symbol_cache, all_symbols_looked_up): Delete.
14328         (hexchars): New.
14329         (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14330         read_ptid): New.
14331         (prepare_resume_reply): Change ptid argument's type from unsigned
14332         long to ptid_t.  Adjust.  Implement W;process and X;process.
14333         (free_sym_cache, clear_symbol_cache): New.
14334         (look_up_one_symbol): Adjust to per-process symbol cache.  *
14335         * server.c (cont_thread, general_thread, step_thread): Change type
14336         to ptid_t.
14337         (attached): Delete.
14338         (multi_process): New.
14339         (last_ptid): Change type to ptid_t.
14340         (struct vstop_notif) <ptid>: Change type to ptid_t.
14341         (queue_stop_reply, push_event): Change `ptid' argument's type to
14342         ptid_t.
14343         (discard_queued_stop_replies): Add `pid' argument.
14344         (start_inferior): Adjust to use ptids.  Adjust to mywait interface
14345         changes.  Don't reference the `attached' global.
14346         (attach_inferior): Adjust to mywait interface changes.
14347         (handle_query): Adjust to use ptids.  Parse GDB's qSupported
14348         features.  Handle and report "multiprocess+".  Handle
14349         "qAttached:PID".
14350         (handle_v_cont): Adjust to use ptids.  Adjust to mywait interface
14351         changes.
14352         (handle_v_kill): New.
14353         (handle_v_stopped): Adjust to use target_pid_to_str.
14354         (handle_v_requests): Allow multiple attaches and runs when
14355         multiprocess extensions are in effect.  Handle "vKill".
14356         (myresume): Adjust to use ptids.
14357         (queue_stop_reply_callback): Add `arg' parameter.  Handle it.
14358         (handle_status): Adjust to discard_queued_stop_replies interface
14359         change.
14360         (first_thread_of, kill_inferior_callback)
14361         (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14362         (main): Call initialize_inferiors.  Adjust to use ptids, killing
14363         and detaching from all inferiors.  Handle multiprocess packet
14364         variants.
14365         * linux-low.h: Include gdb_proc_service.h.
14366         (struct process_info_private): New.
14367         (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14368         <lwpid_of>: Use ptid_get_lwp.
14369         (get_lwp_thread): Adjust.
14370         (struct lwp_info): Add `dead' member.
14371         (find_lwp_pid): Declare.
14372         * linux-low.c (thread_db_active): Delete.
14373         (new_inferior): Adjust comment.
14374         (inferior_pid): Delete.
14375         (linux_add_process): New.
14376         (handle_extended_wait): Adjust.
14377         (add_lwp): Change unsigned long to ptid.
14378         (linux_create_inferior): Add process to processes table.  Adjust
14379         to use ptids.  Don't set new_inferior here.
14380         (linux_attach_lwp): Rename to ...
14381         (linux_attach_lwp_1): ... this.  Add `initial' argument.  Handle
14382         it.  Adjust to use ptids.
14383         (linux_attach_lwp): New.
14384         (linux_attach): Add process to processes table.  Don't set
14385         new_inferior here.
14386         (struct counter): New.
14387         (second_thread_of_pid_p, last_thread_of_process_p): New.
14388         (linux_kill_one_lwp): Add `args' parameter.  Handle it.  Adjust to
14389         multiple processes.
14390         (linux_kill): Add `pid' argument.  Handle it.  Adjust to multiple
14391         processes.  Remove process from process table.
14392         (linux_detach_one_lwp): Add `args' parameter.  Handle it.  Adjust
14393         to multiple processes.
14394         (any_thread_of): New.
14395         (linux_detach): Add `pid' argument, and handle it.  Remove process
14396         from processes table.
14397         (linux_join): Add `pid' argument.  Handle it.
14398         (linux_thread_alive): Change unsighed long argument to ptid_t.
14399         Consider dead lwps as not being alive.
14400         (status_pending_p): Rename `dummy' argument to `arg'.  Filter out
14401         threads we're not interested in.
14402         (same_lwp, find_lwp_pid): New.
14403         (linux_wait_for_lwp): Change `pid' argument's type from int to
14404         ptid_t.  Adjust.
14405         (linux_wait_for_event): Rename to ...
14406         (linux_wait_for_event_1): ... this.  Change `pid' argument's type
14407         from int to ptid_t.  Adjust.
14408         (linux_wait_for_event): New.
14409         (linux_wait_1): Add `ptid' argument.  Change return type to
14410         ptid_t.  Adjust.  Use last_thread_of_process_p.  Remove processes
14411         that exit from the process table.
14412         (linux_wait): Add `ptid' argument.  Change return type to ptid_t.
14413         Adjust.
14414         (mark_lwp_dead): New.
14415         (wait_for_sigstop): Adjust to use ptids.  If a process exits while
14416         stopping all threads, mark its main lwp as dead.
14417         (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14418         ptids.
14419         (fetch_register, usr_store_inferior_registers)
14420         (regsets_fetch_inferior_registers)
14421         (regsets_store_inferior_registers, linux_read_memory)
14422         (linux_write_memory): Inline `inferior_pid'.
14423         (linux_look_up_symbols): Adjust to use per-process
14424         `thread_db_active'.
14425         (linux_request_interrupt): Adjust to use ptids.
14426         (linux_read_auxv): Inline `inferior_pid'.
14427         (initialize_low): Don't reference thread_db_active.
14428         * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14429         * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14430         (ps_getpid): Return the pid of the current inferior.
14431         * thread-db.c (proc_handle, thread_agent): Delete.
14432         (thread_db_create_event, thread_db_enable_reporting): Adjust to
14433         per-process data.
14434         (find_one_thread): Change argument type to ptid_t.  Adjust to
14435         per-process data.
14436         (maybe_attach_thread): Adjust to per-process data and ptids.
14437         (thread_db_find_new_threads): Ditto.
14438         (thread_db_init): Ditto.
14439         * spu-low.c (spu_create_inferior, spu_attach): Add process to
14440         processes table.  Adjust to use ptids.
14441         (spu_kill, spu_detach): Adjust interface.  Remove process from
14442         processes table.
14443         (spu_join, spu_thread_alive): Adjust interface.
14444         (spu_wait): Adjust interface.  Remove process from processes
14445         table.  Adjust to use ptids.
14446         * win32-low.c (current_inferior_tid): Delete.
14447         (current_inferior_ptid): New.
14448         (debug_event_ptid): New.
14449         (thread_rec): Take a ptid.  Adjust.
14450         (child_add_thread): Add `pid' argument.  Adjust to use ptids.
14451         (child_delete_thread): Ditto.
14452         (do_initial_child_stuff): Add `attached' argument.  Add process to
14453         processes table.
14454         (child_fetch_inferior_registers, child_store_inferior_registers):
14455         Adjust.
14456         (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14457         (win32_attach): Pass 1 to do_initial_child_stuff.
14458         (win32_kill): Adjust interface.  Remove process from processes
14459         table.
14460         (win32_detach): Ditto.
14461         (win32_join): Adjust interface.
14462         (win32_thread_alive): Take a ptid.
14463         (win32_resume): Adjust to use ptids.
14464         (get_child_debug_event): Ditto.
14465         (win32_wait): Adjust interface.  Remove exiting process from
14466         processes table.
14468 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
14470         Non-stop mode support.
14472         * server.h (non_stop): Declare.
14473         (gdb_client_data, handler_func): Declare.
14474         (delete_file_handler, add_file_handler, start_event_loop):
14475         Declare.
14476         (handle_serial_event, handle_target_event, push_event)
14477         (putpkt_notif): Declare.
14478         * target.h (enum resume_kind): New.
14479         (struct thread_resume): Replace `step' field by `kind' field.
14480         (TARGET_WNOHANG): Define.
14481         (struct target_ops) <wait>: Add `options' argument.
14482         <supports_non_stop, async, start_non_stop>: New fields.
14483         (target_supports_non_stop, target_async): New.
14484         (start_non_stop): Declare.
14485         (mywait): Add `options' argument.
14486         * target.c (mywait): Add `options' argument.  Print child exit
14487         notifications here.
14488         (start_non_stop): New.
14489         * server.c (non_stop, own_buf, mem_buf): New globals.
14490         (struct vstop_notif): New.
14491         (notif_queue): New global.
14492         (queue_stop_reply, push_event, discard_queued_stop_replies)
14493         (send_next_stop_reply): New.
14494         (start_inferior): Adjust to use resume_kind.  Adjust to mywait
14495         interface changes.
14496         (attach_inferior): In non-stop mode, don't wait for the target
14497         here.
14498         (handle_general_set): Handle QNonStop.
14499         (handle_query): When handling qC, return the current general
14500         thread, instead of the first thread of the list.
14501         (handle_query): If the backend supports non-stop mode, include
14502         QNonStop+ in the qSupported query response.
14503         (handle_v_cont): Adjust to use resume_kind.  Handle resume_stop
14504         and non-stop mode.
14505         (handle_v_attach, handle_v_run): Handle non-stop mode.
14506         (handle_v_stopped): New.
14507         (handle_v_requests): Report support for vCont;t.  Handle vStopped.
14508         (myresume): Adjust to use resume_kind.  Handle non-stop.
14509         (queue_stop_reply_callback): New.
14510         (handle_status): Handle non-stop mode.
14511         (main): Clear non_stop flag on reconnection.  Use the event-loop.
14512         Refactor serial protocol handling from here ...
14513         (process_serial_event): ... to this new function.  When GDB
14514         selects any thread, select one here.  In non-stop mode, wait until
14515         GDB acks all pending events before exiting.
14516         (handle_serial_event, handle_target_event): New.
14517         * remote-utils.c (remote_open): Install remote_desc in the event
14518         loop.
14519         (remote_close): Remove remote_desc from the event loop.
14520         (putpkt_binary): Rename to...
14521         (putpkt_binary_1): ... this.  Add `is_notic' argument.  Handle it.
14522         (putpkt_binary): New as wrapper around putpkt_binary_1.
14523         (putpkt_notif): New.
14524         (prepare_resume_reply): In non-stop mode, don't change the
14525         general_thread.
14526         * event-loop.c: New.
14527         * Makefile.in (OBJ): Add event-loop.o.
14528         (event-loop.o): New rule.
14530         * linux-low.h (pid_of): Moved here.
14531         (lwpid_of): New.
14532         (get_lwp_thread): Use lwpid_of.
14533         (struct lwp_info): Delete `lwpid' field.  Add `suspended' field.
14534         * linux-low.c (pid_of): Delete.
14535         (inferior_pid): Use lwpid_of.
14536         (linux_event_pipe): New.
14537         (target_is_async_p): New.
14538         (delete_lwp): New.
14539         (handle_extended_wait): Use lwpid_of.
14540         (add_lwp): Don't set lwpid field.
14541         (linux_attach_lwp): Adjust debug output.  Use lwpid_of.
14542         (linux_kill_one_lwp): If killing a running lwp, stop it first.
14543         Use lwpid_of.  Adjust to linux_wait_for_event interface changes.
14544         (linux_detach_one_lwp): If detaching from a running lwp, stop it
14545         first.  Adjust to linux_wait_for_event interface changes.  Use
14546         lwpid_of.
14547         (linux_detach): Don't delete the main lwp here.
14548         (linux_join): Use my_waitpid.  Avoid signal_pid.  Use lwpid_of.
14549         (status_pending_p): Don't consider explicitly suspended lwps.
14550         (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14551         pointer.  Add OPTIONS argument.  Change return type to int.  Use
14552         my_waitpid instead of sleeping.  Handle WNOHANG.  Use lwpid_of.
14553         (linux_wait_for_event): Take an integer pid instead of a lwp_info
14554         pointer.  Add status pointer argument.  Return a pid instead of a
14555         status.  Use lwpid_of.  Adjust to linux_wait_for_lwp interface
14556         changes.  In non-stop mode, don't switch to a random thread.
14557         (linux_wait): Rename to...
14558         (linux_wait_1): ... this.  Add target_options argument, and handle
14559         it.  Adjust to use resume_kind.  Use lwpid_of.  In non-stop mode,
14560         don't handle the continue thread.  Handle TARGET_WNOHANG.  Merge
14561         clean exit and signal exit code.  Don't stop all threads in
14562         non-stop mode.  In all-stop mode, only stop all threads when
14563         reporting a stop to GDB.  Handle explicit thread stop requests.
14564         (async_file_flush, async_file_mark): New.
14565         (linux_wait): New.
14566         (send_sigstop): Use lwpid_of.
14567         (wait_for_sigstop): Use lwpid_of.  Adjust to linux_wait_for_event
14568         interface changes.  In non-stop mode, don't switch to a random
14569         thread.
14570         (linux_resume_one_lwp): Use lwpid_of.
14571         (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14572         (linux_resume_one_thread): ... this.  Handle resume_stop.  In
14573         non-stop mode, don't look for pending flag in all threads.
14574         (resume_status_pending_p): Don't consider explicitly suspended
14575         threads.
14576         (my_waitpid): Reimplement.  Emulate __WALL.
14577         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14578         Use lwpid_of.
14579         (sigchld_handler, linux_supports_non_stop, linux_async)
14580         (linux_start_non_stop): New.
14581         (linux_target_ops): Register linux_supports_non_stop, linux_async
14582         and linux_start_non_stop.
14583         (initialize_low): Install SIGCHLD handler.
14584         * thread-db.c (thread_db_create_event, find_one_thread)
14585         (thread_db_get_tls_address): Use lwpid_of.
14586         * win32-low.c (win32_detach): Adjust to use resume_kind.
14587         (win32_wait): Add `options' argument.
14588         * spu-low.c (spu_resume): Adjust to use resume_kind.
14589         (spu_wait): Add `options' argument.
14591 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
14593         Decouple target code from remote protocol.
14595         * target.h (enum target_waitkind): New.
14596         (struct target_waitstatus): New.
14597         (struct target_ops) <wait>: Return an unsigned long.  Take a
14598         target_waitstatus pointer instead of a char pointer.
14599         (mywait): Likewise.
14600         * target.c (mywait): Change prototype to return an unsigned long.
14601         Take a target_waitstatus pointer instead of a char pointer.  Adjust.
14602         * server.h (thread_from_wait, old_thread_from_wait): Delete
14603         declarations.
14604         (prepare_resume_reply): Change prototype to take a
14605         target_waitstatus.
14606         * server.c (thread_from_wait, old_thread_from_wait): Delete.
14607         (last_status, last_ptid): New.
14608         (start_inferior): Remove "statusptr" argument.  Adjust.  Return a
14609         pid instead of a signal.
14610         (attach_inferior): Remove "status" and "signal" parameters.
14611         Adjust.
14612         (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14613         not as an address.
14614         (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14615         (handle_v_requests, myresume): Remove "status" and "signal"
14616         parameters.  Adjust.
14617         (handle_status): New.
14618         (main): Delete local `status'.  Adjust.
14619         * remote-utils.c: Include target.h.
14620         (prepare_resume_reply): Change prototype to take a
14621         target_waitstatus.  Adjust.
14623         * linux-low.c (linux_wait): Adjust to new target_ops->wait
14624         interface.
14625         * spu-low.c (spu_wait): Adjust.
14626         * win32-low.c (enum target_waitkind, struct target_waitstatus):
14627         Delete.
14628         (win32_wait): Adjust.
14630 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
14632         * target.h (struct thread_resume): Delete leave_stopped member.
14633         (struct target_ops): Add a `n' argument to the `resume' callback.
14634         * server.c (start_inferior): Adjust.
14635         (handle_v_cont, myresume): Adjust.
14636         * linux-low.c (check_removed_breakpoint): Adjust to resume
14637         interface change, and to removed leave_stopped field.
14638         (resume_ptr): Delete.
14639         (struct thread_resume_array): New.
14640         (linux_set_resume_request): Add new `arg' parameter.  Adjust to
14641         resume interface change.
14642         (linux_continue_one_thread, linux_queue_one_thread)
14643         (resume_status_pending_p): Check if the resume field is NULL
14644         instead of checking the leave_stopped member.
14645         (linux_resume): Adjust to the target resume interface change.
14646         * spu-low.c (spu_resume): Adjust to the target resume interface
14647         change.
14648         * win32-low.c (win32_detach, win32_resume): Ditto.
14650 2009-04-01  Pedro Alves  <pedro@codesourcery.com>
14652         * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14653         flag.
14654         (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14655         pending.
14656         (linux_continue_one_thread): Only preserve the stepping flag if
14657         there's a pending breakpoint.
14659 2009-03-31  Pedro Alves  <pedro@codesourcery.com>
14661         * server.c (main): After the inferior having exited, call
14662         remote_close before exiting gdbserver.
14664 2009-03-25  Thiago Jung Bauermann  <bauerman@br.ibm.com>
14666         Fix size of FPSCR in Power 7 processors.
14667         * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14668         (PPC_FEATURE_HAS_DFP): New #define.
14669         (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14670         size of the FPSCR.
14672 2009-03-23  Pedro Alves  <pedro@codesourcery.com>
14674         * server.c (handle_query) Whitespace and formatting.
14676 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
14678         * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14679         linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14680         linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14681         linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14682         regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14683         thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14684         Makefile.in, configure.ac: Fix whitespace throughout.
14685         * configure: Regenerate.
14687 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
14689         * inferiors.c (find_inferior): Make it safe for the callback
14690         function to delete the currently iterated inferior.
14692 2009-03-22  Pedro Alves  <pedro@codesourcery.com>
14694         * Makefile.in (linuw_low_h): Move higher.
14695         (thread-db.o): Depend on $(linux_low_h).
14697 2009-03-17  Pedro Alves  <pedro@codesourcery.com>
14699         Rename "process" to "lwp" throughout.
14701         * linux-low.c (all_processes): Rename to...
14702         (all_lwps): ... this.
14703         (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14704         (add_process): Rename to ...
14705         (add_lwp): ... this.  Adjust.
14706         (linux_create_inferior): Adjust.
14707         (linux_attach_lwp): Adjust.
14708         (linux_attach): Adjust.
14709         (linux_kill_one_process): Rename to ...
14710         (linux_kill_one_lwp): ... this.  Adjust.
14711         (linux_kill): Adjust.
14712         (linux_detach_one_process): Rename to ...
14713         (linux_detach_one_lwp): ... this.  Adjust.
14714         (linux_detach): Adjust.
14715         (check_removed_breakpoint): Adjust.
14716         (status_pending_p): Adjust.
14717         (linux_wait_for_process): Rename to ...
14718         (linux_wait_for_lwp): ... this.  Adjust.
14719         (linux_wait_for_event): Adjust.
14720         (send_sigstop): Adjust.
14721         (wait_for_sigstop): Adjust.
14722         (stop_all_processes): Rename to ...
14723         (stop_all_lwps): ... this.
14724         (linux_resume_one_process): Rename to ...
14725         (linux_resume_one_lwp): ... this.  Adjust.
14726         (linux_set_resume_request, linux_continue_one_thread)
14727         (linux_queue_one_thread, resume_status_pending_p)
14728         (usr_store_inferior_registers, regsets_store_inferior_registers)
14729         (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14730         Adjust.
14731         * linux-low.h (get_process): Rename to ...
14732         (get_lwp): ... this.  Adjust.
14733         (get_thread_process): Rename to ...
14734         (get_thread_lwp): ... this.  Adjust.
14735         (get_process_thread): Rename to ...
14736         (get_lwp_thread): ... this.  Adjust.
14737         (struct process_info): Rename to ...
14738         (struct lwp_info): ... this.
14739         (all_processes): Rename to ...
14740         (all_lwps): ... this.
14741         * proc-service.c (ps_lgetregs): Adjust.
14742         * thread-db.c (thread_db_create_event, find_one_thread)
14743         (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14745 2009-03-14  Pedro Alves  <pedro@codesourcery.com>
14747         * server.c (handle_query): Handle "qAttached".
14749 2009-03-13  Nathan Sidwell  <nathan@codesourcery.com>
14751         * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14752         GPLv3, update license URL.
14754 2009-03-01  Doug Evans  <dje@google.com>
14756         * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14757         (server_h): Add gdb_signals.h.
14758         (signals.o): Update.
14759         * server.h (target_signal_from_host,target_signal_to_host_p)
14760         (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14762 2009-02-14  Pierre Muller  <muller@ics.u-strasbg.fr>
14764         * remote-utils.c (getpkt): Also generate remote-debug
14765         information if noack_mode is set.
14767 2009-02-06  Pedro Alves  <pedro@codesourcery.com>
14769         * server.c (handle_query): Report qXfer:siginfo:read and
14770         qXfer:siginfo:write as supported and handle them.
14771         * target.h (struct target_ops) <qxfer_siginfo>: New field.
14772         * linux-low.c (linux_xfer_siginfo): New.
14773         (linux_target_ops): Set it.
14775 2009-01-26  Pedro Alves  <pedro@codesourcery.com>
14777         * server.c (gdbserver_usage): Mention --remote-debug.
14778         (main): Accept '--remote-debug' switch.
14780 2009-01-18  Doug Evans  <dje@google.com>
14782         * regcache.c (new_register_cache): No need to check result of xcalloc.
14783         * server.c (handle_search_memory): Back out calls to xmalloc,
14784         result is checked and error is returned to user upon failure.
14785         (handle_query): Ditto.  Add more checks for result of malloc.
14786         (handle_v_cont): Check result of malloc, report error back to
14787         user upon failure.
14788         (handle_v_run): Ditto.  Call freeargv.
14789         * server.h (freeargv): Declare.
14790         * utils.c (freeargv): New fn.
14792 2009-01-15  Doug Evans  <dje@google.com>
14794         * gdbreplay.c (perror_with_name): Make arg const char *.
14795         * server.h (target_signal_to_name): Make return type const char *.
14796         * thread-db.c (thread_db_err_str): Make return type const char *.
14797         * utils.c (perror_with_name): Make arg const char *.
14799 2009-01-14  Pedro Alves  <pedro@codesourcery.com>
14801         * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14802         when handling a EXIT_PROCESS_DEBUG_EVENT.
14804 2009-01-06  Joel Brobecker  <brobecker@adacore.com>
14806         * gdbreplay.c (gdbreplay_version): Update copyright year.
14807         * server.c (gdbserver_version): Likewise.
14809 2009-01-05  Doug Evans  <dje@google.com>
14811         * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14812         (handle_extended_wait): Improve comment.
14814 2008-12-13  Doug Evans  <dje@google.com>
14816         * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14817         * server.h (ATTR_MALLOC): New macro.
14818         (xmalloc,xcalloc,xstrdup): Declare.
14819         * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14820         * inferiors.c: Ditto.
14821         * linux-low.c: Ditto.
14822         * mem-break.c: Ditto.
14823         * regcache.c: Ditto.
14824         * remote-utils.c: Ditto.
14825         * server.c: Ditto.
14826         * target.c: Ditto.
14827         * win32-low.c: Ditto.
14829 2008-12-12  Doug Evans  <dje@google.com>
14831         * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14832         in debugging printf.
14834         * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14836 2008-12-09  Doug Evans  <dje@google.com>
14838         * linux-low.h (struct process_info): Delete member tid, unused.
14839         * thread-db.c (find_one_thread): Update.
14840         (maybe_attach_thread): Update.
14842 2008-12-02  Pedro Alves  <pedro@codesourcery.com>
14844         * target.h (struct target_ops): Add qxfer_osdata member.
14845         * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14846         and dirent.h.
14847         (linux_qxfer_osdata): New functions.
14848         (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14849         callback.
14850         * server.c (handle_query): Handle "qXfer:osdata:read:".
14851         * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14852         (buffer_xml_printf): New functions.
14853         * server.h (struct buffer): New.
14854         (buffer_grow_str, buffer_grow_str0): New macros.
14855         (buffer_grow, buffer_free, buffer_init, buffer_finish)
14856         (buffer_xml_printf): Declare.
14858 2008-11-24  Doug Evans  <dje@google.com>
14860         * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14862 2008-11-24  Daniel Jacobowitz  <dan@codesourcery.com>
14864         * server.c (handle_v_run): Always use the supplied argument list.
14866 2008-11-19  Bob Wilson  <bob.wilson@acm.org>
14868         * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14869         (xtensa_regmap_table): Add entry for scompare1.
14871 2008-11-18  Thiago Jung Bauermann  <bauerman@br.ibm.com>
14873         * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14874         powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14875         powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14876         powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14877         powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14878         powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14879         * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14880         XML target descriptions.
14881         * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14882         when inferior is running on an ISA 2.05 or later processor.  Add
14883         special case to return offset for full 64-bit slot of FPSCR when
14884         in 32-bits.
14886 2008-11-14  Daniel Gutson  <dgutson@codesourcery.com>
14888         * Makefile.in (SFILES, clean): Added sparc64 files.
14889         (reg-sparc64.o, reg-sparc64.c): New.
14890         * configure.srv (sparc*-*-linux*): New configuration.
14891         * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14892         syscall arguments for SPARC.
14893         (regsets_store_inferior_registers): Likewise.
14894         * linux-sparc-low.c: New file.
14896 2008-10-21  Doug Evans  <dje@google.com>
14898         * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14899         (READLINE_DIR,READLINE_DEP): Delete.
14900         (INTERNAL_CFLAGS): Update.
14901         (LINTFLAGS): Update.
14903 2008-10-10  Pedro Alves  <pedro@codesourcery.com>
14905         * server.c (handle_v_run): If GDB didn't specify an argv, use the
14906         whole argv from the last run, not just argv[0].
14908 2008-09-08  Pedro Alves  <pedro@codesourcery.com>
14910         * regcache.c (new_register_cache): Return NULL if the register
14911         cache size isn't known yet.
14912         (free_register_cache): Avoid dereferencing a NULL regcache.
14914 2008-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
14916         * configure.srv: Merge MIPS and MIPS64.
14918 2008-08-24  Maciej W. Rozycki  <macro@linux-mips.org>
14920         * Makefile.in (uninstall): Apply $(EXEEXT) too.
14922 2008-08-18  Luis Machado  <luisgpm@br.ibm.com>
14924         * Makefile.in: Add required vsx dependencies.
14926         * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14927         Declare init_registers_powerpc_vsx32l.
14928         Declare init_registers_powerpc_vsx64l.
14929         Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14930         (ppc_arch_setup): Check for VSX in hwcap.
14931         (ppc_fill_vsxregset): New function.
14932         (ppc_store_vsxregset): New function.
14933         Add new VSX entry in regset_info target_regsets.
14935         * configure.srv: Add new VSX dependencies.
14937 2008-08-12  Pedro Alves  <pedro@codesourcery.com>
14939         * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14940         (remote_open): Set or clear transport_is_reliable.
14941         (putpkt_binary): Don't expect acks in noack mode.
14942         (getpkt): Don't send ack/nac in noack mode.
14943         * server.c (handle_general_set): Handle QStartNoAckMode.
14944         (handle_query): If connected by tcp pass QStartNoAckMode+ in
14945         qSupported.
14946         (main): Reset noack_mode on every connection.
14947         * server.h (noack_mode): Declare.
14949 2008-08-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
14951         * Makefile.in (GDBREPLAY_OBS): New variable.
14952         (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14954 2008-08-05  Ulrich Weigand  <uweigand@de.ibm.com>
14955             Daniel Jacobowitz  <dan@codesourcery.com>
14957         * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14958         (usr_store_inferior_registers): Likewise.
14959         (regsets_store_inferior_registers): Likewise.
14961 2008-07-31  Rolf Jansen  <rj@surtec.com>
14962             Pedro Alves  <pedro@codesourcery.com>
14964         * configure.ac: Check for memmem declaration.
14965         * server.c [HAVE_MALLOC_H]: Include malloc.h.
14966         (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14967         (disable_packet_qfThreadInfo): Unconditionally compile.
14968         * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14969         * configure, config.in: Regenerate.
14971 2008-07-28  Doug Kwan  <dougkwan@google.com>
14973         * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14974         (linux_write_memory): Remove declaration of errno.
14976 2008-07-12  Ulrich Weigand  <uweigand@de.ibm.com>
14978         * linux-low.c (handle_extended_wait): Do not use "status"
14979         variable uninitialized.
14981 2008-07-07  Pedro Alves  <pedro@codesourcery.com>
14983         * server.c (handle_v_attach): Inhibit reporting dll changes.
14985 2008-06-27  Pedro Alves  <pedro@codesourcery.com>
14987         * remote-utils.c (prepare_resume_reply): If requested, don't
14988         output "thread:TID" in the T stop reply.
14990         * server.c (disable_packet_vCont, disable_packet_Tthread)
14991         (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14992         (handle_query): If requested, disable support for qC, qfThreadInfo
14993         and qsThreadInfo.
14994         (handle_v_requests): If requested, disable support for vCont.
14995         (gdbserver_show_disableable): New.
14996         (main): Handle --disable-packet and --disable-packet=LIST.
14998         * server.h (disable_packet_vCont, disable_packet_Tthread)
14999         (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
15001 2008-06-20  Carlos O'Donell  <carlos@codesourcery.com>
15003         * server.c (gdbserver_usage): Mention --version.
15005 2008-06-06  Daniel Jacobowitz  <dan@codesourcery.com>
15007         * Makefile.in (gdbreplay.o): New rule.
15009 2008-06-06  Joseph Myers  <joseph@codesourcery.com>
15011         * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
15012         message, not gdbserver.
15014 2008-06-05  Vladimir Prus  <vladimir@codesourcery.com>
15015             Nathan Sidwell  <nathan@codesourcery.com>
15016             Joseph Myers  <joseph@codesourcery.com>
15018         * acinclude.m4: Include ../../config/acx.m4.
15019         * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
15020         * configure, config.in: Regenerate.
15021         * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
15022         * server.c (gdbserver_version): Print PKGVERSION.
15023         (gdbsrever_usage): Add stream parameter.  Print REPORT_BUGS_TO.
15024         (main): Adjust gdbserver_usage calls.
15025         * gdbreplay.c (version, host_name): Add declarations.
15026         (gdbreplay_version, gdbreplay_usage): New.
15027         (main): Accept --version and --help options.
15029 2008-06-04  Daniel Jacobowitz  <dan@codesourcery.com>
15031         * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
15032         (arm_breakpoint_at): Handle Thumb.
15033         (the_low_target): Add comment.
15035 2008-05-29  Ulrich Weigand  <uweigand@de.ibm.com>
15037         * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
15039 2008-05-09  Doug Evans  <dje@google.com>
15041         * server.h (decode_search_memory_packet): Declare.
15042         * remote-utils.c (decode_search_memory_packet): New fn.
15043         * server.c (handle_search_memory_1): New fn.
15044         (handle_search_memory): New fn.
15045         (handle_query): Process qSearch:memory packets.
15047 2008-05-08  Ulrich Weigand  <uweigand@de.ibm.com>
15049         * regcache.c (registers_length): Remove.
15050         (set_register_cache): Verify that PBUFSIZ is large enough to hold a
15051         full register packet.
15052         * regcache.h (registers_length): Remove prototype.
15053         * server.h (PBUFSIZ): Define to 16384.
15055 2008-05-03  Ulrich Weigand  <uweigand@de.ibm.com>
15057         * configure.srv (powerpc*-*-linux*): Set srv_regobj to
15058         powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
15059         powerpc-64l.o, and powerpc-altivec64l.o.
15060         Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
15061         rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
15062         rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
15063         rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
15064         rs6000/power-linux.xml, and rs6000/power64-linux.xml
15065         to srv_xmlfiles.
15067         * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15068         (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15069         (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15070         (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15071         (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15072         (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15073         (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15074         (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15075         (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15076         (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15077         (clean): Update.
15079         * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15080         (init_registers_powerpc_32l): ... this new prototype.
15081         (init_registers_powerpc_32): Remove, replace by ...
15082         (init_registers_powerpc_altivec32l): ... this new prototype.
15083         (init_registers_powerpc_e500): Remove, replace by ...
15084         (init_registers_powerpc_e500l): ... this new prototype.
15085         (init_registers_ppc64): Remove, replace by ...
15086         (init_registers_powerpc_64l): ... this new prototype.
15087         (init_registers_powerpc_64): Remove, replace by ...
15088         (init_registers_powerpc_altivec64l): ... this new prototype.
15089         (ppc_num_regs): Set to 73.
15090         (PT_ORIG_R3, PT_TRAP): Define if necessary.
15091         (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15092         (ppc_cannot_store_register): Handle orig_r3 and trap.
15093         (ppc_arch_setup): Update init_registers_... calls.
15094         (ppc_fill_gregset): Handle orig_r3 and trap.
15096         * inferiors.c (clear_inferiors): Reset current_inferior.
15098 2008-04-23  Paolo Bonzini  <bonzini@gnu.org>
15100         * acinclude.m4: Add override.m4.
15101         * configure: Regenerate.
15103 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
15105         * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15106         initial call to init_register_ppc64.
15108 2008-04-21  Ulrich Weigand  <uweigand@de.ibm.com>
15110         * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15111         single powerpc*-*-linux* case.
15112         (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15114 2008-04-17  Ulrich Weigand  <uweigand@de.ibm.com>
15116         * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15117         srv_regobj.  Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15118         from reg_xmlfiles.
15119         * linux-ppc-low.c: Include <elf.h>.
15120         (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15121         (ppc_hwcap): New global variable.
15122         (ppc_regmap): Remove __SPE__ #ifdef sections.
15123         (ppc_regmap_e500): New global variable.
15124         (ppc_cannot_store_register): Update __SPE__ special case.
15125         (ppc_get_hwcap): New function.
15126         (ppc_arch_setup): Use it to determine whether inferior supports
15127         AltiVec or SPE registers.  Set the_low_target.regmap if appropriate.
15128         (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15129         Do not access registers if target does not support AltiVec.
15130         (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15131         Do not access registers if target does not support SPE.
15132         (target_regsets): Unconditionally include AltiVec and SPE regsets.
15134 2008-04-17  Daniel Jacobowitz  <dan@codesourcery.com>
15136         * linux-low.c (disabled_regsets, num_regsets): New.
15137         (use_regsets_p): Delete.
15138         (linux_wait_for_process): Clear disabled_regsets.
15139         (regsets_fetch_inferior_registers): Check and set it.
15140         (regsets_store_inferior_registers): Likewise.
15141         (linux_fetch_registers, linux_store_registers): Do not use
15142         use_regsets_p.
15143         (initialize_low): Allocate disabled_regsets.
15145 2008-04-14  Daniel Jacobowitz  <dan@codesourcery.com>
15147         * Makefile.in (LIBOBJS): New.
15148         (OBS): Use LIBOBJS.
15149         (memmem.o): New rule.
15150         * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15151         * configure: Regenerated.
15153 2008-04-04  Ulrich Weigand  <uweigand@de.ibm.com>
15155         * server.c (handle_query): Never return "unsupported" for
15156         qXfer:features:read queries.
15158 2008-03-27  Ulrich Weigand  <uweigand@de.ibm.com>
15160         * server.c (get_features_xml): Fix inverted condition.
15161         (handle_query): Always support qXfer:feature:read.
15163 2008-03-10  Daniel Jacobowitz  <dan@codesourcery.com>
15165         * server.c (wrapper_argv): New.
15166         (start_inferior): Handle wrapper_argv.  If set, expect an extra
15167         trap.
15168         (gdbserver_usage): Document --wrapper.
15169         (main): Parse --wrapper.
15171 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
15173         * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15174         powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15175         * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15176         (ppc_set_pc): Likewise.
15177         (ppc_arch_setup): New function.
15178         (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15179         of collect_register.
15180         (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15182 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
15184         * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15185         instead of linux-ppc64-low.o.
15186         * linux-ppc64-low.c: Remove file.
15187         * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15188         (linux-ppc64-low.o): Remove rule.
15190         * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15191         (init_registers_powerpc_64): Likewise.
15192         (ppc_regmap): Conditionally define depending on __powerpc64__.
15193         (ppc_cannot_store_register): Do not special-case "fpscr" when
15194         compiled on __powerpc64__.
15195         (ppc_collect_ptrace_register): New function.
15196         (ppc_supply_ptrace_register): New function.
15197         (ppc_breakpoint): Change type to "unsigned int".
15198         (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15199         (the_low_target): Conditionally provide initializers for the
15200         arch_setup member depending on __powerpc64__.  Install
15201         collect_ptrace_register and supply_ptrace_register members.
15203 2008-02-28  Ulrich Weigand  <uweigand@de.ibm.com>
15205         * regcache.h (gdbserver_xmltarget): Add extern declaration.
15206         * server.c (gdbserver_xmltarget): Define.
15207         (get_features_xml): Use it to replace "target.xml" and arch_string.
15209         * configure.srv: Remove srv_xmltarget.  Add XML files that were
15210         mentioned there to srv_xmlfiles instead.  Remove conditional tests
15211         on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15212         srv_xmlfiles and srv_regobj to include all possible choices.
15213         * configure.ac (srv_xmltarget): Remove.
15214         (srv_xmlfiles): Do not add "target.xml".
15215         (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15216         checks for supplementary target information.
15217         * configure: Regenerate.
15218         * Makefile.in (XML_TARGET): Remove.
15219         (target.xml): Remove rule.
15220         (clean): Do not clean up target.xml.
15221         (.PRECIOUS): Do not mention target.xml.
15223         * target.h (struct target_ops): Remove arch_string member.
15224         * linux-low.c (linux_arch_string): Remove.
15225         (linux_target_ops): Remove arch_string initializer.
15226         * linux-low.h (struct linux_target_ops): Remove arch_string member.
15227         * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15228         * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15229         * spu-low.c (spu_arch_string): Remove.
15230         (spu_target_ops): Remove arch_string initializer.
15231         * win32-low.c (win32_arch_string): Remove.
15232         (win32_target_ops): Remove arch_string initializer.
15233         * win32-low.h (struct win32_target_ops): Remove arch_string member.
15234         * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15235         * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15237 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
15239         * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15240         by collect_ptrace_register and supply_ptrace_register hooks.
15241         * linux-low.c (fetch_register): Use supply_ptrace_register callback
15242         instead of checking for the_low_target.left_pad_xfer.
15243         (usr_store_inferior_registers): Use collect_ptrace_register callback
15244         instead of checking for the_low_target.left_pad_xfer.
15246         * linux-s390-low.c (s390_collect_ptrace_register): New function.
15247         (s390_supply_ptrace_register): Likewise.
15248         (s390_fill_gregset): Call s390_collect_ptrace_register.
15249         (the_low_target): Update.
15251         * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15252         (ppc_supply_ptrace_register): Likewise.
15253         (the_low_target): Update.
15255         * linux-i386-low.c (the_low_target): Update.
15256         * linux-x86-64-low.c (the_low_target): Update.
15258 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
15260         * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15261         reg-s390.o and reg-s390x.o.
15263         * linux-low.c (new_inferior): New global variable.
15264         (linux_create_inferior, linux_attach): Set it.
15265         (linux_wait_for_process): Call the_low_target.arch_setup after the
15266         target has stopped for the first time.
15267         (initialize_low): Do not call the_low_target.arch_setup.
15269         * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15270         (s390_set_pc): Likewise.
15271         (s390_arch_setup): New function.
15272         (the_low_target): Use s390_arch_setup as arch_setup routine.
15274         * regcache.c (realloc_register_cache): New function.
15275         (set_register_cache): Call it for each existing regcache.
15277 2008-02-27  Ulrich Weigand  <uweigand@de.ibm.com>
15279         * server.h (init_registers): Remove prototype.
15281         * linux-low.h (struct linux_target_ops): Add arch_setup field.
15282         * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15283         instead of init_registers ().
15284         * linux-arm-low.c (init_registers_arm): Add prototype.
15285         (init_registers_arm_with_iwmmxt): Likewise.
15286         (the_low_target): Add initializer for arch_setup field.
15287         * linux-cris-low.c (init_registers_cris): Add prototype.
15288         (the_low_target): Add initializer for arch_setup field.
15289         * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15290         (the_low_target): Add initializer for arch_setup field.
15291         * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15292         (the_low_target): Add initializer for arch_setup field.
15293         * linux-ia64-low.c (init_registers_ia64): Add prototype.
15294         (the_low_target): Add initializer for arch_setup field.
15295         * linux-m32r-low.c (init_registers_m32r): Add prototype.
15296         (the_low_target): Add initializer for arch_setup field.
15297         * linux-m68k-low.c (init_registers_m68k): Add prototype.
15298         (the_low_target): Add initializer for arch_setup field.
15299         * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15300         (init_registers_mips64_linux): Likewise.
15301         (the_low_target): Add initializer for arch_setup field.
15302         * linux-ppc-low.c (init_registers_ppc): Add prototype.
15303         (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15304         (the_low_target): Add initializer for arch_setup field.
15305         * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15306         (init_registers_powerpc_64): Likewise.
15307         (the_low_target): Add initializer for arch_setup field.
15308         * linux-s390-low.c (init_registers_s390): Add prototype.
15309         (init_registers_s390x): Likewise.
15310         (the_low_target): Add initializer for arch_setup field.
15311         * linux-sh-low.c (init_registers_sh): Add prototype.
15312         (the_low_target): Add initializer for arch_setup field.
15313         * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15314         (the_low_target): Add initializer for arch_setup field.
15315         * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15316         (the_low_target): Add initializer for arch_setup field.
15318         * win32-low.h (struct win32_target_ops): Add arch_setup field.
15319         * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15320         instead of init_registers ().
15321         * win32-arm-low.c (init_registers_arm): Add prototype.
15322         (the_low_target): Add initializer for arch_setup field.
15323         * win32-i386-low.c (init_registers_i386): Add prototype.
15324         (the_low_target): Add initializer for arch_setup field.
15326         * spu-low.c (init_registers_spu): Add prototype.
15327         (initialize_low): Call initialie_registers_spu () instead of
15328         initialize_registers ().
15330 2008-02-19  Pedro Alves  <pedro@codesourcery.com>
15332         * server.c (handle_v_requests): When handling the vRun and vAttach
15333         packets, if already debugging a process, don't kill it.  Return an
15334         error instead.
15336 2008-02-17  Daniel Jacobowitz  <dan@codesourcery.com>
15338         * server.c (handle_query): Correct length check.
15340 2008-02-14  Pedro Alves  <pedro_alves@portugalmail.pt>
15342         * win32-low.c (do_initial_child_stuff): Add process handle
15343         parameter.  Set current_process_handle and current_process_id from the
15344         parameters. Clear globals.
15345         (win32_create_inferior): Don't set current_process_handle and
15346         current_process_id here.  Instead pass them on the call to
15347         do_initial_child_stuff.
15348         (win32_attach): Likewise.
15349         (win32_clear_inferiors): New.
15350         (win32_kill): Don't close the current process handle or the
15351         current thread handle here.  Instead call win32_clear_inferiors.
15352         (win32_detach): Don't open a new handle to the process.  Call
15353         win32_clear_inferiors.
15354         (win32_join): Don't rely on current_process_handle; open a new
15355         handle using the process id.
15356         (win32_wait): Call win32_clear_inferiors when the inferior process
15357         has exited.
15359 2008-02-14  Daniel Jacobowitz  <dan@codesourcery.com>
15361         * server.c (monitor_show_help): Add "exit".
15363 2008-02-11  Maxim Grigoriev  <maxim2405@gmail.com>
15365         * Makefile.in (SFILES): Add linux-xtensa-low.c.
15366         (clean): Add reg-xtensa.c.
15367         (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15368         * configure.srv (xtensa*-*-linux*) New target.
15369         * linux-xtensa-low.c: New.
15370         * xtensa-xtregs.c: New.
15372 2008-02-01  Pedro Alves  <pedro_alves@portugalmail.pt>
15374         * hostio.c: Don't include errno.h.
15375         (errno_to_fileio_errno): Move to hostio-errno.
15376         * hostio.c: (hostio_error): Remove the error parameter.  Defer the
15377         error number outputting to the target->hostio_last_error callback.
15378         (hostio_packet_error): Use FILEIO_EINVAL directly.
15379         (handle_open, handle_pread, hostio_error, handle_unlink): Update
15380         calls to hostio_error.
15381         * hostio-errno.c: New.
15382         * server.h (hostio_last_error_from_errno): Declare.
15383         * target.h (target_ops): Add hostio_last_error member.
15384         * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15385         as hostio_last_error handler.
15386         * spu-low.c (spu_target_ops): Likewise.
15387         * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15388         (wince_hostio_last_error): New functions.
15389         (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15390         as hostio_last_error handler.
15391         (win32_target_ops) [!_WIN32_WCE]: Register
15392         hostio_last_error_from_errno as hostio_last_error handler.
15393         * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15394         (hostio-errno.o): New rule.
15395         * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15396         * configure.srv (srv_hostio_err_objs): New variable.  Default to
15397         hostio-errno.o.
15398         (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15399         * configure: Regenerate.
15401 2008-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
15403         * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15404         (linux_kill, linux_detach): Clean up the process list.
15405         * remote-utils.c (remote_open): Improve port number parsing.
15406         (putpkt_binary, input_interrupt): Only send interrupts if the target
15407         is running.
15408         * server.c (extended_protocol): Make static.
15409         (attached): Define earlier.
15410         (exit_requested, response_needed, program_argv): New variables.
15411         (target_running): New.
15412         (start_inferior): Clear attached here.
15413         (attach_inferior): Set attached here.
15414         (require_running): Define.
15415         (handle_query): Use require_running and target_running.  Implement
15416         "monitor exit".
15417         (handle_v_attach, handle_v_run): New.
15418         (handle_v_requests): Use require_running.  Handle vAttach and vRun.
15419         (gdbserver_usage): Update.
15420         (main): Redo argument parsing.  Handle --debug and --multi.  Handle
15421         --attach along with other options or after the port.  Save
15422         program_argv.  Support no initial program.  Resynchronize
15423         communication with GDB after an error.  Handle "monitor exit".
15424         Use require_running and target_running.  Always allow the extended
15425         protocol.  Do not error out for Hc0 or Hc-1.  Do not automatically
15426         restart in extended mode.
15427         * README: Refer to the GDB manual.  Update --attach usage.
15429 2007-12-20  Andreas Schwab  <schwab@suse.de>
15431         * linux-low.c (STACK_SIZE): Define.
15432         (linux_tracefork_child): Use it.  Use __clone2 on ia64.
15433         (linux_test_for_tracefork): Likewise.
15435 2007-12-18  Daniel Jacobowitz  <dan@codesourcery.com>
15437         * linux-low.c (linux_wait_for_event): Update messages.  Do not
15438         reinsert auto-delete breakpoints.
15439         * mem-break.c (struct breakpoint): Change return type of handler to
15440         int.
15441         (set_breakpoint_at): Update handler type.
15442         (reinsert_breakpoint_handler): Return 1 instead of calling
15443         delete_breakpoint.
15444         (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15445         setting a new one.
15446         (check_breakpoints): Delete auto-delete breakpoints and return 2.
15447         * mem-break.h (set_breakpoint_at): Update handler type.
15448         * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15449         * win32-low.c (auto_delete_breakpoint): New.
15450         (get_child_debug_event): Use it.
15452 2007-12-16  Daniel Jacobowitz  <dan@codesourcery.com>
15454         * configure.ac: Check for pread and pwrite.
15455         * hostio.c (handle_pread): Fall back to lseek and read.
15456         (handle_pwrite): Fall back to lseek and write.
15457         * config.in, configure: Regenerated.
15459 2007-12-07  Daniel Jacobowitz  <dan@codesourcery.com>
15461         * server.c (myresume): Add own_buf argument.
15462         (main): Update calls.
15464 2007-12-06  Daniel Jacobowitz  <dan@codesourcery.com>
15466         * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15467         * remote-utils.c (remote_open): Do not call disable_async_io.
15468         (block_async_io): Delete.
15469         (unblock_async_io): Make static.
15470         (initialize_async_io): New.
15471         * server.c (handle_v_cont): Handle async I/O here.
15472         (myresume): Likewise.  Move other common resume tasks here...
15473         (main): ... from here.  Call initialize_async_io.  Disable async
15474         I/O before the main loop.
15475         * server.h (initialize_async_io): Declare.
15476         (block_async_io, unblock_async_io): Delete prototypes.
15477         * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15479 2007-12-06  Mick Davis  <mickd@goanna.iinet.net.au>
15481         * remote-utils.c (readchar): Allow binary data in received messages.
15483 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
15485         * win32-low.c (attaching): New global.
15486         (win32_create_inferior): Clear the `attaching' global.
15487         (win32_attach): Set the `attaching' global.
15488         (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15489         attaching.  Only set a breakpoint at the entry point if not
15490         attaching.
15492 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
15494         * server.c (main): Don't report dll events on the initial
15495         connection on attaches.
15497 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
15499         * server.c (main): Relax numerical bases supported for the pid of
15500         the --attach command line argument.
15502 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
15504         * win32-low.c (win32_attach): Call OpenProcess before
15505         DebugActiveProcess, not after.  Add last error output to error
15506         call.
15508 2007-12-03  Pedro Alves  <pedro_alves@portugalmail.pt>
15510         * win32-low.c (win32_get_thread_context)
15511         (win32_set_thread_context): New functions.
15512         (thread_rec): Use win32_get_thread_context.
15513         (continue_one_thread, win32_resume): Use win32_set_thread_context.
15514         * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15515         field.
15517 2007-12-03  Leo Zayas
15518             Pedro Alves  <pedro_alves@portugalmail.pt>
15520         * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15521         global variables.
15522         (child_add_thread): Minor cleanup.
15523         (child_continue): Resume artificially suspended threads before
15524         calling ContinueDebugEvent.
15525         (suspend_one_thread): New.
15526         (fake_breakpoint_event): New.
15527         (get_child_debug_event): Change return type to int.  Check here if
15528         gdb sent an interrupt request.  If a soft interrupt was requested,
15529         fake a breakpoint event.  Return 0 if there is no event to handle,
15530         and 1 otherwise.
15531         (win32_wait): Don't check here if gdb sent an interrupt request.
15532         Ensure there is a valid event to handle.
15533         (win32_request_interrupt): Add soft interruption method as last
15534         resort.
15536 2007-12-03  Leo Zayas
15537             Pedro Alves  <pedro_alves@portugalmail.pt>
15539         * win32-low.h (win32_thread_info): Add descriptions to the
15540         structure members.  Replace `suspend_count' counter by a
15541         `suspended' flag.
15542         * win32-low.c (thread_rec): Update condition of when to get the
15543         context from the inferior.  Rely on ContextFlags being set if it
15544         has already been retrieved.  Only suspend the inferior thread if
15545         we haven't already.  Warn if that fails.
15546         (continue_one_thread): s/suspend_count/suspended/.  Only call
15547         ResumeThread once.  Warn if that fails.
15549 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
15551         * win32-low.c (win32_wait): Don't read from the inferior when it
15552         has already exited.
15554 2007-12-02  Pedro Alves  <pedro_alves@portugalmail.pt>
15556         * Makefile.in (win32_low_h): New variable.
15557         (win32-low.o): Add dependency on $(win32_low_h).
15558         (win32-arm-low.o, win32-i386-low.o): New rules.
15560 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
15562         * hostio.c: Correct copyright year.
15564 2007-11-30  Daniel Jacobowitz  <dan@codesourcery.com>
15566         * Makefile.in (OBS): Add hostio.o.
15567         (hostio.o): New rule.
15568         * server.h (handle_vFile): Declare.
15569         * hostio.c: New file.
15570         * server.c (handle_v_requests): Take packet_len and new_packet_len
15571         for binary packets.  Call handle_vFile.
15572         (main): Update call to handle_v_requests.
15574 2007-11-05  Daniel Jacobowitz  <dan@codesourcery.com>
15576         * linux-low.c: Include <sched.h>.
15578 2007-11-01  Daniel Jacobowitz  <dan@codesourcery.com>
15580         * linux-low.c (linux_tracefork_grandchild): New.
15581         (linux_tracefork_child): Use clone.
15582         (linux_test_for_tracefork): Use clone; allocate and free a stack.
15584 2007-10-31  Joel Brobecker  <brobecker@adacore.com>
15586         * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15588 2007-10-24  Daniel Jacobowitz  <dan@codesourcery.com>
15590         * linux-low.c (handle_extended_wait): Handle unexpected signals.
15592 2007-10-23  Daniel Jacobowitz  <dan@codesourcery.com>
15594         * inferiors.c (change_inferior_id): Delete.
15595         (add_pid_to_list, pull_pid_from_list): New.
15596         * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15597         (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15598         (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15599         (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15600         (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15601         (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15602         (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15603         (using_threads): Always set to 1.
15604         (handle_extended_wait): New.
15605         (add_process): Do not set TID.
15606         (linux_create_inferior): Set must_set_ptrace_flags.
15607         (linux_attach_lwp): Remove TID argument.  Do not check using_threads.
15608         Use PTRACE_SETOPTIONS.  Call new_thread_notify.  Update all callers.
15609         (linux_thread_alive): Rename TID argument to LWPID.
15610         (linux_wait_for_process): Handle unknown processes.  Do not use TID.
15611         (linux_wait_for_event): Do not use TID or check using_threads.  Update
15612         call to dead_thread_notify.  Call handle_extended_wait.
15613         (linux_create_inferior): Use PTRACE_SETOPTIONS.
15614         (send_sigstop): Delete sigstop_sent.
15615         (wait_for_sigstop): Avoid TID.
15616         (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15617         (linux_test_for_tracefork): New.
15618         (linux_lookup_signals): Use thread_db_active and
15619         linux_supports_tracefork_flag.
15620         (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15621         * linux-low.h (get_process_thread): Avoid TID.
15622         (struct process_ifo): Move thread_known and tid to the end.  Remove
15623         sigstop_sent.
15624         (linux_attach_lwp, thread_db_init): Update prototypes.
15625         * server.h (change_inferior_id): Delete prototype.
15626         (add_pid_to_list, pull_pid_from_list): New prototypes.
15627         * thread-db.c (thread_db_use_events): New.
15628         (find_first_thread): Rename to...
15629         (find_one_thread): ...this.  Update callers and messages.  Do not
15630         call fatal.  Check thread_db_use_events.  Do not call
15631         change_inferior_id or new_thread_notify.
15632         (maybe_attach_thread): Update.  Do not call new_thread_notify.
15633         (thread_db_init): Set thread_db_use_events.  Check use_events.
15634         * utils.c (fatal, warning): Correct message prefix.
15636 2007-10-15  Daniel Jacobowitz  <dan@codesourcery.com>
15638         * Makefile.in (clean): Remove new files.
15639         (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15640         (powerpc-64.o, powerpc-64.c): New rules.
15641         * configure.srv: Use alternate register sets for powerpc64-*-linux*
15642         with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15643         with SPE.
15644         * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15645         SPE targets.
15646         (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15647         (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15648         (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15649         (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15650         (target_regsets): Add AltiVec and SPE register sets.
15651         * configure.ac: Check for AltiVec and SPE.
15652         * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15653         (ppc_fill_vrregset, ppc_store_vrregset): New.
15654         (target_regsets): Add AltiVec register set.
15655         * configure: Regenerated.
15657 2007-09-19  Daniel Jacobowitz  <dan@codesourcery.com>
15659         * linux-low.c (O_LARGEFILE): Define.
15660         (linux_read_memory): Use /proc/PID/mem.
15661         * configure.ac: Use AC_GNU_SOURCE.  Check for pread64.
15662         * configure, config.in: Regenerated.
15664 2007-09-04  Daniel Jacobowitz  <dan@codesourcery.com>
15666         * linux-low.c (linux_wait_for_event): Do not pass signals while
15667         single-stepping.
15669 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
15671         * win32-low.c (create_process): New.
15672         (win32_create_inferior): Use create_process instead of
15673         CreateProcess.  If create_process failed retry appending an ".exe"
15674         suffix.  Store the GetLastError result immediatelly after
15675         create_process calls and use it on the call to error.
15677 2007-09-03  Pedro Alves  <pedro_alves@portugalmail.pt>
15679         * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15681 2007-08-23  Joel Brobecker  <brobecker@adacore.com>
15683         * configure.ac: Switch license to GPLv3.
15685 2007-08-01  Michael Snyder  <msnyder@access-company.com>
15687         * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15689 2007-07-31  Pedro Alves  <pedro_alves@portugalmail.pt>
15691         * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15692         typedef.
15693         (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15694         (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL.  Get
15695         CloseToolhelp32Snapshot.
15696         (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15697         CloseToolhelp32Snapshot.
15699 2007-07-27  Michael Snyder  <michael.snyder@access-company.com>
15701         * server.c (main): Check for inferior exit before main loop.
15703 2007-07-18  Pedro Alves  <pedro_alves@portugalmail.pt>
15705         * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15706         instead of on tmp_desc.
15708 2007-07-17  Pedro Alves  <pedro_alves@portugalmail.pt>
15709             Daniel Jacobowitz  <dan@codesourcery.com>
15711         * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15712         (add_thread): Minor cleanups.
15713         (clear_inferiors): Move lower in the file.  Clear the DLL
15714         list.
15715         (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15716         * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15717         (xml_escape_text): New.
15718         * server.c (handle_query): Handle qXfer:libraries:read.  Report it
15719         for qSupported.
15720         (handle_v_cont): Report errors.
15721         (gdbserver_version): Update.
15722         (main): Correct size of own_buf.  Do not report initial DLL events.
15723         * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15724         (unloaded_dll, xml_escape_text): New.
15725         * win32-low.c (enum target_waitkind): Update comments.
15726         (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15727         (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15728         (win32_EnumProcessModules, win32_GetModuleInformation)
15729         (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15730         (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15731         (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15732         (win32_Module32First, win32_Module32Next, load_toolhelp)
15733         (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15734         (get_child_debug_event): Handle DLL events.
15735         (win32_wait): Likewise.
15737 2007-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
15739         * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15740         * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15742 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
15744         * win32-low.c (handle_output_debug_string): Ignore event if not
15745         waiting.
15747 2007-07-08  Pedro Alves  <pedro_alves@portugalmail.pt>
15749         * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15751 2007-07-03  Daniel Jacobowitz  <dan@codesourcery.com>
15753         * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15755 2007-07-02  Daniel Jacobowitz  <dan@codesourcery.com>
15757         * inferiors.c (change_inferior_id): Add comment.
15758         * linux-low.c (check_removed_breakpoint): Add an early
15759         prototype.  Improve debug output.
15760         (linux_attach): Doc update.
15761         (linux_detach_one_process, linux_detach): Clean up before releasing
15762         each process.
15763         (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15764         * linux-low.h (struct process_info): Doc improvement.
15765         * mem-break.c (delete_all_breakpoints): New.
15766         * mem-break.h (delete_all_breakpoints): New prototype.
15767         * thread-db.c (find_first_thread): New.
15768         (thread_db_create_event): Call it instead of
15769         thread_db_find_new_threads.  Clean up unused variables.
15770         (maybe_attach_thread): Remove first thread handling.
15771         (thread_db_find_new_threads): Use find_first_thread.
15772         (thread_db_get_tls_address): Likewise.
15774 2007-06-27  Daniel Jacobowitz  <dan@codesourcery.com>
15776         * thread-db.c (thread_db_find_new_threads): Add prototype.
15777         (thread_db_create_event): Check for the main thread before adding
15778         a new thread.
15779         (maybe_attach_thread): Only enable event reporting if TID == 0.
15780         (thread_db_get_tls_address): Check for new threads.
15782 2007-06-20  Daniel Jacobowitz  <dan@codesourcery.com>
15784         * linux-low.c (linux_create_inferior): Try execv before execvp.
15785         * spu-low.c (spu_create_inferior): Likewise.
15787 2007-06-13  Mike Frysinger  <vapier@gentoo.org>
15789         * linux-low.c (linux_create_inferior): Change execv to execvp.
15790         * spu-low.c (spu_create_inferior): Likewies.
15792 2007-06-13  Daniel Jacobowitz  <dan@codesourcery.com>
15794         * Makefile.in (clean): Clean new files instead of deleted ones.
15795         (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15796         (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15797         rules.
15798         * configure.srv: Specify XML files and new regformats for MIPS and
15799         MIPS64 GNU/Linux.
15800         * linux-mips-low.c (mips_num_regs): Set to only used registers.
15801         (mips_regmap): Do not fetch $0.  Remove unused registers.  Add
15802         an entry for the restart register.
15803         (mips_cannot_fetch_register, mips_cannot_store_register)
15804         (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15805         register names to match the XML descriptions.
15806         (mips_fill_gregset, mips_store_gregset): Likewise.  Handle the
15807         restart register instead of $0.
15809 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
15810             Markus Deuling  <deuling@de.ibm.com>
15812         * remote-utils.c (decode_xfer_write): New function.
15813         * server.h (decode_xfer_write): Add prototype.
15814         * server.c (handle_query): Add PACKET_LEN argument.  Support
15815         qXfer:spu:read and qXfer:spu:write packets.
15816         (main): Pass packet_len to handle_query.
15817         * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15818         * target.h (target_ops): Add qxfer_spu.
15820 2007-06-12  Ulrich Weigand  <uweigand@de.ibm.com>
15822         * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15823         accessing non-seekable spufs files.
15825 2007-05-16  Markus Deuling  <deuling@de.ibm.com>
15827         * server.c (handle_query): Add reply for qC packet.
15829 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
15830             Leo Zayas  <lerele@champenstudios@com>
15832         * server.h (check_remote_input_interrupt_request): New function.
15833         * remote_utils.c (INVALID_DESCRIPTOR): New define.
15834         (remote_desc): Initialize with INVALID_DESCRIPTOR.
15835         (input_interrupt): Expose on USE_WIN32API too.  Fix whitespace.
15836         (check_remote_input_interrupt_request): New function.
15837         * server.h (check_remote_input_interrupt_request): Declare.
15838         * win32-low.c (winapi_DebugBreakProcess,
15839         winapi_GenerateConsoleCtrlEvent): New typedefs.
15840         (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15841         to 250 ms.
15842         (win32_wait): Check for remote interrupt request
15843         with check_remote_input_interrupt_request.
15844         (win32_request_interrupt): New function.
15845         (win32_target_op): Set request_interrupt to win32_request_interrupt.
15847 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
15849         * win32-low.c (debug_registers_changed,
15850         debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15851         CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15852         CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15853         (thread_rec): Get context using the low target.
15854         (child_add_thread): Call thread_added on the low target,
15855         which does the same thing.
15856         (regptr): Delete.
15857         (do_initial_child_stuff): Remove debug registers references.
15858         Set context using the low target.  Resume threads after
15859         setting the contexts.
15860         (child_continue): Remove dead variable.  Remove debug
15861         registers references.
15862         (child_fetch_inferior_registers): Go through the low target.
15863         (do_child_store_inferior_registers): Remove.
15864         (child_store_inferior_registers): Go through the low target.
15865         (win32_resume): Remove debug registers references.
15866         Set context using the low target.
15867         (handle_exception): Change return type to void.  Don't record
15868         context here.  Set status to TARGET_WAITKIND_SPURIOUS on a
15869         first chance exception.
15870         (get_child_debug_event): Change return type to void.  Remove
15871         goto loop.  Always return after waiting for debug event.
15872         (win32_wait): Convert to switch statement.  Handle spurious
15873         events.
15875         * win32-i386-low.c (debug_registers_changed,
15876         debug_registers_used): New.
15877         (initial_stuff): Rename to ...
15878         (i386_initial_stuff): ... this.  Clear debug registers
15879         state variables.
15880         (store_debug_registers): Delete.
15881         (i386_get_thread_context): New.
15882         (load_debug_registers): Delete.
15883         (i386_set_thread_context): New.
15884         (i386_thread_added): New.
15885         (single_step): Rename to ...
15886         (i386_single_step): ... this.
15887         (do_fetch_inferior_registers): Rename to ...
15888         (i386_fetch_inferior_register): ... this.
15889         (i386_store_inferior_register): New.
15890         (the_low_target): Adapt to new interface.
15892         * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15893         (arm_get_thread_context): New.
15894         (arm_set_thread_context): New.
15895         (regptr): New.
15896         (do_fetch_inferior_registers): Rename to ...
15897         (arm_fetch_inferior_register): ... this.
15898         (arm_store_inferior_register): New.
15899         (arm_wince_breakpoint): Reimplement as unsigned long.
15900         (arm_wince_breakpoint_len): Define.
15901         (the_low_target): Adapt to new interface.
15903         * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15904         load_debug_registers.  Add get_thread_context, set_thread_context,
15905         thread_added and store_inferior_register.  Rename
15906         fetch_inferior_registers to fetch_inferior_register.
15907         (regptr): Remove declaration.
15909 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
15911         * linux-low.c (linux_detach): Change return type to int.  Return 0.
15912         * spu-low.c (spu_detach): Likewise.
15914 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
15916         * target.h (target_ops): Change return type of detach to int.
15917         Add join.
15918         (join_inferior): New.
15919         * server.c (main): Don't skip detach support on mingw32.
15920         If the inferior doesn't support detaching return error.
15921         Call join_inferior instead of using waitpid.
15922         * linux-low.c (linux_join): New.
15923         (linux_target_op): Add linux_join.
15924         * spu-low.c (spu_join): New.
15925         (spu_target_ops): Add spu_join.
15926         * win32-low.c (win32_detach): Adapt to new interface.
15927         Reopen current_process_handle before detaching.  Issue a child
15928         resume before detaching.
15929         (win32_join): New.
15930         (win32_target_op): Add win32_join.
15932 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
15934         * win32-low.c (win32-attach): Fix return value.
15935         * target.h (target_ops): Describe ATTACH return values.
15937 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
15939         * win32-low.c (GETPROCADDRESS): Define.
15940         (winapi_DebugActiveProcessStop): Add WINAPI.  typedef as pointer.
15941         (winapi_DebugSetProcessKillOnExit): Likewise.
15942         (win32_create_inferior): Force usage of ansi CreateProcessA.
15943         (win32_attach): Use GETPROCADDRESS.
15944         (win32_detach): Likewise.
15946 2007-05-10  Pedro Alves  <pedro_alves@portugalmail.pt>
15948         * win32-low.c (win32_wait): Don't use WSTOPSIG.
15950 2007-03-30  Pedro Alves  <pedro_alves@portugalmail.pt>
15952         * win32-low.c: Commit leftover changes from 2007-03-29.
15954 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
15956         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15957         fields short instead of int.  Add explicit padding.
15958         (i387_cache_to_fsave): Remove unnecessary casts.
15959         (i387_fsave_to_cache): Doc fix.
15960         (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15962 2007-03-30  Daniel Jacobowitz  <dan@codesourcery.com>
15964         * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15965         (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15967 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
15969         * configure.srv (arm*-*-mingw32ce*): Move near the other
15970         arm targets.
15972 2007-03-29  Pedro Alves  <pedro_alves@portugalmail.pt>
15974         * configure.ac: Add errno checking.
15975         (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15976         sys/file.h and malloc.h.
15977         (AC_CHECK_DECLS): Add perror.
15978         (srv_mingwce): Handle.
15979         * configure.srv (i[34567]86-*-cygwin*): Add
15980         win32-i386-low.o to srv_tgtobj.
15981         (i[34567]86-*-mingw*): Likewise.
15982         (arm*-*-mingw32ce*): Add case.
15983         * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15984         HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15985         [__MINGW32CE__] (strerror): New function.
15986         [__MINGW32CE__] (errno): Define to GetLastError.
15987         [__MINGW32CE__] (COUNTOF): New macro.
15988         (remote_open): Remove extra close call.
15989         * mem-break.c (delete_breakpoint_at): New function.
15990         * mem-break.h (delete_breakpoint_at): Declare.
15991         * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15992         HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15993         [USE_WIN32API] (read, write): Add char* casts.
15994         * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15995         * server.h: Include wincecompat.h on Windows CE.
15996         [HAVE_ERRNO_H]: Check.
15997         (perror): Declare if not declared.
15998         * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15999         (perror_with_name): Remove errno declaration.
16000         * wincecompat.h: New.
16001         * wincecompat.c: New.
16002         * win32-low.h: New.
16003         * win32-arm-low.c: New.
16004         * win32-i386-low.c: New.
16005         (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
16006         (OUTMSG2): Make it safe.
16007         (_T): New macro.
16008         (COUNTOF): New macro.
16009         (NUM_REGS): Get it from the low target.
16010         (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
16011         CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
16012         (thread_rec): Let low target handle debug registers.
16013         (child_add_thread): Likewise.
16014         (child_init_thread_list): Likewise.
16015         (continue_one_thread): Likewise.
16016         (regptr): New.
16017         (do_child_fetch_inferior_registers): Move to ...
16018         * win32-i386-low.c: ... here, and rename to ...
16019         (do_fetch_inferior_registers): ... this.
16020         * win32-low.c (child_fetch_inferior_registers):
16021         Go through the low target.
16022         (do_child_store_inferior_registers): Use regptr.
16023         (strwinerror): New function.
16024         (win32_create_inferior): Handle Windows CE.
16025         Use strwinerror instead of strerror on Windows error
16026         codes.  Add program to the error output.
16027         Don't close the main thread handle on Windows CE.
16028         (win32_attach): Use coredll.dll on Windows CE.
16029         (win32_kill): Close current process and current
16030         thread handles.
16031         (win32_detach): Use coredll.dll on Windows CE.
16032         (win32_resume): Let low target handle debug registers, and
16033         step request.
16034         (handle_exception): Add/Remove initial breakpoint.  Avoid
16035         non-existant WSTOPSIG on Windows CE.
16036         (win32_read_inferior_memory): Cast to remove warning.
16037         (win32_arch_string): Go through the low target.
16038         (initialize_low): Call set_breakpoint_data with the low
16039         target's breakpoint.
16040         * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
16041         FOP_REGNUM, mappings): Move to ...
16042         * win32-i386-low.c: ... here.
16043         * win32-low.c (win32_thread_info): Move to ...
16044         * win32-low.h: ... here.
16045         * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
16046         win32-arm-low.c and wincecompat.c.
16047         (all:): Add $EXEEXT.
16048         (install-only:): Likewise.
16049         (gdbserver:): Likewise.
16050         (gdbreplay:): Likewise.
16051         * config.in: Regenerate.
16052         * configure: Regenerate.
16054 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
16056         * win32-low.c: Rename typedef thread_info to
16057         win32_thread_info throughout.
16059 2007-03-28  Pedro Alves  <pedro_alves@portugalmail.pt>
16061         * win32-i386-low.c: Rename to ...
16062         * win32-low.c: ... this.
16063         * configure.srv: Replace win32-i386-low.o with win32-low.o.
16064         * Makefile.in: Likewise.
16066 2007-03-27  Pedro Alves  <pedro_alves@portugalmail.pt>
16068         * remote-utils.c (monitor_output): Constify msg parameter.
16069         * server.h (monitor_output): Likewise.
16070         * win32-i386-low.c (handle_output_debug_string): New.
16071         (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16072         handle_output_debug_string.
16073         (get_child_debug_event): Likewise.
16075 2007-03-27  Mat Hostetter  <mat@lcs.mit.edu>
16077         * server.c (main): Correct strtoul check.
16079 2007-03-27  Jon Ringle  <jon@ringle.org>
16081         * linux-low.c: Check __ARCH_HAS_MMU__ also.
16083 2007-03-27  Brooks Moses  <brooks.moses@codesourcery.com>
16085         * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16087 2007-02-27  Daniel Jacobowitz  <dan@codesourcery.com>
16089         * terminal.h: Check HAVE_SGTTY_H.
16091 2007-02-27  Mat Hostetter  <mat@lcs.mit.edu>
16093         * remote-utils.c (remote_open): Print out the assigned port number.
16095 2007-02-26  Daniel Jacobowitz  <dan@codesourcery.com>
16097         * remote-utils.c (monitor_output): New function.
16098         * server.c (debug_threads): Define here.
16099         (monitor_show_help): New function.
16100         (handle_query): Handle qRcmd.
16101         (main): Do not handle 'd' packet.
16102         * server.h (debug_threads, remote_debug, monitor_output): Declare.
16103         * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16104         of debug_threads.
16106 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
16108         * Makefile.in (EXEEXT): New.
16109         (clean): Use $(EXEEXT).
16111 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
16113         * target.h (target_ops): Rename send_signal to request_interrupt,
16114         and remove enum target_signal parameter.
16115         * linux-low.c (linux_request_interrupt): Rename from
16116         linux_send_signal, and always send SIGINT.
16117         * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16118         and always send SIGINT.
16119         * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16120         of send_signal.
16121         (input_interrupt): Likewise.
16123 2007-02-25  Pedro Alves  <pedro_alves@portugalmail.pt>
16125         * server.c (get_features_xml): Check if target implemented
16126         arch_string.
16127         * win32-i386-low.c (win32_arch_string): New.
16128         (win32_target_ops): Add win32_arch_string as arch_string member.
16130 2007-02-22  Markus Deuling  <deuling@de.ibm.com>
16132         * spu-low.c (spu_arch_string): New.
16133         (spu_target_ops): Add spu_arch_string.
16135 2007-02-16  Daniel Jacobowitz  <dan@codesourcery.com>
16137         * remote-utils.c: Remove HAVE_TERMINAL_H check.
16138         * configure.ac: Do not check for terminal.h.
16139         * configure, config.in: Regenerated.
16141 2007-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
16143         * Makefile.in (OBS): Add $(XML_BUILTIN).
16144         (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16145         (clean): Update.
16146         (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16147         (arm-with-iwmmxt.c): New.
16148         * config.in, configure: Regenerate.
16149         * configure.ac: Check for iWMMXt.  Handle srv_xmltarget,
16150         srv_xmlbuiltin, and srv_xmlfiles.  Define USE_XML.
16151         * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16152         (arm*-*-linux*): Add iWMMXt and regset support.
16153         * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16154         (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16155         (arm_store_wmmxregset, target_regsets): New.
16156         * server.c (get_features_xml): Take annex argument.  Check builtin
16157         XML documents.
16158         (handle_query): Handle multiple annexes.
16160 2007-01-29  Daniel Jacobowitz  <dan@codesourcery.com>
16162         * remote-utils.c [USE_WIN32API] (read, write): Define.
16163         (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16164         write.
16166 2007-01-09  Daniel Jacobowitz  <dan@codesourcery.com>
16168         * linux-i386-low.c (the_low_target): Set arch_string.
16169         * linux-x86-64-low.c (the_low_target): Likewise.
16170         * linux-low.c (linux_arch_string): New.
16171         (linux_target_ops): Add it.
16172         * linux-low.h (struct linux_target_ops): Add arch_string.
16173         * server.c (write_qxfer_response): Use const void * for DATA.
16174         (get_features_xml): New.
16175         (handle_query): Handle qXfer:features:read.  Report it for qSupported.
16176         * target.h (struct target_ops): Add arch_string method.
16178 2007-01-03  Denis Pilat  <denis.pilat@st.com>
16179             Daniel Jacobowitz  <dan@codesourcery.com>
16181         * linux-low.c (linux_kill): Handle being called with no threads.
16182         * win32-i386-low.c (win32_kill): Likewise.
16183         (get_child_debug_event): Clear current_process_handle.
16185 2006-12-30  Denis PILAT  <denis.pilat@st.com>
16186             Daniel Jacobowitz  <dan@codesourcery.com>
16188         * remote-utils.c (remote_open): Check the type of specified
16189         serial port devices before opening them.
16190         * server.c (main): Kill the inferior if an error occurs during
16191         the first remote_open.
16193 2006-12-05  Markus Deuling  <deuling@de.ibm.com>
16195         * README: Update supported targets.
16197 2006-11-28  Daniel Jacobowitz  <dan@codesourcery.com>
16199         * Makefile.in (clean): Remove reg-mips64.c.
16200         (reg-mips64.c, reg-mips64.o): New rules.
16201         * configure.srv: Handle mips64.  Include regset support for mips.
16202         * linux-mips-low.c (union mips_register): New.
16203         (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16204         (mips_breakpoint, mips_breakpoint_at): Use int.
16205         (mips_collect_register, mips_supply_register)
16206         (mips_collect_register_32bit, mips_supply_register_32bit)
16207         (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16208         (mips_store_fpregset, target_regsets): New.
16209         * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16211 2006-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
16213         * configure.srv: Add target "spu*-*-*".
16214         * Makefile.in (clean): Remove reg-spu.c.
16215         (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16216         * spu-low.c: New file.
16218 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
16220         * configure.ac: Correct td_thr_tls_get_addr test.
16221         * configure: Regenerated.
16223 2006-11-16  Daniel Jacobowitz  <dan@codesourcery.com>
16225         * linux-low.c (linux_wait_for_event): Reformat.  Use the
16226         pass_signals array.
16227         * remote-utils.c (decode_address_to_semicolon): New.
16228         * server.c (pass_signals, handle_general_set): New.
16229         (handle_query): Mention QPassSignals for qSupported.
16230         (main): Call handle_general_set.
16231         * server.h (pass_signals, decode_address_to_semicolon): New.
16233 2006-11-06  Daniel Jacobowitz  <dan@codesourcery.com>
16235         * server.c (handle_query): Correct error handling for read_auxv.
16237 2005-10-19  Ulrich Weigand  <uweigand@de.ibm.com>
16239         * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16240         and srv_linux_thread_db to yes.
16241         * linux-s390-low.c (s390_fill_gregset): New function.
16242         (target_regsets): Define data structure.
16244 2006-10-17  Daniel Jacobowitz  <dan@codesourcery.com>
16246         * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16247         * configure.ac: Use it.  Define HAVE_TD_THR_TLS_GET_ADDR.
16248         * config.in, configure: Regenerated.
16249         * inferiors.c (gdb_id_to_thread): New function.
16250         (gdb_id_to_thread_id): Use it.
16251         * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16252         * linux-low.h (struct process_info): Add th member.
16253         (thread_db_get_tls_address): New prototype.
16254         * remote-utils.c (decode_address): Make non-static.
16255         * server.c (handle_query): Handle qGetTLSAddr.
16256         * server.h (gdb_id_to_thread, decode_address): New prototypes.
16257         * target.h (struct target_ops): Add get_tls_address.
16258         * thread-db.c (maybe_attach_thread): Save the thread handle.
16259         (thread_db_get_tls_address): New.
16261 2006-09-28  Daniel Jacobowitz  <dan@codesourcery.com>
16263         * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16264         (linux_resume_one_process): Take a siginfo_t *.  Update all
16265         callers.  Queue it if necessary.  Use PTRACE_SETSIGINFO.
16266         (struct pending_signals): Add a siginfo_t.
16267         (linux_wait_for_process): Always set last_status.
16268         (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16269         (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16270         * linux-low.h (struct process_info): Add last_status.
16272 2006-09-21  Daniel Jacobowitz  <dan@codesourcery.com>
16274         * remote-utils.c (try_rle): New function.
16275         (putpkt_binary): Use it.
16277 2006-08-19  Daniel Jacobowitz  <dan@codesourcery.com>
16279         * Makefile.in (clean): Clean reg-x86-64-linux.c.
16280         (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16281         * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16282         * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16283         (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16284         point registers.
16286 2006-08-08  Richard Sandiford  <richard@codesourcery.com>
16288         * server.c (terminal_fd): New variable.
16289         (old_foreground_pgrp): Likewise.
16290         (restore_old_foreground_pgrp): New function.
16291         (start_inferior): Record the terminal file descriptor in terminal_fd
16292         and its original foreground group in old_foreground_pgrp.  Register
16293         restore_old_foreground_pgrp with atexit().
16295 2006-07-26  Daniel Jacobowitz  <dan@codesourcery.com>
16297         * server.c (handle_query): Correct qPart to qXfer.
16299 2006-07-22  Daniel Jacobowitz  <dan@codesourcery.com>
16301         * configure.ac: Check for more headers which are missing on
16302         Windows.  Automatically supply -lwsock32 and USE_WIN32API.
16303         * configure.srv: Add Cygwin and mingw32.
16304         * remote-utils.c: Don't include headers unconditionally which
16305         are missing on mingw32.  Include <winsock.h> for mingw32.
16306         (remote_open): Adjust for mingw32 support.  Flush
16307         standard error after writing to it.
16308         (remote_close, putpkt_binary, input_interrupt, block_async_io)
16309         (unblock_async_io, enable_async_io, disable_async_io)
16310         (readchar, getpkt): Update for Winsock support.
16311         (prepare_resume_reply): Expect a protocol signal number.
16312         * server.c: Disable <sys/wait.h> on mingw32.
16313         (start_inferior): Adjust for mingw32 support.  Flush
16314         standard error after writing to it.
16315         (attach_inferior): Likewise.  Use protocol signal
16316         numbers.
16317         (main): Skip 'D' packet on mingw32.  Use protocol signal numbers
16318         and names.
16319         * win32-i386-low.c: New file.
16320         * Makefile.in (XM_CLIBS): Set.
16321         (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16322         (win32-i386-low.o): New dependency rule.
16323         * linux-low.c (linux_wait): Use target signal numbers.
16324         * target.h (struct target_ops): Doc fix.
16325         * server.h (target_signal_to_name): New prototype.
16326         * gdbreplay.c: Don't include headers unconditionally which
16327         are missing on mingw32.  Include <winsock.h> for mingw32.
16328         (remote_close, remote_open): Adjust for Winsock support.
16329         * configure, config.in: Regenerated.
16331 2006-07-12  Daniel Jacobowitz  <dan@codesourcery.com>
16333         * server.c (decode_xfer_read, write_qxfer_response): New.
16334         (handle_query): Take a packet length argument.  Handle
16335         qXfer:auxv:read instead of qPart:auxv:read.  Mention it in
16336         the qSupported response.
16337         (main): Update call to handle_query.
16339 2006-06-22  Daniel Jacobowitz  <dan@codesourcery.com>
16341         * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16342         (putpkt_binary): Renamed from putpkt and adjusted for binary
16343         data.
16344         (putpkt): New wrapper for putpkt_binary.
16345         (readchar): Don't mask off the high bit.
16346         (decode_X_packet): New function.
16347         * server.c (main): Call putpkt_binary if a handler sets the packet
16348         length.  Save the length of the incoming packet.  Handle 'X'.
16349         * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16351 2006-06-21  Daniel Jacobowitz  <dan@codesourcery.com>
16353         * server.c (handle_query): Handle qSupported.
16355 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
16357         * remote-utils.c (all_symbols_looked_up): New variable.
16358         (look_up_one_symbol): Check it.
16359         * server.h (look_up_one_symbol): New declaration.
16360         * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16362 2006-05-30  Daniel Jacobowitz  <dan@codesourcery.com>
16364         * Makefile.in (linux-arm-low.o): Update dependencies.
16365         * linux-arm-low.c: Include "gdb_proc_service.h".
16366         (PTRACE_GET_THREAD_AREA): Define.
16367         (ps_get_thread_area): New function.
16369 2006-05-09  Nathan Sidwell  <nathan@codesourcery.com>
16371         * configure.srv (m68k*-*-uclinux*): New target.
16372         * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16373         (linux_resume_one_process): Remove extraneous cast.
16374         (linux_read_offsets): New.
16375         (linux_target_op): Add linux_read_offsets on mmuless systems.
16376         * server.c (handle_query): Add qOffsets logic.
16377         * target.h (struct target_ops): Add read_offsets.
16379 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
16381         * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16382         (PTRACE_GET_THREAD_AREA): Define.
16383         (ps_get_thread_area): New function.
16384         * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16385         (linux-x86-64-low.o): Update.
16387 2006-03-15  Daniel Jacobowitz  <dan@codesourcery.com>
16389         * configure.ac: Remove checks for prfpregset_t.
16390         * gdb_proc_service.h: New file.
16391         * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16392         new "gdb_proc_service.h".
16393         * proc-service.c: Likewise.
16394         (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16395         (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16396         * Makefile.in (gdb_proc_service_h): Updated.
16397         * configure, config.in: Regenerated.
16399 2006-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
16401         * remote-utils.c (prepare_resume_reply): Move declaration
16402         of gdb_id_from_wait to the top of the block.
16404 2006-02-15  Daniel Jacobowitz  <dan@codesourcery.com>
16406         * linux-low.c (regsets_store_inferior_registers): Read the regset
16407         from the target before filling it.
16409 2006-02-08  Daniel Jacobowitz  <dan@codesourcery.com>
16411         * server.c (attach_inferior): Return SIGTRAP for a successful
16412         attach.
16414 2006-02-01  Daniel Jacobowitz  <dan@codesourcery.com>
16416         * Makefile.in (OBS): Add version.o.
16417         (STAGESTUFF): Delete.
16418         (version.o): Add dependencies.
16419         (version.c): Replace rule.
16420         (clean): Remove version.c.
16421         * server.c (gdbserver_version): New.
16422         (gdbserver_usage): Use printf.
16423         (main): Handle --version and --help.
16424         * server.h (version, host_name): Add declarations.
16426 2005-12-23  Eli Zaretskii  <eliz@gnu.org>
16428         * linux-arm-low.c:
16429         * linux-arm-low.c:
16430         * inferiors.c:
16431         * i387-fp.h:
16432         * i387-fp.c:
16433         * gdbreplay.c:
16434         * regcache.c:
16435         * proc-service.c:
16436         * mem-break.h:
16437         * mem-break.c:
16438         * linux-x86-64-low.c:
16439         * linux-sh-low.c:
16440         * linux-s390-low.c:
16441         * linux-ppc64-low.c:
16442         * linux-ppc-low.c:
16443         * linux-mips-low.c:
16444         * linux-m68k-low.c:
16445         * linux-m32r-low.c:
16446         * linux-low.h:
16447         * linux-low.c:
16448         * linux-ia64-low.c:
16449         * linux-i386-low.c:
16450         * linux-crisv32-low.c:
16451         * thread-db.c:
16452         * terminal.h:
16453         * target.h:
16454         * target.c:
16455         * server.h:
16456         * server.c:
16457         * remote-utils.c:
16458         * regcache.h:
16459         * utils.c:
16460         * Makefile.in:
16461         * configure.ac:
16462         * gdbserver.1: Add (C) after Copyright.  Update the FSF
16463         address.
16465 2005-11-13  Daniel Jacobowitz  <dan@codesourcery.com>
16467         * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16468         (arm_breakpoint_at): Recognize both breakpoints.
16469         (the_low_target): Use the correct breakpoint instruction.
16471 2005-11-02  Daniel Jacobowitz  <dan@codesourcery.com>
16473         * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16474         * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16475         (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16476         (the_low_target): Update.
16478 2005-10-25  Andreas Schwab  <schwab@suse.de>
16480         * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16482         * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16483         (ia64_num_regs): Reduce to 462.
16485 2005-09-17  Daniel Jacobowitz  <dan@codesourcery.com>
16487         * acinclude.m4: Correct quoting.
16488         * aclocal.m4: Regenerated.
16490         Suggested by SZOKOVACS Robert <szo@ies.hu>:
16491         * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16492         (thread_db_init): Call thread_db_err_str.
16493         * configure.ac: Check for TD_VERSION.
16494         * config.in, configure: Regenerated.
16496 2005-07-31  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
16498         * server.h (error, fatal, warning): Add ATTR_FORMAT.
16500 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
16502         * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16503         is not available.  Define HAVE_PTRACE_GETREGS if it is.
16504         * config.in, configure: Regenerated.
16505         * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16506         * linux-i386-low.c, linux-m68k-low.c: Update to use
16507         HAVE_PTRACE_GETREGS.
16508         * linux-low.c (regsets_fetch_inferior_registers)
16509         (regsets_store_inferior_registers): Only return 0 if we processed
16510         GENERAL_REGS.
16511         * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16512         * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16514 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
16516         * inferiors.c (struct thread_info): Add gdb_id.
16517         (add_thread): Add gdb_id argument.
16518         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16519         * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16520         calls to add_thread.
16521         * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16522         * server.c (handle_query): Use thread_to_gdb_id.
16523         (handle_v_cont, main): Use gdb_id_to_thread_id.
16524         * server.h (add_thread): Update prototype.
16525         (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16526         prototypes.
16528 2005-07-13  Daniel Jacobowitz  <dan@codesourcery.com>
16530         * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16531         left-padded registers.
16532         * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16533         * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16535 2005-07-01  Steve Ellcey  <sje@cup.hp.com>
16537         * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16538         * configure: Regenerate.
16539         * config.in: Regenerate.
16540         * server.h (NEED_DECLARATION_STRERROR):
16541         Replace with !HAVE_DECL_STRERROR.
16543 2005-06-16  Daniel Jacobowitz  <dan@codesourcery.com>
16545         * linux-low.c (linux_wait, linux_send_signal): Don't test
16546         an unsigned long variable for > 0 if it could be MAX_ULONG.
16547         * server.c (myresume): Likewise.
16548         * target.c (set_desired_inferior): Likewise.
16550 2005-06-13  Mark Kettenis  <kettenis@gnu.org>
16552         * configure.ac: Simplify and improve check for socklen_t.
16553         * configure, config.in: Regenerate.
16555 2005-06-12  Daniel Jacobowitz  <dan@codesourcery.com>
16557         * acconfig.h: Remove.
16558         * configure.ac: Add a test for socklen_t.  Use three-argument
16559         AC_DEFINE throughout.
16560         * config.in: Regenerated using autoheader 2.59.
16561         * configure: Regenerated.
16563         * gdbreplay.c (socklen_t): Provide a default.
16564         (remote_open): Use socklen_t.
16565         * remote-utils.c (socklen_t): Provide a default.
16566         (remote_open): Use socklen_t.
16567         (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16568         unsigned char.
16570         * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16571         char for buffers.
16572         * linux-low.c (linux_read_memory, linux_write_memory)
16573         (linux_read_auxv): Likewise.
16574         * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16575         (check_mem_write): Likewise.
16576         * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16577         Likewise.
16578         * regcache.c (struct inferior_rgcache_data, registers_to_string)
16579         (registers_from_string, register_data): Likewise.
16580         * server.c (handle_query, main): Likewise.
16581         * server.h (convert_ascii_to_int, convert_int_to_ascii)
16582         (decode_M_packet): Likewise.
16583         * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16584         * target.h (struct target_ops): Update read_memory, write_memory,
16585         and read_auxv.
16586         (read_inferior_memory, write_inferior_memory): Update.
16587         * linux-low.h (struct linux_target_ops): Change type of breakpoint
16588         to unsigned char *.
16589         * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16590         linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16591         linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16592         linux-s390-low.c, linux-sh-low.c: Update for changes in
16593         read_inferior_memory and the_low_target->breakpoint.
16595 2005-05-28  Daniel Jacobowitz  <dan@codesourcery.com>
16597         * Makefile.in (SFILES): Add linux-ppc64-low.c.
16598         (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16599         * configure.srv: Add powerpc64-*-linux*.
16600         * linux-ppc64-low.c: New file.
16602 2005-05-23  Orjan Friberg  <orjanf@axis.com>
16604         * linux-cris-low.c: New file with support for CRIS.
16605         * linux-crisv32-low.c: Ditto for CRISv32.
16606         * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16607         (clean): Add reg-cris.c and reg-crisv32.c.
16608         Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16609         reg-crisv32.o, and reg-crisv32.c to make rules.
16610         * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16611         recognized targets.
16613 2005-05-16  Ulrich Weigand  <uweigand@de.ibm.com>
16615         * linux-low.c (fetch_register): Ensure buffer size is a multiple
16616         of sizeof (PTRACE_XFER_TYPE).
16617         (usr_store_inferior_registers): Likewise.  Zero out excess bytes.
16619 2005-05-12  Orjan Friberg  <orjanf@axis.com>
16621         * target.h (struct target_ops): Add insert_watchpoint,
16622         remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16623         pointers for hardware watchpoint support.
16624         * linux-low.h (struct linux_target_ops): Ditto.
16625         * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16626         (linux_stopped_by_watchpoint, linux_stopped_data_address): New.  Add
16627         to linux_target_ops.
16628         * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16629         reply packet.
16630         * server.c (main): Recognize 'Z' and 'z' packets.
16632 2005-05-10  Ulrich Weigand  <uweigand@de.ibm.com>
16634         * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16635         (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16636         (the_low_target): Add new members.
16638 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
16640         * proc-service.c (ps_lgetregs): Search all_processes instead of
16641         all_threads.
16643 2005-05-04  Daniel Jacobowitz  <dan@codesourcery.com>
16645         * server.c (start_inferior): Change return type to int.
16646         (attach_inferior): Change sigptr to int *.
16647         (handle_v_cont, handle_v_requests): Change signal to int *.
16648         (main): Change signal to int.
16650 2005-04-15  Kei Sakamoto  <sakamoto.kei@renesas.com>
16652         * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16653         * configure.srv: Add m32r*-*-linux*.
16654         * linux-m32r-low.c: New file.
16656 2005-03-04  Daniel Jacobowitz  <dan@codesourcery.com>
16658         * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16660 2005-03-03  Daniel Jacobowitz  <dan@codesourcery.com>
16662         * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16663         Take unsigned long arguments for PIDs.
16664         * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16665         (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16666         (wait_for_sigstop, linux_resume_one_process)
16667         (regsets_fetch_inferior_registers, linux_send_signal)
16668         (linux_read_auxv): Likewise.  Update the types of variables holding
16669         PIDs.  Update format string specifiers.
16670         * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16671         * remote-utils.c (prepare_resume_reply): Likewise.
16672         * server.c (cont_thread, general_thread, step_thread)
16673         (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16674         unsigned long.
16675         (handle_query): Update format specifiers.
16676         (handle_v_cont, main): Use strtoul for thread IDs.
16677         * server.h (struct inferior_list_entry): Use unsigned long for ID.
16678         (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16679         (general_thread, step_thread, thread_from_wait)
16680         (old_thread_from_wait): Update.
16681         * target.h (struct thread_resume): Use unsigned long for THREAD.
16682         (struct target_ops): Use unsigned long for arguments to attach and
16683         thread_alive.
16685 2005-02-24  Daniel Jacobowitz  <dan@codesourcery.com>
16687         * acinclude.m4: Include bfd/bfd.m4 directly.
16688         * configure.ac: Use AC_ARG_PROGRAM.  Suggested by Aron Griffis
16689         <agriffis@toolchain.org>.
16690         * aclocal.m4, configure: Regenerated.
16692 2005-01-07  Andrew Cagney  <cagney@gnu.org>
16694         * configure.ac: Rename configure.in, require autoconf 2.59.
16695         * configure: Re-generate.
16697 2004-12-08  Daniel Jacobowitz  <dan@debian.org>
16699         * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area.  Reset
16700         LIBS when finished.
16701         * aclocal.m4: Regenerated.
16702         * configure: Regenerated.
16704 2004-11-21  Andreas Schwab  <schwab@suse.de>
16706         * linux-m68k-low.c (m68k_num_gregs): Define.
16707         (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16708         (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16709         (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16710         (m68k_breakpoint_at): New.  Add to the_low_target.
16712         * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16713         srv_linux_thread_db to yes.
16715 2004-10-20  Joel Brobecker  <brobecker@gnat.com>
16717         * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16718         (ARCH_SET_FS): Likewise.
16719         (ARCH_GET_FS): Likewise.
16720         (ARCH_GET_GS): Likewise.
16722 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
16724         * linux-i386-low.c (ps_get_thread_area): New.
16725         * linux-x86-64-low.c (ps_get_thread_area): New.
16726         * linux-low.c: Include <sys/syscall.h>.
16727         (linux_kill_one_process): Don't kill the first thread here.
16728         (linux_kill): Kill the first thread here.
16729         (kill_lwp): New function.
16730         (send_sigstop, linux_send_signal): Use it.
16731         * proc-service.c: Clean up #ifdefs.
16732         (fpregset_info): Delete.
16733         (ps_lgetregs): Update and enable implementation.
16734         (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16735         implementations.
16736         * remote-utils.c (struct sym_cache, symbol_cache): New.
16737         (input_interrupt): Print a clearer message.
16738         (async_io_enabled): New variable.
16739         (enable_async_io, disable_async_io): Use it.  Update comments.
16740         (look_up_one_symbol): Use the symbol cache.
16741         * thread-db.c (thread_db_look_up_symbols): New function.
16742         (thread_db_init): Update comments.  Call thread_db_look_up_symbols.
16744 2004-10-16  Daniel Jacobowitz  <dan@debian.org>
16746         * configure.in: Test for -rdynamic.
16747         * configure: Regenerated.
16748         * Makefile (INTERNAL_LDFLAGS): New.
16749         (gdbserver, gdbreplay): Use it.
16751 2004-09-02  Andrew Cagney  <cagney@gnu.org>
16753         * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16755 2004-03-23  Daniel Jacobowitz  <drow@mvista.com>
16757         * linux-low.c (linux_wait): Clear all_processes list also.
16759 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
16761         * linux-low.c: Include <errno.h>.  Remove extern declaration of
16762         errno.
16764 2004-03-12  Daniel Jacobowitz  <drow@mvista.com>
16766         * gdbreplay.c, server.h, utils.c: Update copyright years.
16768 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
16770         * server.c (main): Print child status or termination signal from
16771         variable 'signal', not 'sig'.
16773 2004-03-04  Nathan J. Williams  <nathanw@wasabisystems.com>
16775         * linux-low.c (linux_read_memory): Change return type to
16776         int.  Check for and return error from ptrace().
16777         * target.c (read_inferior_memory): Change return type to int.  Pass
16778         back return status from the_target->read_memory().
16779         * target.h (struct target_ops): Adapt *read_memory() prototype.
16780         Update comment.
16781         (read_inferior_memory): Adapt prototype.
16782         * server.c (main): Return an error packet if
16783         read_inferior_memory() returns an error.
16785 2004-03-04  Daniel Jacobowitz  <drow@mvista.com>
16787         * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16788         Unify with other clean targets.
16790 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
16792         * server.c (handle_v_cont): Call set_desired_inferior.
16794 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
16796         * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16798 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
16800         * linux-low.c (linux_wait): Unblock async I/O.
16801         (linux_resume): Block and enable async I/O.
16802         * remote-utils.c (block_async_io, unblock_async_io): New functions.
16803         * server.h (block_async_io, unblock_async_io): Add prototypes.
16805 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
16807         * remote-utils.c (remote_open): Print a status notice after
16808         opening a TCP port.
16809         * server.c (attach_inferior): Print a status notice after
16810         attaching.
16812 2004-02-29  Daniel Jacobowitz  <drow@mvista.com>
16814         * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16816 2004-02-26  Daniel Jacobowitz  <drow@mvista.com>
16818         * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16819         error packet.
16820         * server.c, target.h: Update copyright years.
16822 2004-02-25  Roland McGrath  <roland@redhat.com>
16824         * target.h (struct target_ops): New member `read_auxv'.
16825         * server.c (handle_query): Handle qPart:auxv:read: query using that.
16826         * linux-low.c (linux_read_auxv): New function.
16827         (linux_target_ops): Initialize `read_auxv' member to that.
16829 2004-02-17  Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16831         Committed by Jim Blandy  <jimb@redhat.com>.
16833         * linux-s390-low.c (s390_num_regs): Update.
16834         (s390_regmap): Remove control registers.  Use __s390x__ predefine
16835         instead of GPR_SIZE to distiguish s390 and s390x targets.
16837 2004-01-31  Daniel Jacobowitz  <drow@mvista.com>
16839         * linux-low.c: Update copyright year.
16840         (check_removed_breakpoint): Clear pending_is_breakpoint.
16841         (linux_set_resume_request, linux_queue_one_thread)
16842         (resume_status_pending_p): New functions.
16843         (linux_continue_one_thread): Use process->resume.
16844         (linux_resume): Only resume threads if there are no pending events.
16845         * linux-low.h (struct process_info): Add resume request
16846         pointer.
16848 2004-01-30  Daniel Jacobowitz  <drow@mvista.com>
16850         * regcache.c (new_register_cache): Clear the allocated register
16851         buffer.  Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16853 2003-10-13  Daniel Jacobowitz  <drow@mvista.com>
16855         * linux-low.c (linux_resume): Take a struct thread_resume *
16856         argument.
16857         (linux_wait): Update call.
16858         (resume_ptr): New static variable.
16859         (linux_continue_one_thread): Renamed from
16860         linux_continue_one_process.  Use resume_ptr.
16861         (linux_resume): Use linux_continue_one_thread.
16862         * server.c (handle_v_cont, handle_v_requests): New functions.
16863         (myresume): New function.
16864         (main): Handle 'v' case.
16865         * target.h (struct thread_resume): New type.
16866         (struct target_ops): Change argument of "resume" to struct
16867         thread_resume *.
16868         (myresume): Delete macro.
16870 2003-08-08  H.J. Lu  <hongjiu.lu@intel.com>
16872         * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16873         (uninstall): Support DESTDIR.
16875 Mon Jul 21 20:09:34 UTC 2003  Brendan Conoboy  <blc@redhat.com>
16877         * configure.srv: Add xscale*linux copy of arm*linux entry.
16879 2003-07-24  Daniel Jacobowitz  <drow@mvista.com>
16881         * linux-arm-low.c (arm_reinsert_addr): New function.
16882         (the_low_target): Add arm_reinsert_addr.
16884 2003-07-08  Mark Kettenis  <kettenis@gnu.org>
16886         * mem-break.c: Remove whitespace at end of file.
16888 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
16890         * configure.in: Check whether we need to prototype strerror.
16891         * server.h: Optionally prototype strerror.
16892         * gdbreplay.c (perror_with_name): Use strerror.
16893         * linux-low.c (linux_attach_lwp): Use strerror.
16894         * utils.c (perror_with_name): Use strerror.
16895         * config.in, configure: Regenerated.
16897 2003-06-28  Daniel Jacobowitz  <drow@mvista.com>
16899         * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16900         SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16902 2003-06-20  Daniel Jacobowitz  <drow@mvista.com>
16904         * Makefile.in (SFILES): Update.
16905         * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16906         low-sun3.c: Remove files.
16908 2003-06-17  Daniel Jacobowitz  <drow@mvista.com>
16910         * linux-low.c: Move comment to linux_thread_alive where it belonged.
16911         (linux_detach_one_process, linux_detach): New functions.
16912         (linux_target_ops): Add linux_detach.
16913         * server.c (main): Handle 'D' packet.
16914         * target.h (struct target_ops): Add "detach" member.
16915         (detach_inferior): Define.
16917 2003-06-13  Mark Kettenis  <kettenis@gnu.org>
16919         From Kelley Cook  <kelleycook@wideopenwest.com>:
16920         * configure.srv: Accept i[34567]86 variants.
16922 2003-06-05  Daniel Jacobowitz  <drow@mvista.com>
16924         * linux-low.c (linux_wait_for_event): Correct comment typos.
16925         (linux_resume_one_process): Call check_removed_breakpoint.
16926         (linux_send_signal): New function.
16927         (linux_target_ops): Add linux_send_signal.
16928         * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16929         of kill.
16930         * target.h (struct target_ops): Add send_signal.
16932 2003-05-29  Jim Blandy  <jimb@redhat.com>
16934         * linux-low.c (usr_store_inferior_registers): Transfer buf in
16935         PTRACE_XFER_TYPE-sized chunks, not int-sized chunks.  Otherwise,
16936         if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16937         away part of the register's value.
16939 2003-03-26  Daniel Jacobowitz  <drow@mvista.com>
16941         * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16942         (linux_wait_for_event, linux_init_signals): Likewise.
16944 2003-03-17  Daniel Jacobowitz  <drow@mvista.com>
16946         * configure.in: Check for stdlib.h.
16947         * configure: Regenerated.
16948         * config.in: Regenerated.
16950 2003-01-04  Andreas Schwab  <schwab@suse.de>
16952         * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16954 2003-01-02  Andrew Cagney  <ac131313@redhat.com>
16956         * Makefile.in: Remove obsolete code.
16958 2002-11-20  Daniel Jacobowitz  <drow@mvista.com>
16960         * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16961         defined(PT_FPR0_HI).
16963 2002-11-17  Stuart Hughes  <seh@zee2.com>
16965         * linux-arm-low.c (arm_num_regs): Increase.
16966         (arm_regmap): Include status register.
16968 2002-11-17  Daniel Jacobowitz  <drow@mvista.com>
16970         * linux-low.c (register_addr): Remove incorrect -1 check.
16972 2002-08-29  Daniel Jacobowitz  <drow@mvista.com>
16974         * linux-low.c (linux_create_inferior): Call setpgid.  Return
16975         the new PID.
16976         (unstopped_p, linux_signal_pid): Remove.
16977         (linux_target_ops): Remove linux_signal_pid.
16978         * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16979         global instead of target method.
16980         * target.h (struct target_ops): Remove signal_pid.  Update comment
16981         for create_inferior.
16982         * server.c (signal_pid): New variable.
16983         (create_inferior): Set signal_pid.  Block SIGTTOU and SIGTTIN in
16984         gdbserver.  Set the child to be the foreground process group.
16985         (attach_inferior): Set signal_pid.
16987 2002-08-23  Daniel Jacobowitz  <drow@mvista.com>
16989         * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16991 2002-08-20  Jim Blandy  <jimb@redhat.com>
16993         * Makefile.in (LDFLAGS): Allow the configure script to establish a
16994         default for this.
16996 2002-08-01  Andrew Cagney  <cagney@redhat.com>
16998         * Makefile.in: Make chill references obsolete.
17000 2002-07-24  Kevin Buettner  <kevinb@redhat.com>
17002         * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
17003         * configure: Regenerate.
17004         * config.in: Regenerate.
17006 2002-07-09  David O'Brien  <obrien@FreeBSD.org>
17008         * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
17009         (perror_with_name, remote_close, remote_open, expect, play): Static.
17011 2002-07-04  Michal Ludvig  <mludvig@suse.cz>
17013         * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17014         byte offsets instead of an array of indexes.
17015         (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
17017 2002-06-13  Daniel Jacobowitz  <drow@mvista.com>
17019         * regcache.c: Add comment.
17021 2002-06-11  Daniel Jacobowitz  <drow@mvista.com>
17023         * thread-db.c: New file.
17024         * proc-service.c: New file.
17025         * acinclude.m4: New file.
17026         * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
17027         proc-service.o, and thread-db.o.
17028         (linux-low.o): Add USE_THREAD_DB.
17029         * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
17030         HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
17031         * aclocal.m4: Regenerated.
17032         * config.in: Regenerated.
17033         * configure: Regenerated.
17034         * configure.in: Check for proc_service.h, sys/procfs.h,
17035         thread_db.h, and linux/elf.h headrs.
17036         Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
17037         PRFPREGSET_T_BROKEN.  Introduce srv_thread_depfiles and USE_THREAD_DB.
17038         Check for -lthread_db and thread support.
17039         * configure.srv: Enable thread_db support for ARM, i386, MIPS,
17040         PowerPC, and SuperH.
17041         * i387-fp.c: Constify arguments.
17042         * i387-fp.h: Likewise.
17043         * inferiors.c: (struct thread_info): Renamed from
17044         `struct inferior_info'.  Remove PID member.  Use generic inferior
17045         list header.  All uses updated.
17046         (inferiors, signal_pid): Removed.
17047         (all_threads): New variable.
17048         (get_thread): Define.
17049         (add_inferior_to_list): New function.
17050         (for_each_inferior): New function.
17051         (change_inferior_id): New function.
17052         (add_inferior): Removed.
17053         (remove_inferior): New function.
17054         (add_thread): New function.
17055         (free_one_thread): New function.
17056         (remove_thread): New function.
17057         (clear_inferiors): Use for_each_inferior and free_one_thread.
17058         (find_inferior): New function.
17059         (find_inferior_id): New function.
17060         (inferior_target_data): Update argument type.
17061         (set_inferior_target_data): Likewise.
17062         (inferior_regcache_data): Likewise.
17063         (set_inferior_regcache_data): Likewise.
17064         * linux-low.c (linux_bp_reinsert): Remove.
17065         (all_processes, stopping_threads, using_thrads)
17066         (struct pending_signals, debug_threads, pid_of): New.
17067         (inferior_pid): Replace with macro.
17068         (struct inferior_linux_data): Remove.
17069         (get_stop_pc, add_process): New functions.
17070         (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17071         Use add_process and add_thread.
17072         (linux_attach_lwp): New function, based on old linux_attach.  Use
17073         add_process and add_thread.  Set stop_expected for new threads.
17074         (linux_attach): New function.
17075         (linux_kill_one_process): New function.
17076         (linux_kill): Kill all LWPs.
17077         (linux_thread_alive): Use find_inferior_id.
17078         (check_removed_breakpoints, status_pending_p): New functions.
17079         (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17080         Update.  Use WNOHANG.  Wait for cloned processes also.  Update process
17081         struct for the found process.
17082         (linux_wait_for_event): New function.
17083         (linux_wait): Use it.  Support LWPs.
17084         (send_sigstop, wait_for_sigstop, stop_all_processes)
17085         (linux_resume_one_process, linux_continue_one_process): New functions.
17086         (linux_resume): Support LWPs.
17087         (REGISTER_RAW_SIZE): Remove.
17088         (fetch_register): Use register_size instead.  Call supply_register.
17089         (usr_store_inferior_registers): Likewise.  Call collect_register.
17090         Fix recursive case.
17091         (regsets_fetch_inferior_registers): Improve error message.
17092         (regsets_store_inferior_registers): Add debugging.
17093         (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17094         (unstopped_p, linux_signal_pid): New functions.
17095         (linux_target_ops): Add linux_signal_pid.
17096         (linux_init_signals): New function.
17097         (initialize_low): Call it.  Initialize using_threads.
17098         * regcache.c (inferior_regcache_data): Add valid
17099         flag.
17100         (get_regcache): Fetch registers lazily.  Add fetch argument
17101         and update all callers.
17102         (regcache_invalidate_one, regcache_invalidate): New
17103         functions.
17104         (new_register_cache): Renamed from create_register_cache.
17105         Return the new regcache.
17106         (free_register_cache): Change argument to a void *.
17107         (registers_to_string, registers_from_string): Call get_regcache
17108         with fetch flag set.
17109         (register_data): Make static.  Pass fetch flag to get_regcache.
17110         (supply_register): Call get_regcache with fetch flag clear.
17111         (collect_register): Call get_regcache with fetch flag set.
17112         (collect_register_as_string): New function.
17113         * regcache.h: Update.
17114         * remote-utils.c (putpkt): Flush after debug output and use
17115         stderr.
17116         Handle input interrupts while waiting for an ACK.
17117         (input_interrupt): Use signal_pid method.
17118         (getpkt): Flush after debug output and use stderr.
17119         (outreg): Use collect_register_as_string.
17120         (new_thread_notify, dead_thread_notify): New functions.
17121         (prepare_resume_reply): Check using_threads.  Set thread_from_wait
17122         and general_thread.
17123         (look_up_one_symbol): Flush after debug output.
17124         * server.c (step_thread, server_waiting): New variables.
17125         (start_inferior): Don't use signal_pid.  Update call to mywait.
17126         (attach_inferior): Update call to mywait.
17127         (handle_query): Handle qfThreadInfo and qsThreadInfo.
17128         (main): Don't fetch/store registers explicitly.  Use
17129         set_desired_inferior.  Support proposed ``Hs'' packet.  Update
17130         calls to mywait.
17131         * server.h: Update.
17132         (struct inferior_list, struct_inferior_list_entry): New.
17133         * target.c (set_desired_inferior): New.
17134         (write_inferior_memory): Constify.
17135         (mywait): New function.
17136         * target.h: Update.
17137         (struct target_ops): New signal_pid method.
17138         (mywait): Removed macro, added prototype.
17140         * linux-low.h (regset_func): Removed.
17141         (regset_fill_func, regset_store_func): New.
17142         (enum regset_type): New.
17143         (struct regset_info): Add type field.  Use new operation types.
17144         (struct linux_target_ops): stop_pc renamed to get_pc.
17145         Add decr_pc_after_break and breakpoint_at.
17146         (get_process, get_thread_proess, get_process_thread)
17147         (strut process_info, all_processes, linux_attach_lwp)
17148         (thread_db_init): New.
17150         * linux-arm-low.c (arm_get_pc, arm_set_pc,
17151         arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17152         (the_low_target): Add new members.
17153         * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17154         (i386_store_fpxregset): Constify.
17155         (target_regsets): Add new kind identifier.
17156         (i386_get_pc): Renamed from i386_stop_pc.  Simplify.
17157         (i386_set_pc): Add debugging.
17158         (i386_breakpoint_at): New function.
17159         (the_low_target): Add new members.
17160         * linux-mips-low.c (mips_get_pc, mips_set_pc)
17161         (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17162         (mips_breakpoint_at): New.
17163         (the_low_target): Add new members.
17164         * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17165         (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17166         (the_low_target): Add new members.
17167         * linux-sh-low.c (sh_get_pc, sh_set_pc)
17168         (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17169         (the_low_target): Add new members.
17170         * linux-x86-64-low.c (target_regsets): Add new kind
17171         identifier.
17173 2002-05-15  Daniel Jacobowitz  <drow@mvista.com>
17175         From Martin Pool <mbp@samba.org>:
17176         * server.c (gdbserver_usage): New function.
17177         (main): Call it.
17179 2002-05-14  Daniel Jacobowitz  <drow@mvista.com>
17181         * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17182         stop_at -> stop_pc.
17184 2002-05-04  Andrew Cagney  <ac131313@redhat.com>
17186         * Makefile.in: Remove obsolete code.
17188 2002-04-24  Michal Ludvig  <mludvig@suse.cz>
17190         * linux-low.c (regsets_fetch_inferior_registers),
17191         (regsets_store_inferior_registers): Removed cast to int from
17192         ptrace() calls.
17193         * regcache.h: Added declaration of struct inferior_info.
17195 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
17197         * inferiors.c (struct inferior_info): Add regcache_data.
17198         (add_inferior): Call create_register_cache.
17199         (clear_inferiors): Call free_register_cache.
17200         (inferior_regcache_data, set_inferior_regcache_data): New functions.
17201         * regcache.c (struct inferior_regcache_data): New.
17202         (registers): Remove.
17203         (get_regcache): New function.
17204         (create_register_cache, free_register_cache): New functions.
17205         (set_register_cache): Don't initialize the register cache here.
17206         (registers_to_string, registers_from_string, register_data): Call
17207         get_regcache.
17208         * regcache.h: Add prototypes.
17209         * server.h: Likewise.
17211 2002-04-20  Daniel Jacobowitz  <drow@mvista.com>
17213         * mem-break.c: New file.
17214         * mem-break.h: New file.
17215         * Makefile.in: Add mem-break.o rule; update server.h
17216         dependencies.
17217         * inferiors.c (struct inferior_info): Add target_data
17218         member.
17219         (clear_inferiors): Free target_data member if set.
17220         (inferior_target_data, set_inferior_target_data): New functions.
17221         * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17222         (i386_stop_pc, i386_set_pc): New.  Add to the_low_target.
17223         * linux-low.c (linux_bp_reinsert): New variable.
17224         (struct inferior_linux_data): New.
17225         (linux_create_inferior): Use set_inferior_target_data.
17226         (linux_attach): Likewise.  Call add_inferior.
17227         (linux_wait_for_one_inferior): New function.
17228         (linux_wait): Call it.
17229         (linux_write_memory): Add const.
17230         (initialize_low): Call set_breakpoint_data.
17231         * linux-low.h (struct linux_target_ops): Add breakpoint
17232         handling members.
17233         * server.c (attach_inferior): Remove extra add_inferior
17234         call.
17235         * server.h: Include mem-break.h.  Update inferior.c
17236         prototypes.
17237         * target.c (read_inferior_memory)
17238         (write_inferior_memory): New functions.
17239         * target.h (read_inferior_memory)
17240         (write_inferior_memory): Change macros to prototypes.
17241         (struct target_ops): Update comments.  Add const to write_memory
17242         definition.
17244 2002-04-11  Daniel Jacobowitz  <drow@mvista.com>
17246         * linux-low.c (usr_store_inferior_registers): Support
17247         registers which are allowed to fail to store.
17248         * linux-low.h (linux_target_ops): Likewise.
17249         * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17250         (ppc_cannot_store_register): FPSCR may not be storable.
17252 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
17254         * server.h: Include <string.h> if HAVE_STRING_H.
17255         * ChangeLog: Correct paths in last ChangeLog entry.
17257 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
17259         * linux-low.h: Remove obsolete prototypes.
17260         (struct linux_target_ops): New.
17261         (extern the_low_target): New.
17262         * linux-low.c (num_regs, regmap): Remove declarations.
17263         (register_addr): Use the_low_target explicitly.
17264         (fetch_register): Likewise.
17265         (usr_fetch_inferior_registers): Likewise.
17266         (usr_store_inferior_registers): Likewise.
17267         * linux-arm-low.c (num_regs): Remove.
17268         (arm_num_regs): Define.
17269         (arm_regmap): Renamed from regmap, made static.
17270         (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17271         made static.
17272         (arm_cannot_store_register): Renamed from cannot_store_register,
17273         made static.
17274         (the_low_target): New.
17275         * linux-i386-low.c (num_regs): Remove.
17276         (i386_num_regs): Define.
17277         (i386_regmap): Renamed from regmap, made static.
17278         (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17279         made static.
17280         (i386_cannot_store_register): Renamed from cannot_store_register,
17281         made static.
17282         (the_low_target): New.
17283         * linux-ia64-low.c (num_regs): Remove.
17284         (ia64_num_regs): Define.
17285         (ia64_regmap): Renamed from regmap, made static.
17286         (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17287         made static.
17288         (ia64_cannot_store_register): Renamed from cannot_store_register,
17289         made static.
17290         (the_low_target): New.
17291         * linux-m68k-low.c (num_regs): Remove.
17292         (m68k_num_regs): Define.
17293         (m68k_regmap): Renamed from regmap, made static.
17294         (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17295         made static.
17296         (m68k_cannot_store_register): Renamed from cannot_store_register,
17297         made static.
17298         (the_low_target): New.
17299         * linux-mips-low.c (num_regs): Remove.
17300         (mips_num_regs): Define.
17301         (mips_regmap): Renamed from regmap, made static.
17302         (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17303         made static.
17304         (mips_cannot_store_register): Renamed from cannot_store_register,
17305         made static.
17306         (the_low_target): New.
17307         * linux-ppc-low.c (num_regs): Remove.
17308         (ppc_num_regs): Define.
17309         (ppc_regmap): Renamed from regmap, made static.
17310         (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17311         made static.
17312         (ppc_cannot_store_register): Renamed from cannot_store_register,
17313         made static.
17314         (the_low_target): New.
17315         * linux-s390-low.c (num_regs): Remove.
17316         (s390_num_regs): Define.
17317         (s390_regmap): Renamed from regmap, made static.
17318         (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17319         made static.
17320         (s390_cannot_store_register): Renamed from cannot_store_register,
17321         made static.
17322         (the_low_target): New.
17323         * linux-sh-low.c (num_regs): Remove.
17324         (sh_num_regs): Define.
17325         (sh_regmap): Renamed from regmap, made static.
17326         (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17327         made static.
17328         (sh_cannot_store_register): Renamed from cannot_store_register,
17329         made static.
17330         (the_low_target): New.
17331         * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17332         (the_low_target): New.
17334 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
17336         * Makefile.in: Add stamp-h target.
17337         * configure.in: Create stamp-h.
17338         * configure: Regenerated.
17340 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
17342         * inferiors.c: New file.
17343         * target.c: New file.
17344         * target.h: New file.
17345         * Makefile.in:  Add target.o and inferiors.o.  Update
17346         dependencies.
17347         * linux-low.c (inferior_pid): New static variable,
17348         moved from server.c.
17349         (linux_create_inferior): Renamed from create_inferior.
17350         Call add_inferior.  Return 0 on success instead of a PID.
17351         (linux_attach): Renamed from myattach.
17352         (linux_kill): Renamed from kill_inferior.  Call clear_inferiors ().
17353         (linux_thread_alive): Renamed from mythread_alive.
17354         (linux_wait): Renamed from mywait.  Call clear_inferiors () if the
17355         child dies.
17356         (linux_resume): Renamed from myresume.  Add missing ``return 0''.
17357         (regsets_store_inferior_registers): Correct error message.
17358         Add missing ``return 0''.
17359         (linux_fetch_registers): Renamed from fetch_inferior_registers.
17360         (linux_store_registers): Renamed from store_inferior_registers.
17361         (linux_read_memory): Renamed from read_inferior_memory.
17362         (linux_write_memory): Renamed from write_inferior_memory.
17363         (linux_target_ops): New structure.
17364         (initialize_low): Call set_target_ops ().
17365         * remote-utils.c (unhexify): New function.
17366         (hexify): New function.
17367         (input_interrupt): Send signals to ``signal_pid''.
17368         * server.c (inferior_pid): Remove.
17369         (start_inferior): Update create_inferior call.
17370         (attach_inferior): Call add_inferior.
17371         (handle_query): New function.
17372         (main): Call handle_query for `q' packets.
17373         * server.h: Include "target.h".  Remove obsolete prototypes.
17374         Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17376 2002-04-09  Daniel Jacobowitz  <drow@mvista.com>
17378         * Makefile.in: Add WARN_CFLAGS.  Update configury
17379         dependencies.
17380         * configure.in: Check for <string.h>
17381         * configure: Regenerate.
17382         * config.in: Regenerate.
17383         * gdbreplay.c: Include needed system headers.
17384         (remote_open): Remove strchr prototype.
17385         * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17386         * regcache.c (supply_register): Change buf argument to const void *.
17387         (supply_register_by_name): Likewise.
17388         (collect_register): Change buf argument to void *.
17389         (collect_register_by_name): Likewise.
17390         * regcache.h: Add missing prototypes.
17391         * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17392         * server.c (handle_query): New function.
17393         (attached): New static variable, moved out of main.
17394         (main): Quiet longjmp clobber warnings.
17395         * server.h: Add ATTR_NORETURN and ATTR_FORMAT.  Update prototypes.
17396         * utils.c (error): Remove NORETURN.
17397         (fatal): Likewise.