Replace throw_exception with throw in some cases
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2019-04-08 Tom Tromey <tom@tromey.com>
2
3 * linux-low.c (linux_detach_one_lwp): Replace throw_exception with
4 throw.
5 (linux_resume_one_lwp): Likewise.
6
7 2019-04-08 Tom Tromey <tom@tromey.com>
8
9 * gdbreplay.c: Update.
10 * linux-low.c: Update.
11 * server.c: Update.
12
13 2019-04-08 Tom Tromey <tom@tromey.com>
14
15 * server.c: Use C++ exception handling.
16 * linux-low.c: Use C++ exception handling.
17 * gdbreplay.c: Use C++ exception handling.
18
19 2019-04-08 Tom Tromey <tom@tromey.com>
20
21 * server.c (handle_btrace_general_set, handle_qxfer_btrace)
22 (handle_qxfer_btrace_conf, detach_or_kill_for_exit_cleanup)
23 (captured_main, main): Update.
24 * gdbreplay.c (main): Update.
25
26 2019-04-05 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
27
28 * linux-low.c (linux_get_auxv): Remove static. Return auxv entry
29 value in argument pointer, return 1 if the entry is found and 0
30 otherwise. Move comment.
31 (linux_get_hwcap, linux_get_hwcap2): Use modified linux_get_auxv.
32 * linux-low.h (linux_get_auxv): Declare.
33 * linux-ppc-low.c (is_elfv2_inferior): Use linux_get_auxv.
34
35 2019-04-05 Tom Tromey <tromey@adacore.com>
36
37 * server.c (gdbserver_usage): Use upper-case for metasyntactic
38 variables.
39
40 2019-03-28 Alan Hayward <alan.hayward@arm.com>
41
42 * linux-low.c (AT_HWCAP2): Add define if not already included.
43
44 2019-03-26 Alan Hayward <alan.hayward@arm.com>
45
46 * linux-aarch64-low.c (aarch64_get_hwcap): Remove function.
47 (aarch64_arch_setup): Call linux_get_hwcap.
48 * linux-arm-low.c (arm_get_hwcap): Remove function.
49 (arm_read_description): Call linux_get_hwcap.
50 * linux-low.c (linux_get_auxv): New function.
51 (linux_get_hwcap): Likewise.
52 (linux_get_hwcap2): Likewise.
53 * linux-low.h (linux_get_hwcap): New declaration.
54 (linux_get_hwcap2): Likewise.
55 * linux-ppc-low.c (ppc_get_auxv): Remove function.
56 (ppc_arch_setup): Call linux_get_hwcap.
57 * linux-s390-low.c (s390_get_hwcap): Remove function.
58 (s390_arch_setup): Call linux_get_hwcap.
59
60 2019-03-22 Alan Hayward <alan.hayward@arm.com>
61 Jiong Wang <jiong.wang@arm.com>
62
63 * linux-aarch64-low.c (aarch64_store_pauthregset): New function.
64 * linux-low.c (regsets_store_inferior_registers): Allow optional reads
65 to fail.
66 * linux-low.h (enum regset_type): Add OPTIONAL_REGS.
67
68 2019-03-22 Alan Hayward <alan.hayward@arm.com>
69 Jiong Wang <jiong.wang@arm.com>
70
71 * linux-aarch64-low.c (AARCH64_HWCAP_PACA): New define.
72 (aarch64_get_hwcap): New function.
73 (aarch64_arch_setup): Read APIA hwcap.
74
75 2019-03-22 Alan Hayward <alan.hayward@arm.com>
76 Jiong Wang <jiong.wang@arm.com>
77
78 * linux-aarch64-ipa.c (get_ipa_tdesc): Add pauth param.
79 (initialize_low_tracepoint): Likewise.
80 * linux-aarch64-low.c (aarch64_arch_setup): Likewise.
81 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Likewise.
82 * linux-aarch64-tdesc.c (struct target_desc): Likewise.
83 (aarch64_linux_read_description): Likewise.
84 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Likewise.
85
86 2019-03-12 John Baldwin <jhb@FreeBSD.org>
87
88 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
89 i386_create_target_description for 'segments' parameter.
90 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
91 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
92 * win32-i386-low.c (i386_arch_setup): Likewise.
93
94 2019-03-12 Tom Tromey <tromey@adacore.com>
95
96 * linux-low.c (iterate_over_lwps): Update.
97
98 2019-03-06 Tom Tromey <tom@tromey.com>
99
100 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
101 (captured_main): Use SCOPE_EXIT.
102
103 2019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
104
105 * configure.srv: Use '$enable_unittest' instead of '$development'
106 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
107 case.
108
109 2019-02-27 Tom Tromey <tromey@adacore.com>
110
111 * gdbreplay.c (logchar): Handle \r\n.
112
113 2019-02-07 Alan Hayward <alan.hayward@arm.com>
114
115 * linux-low.c (linux_attach): Add process before lwp.
116 * server.c (attach_inferior): Check if already attached.
117
118 2019-02-07 Tom Tromey <tom@tromey.com>
119
120 * x86-tdesc.h: Rename include guard.
121 * x86-low.h: Add include guard.
122 * wincecompat.h: Rename include guard.
123 * win32-low.h: Add include guard.
124 * utils.h: Rename include guard.
125 * tracepoint.h: Rename include guard.
126 * tdesc.h: Rename include guard.
127 * target.h: Rename include guard.
128 * server.h: Rename include guard.
129 * remote-utils.h: Rename include guard.
130 * regcache.h: Rename include guard.
131 * nto-low.h: Rename include guard.
132 * notif.h: Add include guard.
133 * mem-break.h: Rename include guard.
134 * lynx-low.h: Add include guard.
135 * linux-x86-tdesc.h: Add include guard.
136 * linux-s390-tdesc.h: Add include guard.
137 * linux-ppc-tdesc-init.h: Add include guard.
138 * linux-low.h: Add include guard.
139 * linux-aarch64-tdesc.h: Add include guard.
140 * linux-aarch32-low.h: Add include guard.
141 * inferiors.h: Rename include guard.
142 * i387-fp.h: Rename include guard.
143 * hostio.h: Rename include guard.
144 * gdbthread.h: Rename include guard.
145 * gdb_proc_service.h: Rename include guard.
146 * event-loop.h: Rename include guard.
147 * dll.h: Rename include guard.
148 * debug.h: Rename include guard.
149 * ax.h: Rename include guard.
150
151 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
152
153 PR gdb/23985
154 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
155 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
156
157 2019-01-25 Tom Tromey <tom@tromey.com>
158
159 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
160
161 2019-01-25 Tom Tromey <tom@tromey.com>
162
163 * win32-low.c: Fix common/ includes.
164 * win32-i386-low.c: Fix common/ includes.
165 * tracepoint.c: Fix common/ includes.
166 * thread-db.c: Fix common/ includes.
167 * target.h: Fix common/ includes.
168 * symbol.c: Fix common/ includes.
169 * spu-low.c: Fix common/ includes.
170 * server.h: Fix common/ includes.
171 * server.c: Fix common/ includes.
172 * remote-utils.c: Fix common/ includes.
173 * regcache.h: Fix common/ includes.
174 * regcache.c: Fix common/ includes.
175 * nto-x86-low.c: Fix common/ includes.
176 * notif.h: Fix common/ includes.
177 * mem-break.h: Fix common/ includes.
178 * lynx-low.c: Fix common/ includes.
179 * lynx-i386-low.c: Fix common/ includes.
180 * linux-x86-tdesc-selftest.c: Fix common/ includes.
181 * linux-x86-low.c: Fix common/ includes.
182 * linux-low.c: Fix common/ includes.
183 * inferiors.h: Fix common/ includes.
184 * i387-fp.c: Fix common/ includes.
185 * hostio.c: Fix common/ includes.
186 * hostio-errno.c: Fix common/ includes.
187 * gdbthread.h: Fix common/ includes.
188 * gdbreplay.c: Fix common/ includes.
189 * fork-child.c: Fix common/ includes.
190 * event-loop.c: Fix common/ includes.
191 * ax.c:
192 (enum gdb_agent_op): Fix common/ includes.
193
194 2019-01-21 Tom Tromey <tom@tromey.com>
195
196 * tracepoint.c: Fix includes.
197 * remote-utils.c: Fix includes.
198 * linux-x86-low.c: Fix includes.
199
200 2019-01-01 Joel Brobecker <brobecker@adacore.com>
201
202 * gdbreplay.c (gdbreplay_version): Update copyright year in
203 version message.
204 * server.c (gdbserver_version): Likewise.
205
206 2018-12-05 Alan Hayward <alan.hayward@arm.com>
207
208 * linux-low.c (add_lwp): Switch ordering.
209
210 2018-11-29 Tom Tromey <tom@tromey.com>
211
212 * win32-low.c (win32_join): Take pid, not process.
213 * target.h (struct target_ops) <join>: Change argument type.
214 (join_inferior): Change argument name.
215 * spu-low.c (spu_join): Take pid, not process.
216 * server.c (handle_detach): Preserve pid before destroying
217 process.
218 * lynx-low.c (lynx_join): Take pid, not process.
219 * linux-low.c (linux_join): Take pid, not process.
220
221 2018-11-23 Alan Hayward <alan.hayward@arm.com>
222
223 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
224 (aarch64_cannot_fetch_register): Likewise.
225 (struct linux_target_ops): Update references.
226
227 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
228
229 * linux-ppc-low.c: Include nat/linux-ptrace.h.
230
231 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
232
233 * configure.srv (ipa_ppc_linux_regobj): Add
234 powerpc-isa207-htm-vsx32l-ipa.o and
235 powerpc-isa207-htm-vsx64l-ipa.o.
236 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
237 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
238 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
239 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
240 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
241 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
242 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
243 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
244 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
245 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
246 (init_registers_powerpc_isa207_htm_vsx32l)
247 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
248 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
249 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
250 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
251 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
252 (ppc_store_tm_ctarregset): New functions.
253 (ppc_regsets): Add entries for HTM regsets.
254 (ppc_arch_setup): Set htm in features struct when needed. Set
255 sizes for the HTM regsets.
256 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
257 (initialize_low_arch): Call
258 init_registers_powerpc_isa207_htm_vsx32l and
259 init_registers_powerpc_isa207_htm_vsx64l.
260 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
261 PPC_TDESC_ISA207_HTM_VSX.
262 (initialize_low_tracepoint): Call
263 init_registers_powerpc_isa207_htm_vsx32l and
264 init_registers_powerpc_isa207_htm_vsx64l.
265
266 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
267
268 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
269 rs6000/power-linux-pmu.xml to srv_xmlfiles.
270 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
271 (ppc_store_pmuregset): New functions.
272 (ppc_regsets): Add entries for ebb and pmu regsets.
273 (ppc_arch_setup): Set isa207 in features struct if the ebb and
274 pmu regsets are available. Set sizes for these regsets.
275
276 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
277
278 * configure.srv (ipa_ppc_linux_regobj): Add
279 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
280 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
281 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
282 rs6000/powerpc-isa207-vsx32l.xml, and
283 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
284 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
285 <PPC_TDESC_ISA207_VSX>: New enum value.
286 (init_registers_powerpc_isa207_vsx32l): Declare.
287 (init_registers_powerpc_isa207_vsx64l): Declare.
288 * linux-ppc-low.c (ppc_fill_tarregset): New function.
289 (ppc_store_tarregset): New function.
290 (ppc_regsets): Add entry for the TAR regset.
291 (ppc_arch_setup): Set isa207 in features struct when needed. Set
292 size for the TAR regsets.
293 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
294 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
295 and init_registers_powerpc_isa207_vsx64l.
296 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
297 (initialize_low_tracepoint): Call
298 init_registers_powerpc_isa207_vsx32l and
299 init_registers_powerpc_isa207_vsx64l.
300
301 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
302 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
303
304 * configure.srv (ipa_ppc_linux_regobj): Add
305 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
306 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
307 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
308 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
309 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
310 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
311 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
312 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
313 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
314 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
315 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
316 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
317 (ppc_hwcap): Add comment.
318 (ppc_hwcap2): New global.
319 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
320 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
321 (ppc_regsets): Add entries for the DSCR and PPR regsets.
322 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
323 when needed. Set sizes for the the DSCR and PPR regsets.
324 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
325 (initialize_low_arch): Call
326 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
327 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
328 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
329 PPC_TDESC_ISA205_PPR_DSCR_VSX.
330 (initialize_low_tracepoint): Call
331 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
332 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
333
334 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
335
336 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
337
338 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
339 Simon Marchi <simark@simark.ca>
340
341 * acinclude.m4: Include "../selftest.m4".
342 * configure: Regenerate.
343 * configure.ac: Use "GDB_AC_SELFTEST".
344 * configure.srv: Use "$enable_unittests" instead of
345 "$development" when checking whether unit tests have been
346 enabled.
347 * server.c (captured_main): Update message informing that
348 selftests have been disabled.
349
350 2018-10-04 Tom Tromey <tom@tromey.com>
351
352 * configure: Rebuild.
353
354 2018-10-04 Tom Tromey <tom@tromey.com>
355
356 * server.c (handle_status): Rename inner "thread".
357 (process_serial_event): Declare "res" in 'm' case.
358 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
359 (iterate_over_lwps): Rename inner "thread".
360 (linux_qxfer_libraries_svr4): Rename inner "len".
361 * gdbthread.h (find_thread_in_random): Rename inner "thread".
362
363 2018-10-01 Gary Benson <gbenson@redhat.com>
364
365 * gdb_proc_service.h: Moved common code to
366 common/gdb_proc_service.h.
367
368 2018-10-01 Gary Benson <gbenson@redhat.com>
369
370 * gdb_proc_service.h: Synchronize comments and whitespace with
371 GDB's version of this file.
372
373 2018-09-25 Tom Tromey <tom@tromey.com>
374
375 * configure: Rebuild.
376 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
377
378 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
379
380 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
381 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
382 ($(IPA_LIB)): Sort IPA_OBJS.
383
384 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
385
386 * Makefile.in: Remove references to $(ADD_DEPS).
387
388 2018-09-16 Tom Tromey <tom@tromey.com>
389
390 * remote-utils.c (remote_open): Use GNU style for metasyntactic
391 variables.
392 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
393 variables.
394
395 2018-09-05 Tom Tromey <tom@tromey.com>
396
397 * configure: Rebuild.
398
399 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
400
401 PR build/23399
402 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
403
404 2018-08-27 Tom Tromey <tom@tromey.com>
405
406 PR build/23087:
407 * configure: Rebuild.
408
409 2018-08-27 Tom Tromey <tom@tromey.com>
410
411 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
412 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
413 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
414 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
415 (s390x_emit_stack_adjust): Add casts to unsigned char.
416
417 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
418
419 PR gdb/23374
420 PR gdb/23375
421 * server.h (struct client_state) <disable_randomization>:
422 Initialize to 1.
423
424 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
425
426 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
427 variable.
428 (mips_supply_ptrace_register): Likewise.
429
430 2018-07-22 Tom Tromey <tom@tromey.com>
431
432 * configure: Rebuild.
433
434 2018-07-22 Tom Tromey <tom@tromey.com>
435
436 * win32-low.c (win32_create_inferior): Remove unused variables.
437 * gdbreplay.c (remote_open): Remove unused variable.
438 * remote-utils.c (remote_prepare): Remove unused variable.
439 * x86-tdesc.h (X86_TDESC_H): Define.
440 (amd64_expedite_regs): Define conditionally.
441 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
442 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
443 * remote-utils.c (readchar): Remove unused variable.
444
445 2018-07-13 Pedro Alves <palves@redhat.com>
446
447 * linux-low.c (linux_kill): Change parameter to process_info
448 pointer instead of pid. Adjust.
449 * lynx-low.c (lynx_kill): Likewise.
450 * nto-low.c (nto_kill): Likewise.
451 * spu-low.c (spu_kill): Likewise.
452 * win32-low.c (win32_kill): Likewise.
453 * server.c (handle_v_kill, kill_inferior_callback)
454 (detach_or_kill_for_exit): Adjust.
455 * target.c (kill_inferior): Change parameter to process_info
456 pointer instead of pid. Adjust.
457 * target.h (struct target_ops) <kill>: Change parameter to
458 process_info pointer instead of pid. Adjust all implementations
459 and callers.
460 (kill_inferior): Likewise.
461
462 2018-07-13 Pedro Alves <palves@redhat.com>
463
464 * linux-low.c (linux_detach, linux_join): Change parameter to
465 process_info pointer instead of pid. Adjust.
466 * lynx-low.c (lynx_detach, lynx_join): Likewise.
467 * nto-low.c (nto_detach): Likewise.
468 * spu-low.c (spu_detach, spu_join): Likewise.
469 * win32-low.c (win32_detach, win32_join): Likewise.
470 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
471 * target.h (struct target_ops) <detach, join>: Change parameter to
472 process_info pointer instead of pid. Adjust all implementations
473 and callers.
474 (detach_inferior, join_inferior): Rename 'pid' parameter to
475 'proc'.
476
477 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
478 Jan Kratochvil <jan.kratochvil@redhat.com>
479 Paul Fertser <fercerpav@gmail.com>
480 Tsutomu Seki <sekiriki@gmail.com>
481
482 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
483 (OBS): Add 'common/netstuff.o'.
484 (GDBREPLAY_OBS): Likewise.
485 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
486 (remote_open): Implement support for IPv6
487 connections.
488 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
489 and 'wspiapi.h'.
490 (handle_accept_event): Accept connections from IPv6 sources.
491 (remote_prepare): Handle IPv6-style hostnames; implement
492 support for IPv6 connections.
493 (remote_open): Implement support for printing connections from
494 IPv6 sources.
495
496 2018-07-11 Pedro Alves <palves@redhat.com>
497
498 PR gdb/23377
499 * mem-break.c (any_persistent_commands): Add process_info
500 parameter and use it instead of relying on the current process.
501 Change return type to bool.
502 * mem-break.h (any_persistent_commands): Add process_info
503 parameter and change return type to bool.
504 * server.c (handle_detach): Remove require_running_or_return call.
505 Look up the process_info for the process we're about to detach.
506 If not found, return back error to GDB. Adjust
507 any_persistent_commands call to pass down a process pointer.
508
509 2018-07-11 Pedro Alves <palves@redhat.com>
510
511 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
512 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
513 instead of collect_register_by_name.
514 * regcache.c (regcache_raw_get_unsigned_by_name): New.
515 * regcache.h (regcache_raw_get_unsigned_by_name): New.
516
517 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
518 Pedro Alves <palves@redhat.com>
519
520 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
521
522 2018-07-03 Tom Tromey <tom@tromey.com>
523
524 * linux-low.c: Update.
525 * lynx-low.c: Update.
526 * mem-break.c: Update.
527 * nto-low.c: Update.
528 * remote-utils.c: Update.
529 * server.c: Update.
530 * spu-low.c: Update.
531 * target.c: Update.
532 * win32-low.c: Update.
533
534 2018-07-03 Tom Tromey <tom@tromey.com>
535
536 * server.c: Update.
537
538 2018-07-03 Tom Tromey <tom@tromey.com>
539
540 * linux-low.c: Update.
541
542 2018-07-03 Tom Tromey <tom@tromey.com>
543
544 * target.c: Update.
545
546 2018-07-03 Tom Tromey <tom@tromey.com>
547
548 * linux-low.c: Update.
549 * linux-mips-low.c: Update.
550 * lynx-low.c: Update.
551 * nto-low.c: Update.
552 * remote-utils.c: Update.
553 * server.c: Update.
554 * spu-low.c: Update.
555 * target.c: Update.
556 * thread-db.c: Update.
557
558 2018-07-03 Tom Tromey <tom@tromey.com>
559
560 * linux-low.c: Update.
561 * linux-mips-low.c: Update.
562 * lynx-low.c: Update.
563 * mem-break.c: Update.
564 * nto-low.c: Update.
565 * remote-utils.c: Update.
566 * server.c: Update.
567 * spu-low.c: Update.
568 * target.c: Update.
569 * tracepoint.c: Update.
570
571 2018-07-03 Tom Tromey <tom@tromey.com>
572
573 * linux-low.c: Update.
574 * linux-ppc-low.c: Update.
575 * linux-x86-low.c: Update.
576 * proc-service.c: Update.
577 * server.c: Update.
578 * spu-low.c: Update.
579 * thread-db.c: Update.
580 * win32-low.c: Update.
581
582 2018-07-03 Tom Tromey <tom@tromey.com>
583
584 * linux-low.c: Update.
585 * lynx-low.c: Update.
586 * nto-low.c: Update.
587 * remote-utils.c: Update.
588 * spu-low.c: Update.
589 * thread-db.c: Update.
590 * win32-low.c: Update.
591
592 2018-06-29 Joel Brobecker <brobecker@adacore.com>
593
594 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
595 parameter in call to 'amd64_create_target_description'.
596
597 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
598
599 * x86-tdesc.h: Remove executable permission flag.
600
601 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
602
603 * configure.ac: Remove AC_PREREQ, add missing quoting.
604 * configure: Re-generate.
605 * config.in: Re-generate.
606 * aclocal.m4: Re-generate.
607
608 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
609
610 * tracepoint.h (current_traceframe): Remove declaration.
611
612 2018-06-18 Alan Hayward <alan.hayward@arm.com>
613
614 * linux-aarch64-low.c (is_sve_tdesc): New function.
615 (aarch64_sve_regs_copy_to_regcache): Likewise.
616 (aarch64_sve_regs_copy_from_regcache): Likewise.
617 (aarch64_regs_info): Add SVE checks.
618 (initialize_low_arch): Initialize SVE.
619
620 2018-06-18 Alan Hayward <alan.hayward@arm.com>
621
622 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
623
624 2018-06-11 Alan Hayward <alan.hayward@arm.com>
625
626 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
627 (initialize_low_tracepoint): Likewise
628 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
629 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
630 param.
631 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
632 checks.
633 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
634
635 2018-06-11 Alan Hayward <alan.hayward@arm.com>
636
637 * server.h (PBUFSIZ): Increase size
638
639 2018-06-11 Alan Hayward <alan.hayward@arm.com>
640
641 * regcache.c (regcache::raw_compare): New function.
642 * regcache.h (regcache::raw_compare): New declaration.
643
644 2018-06-11 Alan Hayward <alan.hayward@arm.com>
645
646 * regcache.c (new_register_cache): Use new.
647 (free_register_cache): Use delete.
648 (register_data): Use const.
649 (supply_register): Move body inside regcache.
650 (regcache::raw_supply): New override function.
651 (collect_register): Move body inside regcache.
652 (regcache::raw_collect): New override function.
653 (regcache::get_register_status): New override function.
654 * regcache.h (struct regcache): Inherit from reg_buffer_common.
655
656 2018-06-09 Tom Tromey <tom@tromey.com>
657
658 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
659 declare queue.
660 (event_queue): Use std::queue.
661 (gdb_event_xfree): Remove.
662 (initialize_event_loop, process_event, wait_for_event): Update.
663
664 2018-06-08 Stan Cox <scox@redhat.com>
665
666 * win32-low.c (win32_create_inferior): last_ptid and last_status
667 moved to client_state.
668
669 2018-06-08 Pedro Alves <palves@redhat.com>
670
671 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
672 common/common-exceptions.o, common/common-utils.o,
673 common/errors.o, common/print-utils.o and utils.o.
674 * gdbreplay.c: Include "common-defs.h" instead of the two
675 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
676 string.h or alloca.h.
677 (perror_with_name): Delete.
678 (remote_open): Use xstrdup instead of strdup.
679 (main): Rename to ...
680 (captured_main): ... this.
681 (main): New.
682
683 2018-06-08 Tom Tromey <tom@tromey.com>
684
685 * linux-low.c (linux_low_read_btrace): Update.
686
687 2018-06-04 Stan Cox <scox@redhat.com>
688
689 * server.h (struct client_state): New.
690 * server.c (cont_thread, general_thread, multi_process)
691 (report_fork_events, report_vfork_events, report_exec_events)
692 (report_thread_events, swbreak_feature, hwbreak_feature)
693 (vCont_supported, disable_randomization, pass_signals)
694 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
695 Moved to client_state.
696 * remote-utils.c (remote_debug, noack_mode)
697 (transport_is_reliable): Moved to client_state.
698 * tracepoint.c (current_traceframe): Moved to client_state.
699
700 Update all callers.
701 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
702 linux-low.c, remote-utils.h, target.c: Use client_state.
703
704 2018-05-31 Alan Hayward <alan.hayward@arm.com>
705
706 * configure.srv: Add new c/h file.
707
708 2018-05-31 Alan Hayward <alan.hayward@arm.com>
709
710 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
711 null VQ.
712
713 2018-05-25 Maciej W. Rozycki <macro@mips.com>
714
715 * gdb.arch/mips-fpregset-core.exp: New test.
716 * gdb.arch/mips-fpregset-core.c: New test source.
717
718 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
719
720 PR server/23198
721 * hostio.c (require_int): Do not report overflow for integers
722 between 0xfffffff and 0x7fffffff.
723
724 2018-05-22 Maciej W. Rozycki <macro@mips.com>
725
726 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
727 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
728 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
729 functions.
730 (the_low_target): Wire them.
731
732 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
733
734 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
735 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
736 mode. Call collect_register_by_name with vscr using
737 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
738 (ppc_store_vrregset): Add and set vscr_offset variable as in
739 ppc_fill_vrregset. Call supply_register_by_name with vscr using
740 vscr_offset.
741
742 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
743
744 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
745 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
746 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
747
748 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
749
750 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
751 (ppc_store_vsxregset): Likewise.
752 (ppc_fill_vrregset): Likewise.
753 (ppc_store_vrregset): Likewise.
754 (ppc_fill_evrregset): Likewise.
755 (ppc_store_evrregset): Likewise.
756 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
757 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
758 needed.
759
760 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
761
762 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
763 wordsize of the inferior. Call ppc_linux_target_wordsize.
764
765 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
766
767 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
768 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
769 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
770 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
771 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
772 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
773 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
774 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
775 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
776 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
777 (tdesc_powerpc_e500l): Remove.
778 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
779 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
780 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
781 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
782 linux-ppc-tdesc.h.
783 (ppc_arch_setup): Remove target description matching code. Fill a
784 ppc_linux_features struct and call ppc_linux_match_description
785 with it.
786
787 2018-05-22 Maciej W. Rozycki <macro@mips.com>
788
789 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
790 width of the requested register exceeds the width of the
791 `ptrace' data type.
792 (mips_cannot_store_register): Likewise.
793
794 2018-05-21 Maciej W. Rozycki <macro@mips.com>
795
796 * linux-mips-low.c (mips_fetch_register): New function. Update
797 preceding comment.
798 (mips_store_gregset): Supply 0 rather than $restart for $zero.
799 (the_low_target): Wire `mips_fetch_register'.
800
801 2018-05-10 Joel Brobecker <brobecker@adacore.com>
802
803 * lynx-i386-low.c (LYNXOS_178): New macro.
804 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
805 the layout on LynxOS-178.
806 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
807 handle floating point registers that are not supported by
808 LynxOS-178.
809
810 2018-05-10 Tom Tromey <tom@tromey.com>
811
812 * configure: Rebuild.
813
814 2018-05-10 Joel Brobecker <brobecker@adacore.com>
815
816 PR server/23158:
817 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
818 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
819 Use it to set the expedite_regs field in the given tdesc.
820 * x86-tdesc.h: New file.
821 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
822 Adjust following the addition of the new expedite_regs parameter
823 to init_target_desc.
824 * linux-tic6x-low.c (tic6x_read_description): Likewise.
825 * linux-x86-tdesc.c: #include "x86-tdesc.h".
826 (i386_linux_read_description, amd64_linux_read_description):
827 Adjust following the addition of the new expedite_regs parameter
828 to init_target_desc.
829 * lynx-i386-low.c: #include "x86-tdesc.h".
830 (lynx_i386_arch_setup): Adjust following the addition of the new
831 expedite_regs parameter to init_target_desc.
832 * nto-x86-low.c: #include "x86-tdesc.h".
833 (nto_x86_arch_setup): Adjust following the addition of the new
834 expedite_regs parameter to init_target_desc.
835 * win32-i386-low.c: #include "x86-tdesc.h".
836 (i386_arch_setup): Adjust following the addition of the new
837 expedite_regs parameter to init_target_desc.
838
839 2018-05-10 Joel Brobecker <brobecker@adacore.com>
840
841 PR server/23158:
842 * win32-low.c (win32_create_inferior): Add call to my_wait
843 setting last_status global.
844
845 2018-05-10 Joel Brobecker <brobecker@adacore.com>
846
847 PR server/23158:
848 * win32-low.c (create_process): Only call gdb_tilde_expand if
849 inferior_cwd is not NULL.
850
851 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
852
853 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
854 registers to the cache if their values have changed.
855 (i387_xsave_to_cache): Provide default values for x87 control
856 registers when these features are available, but disabled.
857 * regcache.c (supply_register_by_name_zeroed): New function.
858 * regcache.h (supply_register_by_name_zeroed): Declare new
859 function.
860
861 2018-05-07 Tom Tromey <tom@tromey.com>
862
863 * configure: Rebuild.
864
865 2018-05-04 Tom Tromey <tom@tromey.com>
866
867 * configure: Rebuild.
868
869 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
870 Pedro Alves <palves@redhat.com>
871
872 * linux-aarch64-low.c (aarch64_stopped_data_address):
873 Likewise.
874
875 2018-04-27 Tom Tromey <tom@tromey.com>
876
877 * configure: Rebuild.
878
879 2018-04-23 Tom Tromey <tom@tromey.com>
880
881 * configure: Rebuild.
882
883 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
884
885 * Makefile.in (depcomp): Add "..".
886 (all_deps_files): New and use it.
887
888 2018-04-18 Alan Hayward <alan.hayward@arm.com>
889
890 * configure.srv (aarch64*-*-linux*): Don't include xml.
891 (i[34567]86-*-cygwin*): Likewise.
892 (i[34567]86-*-linux*): Likewise.
893 (i[34567]86-*-lynxos*): Likewise.
894 (i[34567]86-*-mingw32ce*): Likewise.
895 (i[34567]86-*-mingw*): Likewise.
896 (i[34567]86-*-nto*): Likewise.
897 (tic6x-*-uclinux): Likewise.
898 (x86_64-*-linux*): Likewise.
899 (x86_64-*-mingw*): Likewise.
900 (x86_64-*-cygwin*): Likewise.
901
902 2018-04-18 Alan Hayward <alan.hayward@arm.com>
903
904 * tdesc.c: Remove xml parameter.
905
906 2018-04-18 Alan Hayward <alan.hayward@arm.com>
907
908 * server.c (get_features_xml): Remove cast.
909 * tdesc.c (void target_desc::accept): Fill in function.
910 (tdesc_get_features_xml): Remove old xml creation.
911 (print_xml_feature::visit_pre): Add xml vistor.
912 * tdesc.h (struct target_desc): Make xmltarget mutable.
913 (tdesc_get_features_xml): Remove declaration.
914
915 2018-04-18 Alan Hayward <alan.hayward@arm.com>
916
917 * tdesc.c (tdesc_architecture_name): Add new function.
918 (tdesc_osabi_name): Likewise.
919 (tdesc_get_features_xml): Use new functions.
920
921 2018-04-18 Alan Hayward <alan.hayward@arm.com>
922
923 * tdesc.c (tdesc_create_flags): Remove.
924 (tdesc_add_flag): Likewise.
925 (tdesc_named_type): Likewise.
926 (tdesc_create_union): Likewise.
927 (tdesc_create_struct): Likewise.
928 (tdesc_create_vector): Likewise.
929 (tdesc_add_bitfield): Likewise.
930 (tdesc_add_field): Likewise.
931 (tdesc_set_struct_size): Likewise.
932
933 2018-04-18 Alan Hayward <alan.hayward@arm.com>
934
935 * tdesc.c (~target_desc): Remove implictly deleted items.
936 (init_target_desc): Iterate all features.
937 (tdesc_get_features_xml): Use vector.
938 (tdesc_create_feature): Create feature.
939 * tdesc.h (tdesc_feature) Remove
940 (target_desc): Add features.
941
942 2018-04-18 Alan Hayward <alan.hayward@arm.com>
943
944 * Makefile.in: Add common/tdesc.c
945 * tdesc.c (init_target_desc): init all reg_defs from register
946 vector.
947 (tdesc_create_reg): Create tdesc_reg.
948 * tdesc.h (tdesc_feature): Add register vector.
949
950 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
951
952 * tdesc.h (struct target_desc) <features>: Change type to
953 std::vector<std::string>.
954 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
955 changes.
956 (tdesc_get_features_xml): Likewise.
957 (tdesc_create_feature): Likewise.
958
959 2018-03-26 Alan Hayward <alan.hayward@arm.com>
960
961 * regcache.c (find_register_by_number): Return a ref.
962 (find_regno): Use references.
963 (register_size): Likewise.
964 (register_data): Likewise.
965 * tdesc.c (target_desc::~target_desc): Remove free calls.
966 (target_desc::operator==): Use std::vector compare.
967 (init_target_desc): Use reference.
968 (tdesc_create_reg): Use reg constructors.
969 * tdesc.h (struct target_desc): Replace pointer with object.
970
971 2018-03-23 Alan Hayward <alan.hayward@arm.com>
972
973 * regcache.c (find_register_by_number): Make static.
974 (find_regno): Use find_register_by_number
975 * regcache.h (struct reg): Remove declaration.
976
977 2018-03-23 Alan Hayward <alan.hayward@arm.com>
978
979 * tdesc.c (target_desc::~target_desc): Move to here.
980 (target_desc::operator==): Likewise.
981 * tdesc.h (target_desc::~target_desc): Move from here.
982 (target_desc::operator==): Likewise.
983
984 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
985
986 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
987
988 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
989
990 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
991 S390_TDESC_GS.
992 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
993 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
994 and init_registers_s390_gs_linux64.
995
996 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
997
998 * linux-s390-low.c (s390_fill_gs): Remove function.
999 (s390_fill_gsbc): Remove function.
1000 (s390_regsets): Set fill functions for the guarded storage regsets
1001 to NULL.
1002
1003 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
1004
1005 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
1006 the word size. Add comment.
1007 (s390_get_wordsize): New function.
1008 (s390_arch_setup): No longer select a temporary tdesc to fetch the
1009 pswm with it. Instead, use s390_get_wordsize to determine the
1010 word size first and derive the correct tdesc from that directly.
1011
1012 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
1013
1014 * Makefile.in: Include silent-rules.mk.
1015 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
1016 (COMPILE): Add ECHO_CXX.
1017 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1018 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
1019 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
1020 (version-generated.c): Add ECHO_GEN.
1021 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
1022 (IPAGENT_COMPILE): Add ECHO_CXX.
1023 (%-generated.c): Add ECHO_REGDAT.
1024
1025 2018-03-14 Tom Tromey <tom@tromey.com>
1026
1027 PR cli/14977:
1028 * ax.c (ax_printf): Special case for NULL.
1029
1030 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1031
1032 * linux-low.c (linux_qxfer_libraries_svr4): Use
1033 xml_escape_text_append.
1034
1035 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
1036
1037 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
1038
1039 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1040
1041 * server.c (handle_general_set): Remove unnecessary xstrdup.
1042
1043 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
1044
1045 * server.c (parse_debug_format_options): Adjust to
1046 delim_string_to_char_ptr_vec changes.
1047 * thread-db.c (thread_db_load_search): Adjust to
1048 dirnames_to_char_ptr_vec changes.
1049
1050 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
1051
1052 * target.h (target_enable_btrace, target_disable_btrace)
1053 (target_read_btrace, target_read_btrace_conf): Turn macro into
1054 inline function. Throw error if target method is not defined.
1055 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
1056 check for btrace target method. Be prepared to handle exceptions
1057 from btrace target methods.
1058
1059 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1060
1061 * server.c (captured_main): Change order of error message printed
1062 when the current working directory cannot be found.
1063
1064 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1065
1066 * server.c: Include "filenames.h" and "pathstuff.h".
1067 (program_name): Delete variable.
1068 (program_path): New anonymous class.
1069 (get_exec_wrapper): Use "program_path" instead of
1070 "program_name".
1071 (handle_v_run): Likewise.
1072 (captured_main): Likewise.
1073 (process_serial_event): Likewise.
1074
1075 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
1076
1077 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
1078 (OBJS): Add "pathstuff.o".
1079 * server.c (current_directory): New global variable.
1080 (captured_main): Initialize "current_directory".
1081
1082 2018-02-26 Alan Hayward <alan.hayward@arm.com>
1083
1084 * tdesc.c: Use common/tdesc.h.
1085 * tdesc.h: Likewise.
1086
1087 2018-02-20 Alan Hayward <alan.hayward@arm.com>
1088 Simon Marchi <simon.marchi@ericsson.com>
1089
1090 * Makefile.in: Switch order of make rules.
1091
1092 2018-02-19 Alan Hayward <alan.hayward@arm.com>
1093
1094 * Makefile.in: Add common directory in build.
1095 * configure.ac: Add common reference.
1096 * configure: Regenerate.
1097
1098 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1099
1100 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1101 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1102 * spu-low.c (spu_target_ops): Likewise.
1103 * win32-low.c (win32_target_ops): Likewise.
1104 * server.c (supported_btrace_packets): Report packets unconditionally.
1105 * target.h (target_ops) <supports_btrace>: Remove.
1106 (target_supports_btrace): Remove.
1107
1108 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1109
1110 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1111 (handle_btrace_disable): Change return type to void. Use exceptions
1112 to report errors.
1113 (handle_btrace_general_set): Catch exception and copy message to
1114 return message.
1115
1116 2018-02-08 Tom Tromey <tom@tromey.com>
1117
1118 * linux-low.c (install_software_single_step_breakpoints): Use
1119 make_scoped_restore.
1120 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1121 (do_restore_current_thread_cleanup): Remove.
1122 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1123 declare.
1124
1125 2018-02-08 Tom Tromey <tom@tromey.com>
1126
1127 * mem-break.c (set_raw_breakpoint_at): Use
1128 gdb::unique_xmalloc_ptr.
1129
1130 2018-01-30 Pedro Alves <palves@redhat.com>
1131
1132 PR gdb/13211
1133 * target.c (target_terminal::terminal_state): Rename to ...
1134 (target_terminal::m_terminal_state): ... this.
1135
1136 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1137
1138 * linux-low.c (handle_extended_wait): Surround call to
1139 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1140
1141 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1142
1143 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1144 linux_ptrace_attach_fail_reason_string now returning an
1145 std::string.
1146 (linux_attach): Likewise.
1147 * thread-db.c (attach_thread): Likewise.
1148
1149 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1150
1151 PR gdb/21559
1152 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1153 checking for fs_base/gs_base fields in struct user_regs_struct.
1154 * configure: Regenerate.
1155
1156 2018-01-16 Yao Qi <yao.qi@linaro.org>
1157
1158 PR gdb/18749
1159 * linux-low.c (fetch_register): Call supply_register instead of
1160 error.
1161
1162 2018-01-08 Yao Qi <yao.qi@linaro.org>
1163 Simon Marchi <simon.marchi@ericsson.com>
1164
1165 * Makefile.in (OBS): Remove selftest.o.
1166 * configure.ac: Set srv_selftest_objs if $development is true.
1167 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1168 * configure: Re-generated.
1169 * server.c (captured_main): Wrap variable selftest_filter with
1170 GDB_SELF_TEST.
1171
1172 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1173
1174 * server.c (parse_debug_format_options): Return std::string.
1175 (handle_monitor_command, captured_main): Adjust.
1176
1177 2018-01-05 Pedro Alves <palves@redhat.com>
1178
1179 PR gdb/18653
1180 * server.c (captured_main): Pass quiet=false to
1181 save_original_signals_state.
1182
1183 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1184
1185 * gdbreplay.c (gdbreplay_version): Update copyright year in
1186 version message.
1187 * server.c (gdbserver_version): Likewise.
1188
1189 2017-12-08 Tom Tromey <tom@tromey.com>
1190
1191 * ax.c (ax_printf): Update.
1192
1193 2017-12-07 Yao Qi <yao.qi@linaro.org>
1194
1195 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1196 aarch64_linux_read_description.
1197 * linux-amd64-ipa.c (idx2mask): New array.
1198 (get_ipa_tdesc): Move idx2mask out.
1199 (initialize_low_tracepoint): Initialize target descriptions.
1200 * linux-i386-ipa.c (idx2mask): New array.
1201 (get_ipa_tdesc): Move idx2mask out.
1202 (initialize_low_tracepoint): Initialize target descriptions.
1203
1204 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1205
1206 * tdesc.c (struct tdesc_type): Change return type.
1207 (tdesc_add_flag): Change parameter type.
1208 (tdesc_add_bitfield): Likewise.
1209 (tdesc_add_field): Likewise.
1210 (tdesc_set_struct_size): Likewise.
1211
1212 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1213
1214 * regcache.c (registers_to_string): Remove unused variable.
1215
1216 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1217
1218 * inferiors.c (for_each_inferior_with_data): Remove.
1219 * inferiors.h (for_each_inferior_with_data): Remove.
1220 * server.c (handle_qxfer_threads_worker): Change parameter type.
1221 (handle_qxfer_threads_proper): Use for_each_thread.
1222
1223 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1224
1225 * inferiors.c (for_each_inferior): Remove.
1226 (clear_inferiors): Use for_each_thread.
1227 * inferiors.h (for_each_inferior): Remove.
1228 * linux-low.c (linux_wait_for_event_filtered): Use
1229 for_each_thread.
1230 (linux_stabilize_threads): Likewise.
1231 * regcache.c (regcache_release): Likewise.
1232 * server.c (gdb_wants_all_threads_stopped): Likewise.
1233 (clear_pending_status_callback): Remove.
1234 (handle_status): Use for_each_thread.
1235 (captured_main): Likewise.
1236 * win32-low.c (child_init_thread_list): Likewise.
1237 (win32_clear_inferiors): Likewise.
1238 (fake_breakpoint_event): Likewise.
1239
1240 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1241
1242 * inferiors.h (find_inferior): Remove.
1243 * inferiors.c (find_inferior): Remove.
1244
1245 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1246
1247 * linux-low.c (resume_status_pending_p): Update comment.
1248 (need_step_over_p): Update comment.
1249
1250 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1251
1252 * linux-low.c (proceed_one_lwp): Return void, change parameter
1253 type.
1254 (unsuspend_and_proceed_one_lwp): Likewise.
1255 (proceed_all_lwps): Use for_each_thread.
1256 (unstop_all_lwps): Likewise.
1257
1258 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1259
1260 * linux-low.c (linux_resume_one_thread): Return void, take
1261 parameter directly.
1262 (linux_resume): Use for_each_thread.
1263
1264 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1265
1266 * linux-low.c (send_sigstop_callback): Return void, change
1267 parameter type. Rename to...
1268 (send_sigstop): ... this.
1269 (suspend_and_send_sigstop_callback): Return void, change parameter
1270 type. Rename to...
1271 (suspend_and_send_sigstop): ... this.
1272 (stop_all_lwps): Use for_each_thread.
1273
1274 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1275
1276 * linux-low.c (lwp_running): Return bool, remove unused
1277 argument.
1278 (linux_stabilize_threads): Use find_thread.
1279
1280 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1281
1282 * linux-low.c (select_singlestep_lwp_callback): Remove.
1283 (count_events_callback): Remove.
1284 (select_event_lwp_callback): Remove.
1285 (select_event_lwp): Use find_thread/for_each_thread.
1286
1287 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1288
1289 * linux-low.c (not_stopped_callback): Return bool, take filter
1290 argument directly.
1291 (linux_wait_for_event_filtered): Use find_thread.
1292 (linux_wait_1): Likewise.
1293
1294 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1295
1296 * linux-low.c (same_lwp): Remove.
1297 (find_lwp_pid): Use find_thread.
1298
1299 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1300
1301 * linux-low.c (delete_lwp_callback): Remove.
1302 (linux_mourn): Use for_each_thread.
1303
1304 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1305
1306 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1307 args parameter, don't check for pid.
1308 (linux_detach): Use for_each_thread.
1309
1310 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1311
1312 * linux-low.c (struct counter): Remove.
1313 (second_thread_of_pid_p): Remove.
1314 (last_thread_of_process_p): Use find_thread.
1315
1316 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1317
1318 * inferiors.c (find_inferior_in_random): Remove.
1319 * inferiors.h (find_inferior_in_random): Remove.
1320 * linux-low.c (status_pending_p_callback): Return bool, accept
1321 parameter ptid directly.
1322 (linux_wait_for_event_filtered): Use find_thread_in_random.
1323 (linux_wait_1): Likewise.
1324
1325 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1326
1327 * inferiors.c (find_inferior_id): Remove.
1328 (find_thread_ptid): Move implemention from find_inferior_id to
1329 here.
1330 * inferiors.h (find_inferior_id): Remove.
1331 * server.c (handle_status): Use find_thread_ptid.
1332 (process_serial_event): Likewise.
1333 * thread-db.c (find_one_thread): Likewise.
1334 (thread_db_thread_handle): Likewise.
1335 * win32-low.c (thread_rec): Likewise.
1336 (child_delete_thread): Likewise.
1337 (win32_thread_alive): Likewise.
1338 (get_child_debug_event): Likewise.
1339
1340 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1341
1342 * linux-mips-low.c (update_watch_registers_callback): Return
1343 void, remove pid_p parameter, don't check for pid.
1344 (mips_insert_point, mips_remove_point): Use for_each_thread.
1345
1346 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1347
1348 * lynx.low (lynx_delete_thread_callback): Remove.
1349 (lynx_mourn): Use for_each_thread.
1350
1351 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1352
1353 * regcache.c (regcache_invalidate_one): Remove.
1354 (regcache_invalidate_pid): use for_each_thread.
1355
1356 2017-11-26 Tom Tromey <tom@tromey.com>
1357
1358 * linux-low.c (linux_create_inferior): Update.
1359
1360 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1361
1362 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1363
1364 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1365
1366 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1367 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1368 * linux-aarch64-tdesc-selftest.c: New file.
1369 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1370
1371 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1372
1373 * configure.srv: Add new file.
1374 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1375 * linux-aarch64-tdesc-selftest.c: New file.
1376 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1377
1378 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1379
1380 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1381 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1382 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1383
1384 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1385
1386 * configure.srv: Add new files.
1387 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1388 aarch64_linux_read_description.
1389 * linux-aarch64-low.c (aarch64_linux_read_description):
1390 Merge with aarch64_arch_setup.
1391 (aarch64_arch_setup): Call aarch64_linux_read_description.
1392 * linux-aarch64-tdesc.c: New file.
1393 * linux-aarch64-tdesc.h: New file.
1394
1395 2017-11-24 Yao Qi <yao.qi@linaro.org>
1396
1397 * configure.srv: Set $srv_regobj for tic6x-linux.
1398 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1399 (tic6x_read_description): Move some code to tic6x_arch_setup.
1400 (tic6x_tdesc_test): New function.
1401 (initialize_low_arch): Call selftests::register_test.
1402
1403 2017-11-22 Yao Qi <yao.qi@linaro.org>
1404
1405 * remote-utils.c (prepare_resume_reply): Use memcpy.
1406
1407 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1408
1409 * linux-low.c (kill_one_lwp_callback): Return void, take
1410 argument directly, don't filter on pid.
1411 (linux_kill): Use for_each_thread.
1412
1413 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1414
1415 * linux-low.c (need_step_over_p): Return bool, remove dummy
1416 argument.
1417 (linux_resume, proceed_all_lwps): Use find_thread.
1418
1419 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1420
1421 * linux-low.c (resume_status_pending_p): Return bool, remove
1422 flag_p argument.
1423 (linux_resume): Use find_thread.
1424
1425 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1426
1427 * linux-low.c (struct thread_resume_array): Remove.
1428 (linux_set_resume_request): Return void, take arguments
1429 directly.
1430 (linux_resume): Use for_each_thread.
1431
1432 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1433
1434 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1435 return bool, remove data argument.
1436 (linux_stabilize_threads): Use find_thread.
1437
1438 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1439
1440 * linux-low.c (unsuspend_one_lwp): Remove.
1441 (unsuspend_all_lwps): Use for_each_thread, inline code from
1442 unsuspend_one_lwp.
1443
1444 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1445
1446 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1447 * linux-low.c (struct iterate_over_lwps_args): Remove.
1448 (iterate_over_lwps_filter): Remove.
1449 (iterate_over_lwps): Use find_thread.
1450
1451 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1452
1453 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1454 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1455 code from reset_lwp_ptrace_options_callback.
1456
1457 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1458
1459 * linux-arm-low.c (struct update_registers_data): Remove.
1460 (update_registers_callback): Return void, take arguments
1461 directly, don't check thread's pid.
1462 (arm_insert_point, arm_remove_point): Use for_each_thread.
1463
1464 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1465
1466 * win32-low.c (continue_one_thread): Return void, take argument
1467 directly.
1468 (child_continue): Use for_each_thread.
1469
1470 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1471
1472 * win32-i386-low.c (update_debug_registers_callback): Rename
1473 to ...
1474 (update_debug_registers): ... this, return void, remove pid_p arg.
1475 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1476
1477 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1478
1479 * inferiors.h (struct process_info): Add constructor, initialize
1480 fields..
1481 <syscalls_to_catch>: Change type to std::vector<int>.
1482 * inferiors.c (add_process): Allocate process_info with new.
1483 (remove_process): Free process_info with delete.
1484 * linux-low.c (handle_extended_wait): Adjust.
1485 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1486 * server.c (handle_general_set): Adjust.
1487
1488 2017-11-16 Pedro Alves <palves@redhat.com>
1489
1490 * remote-utils.c (remote_close): Block SIGIO signals instead of
1491 uninstalling the SIGIO handler.
1492
1493 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1494
1495 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1496
1497 2017-11-16 Yao Qi <yao.qi@linaro.org>
1498
1499 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1500 (tic6x_store_gregset): Likewise.
1501 (tic6x_usrregs_info): Move it up.
1502
1503 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1504
1505 * Makefile.in: Update arch rules.
1506 * configure.srv: Explicitly mark arch/ files.
1507
1508 2017-11-13 Andreas Schwab <schwab@suse.de>
1509
1510 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1511 function.
1512 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1513
1514 2017-11-06 Pedro Alves <palves@redhat.com>
1515
1516 * config.in, configure: Regenerate.
1517
1518 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1519
1520 * target.c (struct thread_search): Remove.
1521 (thread_search_callback): Remove.
1522 (prepare_to_access_memory): Use for_each_thread instead of
1523 find_inferior. Inline code from thread_search_callback.
1524
1525 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1526
1527 * server.c (struct visit_actioned_threads_data): Remove.
1528 (visit_actioned_threads): Change prototype to take arguments
1529 directly.
1530 (resume): Use find_thread instead of find_inferior.
1531
1532 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1533
1534 * server.c (queue_stop_reply_callback): Change prototype, return
1535 void.
1536 (find_status_pending_thread_callback): Remove.
1537 (handle_status): Replace find_inferior with find_thread and
1538 for_each_thread.
1539
1540 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1541
1542 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1543 with REGNO.
1544 (aarch64_store_gregset): Likewise.
1545 (aarch64_fill_fpregset): Likewise.
1546 (aarch64_store_fpregset): Likewise.
1547
1548 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1549
1550 * gdbthread.h (find_thread, for_each_thread): New functions.
1551 * inferiors.c (thread_of_pid): Remove.
1552 (find_any_thread_of_pid): Use find_thread.
1553 * linux-low.c (num_lwps): Use for_each_thread.
1554
1555 2017-10-17 Yao Qi <yao.qi@linaro.org>
1556
1557 * Makefile.in: Remove one rule.
1558 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1559
1560 2017-10-17 Yao Qi <yao.qi@linaro.org>
1561
1562 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1563 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1564
1565 2017-10-17 Yao Qi <yao.qi@linaro.org>
1566
1567 * configure.srv: Rename arm.o with arch/arm.o.
1568
1569 2017-10-17 Yao Qi <yao.qi@linaro.org>
1570
1571 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1572 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1573 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1574 (arch-i386.o, arch-amd64.o): Remove rules.
1575 (arch/%.o): New rule.
1576 Update POSTCOMPILE and COMPILE.pre.
1577 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1578 * configure: Re-generated.
1579 * configure.srv: Replace arch-i386.o with arch/i386.o.
1580 Replace arch-amd64.o with arch/amd64.o.
1581
1582 2017-10-16 Yao Qi <yao.qi@linaro.org>
1583
1584 * configure: Regenerated.
1585
1586 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1587
1588 * inferiors.h: (struct inferior_list): Remove.
1589 (struct inferior_list_entry); Remove.
1590 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1591 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1592 get_first_inferior): Remove.
1593 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1594 find_inferior_id, find_inferior_in_random): Change signature.
1595 * inferiors.c (all_threads): Change type to
1596 std::list<thread_info *>.
1597 (get_thread): Remove macro.
1598 (find_inferior, find_inferior_id): Change signature, implement
1599 using find_thread.
1600 (find_inferior_in_random): Change signature, implement using
1601 find_thread_in_random.
1602 (for_each_inferior, for_each_inferior_with_data): Change
1603 signature, implement using for_each_thread.
1604 (add_inferior_to_list, remove_inferior): Remove.
1605 (add_thread, get_first_thread, thread_of_pid,
1606 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1607 (get_first_inferior, one_inferior_p, clear_inferior_list):
1608 Remove.
1609 (clear_inferiors, get_thread_process): Update.
1610 * gdbthread.h: Include <list>.
1611 (struct thread_info) <entry>: Remove field.
1612 <id>: New field.
1613 (all_threads): Change type to std::list<thread_info *>.
1614 (get_first_inferior): Add doc.
1615 (find_thread, for_each_thread, find_thread_in_random): New
1616 functions.
1617 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1618 * linux-arm-low.c (update_registers_callback): Update.
1619 * linux-low.c (second_thread_of_pid_p): Update.
1620 (kill_one_lwp_callback, linux_detach_lwp_callback,
1621 delete_lwp_callback, status_pending_p_callback, same_lwp,
1622 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1623 iterate_over_lwps, not_stopped_callback,
1624 resume_stopped_resumed_lwps, count_events_callback,
1625 select_singlestep_lwp_callback, select_event_lwp_callback,
1626 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1627 suspend_and_send_sigstop_callback, wait_for_sigstop,
1628 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1629 lwp_running, linux_set_resume_request, resume_status_pending_p,
1630 need_step_over_p, start_step_over, linux_resume_one_thread,
1631 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1632 reset_lwp_ptrace_options_callback): Update.
1633 * linux-mips-low.c (update_watch_registers_callback): Update.
1634 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1635 Update.
1636 (free_register_cache_thread_one): Remove.
1637 (regcache_release): Update.
1638 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1639 handle_qxfer_threads_worker): Update.
1640 (handle_query): Update, use list iterator.
1641 (visit_actioned_threads, handle_pending_status,
1642 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1643 clear_pending_status_callback, set_pending_status_callback,
1644 find_status_pending_thread_callback, handle_status,
1645 process_serial_event): Update.
1646 * target.c (thread_search_callback): Update.
1647 * thread-db.c (thread_db_get_tls_address): Update.
1648 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1649 Update.
1650 * win32-i386-low.c (update_debug_registers_callback): Update.
1651 * win32-low.c (delete_thread_info, child_delete_thread,
1652 continue_one_thread, suspend_one_thread,
1653 get_child_debug_event): Adjust.
1654
1655 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1656
1657 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1658 * inferiors.h: Include <list>.
1659 (struct process_info) <entry>: Remove field.
1660 <pid>: New field.
1661 (pid_of): Change macro to function.
1662 (ptid_of, lwpid_of): Remove macro.
1663 (all_processes): Change type to std::list<process_info *>.
1664 (ALL_PROCESSES): Remove macro.
1665 (for_each_process, find_process): New function.
1666 * inferiors.c (all_processes): Change type to
1667 std::list<process_info *>.
1668 (find_thread_process): Adjust.
1669 (add_process): Likewise.
1670 (remove_process): Likewise.
1671 (find_process_pid): Likewise.
1672 (get_first_process): Likewise.
1673 (started_inferior_callback): Remove.
1674 (have_started_inferiors_p): Adjust.
1675 (attached_inferior_callback): Remove.
1676 (have_attached_inferiors_p): Adjust.
1677 * linux-low.c (check_zombie_leaders): Likewise.
1678 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1679 (x86_linux_update_xmltarget): Adjust.
1680 * server.c (handle_query): Likewise.
1681 (gdb_reattached_process): Remove.
1682 (handle_status): Adjust.
1683 (kill_inferior_callback): Likewise.
1684 (detach_or_kill_inferior): Remove.
1685 (print_started_pid): Likewise.
1686 (print_attached_pid): Likewise.
1687 (detach_or_kill_for_exit): Update.
1688 (process_serial_event): Likewise.
1689 * linux-arm-low.c (arm_new_fork): Likewise.
1690
1691 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1692
1693 * dll.h: Include <list>.
1694 (struct dll_info): Add constructor.
1695 <entry>: Remove field.
1696 (all_dlls): Change type to std::list<dll_info>.
1697 * dll.c: Include <algorithm>.
1698 (get_dll): Remove macro.
1699 (all_dlls): Change type to std::list<dll_info *>.
1700 (free_one_dll): Remove.
1701 (match_dll): Likewise.
1702 (loaded_dll): Adjust.
1703 (unloaded_dll): Adjust to all_dlls type change, use
1704 std::find_if. Inline code from match_dll.
1705 (clear_dlls): Adjust to all_dlls type change.
1706 * server.c (emit_dll_description): Remove.
1707 (handle_qxfer_libraries): Adjust to all_dlls type change,
1708 integrate emit_dll_description's functionality.
1709
1710 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1711
1712 * linux-low.h (struct linux_target_ops) <delete_process>: New
1713 field.
1714 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1715 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1716 (struct linux_target_ops): Add delete_process callback.
1717 * linux-arm-low.c (arm_delete_process): New.
1718 (struct linux_target_ops): Add delete_process callback.
1719 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1720 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1721 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1722 * linux-mips-low.c (mips_linux_delete_process): New.
1723 (struct linux_target_ops): Add delete_process callback.
1724 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1725 * linux-s390-low.c (struct linux_target_ops): Likewise.
1726 * linux-sh-low.c (struct linux_target_ops): Likewise.
1727 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1728 * linux-tile-low.c (struct linux_target_ops): Likewise.
1729 * linux-x86-low.c (x86_linux_delete_process): New.
1730 (struct linux_target_ops): Add delete_process callback.
1731 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1732
1733 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1734
1735 * linux-aarch64-low.c (the_low_target): Add thread delete
1736 callback.
1737 * linux-arm-low.c (arm_delete_thread): New function.
1738 (the_low_target): Add thread delete callback.
1739 * linux-bfin-low.c (the_low_target): Likewise.
1740 * linux-crisv32-low.c (the_low_target): Likewise.
1741 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1742 set.
1743 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1744 field.
1745 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1746 * linux-mips-low.c (mips_linux_delete_thread): New function.
1747 (the_low_target): Add thread delete callback.
1748 * linux-ppc-low.c (the_low_target): Likewise.
1749 * linux-s390-low.c (the_low_target): Likewise.
1750 * linux-sh-low.c (the_low_target): Likewise.
1751 * linux-tic6x-low.c (the_low_target): Likewise.
1752 * linux-tile-low.c (the_low_target): Likewise.
1753 * linux-x86-low.c (the_low_target): Likewise.
1754 * linux-xtensa-low.c (the_low_target): Likewise.
1755
1756 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1757
1758 * win32-low.c: Include "common-inferior.h".
1759
1760 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1761
1762 * inferiors.c (set_inferior_cwd): New function.
1763 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1764 (handle_query): Inform that QSetWorkingDir is supported.
1765 * win32-low.c (create_process): Pass the inferior's cwd to
1766 CreateProcess.
1767
1768 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1769
1770 * inferiors.c (current_inferior_cwd): New global variable.
1771 (get_inferior_cwd): New function.
1772 * inferiors.h (struct process_info) <cwd>: New field.
1773
1774 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1775
1776 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1777 (OBS): Add gdb_tilde_expand.o.
1778
1779 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1780
1781 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1782 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1783
1784 2017-09-29 Pedro Alves <palves@redhat.com>
1785
1786 * ax.c (gdb_parse_agent_expr): Constify.
1787 * ax.h (gdb_parse_agent_expr): Constify.
1788 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1789 Constify.
1790 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1791 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1792 * remote-utils.h (read_ptid): Constify.
1793 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1794 (process_point_options, process_serial_event): Constify.
1795 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1796 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1797 (cmd_qtbuffer): Constify.
1798
1799 2017-09-29 Pedro Alves <palves@redhat.com>
1800
1801 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1802 fails.
1803
1804 2017-09-29 Pedro Alves <palves@redhat.com>
1805
1806 * linux-low.c (handle_extended_wait): Pass parent thread instead
1807 of process to thread_db_notice_clone.
1808 * linux-low.h (thread_db_notice_clone): Replace parent process
1809 parameter with parent thread parameter.
1810 * thread-db.c (find_one_thread): Add comment.
1811 (thread_db_notice_clone): Replace parent process parameter with
1812 parent thread parameter. Temporarily switch to the parent thread.
1813
1814 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1815
1816 * gdbthread.h: Include "common-gdbthread.h".
1817 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1818 "if" when validating the ptid.
1819 * remote-utils.c: Include "gdbthread.h".
1820 (prepare_resume_reply): Use "switch_to_thread".
1821 * target.c (done_accessing_memory): Likewise.
1822
1823 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1824
1825 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1826 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1827 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1828 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1829 s390x-gs-linux64-ipa.o to ipa_obj.
1830 * linux-s390-low.c (HWCAP_S390_GS): New define.
1831 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1832 New functions.
1833 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1834 (s390_arch_setup): Check for guarded-storage support and choose
1835 appropriate tdesc.
1836 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1837 init_registers_s390x_gs_linux64.
1838 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1839 enum value.
1840 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1841 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1842
1843 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1844
1845 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1846
1847 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1848
1849 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1850 (thread_db_thread_handle): Declare.
1851 * linux-low.c (linux_target_ops): Initialize thread_handle.
1852 * server.c (handle_qxfer_threads_worker): Add support for
1853 "handle" attribute.
1854 * target.h (struct target_ops): Add new function pointer,
1855 thread_handle.
1856 (target_thread_handle): Define.
1857 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1858 field in lwp.
1859 (thread_db_thread_handle): New function.
1860
1861 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1862
1863 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1864 * linux-low.h (thread_db_notice_clone): Declare.
1865 * thread-db.c (thread_db_notice_clone): New function.
1866
1867 2017-09-21 Pedro Alves <palves@redhat.com>
1868
1869 * server.c (gdb_read_memory, handle_status, process_serial_event)
1870 (handle_serial_event, handle_target_event): Adjust to
1871 set_desired_thread prototype change.
1872 * target.c (set_desired_thread): Remove 'use_general' parameter
1873 and adjust.
1874 * target.h (set_desired_thread): Remove 'use_general' parameter.
1875
1876 2017-09-20 Tom Tromey <tom@tromey.com>
1877
1878 * target.c (target_terminal::terminal_state): Define.
1879 (target_terminal::init): Rename from target_terminal_init.
1880 (target_terminal::inferior): Rename from
1881 target_terminal_inferior.
1882 (target_terminal::ours): Rename from target_terminal_ours.
1883 (target_terminal::ours_for_output, target_terminal::info): New.
1884
1885 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1886
1887 * server.c (accumulate_file_name_length): Remove.
1888 (emit_dll_description): Adjust to std::string change.
1889 (handle_qxfer_libraries): Use std::string to hold document.
1890
1891 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1892
1893 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1894 return type of xml_escape_text.
1895 * server.c (emit_dll_description): Likewise.
1896
1897 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1898
1899 * server.c (captured_main): Accept argument for --selftest.
1900 Update run_tests call.
1901 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1902 when registering selftests.
1903
1904 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1905
1906 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1907 instead of "VEC" for "target_desc.reg_defs".
1908 (regcache_cpy): Likewise.
1909 (registers_to_string): Likewise.
1910 (registers_from_string): Likewise.
1911 (find_regno): Likewise.
1912 (supply_regblock): Likewise.
1913 (regcache_raw_read_unsigned): Likewise.
1914 * tdesc.c (init_target_desc): Likewise.
1915 (tdesc_create_reg): Likewise.
1916 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1917 (struct target_desc) <reg_defs>: Convert to "std::vector".
1918 (target_desc): Do not initialize "reg_defs".
1919 (~target_desc): Update code to use "std::vector" instead of "VEC"
1920 for "target_desc.reg_defs".
1921 (operator==): Likewise.
1922
1923 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1924
1925 * inferiors.h (thread_to_gdb_id): Remove.
1926 * inferiors.c (thread_to_gdb_id): Remove.
1927 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1928 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1929 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1930 Likewise.
1931 * nto-low.c (nto_fetch_registers, nto_store_registers,
1932 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1933
1934 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1935
1936 * inferiors.h (gdb_id_to_thread_id): Remove.
1937 * inferiors.c (gdb_id_to_thread_id): Remove.
1938 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1939 removal. Move pid declaration closer to where it's used.
1940
1941 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1942
1943 * server.c (handle_detach): New function.
1944 (process_serial_event): Move code out, call handle_detach.
1945
1946 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1947
1948 * server.c (require_running): Rename to ...
1949 (require_running_or_return): ... this ...
1950 (require_running_or_break): ... and this.
1951 (handle_query, process_serial_event): Adjust.
1952
1953 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1954
1955 * linux-low.c (linux_set_resume_request): Remove unused
1956 variables.
1957
1958 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1959
1960 * server.c (first_thread_of): Remove.
1961 (process_serial_event): Replace usage of first_thread_of with
1962 find_any_thread_of_pid.
1963 * tracepoint.c (same_process_p): Remove.
1964 (gdb_agent_about_to_close): Replace usage of same_process_p with
1965 find_any_thread_of_pid.
1966 * linux-x86-low.c (same_process_callback): Remove.
1967 (x86_arch_setup_process_callback): Replace usage of
1968 same_process_callback with find_any_thread_of_pid.
1969 * thread-db.c (any_thread_of): Remove.
1970 (switch_to_process): Replace usage of any_thread_of with
1971 find_any_thread_of_pid.
1972 * inferiors.c (thread_pid_matches_callback): Remove.
1973 (find_thread_process): Adjust to use find_any_thread_of_pid.
1974
1975 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1976
1977 * regcache.c (get_thread_regcache): Guard calls to "memset"
1978 with "!VEC_empty".
1979
1980 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1981
1982 * linux-low.c (handle_extended_wait): Use
1983 "allocate_target_description" instead of "XNEW".
1984 * linux-x86-low.c (initialize_low_arch): Likewise.
1985
1986 2017-09-05 Yao Qi <yao.qi@linaro.org>
1987
1988 * configure.srv (srv_i386_regobj): Remove.
1989 (srv_amd64_regobj): Remove.
1990 (srv_regobj): Set it to "" for x86 non-linux targets.
1991 * linux-x86-tdesc.c (i386_linux_read_description):
1992 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1993 (init_registers_i386): Remove the declaration.
1994 (tdesc_i386): Remove the declaration.
1995 (lynx_i386_arch_setup): Call i386_create_target_description.
1996 * nto-x86-low.c: Likewise.
1997 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1998 [!__x86_64__]: include arch/i386.h.
1999 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
2000
2001 2017-09-05 Yao Qi <yao.qi@linaro.org>
2002
2003 * configure.srv (srv_amd64_linux_xmlfiles): Remove
2004 i386/amd64-XXX-linux from it.
2005
2006 2017-09-05 Yao Qi <yao.qi@linaro.org>
2007
2008 * configure.srv: Empty srv_amd64_linux_regobj if $development is
2009 false.
2010 (ipa_amd64_linux_regobj): Remove.
2011 (ipa_x32_linux_regobj): Remove.
2012
2013 2017-09-05 Yao Qi <yao.qi@linaro.org>
2014
2015 * Makefile.in (arch-amd64.o): New rule.
2016 * configure.srv: Append arch-amd64.o.
2017 * linux-amd64-ipa.c: Include common/x86-xstate.h.
2018 (get_ipa_tdesc): Call amd64_linux_read_description.
2019 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
2020 and init_registers_amd64_XXX.
2021 * linux-x86-low.c (x86_linux_read_description): Call
2022 amd64_linux_read_description.
2023 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
2024 (initialize_low_arch): Don't call init_registers_x32_XXX and
2025 init_registers_amd64_XXX.
2026 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
2027 and tdesc_amd64_XXX.
2028 [__x86_64__] (amd64_tdesc_test): New function.
2029 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
2030 and init_registers_amd64_XXX.
2031 * linux-x86-tdesc.c: Include arch/amd64.h.
2032 (xcr0_to_tdesc_idx): New function.
2033 (i386_linux_read_description): New function.
2034 (amd64_get_ipa_tdesc_idx): New function.
2035 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
2036 (amd64_get_ipa_tdesc): Declare.
2037
2038 2017-09-05 Yao Qi <yao.qi@linaro.org>
2039
2040 * configure.srv (srv_i386_linux_xmlfiles): Remove
2041 i386/i386-XXX-linux.xml from it.
2042
2043 2017-09-05 Yao Qi <yao.qi@linaro.org>
2044
2045 * configure.srv: Set srv_i386_linux_regobj empty if $development
2046 is false.
2047 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
2048 initialize_low_tdesc.
2049 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
2050 with #if initialize_low_tdesc.
2051 * linux-x86-tdesc-selftest.c: New file.
2052 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
2053
2054 2017-09-05 Yao Qi <yao.qi@linaro.org>
2055
2056 * Makefile.in (arch-i386.o): New rule.
2057 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
2058 (x86_64-*-linux*): Likewise.
2059 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
2060 include arch/i386.h.
2061 (i386_linux_read_description): Remove code and call
2062 i386_create_target_description.
2063 * tdesc.c (allocate_target_description): New function.
2064 * tdesc.h (set_tdesc_architecture): Remove declaration.
2065 (set_tdesc_osabi): Likewise.
2066
2067 2017-09-05 Yao Qi <yao.qi@linaro.org>
2068
2069 * linux-x86-tdesc.c: Don't include <inttypes.h>.
2070 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
2071 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
2072 .xmltarget.
2073 * server.c (get_features_xml): Call tdesc_get_features_xml.
2074 * tdesc.c (set_tdesc_architecture): New function.
2075 (set_tdesc_osabi): New function.
2076 (tdesc_get_features_xml): New function.
2077 (tdesc_create_feature): Add an argument.
2078 * tdesc.h (struct target_desc) <features>: New field.
2079 <arch, osabi>: New field.
2080 (~target_desc): xfree features, arch, and osabi.
2081 (target_desc::oerator==): Don't compare .xmltarget.
2082 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
2083 (set_tdesc_osabi): Likewise.
2084 (tdesc_get_features_xml): Likewise.
2085
2086 2017-09-05 Yao Qi <yao.qi@linaro.org>
2087
2088 * linux-x86-tdesc.c: Include selftest.h.
2089 (i386_tdesc_test): New function.
2090 (initialize_low_tdesc): Call selftests::register_test.
2091 * tdesc.h: Include regdef.h.
2092 (target_desc): Override operator == and !=.
2093
2094 2017-09-05 Yao Qi <yao.qi@linaro.org>
2095
2096 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2097 (ipa_obj): Likewise.
2098 * linux-i386-ipa.c: Include common/x86-xstate.h
2099 (get_ipa_tdesc): Call i386_linux_read_description.
2100 (initialize_low_tracepoint): Don't call init_registers_XXX
2101 functions, call initialize_low_tdesc instead.
2102 * linux-x86-low.c (x86_linux_read_description): Call
2103 i386_linux_read_description.
2104 (initialize_low_arch): Don't call init_registers_i386_XXX
2105 functions, call initialize_low_tdesc.
2106 * linux-x86-tdesc.c: New file.
2107 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2108 (i386_get_ipa_tdesc_idx): Declare.
2109 (i386_get_ipa_tdesc): Declare.
2110 (initialize_low_tdesc): Declare.
2111
2112 2017-09-05 Yao Qi <yao.qi@linaro.org>
2113
2114 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2115 instead of 0.
2116
2117 2017-09-05 Yao Qi <yao.qi@linaro.org>
2118
2119 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2120 * regcache.c (get_thread_regcache): Use VEC_length.
2121 (init_register_cache): Likewise.
2122 (regcache_cpy): Likewise.
2123 (registers_to_string): Iterate reg_defs via VEC_iterate.
2124 (find_regno): Likewise.
2125 (find_register_by_number): Use VEC_index.
2126 (register_size): Call find_register_by_number.
2127 (register_data): Call find_register_by_number.
2128 (supply_regblock): Use VEC_length.
2129 (regcache_raw_read_unsigned): Likewise.
2130 * tdesc.c (init_target_desc): Iterate reg_defs via
2131 VEC_iterate.
2132 (default_description): Update initializer.
2133 (copy_target_description): Don't update field num_registers.
2134 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2135 <num_registers>: Remove.
2136
2137 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2138
2139 * Makefile.in (.SECONDARY): Define target.
2140
2141 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2142
2143 * linux-low.c (linux_wait_1): Adjust.
2144 * server.c (queue_stop_reply_callback): Adjust.
2145
2146 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2147
2148 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2149 QEnvironmentUnset and QEnvironmentReset packets.
2150 (handle_query): Inform remote that QEnvironmentHexEncoded,
2151 QEnvironmentUnset and QEnvironmentReset are supported.
2152
2153 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2154
2155 * inferiors.h (inferior_target_data): Rename to ...
2156 (thread_target_data): ... this.
2157 (inferior_regcache_data): Rename to ...
2158 (thread_regcache_data): ... this.
2159 (set_inferior_regcache_data): Rename to ...
2160 (set_thread_regcache_data): ... this.
2161 * inferiors.c (inferior_target_data): Rename to ...
2162 (thread_target_data): ... this.
2163 (inferior_regcache_data): Rename to ...
2164 (thread_regcache_data): ... this.
2165 (set_inferior_regcache_data): Rename to ...
2166 (set_thread_regcache_data): ... this.
2167 (free_one_thread): Update.
2168 * linux-low.h (get_thread_lwp): Update.
2169 * regcache.c (get_thread_regcache): Update.
2170 (regcache_invalidate_thread): Update.
2171 (free_register_cache_thread): Update.
2172 * win32-i386-low.c (update_debug_registers_callback): Update.
2173 (win32_get_current_dr): Update.
2174 * win32-low.c (thread_rec): Update.
2175 (delete_thread_info): Update.
2176 (continue_one_thread): Update.
2177 (suspend_one_thread): Update.
2178
2179 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2180
2181 * inferiors.c (set_inferior_target_data): Remove.
2182 * inferiors.h (set_inferior_target_data): Remove.
2183
2184 2017-08-18 Yao Qi <yao.qi@linaro.org>
2185
2186 * Makefile.in (OBS): Add selftest.o.
2187 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2188 * configure, config.in: Re-generated.
2189 * server.c: Include common/sefltest.h.
2190 (captured_main): Handle option --selftest.
2191
2192 2017-08-09 Yao Qi <yao.qi@linaro.org>
2193
2194 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2195 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2196 i386-avx-mpx.o and i386-mmx.o.
2197 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2198 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2199 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2200 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2201 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2202 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2203 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2204 i386/amd64-avx-mpx.xml.
2205
2206 2017-08-09 Yao Qi <yao.qi@linaro.org>
2207
2208 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2209 and x32-avx-avx512.o.
2210 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2211 i386/x32-avx-avx512.xml.
2212
2213 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2214
2215 * tracepoint.h (enum class fast_tpoint_collect_result): New
2216 enumeration.
2217 (fast_tracepoint_collecting): Change return type to
2218 fast_tpoint_collect_result.
2219 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2220 * linux-low.h: Include tracepoint.h.
2221 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2222 fast_tpoint_collect_result.
2223 * linux-low.c (handle_tracepoints): Adjust.
2224 (linux_fast_tracepoint_collecting): Change return type to
2225 fast_tpoint_collect_result.
2226 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2227 linux_wait_1, stuck_in_jump_pad_callback,
2228 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2229 proceed_one_lwp): Adjust to type change.
2230
2231 2017-07-10 Yao Qi <yao.qi@linaro.org>
2232
2233 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2234
2235 2017-06-29 Yao Qi <yao.qi@linaro.org>
2236
2237 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2238 Remove.
2239 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2240
2241 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2242
2243 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2244
2245 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2246
2247 * linux-low.c (linux_create_inferior): Adjust code to access the
2248 environment information via 'gdb_environ' class.
2249 * lynx-low.c (lynx_create_inferior): Likewise.
2250 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2251 (get_environ): Return a pointer to 'our_environ'.
2252 (captured_main): Initialize 'our_environ'.
2253 * server.h (get_environ): Adjust prototype.
2254 * spu-low.c (spu_create_inferior): Adjust code to access the
2255 environment information via 'gdb_environ' class.
2256
2257 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2258
2259 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2260 usage of "register" keyword.
2261
2262 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2263
2264 * configure: Re-generate.
2265
2266 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2267
2268 * configure: Re-generate.
2269
2270 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2271
2272 * Makefile.in (COMPILE.pre): Add "-x c++".
2273
2274 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2275
2276 * fork-child.c: Conditionally include <signal.h>.
2277
2278 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2279
2280 * server.c (handle_general_set): Handle new packet
2281 "QStartupWithShell".
2282 (handle_query): Add "QStartupWithShell" to the list of supported
2283 packets.
2284 (gdbserver_usage): Add help text explaining the
2285 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2286 options.
2287 (captured_main): Recognize and act upon the presence of the new
2288 CLI options.
2289
2290 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2291 Pedro Alves <palves@redhat.com>
2292
2293 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2294 * configure: Regenerate.
2295 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2296 "fork-inferior.o".
2297 (i[34567]86-*-lynxos*): Likewise.
2298 (spu*-*-*): Likewise.
2299 * fork-child.c: New file.
2300 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2301 and "environ.h".
2302 (linux_ptrace_fun): New function.
2303 (linux_create_inferior): Adjust function prototype to reflect
2304 change on "target.h". Adjust function code to use
2305 "fork_inferior".
2306 (linux_request_interrupt): Delete "signal_pid".
2307 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2308 (lynx_ptrace_fun): New function.
2309 (lynx_create_inferior): Adjust function prototype to reflect
2310 change on "target.h". Adjust function code to use
2311 "fork_inferior".
2312 * nto-low.c (nto_create_inferior): Adjust function prototype and
2313 code to reflect change on "target.h". Update comments.
2314 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2315 "common-terminal.h" and "environ.h".
2316 (terminal_fd): Moved to fork-child.c.
2317 (old_foreground_pgrp): Likewise.
2318 (restore_old_foreground_pgrp): Likewise.
2319 (last_status): Make it global.
2320 (last_ptid): Likewise.
2321 (our_environ): New variable.
2322 (startup_with_shell): Likewise.
2323 (program_name): Likewise.
2324 (program_argv): Rename to...
2325 (program_args): ...this.
2326 (wrapper_argv): New variable.
2327 (start_inferior): Delete function.
2328 (get_exec_wrapper): New function.
2329 (get_exec_file): Likewise.
2330 (get_environ): Likewise.
2331 (prefork_hook): Likewise.
2332 (post_fork_inferior): Likewise.
2333 (postfork_hook): Likewise.
2334 (postfork_child_hook): Likewise.
2335 (handle_v_run): Update code to deal with arguments coming from the
2336 remote host. Update calls from "start_inferior" to
2337 "create_inferior".
2338 (captured_main): Likewise. Initialize environment variable. Call
2339 "have_job_control".
2340 * server.h (post_fork_inferior): New prototype.
2341 (get_environ): Likewise.
2342 (last_status): Declare.
2343 (last_ptid): Likewise.
2344 (signal_pid): Likewise.
2345 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2346 (spu_ptrace_fun): New function.
2347 (spu_create_inferior): Adjust function prototype to reflect change
2348 on "target.h". Adjust function code to use "fork_inferior".
2349 * target.c (target_terminal_init): New function.
2350 (target_terminal_inferior): Likewise.
2351 (target_terminal_ours): Likewise.
2352 * target.h: Include <vector>.
2353 (struct target_ops) <create_inferior>: Update prototype.
2354 (create_inferior): Update macro.
2355 * utils.c (gdb_flush_out_err): New function.
2356 * win32-low.c (win32_create_inferior): Adjust function prototype
2357 and code to reflect change on "target.h".
2358
2359 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2360
2361 * inferiors.c (switch_to_thread): New function.
2362
2363 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2364
2365 * Makefile.in (SFILE): Add "common/job-control.c".
2366 (OBS): Add "job-control.o".
2367
2368 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2369
2370 * Makefile: Remove "@host_makefile_frag@".
2371
2372 2017-05-05 Pedro Alves <palves@redhat.com>
2373
2374 * configure: Regenerate.
2375
2376 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2377
2378 * configure: Regenerate.
2379
2380 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2381
2382 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2383 software_single_step change of return type to
2384 std::vector<CORE_ADDR>.
2385 * linux-low.c (install_software_single_step_breakpoints):
2386 Likewise.
2387 * linux-low.h (install_software_single_step_breakpoints):
2388 Likewise.
2389
2390 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2391
2392 * remote-utils.c: Include "gdb_termios.h" instead of
2393 "terminal.h".
2394 * terminal.h: Delete file.
2395
2396 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2397
2398 * server.c: Include <vector>.
2399 <program_argv, wrapper_argv>: Convert to std::vector.
2400 (start_inferior): Rewrite function to use C++.
2401 (handle_v_run): Likewise. Update code that calculates the argv
2402 based on the vRun packet; use C++.
2403 (captured_main): Likewise.
2404
2405 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2406
2407 * server.c (handle_v_cont): Initialize thread_resume::thread
2408 with null_ptid.
2409
2410 2017-04-05 Pedro Alves <palves@redhat.com>
2411
2412 * configure: Regenerate.
2413
2414 2017-04-05 Pedro Alves <palves@redhat.com>
2415
2416 * gdbreplay.c (sync_error): Constify.
2417 * linux-x86-low.c (push_opcode): Constify.
2418
2419 2017-04-05 Pedro Alves <palves@redhat.com>
2420
2421 * win32-low.c (get_child_debug_event)
2422 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2423 Report TARGET_WAITKIND_SPURIOUS instead.
2424
2425 2017-04-05 Pedro Alves <palves@redhat.com>
2426
2427 * remote-utils.c (remote_prepare, remote_open): Constify.
2428 * remote-utils.h (remote_prepare, remote_open): Constify.
2429 * server.c (captured_main): Constify 'port' handling.
2430
2431 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2432
2433 * Makefile.in (clean): Clear .deps.
2434
2435 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2436
2437 * .gitignore: Remove generated files, replace with wildcard.
2438 * (clean): Replace removal of generated files with wildcard.
2439 (version.c): Replace with...
2440 (version-generated.c): ...this.
2441 (xml-builtin.c): Replace with...
2442 (xml-builtin-generated.c): ...this.
2443 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2444 (%.c: *regformats*): Replace with...
2445 (%-generated.c: *regformats*): ...this.
2446
2447 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2448
2449 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2450 (xtensa_fill_gregset): Call collect_register_by_name for
2451 threadptr register.
2452 (xtensa_store_gregset): Call supply_register_by_name for
2453 threadptr register.
2454
2455 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2456
2457 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2458 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2459 (xtensa_store_gregset): Call supply_register for all registers in
2460 a0_regnum..a0_regnum + C0_NREGS range.
2461
2462 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2463
2464 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2465 (ax-ipa.o: ax.c): Remove.
2466 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2467 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2468 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2469 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2470 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2471
2472 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2473
2474 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2475 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2476 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2477 (errors-ipa.o: ../common/errors.c): Remove.
2478 (format-ipa.o: ../common/format.c): Remove.
2479 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2480
2481 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2482
2483 * Makefile.in (%-ipa.o: %.c): New rule.
2484 (tracepoint-ipa.o: tracepoint.c): Remove.
2485 (utils-ipa.o: utils.c): Remove.
2486 (remote-utils-ipa.o: remote-utils.c): Remove.
2487 (regcache-ipa.o: regcache.c): Remove.
2488 (i386-linux-ipa.o: i386-linux.c): Remove.
2489 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2490 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2491 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2492 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2493 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2494 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2495 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2496 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2497 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2498 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2499 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2500 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2501 (aarch64-ipa.o: aarch64.c): Remove.
2502 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2503 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2504 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2505 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2506 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2507 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2508 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2509 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2510 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2511 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2512 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2513 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2514 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2515 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2516 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2517 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2518 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2519 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2520 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2521 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2522 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2523 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2524 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2525 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2526 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2527 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2528 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2529 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2530 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2531 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2532 (tdesc-ipa.o: tdesc.c): Remove.
2533 (x32-linux-ipa.o: x32-linux.c): Remove.
2534 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2535 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2536
2537 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2538
2539 * Makefile.in (%.o: ../arch/%.c): New rule.
2540 (arm.o: ../arch/arm.c): Remove.
2541 (arm-linux.o: ../arch/arm-linux.c): Remove.
2542 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2543 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2544
2545 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2546
2547 * Makefile.in (%.o: ../nat/%.c): New rule.
2548 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2549 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2550 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2551 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2552 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2553 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2554 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2555 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2556 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2557 (linux-personality.o: ../nat/linux-personality.c): Remove.
2558 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2559 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2560 (x86-linux.o: ../nat/x86-linux.c): Remove.
2561 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2562 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2563
2564 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2565
2566 * Makefile.in (%.o: ../common/%.c): New rule.
2567 (signals.o: ../common/signals.c): Remove.
2568 (print-utils.o: ../common/print-utils.c): Remove.
2569 (rsp-low.o: ../common/rsp-low.c): Remove.
2570 (common-utils.o: ../common/common-utils.c): Remove.
2571 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2572 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2573 (vec.o: ../common/vec.c): Remove.
2574 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2575 (xml-utils.o: ../common/xml-utils.c): Remove.
2576 (ptid.o: ../common/ptid.c): Remove.
2577 (buffer.o: ../common/buffer.c): Remove.
2578 (format.o: ../common/format.c): Remove.
2579 (filestuff.o: ../common/filestuff.c): Remove.
2580 (agent.o: ../common/agent.c): Remove.
2581 (errors.o: ../common/errors.c): Remove.
2582 (environ.o: ../common/environ.c): Remove.
2583 (common-debug.o: ../common/common-debug.c): Remove.
2584 (cleanups.o: ../common/cleanups.c): Remove.
2585 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2586 (fileio.o: ../common/fileio.c): Remove.
2587 (common-regcache.o: ../common/common-regcache.c): Remove.
2588 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2589 (new-op.o: ../common/new-op.c): Remove.
2590 (btrace-common.o: ../common/btrace-common.c): Remove.
2591
2592 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2593
2594 * Makefile.in (%.o: ../target/%.c): New rule.
2595 (waitstatus.o: ../target/waitstatus.c): Remove.
2596
2597 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2598
2599 * Makefile.in
2600 (%.c: ../regformats/%.dat,
2601 (%.c: ../regformats/arm/%.dat,
2602 (%.c: ../regformats/i386/%.dat,
2603 (%.c: ../regformats/rs6000/%.dat): New rules.
2604 (aarch64.c): Remove.
2605 (reg-arm.c): Remove.
2606 (arm-with-iwmmxt.c): Remove.
2607 (arm-with-vfpv2.c): Remove.
2608 (arm-with-vfpv3.c): Remove.
2609 (arm-with-neon.c): Remove.
2610 (reg-bfin.c): Remove.
2611 (reg-cris.c): Remove.
2612 (reg-crisv32.c): Remove.
2613 (i386.c): Remove.
2614 (i386-linux.c): Remove.
2615 (i386-avx.c): Remove.
2616 (i386-avx-linux.c): Remove.
2617 (i386-avx-avx512.c): Remove.
2618 (i386-avx-avx512-linux.c): Remove.
2619 (i386-mpx.c): Remove.
2620 (i386-mpx-linux.c): Remove.
2621 (i386-avx-mpx-avx512-pku.c): Remove.
2622 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2623 (i386-avx-mpx.c): Remove.
2624 (i386-avx-mpx-linux.c): Remove.
2625 (i386-mmx.c): Remove.
2626 (i386-mmx-linux.c): Remove.
2627 (reg-ia64.c): Remove.
2628 (reg-m32r.c): Remove.
2629 (reg-m68k.c): Remove.
2630 (reg-cf.c): Remove.
2631 (mips-linux.c): Remove.
2632 (mips-dsp-linux.c): Remove.
2633 (mips64-linux.c): Remove.
2634 (mips64-dsp-linux.c): Remove.
2635 (nios2-linux.c): Remove.
2636 (powerpc-32.c): Remove.
2637 (powerpc-32l.c): Remove.
2638 (powerpc-altivec32l.c): Remove.
2639 (powerpc-cell32l.c): Remove.
2640 (powerpc-vsx32l.c): Remove.
2641 (powerpc-isa205-32l.c): Remove.
2642 (powerpc-isa205-altivec32l.c): Remove.
2643 (powerpc-isa205-vsx32l.c): Remove.
2644 (powerpc-e500l.c): Remove.
2645 (powerpc-64l.c): Remove.
2646 (powerpc-altivec64l.c): Remove.
2647 (powerpc-cell64l.c): Remove.
2648 (powerpc-vsx64l.c): Remove.
2649 (powerpc-isa205-64l.c): Remove.
2650 (powerpc-isa205-altivec64l.c): Remove.
2651 (powerpc-isa205-vsx64l.c): Remove.
2652 (s390-linux32.c): Remove.
2653 (s390-linux32v1.c): Remove.
2654 (s390-linux32v2.c): Remove.
2655 (s390-linux64.c): Remove.
2656 (s390-linux64v1.c): Remove.
2657 (s390-linux64v2.c): Remove.
2658 (s390-te-linux64.c): Remove.
2659 (s390-vx-linux64.c): Remove.
2660 (s390-tevx-linux64.c): Remove.
2661 (s390x-linux64.c): Remove.
2662 (s390x-linux64v1.c): Remove.
2663 (s390x-linux64v2.c): Remove.
2664 (s390x-te-linux64.c): Remove.
2665 (s390x-vx-linux64.c): Remove.
2666 (s390x-tevx-linux64.c): Remove.
2667 (tic6x-c64xp-linux.c): Remove.
2668 (tic6x-c64x-linux.c): Remove.
2669 (tic6x-c62x-linux.c): Remove.
2670 (reg-sh.c): Remove.
2671 (reg-sparc64.c): Remove.
2672 (reg-spu.c): Remove.
2673 (amd64.c): Remove.
2674 (amd64-linux.c): Remove.
2675 (amd64-avx.c): Remove.
2676 (amd64-avx-linux.c): Remove.
2677 (amd64-avx-avx512.c): Remove.
2678 (amd64-avx-avx512-linux.c): Remove.
2679 (amd64-mpx.c): Remove.
2680 (amd64-mpx-linux.c): Remove.
2681 (amd64-avx-mpx-avx512-pku.c): Remove.
2682 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2683 (amd64-avx-mpx.c): Remove.
2684 (amd64-avx-mpx-linux.c): Remove.
2685 (x32.c): Remove.
2686 (x32-linux.c): Remove.
2687 (x32-avx.c): Remove.
2688 (x32-avx-linux.c): Remove.
2689 (x32-avx-avx512.c): Remove.
2690 (x32-avx-avx512-linux.c): Remove.
2691 (reg-xtensa.c): Remove.
2692 (reg-tilegx.c): Remove.
2693 (reg-tilegx32.c): Remove.
2694
2695 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2696
2697 * Makefile.in (SFILES): Add "common/environ.c".
2698 (OBJS): Add "common/environ.h".
2699
2700 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2701
2702 * configure.ac: Check if the fs_base and gs_base members of
2703 `struct user_regs_struct' exist.
2704 * config.in: Regenerated.
2705 * configure: Likewise.
2706
2707 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2708
2709 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2710 target_read_memory.
2711 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2712 (get_next_pcs_syscall_next_pc): Likewise.
2713
2714 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2715
2716 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2717 * nto-x86-low.c: Likewise.
2718
2719 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2720
2721 * Makefile.in: Include disable-implicit-rules.mk.
2722
2723 2016-11-23 Pedro Alves <palves@redhat.com>
2724
2725 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2726 (debug_vprintf): Use std::chrono::steady_clock instead of
2727 gettimeofday. Use '.' instead of ':'.
2728 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2729 (get_timestamp): Use std::chrono::steady_clock instead of
2730 gettimeofday.
2731
2732 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2733
2734 * Makefile.in: Fix whitespace formatting.
2735
2736 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2737
2738 * Makefile.in (SFILES, OBS): Flatten list and order
2739 alphabetically.
2740
2741 2016-11-23 Pedro Alves <palves@redhat.com>
2742
2743 * event-loop.c (handle_file_event): Use warning.
2744 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2745 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2746 Use warning.
2747
2748 2016-11-23 Pedro Alves <palves@redhat.com>
2749
2750 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2751 output.
2752 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2753 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2754 debug_printf and debug_flush for debug output.
2755 * server.c (handle_general_set): Likewise.
2756 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2757 output.
2758
2759 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2760
2761 * Makefile.in (.c.o): Replace rule with ...
2762 (%.o: %.c): ... this one.
2763
2764 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2765
2766 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2767 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2768 make.
2769 * configure.ac: Remove checks for the make program.
2770 * configure: Re-generate.
2771
2772 2016-10-28 Pedro Alves <palves@redhat.com>
2773
2774 * Makefile.in (CXX_DIALECT): Get from configure.
2775 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2776 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2777 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2778 * config.in: Regenerate.
2779 * configure: Regenerate.
2780
2781 2016-10-27 Yao Qi <yao.qi@linaro.org>
2782
2783 * linux-low.c (linux_supports_range_stepping): Return true if
2784 can_software_single_step return true.
2785
2786 2016-10-27 Yao Qi <yao.qi@linaro.org>
2787
2788 * inferiors.c (find_inferior_in_random): New function.
2789 * inferiors.h (find_inferior_in_random): Declare.
2790 * linux-low.c (linux_wait_for_event_filtered): Call
2791 find_inferior_in_random instead of find_inferior.
2792
2793 2016-10-27 Yao Qi <yao.qi@linaro.org>
2794
2795 * linux-low.c (linux_wait_1): If single-step breakpoints are
2796 inserted, remove them.
2797
2798 2016-10-26 Pedro Alves <palves@redhat.com>
2799
2800 * linux-low.c (handle_extended_wait): Link parent/child fork
2801 threads.
2802 (linux_wait_1): Unlink them.
2803 (linux_set_resume_request): Ignore resume requests for
2804 already-resumed and unhandled fork child threads.
2805 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2806 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2807 New functions.
2808 (handle_v_requests) <vCont>: Don't call require_running.
2809 * server.h (in_queued_stop_replies): New declaration.
2810
2811 2016-10-24 Yao Qi <yao.qi@linaro.org>
2812
2813 PR server/20733
2814 * linux-aarch64-low.c (append_insns): Cast the return value to
2815 'uint32_t *'.
2816
2817 2016-10-10 Yao Qi <yao.qi@linaro.org>
2818
2819 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2820
2821 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2822
2823 * target.c (target_supports_multi_process): New function, moved
2824 from...
2825 * target.h (target_supports_multi_process): ... here. Remove
2826 macro.
2827
2828 2016-10-05 Tom Tromey <tom@tromey.com>
2829
2830 PR remote/20655:
2831 * tracepoint.c (handle_tracepoint_bkpts): Check
2832 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2833
2834 2016-10-05 Yao Qi <yao.qi@linaro.org>
2835
2836 * configure.srv: Update the path of arm-*.xml files.
2837
2838 2016-10-05 Terry Guo <terry.guo@arm.com>
2839 Yao Qi <yao.qi@linaro.org>
2840
2841 * Makefile.in: Adjust the path of rules.
2842 * configure.srv: Update the path of xml files.
2843 * regformats/arm-with-iwmmxt.dat: Regenerated.
2844 * regformats/arm-with-neon.dat: Likewise.
2845 * regformats/arm-with-vfpv2.dat: Likewise.
2846 * regformats/arm-with-vfpv3.dat Likewise.
2847
2848 2016-09-30 Yao Qi <yao.qi@linaro.org>
2849
2850 PR gdbserver/20627
2851 * target.c (target_stop_and_wait): Don't call
2852 target_continue_no_signal, use resume_stop instead.
2853
2854 2016-09-26 Yao Qi <yao.qi@linaro.org>
2855
2856 * linux-low.c (linux_wait_1): Call debug_exit.
2857
2858 2016-09-23 Pedro Alves <palves@redhat.com>
2859
2860 * Makefile.in (SFILES): Add common/new-op.c.
2861 (OBS): Add common/new-op.o.
2862 (new-op.o): New rule.
2863
2864 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2865
2866 * .gitinore: Ignore more files.
2867
2868 2016-09-21 Yao Qi <yao.qi@linaro.org>
2869
2870 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2871 23.
2872
2873 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2874
2875 * server.c (start_inferior): Call target_mourn_inferior instead of
2876 mourn_inferior; pass ptid_t argument to it.
2877 (resume): Likewise.
2878 (handle_target_event): Likewise.
2879 * target.c (target_mourn_inferior): New function.
2880 * target.h (mourn_inferior): Delete macro.
2881
2882 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2883
2884 * linux-low.c (lwp_is_stepping): New function.
2885
2886 2016-09-06 Carl Love <cel@us.ibm.com>
2887
2888 * server.c (start_inferior): Fixed comment, requested comment change
2889 didn't get updated correctly. Removed reference to ptrace () call as
2890 it is only true on Linux systems.
2891
2892 2016-09-06 Carl Love <cel@us.ibm.com>
2893
2894 * server.c (start_inferior): Do not call
2895 function target_post_create_inferior () if the
2896 inferior process has already exited.
2897
2898 2016-09-05 Pedro Alves <palves@redhat.com>
2899
2900 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2901 (COMPILE.pre, CC_LD): Use CXX directly.
2902 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2903 * acinclude.m4: Don't include build-with-cxx.m4.
2904 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2905 * configure: Regenerate.
2906
2907 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2908
2909 PR gdb/19495
2910 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2911 call writing data to own_buf.
2912
2913 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2914
2915 * target.c (mywait): Call target_wait instead of
2916 the_target->wait.
2917 (target_wait): New function.
2918
2919 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2920
2921 * server.c (start_inferior): New variable 'ptid'. Replace calls
2922 to the_target->resume by target_continue{,_no_signal}, depending
2923 on the case.
2924 * target.c (target_stop_and_wait): Call target_continue_no_signal
2925 instead of the_target->resume.
2926 (target_continue): New function.
2927
2928 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2929
2930 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2931
2932 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2933
2934 PR server/20491
2935 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2936 ps_prochandle.
2937 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2938 * linux-arm-low.c (ps_get_thread_area): Likewise.
2939 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2940 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2941 * linux-mips-low.c (ps_get_thread_area): Likewise.
2942 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2943 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2944 * linux-x86-low.c (ps_get_thread_area): Likewise.
2945 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2946
2947 2016-08-19 Pedro Alves <palves@redhat.com>
2948
2949 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2950
2951 2016-08-19 Pedro Alves <palves@redhat.com>
2952
2953 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2954 comment. Use memcpy instead of casting through unsigned long.
2955
2956 2016-08-19 Pedro Alves <palves@redhat.com>
2957
2958 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2959 allocating around 0x80000000.
2960
2961 2016-08-19 Pedro Alves <palves@redhat.com>
2962
2963 PR gdb/20415
2964 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2965 (x32-avx512-linux-ipa.o): New rules.
2966 * configure.ac (x86_64-*-linux*): New x32 check.
2967 * configure.srv (ipa_x32_linux_regobj): New.
2968 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2969 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2970 descriptions.
2971 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2972 descriptions.
2973 * configure: Regenerate.
2974
2975 2016-08-09 Pedro Alves <palves@redhat.com>
2976
2977 PR gdb/18653
2978 * Makefile.in (OBS): Add signals-state-save-restore.o.
2979 (signals-state-save-restore.o): New rule.
2980 * config.in: Regenerate.
2981 * configure: Regenerate.
2982 * linux-low.c: Include "signals-state-save-restore.h".
2983 (linux_create_inferior): Call
2984 restore_original_signals_state.
2985 * server.c: Include "dispositions-save-restore.h".
2986 (captured_main): Call save_original_signals_state.
2987
2988 2016-08-05 Pedro Alves <palves@redhat.com>
2989
2990 * configure: Regenerate.
2991
2992 2016-08-04 Yao Qi <yao.qi@linaro.org>
2993
2994 * linux-low.c (regsets_fetch_inferior_registers): Check
2995 errno is ESRCH or not.
2996
2997 2016-08-02 Yao Qi <yao.qi@linaro.org>
2998
2999 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
3000 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
3001 (thread_db_load_search): Update.
3002 (try_thread_db_load_1): Don't look for td_ta_event_addr,
3003 td_ta_set_event and td_ta_event_getmsg.
3004
3005 2016-07-26 Pedro Alves <palves@redhat.com>
3006
3007 PR server/20414
3008 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
3009 of unsigned long for 64-bit registers and use uint32_t instead of
3010 unsigned int for 32-bit registers.
3011
3012 2016-07-26 Pedro Alves <palves@redhat.com>
3013
3014 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
3015 to 'ptrace'.
3016
3017 2016-07-21 Tom Tromey <tom@tromey.com>
3018
3019 * configure: Rebuild.
3020
3021 2016-07-21 Yao Qi <yao.qi@linaro.org>
3022
3023 * mem-break.c (find_gdb_breakpoint): Cast bp to
3024 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
3025
3026 2016-07-21 Yao Qi <yao.qi@linaro.org>
3027
3028 * server.c (handle_v_requests): Support s and S actions
3029 if target_supports_software_single_step return true.
3030
3031 2016-07-21 Yao Qi <yao.qi@linaro.org>
3032
3033 * linux-low.c (resume_stopped_resumed_lwps): If resume request
3034 is resume_step, call maybe_hw_step.
3035 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
3036 and unstop them.
3037 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
3038 breakpoints or not.
3039 (proceed_one_lwp): If resume request is resume_step, install
3040 reinsert breakpoints and call maybe_hw_step.
3041
3042 2016-07-21 Yao Qi <yao.qi@linaro.org>
3043
3044 * linux-low.c (proceed_one_lwp): Declare.
3045 (linux_resume_one_thread): Remove local variable 'step'.
3046 Lift code enqueue signal. Call proceed_one_lwp instead of
3047 linux_resume_one_lwp.
3048
3049 2016-07-21 Yao Qi <yao.qi@linaro.org>
3050
3051 * linux-low.c (linux_resume_one_thread): Call
3052 enqueue_pending_signal.
3053
3054 2016-07-21 Yao Qi <yao.qi@linaro.org>
3055
3056 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
3057 * inferiors.c (do_restore_current_thread_cleanup): New function.
3058 (make_cleanup_restore_current_thread): Likewise.
3059 * linux-low.c (install_software_single_step_breakpoints): Call
3060 make_cleanup_restore_current_thread. Switch current_thread to
3061 thread.
3062
3063 2016-07-21 Yao Qi <yao.qi@linaro.org>
3064
3065 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
3066 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
3067 (clone_one_breakpoint): Likewise.
3068 (delete_reinsert_breakpoints): Change parameter to thread.
3069 Callers updated.
3070 (has_reinsert_breakpoints): Likewise.
3071 (uninsert_reinsert_breakpoints): Likewise.
3072 (reinsert_reinsert_breakpoints): Likewise.
3073 * mem-break.h (set_reinsert_breakpoint): Update declaration.
3074 (delete_reinsert_breakpoints): Likewise.
3075 (reinsert_reinsert_breakpoints): Likewise.
3076 (uninsert_reinsert_breakpoints): Likewise.
3077 (has_reinsert_breakpoints): Likewise.
3078
3079 2016-07-21 Yao Qi <yao.qi@linaro.org>
3080
3081 * inferiors.c (get_thread_process): Make parameter const.
3082 * inferiors.h (get_thread_process): Update declaration.
3083 * mem-break.c (clone_all_breakpoints): Remove all parameters.
3084 Add new parameters child_thread and parent_thread. Callers
3085 updated.
3086 * mem-break.h (clone_all_breakpoints): Update declaration.
3087
3088 2016-07-21 Yao Qi <yao.qi@linaro.org>
3089
3090 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3091 <command_list, handler>: Remove.
3092 (struct gdb_breakpoint): New.
3093 (struct other_breakpoint): New.
3094 (struct reinsert_breakpoint): New.
3095 (is_gdb_breakpoint): New function.
3096 (any_persistent_commands): Update command_list if
3097 is_gdb_breakpoint returns true.
3098 (set_breakpoint): Create breakpoints according to their types.
3099 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3100 (set_gdb_breakpoint_1): Likewise.
3101 (set_gdb_breakpoint): Likewise.
3102 (clear_breakpoint_conditions): Change parameter type to
3103 'struct gdb_breakpoint *'.
3104 (clear_breakpoint_commands): Likewise.
3105 (clear_breakpoint_conditions_and_commands): Likewise.
3106 (add_condition_to_breakpoint): Likewise.
3107 (add_breakpoint_condition): Likewise.
3108 (add_commands_to_breakpoint): Likewise.
3109 (check_breakpoints): Check other_breakpoint.
3110 (clone_one_breakpoint): Clone breakpopint according to its type.
3111 * mem-break.h (struct gdb_breakpoint): Declare.
3112 (set_gdb_breakpoint): Update declaration.
3113 (clear_breakpoint_conditions_and_commands): Likewise.
3114 (add_breakpoint_condition): Likewise.
3115 (add_breakpoint_commands): Likewise.
3116 * server.c (process_point_options): Change parameter type to
3117 'struct gdb_breakpoint *'.
3118
3119 2016-07-21 Yao Qi <yao.qi@linaro.org>
3120
3121 * mem-break.c (set_breakpoint_at): Rename it to ...
3122 (set_breakpoint_type_at): ... it.
3123 (set_breakpoint_at): Call set_breakpoint_type_at.
3124 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3125 * mem-break.h (set_breakpoint_at): Update comments.
3126
3127 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3128
3129 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3130 to buf parameter.
3131 (nios2_store_gregset): Likewise.
3132
3133 2016-07-01 Pedro Alves <palves@redhat.com>
3134 Antoine Tremblay <antoine.tremblay@ericsson.com>
3135
3136 * linux-low.c: Change interface to take the target lwp_info
3137 pointer directly and return void. Handle detaching from a zombie
3138 thread.
3139 (linux_detach_lwp_callback): New function.
3140 (linux_detach): Detach from the leader thread after detaching from
3141 the clone threads.
3142
3143 2016-06-28 Yao Qi <yao.qi@linaro.org>
3144
3145 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3146 for variable new_offset.
3147 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3148 (aarch64_ftrace_insn_reloc_cb): Likewise.
3149 (aarch64_ftrace_insn_reloc_tb): Likewise.
3150 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3151 PRIx64 instead of PRIx32.
3152
3153 2016-06-28 Yao Qi <yao.qi@linaro.org>
3154
3155 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3156 (the_low_target): Install arm_get_syscall_trapinfo.
3157
3158 2016-06-28 Yao Qi <yao.qi@linaro.org>
3159
3160 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3161 function.
3162 (the_low_target): Install aarch64_get_syscall_trapinfo.
3163
3164 2016-06-28 Yao Qi <yao.qi@linaro.org>
3165
3166 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3167 Callers updated.
3168 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3169 Remove parameter sysno.
3170 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3171 sysret.
3172
3173 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3174
3175 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3176 (s390_emit_ne_goto): Likewise.
3177 (s390_emit_lt_goto): Likewise.
3178 (s390_emit_le_goto): Likewise.
3179 (s390_emit_gt_goto): Likewise.
3180 (s390_emit_ge_goto): Likewise.
3181 (s390x_emit_eq_goto): Likewise.
3182 (s390x_emit_ne_goto): Likewise.
3183 (s390x_emit_lt_goto): Likewise.
3184 (s390x_emit_le_goto): Likewise.
3185 (s390x_emit_gt_goto): Likewise.
3186 (s390x_emit_ge_goto): Likewise.
3187 (s390_emit_ops_impl): Mark variable static.
3188 (s390x_emit_ops): Likewise.
3189
3190 2016-06-17 Yao Qi <yao.qi@linaro.org>
3191
3192 * linux-low.c (handle_extended_wait): Call
3193 uninsert_reinsert_breakpoints for the parent process. Remove
3194 reinsert breakpoints from the child process. Reinsert them to
3195 the parent process when vfork is done.
3196 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3197 (reinsert_reinsert_breakpoints): New function.
3198 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3199 (reinsert_reinsert_breakpoints): Declare.
3200
3201 2016-06-17 Yao Qi <yao.qi@linaro.org>
3202
3203 * linux-low.c (handle_extended_wait): If the parent is doing
3204 step-over, remove the reinsert breakpoints from the forked child.
3205
3206 2016-06-17 Yao Qi <yao.qi@linaro.org>
3207
3208 * linux-low.c (unsuspend_all_lwps): Declare.
3209 (linux_low_filter_event): If thread exited, call finish_step_over.
3210 If step-over is finished, unsuspend other threads.
3211
3212 2016-06-17 Yao Qi <yao.qi@linaro.org>
3213
3214 * linux-low.c (linux_resume_one_lwp_throw): Assert
3215 has_reinsert_breakpoints returns false.
3216 * mem-break.c (delete_disabled_breakpoints): Assert
3217 bp type isn't reinsert_breakpoint.
3218
3219 2016-06-17 Yao Qi <yao.qi@linaro.org>
3220
3221 * linux-low.c (maybe_hw_step): New function.
3222 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3223 (finish_step_over): Switch current_thread to lwp temporarily,
3224 and assert has_reinsert_breakpoints returns true.
3225 (proceed_one_lwp): Call maybe_hw_step.
3226 * mem-break.c (has_reinsert_breakpoints): New function.
3227 * mem-break.h (has_reinsert_breakpoints): Declare.
3228
3229 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3230
3231 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3232
3233 2016-05-17 Yao Qi <yao.qi@linaro.org>
3234
3235 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3236 instead of find_inferior.
3237
3238 2016-05-05 Yao Qi <yao.qi@linaro.org>
3239
3240 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3241 Initialize res to zero.
3242
3243 2016-05-05 Yao Qi <yao.qi@linaro.org>
3244
3245 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3246 to uint32_t.
3247
3248 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3249
3250 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3251 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3252 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3253
3254 2016-04-28 Par Olsson <par.olsson@windriver.com>
3255 Simon Marchi <simon.marchi@ericsson.com>
3256
3257 * tracepoint.c (write_inferior_int8): New function.
3258 (cmd_qtenable_disable): Write enable flag using
3259 write_inferior_int8.
3260
3261 2016-04-25 Yao Qi <yao.qi@linaro.org>
3262
3263 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3264 (need_step_over_p): Return zero if the LWP has pending signals
3265 can be delivered on software single step target.
3266
3267 2016-04-25 Yao Qi <yao.qi@linaro.org>
3268
3269 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3270 return instead of error.
3271
3272 2016-04-22 Yao Qi <yao.qi@linaro.org>
3273
3274 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3275 to 23.
3276
3277 2016-04-22 Yao Qi <yao.qi@linaro.org>
3278
3279 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3280 signal when stepping over breakpoint with software single
3281 step.
3282
3283 2016-04-21 Pedro Alves <palves@redhat.com>
3284
3285 * linux-s390-low.c (s390_collect_ptrace_register)
3286 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3287 add casts.
3288 (s390_check_regset): Use void * instead of gdb_byte *.
3289
3290 2016-04-20 Pedro Alves <palves@redhat.com>
3291
3292 * configure: Renegerate.
3293
3294 2016-04-20 Yao Qi <yao.qi@linaro.org>
3295
3296 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3297 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3298 number 16.
3299 (arm_store_gregset): Likewise.
3300
3301 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3302
3303 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3304 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3305 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3306 (amd64-avx-mpx-linux.c): New rules.
3307 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3308 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3309 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3310 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3311 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3312 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3313 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3314 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3315 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3316 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3317 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3318 * linux-x86-low.c (x86_linux_read_description): Add case for
3319 X86_XSTATE_AVX_MPX_MASK.
3320 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3321 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3322 init_registers_i386_avx_mpx_linux.
3323 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3324 (initialize_low_tracepoint): Call
3325 init_registers_i386_avx_mpx_linux.
3326 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3327 (initialize_low_tracepoint): Call
3328 init_registers_amd64_avx_mpx_linux.
3329 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3330 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3331 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3332 declarations.
3333
3334 2016-04-18 Pedro Alves <palves@redhat.com>
3335
3336 * configure: Regenerate.
3337
3338 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3339
3340 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3341 (aarch64_emit_sub): Likewise.
3342
3343 2016-04-12 Pedro Alves <palves@redhat.com>
3344
3345 * utils.c (prepare_to_throw_exception): Delete.
3346
3347 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3348
3349 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3350
3351 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3352
3353 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3354
3355 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3356
3357 * linux-aarch64-ipa.c: Add <elf.h> include.
3358 * linux-ppc-ipa.c: Add <elf.h> include.
3359 * linux-s390-ipa.c: Add <elf.h> include.
3360
3361 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3362
3363 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3364 (get_raw_reg_ptr): Likewise.
3365 (get_trace_state_variable_value_ptr): Likewise.
3366 (set_trace_state_variable_value_ptr): Likewise.
3367 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3368 char *.
3369
3370 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3371 Marcin Kościelnicki <koriakin@0x04.net>
3372
3373 PR/17221
3374 * linux-ppc-low.c (emit_insns): New function.
3375 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3376 (ppc_emit_prologue): New function.
3377 (ppc_emit_epilogue): New function.
3378 (ppc_emit_add): New function.
3379 (ppc_emit_sub): New function.
3380 (ppc_emit_mul): New function.
3381 (ppc_emit_lsh): New function.
3382 (ppc_emit_rsh_signed): New function.
3383 (ppc_emit_rsh_unsigned): New function.
3384 (ppc_emit_ext): New function.
3385 (ppc_emit_zero_ext): New function.
3386 (ppc_emit_log_not): New function.
3387 (ppc_emit_bit_and): New function.
3388 (ppc_emit_bit_or): New function.
3389 (ppc_emit_bit_xor): New function.
3390 (ppc_emit_bit_not): New function.
3391 (ppc_emit_equal): New function.
3392 (ppc_emit_less_signed): New function.
3393 (ppc_emit_less_unsigned): New function.
3394 (ppc_emit_ref): New function.
3395 (ppc_emit_const): New function.
3396 (ppc_emit_reg): New function.
3397 (ppc_emit_pop): New function.
3398 (ppc_emit_stack_flush): New function.
3399 (ppc_emit_swap): New function.
3400 (ppc_emit_stack_adjust): New function.
3401 (ppc_emit_call): New function.
3402 (ppc_emit_int_call_1): New function.
3403 (ppc_emit_void_call_2): New function.
3404 (ppc_emit_if_goto): New function.
3405 (ppc_emit_goto): New function.
3406 (ppc_emit_eq_goto): New function.
3407 (ppc_emit_ne_goto): New function.
3408 (ppc_emit_lt_goto): New function.
3409 (ppc_emit_le_goto): New function.
3410 (ppc_emit_gt_goto): New function.
3411 (ppc_emit_ge_goto): New function.
3412 (ppc_write_goto_address): New function.
3413 (ppc_emit_ops_impl): New static variable.
3414 (ppc64v1_emit_prologue): New function.
3415 (ppc64v2_emit_prologue): New function.
3416 (ppc64_emit_epilogue): New function.
3417 (ppc64_emit_add): New function.
3418 (ppc64_emit_sub): New function.
3419 (ppc64_emit_mul): New function.
3420 (ppc64_emit_lsh): New function.
3421 (ppc64_emit_rsh_signed): New function.
3422 (ppc64_emit_rsh_unsigned): New function.
3423 (ppc64_emit_ext): New function.
3424 (ppc64_emit_zero_ext): New function.
3425 (ppc64_emit_log_not): New function.
3426 (ppc64_emit_bit_and): New function.
3427 (ppc64_emit_bit_or): New function.
3428 (ppc64_emit_bit_xor): New function.
3429 (ppc64_emit_bit_not): New function.
3430 (ppc64_emit_equal): New function.
3431 (ppc64_emit_less_signed): New function.
3432 (ppc64_emit_less_unsigned): New function.
3433 (ppc64_emit_ref): New function.
3434 (ppc64_emit_const): New function.
3435 (ppc64v1_emit_reg): New function.
3436 (ppc64v2_emit_reg): New function.
3437 (ppc64_emit_pop): New function.
3438 (ppc64_emit_stack_flush): New function.
3439 (ppc64_emit_swap): New function.
3440 (ppc64v1_emit_call): New function.
3441 (ppc64v2_emit_call): New function.
3442 (ppc64v1_emit_int_call_1): New function.
3443 (ppc64v2_emit_int_call_1): New function.
3444 (ppc64v1_emit_void_call_2): New function.
3445 (ppc64v2_emit_void_call_2): New function.
3446 (ppc64_emit_if_goto): New function.
3447 (ppc64_emit_eq_goto): New function.
3448 (ppc64_emit_ne_goto): New function.
3449 (ppc64_emit_lt_goto): New function.
3450 (ppc64_emit_le_goto): New function.
3451 (ppc64_emit_gt_goto): New function.
3452 (ppc64_emit_ge_goto): New function.
3453 (ppc64v1_emit_ops_impl): New static variable.
3454 (ppc64v2_emit_ops_impl): New static variable.
3455 (ppc_emit_ops): New function.
3456 (linux_low_target): Wire in ppc_emit_ops.
3457
3458 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3459 Marcin Kościelnicki <koriakin@0x04.net>
3460
3461 PR/17221
3462 * Makefile.in: Add powerpc-*-ipa.o
3463 * configure.srv: Add ipa_obj for powerpc*-linux.
3464 * linux-ppc-ipa.c: New file.
3465 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3466 includes.
3467 (PPC_FIELD): New macro.
3468 (PPC_SEXT): New macro.
3469 (PPC_OP6): New macro.
3470 (PPC_BO): New macro.
3471 (PPC_LI): New macro.
3472 (PPC_BD): New macro.
3473 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3474 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3475 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3476 (ppc_get_thread_area): New function.
3477 (is_elfv2_inferior): New function.
3478 (gen_ds_form): New function.
3479 (GEN_STD): New macro.
3480 (GEN_STDU): New macro.
3481 (GEN_LD): New macro.
3482 (GEN_LDU): New macro.
3483 (gen_d_form): New function.
3484 (GEN_ADDI): New macro.
3485 (GEN_ADDIS): New macro.
3486 (GEN_LI): New macro.
3487 (GEN_LIS): New macro.
3488 (GEN_ORI): New macro.
3489 (GEN_ORIS): New macro.
3490 (GEN_LWZ): New macro.
3491 (GEN_STW): New macro.
3492 (GEN_STWU): New macro.
3493 (gen_xfx_form): New function.
3494 (GEN_MFSPR): New macro.
3495 (GEN_MTSPR): New macro.
3496 (GEN_MFCR): New macro.
3497 (GEN_MTCR): New macro.
3498 (GEN_SYNC): New macro.
3499 (GEN_LWSYNC): New macro.
3500 (gen_x_form): New function.
3501 (GEN_OR): New macro.
3502 (GEN_MR): New macro.
3503 (GEN_LWARX): New macro.
3504 (GEN_STWCX): New macro.
3505 (GEN_CMPW): New macro.
3506 (gen_md_form): New function.
3507 (GEN_RLDICL): New macro.
3508 (GEN_RLDICR): New macro.
3509 (gen_i_form): New function.
3510 (GEN_B): New macro.
3511 (GEN_BL): New macro.
3512 (gen_b_form): New function.
3513 (GEN_BNE): New macro.
3514 (GEN_LOAD): New macro.
3515 (GEN_STORE): New macro.
3516 (gen_limm): New function.
3517 (gen_atomic_xchg): New function.
3518 (gen_call): New function.
3519 (ppc_relocate_instruction): New function.
3520 (ppc_install_fast_tracepoint_jump_pad): New function.
3521 (ppc_get_min_fast_tracepoint_insn_len): New function.
3522 (ppc_get_ipa_tdesc_idx): New function.
3523 (the_low_target): Wire in the new functions.
3524 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3525 tdescs.
3526 * linux-ppc-tdesc.h: New file.
3527
3528 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3529
3530 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3531 (alloc_jump_pad_buffer): New function.
3532 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3533 (alloc_jump_pad_buffer): New function.
3534 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3535 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3536 (alloc_jump_pad_buffer): New function.
3537 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3538 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3539 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3540 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3541
3542 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3543
3544 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3545 * linux-amd64-ipa.c: Likewise.
3546 * linux-i386-ipa.c: Likewise.
3547 * linux-s390-ipa.c: Likewise.
3548 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3549 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3550 set_trace_state_variable_value_ptr.
3551 (struct ipa_sym_addresses): Likewise.
3552 (symbol_list): Likewise.
3553 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3554 accessing gdb_collect directly.
3555 (gdb_collect_ptr_type): New typedef.
3556 (get_raw_reg_ptr_type): New typedef.
3557 (get_trace_state_variable_value_ptr_type): New typedef.
3558 (set_trace_state_variable_value_ptr_type): New typedef.
3559 (gdb_collect_ptr): New global.
3560 (get_raw_reg_ptr): New global.
3561 (get_trace_state_variable_value_ptr): New global.
3562 (set_trace_state_variable_value_ptr): New global.
3563 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3564 accessing get_raw_reg directly.
3565 (get_get_tsv_func_addr): Likewise for
3566 get_trace_state_variable_value_ptr.
3567 (get_set_tsv_func_addr): Likewise for
3568 set_trace_state_variable_value_ptr.
3569 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3570
3571 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3572
3573 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3574
3575 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3576
3577 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3578 packets.
3579 (relocate_instruction): Remove own_buf.
3580 * server.c (own_buf): Make global.
3581 (handle_v_requests): Make global.
3582 * server.h (own_buf): New declaration.
3583 (handle_v_requests): New prototype.
3584
3585 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3586
3587 PR 18377
3588 * linux-s390-low.c (add_insns): New function.
3589 (s390_emit_prologue): New function.
3590 (s390_emit_epilogue): New function.
3591 (s390_emit_add): New function.
3592 (s390_emit_sub): New function.
3593 (s390_emit_mul): New function.
3594 (s390_emit_lsh): New function.
3595 (s390_emit_rsh_signed): New function.
3596 (s390_emit_rsh_unsigned): New function.
3597 (s390_emit_ext): New function.
3598 (s390_emit_log_not): New function.
3599 (s390_emit_bit_and): New function.
3600 (s390_emit_bit_or): New function.
3601 (s390_emit_bit_xor): New function.
3602 (s390_emit_bit_not): New function.
3603 (s390_emit_equal): New function.
3604 (s390_emit_less_signed): New function.
3605 (s390_emit_less_unsigned): New function.
3606 (s390_emit_ref): New function.
3607 (s390_emit_if_goto): New function.
3608 (s390_emit_goto): New function.
3609 (s390_write_goto_address): New function.
3610 (s390_emit_litpool): New function.
3611 (s390_emit_const): New function.
3612 (s390_emit_call): New function.
3613 (s390_emit_reg): New function.
3614 (s390_emit_pop): New function.
3615 (s390_emit_stack_flush): New function.
3616 (s390_emit_zero_ext): New function.
3617 (s390_emit_swap): New function.
3618 (s390_emit_stack_adjust): New function.
3619 (s390_emit_set_r2): New function.
3620 (s390_emit_int_call_1): New function.
3621 (s390_emit_void_call_2): New function.
3622 (s390_emit_eq_goto): New function.
3623 (s390_emit_ne_goto): New function.
3624 (s390_emit_lt_goto): New function.
3625 (s390_emit_le_goto): New function.
3626 (s390_emit_gt_goto): New function.
3627 (s390_emit_ge_goto): New function.
3628 (s390x_emit_prologue): New function.
3629 (s390x_emit_epilogue): New function.
3630 (s390x_emit_add): New function.
3631 (s390x_emit_sub): New function.
3632 (s390x_emit_mul): New function.
3633 (s390x_emit_lsh): New function.
3634 (s390x_emit_rsh_signed): New function.
3635 (s390x_emit_rsh_unsigned): New function.
3636 (s390x_emit_ext): New function.
3637 (s390x_emit_log_not): New function.
3638 (s390x_emit_bit_and): New function.
3639 (s390x_emit_bit_or): New function.
3640 (s390x_emit_bit_xor): New function.
3641 (s390x_emit_bit_not): New function.
3642 (s390x_emit_equal): New function.
3643 (s390x_emit_less_signed): New function.
3644 (s390x_emit_less_unsigned): New function.
3645 (s390x_emit_ref): New function.
3646 (s390x_emit_if_goto): New function.
3647 (s390x_emit_const): New function.
3648 (s390x_emit_call): New function.
3649 (s390x_emit_reg): New function.
3650 (s390x_emit_pop): New function.
3651 (s390x_emit_stack_flush): New function.
3652 (s390x_emit_zero_ext): New function.
3653 (s390x_emit_swap): New function.
3654 (s390x_emit_stack_adjust): New function.
3655 (s390x_emit_int_call_1): New function.
3656 (s390x_emit_void_call_2): New function.
3657 (s390x_emit_eq_goto): New function.
3658 (s390x_emit_ne_goto): New function.
3659 (s390x_emit_lt_goto): New function.
3660 (s390x_emit_le_goto): New function.
3661 (s390x_emit_gt_goto): New function.
3662 (s390x_emit_ge_goto): New function.
3663 (s390_emit_ops): New function.
3664 (struct linux_target_ops): Fill in emit_ops hook.
3665
3666 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3667
3668 PR 18377
3669 * Makefile.in: Add s390 IPA files.
3670 * configure.srv: Build IPA for s390.
3671 * linux-s390-ipa.c: New file.
3672 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3673 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3674 (tdesc_s390_linux32): Likewise.
3675 (init_registers_s390_linux32v1): Likewise.
3676 (tdesc_s390_linux32v1): Likewise.
3677 (init_registers_s390_linux32v2): Likewise.
3678 (tdesc_s390_linux32v2): Likewise.
3679 (init_registers_s390_linux64): Likewise.
3680 (tdesc_s390_linux64): Likewise.
3681 (init_registers_s390_linux64v1): Likewise.
3682 (tdesc_s390_linux64v1): Likewise.
3683 (init_registers_s390_linux64v2): Likewise.
3684 (tdesc_s390_linux64v2): Likewise.
3685 (init_registers_s390_te_linux64): Likewise.
3686 (tdesc_s390_te_linux64): Likewise.
3687 (init_registers_s390_vx_linux64): Likewise.
3688 (tdesc_s390_vx_linux64): Likewise.
3689 (init_registers_s390_tevx_linux64): Likewise.
3690 (tdesc_s390_tevx_linux64): Likewise.
3691 (init_registers_s390x_linux64): Likewise.
3692 (tdesc_s390x_linux64): Likewise.
3693 (init_registers_s390x_linux64v1): Likewise.
3694 (tdesc_s390x_linux64v1): Likewise.
3695 (init_registers_s390x_linux64v2): Likewise.
3696 (tdesc_s390x_linux64v2): Likewise.
3697 (init_registers_s390x_te_linux64): Likewise.
3698 (tdesc_s390x_te_linux64): Likewise.
3699 (init_registers_s390x_vx_linux64): Likewise.
3700 (tdesc_s390x_vx_linux64): Likewise.
3701 (init_registers_s390x_tevx_linux64): Likewise.
3702 (tdesc_s390x_tevx_linux64): Likewise.
3703 (have_hwcap_s390_vx): New static variable.
3704 (s390_arch_setup): Fill have_hwcap_s390_vx.
3705 (s390_get_thread_area): New function.
3706 (s390_ft_entry_gpr_esa): New const.
3707 (s390_ft_entry_gpr_zarch): New const.
3708 (s390_ft_entry_misc): New const.
3709 (s390_ft_entry_fr): New const.
3710 (s390_ft_entry_vr): New const.
3711 (s390_ft_main_31): New const.
3712 (s390_ft_main_64): New const.
3713 (s390_ft_exit_fr): New const.
3714 (s390_ft_exit_vr): New const.
3715 (s390_ft_exit_misc): New const.
3716 (s390_ft_exit_gpr_esa): New const.
3717 (s390_ft_exit_gpr_zarch): New const.
3718 (append_insns): New function.
3719 (s390_relocate_instruction): New function.
3720 (s390_install_fast_tracepoint_jump_pad): New function.
3721 (s390_get_min_fast_tracepoint_insn_len): New function.
3722 (s390_get_ipa_tdesc_idx): New function.
3723 (struct linux_target_ops): Wire in the above functions.
3724 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3725 * linux-s390-tdesc.h: New file.
3726
3727 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3728
3729 * linux-s390-low.c (s390_supports_tracepoints): New function.
3730 (struct linux_target_ops): Fill supports_tracepoints hook.
3731
3732 2016-03-18 Yao Qi <yao.qi@linaro.org>
3733
3734 * linux-low.c (lwp_signal_can_be_delivered): New function.
3735 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3736
3737 2016-03-18 Yao Qi <yao.qi@linaro.org>
3738
3739 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3740 0 if signal is enqueued. Remove 'signal' from one debugging
3741 message. Move one debugging message to some lines below.
3742 Remove code setting 'signal' to 0.
3743
3744 2016-03-18 Yao Qi <yao.qi@linaro.org>
3745
3746 * linux-low.c (linux_low_filter_event): Remove redundant
3747 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3748
3749 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3750
3751 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3752 (struct linux_target_ops): Wire in the above.
3753
3754 2016-03-03 Yao Qi <yao.qi@linaro.org>
3755
3756 * linux-low.c: Update comments to start_step_over.
3757
3758 2016-03-03 Yao Qi <yao.qi@linaro.org>
3759
3760 PR server/19736
3761 * linux-low.c (handle_extended_wait): Set child suspended
3762 if event_lwp->bp_reinsert isn't zero.
3763
3764 2016-03-02 Yao Qi <yao.qi@linaro.org>
3765
3766 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3767 enqueue_pending_signal.
3768
3769 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3770
3771 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3772 is actually loaded.
3773
3774 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3775
3776 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3777 (s390_regmap_3264) [!__s390x__]: New global.
3778 (s390_collect_ptrace_register): Skip map entries containing -1.
3779 (s390_supply_ptrace_register): Ditto.
3780 (s390_fill_gprs_high): New function.
3781 (s390_store_gprs_high): New function.
3782 (s390_regsets): Add NT_S390_HIGH_GPRS.
3783 (s390_get_hwcap): Enable on 31-bit.
3784 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3785 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3786 Detect NT_S390_HIGH_GPRS.
3787 (s390_usrregs_info_3264): Enable on 31-bit.
3788 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3789 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3790
3791 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3792
3793 PR gdb/13808
3794 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3795 * configure.srv: Ditto.
3796 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3797 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3798 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3799 (init_registers_amd64_linux): Remove prototype.
3800 (tdesc_amd64_linux): Remove declaration.
3801 (get_ipa_tdesc): New function.
3802 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3803 initialize remaining tdescs.
3804 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3805 (init_registers_i386_linux): Remove prototype.
3806 (tdesc_i386_linux): Remove declaration.
3807 (get_ipa_tdesc): New function.
3808 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3809 initialize remaining tdescs.
3810 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3811 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3812 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3813 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3814 (x86_get_ipa_tdesc_idx): New function.
3815 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3816 * linux-x86-tdesc.h: New file.
3817 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3818 (target_get_ipa_tdesc_idx): New macro.
3819 * tracepoint.c (ipa_tdesc_idx): New macro.
3820 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3821 (symbol_list): Add ipa_tdesc_idx.
3822 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3823 (ipa_tdesc): Remove.
3824 (ipa_tdesc_idx): New variable.
3825 (get_context_regcache): Use get_ipa_tdesc.
3826 (gdb_collect): Ditto.
3827 (gdb_probe): Ditto.
3828 * tracepoint.h (get_ipa_tdesc): New prototype.
3829 (ipa_tdesc): Remove.
3830
3831 2016-02-24 Pedro Alves <palves@redhat.com>
3832
3833 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3834 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3835 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3836 Factor out common code between the USE_SIGTRAP_SIGINFO and
3837 !USE_SIGTRAP_SIGINFO blocks.
3838 (linux_low_filter_event): Call save_stop_reason instead of
3839 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3840 Update comments.
3841 (linux_wait_1): Update comments.
3842
3843 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3844
3845 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3846 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3847 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3848 ppc_insert_point, ppc_remove_point.
3849
3850 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3851
3852 * linux-s390-low.c (s390_supports_z_point_type): New function.
3853 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3854
3855 2016-02-16 Yao Qi <yao.qi@linaro.org>
3856
3857 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3858 PC. Get pc from regcache_read_pc.
3859
3860 2016-02-12 Yao Qi <yao.qi@linaro.org>
3861
3862 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3863 or linux_get_pc_32bit.
3864 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3865
3866 2016-02-12 Yao Qi <yao.qi@linaro.org>
3867
3868 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3869 arm_linux_get_next_pcs_fixup.
3870
3871 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3872
3873 * tracepoint.c (x_tracepoint_action_download): Change
3874 write_inferior_data_ptr to write_inferior_data_pointer.
3875 (cmd_qtstart): Likewise.
3876 (write_inferior_data_ptr): Remove.
3877 (download_agent_expr): Change write_inferior_data_ptr to
3878 write_inferior_data_pointer.
3879 (download_tracepoint_1): Likewise.
3880 (download_tracepoint): Likewise.
3881 (download_trace_state_variables): Likewise.
3882
3883 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3884 Marcin Kościelnicki <koriakin@0x04.net>
3885
3886 * tracepoint.c (struct tracepoint_action_ops): Remove.
3887 (struct tracepoint_action): Remove ops.
3888 (m_tracepoint_action_download, r_tracepoint_action_download)
3889 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3890 size and offset accordingly.
3891 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3892 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3893 (tracepoint_action_send, tracepoint_action_download): New functions.
3894 Helpers for trace action handlers.
3895 (add_tracepoint_action): Remove setup actions ops.
3896 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3897
3898 2016-02-10 Yao Qi <yao.qi@linaro.org>
3899
3900 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3901
3902 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3903
3904 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3905 to AC_OUTPUT.
3906 * configure: Regenerate.
3907
3908 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3909
3910 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3911 void * to gdb_byte *.
3912 * linux-low.c (siginfo_fixup): Likewise.
3913 (linux_xfer_siginfo): Likewise.
3914 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3915 Likewise.
3916 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3917
3918 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3919
3920 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3921 to srv_tgtobj.
3922 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3923 to srv_tgtobj.
3924 * linux-x86-low.c [__x86_64__]: Include
3925 "nat/amd64-linux-siginfo.h".
3926 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3927 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3928 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3929 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3930 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3931 (cpt_si_fd, si_timerid, si_overrun): Move from
3932 nat/amd64-linux-siginfo.c.
3933 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3934
3935 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3936
3937 * server.c (skip_to_semicolon): Remove.
3938 (process_point_options): Use strchrnul instead of
3939 skip_to_semicolon.
3940
3941 2016-01-26 Yao Qi <yao.qi@linaro.org>
3942
3943 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3944 * linux-low.c (install_software_single_step_breakpoints): Don't
3945 call regcache_read_pc.
3946 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3947 argument pc.
3948
3949 2016-01-26 Yao Qi <yao.qi@linaro.org>
3950
3951 * linux-low.c (install_software_single_step_breakpoints): Call
3952 regcache_read_pc instead of get_pc.
3953
3954 2016-01-26 Yao Qi <yao.qi@linaro.org>
3955
3956 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3957 (unblock_async_io): Rename to ...
3958 (block_unblock_async_io): ... it. New function.
3959 (enable_async_io): Don't install SIGIO handler. Unblock it
3960 instead.
3961 (disable_async_io): Don't ignore SIGIO. Block it instead.
3962 (initialize_async_io): Install SIGIO handler. Don't call
3963 unblock_async_io.
3964
3965 2016-01-26 Yao Qi <yao.qi@linaro.org>
3966
3967 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3968 first character is '\003', call *the_target->request_interrupt.
3969
3970 2016-01-25 Yao Qi <yao.qi@linaro.org>
3971
3972 * remote-utils.c (new_thread_notify): Remove.
3973 (dead_thread_notify): Likewise.
3974 * remote-utils.h (new_thread_notify): Remove declaration.
3975 (dead_thread_notify): Likewise.
3976
3977 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3978
3979 * gdb.trace/pending.exp: Fix expected message on continue.
3980
3981 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3982
3983 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3984 it works properly on big-endian machines where sizeof (CORE_ADDR)
3985 != sizeof (void *).
3986
3987 2016-01-21 Pedro Alves <palves@redhat.com>
3988
3989 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3990 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3991 * configure: Regenerate.
3992
3993 2016-01-21 Yao Qi <yao.qi@linaro.org>
3994
3995 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3996 is_thumb and set it according to CPSR saved on the stack.
3997 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3998 arm_sigreturn_next_pc.
3999
4000 2016-01-18 Yao Qi <yao.qi@linaro.org>
4001
4002 * linux-low.c (linux_set_pc_64bit): New function.
4003 (linux_get_pc_64bit): New function.
4004 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
4005 Declare.
4006 * linux-sparc-low.c (debug_threads): Remove declaration.
4007 (sparc_get_pc): Remove.
4008 (the_low_target): Use linux_get_pc_64bit instead of
4009 sparc_get_pc.
4010 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
4011 (the_low_target): Use linux_get_pc_64bit and
4012 linux_set_pc_64bit.
4013
4014 2016-01-18 Yao Qi <yao.qi@linaro.org>
4015
4016 * linux-arm-low.c (debug_threads): Remove declaration.
4017 (arm_get_pc, arm_set_pc): Remove.
4018 (the_low_target): Use linux_get_pc_32bit and
4019 linux_set_pc_32bit.
4020 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
4021 (the_low_target): Use linux_get_pc_32bit and
4022 linux_set_pc_32bit.
4023 * linux-cris-low.c (debug_threads): Remove declaration.
4024 (cris_get_pc, cris_set_pc,): Remove.
4025 (the_low_target): Use linux_get_pc_32bit and
4026 linux_set_pc_32bit.
4027 * linux-crisv32-low.c (debug_threads): Remove declaration.
4028 (cris_get_pc, cris_set_pc): Remove.
4029 (the_low_target): Use linux_get_pc_32bit and
4030 linux_set_pc_32bit.
4031 * linux-low.c: Include inttypes.h.
4032 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
4033 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
4034 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
4035 (the_low_target): Use linux_get_pc_32bit and
4036 linux_set_pc_32bit.
4037 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
4038 (the_low_target): Use linux_get_pc_32bit and
4039 linux_set_pc_32bit.
4040 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
4041 (the_low_target): Use linux_get_pc_32bit and
4042 linux_set_pc_32bit.
4043 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
4044 (the_low_target): Use linux_get_pc_32bit and
4045 linux_set_pc_32bit.
4046 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
4047 (the_low_target): Use linux_get_pc_32bit and
4048 linux_set_pc_32bit.
4049
4050 2016-01-18 Gary Benson <gbenson@redhat.com>
4051
4052 * configure.ac (AC_FUNC_FORK): New check.
4053 * config.in: Regenerate.
4054 * configure: Likewise.
4055
4056 2016-01-14 Yao Qi <yao.qi@linaro.org>
4057
4058 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
4059 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
4060 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
4061 arm_get_next_pcs_ctor.
4062
4063 2016-01-12 Josh Stone <jistone@redhat.com>
4064 Philippe Waroquiers <philippe.waroquiers@skynet.be>
4065
4066 * inferiors.h: Include "gdb_vecs.h".
4067 (struct process_info): Add syscalls_to_catch.
4068 * inferiors.c (remove_process): Free syscalls_to_catch.
4069 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
4070 syscall_return stops.
4071 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
4072 * server.c (handle_general_set): Handle QCatchSyscalls.
4073 (handle_query): Report support for QCatchSyscalls.
4074 * target.h (struct target_ops): Add supports_catch_syscall.
4075 (target_supports_catch_syscall): New macro.
4076 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
4077 (struct lwp_info): Add syscall_state.
4078 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
4079 Maintain syscall_state and syscalls_to_catch across exec.
4080 (get_syscall_trapinfo): New function, proxy to the_low_target.
4081 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
4082 (linux_low_filter_event): Toggle syscall_state entry/return for
4083 syscall traps, and set it ignored for all others.
4084 (gdb_catching_syscalls_p): New function.
4085 (gdb_catch_this_syscall_p): New function.
4086 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4087 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4088 (linux_supports_catch_syscall): New function.
4089 (linux_target_ops): Install it.
4090 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4091 (the_low_target): Install it.
4092
4093 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4094
4095 * acinclude.m4: Include new ../warning.m4 file.
4096 * configure: Regenerated.
4097 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4098
4099 2016-01-12 Mike Frysinger <vapier@gentoo.org>
4100
4101 * ax.c (is_goto_target): Mark static.
4102 * linux-low.c (register_addr): Likewise.
4103 (linux_fetch_registers, linux_store_registers): Likewise.
4104 * mem-break.c (any_persistent_commands): Fix old prototype.
4105 (add_commands_to_breakpoint): Mark static.
4106 * regcache.c (find_register_by_name): Delete unused func.
4107 * remote-utils.c (hex_or_minus_one): Mark static.
4108 * server.c (monitor_show_help): Mark static.
4109 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4110 handle_v_requests): Likewise.
4111
4112 2016-01-12 Pedro Alves <palves@redhat.com>
4113
4114 Remove use of the registered trademark symbol throughout.
4115
4116 2016-01-08 Yao Qi <yao.qi@linaro.org>
4117
4118 * remote-utils.c (getpkt): If c is '\003', call target hook
4119 request_interrupt.
4120
4121 2016-01-06 Yao Qi <yao.qi@linaro.org>
4122
4123 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4124 linux-aarch32-low.c.
4125 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4126 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4127 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4128 (thumb2_breakpoint): Declare.
4129 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4130 linux-aarch32-low.h.
4131 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4132 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4133 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4134
4135 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4136
4137 * gdbreplay.c (gdbreplay_version): Change copyright year in
4138 version message.
4139 * server.c (gdbserver_version): Likewise.
4140
4141 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4142
4143 * server.c (crc32_table): Delete.
4144 (crc32): Use libiberty's xcrc32 function.
4145
4146 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4147
4148 * lynx-low.c (lynx_delete_thread_callback): New function.
4149 (lynx_mourn): Properly delete our process and all of its
4150 threads. Remove call to clear_inferiors.
4151
4152 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4153
4154 * target.c (thread_search_callback): Add check that
4155 the thread_stopped target callback is not NULL before
4156 calling it.
4157
4158 2015-12-21 Yao Qi <yao.qi@linaro.org>
4159
4160 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4161 arm breakpoint.
4162
4163 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4164
4165 * server.c (handle_query): Call target_supports_software_single_step.
4166
4167 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4168
4169 * linux-low.c (single_step): New function.
4170 (linux_resume_one_lwp_throw): Call single_step.
4171 (start_step_over): Likewise.
4172
4173 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4174
4175 * Makefile.in (SFILES): Append arch/arm-linux.c,
4176 arch/arm-get-next-pcs.c.
4177 (arm-linux.o): New rule.
4178 (arm-get-next-pcs.o): New rule.
4179 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4180 arm-linux.o.
4181 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4182 to linux-aarch32-low.c.
4183 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4184 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4185 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4186 (thumb2_breakpoint_len): Likewise.
4187 (arm_is_thumb_mode): Make non-static.
4188 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4189 from linux-aarch32-low.c.
4190 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4191 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4192 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4193 (thumb2_breakpoint_len): Likewise.
4194 (arm_is_thumb_mode): New declaration.
4195 * linux-arm-low.c: Include arch/arm-linux.h
4196 aarch/arm-get-next-pcs.h, sys/syscall.h.
4197 (get_next_pcs_ops): New struct.
4198 (get_next_pcs_addr_bits_remove): New function.
4199 (get_next_pcs_is_thumb): New function.
4200 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4201 (arm_sigreturn_next_pc): Likewise.
4202 (get_next_pcs_syscall_next_pc): Likewise.
4203 (arm_gdbserver_get_next_pcs): Likewise.
4204 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4205 Initialize.
4206 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4207 * server.h: Include gdb_vecs.h.
4208
4209 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4210
4211 * Makefile.in (SFILES): Append common/common-regcache.c.
4212 (OBS): Append common-regcache.o.
4213 (common-regcache.o): New rule.
4214 * regcache.c (init_register_cache): Initialize cache to
4215 REG_UNAVAILABLE.
4216 (regcache_raw_read_unsigned): New function.
4217 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4218 register_status enum.
4219
4220 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4221
4222 * linux-aarch64-low.c (the_low_targets): Rename
4223 breakpoint_reinsert_addr to get_next_pcs.
4224 * linux-arm-low.c (the_low_targets): Likewise.
4225 * linux-bfin-low.c (the_low_targets): Likewise.
4226 * linux-cris-low.c (the_low_targets): Likewise.
4227 * linux-crisv32-low.c (the_low_targets): Likewise.
4228 * linux-low.c (can_software_single_step): Likewise.
4229 (install_software_single_step_breakpoints): New function.
4230 (start_step_over): Use install_software_single_step_breakpoints.
4231 * linux-low.h: New CORE_ADDR vector.
4232 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4233 get_next_pcs.
4234 * linux-mips-low.c (the_low_targets): Likewise.
4235 * linux-nios2-low.c (the_low_targets): Likewise.
4236 * linux-sparc-low.c (the_low_targets): Likewise.
4237
4238 2015-12-17 Pedro Alves <palves@redhat.com>
4239
4240 * linux-low.c (linux_kill_one_lwp): Remove references to
4241 LinuxThreads.
4242 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4243 to 'kill'.
4244 (linux_init_signals): Delete.
4245 (initialize_low): Adjust.
4246 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4247
4248 2015-12-16 Pedro Alves <palves@redhat.com>
4249
4250 * configure.ac (compiler warning flags): When testing a
4251 -Wno-foo option, check whether -Wfoo works instead.
4252 * configure: Regenerate.
4253
4254 2015-12-11 Don Breazeal <donb@codesourcery.com>
4255
4256 * server.c (process_serial_event): Don't exit from gdbserver
4257 in remote mode if there are still active inferiors.
4258
4259 2015-12-11 Yao Qi <yao.qi@linaro.org>
4260
4261 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4262 arm_breakpoint_at if the process is 32-bit.
4263
4264 2015-12-11 Yao Qi <yao.qi@linaro.org>
4265
4266 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4267 arm breakpoint.
4268
4269 2015-12-07 Yao Qi <yao.qi@linaro.org>
4270
4271 * configure.srv: Append arm.o to srv_tgtobj for
4272 aarch64*-*-linux* target.
4273 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4274 from linux-arm-low.c.
4275 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4276 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4277 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4278 (thumb2_breakpoint_len): Likewise.
4279 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4280 (arm_breakpoint_kinds): Likewise.
4281 (arm_breakpoint_kind_from_pc): Likewise.
4282 (arm_sw_breakpoint_from_kind): Likewise.
4283 (arm_breakpoint_kind_from_current_state): Likewise.
4284 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4285 (arm_sw_breakpoint_from_kind): Declare.
4286 (arm_breakpoint_kind_from_current_state): Declare.
4287 (arm_breakpoint_at): Declare.
4288 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4289 arm_sw_breakpoint_from_kind if process is 32-bit.
4290 (aarch64_breakpoint_kind_from_pc): New function.
4291 (aarch64_breakpoint_kind_from_current_state): New function.
4292 (the_low_target): Initialize fields breakpoint_kind_from_pc
4293 and breakpoint_kind_from_current_state.
4294 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4295 linux-aarch32-low.c.
4296 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4297 (arm_breakpoint, arm_breakpoint_len): Likewise.
4298 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4299 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4300 (arm_is_thumb_mode): Likewise.
4301 (arm_breakpoint_at): Likewise.
4302 (arm_breakpoint_kind_from_pc): Likewise.
4303 (arm_sw_breakpoint_from_kind): Likewise.
4304 (arm_breakpoint_kind_from_current_state): Likewise.
4305
4306 Revert:
4307 2015-08-04 Yao Qi <yao.qi@linaro.org>
4308
4309 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4310 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4311 * server.c (extended_protocol): Remove "static".
4312 * server.h (extended_protocol): Declare it.
4313
4314 2015-12-04 Josh Stone <jistone@redhat.com>
4315
4316 * target.h (struct target_ops) <arch_setup>: Rename to ...
4317 (struct target_ops) <post_create_inferior>: ... this.
4318 (target_arch_setup): Rename to ...
4319 (target_post_create_inferior): ... this, calling post_create_inferior.
4320 * server.c (start_inferior): Update target_arch_setup calls to
4321 target_post_create_inferior.
4322 * linux-low.c (linux_low_ptrace_options): Forward declare.
4323 (linux_arch_setup): Update its comment for general use.
4324 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4325 (struct linux_target_ops): Use linux_post_create_inferior.
4326 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4327 to post_create_inferior.
4328 * nto-low.c (struct nto_target_ops): Likewise.
4329 * spu-low.c (struct spu_target_ops): Likewise.
4330 * win32-low.c (struct win32_target_ops): Likewise.
4331
4332 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4333
4334 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4335
4336 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4337
4338 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4339 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4340 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4341 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4342 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4343 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4344 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4345 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4346 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4347 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4348 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4349 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4350
4351 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4352
4353 * linux-low.c (linux_look_up_symbols): Don't call
4354 linux_supports_traceclone.
4355 * linux-low.h (thread_db_init): Remove use_events argument.
4356 * thread-db.c (thread_db_use_event): Remove global variable.
4357 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4358 (struct thread_db) <td_create_bp>: Remove field.
4359 (thread_db_create_event): Remove function.
4360 (thread_db_enable_reporting): Likewise.
4361 (find_one_thread): Don't check for thread_db_use_events.
4362 (attach_thread): Likewise.
4363 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4364 (try_thread_db_load_1): Don't check for thread_db_use_events.
4365 (thread_db_init): Remove use_events argument and thread events
4366 handling.
4367 (remove_thread_event_breakpoints): Remove function.
4368 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4369
4370 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4371
4372 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4373 New function.
4374 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4375 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4376 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4377 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4378 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4379 Initialize.
4380 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4381 New function.
4382 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4383 * linux-low.c (can_hardware_single_step): Use
4384 supports_hardware_single_step.
4385 (can_software_single_step): New function.
4386 (start_step_over): Call can_software_single_step.
4387 (linux_supports_hardware_single_step): New function.
4388 (struct target_ops) <supports_software_single_step>: Initialize.
4389 * linux-low.h (struct linux_target_ops)
4390 <supports_hardware_single_step>: Initialize.
4391 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4392 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4393 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4394 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4395 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4396 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4397 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4398 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4399 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4400 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4401 Initialize.
4402 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4403 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4404 Initialize.
4405 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4406 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4407 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4408 New function.
4409 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4410 * target.h (struct target_ops): <supports_software_single_step>:
4411 New field.
4412 (target_supports_software_single_step): New macro.
4413
4414 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4415
4416 * linux-low.c (linux_wait_1): Fix pc advance condition.
4417 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4418 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4419
4420 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4421
4422 * linux-arm-low.c (arm_is_thumb_mode): New function.
4423 (arm_breakpoint_at): Use arm_is_thumb_mode.
4424 (arm_breakpoint_kind_from_current_state): New function.
4425 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4426 Initialize.
4427 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4428 (linux_breakpoint_kind_from_current_state): New function.
4429 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4430 * linux-low.h (struct linux_target_ops)
4431 <breakpoint_kind_from_current_state>: New field.
4432 * target.h (struct target_ops): Likewise.
4433 (target_breakpoint_kind_from_current_state): New macro.
4434
4435 2015-11-30 Pedro Alves <palves@redhat.com>
4436
4437 * linux-low.c (linux_resume): Wake up the event loop before
4438 returning.
4439
4440 2015-11-30 Pedro Alves <palves@redhat.com>
4441
4442 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4443 check.
4444 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4445 to -1.
4446 * target.c (struct thread_search): New structure.
4447 (thread_search_callback): New function.
4448 (prev_general_thread): New global.
4449 (prepare_to_access_memory, done_accessing_memory): New functions.
4450 * target.h (prepare_to_access_memory, done_accessing_memory):
4451 Replace macros with function declarations.
4452
4453 2015-11-30 Pedro Alves <palves@redhat.com>
4454
4455 PR 14618
4456 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4457 report TARGET_WAITKIND_NO_RESUMED.
4458 * remote-utils.c (prepare_resume_reply): Handle
4459 TARGET_WAITKIND_NO_RESUMED.
4460 * server.c (report_no_resumed): New global.
4461 (handle_query) <qSupported>: Handle "no-resumed+". Report
4462 "no-resumed+" support.
4463 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4464 return error if the client doesn't support no-resumed events.
4465 (push_stop_notification): New function.
4466 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4467 events if the client supports them.
4468
4469 2015-11-30 Pedro Alves <palves@redhat.com>
4470
4471 * linux-low.c (thread_still_has_status_pending_p): Don't check
4472 vCont;t here.
4473 (lwp_resumed): New function.
4474 (status_pending_p_callback): Return early if the LWP is not
4475 supposed to be resumed.
4476
4477 2015-11-30 Pedro Alves <palves@redhat.com>
4478
4479 * linux-low.c (handle_extended_wait): Assert that the LWP's
4480 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4481 thread create events, leave the new child's status pending.
4482 (linux_low_filter_event): If GDB wants to hear about thread exit
4483 events, leave the LWP marked dead and don't delete it.
4484 (linux_wait_for_event_filtered): Don't check for thread exit.
4485 (filter_exit_event): New function.
4486 (linux_wait_1): Use it, when returning an exit event.
4487 (linux_resume_one_lwp_throw): Assert that the LWP's
4488 waitstatus is TARGET_WAITKIND_IGNORE.
4489 * remote-utils.c (prepare_resume_reply): Handle
4490 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4491 * server.c (report_thread_events): New global.
4492 (handle_general_set): Handle QThreadEvents.
4493 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4494 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4495 TARGET_WAITKIND_THREAD_EXITED.
4496 * server.h (report_thread_events): Declare.
4497
4498 2015-11-30 Pedro Alves <palves@redhat.com>
4499
4500 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4501 the thread's last_resume_kind was resume_stop.
4502
4503 2015-11-30 Pedro Alves <palves@redhat.com>
4504
4505 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4506 before returning.
4507
4508 2015-11-30 Pedro Alves <palves@redhat.com>
4509
4510 * server.c (handle_v_requests): Handle vCtrlC.
4511
4512 2015-11-30 Pedro Alves <palves@redhat.com>
4513
4514 * gdbthread.h (find_any_thread_of_pid): Declare.
4515 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4516 functions.
4517 * server.c (handle_query): If current_thread is NULL, look for
4518 another thread of the selected process.
4519
4520 2015-11-26 Daniel Colascione <dancol@dancol.org>
4521 Simon Marchi <simon.marchi@ericsson.com>
4522
4523 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4524 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4525 name in reply.
4526 * target.h (struct target_ops) <thread_name>: New field.
4527 (target_thread_name): New macro.
4528
4529 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4530
4531 * regcache.h (regcache_invalidate_pid): Add declaration.
4532 * regcache.c (regcache_invalidate_pid): New function, extracted
4533 from regcache_invalidate.
4534 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4535 Add trivial documentation comment.
4536 * lynx-low.c: Use regcache_invalidate_pid instead of
4537 regcache_invalidate.
4538
4539 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4540
4541 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4542 and Elf64_auxv_t if the target is Android.
4543
4544 2015-11-22 Doug Evans <xdje42@gmail.com>
4545
4546 * target.h: #include <sys/types.h>.
4547
4548 2015-11-19 Pedro Alves <palves@redhat.com>
4549
4550 * linux-low.c (linux_process_qsupported): Change prototype.
4551 Adjust.
4552 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4553 Change prototype.
4554 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4555 and adjust to loop over all features.
4556 * server.c (handle_query) <qSupported>: Adjust to call
4557 target_process_qsupported once, passing it a vector of unprocessed
4558 features.
4559 * target.h (struct target_ops) <process_qsupported>: Change
4560 prototype.
4561 (target_process_qsupported): Adjust.
4562
4563 2015-11-19 Pedro Alves <palves@redhat.com>
4564
4565 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4566 mode.
4567 * configure: Regenerate.
4568
4569 2015-11-19 Pedro Alves <palves@redhat.com>
4570
4571 * configure: Regenerate.
4572
4573 2015-11-19 Yao Qi <yao.qi@linaro.org>
4574
4575 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4576 type to uint32_t.
4577
4578 2015-11-19 Yao Qi <yao.qi@linaro.org>
4579
4580 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4581 (struct aarch64_operand): Move enum out.
4582
4583 2015-11-19 Yao Qi <yao.qi@linaro.org>
4584
4585 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4586 struct user_fpsimd_state *.
4587 (aarch64_store_fpregset): Likewise.
4588
4589 2015-11-19 Yao Qi <yao.qi@linaro.org>
4590
4591 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4592 struct user_pt_regs *.
4593 (aarch64_store_gregset): Likewise.
4594
4595 2015-11-18 Pedro Alves <palves@redhat.com>
4596
4597 * Makefile.in (all_object_files): Add $IPA_OBJS.
4598
4599 2015-11-17 Pedro Alves <palves@redhat.com>
4600
4601 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4602 GDB_SIGNAL_0 and gdb_signal_to_string.
4603
4604 2015-11-17 Pedro Alves <palves@redhat.com>
4605
4606 * win32-low.c (handle_output_debug_string): Remove parameter.
4607 (win32_kill): Remove our_status local and adjust call to
4608 handle_output_debug_string.
4609 (get_child_debug_event): Adjust call to
4610 handle_output_debug_string.
4611
4612 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4613
4614 * linux-mips-low.c (mips_fill_gregset): Add cast.
4615 (mips_store_gregset): Likewise.
4616 (mips_fill_fpregset): Likewise.
4617 (mips_store_fpregset): Likewise.
4618
4619 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4620
4621 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4622 priv.
4623
4624 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4625
4626 * linux-mips-low.c (mips_linux_new_thread): Change type of
4627 watch_type to enum target_hw_bp_type.
4628
4629 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4630
4631 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4632 Change return type to arm_hwbp_type.
4633
4634 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4635
4636 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4637 (arm_store_gregset): Likewise.
4638 * linux-arm-low.c (arm_get_hwcap): Likewise.
4639 (arm_read_description): Likewise.
4640
4641 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4642
4643 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4644
4645 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4646
4647 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4648 (ppc_fill_vsxregset): Likewise.
4649 (ppc_store_vsxregset): Likewise.
4650 (ppc_fill_vrregset): Likewise.
4651 (ppc_store_vrregset): Likewise.
4652 (ppc_fill_evrregset): Likewise.
4653 (ppc_store_evrregset): Likewise.
4654
4655 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4656
4657 * linux-ppc-low.c (ppc_usrregs_info): Remove
4658 forward-declaration.
4659 (ppc_arch_setup): Move lower in file.
4660
4661 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4662
4663 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4664 (ps_pdwrite): Likewise.
4665
4666 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4667
4668 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4669 to after assert checks.
4670
4671 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4672
4673 * proc-service.c (ps_pdread): Add/adjust casts.
4674 (ps_pdwrite): Add/adjust casts.
4675
4676 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4677
4678 * server.c (handle_search_memory_1): Cast return value of
4679 memmem.
4680
4681 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4682
4683 * server.c (write_qxfer_response): Change type of data to
4684 gdb_byte *.
4685
4686 2015-10-29 Pedro Alves <palves@redhat.com>
4687
4688 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4689
4690 2015-10-29 Pedro Alves <palves@redhat.com>
4691
4692 * tracepoint.c (clear_installed_tracepoints): Add casts.
4693
4694 2015-10-29 Pedro Alves <palves@redhat.com>
4695
4696 * server.c (handle_v_cont, process_serial_event): Add enum
4697 gdb_signal casts to signal parsing code.
4698
4699 2015-10-29 Pedro Alves <palves@redhat.com>
4700
4701 * linux-low.h (NULL_REGSET): Define.
4702 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4703 * linux-arm-low.c (arm_regsets): Likewise.
4704 * linux-crisv32-low.c (cris_regsets): Likewise.
4705 * linux-m68k-low.c (m68k_regsets): Likewise.
4706 * linux-mips-low.c (mips_regsets): Likewise.
4707 * linux-nios2-low.c (nios2_regsets): Likewise.
4708 * linux-ppc-low.c (ppc_regsets): Likewise.
4709 * linux-s390-low.c (s390_regsets): Likewise.
4710 * linux-sh-low.c (sh_regsets): Likewise.
4711 * linux-sparc-low.c (sparc_regsets): Likewise.
4712 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4713 * linux-tile-low.c (tile_regsets): Likewise.
4714 * linux-x86-low.c (x86_regsets): Likewise.
4715 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4716
4717 2015-10-29 Pedro Alves <palves@redhat.com>
4718
4719 * linux-low.h (NULL_REGSET): Define.
4720 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4721 * linux-arm-low.c (arm_regsets): Likewise.
4722 * linux-crisv32-low.c (cris_regsets): Likewise.
4723 * linux-m68k-low.c (m68k_regsets): Likewise.
4724 * linux-mips-low.c (mips_regsets): Likewise.
4725 * linux-nios2-low.c (nios2_regsets): Likewise.
4726 * linux-ppc-low.c (ppc_regsets): Likewise.
4727 * linux-s390-low.c (s390_regsets): Likewise.
4728 * linux-sh-low.c (sh_regsets): Likewise.
4729 * linux-sparc-low.c (sparc_regsets): Likewise.
4730 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4731 * linux-tile-low.c (tile_regsets): Likewise.
4732 * linux-x86-low.c (x86_regsets): Likewise.
4733 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4734
4735 2015-10-26 Doug Evans <dje@google.com>
4736
4737 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4738
4739 2015-10-26 Doug Evans <dje@google.com>
4740
4741 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4742
4743 2015-10-26 Doug Evans <dje@google.com>
4744
4745 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4746 for debug_printf.
4747 (attach_thread, find_new_threads_callback): Ditto.
4748
4749 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4750
4751 * mem-break.h (set_breakpoint_data): Remove.
4752
4753 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4754
4755 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4756 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4757 (initialize_low): Remove set_breakpoint_data call.
4758 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4759 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4760 (initialize_low): Remove set_breakpoint_data call.
4761 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4762 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4763 (initialize_low): Remove set_breakpoint_data call.
4764
4765 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4766
4767 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4768 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4769 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4770 * target.h (target_breakpoint_kind_from_pc): New macro.
4771
4772 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4773
4774 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4775 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4776 the default breakpoint kind.
4777
4778 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4779
4780 * linux-arm-low.c (arm_supports_z_point_type): Add software
4781 breakpoint support.
4782
4783 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4784
4785 * linux-arm-low.c: Refactor breakpoint definitions.
4786 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4787 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4788
4789 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4790
4791 * Makefile.in: Add arm.c/o.
4792 * configure.srv: Likewise.
4793 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4794 (arm_breakpoint_kind_from_pc): New function.
4795 (arm_sw_breakpoint_from_kind): Return proper kind.
4796 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4797
4798 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4799
4800 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4801 removal.
4802 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4803 (struct raw_breakpoint) <size>: Remove.
4804 (struct raw_breakpoint) <kind>: Add.
4805 (bp_size): New function.
4806 (bp_opcode): Likewise.
4807 (find_raw_breakpoint_at): Adjust for kind.
4808 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4809 (remove_memory_breakpoint): Adjust for kind call bp_size.
4810 (set_raw_breakpoint_at): Adjust for kind.
4811 (set_breakpoint): Likewise.
4812 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4813 (delete_raw_breakpoint): Adjust for kind.
4814 (delete_breakpoint): Likewise.
4815 (find_gdb_breakpoint): Likewise.
4816 (set_gdb_breakpoint_1): Likewise.
4817 (set_gdb_breakpoint): Likewise.
4818 (delete_gdb_breakpoint_1): Likewise.
4819 (delete_gdb_breakpoint): Likewise.
4820 (uninsert_raw_breakpoint): Likewise.
4821 (reinsert_raw_breakpoint): Likewise.
4822 (set_breakpoint_data): Remove.
4823 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4824 (check_mem_read): Adjust for kind call bp_size.
4825 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4826 (clone_one_breakpoint): Adjust for kind.
4827 * mem-break.h (set_gdb_breakpoint): Likewise.
4828 (delete_gdb_breakpoint): Likewise.
4829 * server.c (process_serial_event): Likewise.
4830
4831 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4832
4833 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4834 (struct linux_target_ops) <breakpoint>: Remove.
4835 (struct linux_target_ops) <breakpoint_len>: Remove.
4836 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4837 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4838 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4839 (arm_sw_breakpoint_from_kind): New function.
4840 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4841 (struct linux_target_ops) <breakpoint>: Remove.
4842 (struct linux_target_ops) <breakpoint_len>: Remove.
4843 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4844 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4845 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4846 (struct linux_target_ops) <breakpoint>: Remove.
4847 (struct linux_target_ops) <breakpoint_len>: Remove.
4848 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4849 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4850 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4851 (struct linux_target_ops) <breakpoint>: Remove.
4852 (struct linux_target_ops) <breakpoint_len>: Remove.
4853 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4854 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4855 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4856 and sw_breakpoint_from_kind to increment the pc.
4857 (linux_breakpoint_kind_from_pc): New function.
4858 (linux_sw_breakpoint_from_kind): New function.
4859 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4860 (initialize_low): Call breakpoint_kind_from_pc and
4861 sw_breakpoint_from_kind to replace breakpoint_data/len.
4862 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4863 New field.
4864 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4865 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4866 (struct linux_target_ops) <breakpoint>: Remove.
4867 (struct linux_target_ops) <breakpoint_len>: Remove.
4868 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4869 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4870 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4871 (struct linux_target_ops) <breakpoint>: Remove.
4872 (struct linux_target_ops) <breakpoint_len>: Remove.
4873 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4874 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4875 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4876 (struct linux_target_ops) <breakpoint>: Remove.
4877 (struct linux_target_ops) <breakpoint_len>: Remove.
4878 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4879 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4880 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4881 (struct linux_target_ops) <breakpoint>: Remove.
4882 (struct linux_target_ops) <breakpoint_len>: Remove.
4883 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4884 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4885 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4886 (struct linux_target_ops) <breakpoint>: Remove.
4887 (struct linux_target_ops) <breakpoint_len>: Remove.
4888 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4889 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4890 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4891 (struct linux_target_ops) <breakpoint>: Remove.
4892 (struct linux_target_ops) <breakpoint_len>: Remove.
4893 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4894 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4895 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4896 (struct linux_target_ops) <breakpoint>: Remove.
4897 (struct linux_target_ops) <breakpoint_len>: Remove.
4898 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4899 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4900 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4901 (struct linux_target_ops) <breakpoint>: Remove.
4902 (struct linux_target_ops) <breakpoint_len>: Remove.
4903 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4904 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4905 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4906 (struct linux_target_ops) <breakpoint>: Remove.
4907 (struct linux_target_ops) <breakpoint_len>: Remove.
4908 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4909 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4910 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4911 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4912 (struct linux_target_ops) <breakpoint>: Remove.
4913 (struct linux_target_ops) <breakpoint_len>: Remove.
4914 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4915 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4916 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4917 (struct linux_target_ops) <breakpoint>: Remove.
4918 (struct linux_target_ops) <breakpoint_len>: Remove.
4919 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4920 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4921
4922 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4923
4924 * linux-cris-low.c (cris_get_pc): Remove void arg.
4925
4926 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4927
4928 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4929 variable name.
4930
4931 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4932
4933 * inferiors.c (thread_pid_matches_callback): New function.
4934 (find_thread_process): New function.
4935 (remove_thread): Reset current_thread.
4936 (remove_process): Assert threads have been removed first.
4937
4938 2015-10-15 Yao Qi <yao.qi@linaro.org>
4939
4940 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4941 if it is 3.
4942 (aarch64_remove_point): Likewise.
4943 * regcache.c (regcache_register_size): New function.
4944
4945 2015-10-12 Yao Qi <yao.qi@linaro.org>
4946
4947 * linux-aarch64-low.c: Update all callers as emit_load_store
4948 is renamed to aarch64_emit_load_store.
4949
4950 2015-10-12 Yao Qi <yao.qi@linaro.org>
4951
4952 * linux-aarch64-low.c: Update all callers of function renaming
4953 from emit_insn to aarch64_emit_insn.
4954
4955 2015-10-12 Yao Qi <yao.qi@linaro.org>
4956
4957 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4958 arch/aarch64-insn.h.
4959 (struct aarch64_memory_operand): Likewise.
4960 (ENCODE): Likewise.
4961 (emit_insn): Move to arch/aarch64-insn.c.
4962 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4963 (emit_load_store): Move to arch/aarch64-insn.c.
4964 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4965 (can_encode_int32): Remove.
4966
4967 2015-10-12 Yao Qi <yao.qi@linaro.org>
4968
4969 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4970 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4971 (aarch64_relocate_instruction): Likewise.
4972 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4973 (struct aarch64_insn_visitor): Likewise.
4974
4975 2015-10-12 Yao Qi <yao.qi@linaro.org>
4976
4977 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4978 (struct aarch64_insn_visitor): New.
4979 (struct aarch64_insn_relocation_data): New.
4980 (aarch64_ftrace_insn_reloc_b): New function.
4981 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4982 (aarch64_ftrace_insn_reloc_cb): Likewise.
4983 (aarch64_ftrace_insn_reloc_tb): Likewise.
4984 (aarch64_ftrace_insn_reloc_adr): Likewise.
4985 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4986 (aarch64_ftrace_insn_reloc_others): Likewise.
4987 (visitor): New.
4988 (aarch64_relocate_instruction): Use visitor.
4989
4990 2015-10-12 Yao Qi <yao.qi@linaro.org>
4991
4992 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4993 int. Add argument buf.
4994 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4995 aarch64_relocate_instruction.
4996
4997 2015-10-12 Yao Qi <yao.qi@linaro.org>
4998
4999 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
5000 argument insn. Remove local variable insn. Don't call
5001 target_read_uint32.
5002 (aarch64_install_fast_tracepoint_jump_pad): Call
5003 target_read_uint32.
5004
5005 2015-09-30 Yao Qi <yao.qi@linaro.org>
5006
5007 * linux-aarch64-low.c (emit_movk): Shorten a long line.
5008 (emit_load_store_pair): Likewise.
5009
5010 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5011
5012 * dll.c (match_dll): Add cast(s).
5013 (unloaded_dll): Likewise.
5014 * linux-low.c (second_thread_of_pid_p): Likewise.
5015 (delete_lwp_callback): Likewise.
5016 (count_events_callback): Likewise.
5017 (select_event_lwp_callback): Likewise.
5018 (linux_set_resume_request): Likewise.
5019 * server.c (accumulate_file_name_length): Likewise.
5020 (emit_dll_description): Likewise.
5021 (handle_qxfer_threads_worker): Likewise.
5022 (visit_actioned_threads): Likewise.
5023 * thread-db.c (any_thread_of): Likewise.
5024 * tracepoint.c (same_process_p): Likewise.
5025 (match_blocktype): Likewise.
5026 (build_traceframe_info_xml): Likewise.
5027
5028 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
5029
5030 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
5031 assignment.
5032 (gdb_unparse_agent_expr): Likewise.
5033 * hostio.c (require_data): Likewise.
5034 (handle_pread): Likewise.
5035 * linux-low.c (disable_regset): Likewise.
5036 (fetch_register): Likewise.
5037 (store_register): Likewise.
5038 (get_dynamic): Likewise.
5039 (linux_qxfer_libraries_svr4): Likewise.
5040 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
5041 (set_fast_tracepoint_jump): Likewise.
5042 (uninsert_fast_tracepoint_jumps_at): Likewise.
5043 (reinsert_fast_tracepoint_jumps_at): Likewise.
5044 (validate_inserted_breakpoint): Likewise.
5045 (clone_agent_expr): Likewise.
5046 * regcache.c (init_register_cache): Likewise.
5047 * remote-utils.c (putpkt_binary_1): Likewise.
5048 (decode_M_packet): Likewise.
5049 (decode_X_packet): Likewise.
5050 (look_up_one_symbol): Likewise.
5051 (relocate_instruction): Likewise.
5052 (monitor_output): Likewise.
5053 * server.c (handle_search_memory): Likewise.
5054 (handle_qxfer_exec_file): Likewise.
5055 (handle_qxfer_libraries): Likewise.
5056 (handle_qxfer): Likewise.
5057 (handle_query): Likewise.
5058 (handle_v_cont): Likewise.
5059 (handle_v_run): Likewise.
5060 (captured_main): Likewise.
5061 * target.c (write_inferior_memory): Likewise.
5062 * thread-db.c (try_thread_db_load_from_dir): Likewise.
5063 * tracepoint.c (init_trace_buffer): Likewise.
5064 (add_tracepoint_action): Likewise.
5065 (add_traceframe): Likewise.
5066 (add_traceframe_block): Likewise.
5067 (cmd_qtdpsrc): Likewise.
5068 (cmd_qtdv): Likewise.
5069 (cmd_qtstatus): Likewise.
5070 (response_source): Likewise.
5071 (response_tsv): Likewise.
5072 (cmd_qtnotes): Likewise.
5073 (gdb_collect): Likewise.
5074 (initialize_tracepoint): Likewise.
5075
5076 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5077
5078 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
5079 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5080 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
5081 <NOP>: New.
5082 (enum aarch64_condition_codes): New enum.
5083 (w0): New static global.
5084 (fp): Likewise.
5085 (lr): Likewise.
5086 (struct aarch64_memory_operand) <type>: New
5087 MEMORY_OPERAND_POSTINDEX type.
5088 (postindex_memory_operand): New helper function.
5089 (emit_ret): New function.
5090 (emit_load_store_pair): New function, factored out of emit_stp
5091 with support for MEMORY_OPERAND_POSTINDEX.
5092 (emit_stp): Rewrite using emit_load_store_pair.
5093 (emit_ldp): New function.
5094 (emit_load_store): Likewise.
5095 (emit_ldr): Mention post-index instruction in comment.
5096 (emit_ldrh): New function.
5097 (emit_ldrb): New function.
5098 (emit_ldrsw): Mention post-index instruction in comment.
5099 (emit_str): Likewise.
5100 (emit_subs): New function.
5101 (emit_cmp): Likewise.
5102 (emit_and): Likewise.
5103 (emit_orr): Likewise.
5104 (emit_orn): Likewise.
5105 (emit_eor): Likewise.
5106 (emit_mvn): Likewise.
5107 (emit_lslv): Likewise.
5108 (emit_lsrv): Likewise.
5109 (emit_asrv): Likewise.
5110 (emit_mul): Likewise.
5111 (emit_sbfm): Likewise.
5112 (emit_sbfx): Likewise.
5113 (emit_ubfm): Likewise.
5114 (emit_ubfx): Likewise.
5115 (emit_csinc): Likewise.
5116 (emit_cset): Likewise.
5117 (emit_nop): Likewise.
5118 (emit_ops_insns): New helper function.
5119 (emit_pop): Likewise.
5120 (emit_push): Likewise.
5121 (aarch64_emit_prologue): New function.
5122 (aarch64_emit_epilogue): Likewise.
5123 (aarch64_emit_add): Likewise.
5124 (aarch64_emit_sub): Likewise.
5125 (aarch64_emit_mul): Likewise.
5126 (aarch64_emit_lsh): Likewise.
5127 (aarch64_emit_rsh_signed): Likewise.
5128 (aarch64_emit_rsh_unsigned): Likewise.
5129 (aarch64_emit_ext): Likewise.
5130 (aarch64_emit_log_not): Likewise.
5131 (aarch64_emit_bit_and): Likewise.
5132 (aarch64_emit_bit_or): Likewise.
5133 (aarch64_emit_bit_xor): Likewise.
5134 (aarch64_emit_bit_not): Likewise.
5135 (aarch64_emit_equal): Likewise.
5136 (aarch64_emit_less_signed): Likewise.
5137 (aarch64_emit_less_unsigned): Likewise.
5138 (aarch64_emit_ref): Likewise.
5139 (aarch64_emit_if_goto): Likewise.
5140 (aarch64_emit_goto): Likewise.
5141 (aarch64_write_goto_address): Likewise.
5142 (aarch64_emit_const): Likewise.
5143 (aarch64_emit_call): Likewise.
5144 (aarch64_emit_reg): Likewise.
5145 (aarch64_emit_pop): Likewise.
5146 (aarch64_emit_stack_flush): Likewise.
5147 (aarch64_emit_zero_ext): Likewise.
5148 (aarch64_emit_swap): Likewise.
5149 (aarch64_emit_stack_adjust): Likewise.
5150 (aarch64_emit_int_call_1): Likewise.
5151 (aarch64_emit_void_call_2): Likewise.
5152 (aarch64_emit_eq_goto): Likewise.
5153 (aarch64_emit_ne_goto): Likewise.
5154 (aarch64_emit_lt_goto): Likewise.
5155 (aarch64_emit_le_goto): Likewise.
5156 (aarch64_emit_gt_goto): Likewise.
5157 (aarch64_emit_ge_got): Likewise.
5158 (aarch64_emit_ops_impl): New static global variable.
5159 (aarch64_emit_ops): New target function, return
5160 &aarch64_emit_ops_impl.
5161 (struct linux_target_ops): Install it.
5162
5163 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5164
5165 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5166 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5167 aarch64-ipa.o.
5168 * linux-aarch64-ipa.c: New file.
5169 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5170 and endian.h.
5171 (aarch64_get_thread_area): New target method.
5172 (extract_signed_bitfield): New helper function.
5173 (aarch64_decode_ldr_literal): New function.
5174 (enum aarch64_opcodes): New enum.
5175 (struct aarch64_register): New struct.
5176 (struct aarch64_operand): New struct.
5177 (x0): New static global.
5178 (x1): Likewise.
5179 (x2): Likewise.
5180 (x3): Likewise.
5181 (x4): Likewise.
5182 (w2): Likewise.
5183 (ip0): Likewise.
5184 (sp): Likewise.
5185 (xzr): Likewise.
5186 (aarch64_register): New helper function.
5187 (register_operand): Likewise.
5188 (immediate_operand): Likewise.
5189 (struct aarch64_memory_operand): New struct.
5190 (offset_memory_operand): New helper function.
5191 (preindex_memory_operand): Likewise.
5192 (enum aarch64_system_control_registers): New enum.
5193 (ENCODE): New macro.
5194 (emit_insn): New helper function.
5195 (emit_b): New function.
5196 (emit_bcond): Likewise.
5197 (emit_cb): Likewise.
5198 (emit_tb): Likewise.
5199 (emit_blr): Likewise.
5200 (emit_stp): Likewise.
5201 (emit_ldp_q_offset): Likewise.
5202 (emit_stp_q_offset): Likewise.
5203 (emit_load_store): Likewise.
5204 (emit_ldr): Likewise.
5205 (emit_ldrsw): Likewise.
5206 (emit_str): Likewise.
5207 (emit_ldaxr): Likewise.
5208 (emit_stxr): Likewise.
5209 (emit_stlr): Likewise.
5210 (emit_data_processing_reg): Likewise.
5211 (emit_data_processing): Likewise.
5212 (emit_add): Likewise.
5213 (emit_sub): Likewise.
5214 (emit_mov): Likewise.
5215 (emit_movk): Likewise.
5216 (emit_mov_addr): Likewise.
5217 (emit_mrs): Likewise.
5218 (emit_msr): Likewise.
5219 (emit_sevl): Likewise.
5220 (emit_wfe): Likewise.
5221 (append_insns): Likewise.
5222 (can_encode_int32_in): New helper function.
5223 (aarch64_relocate_instruction): New function.
5224 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5225 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5226 (struct linux_target_ops): Install aarch64_get_thread_area,
5227 aarch64_install_fast_tracepoint_jump_pad and
5228 aarch64_get_min_fast_tracepoint_insn_len.
5229
5230 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5231
5232 * Makefile.in (aarch64-insn.o): New rule.
5233 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5234
5235 2015-09-21 Yao Qi <yao.qi@linaro.org>
5236
5237 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5238
5239 2015-09-21 Yao Qi <yao.qi@linaro.org>
5240
5241 * tracepoint.c (max_jump_pad_size): Remove.
5242
5243 2015-09-18 Yao Qi <yao.qi@linaro.org>
5244
5245 * linux-aarch64-low.c: Don't include sys/uio.h.
5246 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5247
5248 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5249
5250 * tracepoint.c (eval_result_type): Change prototype.
5251 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5252
5253 2015-09-15 Pedro Alves <palves@redhat.com>
5254
5255 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5256 Check whether to report exec events instead of checking whether
5257 multiprocess is enabled.
5258
5259 2015-09-15 Pedro Alves <palves@redhat.com>
5260
5261 PR remote/18965
5262 * remote-utils.c (prepare_resume_reply): Merge
5263 TARGET_WAITKIND_VFORK_DONE switch case with the
5264 TARGET_WAITKIND_FORKED case.
5265
5266 2015-09-15 Yao Qi <yao.qi@linaro.org>
5267
5268 * server.c (handle_query): Check string comparison using
5269 "else if" instead of "if".
5270
5271 2015-09-15 Yao Qi <yao.qi@linaro.org>
5272
5273 * server.c (vCont_supported): New global variable.
5274 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5275 matches. Append ";vContSupported+" to own_buf.
5276 (handle_v_requests): Append ";s;S" to own_buf if target supports
5277 hardware single step or vCont_supported is false.
5278 (capture_main): Set vCont_supported to zero.
5279
5280 2015-09-15 Yao Qi <yao.qi@linaro.org>
5281
5282 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5283 it to ...
5284 (linux_supports_hardware_single_step): ... New function.
5285 (linux_target_ops): Update.
5286 * lynx-low.c (lynx_target_ops): Set field
5287 supports_hardware_single_step to target_can_do_hardware_single_step.
5288 * nto-low.c (nto_target_ops): Likewise.
5289 * spu-low.c (spu_target_ops): Likewise.
5290 * win32-low.c (win32_target_ops): Likewise.
5291 * target.c (target_can_do_hardware_single_step): New function.
5292 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5293 Remove. <supports_hardware_single_step>: New field.
5294 (target_supports_conditional_breakpoints): Remove.
5295 (target_supports_hardware_single_step): New macro.
5296 (target_can_do_hardware_single_step): Declare.
5297 * server.c (handle_query): Use target_supports_hardware_single_step
5298 instead of target_supports_conditional_breakpoints.
5299
5300 2015-09-15 Yao Qi <yao.qi@linaro.org>
5301
5302 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5303 function.
5304 (struct linux_target_ops the_low_target): Install
5305 aarch64_linux_siginfo_fixup.
5306
5307 2015-09-11 Don Breazeal <donb@codesourcery.com>
5308 Luis Machado <lgustavo@codesourcery.com>
5309
5310 * linux-low.c (linux_mourn): Static declaration.
5311 (linux_arch_setup): Move in front of
5312 handle_extended_wait.
5313 (linux_arch_setup_thread): New function.
5314 (handle_extended_wait): Handle exec events. Call
5315 linux_arch_setup_thread. Make event_lwp argument a
5316 pointer-to-a-pointer.
5317 (check_zombie_leaders): Do not check stopped threads.
5318 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5319 (linux_low_filter_event): Add lwp and thread for exec'ing
5320 non-leader thread if leader thread has been deleted.
5321 Refactor code into linux_arch_setup_thread and call it.
5322 Pass child lwp pointer by reference to handle_extended_wait.
5323 (linux_wait_for_event_filtered): Update comment.
5324 (linux_wait_1): Prevent clobbering exec event status.
5325 (linux_supports_exec_events): New function.
5326 (linux_target_ops) <supports_exec_events>: Initialize new member.
5327 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5328 new member.
5329 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5330 * server.c (report_exec_events): New global variable.
5331 (handle_query): Handle qSupported query for exec-events feature.
5332 (captured_main): Initialize report_exec_events.
5333 * server.h (report_exec_events): Declare new global variable.
5334 * target.h (struct target_ops) <supports_exec_events>: New
5335 member.
5336 (target_supports_exec_events): New macro.
5337 * win32-low.c (win32_target_ops) <supports_exec_events>:
5338 Initialize new member.
5339
5340 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5341
5342 * linux-low.c (linux_low_enable_btrace): Remove.
5343 (linux_target_ops): Replace linux_low_enable_btrace with
5344 linux_enable_btrace.
5345
5346 2015-09-03 Yao Qi <yao.qi@linaro.org>
5347
5348 * linux-aarch64-low.c (aarch64_insert_point): Call
5349 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5350 returns true.
5351
5352 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5353
5354 * linux-low.c (check_stopped_by_breakpoint): Use
5355 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5356
5357 2015-08-27 Pedro Alves <palves@redhat.com>
5358
5359 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5360
5361 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5362
5363 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5364 the XNEW-family equivalent.
5365 (compile_bytecodes): Likewise.
5366 * dll.c (loaded_dll): Likewise.
5367 * event-loop.c (append_callback_event): Likewise.
5368 (create_file_handler): Likewise.
5369 (create_file_event): Likewise.
5370 * hostio.c (handle_open): Likewise.
5371 * inferiors.c (add_thread): Likewise.
5372 (add_process): Likewise.
5373 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5374 * linux-arm-low.c (arm_new_process): Likewise.
5375 (arm_new_thread): Likewise.
5376 * linux-low.c (add_to_pid_list): Likewise.
5377 (linux_add_process): Likewise.
5378 (handle_extended_wait): Likewise.
5379 (add_lwp): Likewise.
5380 (enqueue_one_deferred_signal): Likewise.
5381 (enqueue_pending_signal): Likewise.
5382 (linux_resume_one_lwp_throw): Likewise.
5383 (linux_resume_one_thread): Likewise.
5384 (linux_read_memory): Likewise.
5385 (linux_write_memory): Likewise.
5386 * linux-mips-low.c (mips_linux_new_process): Likewise.
5387 (mips_linux_new_thread): Likewise.
5388 (mips_add_watchpoint): Likewise.
5389 * linux-x86-low.c (initialize_low_arch): Likewise.
5390 * lynx-low.c (lynx_add_process): Likewise.
5391 * mem-break.c (set_raw_breakpoint_at): Likewise.
5392 (set_breakpoint): Likewise.
5393 (add_condition_to_breakpoint): Likewise.
5394 (add_commands_to_breakpoint): Likewise.
5395 (clone_agent_expr): Likewise.
5396 (clone_one_breakpoint): Likewise.
5397 * regcache.c (new_register_cache): Likewise.
5398 * remote-utils.c (look_up_one_symbol): Likewise.
5399 * server.c (queue_stop_reply): Likewise.
5400 (start_inferior): Likewise.
5401 (queue_stop_reply_callback): Likewise.
5402 (handle_target_event): Likewise.
5403 * spu-low.c (fetch_ppc_memory): Likewise.
5404 (store_ppc_memory): Likewise.
5405 * target.c (set_target_ops): Likewise.
5406 * thread-db.c (thread_db_load_search): Likewise.
5407 (try_thread_db_load_1): Likewise.
5408 * tracepoint.c (add_tracepoint): Likewise.
5409 (add_tracepoint_action): Likewise.
5410 (create_trace_state_variable): Likewise.
5411 (cmd_qtdpsrc): Likewise.
5412 (cmd_qtro): Likewise.
5413 (add_while_stepping_state): Likewise.
5414 * win32-low.c (child_add_thread): Likewise.
5415 (get_image_name): Likewise.
5416
5417 2015-08-25 Yao Qi <yao.qi@linaro.org>
5418
5419 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5420
5421 2015-08-25 Yao Qi <yao.qi@linaro.org>
5422
5423 * Makefile.in (aarch64-linux.o): New rule.
5424 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5425 srv_tgtobj.
5426 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5427 (aarch64_init_debug_reg_state): Make it extern.
5428 (aarch64_linux_prepare_to_resume): Remove.
5429
5430 2015-08-25 Yao Qi <yao.qi@linaro.org>
5431
5432 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5433 lwp_arch_private_info and ptid_of_lwp.
5434
5435 2015-08-25 Yao Qi <yao.qi@linaro.org>
5436
5437 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5438 Find proc_info by find_process_pid. All callers updated.
5439
5440 2015-08-25 Yao Qi <yao.qi@linaro.org>
5441
5442 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5443 Remove.
5444 (debug_reg_change_callback): Remove.
5445 (aarch64_notify_debug_reg_change): Remove.
5446
5447 2015-08-25 Yao Qi <yao.qi@linaro.org>
5448
5449 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5450 Call current_lwp_ptid.
5451
5452 2015-08-25 Yao Qi <yao.qi@linaro.org>
5453
5454 * linux-aarch64-low.c (debug_reg_change_callback): Use
5455 debug_printf.
5456
5457 2015-08-25 Yao Qi <yao.qi@linaro.org>
5458
5459 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5460
5461 2015-08-25 Yao Qi <yao.qi@linaro.org>
5462
5463 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5464
5465 2015-08-25 Yao Qi <yao.qi@linaro.org>
5466
5467 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5468 the code.
5469
5470 2015-08-25 Yao Qi <yao.qi@linaro.org>
5471
5472 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5473 Remove.
5474 (debug_reg_change_callback): Remove argument entry and add argument
5475 lwp. Remove local variable thread. Don't print thread id in the
5476 debugging output. Don't check whether pid of thread equals to pid.
5477 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5478 iterate_over_lwps instead find_inferior.
5479
5480 2015-08-24 Pedro Alves <palves@redhat.com>
5481
5482 * inferiors.c (get_first_process): New function.
5483 * inferiors.h (get_first_process): New declaration.
5484 * remote-utils.c (read_ptid): Default to the first process in the
5485 list, instead of to the current thread's process.
5486
5487 2015-08-24 Pedro Alves <palves@redhat.com>
5488
5489 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5490 * event-loop.c: Likewise.
5491 * remote-utils.c: Likewise.
5492 * tracepoint.c: Likewise.
5493
5494 2015-08-24 Pedro Alves <palves@redhat.com>
5495
5496 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5497 ptid_get_lwp.
5498
5499 2015-08-21 Pedro Alves <palves@redhat.com>
5500
5501 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5502 instead of literal 1.
5503
5504 2015-08-21 Pedro Alves <palves@redhat.com>
5505
5506 * tdesc.c (default_description): Explicitly zero-initialize.
5507
5508 2015-08-21 Pedro Alves <palves@redhat.com>
5509
5510 PR gdb/18749
5511 * inferiors.c (remove_thread): Discard any pending stop reply for
5512 this thread.
5513 * server.c (remove_all_on_match_pid): Rename to ...
5514 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5515 instead of a pid.
5516 (discard_queued_stop_replies): Change parameter to a ptid. Now
5517 extern.
5518 (handle_v_kill, kill_inferior_callback, captured_main)
5519 (process_serial_event): Adjust.
5520 * server.h (discard_queued_stop_replies): Declare.
5521
5522 2015-08-21 Pedro Alves <palves@redhat.com>
5523
5524 * linux-low.c (wait_for_sigstop): Always switch to no thread
5525 selected if the previously current thread dies.
5526 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5527 process instead of the current thread's.
5528 * remote-utils.c (input_interrupt): Don't check if there's no
5529 current thread.
5530 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5531 current thread to the general thread fails, error out.
5532 (handle_qxfer_auxv, handle_qxfer_libraries)
5533 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5534 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5535 (handle_query): Check if there's a thread selected instead of
5536 checking whether there's any thread in the thread list.
5537 (handle_qxfer_threads, handle_qxfer_btrace)
5538 (handle_qxfer_btrace_conf): Don't error out early if there's no
5539 thread in the thread list.
5540 (handle_v_cont, myresume): Don't set the current thread to the
5541 continue thread.
5542 (process_serial_event) <Hg handling>: Also set thread_id if the
5543 previous general thread is still alive.
5544 (process_serial_event) <g/G handling>: If setting the current
5545 thread to the general thread fails, error out.
5546 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5547 thread's lwp instead of the current thread's.
5548 * target.c (set_desired_thread): If the desired thread was not
5549 found, leave the current thread pointing to NULL. Return an int
5550 (boolean) indicating success.
5551 * target.h (set_desired_thread): Change return type to int.
5552
5553 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5554
5555 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5556 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5557 #includes.
5558 (ps_get_thread_area): New function.
5559
5560 2015-08-19 Gary Benson <gbenson@redhat.com>
5561
5562 * hostio.c (handle_pread): Do not attempt to read more data
5563 than hostio_reply_with_data can fit in a packet.
5564
5565 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5566
5567 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5568
5569 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5570
5571 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5572
5573 2015-08-06 Pedro Alves <palves@redhat.com>
5574
5575 * tracepoint.c (expr_eval_result): Now an int.
5576
5577 2015-08-06 Pedro Alves <palves@redhat.com>
5578
5579 * gdbthread.h (struct regcache): Forward declare.
5580 (struct thread_info) <regcache_data>: Now a struct regcache
5581 pointer.
5582 * inferiors.c (inferior_regcache_data)
5583 (set_inferior_regcache_data): Now work with struct regcache
5584 pointers.
5585 * inferiors.h (struct regcache): Forward declare.
5586 (inferior_regcache_data, set_inferior_regcache_data): Now work
5587 with struct regcache pointers.
5588 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5589 (free_register_cache_thread): Remove struct regcache pointer
5590 casts.
5591
5592 2015-08-06 Pedro Alves <palves@redhat.com>
5593
5594 * server.c (captured_main): On error, print the exception message
5595 to stderr, and if run_once is set, throw a quit.
5596
5597 2015-08-06 Pedro Alves <palves@redhat.com>
5598
5599 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5600 the current thread.
5601
5602 2015-08-06 Pedro Alves <palves@redhat.com>
5603
5604 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5605 reading beyond the passed in buffer length.
5606
5607 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5608
5609 * tracepoint.c (symbol_list) <required>: Remove.
5610
5611 2015-08-06 Pedro Alves <palves@redhat.com>
5612
5613 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5614 count if stopping and suspending threads.
5615 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5616 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5617 (linux_detach): Complete an ongoing step-over.
5618 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5619 throughout.
5620 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5621 (linux_wait_1): If passing a signal to the inferior after
5622 finishing a step-over, unsuspend and re-resume all lwps. If we
5623 see a single-step event but the thread should be continuing, don't
5624 pass the trap to gdb.
5625 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5626 internal_error instead of gdb_assert.
5627 (enqueue_pending_signal): New function.
5628 (check_ptrace_stopped_lwp_gone): Add debug output.
5629 (start_step_over): Use internal_error instead of gdb_assert.
5630 (complete_ongoing_step_over): New function.
5631 (linux_resume_one_thread): Don't resume a suspended thread.
5632 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5633 it stepping.
5634
5635 2015-08-06 Pedro Alves <palves@redhat.com>
5636
5637 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5638 (linux_thread_alive): Use lwp_is_marked_dead.
5639 (extended_event_reported): Delete.
5640 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5641 instead of extended_event_reported.
5642 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5643 as well.
5644 (lwp_is_marked_dead): New function.
5645 (lwp_running): Use lwp_is_marked_dead.
5646 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5647 comment.
5648
5649 2015-08-06 Pedro Alves <palves@redhat.com>
5650
5651 * linux-low.c (linux_wait_1): Move fork event output out of the
5652 !report_to_gdb check. Pass event_child->waitstatus to
5653 target_waitstatus_to_string instead of ourstatus.
5654
5655 2015-08-04 Yao Qi <yao.qi@linaro.org>
5656
5657 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5658 if current_thread is 32 bit.
5659
5660 2015-08-04 Yao Qi <yao.qi@linaro.org>
5661
5662 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5663 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5664 * server.c (extended_protocol): Remove "static".
5665 * server.h (extended_protocol): Declare it.
5666
5667 2015-08-04 Yao Qi <yao.qi@linaro.org>
5668
5669 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5670 both aarch64 and aarch32.
5671 (aarch64_set_pc): Likewise.
5672
5673 2015-08-04 Yao Qi <yao.qi@linaro.org>
5674
5675 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5676 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5677 arm-with-neon.xml to srv_xmlfiles.
5678 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5679 (is_64bit_tdesc): New function.
5680 (aarch64_linux_read_description): New function.
5681 (aarch64_arch_setup): Call aarch64_linux_read_description.
5682 (regs_info): Rename to regs_info_aarch64.
5683 (aarch64_regs_info): Return right regs_info.
5684 (initialize_low_arch): Call initialize_low_arch_aarch32.
5685
5686 2015-08-04 Yao Qi <yao.qi@linaro.org>
5687
5688 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5689 * linux-aarch32-low.c: New file.
5690 * linux-aarch32-low.h: New file.
5691 * linux-arm-low.c (arm_fill_gregset): Move it to
5692 linux-aarch32-low.c.
5693 (arm_store_gregset): Likewise.
5694 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5695 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5696 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5697 (regs_info): Rename to regs_info_arm.
5698 (arm_regs_info): Return regs_info_aarch32 if
5699 have_ptrace_getregset is 1 and target description is
5700 arm_with_neon or arm_with_vfpv3.
5701 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5702 Call initialize_low_arch_aarch32 instead.
5703
5704 2015-08-04 Yao Qi <yao.qi@linaro.org>
5705
5706 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5707 * linux-low.c: ... here.
5708 * linux-low.h (have_ptrace_getregset): Declare it.
5709
5710 2015-08-04 Pedro Alves <palves@redhat.com>
5711
5712 * thread-db.c (struct thread_db): Use new typedefs.
5713 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5714 CHK calls.
5715 (disable_thread_event_reporting): Cast result of dlsym to
5716 destination function pointer type.
5717 (thread_db_mourn): Use td_ta_delete_ftype.
5718
5719 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5720
5721 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5722 arch variant.
5723 (CDX_BREAKPOINT): Define for R2.
5724 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5725 (the_low_target): Add comments.
5726
5727 2015-07-30 Yao Qi <yao.qi@linaro.org>
5728
5729 * linux-arm-low.c (arm_hwcap): Remove it.
5730 (arm_read_description): New local variable arm_hwcap. Don't
5731 set arm_hwcap to zero.
5732
5733 2015-07-30 Yao Qi <yao.qi@linaro.org>
5734
5735 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5736 Use regcache->tdesc instead.
5737 (arm_store_wmmxregset): Likewise.
5738 (arm_fill_vfpregset): Likewise.
5739 (arm_store_vfpregset): Likewise.
5740
5741 2015-07-30 Yao Qi <yao.qi@linaro.org>
5742
5743 * linux-arm-low.c: Include arch/arm.h.
5744 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5745 (arm_store_gregset): Likewise.
5746
5747 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5748
5749 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5750 ptrace's 4th parameter.
5751
5752 2015-07-27 Yao Qi <yao.qi@linaro.org>
5753
5754 * configure.srv (case aarch64*-*-linux*): Don't set
5755 srv_linux_usrregs.
5756
5757 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5758
5759 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5760 sys/ptrace.h.
5761 * linux-arm-low.c: Likewise.
5762 * linux-cris-low.c: Likewise.
5763 * linux-crisv32-low.c: Likewise.
5764 * linux-low.c: Likewise.
5765 * linux-m68k-low.c: Likewise.
5766 * linux-mips-low.c: Likewise.
5767 * linux-nios2-low.c: Likewise.
5768 * linux-s390-low.c: Likewise.
5769 * linux-sparc-low.c: Likewise.
5770 * linux-tic6x-low.c: Likewise.
5771 * linux-tile-low.c: Likewise.
5772 * linux-x86-low.c: Likewise.
5773
5774 2015-07-24 Pedro Alves <palves@redhat.com>
5775
5776 * config.in: Regenerate.
5777 * configure: Regenerate.
5778
5779 2015-07-24 Pedro Alves <palves@redhat.com>
5780
5781 * acinclude.m4: Include ../ptrace.m4.
5782 * configure.ac: Call GDB_AC_PTRACE.
5783 * config.in, configure: Regenerate.
5784
5785 2015-07-24 Yao Qi <yao.qi@linaro.org>
5786
5787 * linux-low.c (linux_create_inferior): Remove setting to
5788 proc->priv->new_inferior.
5789 (linux_attach): Likewise.
5790 (linux_low_filter_event): Likewise.
5791 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5792
5793 2015-07-24 Yao Qi <yao.qi@linaro.org>
5794
5795 * linux-low.c (linux_arch_setup): New function.
5796 (linux_low_filter_event): If proc->tdesc is NULL and
5797 proc->attached is true, call the_low_target.arch_setup.
5798 Otherwise, keep status pending, and return.
5799 (linux_resume_one_lwp_throw): Don't call get_pc if
5800 thread->while_stepping isn't NULL. Don't call
5801 get_thread_regcache if proc->tdesc is NULL.
5802 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5803 (linux_target_ops): Install arch_setup.
5804 * server.c (start_inferior): Call the_target->arch_setup.
5805 * target.h (struct target_ops) <arch_setup>: New field.
5806 (target_arch_setup): New marco.
5807 * lynx-low.c (lynx_target_ops): Update.
5808 * nto-low.c (nto_target_ops): Update.
5809 * spu-low.c (spu_target_ops): Update.
5810 * win32-low.c (win32_target_ops): Update.
5811
5812 2015-07-24 Yao Qi <yao.qi@linaro.org>
5813
5814 * linux-low.c (linux_add_process): Don't set
5815 proc->priv->new_inferior.
5816 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5817 (linux_attach): Likewise.
5818
5819 2015-07-24 Yao Qi <yao.qi@linaro.org>
5820
5821 * server.c (start_inferior): Code refactor.
5822
5823 2015-07-24 Yao Qi <yao.qi@linaro.org>
5824
5825 * server.c (process_serial_event): Set general_thread.
5826
5827 2015-07-21 Yao Qi <yao.qi@linaro.org>
5828
5829 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5830 aarch64_linux_get_debug_reg_capacity.
5831
5832 2015-07-17 Yao Qi <yao.qi@linaro.org>
5833
5834 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5835 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5836 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5837 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5838 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5839 (AARCH64_HWP_ALIGNMENT): Likewise.
5840 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5841 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5842 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5843 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5844 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5845 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5846 (struct aarch64_debug_reg_state): Likewise.
5847 (struct arch_lwp_info): Likewise.
5848 (aarch64_align_watchpoint): Likewise.
5849 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5850 (aarch64_watchpoint_length): Likewise.
5851 (aarch64_point_encode_ctrl_reg): Likewise
5852 (aarch64_point_is_aligned): Likewise.
5853 (aarch64_align_watchpoint): Likewise.
5854 (aarch64_linux_set_debug_regs):
5855 (aarch64_dr_state_insert_one_point): Likewise.
5856 (aarch64_dr_state_remove_one_point): Likewise.
5857 (aarch64_handle_breakpoint): Likewise.
5858 (aarch64_handle_aligned_watchpoint): Likewise.
5859 (aarch64_handle_unaligned_watchpoint): Likewise.
5860 (aarch64_handle_watchpoint): Likewise.
5861
5862 2015-07-17 Yao Qi <yao.qi@linaro.org>
5863
5864 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5865 and don't aarch64_get_debug_reg_state. All callers update.
5866 (aarch64_handle_aligned_watchpoint): Likewise.
5867 (aarch64_handle_unaligned_watchpoint): Likewise.
5868 (aarch64_handle_watchpoint): Likewise.
5869 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5870 (aarch64_remove_point): Likewise.
5871
5872 2015-07-17 Yao Qi <yao.qi@linaro.org>
5873
5874 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5875 debug_printf.
5876 (aarch64_handle_unaligned_watchpoint): Likewise.
5877
5878 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5879
5880 Revert the previous 3 commits:
5881 Move gdb_regex* to common/
5882 Move linux_find_memory_regions_full & co.
5883 gdbserver build-id attribute generator
5884
5885 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5886 Jan Kratochvil <jan.kratochvil@redhat.com>
5887
5888 gdbserver build-id attribute generator.
5889 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5890 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5891 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5892 (find_phdr): New.
5893 (get_dynamic): Use find_pdhr to traverse program headers.
5894 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5895 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5896 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5897 (get_hex_build_id): New.
5898 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5899 to reply XML document.
5900
5901 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5902 Jan Kratochvil <jan.kratochvil@redhat.com>
5903
5904 * target.c: Include target/target-utils.h and fcntl.h.
5905 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5906 (target_fileio_read_stralloc): New functions.
5907
5908 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5909
5910 * Makefile.in (OBS): Add gdb_regex.o.
5911 (gdb_regex.o): New.
5912 * config.in: Rebuilt.
5913 * configure: Rebuilt.
5914
5915 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5916 Jan Kratochvil <jan.kratochvil@redhat.com>
5917
5918 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5919 * Makefile.in (OBS): Add target-utils.o.
5920 (linux-maps.o, target-utils.o): New.
5921 * configure.srv (srv_linux_obj): Add linux-maps.o.
5922
5923 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5924
5925 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5926 function, return 1.
5927 (the_low_target): Install it.
5928
5929 2015-07-14 Pedro Alves <palves@redhat.com>
5930
5931 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5932 Instead, ignore ECHILD, and throw an error for other errnos.
5933
5934 2015-07-10 Pedro Alves <palves@redhat.com>
5935
5936 * event-loop.c (struct callback_event) <data>: Change type to
5937 gdb_client_data instance instead of gdb_client_data pointer.
5938 (append_callback_event): Adjust.
5939
5940 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5941
5942 * linux-aarch64-low.c: Add comments for each linux_target_ops
5943 method. Remove comments already covered in target_ops and
5944 linux_target_ops definitions.
5945 (the_low_target): Add comments for each unimplemented method.
5946
5947 2015-07-09 Yao Qi <yao.qi@linaro.org>
5948
5949 * linux-aarch64-low.c (aarch64_regmap): Remove.
5950 (aarch64_usrregs_info): Remove.
5951 (regs_info): Set field usrregs to NULL.
5952
5953 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5954
5955 * linux-low.c: Include "rsp-low.h"
5956 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5957 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5958 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5959 (handle_btrace_enable_pt): New.
5960 (handle_btrace_general_set): Support "pt".
5961 (handle_btrace_conf_general_set): Support "pt:size".
5962
5963 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5964
5965 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5966 Z_PACKET_SW_BP.
5967
5968 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5969
5970 * linux-aarch64-low.c: Remove comment about endianness.
5971 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5972 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5973 memcmp.
5974
5975 2015-06-24 Gary Benson <gbenson@redhat.com>
5976
5977 * linux-i386-ipa.c (stdint.h): Do not include.
5978 * lynx-i386-low.c (stdint.h): Likewise.
5979 * lynx-ppc-low.c (stdint.h): Likewise.
5980 * mem-break.c (stdint.h): Likewise.
5981 * thread-db.c (stdint.h): Likewise.
5982 * tracepoint.c (stdint.h): Likewise.
5983 * win32-low.c (stdint.h): Likewise.
5984
5985 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5986
5987 * server.c (write_qxfer_response): Update call to
5988 remote_escape_output.
5989
5990 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5991 Jan Kratochvil <jan.kratochvil@redhat.com>
5992
5993 Merge multiple hex conversions.
5994 * gdbreplay.c (tohex): Rename to 'fromhex'.
5995 (logchar): Use fromhex.
5996
5997 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5998
5999 * server.c (handle_qxfer_libraries): Set `version' attribute for
6000 <library-list>.
6001
6002 2015-06-10 Gary Benson <gbenson@redhat.com>
6003
6004 * target.h (struct target_ops) <multifs_open>: New field.
6005 <multifs_unlink>: Likewise.
6006 <multifs_readlink>: Likewise.
6007 * linux-low.c (nat/linux-namespaces.h): New include.
6008 (linux_target_ops): Initialize the_target->multifs_open,
6009 the_target->multifs_unlink and the_target->multifs_readlink.
6010 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
6011 * hostio.c (hostio_fs_pid): New static variable.
6012 (hostio_handle_new_gdb_connection): New function.
6013 (handle_setfs): Likewise.
6014 (handle_open): Use the_target->multifs_open as appropriate.
6015 (handle_unlink): Use the_target->multifs_unlink as appropriate.
6016 (handle_readlink): Use the_target->multifs_readlink as
6017 appropriate.
6018 (handle_vFile): Handle vFile:setfs packets.
6019 * server.c (handle_query): Call hostio_handle_new_gdb_connection
6020 after target_handle_new_gdb_connection.
6021
6022 2015-06-10 Gary Benson <gbenson@redhat.com>
6023
6024 * configure.ac (AC_CHECK_FUNCS): Add setns.
6025 * config.in: Regenerate.
6026 * configure: Likewise.
6027 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
6028 (linux-namespaces.o): New rule.
6029 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
6030
6031 2015-06-09 Gary Benson <gbenson@redhat.com>
6032
6033 * hostio.c (handle_open): Process mode argument with
6034 fileio_to_host_mode.
6035
6036 2015-06-01 Yao Qi <yao.qi@linaro.org>
6037
6038 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
6039 * linux-x86-low.c: Likewise.
6040
6041 2015-05-28 Don Breazeal <donb@codesourcery.com>
6042
6043 * linux-low.c (handle_extended_wait): Initialize
6044 thread_info.last_resume_kind for new fork children.
6045
6046 2015-05-15 Pedro Alves <palves@redhat.com>
6047
6048 * target.h (target_handle_new_gdb_connection): Rewrite using if
6049 wrapped in do/while.
6050
6051 2015-05-14 Joel Brobecker <brobecker@adacore.com>
6052
6053 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
6054 * configure, config.in: Regenerate.
6055 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
6056 Declare typedef.
6057
6058 2015-05-12 Don Breazeal <donb@codesourcery.com>
6059
6060 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
6061 PTRACE_EVENT_VFORK_DONE.
6062 (linux_low_ptrace_options, extended_event_reported): Add vfork
6063 events.
6064 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
6065 and "vforkdone" for RSP 'T' Stop Reply Packet.
6066 * server.h (report_vfork_events): Declare
6067 global variable.
6068
6069 2015-05-12 Don Breazeal <donb@codesourcery.com>
6070
6071 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
6072 (the_low_target) <new_fork>: Initialize new member.
6073 * linux-arm-low.c (arm_new_fork): New function.
6074 (the_low_target) <new_fork>: Initialize new member.
6075 * linux-low.c (handle_extended_wait): Call new target function
6076 new_fork.
6077 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
6078 * linux-mips-low.c (mips_add_watchpoint): New function
6079 extracted from mips_insert_point.
6080 (the_low_target) <new_fork>: Initialize new member.
6081 (mips_linux_new_fork): New function.
6082 (mips_insert_point): Call mips_add_watchpoint.
6083 * linux-x86-low.c (x86_linux_new_fork): New function.
6084 (the_low_target) <new_fork>: Initialize new member.
6085
6086 2015-05-12 Don Breazeal <donb@codesourcery.com>
6087
6088 * linux-low.c (handle_extended_wait): Implement return value,
6089 rename argument 'event_child' to 'event_lwp', handle
6090 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6091 (linux_low_ptrace_options): New function.
6092 (linux_low_filter_event): Call linux_low_ptrace_options,
6093 use different argument fo linux_enable_event_reporting,
6094 use return value from handle_extended_wait.
6095 (extended_event_reported): New function.
6096 (linux_wait_1): Call extended_event_reported and set
6097 status to report fork events.
6098 (linux_write_memory): Add pid to debug message.
6099 (reset_lwp_ptrace_options_callback): New function.
6100 (linux_handle_new_gdb_connection): New function.
6101 (linux_target_ops): Initialize new structure member.
6102 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6103 * lynx-low.c: Initialize new structure member.
6104 * remote-utils.c (prepare_resume_reply): Implement stop reason
6105 "fork" for "T" stop message.
6106 * server.c (handle_query): Call handle_new_gdb_connection.
6107 * server.h (report_fork_events): Declare global flag.
6108 * target.h (struct target_ops) <handle_new_gdb_connection>:
6109 New member.
6110 (target_handle_new_gdb_connection): New macro.
6111 * win32-low.c: Initialize new structure member.
6112
6113 2015-05-12 Don Breazeal <donb@codesourcery.com>
6114
6115 * mem-break.c (APPEND_TO_LIST): Define macro.
6116 (clone_agent_expr): New function.
6117 (clone_one_breakpoint): New function.
6118 (clone_all_breakpoints): New function.
6119 * mem-break.h: Declare new functions.
6120
6121 2015-05-12 Don Breazeal <donb@codesourcery.com>
6122
6123 * linux-low.c (linux_supports_fork_events): New function.
6124 (linux_supports_vfork_events): New function.
6125 (linux_target_ops): Initialize new structure members.
6126 (initialize_low): Call linux_check_ptrace_features.
6127 * lynx-low.c (lynx_target_ops): Initialize new structure
6128 members.
6129 * server.c (report_fork_events, report_vfork_events):
6130 New global flags.
6131 (handle_query): Add new features to qSupported packet and
6132 response.
6133 (captured_main): Initialize new global variables.
6134 * target.h (struct target_ops) <supports_fork_events>:
6135 New member.
6136 <supports_vfork_events>: New member.
6137 (target_supports_fork_events): New macro.
6138 (target_supports_vfork_events): New macro.
6139 * win32-low.c (win32_target_ops): Initialize new structure
6140 members.
6141
6142 2015-05-12 Gary Benson <gbenson@redhat.com>
6143
6144 * server.c (handle_qxfer_exec_file): Use current process
6145 if annex is empty.
6146
6147 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6148
6149 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6150 Remove HAVE_PTRACE_GETREGS conditionals.
6151 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6152 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6153
6154 2015-05-08 Yao Qi <yao.qi@linaro.org>
6155
6156 * linux-low.c (linux_supports_conditional_breakpoints): New
6157 function.
6158 (linux_target_ops): Install new target method.
6159 * lynx-low.c (lynx_target_ops): Install NULL hook for
6160 supports_conditional_breakpoints.
6161 * nto-low.c (nto_target_ops): Likewise.
6162 * spu-low.c (spu_target_ops): Likewise.
6163 * win32-low.c (win32_target_ops): Likewise.
6164 * server.c (handle_query): Check
6165 target_supports_conditional_breakpoints.
6166 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6167 New field.
6168 (target_supports_conditional_breakpoints): New macro.
6169
6170 2015-05-06 Pedro Alves <palves@redhat.com>
6171
6172 PR server/18081
6173 * server.c (start_inferior): If the process exits, mourn it.
6174
6175 2015-04-21 Gary Benson <gbenson@redhat.com>
6176
6177 * hostio.c (fileio_open_flags_to_host): Factored out to
6178 fileio_to_host_openflags in common/fileio.c. Single use
6179 updated.
6180
6181 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6182
6183 * linux-xtensa-low.c (xtensa_fill_gregset)
6184 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6185 XCHAL_HAVE_LOOP.
6186
6187 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6188
6189 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6190 (regs_info): Replace usrregs pointer with NULL.
6191
6192 2015-04-17 Gary Benson <gbenson@redhat.com>
6193
6194 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6195 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6196 * server.c (handle_qxfer_exec_file): New function.
6197 (qxfer_packets): Add exec-file entry.
6198 (handle_query): Report qXfer:exec-file:read as supported packet.
6199
6200 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6201
6202 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6203
6204 2015-04-09 Gary Benson <gbenson@redhat.com>
6205
6206 * hostio-errno.c (errno_to_fileio_error): Remove function.
6207 Update caller to use remote_fileio_to_fio_error.
6208
6209 2015-04-09 Yao Qi <yao.qi@linaro.org>
6210
6211 * linux-low.c (linux_insert_point): Call
6212 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6213 (linux_remove_point): Call remove_memory_breakpoint if type is
6214 raw_bkpt_type_sw.
6215 * linux-x86-low.c (x86_insert_point): Don't call
6216 insert_memory_breakpoint.
6217 (x86_remove_point): Don't call remove_memory_breakpoint.
6218
6219 2015-04-01 Pedro Alves <palves@redhat.com>
6220 Cleber Rosa <crosa@redhat.com>
6221
6222 * server.c (gdbserver_usage): Reorganize and extend the usage
6223 message.
6224
6225 2015-03-24 Pedro Alves <palves@redhat.com>
6226
6227 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6228 output. Also dump TRAP_TRACE.
6229 (linux_low_filter_event): In debug output, distinguish a
6230 resume_stop SIGSTOP from a delayed SIGSTOP.
6231
6232 2015-03-24 Gary Benson <gbenson@redhat.com>
6233
6234 * linux-x86-low.c (x86_linux_new_thread): Moved to
6235 nat/x86-linux.c.
6236 (x86_linux_prepare_to_resume): Likewise.
6237
6238 2015-03-24 Gary Benson <gbenson@redhat.com>
6239
6240 * Makefile.in (x86-linux-dregs.o): New rule.
6241 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6242 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6243 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6244 (x86_linux_dr_get): Likewise.
6245 (x86_linux_dr_set): Likewise.
6246 (update_debug_registers_callback): Likewise.
6247 (x86_linux_dr_set_addr): Likewise.
6248 (x86_linux_dr_get_addr): Likewise.
6249 (x86_linux_dr_set_control): Likewise.
6250 (x86_linux_dr_get_control): Likewise.
6251 (x86_linux_dr_get_status): Likewise.
6252 (x86_linux_update_debug_registers): Likewise.
6253
6254 2015-03-24 Gary Benson <gbenson@redhat.com>
6255
6256 * linux-x86-low.c (x86_linux_update_debug_registers):
6257 New function, factored out from...
6258 (x86_linux_prepare_to_resume): ...this.
6259
6260 2015-03-24 Gary Benson <gbenson@redhat.com>
6261
6262 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6263 (x86_linux_dr_set): Likewise.
6264 (update_debug_registers_callback): Likewise.
6265 (x86_linux_dr_set_addr): Likewise.
6266 (x86_linux_dr_get_addr): Likewise.
6267 (x86_linux_dr_set_control): Likewise.
6268 (x86_linux_dr_get_control): Likewise.
6269 (x86_linux_dr_get_status): Likewise.
6270 (x86_linux_prepare_to_resume): Likewise.
6271
6272 2015-03-24 Gary Benson <gbenson@redhat.com>
6273
6274 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6275 Use perror_with_name. Pass string through gettext.
6276 (x86_linux_dr_set): Likewise.
6277
6278 2015-03-24 Gary Benson <gbenson@redhat.com>
6279
6280 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6281 (x86_linux_dr_set_addr): ...this.
6282 (x86_dr_low_get_addr): Rename to...
6283 (x86_linux_dr_get_addr): ...this.
6284 (x86_dr_low_set_control): Rename to...
6285 (x86_linux_dr_set_control): ...this.
6286 (x86_dr_low_get_control): Rename to...
6287 (x86_linux_dr_get_control): ...this.
6288 (x86_dr_low_get_status): Rename to...
6289 (x86_linux_dr_get_status): ...this.
6290 (x86_dr_low): Update with new function names.
6291
6292 2015-03-24 Gary Benson <gbenson@redhat.com>
6293
6294 * Makefile.in (x86-linux.o): New rule.
6295 * configure.srv: Add x86-linux.o to relevant targets.
6296 * linux-low.c (lwp_set_arch_private_info): New function.
6297 (lwp_arch_private_info): Likewise.
6298 * linux-x86-low.c: Include nat/x86-linux.h.
6299 (arch_lwp_info): Removed structure.
6300 (update_debug_registers_callback):
6301 Use lwp_set_debug_registers_changed.
6302 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6303 and lwp_set_debug_registers_changed.
6304 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6305
6306 2015-03-24 Gary Benson <gbenson@redhat.com>
6307
6308 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6309 * linux-arm-low.c (arm_new_thread): Likewise.
6310 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6311 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6312 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6313 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6314
6315 2015-03-24 Gary Benson <gbenson@redhat.com>
6316
6317 * linux-low.c (ptid_of_lwp): New function.
6318 (lwp_is_stopped): Likewise.
6319 (lwp_stop_reason): Likewise.
6320 * linux-x86-low.c (update_debug_registers_callback):
6321 Use lwp_is_stopped.
6322 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6323 lwp_stop_reason.
6324
6325 2015-03-24 Gary Benson <gbenson@redhat.com>
6326
6327 * linux-low.h (linux_stop_lwp): Remove declaration.
6328
6329 2015-03-24 Gary Benson <gbenson@redhat.com>
6330
6331 * linux-low.h: Include nat/linux-nat.h.
6332 * linux-low.c (iterate_over_lwps_args): New structure.
6333 (iterate_over_lwps_filter): New function.
6334 (iterate_over_lwps): Likewise.
6335 * linux-x86-low.c (update_debug_registers_callback):
6336 Update signature to what iterate_over_lwps expects.
6337 Remove PID check that iterate_over_lwps now performs.
6338 (x86_dr_low_set_addr): Use iterate_over_lwps.
6339 (x86_dr_low_set_control): Likewise.
6340
6341 2015-03-24 Gary Benson <gbenson@redhat.com>
6342
6343 * linux-x86-low.c (x86_debug_reg_state): New function.
6344 (x86_linux_prepare_to_resume): Use the above.
6345
6346 2015-03-24 Gary Benson <gbenson@redhat.com>
6347
6348 * linux-low.c (current_lwp_ptid): New function.
6349 * linux-x86-low.c: Include nat/linux-nat.h.
6350 (x86_dr_low_get_addr): Use current_lwp_ptid.
6351 (x86_dr_low_get_control): Likewise.
6352 (x86_dr_low_get_status): Likewise.
6353
6354 2015-03-20 Pedro Alves <palves@redhat.com>
6355
6356 * tracepoint.c (cmd_qtstatus): Make "str" const.
6357
6358 2015-03-20 Pedro Alves <palves@redhat.com>
6359
6360 * server.c (handle_general_set): Make "req_str" const.
6361
6362 2015-03-19 Pedro Alves <palves@redhat.com>
6363
6364 * linux-low.c (linux_resume_one_lwp): Rename to ...
6365 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6366 instead call perror_with_name.
6367 (check_ptrace_stopped_lwp_gone): New function.
6368 (linux_resume_one_lwp): Reimplement as wrapper around
6369 linux_resume_one_lwp_throw that swallows errors if the LWP is
6370 gone.
6371
6372 2015-03-19 Pedro Alves <palves@redhat.com>
6373
6374 * linux-low.c (count_events_callback, select_event_lwp_callback):
6375 No longer check whether the thread has resume_stop as last resume
6376 kind.
6377
6378 2015-03-19 Pedro Alves <palves@redhat.com>
6379
6380 * linux-low.c (count_events_callback, select_event_lwp_callback):
6381 Use the lwp's status_pending_p field, not the thread's.
6382
6383 2015-03-19 Pedro Alves <palves@redhat.com>
6384
6385 * linux-low.c (select_event_lwp_callback): Update comments to
6386 no longer mention SIGTRAP.
6387
6388 2015-03-18 Gary Benson <gbenson@redhat.com>
6389
6390 * server.c (handle_query): Do not report vFile:fstat as supported.
6391
6392 2015-03-11 Gary Benson <gbenson@redhat.com>
6393
6394 * hostio.c (sys/types.h): New include.
6395 (sys/stat.h): Likewise.
6396 (common-remote-fileio.h): Likewise.
6397 (handle_fstat): New function.
6398 (handle_vFile): Handle vFile:fstat packets.
6399
6400 2015-03-11 Gary Benson <gbenson@redhat.com>
6401
6402 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6403 struct stat.st_blocks and struct stat.st_blksize.
6404 * configure: Regenerate.
6405 * config.in: Likewise.
6406 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6407 (OBS): Add common-remote-fileio.o.
6408 (common-remote-fileio.o): New rule.
6409
6410 2015-03-09 Pedro Alves <palves@redhat.com>
6411
6412 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6413 'struct sockaddr' pointer in 'accept' call.
6414
6415 2015-03-09 Pedro Alves <palves@redhat.com>
6416
6417 Revert:
6418 2015-03-07 Pedro Alves <palves@redhat.com>
6419 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6420 or <winsock2.h> here. Instead include "gdb_socket.h".
6421 (remote_open): Use union gdb_sockaddr_u.
6422 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6423 or <winsock2.h> here. Instead include "gdb_socket.h".
6424 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6425 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6426 or <sys/un.h>.
6427 (init_named_socket, gdb_agent_helper_thread): Use union
6428 gdb_sockaddr_u.
6429
6430 2015-03-07 Pedro Alves <palves@redhat.com>
6431
6432 * configure.ac (build_warnings): Move
6433 -Wdeclaration-after-statement to the C-specific set.
6434 * configure: Regenerate.
6435
6436 2015-03-07 Pedro Alves <palves@redhat.com>
6437
6438 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6439 or <winsock2.h> here. Instead include "gdb_socket.h".
6440 (remote_open): Use union gdb_sockaddr_u.
6441 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6442 or <winsock2.h> here. Instead include "gdb_socket.h".
6443 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6444 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6445 or <sys/un.h>.
6446 (init_named_socket, gdb_agent_helper_thread): Use union
6447 gdb_sockaddr_u.
6448
6449 2015-03-07 Pedro Alves <palves@redhat.com>
6450
6451 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6452 instead.
6453
6454 2015-03-06 Yao Qi <yao.qi@linaro.org>
6455
6456 * linux-aarch64-low.c (aarch64_insert_point): Use
6457 show_debug_regs as a boolean.
6458 (aarch64_remove_point): Likewise.
6459
6460 2015-03-05 Pedro Alves <palves@redhat.com>
6461
6462 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6463 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6464 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6465 * nto-low.c (nto_target_ops): Likewise.
6466 * spu-low.c (spu_target_ops): Likewise.
6467 * win32-low.c (win32_target_ops): Likewise.
6468
6469 2015-03-04 Pedro Alves <palves@redhat.com>
6470
6471 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6472 Decide whether a breakpoint triggered based on the SIGTRAP's
6473 siginfo.si_code.
6474 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6475 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6476 (linux_low_filter_event): Check for breakpoints before checking
6477 watchpoints.
6478 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6479 siginfo.si_code.
6480 (linux_stopped_by_sw_breakpoint)
6481 (linux_supports_stopped_by_sw_breakpoint)
6482 (linux_stopped_by_hw_breakpoint)
6483 (linux_supports_stopped_by_hw_breakpoint): New functions.
6484 (linux_target_ops): Install new target methods.
6485
6486 2015-03-04 Pedro Alves <palves@redhat.com>
6487
6488 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6489 * server.c (swbreak_feature, hwbreak_feature): New globals.
6490 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6491 (captured_main): Clear swbreak_feature and hwbreak_feature.
6492 * server.h (swbreak_feature, hwbreak_feature): Declare.
6493 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6494 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6495 supports_stopped_by_hw_breakpoint>: New fields.
6496 (target_supports_stopped_by_sw_breakpoint)
6497 (target_stopped_by_sw_breakpoint)
6498 (target_supports_stopped_by_hw_breakpoint)
6499 (target_stopped_by_hw_breakpoint): Declare.
6500
6501 2015-03-04 Pedro Alves <palves@redhat.com>
6502
6503 enum lwp_stop_reason -> enum target_stop_reason
6504 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6505 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6506 (linux_wait_1, stuck_in_jump_pad_callback)
6507 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6508 (linux_stopped_by_watchpoint):
6509 * linux-low.h (enum lwp_stop_reason): Delete.
6510 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6511 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6512
6513 2015-03-04 Yao Qi <yao.qi@linaro.org>
6514
6515 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6516
6517 2015-03-03 Gary Benson <gbenson@redhat.com>
6518
6519 * hostio.c (handle_vFile): Fix prefix lengths.
6520
6521 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6522
6523 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6524 ptr_bits.
6525
6526 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6527
6528 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6529 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6530 (clean): Add "rm -f" for above C files.
6531 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6532 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6533 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6534 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6535 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6536 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6537 (init_registers_s390x_vx_linux64)
6538 (init_registers_s390x_tevx_linux64)
6539 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6540 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6541 declarations.
6542 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6543 (s390_store_vxrs_high): New functions.
6544 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6545 NT_S390_VXRS_HIGH.
6546 (s390_arch_setup): Add logic for selecting one of the new target
6547 descriptions. Activate the new vector regsets if applicable.
6548 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6549 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6550 and init_registers_s390x_tevx_linux64.
6551
6552 2015-03-01 Pedro Alves <palves@redhat.com>
6553
6554 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6555 parameter.
6556
6557 2015-02-27 Pedro Alves <palves@redhat.com>
6558
6559 * linux-x86-low.c (u_debugreg_offset): New function.
6560 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6561
6562 2015-02-27 Pedro Alves <palves@redhat.com>
6563
6564 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6565 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6566 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6567 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6568 (ps_lsetfpregs, ps_getpid)
6569 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6570 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6571 (ps_lsetxregs, ps_plog): Declare.
6572
6573 2015-02-27 Pedro Alves <palves@redhat.com>
6574
6575 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6576 IP_AGENT_EXPORT_FUNC.
6577 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6578 IP_AGENT_EXPORT_FUNC.
6579 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6580 (IP_AGENT_EXPORT): Delete.
6581 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6582 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6583 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6584 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6585 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6586 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6587 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6588 (traceframe_read_count, traceframe_write_count)
6589 (traceframes_created, trace_state_variables, get_raw_reg)
6590 (get_trace_state_variable_value, set_trace_state_variable_value)
6591 (ust_loaded, helper_thread_id, cmd_buf): Use
6592 IPA_SYM_EXPORTED_NAME.
6593 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6594 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6595 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6596 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6597 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6598 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6599 EXTERN_C_PUSH/EXTERN_C_POP.
6600 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6601 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6602 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6603 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6604 (traceframe_write_count, traceframe_read_count)
6605 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6606 (about_to_request_buffer_space, get_trace_state_variable_value)
6607 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6608 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6609 EXTERN_C_PUSH/EXTERN_C_POP.
6610 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6611 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6612 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6613 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6614 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6615 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6616 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6617 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6618 Define.
6619 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6620 (IP_AGENT_EXPORT_VAR_DECL): Define.
6621 (tracing): Declare.
6622 (gdb_agent_get_raw_reg): Declare.
6623
6624 2015-02-27 Tom Tromey <tromey@redhat.com>
6625 Pedro Alves <palves@redhat.com>
6626
6627 Rename symbols whose names are reserved C++ keywords throughout.
6628
6629 2015-02-27 Pedro Alves <palves@redhat.com>
6630
6631 * Makefile.in (COMPILER): New, get it from autoconf.
6632 (CXX): Get from autoconf instead.
6633 (COMPILE.pre): Use COMPILER.
6634 (CC-LD): Rename to ...
6635 (CC_LD): ... this. Use COMPILER.
6636 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6637 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6638 * acinclude.m4: Include build-with-cxx.m4.
6639 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6640 Disable -Werror by default if building in C++ mode.
6641 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6642 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6643 the C++ compiler. Save/restore CXXFLAGS too.
6644 * configure: Regenerate.
6645
6646 2015-02-27 Pedro Alves <palves@redhat.com>
6647
6648 * acinclude.m4: Include libiberty.m4.
6649 * configure.ac: Call libiberty_INIT.
6650 * config.in, configure: Regenerate.
6651
6652 2015-02-26 Pedro Alves <palves@redhat.com>
6653
6654 * linux-low.c (linux_wait_1): When incrementing the PC past a
6655 program breakpoint always use the_low_target.breakpoint_len as
6656 increment, rather than the maximum between that and
6657 the_low_target.decr_pc_after_break.
6658
6659 2015-02-23 Pedro Alves <palves@redhat.com>
6660
6661 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6662 thread was doing a step-over; always adjust the PC if
6663 we stepped over a permanent breakpoint.
6664 (linux_wait_1): If we stepped over breakpoint that was on top of a
6665 permanent breakpoint, manually advance the PC past it.
6666
6667 2015-02-23 Pedro Alves <palves@redhat.com>
6668
6669 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6670 modes.
6671 (x86_fill_gregset, x86_store_gregset): Use it when handling
6672 $orig_eax.
6673
6674 2015-02-20 Pedro Alves <palves@redhat.com>
6675
6676 * thread-db.c: Include "nat/linux-procfs.h".
6677 (thread_db_init): Skip listing new threads if the kernel supports
6678 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6679
6680 2015-02-20 Pedro Alves <palves@redhat.com>
6681
6682 * linux-low.c (status_pending_p_callback): Use ptid_match.
6683
6684 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6685
6686 PR breakpoints/16812
6687 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6688 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6689 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6690
6691 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6692
6693 PR breakpoints/15956
6694 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6695
6696 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6697
6698 * linux-low.c (linux_low_btrace_conf): Print size.
6699 * server.c (handle_btrace_conf_general_set): New.
6700 (hanle_general_set): Call handle_btrace_conf_general_set.
6701 (handle_query): Report Qbtrace-conf:bts:size as supported.
6702
6703 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6704
6705 * linux-low.c (linux_low_enable_btrace): Update parameters.
6706 (linux_low_btrace_conf): New.
6707 (linux_target_ops)<to_btrace_conf>: Initialize.
6708 * server.c (current_btrace_conf): New.
6709 (handle_btrace_enable): Rename to ...
6710 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6711 to target_enable_btrace. Update comment. Update users.
6712 (handle_qxfer_btrace_conf): New.
6713 (qxfer_packets): Add btrace-conf entry.
6714 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6715 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6716 (target_ops)<read_btrace_conf>: New.
6717 (target_enable_btrace): Update parameters.
6718 (target_read_btrace_conf): New.
6719
6720 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6721
6722 * server.c (handle_btrace_general_set): Remove call to
6723 target_supports_btrace.
6724 (supported_btrace_packets): New.
6725 (handle_query): Call supported_btrace_packets.
6726 * target.h: include btrace-common.h.
6727 (btrace_target_info): Removed.
6728 (supports_btrace, target_supports_btrace): Update parameters.
6729
6730 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6731
6732 * Makefile.in (SFILES): Add common/btrace-common.c.
6733 (OBS): Add common/btrace-common.o.
6734 (btrace-common.o): Add build rules.
6735 * linux-low: Include btrace-common.h.
6736 (linux_low_read_btrace): Use struct btrace_data. Call
6737 btrace_data_init and btrace_data_fini.
6738
6739 2015-02-06 Pedro Alves <palves@redhat.com>
6740
6741 * thread-db.c (find_new_threads_callback): Add debug output.
6742
6743 2015-02-04 Pedro Alves <palves@redhat.com>
6744
6745 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6746 (resume_stopped_resumed_lwps): New function.
6747 (linux_wait_for_event_filtered): Use it.
6748
6749 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6750
6751 * Makefile.in (SFILES): Add linux-personality.c.
6752 (linux-personality.o): New rule.
6753 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6754 list of objects to be built.
6755 * linux-low.c: Include nat/linux-personality.h.
6756 (linux_create_inferior): Remove code to disable address space
6757 randomization (moved to ../nat/linux-personality.c). Create
6758 cleanup to disable address space randomization.
6759
6760 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6761
6762 * Makefile.in (posix-strerror.o): New rule.
6763 (mingw-strerror.o): Likewise.
6764 * configure: Regenerated.
6765 * configure.ac: Source file ../common/common.host. Initialize new
6766 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6767
6768 2015-01-14 Yao Qi <yao@codesourcery.com>
6769
6770 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6771 (ppc-linux.o): New rule.
6772 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6773 * configure.ac: AC_CHECK_FUNCS(getauxval).
6774 * config.in: Re-generated.
6775 * configure: Re-generated.
6776 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6777 ppc64_64bit_inferior_p
6778
6779 2015-01-14 Yao Qi <yao@codesourcery.com>
6780
6781 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6782 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6783 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6784 (PT_ORIG_R3, PT_TRAP): Likewise.
6785 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6786 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6787 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6788
6789 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6790
6791 * i387-fp.c (i387_cache_to_xsave): In look over
6792 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6793 zmmh_low_space field by use of zmmh_high_space.
6794
6795 2015-01-09 Pedro Alves <palves@redhat.com>
6796
6797 * linux-low.c (step_over_bkpt): Move higher up in the file.
6798 (handle_extended_wait): Don't store the stop_pc here.
6799 (get_stop_pc): Adjust comments and rename to ...
6800 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6801 stopped for a software breakpoint or hardware breakpoint.
6802 (thread_still_has_status_pending_p): New function.
6803 (status_pending_p_callback): Use
6804 thread_still_has_status_pending_p. If the event is no longer
6805 interesting, resume the LWP.
6806 (handle_tracepoints): Add assert.
6807 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6808 (wstatus_maybe_breakpoint): New function.
6809 (cancel_breakpoint): Delete function.
6810 (check_stopped_by_watchpoint): New function, factored out from
6811 linux_low_filter_event.
6812 (lp_status_maybe_breakpoint): Delete function.
6813 (linux_low_filter_event): Remove filter_ptid argument.
6814 Leave thread group exits pending here. Store the LWP's stop PC.
6815 Always leave events pending.
6816 (linux_wait_for_event_filtered): Pull all events out of the
6817 kernel, and leave them all pending.
6818 (count_events_callback, select_event_lwp_callback): Consider all
6819 events.
6820 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6821 (select_event_lwp): Only give preference to the stepping LWP in
6822 all-stop mode. Adjust comments.
6823 (ignore_event): New function.
6824 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6825 references to cancel_breakpoints. Adjust to renames. Also give
6826 equal priority to all LWPs that have had events in non-stop mode.
6827 If reporting a software breakpoint event, unadjust the LWP's PC.
6828 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6829 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6830 Adjust.
6831 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6832 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6833 (linux_stopped_by_watchpoint): Adjust.
6834 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6835 * linux-low.h (enum lwp_stop_reason): New.
6836 (struct lwp_info) <stop_pc>: Adjust comment.
6837 <stopped_by_watchpoint>: Delete field.
6838 <stop_reason>: New field.
6839 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6840 * mem-break.c (software_breakpoint_inserted_here)
6841 (hardware_breakpoint_inserted_here): New function.
6842 * mem-break.h (software_breakpoint_inserted_here)
6843 (hardware_breakpoint_inserted_here): Declare.
6844 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6845 (cancel_breakpoints): Delete.
6846 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6847 (upload_fast_traceframes): Remove references to
6848 cancel_breakpoints.
6849
6850 2015-01-09 Pedro Alves <palves@redhat.com>
6851
6852 * thread-db.c (find_new_threads_callback): Ignore thread if the
6853 kernel thread ID is -1.
6854
6855 2015-01-09 Pedro Alves <palves@redhat.com>
6856
6857 * linux-low.c (linux_attach_fail_reason_string): Move to
6858 nat/linux-ptrace.c, and rename.
6859 (linux_attach_lwp): Update comment.
6860 (attach_proc_task_lwp_callback): New function.
6861 (linux_attach): Adjust to rename and use
6862 linux_proc_attach_tgid_threads.
6863 (linux_attach_fail_reason_string): Delete declaration.
6864
6865 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6866
6867 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6868 * server.c (gdbserver_version): Likewise.
6869
6870 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6871
6872 * remote-utils.c: Include ctype.h.
6873 (input_interrupt): Explicitly handle the case when the char
6874 received is the NUL byte. Improve the printing of non-ASCII
6875 characters.
6876
6877 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6878
6879 * linux-low.c (linux_low_filter_event): Update call to
6880 linux_enable_event_reporting following the addition of
6881 a new parameter to that function.
6882
6883 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6884
6885 PR server/17457
6886 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6887 (AARCH64_FPCR_REGNO): Likewise.
6888 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6889 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6890 (aarch64_store_fpregset): Likewise.
6891
6892 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6893
6894 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6895 Remove FIXME comment about assumption about N.
6896
6897 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6898
6899 * configure.ac: If large-file support is disabled in GDBserver,
6900 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6901 * configure: Regenerate.
6902
6903 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6904
6905 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6906 warning upon ENODATA from ptrace.
6907 * linux-s390-low.c (s390_store_tdb): New.
6908 (s390_regsets): Add regset for NT_S390_TDB.
6909
6910 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6911
6912 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6913 without a fill_function.
6914 * linux-s390-low.c (s390_fill_last_break): Remove.
6915 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6916 (s390_arch_setup): Use regset's size instead of fill_function for
6917 loop end condition.
6918
6919 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6920
6921 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6922 the regset's store function when ptrace returned an error.
6923 * regcache.c (get_thread_regcache): Invalidate register cache
6924 before fetching inferior's registers.
6925
6926 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6927
6928 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6929 while-loop as for-loop.
6930 (regsets_store_inferior_registers): Likewise.
6931
6932 2014-11-28 Yao Qi <yao@codesourcery.com>
6933
6934 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6935 * config.in, configure: Re-generate.
6936 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6937 is defined.
6938
6939 2014-11-21 Yao Qi <yao@codesourcery.com>
6940
6941 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6942 (AC_CHECK_HEADERS): Remove malloc.h.
6943 * configure: Re-generated.
6944 * config.in: Re-generated.
6945 * server.h: Don't include alloca.h and malloc.h.
6946 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6947 Don't include malloc.h.
6948
6949 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6950
6951 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6952 corresponding ERRNO check in same block.
6953
6954 2014-11-12 Pedro Alves <palves@redhat.com>
6955
6956 * server.c (cont_thread): Update comment.
6957 (start_inferior, attach_inferior): No longer clear cont_thread.
6958 (handle_v_cont): No longer set cont_thread.
6959 (captured_main): Clear cont_thread each time a GDB connects.
6960
6961 2014-11-12 Pedro Alves <palves@redhat.com>
6962
6963 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6964 thread, and don't resume all threads if the Hc thread has exited.
6965
6966 2014-11-12 Pedro Alves <palves@redhat.com>
6967
6968 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6969 the process group instead of to a specific LWP.
6970
6971 2014-10-15 Pedro Alves <palves@redhat.com>
6972
6973 PR server/17487
6974 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6975 parameter.
6976 (arm_set_thread_context): Delete.
6977 (the_low_target): Adjust.
6978 * win32-i386-low.c (debug_registers_changed)
6979 (debug_registers_used): Delete.
6980 (update_debug_registers_callback): New function.
6981 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6982 needing to update their debug registers.
6983 (win32_get_current_dr): New function.
6984 (x86_dr_low_get_addr, x86_dr_low_get_control)
6985 (x86_dr_low_get_status): Fetch the debug register from the thread
6986 record's context.
6987 (i386_initial_stuff): Adjust.
6988 (i386_get_thread_context): Remove current_event parameter. Don't
6989 clear debug_registers_changed nor copy DR values to
6990 debug_reg_state.
6991 (i386_set_thread_context): Delete.
6992 (i386_prepare_to_resume): New function.
6993 (i386_thread_added): Mark the thread as needing to update irs
6994 debug registers.
6995 (the_low_target): Remove i386_set_thread_context and install
6996 i386_prepare_to_resume.
6997 * win32-low.c (win32_get_thread_context): Adjust.
6998 (win32_set_thread_context): Use SetThreadContext
6999 directly.
7000 (win32_prepare_to_resume): New function.
7001 (win32_require_context): New function, factored out from ...
7002 (thread_rec): ... this.
7003 (continue_one_thread): Call win32_prepare_to_resume on each thread
7004 we're about to continue.
7005 (win32_resume): Call win32_prepare_to_resume on the event thread.
7006 * win32-low.h (struct win32_thread_info)
7007 <debug_registers_changed>: New field.
7008 (struct win32_target_ops): Change prototype of set_thread_context,
7009 delete set_thread_context and add prepare_to_resume.
7010 (win32_require_context): New declaration.
7011
7012 2014-10-08 Gary Benson <gbenson@redhat.com>
7013
7014 * server.h: Do not include common-exceptions.h.
7015
7016 2014-10-08 Gary Benson <gbenson@redhat.com>
7017
7018 * server.h: Do not include cleanups.h.
7019
7020 2014-09-30 James Hogan <james.hogan@imgtec.com>
7021
7022 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
7023 mips64-dsp-linux.c.
7024
7025 2014-09-23 Yao Qi <yao@codesourcery.com>
7026
7027 * linux-low.c (lp_status_maybe_breakpoint): New function.
7028 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
7029 (count_events_callback): Likewise.
7030 (select_event_lwp_callback): Likewise.
7031 (cancel_breakpoints_callback): Likewise.
7032
7033 2014-09-19 Don Breazeal <donb@codesourcery.com>
7034
7035 * linux-low.c (handle_extended_wait): Call
7036 linux_ptrace_get_extended_event.
7037 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
7038 linux_is_extended_waitstatus.
7039
7040 2014-09-16 Joel Brobecker <brobecker@adacore.com>
7041
7042 * Makefile.in (CPPFLAGS): Define.
7043 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
7044 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
7045
7046 2014-09-16 Gary Benson <gbenson@redhat.com>
7047
7048 * inferiors.h (current_inferior): Renamed as...
7049 (current_thread): New variable. All uses updated.
7050 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
7051 (maybe_move_out_of_jump_pad): Likewise.
7052 (cancel_breakpoint): Likewise.
7053 (linux_low_filter_event): Likewise.
7054 (wait_for_sigstop): Likewise.
7055 (linux_resume_one_lwp): Likewise.
7056 (need_step_over_p): Likewise.
7057 (start_step_over): Likewise.
7058 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
7059 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
7060 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
7061 and save_inferior as saved_thread.
7062 * regcache.c (get_thread_regcache): Renamed saved_inferior as
7063 saved_thread.
7064 (regcache_invalidate_thread): Likewise.
7065 * remote-utils.c (prepare_resume_reply): Likewise.
7066 * thread-db.c (thread_db_get_tls_address): Likewise.
7067 (disable_thread_event_reporting): Likewise.
7068 (remove_thread_event_breakpoints): Likewise.
7069 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
7070 as saved_thread.
7071 * target.h (set_desired_inferior): Renamed as...
7072 (set_desired_thread): New declaration. All uses updated.
7073 * server.c (myresume): Updated comment to reference thread instead
7074 of inferior.
7075 (handle_serial_event): Likewise.
7076 (handle_target_event): Likewise.
7077
7078 2014-09-12 Tom Tromey <tromey@redhat.com>
7079 Gary Benson <gbenson@redhat.com>
7080
7081 * regcache.h: Include common-regcache.h.
7082 (regcache_read_pc): Don't declare.
7083 * regcache.c (get_thread_regcache_for_ptid): New function.
7084
7085 2014-09-11 Tom Tromey <tromey@redhat.com>
7086 Gary Benson <gbenson@redhat.com>
7087
7088 * symbol.c: New file.
7089 * Makefile.in (SFILES): Add symbol.c.
7090 (OBS): Add symbol.o.
7091
7092 2014-09-11 Gary Benson <gbenson@redhat.com>
7093
7094 * target.c (target_stop_ptid, target_continue_ptid): New
7095 functions.
7096
7097 2014-09-11 Tom Tromey <tromey@redhat.com>
7098 Gary Benson <gbenson@redhat.com>
7099
7100 * target.h: Include target/target.h.
7101 * target.c (target_read_memory, target_read_uint32)
7102 (target_write_memory): New functions.
7103
7104 2014-09-11 Gary Benson <gbenson@redhat.com>
7105
7106 * server.h (debug_hw_points): Don't declare.
7107 * server.c (debug_hw_points): Don't define. Replace all uses
7108 with show_debug_regs.
7109 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7110 all uses with show_debug_regs.
7111
7112 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7113
7114 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7115 endianness into account.
7116 (ppc_supply_ptrace_register): Likewise.
7117
7118 2014-09-03 James Hogan <james.hogan@imgtec.com>
7119
7120 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7121 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7122
7123 2014-09-03 Gary Benson <gbenson@redhat.com>
7124
7125 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7126 ALL_DEBUG_ADDRESS_REGISTERS.
7127
7128 2014-09-02 Gary Benson <gbenson@redhat.com>
7129
7130 * i386-low.h: Renamed as...
7131 * x86-low.h: New file. All type, function and variable name
7132 prefixes changed from "i386_" to "x86_". All references updated.
7133 * i386-low.c: Renamed as...
7134 * x86-low.c: New file. All type, function and variable name
7135 prefixes changed from "i386_" to "x86_". All references updated.
7136
7137 2014-09-02 Gary Benson <gbenson@redhat.com>
7138
7139 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7140 (x86_linux_new_thread): Likewise.
7141
7142 2014-08-29 Gary Benson <gbenson@redhat.com>
7143
7144 * server.h (setjmp.h): Do not include.
7145 (toplevel): Do not declare.
7146 (common-exceptions.h): Include.
7147 (cleanups.h): Likewise.
7148 * server.c (toplevel): Do not define.
7149 (exit_code): New static global.
7150 (detach_or_kill_for_exit_cleanup): New function.
7151 (main): New function. Original main renamed to...
7152 (captured_main): New function.
7153 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7154
7155 2014-08-29 Gary Benson <gbenson@redhat.com>
7156
7157 * Makefile.in (SFILES): Add common/common-exceptions.c.
7158 (OBS): Add common-exceptions.o.
7159 (common-exceptions.o): New rule.
7160 * utils.c (prepare_to_throw_exception): New function.
7161
7162 2014-08-29 Gary Benson <gbenson@redhat.com>
7163
7164 * config.in: Regenerate.
7165 * configure: Likewise.
7166
7167 2014-08-29 Gary Benson <gbenson@redhat.com>
7168
7169 * Makefile.in (SFILES): Add common/cleanups.c.
7170 (OBS): cleanups.o.
7171 (cleanups.o): New rule.
7172
7173 2014-08-29 Gary Benson <gbenson@redhat.com>
7174
7175 * utils.c (internal_vwarning): New function.
7176
7177 2014-08-28 Gary Benson <gbenson@redhat.com>
7178
7179 * utils.h (fatal): Remove declaration.
7180 * utils.c (fatal): Remove function.
7181
7182 2014-08-28 Gary Benson <gbenson@redhat.com>
7183
7184 * tracepoint.c (gdb_agent_init): Replace fatal with
7185 perror_with_name.
7186 (initialize_tracepoint): Likewise.
7187
7188 2014-08-28 Gary Benson <gbenson@redhat.com>
7189
7190 * remote-utils.c (remote_prepare): Replace fatal with error.
7191
7192 2014-08-28 Gary Benson <gbenson@redhat.com>
7193
7194 * linux-low.c (linux_async): Replace fatal with warning.
7195 Tidy up and return.
7196 (linux_start_non_stop): Return -1 if linux_async failed.
7197
7198 2014-08-28 Gary Benson <gbenson@redhat.com>
7199
7200 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7201 gdb_assert.
7202 (i386_dr_low_get_addr): Remove vague comment.
7203 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7204 gdb_assert.
7205
7206 2014-08-28 Gary Benson <gbenson@redhat.com>
7207
7208 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7209 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7210 internal_error.
7211 (linux_resume_one_lwp): Likewise.
7212 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7213 gdb_assert.
7214 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7215 with internal_error.
7216 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7217 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7218 (find_register_by_name): Replace fatal with internal_error.
7219 (find_regno): Likewise.
7220 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7221 * thread-db.c (thread_db_create_event): Likewise.
7222 (thread_db_load_search): Likewise.
7223 (try_thread_db_load_1): Likewise.
7224 * tracepoint.c (get_jump_space_head): Replace fatal with
7225 internal_error.
7226 (claim_trampoline_space): Likewise.
7227 (have_fast_tracepoint_trampoline_buffer): Likewise.
7228 (cmd_qtstart): Likewise.
7229 (stop_tracing): Likewise.
7230 (fast_tracepoint_collecting): Likewise.
7231 (target_malloc): Likewise.
7232 (download_tracepoint): Likewise.
7233 (download_trace_state_variables): Replace check with gdb_assert.
7234 (upload_fast_traceframes): Replace fatal with internal_error.
7235
7236 2014-08-19 Tom Tromey <tromey@redhat.com>
7237 Gary Benson <gbenson@redhat.com>
7238
7239 * Makefile.in (SFILES): Add common/common-debug.c.
7240 (OBS): Add common-debug.o.
7241 (common-debug.o): New rule.
7242 * debug.h (debug_printf): Don't declare.
7243 * debug.c (debug_printf): Renamed and rewritten as...
7244 (debug_vprintf): New function.
7245
7246 2014-08-19 Gary Benson <gbenson@redhat.com>
7247
7248 * utils.h: Do not include print-utils.h.
7249
7250 2014-08-19 Tom Tromey <tromey@redhat.com>
7251 Gary Benson <gbenson@redhat.com>
7252
7253 * server.h: Add static assertion.
7254 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7255
7256 2014-08-19 Tom Tromey <tromey@redhat.com>
7257 Gary Benson <gbenson@redhat.com>
7258
7259 * Makefile.in (SFILES): Add common/errors.c.
7260 (OBS): Add errors.o.
7261 (IPA_OBS): Add errors-ipa.o.
7262 (errors.o): New rule.
7263 (errors-ipa.o): Likewise.
7264 * utils.h (perror_with_name, error, warning): Don't declare.
7265 * utils.c (warning): Renamed and rewritten as...
7266 (vwarning): New function.
7267 (error): Renamed and rewritten as...
7268 (verror): New function.
7269 (internal_error): Renamed and rewritten as...
7270 (internal_verror): New function.
7271
7272 2014-08-07 Gary Benson <gbenson@redhat.com>
7273
7274 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7275 * configure: Regenerate.
7276 * config.in: Likewise.
7277 * server.h: Do not include errno.h.
7278 * event-loop.c: Likewise.
7279 * hostio-errno.c: Likewise.
7280 * linux-low.c: Likewise.
7281 * remote-utils.c: Likewise.
7282 * spu-low.c: Likewise.
7283 * utils.c: Likewise.
7284 * gdbreplay.c: Unconditionally include errno.h.
7285
7286 2014-08-07 Gary Benson <gbenson@redhat.com>
7287
7288 * server.h: Do not include string.h.
7289 * event-loop.c: Likewise.
7290 * linux-low.c: Likewise.
7291 * regcache.c: Likewise.
7292 * remote-utils.c: Likewise.
7293 * spu-low.c: Likewise.
7294 * utils.c: Likewise.
7295
7296 2014-08-07 Gary Benson <gbenson@redhat.com>
7297
7298 * server.h: Do not include gdb_assert.h.
7299
7300 2014-08-07 Gary Benson <gbenson@redhat.com>
7301
7302 * server.h: Do not include common-utils.h.
7303
7304 2014-08-07 Gary Benson <gbenson@redhat.com>
7305
7306 * server.h: Do not include ptid.h.
7307 * notif.h: Likewise.
7308
7309 2014-08-07 Gary Benson <gbenson@redhat.com>
7310
7311 * server.h: Do not include gdb_locale.h.
7312
7313 2014-08-07 Gary Benson <gbenson@redhat.com>
7314
7315 * server.h: Do not include gdb/signals.h.
7316 * win32-low.c: Likewise.
7317
7318 2014-08-07 Gary Benson <gbenson@redhat.com>
7319
7320 * server.h: Do not include pathmax.h.
7321
7322 2014-08-07 Gary Benson <gbenson@redhat.com>
7323
7324 * server.h: Do not include libiberty.h.
7325 * linux-bfin-low.c: Likewise.
7326
7327 2014-08-07 Gary Benson <gbenson@redhat.com>
7328
7329 * server.h: Do not include ansidecl.h.
7330
7331 2014-08-07 Gary Benson <gbenson@redhat.com>
7332
7333 * linux-x86-low.c: Do not include stddef.h.
7334 * lynx-ppc-low.c: Likewise.
7335 * tracepoint.c: Likewise.
7336
7337 2014-08-07 Gary Benson <gbenson@redhat.com>
7338
7339 * server.h: Do not include stdarg.h.
7340 * nto-low.c: Likewise.
7341
7342 2014-08-07 Gary Benson <gbenson@redhat.com>
7343
7344 * server.h: Do not include stdlib.h.
7345 * inferiors.c: Likewise.
7346 * linux-low.c: Likewise.
7347 * regcache.c: Likewise.
7348 * spu-low.c: Likewise.
7349 * tracepoint.c: Likewise.
7350 * utils.c: Likewise.
7351
7352 2014-08-07 Gary Benson <gbenson@redhat.com>
7353
7354 * server.h: Do not include stdio.h.
7355 * linux-low.c: Likewise.
7356 * remote-utils.c: Likewise.
7357 * spu-low.c: Likewise.
7358 * utils.c: Likewise.
7359 * wincecompat.c: Likewise.
7360
7361 2014-08-06 Gary Benson <gbenson@redhat.com>
7362
7363 * regcache.c (init_register_cache): Move conditionals inside if.
7364
7365 2014-08-06 Gary Benson <gbenson@redhat.com>
7366
7367 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7368
7369 2014-07-31 Gary Benson <gbenson@redhat.com>
7370
7371 * ax.h: Do not include server.h.
7372 * gdbthread.h: Likewise.
7373 * lynx-low.h: Likewise.
7374 * notif.h: Likewise.
7375
7376 2014-07-30 Gary Benson <gbenson@redhat.com>
7377
7378 * server.h: Include common-defs.h.
7379 Do not include config.h or build-gnulib-gdbserver/config.h.
7380
7381 2014-07-30 Gary Benson <gbenson@redhat.com>
7382
7383 * hostio-errno.c: Move server.h to top of includes list.
7384 * inferiors.c: Likewise.
7385 * linux-x86-low.c: Likewise.
7386 * notif.c: Include server.h.
7387
7388 2014-07-24 Tom Tromey <tromey@redhat.com>
7389 Gary Benson <gbenson@redhat.com>
7390
7391 * server.h (CORE_ADDR): Now unsigned.
7392
7393 2014-07-16 Pedro Alves <palves@redhat.com>
7394
7395 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7396
7397 2014-07-15 Pedro Alves <palves@redhat.com>
7398
7399 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7400 copy.
7401
7402 2014-07-11 Pedro Alves <palves@redhat.com>
7403
7404 * linux-low.c (kill_wait_lwp): New function, based on
7405 kill_one_lwp_callback, but use my_waitpid directly.
7406 (kill_one_lwp_callback, linux_kill): Use it.
7407
7408 2014-06-23 Pedro Alves <palves@redhat.com>
7409
7410 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7411 before setting DR0..DR3.
7412
7413 2014-06-20 Gary Benson <gbenson@redhat.com>
7414
7415 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7416 * configure: Regenerated.
7417 * config.in: Likewise.
7418
7419 2014-06-20 Gary Benson <gbenson@redhat.com>
7420
7421 * Makefile.in (SFILES): Update locations for files moved
7422 from common to nat.
7423 (object file files): Reordered.
7424
7425 2014-06-20 Gary Benson <gbenson@redhat.com>
7426
7427 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7428 (i386_dr_low_set_addr): Likewise.
7429 (i386_dr_low_get_addr): Likewise.
7430 (i386_dr_low_can_set_control): Likewise.
7431 (i386_dr_low_set_control): Likewise.
7432 (i386_dr_low_get_control): Likewise.
7433 (i386_dr_low_get_status): Likewise.
7434 (i386_get_debug_register_length): Likewise.
7435 * linux-x86-low.c (i386_dr_low_set_addr):
7436 Changed signature. Made static.
7437 (i386_dr_low_get_addr): Likewise.
7438 (i386_dr_low_set_control): Likewise.
7439 (i386_dr_low_get_control): Likewise.
7440 (i386_dr_low_get_status): Likewise.
7441 (i386_dr_low): New global variable.
7442 * win32-i386-low.c (i386_dr_low_set_addr):
7443 Changed signature. Made static.
7444 (i386_dr_low_get_addr): Likewise.
7445 (i386_dr_low_set_control): Likewise.
7446 (i386_dr_low_get_control): Likewise.
7447 (i386_dr_low_get_status): Likewise.
7448 (i386_dr_low): New global variable.
7449
7450 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7451
7452 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7453 * Makefile.in (AR, AR_FLAGS): Define.
7454 * configure: Regenerate.
7455
7456 2014-06-19 Gary Benson <gbenson@redhat.com>
7457
7458 * Makefile.in (i386-dregs.o): New rule.
7459 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7460 * i386-low.c (target.h): Remove include.
7461 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7462 (DR_CONTROL_SHIFT): Likewise.
7463 (DR_CONTROL_SIZE): Likewise.
7464 (DR_RW_EXECUTE): Likewise.
7465 (DR_RW_WRITE): Likewise.
7466 (DR_RW_READ): Likewise.
7467 (DR_RW_IORW): Likewise.
7468 (DR_LEN_1): Likewise.
7469 (DR_LEN_2): Likewise.
7470 (DR_LEN_4): Likewise.
7471 (DR_LEN_8): Likewise.
7472 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7473 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7474 (DR_ENABLE_SIZE): Likewise.
7475 (DR_LOCAL_SLOWDOWN): Likewise.
7476 (DR_GLOBAL_SLOWDOWN): Likewise.
7477 (DR_CONTROL_RESERVED): Likewise.
7478 (I386_DR_CONTROL_MASK): Likewise.
7479 (I386_DR_VACANT): Likewise.
7480 (I386_DR_LOCAL_ENABLE): Likewise.
7481 (I386_DR_GLOBAL_ENABLE): Likewise.
7482 (I386_DR_DISABLE): Likewise.
7483 (I386_DR_SET_RW_LEN): Likewise.
7484 (I386_DR_GET_RW_LEN): Likewise.
7485 (I386_DR_WATCH_HIT): Likewise.
7486 (i386_wp_op_t): Likewise.
7487 (i386_show_dr): Likewise.
7488 (i386_length_and_rw_bits): Likewise.
7489 (i386_insert_aligned_watchpoint): Likewise.
7490 (i386_remove_aligned_watchpoint): Likewise.
7491 (i386_handle_nonaligned_watchpoint): Likewise.
7492 i386_update_inferior_debug_regs(): Likewise.
7493 (i386_dr_insert_watchpoint): Likewise.
7494 (i386_dr_remove_watchpoint): Likewise.
7495 (i386_dr_region_ok_for_watchpoint): Likewise.
7496 (i386_dr_stopped_data_address): Likewise.
7497 (i386_dr_stopped_by_watchpoint): Likewise.
7498
7499 2014-06-19 Gary Benson <gbenson@redhat.com>
7500
7501 * i386-low.c (i386_dr_show): Renamed to
7502 i386_show_dr and made static. All uses updated.
7503 (i386_dr_length_and_rw_bits): Renamed to
7504 i386_length_and_rw_bits and made static.
7505 All uses updated.
7506 (i386_dr_insert_aligned_watchpoint): Renamed to
7507 i386_insert_aligned_watchpoint and made static.
7508 All uses updated.
7509 (i386_dr_remove_aligned_watchpoint): Renamed to
7510 i386_remove_aligned_watchpoint and made static.
7511 All uses updated.
7512 (i386_dr_update_inferior_debug_regs): Renamed to
7513 i386_update_inferior_debug_regs and made static.
7514 All uses updated.
7515
7516 2014-06-18 Gary Benson <gbenson@redhat.com>
7517
7518 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7519 (i386_dr_low_can_set_control): Likewise.
7520 (i386_get_debug_register_length): Likewise.
7521 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7522 (i386_dr_low_can_set_control): Likewise.
7523 (i386_get_debug_register_length): Likewise.
7524
7525 2014-06-17 Gary Benson <gbenson@redhat.com>
7526
7527 * i386-low.h (i386-dregs.h): New include.
7528 (DR_FIRSTADDR): Now in i386-dregs.h.
7529 (DR_LASTADDR): Likewise.
7530 (DR_NADDR): Likewise.
7531 (DR_STATUS): Likewise.
7532 (DR_CONTROL): Likewise.
7533 (i386_debug_reg_state): Likewise.
7534 (i386_dr_insert_watchpoint): Likewise.
7535 (i386_dr_remove_watchpoint): Likewise.
7536 (i386_dr_region_ok_for_watchpoint): Likewise.
7537 (i386_dr_stopped_data_address): Likewise.
7538 (i386_dr_stopped_by_watchpoint): Likewise.
7539 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7540
7541 2014-06-18 Gary Benson <gbenson@redhat.com>
7542
7543 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7544 i386_dr_insert_watchpoint.
7545 (i386_low_remove_watchpoint): Renamed to
7546 i386_dr_remove_watchpoint.
7547 (i386_low_region_ok_for_watchpoint): Renamed to
7548 i386_dr_region_ok_for_watchpoint.
7549 (i386_low_stopped_data_address): Renamed to
7550 i386_dr_stopped_data_address.
7551 (i386_low_stopped_by_watchpoint): Renamed to
7552 i386_dr_stopped_by_watchpoint.
7553 * i386-low.c (i386_show_dr): Renamed to
7554 i386_dr_show and made nonstatic. All uses updated.
7555 (i386_length_and_rw_bits): Renamed to
7556 i386_dr_length_and_rw_bits and made nonstatic.
7557 All uses updated.
7558 (i386_insert_aligned_watchpoint): Renamed to
7559 i386_dr_insert_aligned_watchpoint and made nonstatic.
7560 All uses updated.
7561 (i386_remove_aligned_watchpoint): Renamed to
7562 i386_dr_remove_aligned_watchpoint and made nonstatic.
7563 All uses updated.
7564 (i386_update_inferior_debug_regs): Renamed to
7565 i386_dr_update_inferior_debug_regs and made nonstatic.
7566 All uses updated.
7567 (i386_low_insert_watchpoint): Renamed to
7568 i386_dr_insert_watchpoint. All uses updated.
7569 (i386_low_remove_watchpoint): Renamed to
7570 i386_dr_remove_watchpoint. All uses updated.
7571 (i386_low_region_ok_for_watchpoint): Renamed to
7572 i386_dr_region_ok_for_watchpoint. All uses updated.
7573 (i386_low_stopped_data_address): Renamed to
7574 i386_dr_stopped_data_address. All uses updated.
7575 (i386_low_stopped_by_watchpoint): Renamed to
7576 i386_dr_stopped_by_watchpoint. All uses updated.
7577
7578 2014-06-18 Gary Benson <gbenson@redhat.com>
7579
7580 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7581 (i386_dr_low_can_set_control): Likewise.
7582 (i386_insert_aligned_watchpoint): New check.
7583
7584 2014-06-18 Gary Benson <gbenson@redhat.com>
7585
7586 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7587 Renamed to state.
7588
7589 2014-06-18 Gary Benson <gbenson@redhat.com>
7590
7591 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7592 instead of fatal and error.
7593 (i386_handle_nonaligned_watchpoint): Likewise.
7594
7595 2014-06-18 Gary Benson <gbenson@redhat.com>
7596
7597 * i386-low.c (i386_get_debug_register_length): New macro.
7598 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7599 (i386_show_dr): Use debug_printf instead of fprintf. Use
7600 phex to format values.
7601
7602 2014-06-18 Gary Benson <gbenson@redhat.com>
7603
7604 * i386-low.h: Comment changes.
7605 * i386-low.c: Likewise.
7606
7607 2014-06-18 Gary Benson <gbenson@redhat.com>
7608
7609 * i386-low.c: Whitespace changes.
7610
7611 2014-06-12 Tom Tromey <tromey@redhat.com>
7612
7613 * utils.c (freeargv): Remove.
7614
7615 2014-06-12 Tom Tromey <tromey@redhat.com>
7616
7617 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7618 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7619 (parse_debug_format_options): Likewise.
7620 (gdbserver_usage): Likewise.
7621 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7622 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7623 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7624 against libiberty.
7625 ($(LIBGNU)): Depend on libiberty.
7626 (all-lib): Recurse into all subdirs.
7627 (install-only): Invoke "install" target in subdirs.
7628 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7629 targets.
7630 * configure: Rebuild.
7631 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7632 for vasprintf, vsnprintf, or gettimeofday.
7633 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7634 srv_tgtobj.
7635
7636 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7637
7638 * development.sh: Delete.
7639 * Makefile.in (config.status): Adjust dependency on development.sh.
7640 * configure.ac: Adjust development.sh source call.
7641 * configure: Regenerate.
7642
7643 2014-06-02 Pedro Alves <palves@redhat.com>
7644
7645 * ax.c (gdb_free_agent_expr): New function.
7646 * ax.h (gdb_free_agent_expr): New declaration.
7647 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7648 list.
7649 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7650 static.
7651 (clear_breakpoint_conditions_and_commands): New function.
7652 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7653 (clear_breakpoint_conditions_and_commands): New declaration.
7654
7655 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7656
7657 * linux-aarch64-low.c (asm/ptrace.h): Include.
7658
7659 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7660
7661 Fix TLS access for -static -pthread.
7662 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7663 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7664 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7665
7666 2014-05-20 Pedro Alves <palves@redhat.com>
7667
7668 * linux-aarch64-low.c (aarch64_insert_point)
7669 (aarch64_remove_point): No longer check whether the type is
7670 supported here. Adjust to new interface.
7671 (the_low_target): Install aarch64_supports_z_point_type as
7672 supports_z_point_type method.
7673 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7674 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7675 instead of a Z packet char. Adjust.
7676 (arm_supports_z_point_type): New function.
7677 (arm_insert_point, arm_remove_point): Adjust to new interface.
7678 (the_low_target): Install arm_supports_z_point_type.
7679 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7680 (cris_insert_point, cris_remove_point): Adjust to new interface.
7681 Don't check whether the type is supported here.
7682 (the_low_target): Install cris_supports_z_point_type.
7683 * linux-low.c (linux_supports_z_point_type): New function.
7684 (linux_insert_point, linux_remove_point): Adjust to new interface.
7685 * linux-low.h (struct linux_target_ops) <insert_point,
7686 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7687 raw_breakpoint pointer parameter.
7688 <supports_z_point_type>: New method.
7689 * linux-mips-low.c (mips_supports_z_point_type): New function.
7690 (mips_insert_point, mips_remove_point): Adjust to new interface.
7691 Use mips_supports_z_point_type.
7692 (the_low_target): Install mips_supports_z_point_type.
7693 * linux-ppc-low.c (the_low_target): Install NULL as
7694 supports_z_point_type method.
7695 * linux-s390-low.c (the_low_target): Install NULL as
7696 supports_z_point_type method.
7697 * linux-sparc-low.c (the_low_target): Install NULL as
7698 supports_z_point_type method.
7699 * linux-x86-low.c (x86_supports_z_point_type): New function.
7700 (x86_insert_point): Adjust to new insert_point interface. Use
7701 insert_memory_breakpoint. Adjust to new
7702 i386_low_insert_watchpoint interface.
7703 (x86_remove_point): Adjust to remove_point interface. Use
7704 remove_memory_breakpoint. Adjust to new
7705 i386_low_remove_watchpoint interface.
7706 (the_low_target): Install x86_supports_z_point_type.
7707 * lynx-low.c (lynx_target_ops): Install NULL as
7708 supports_z_point_type callback.
7709 * nto-low.c (nto_supports_z_point_type): New.
7710 (nto_insert_point, nto_remove_point): Adjust to new interface.
7711 (nto_target_ops): Install nto_supports_z_point_type.
7712 * mem-break.c: Adjust intro comment.
7713 (struct raw_breakpoint) <raw_type, size>: New fields.
7714 <inserted>: Update comment.
7715 <shlib_disabled>: Delete field.
7716 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7717 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7718 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7719 (raw_bkpt_type_to_target_hw_bp_type): New function.
7720 (find_enabled_raw_code_breakpoint_at): New function.
7721 (find_raw_breakpoint_at): New type and size parameters. Use them.
7722 (insert_memory_breakpoint): New function, based off
7723 set_raw_breakpoint_at.
7724 (remove_memory_breakpoint): New function.
7725 (set_raw_breakpoint_at): Reimplement.
7726 (set_breakpoint): New, based on set_breakpoint_at.
7727 (set_breakpoint_at): Reimplement.
7728 (delete_raw_breakpoint): Go through the_target->remove_point
7729 instead of assuming memory breakpoints.
7730 (find_gdb_breakpoint_at): Delete.
7731 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7732 (find_gdb_breakpoint): New function.
7733 (set_gdb_breakpoint_at): Delete.
7734 (z_type_supported): New function.
7735 (set_gdb_breakpoint_1): New function, loosely based off
7736 set_gdb_breakpoint_at.
7737 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7738 (delete_gdb_breakpoint_at): Delete.
7739 (delete_gdb_breakpoint_1): New function, loosely based off
7740 delete_gdb_breakpoint_at.
7741 (delete_gdb_breakpoint): New function.
7742 (clear_gdb_breakpoint_conditions): Rename to ...
7743 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7744 breakpoint.
7745 (add_condition_to_breakpoint): Make static.
7746 (add_breakpoint_condition): Take a struct breakpoint pointer
7747 instead of an address. Adjust.
7748 (gdb_condition_true_at_breakpoint): Rename to ...
7749 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7750 z_type parameter.
7751 (gdb_condition_true_at_breakpoint): Reimplement.
7752 (add_breakpoint_commands): Take a struct breakpoint pointer
7753 instead of an address. Adjust.
7754 (gdb_no_commands_at_breakpoint): Rename to ...
7755 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7756 parameter. Return true if no breakpoint was found. Change debug
7757 output.
7758 (gdb_no_commands_at_breakpoint): Reimplement.
7759 (run_breakpoint_commands): Rename to ...
7760 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7761 and change return type to boolean.
7762 (run_breakpoint_commands): New function.
7763 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7764 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7765 breakpoint. Go through the_target->remove_point instead of
7766 assuming memory breakpoint.
7767 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7768 software and hardware breakpoints.
7769 (reinsert_raw_breakpoint): Go through the_target->insert_point
7770 instead of assuming memory breakpoint.
7771 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7772 software and hardware breakpoints.
7773 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7774 Check both software and hardware breakpoints.
7775 (validate_inserted_breakpoint): Assert the breakpoint is a
7776 software breakpoint. Set the inserted flag to -1 instead of
7777 setting shlib_disabled.
7778 (delete_disabled_breakpoints): Adjust.
7779 (validate_breakpoints): Only validate software breakpoints.
7780 Adjust to inserted flag change.
7781 (check_mem_read, check_mem_write): Skip breakpoint types other
7782 than software breakpoints. Adjust to inserted flag change.
7783 * mem-break.h (enum raw_bkpt_type): New enum.
7784 (raw_breakpoint, struct process_info): Forward declare.
7785 (Z_packet_to_target_hw_bp_type): Delete declaration.
7786 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7787 (set_gdb_breakpoint, delete_gdb_breakpoint)
7788 (clear_breakpoint_conditions): New declarations.
7789 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7790 (breakpoint_inserted_here): Update comment.
7791 (add_breakpoint_condition, add_breakpoint_commands): Replace
7792 address parameter with a breakpoint pointer parameter.
7793 (gdb_breakpoint_here): Update comment.
7794 (delete_gdb_breakpoint_at): Delete.
7795 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7796 * server.c (process_point_options): Take a struct breakpoint
7797 pointer instead of an address. Adjust.
7798 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7799 delete_gdb_breakpoint.
7800 * spu-low.c (spu_target_ops): Install NULL as
7801 supports_z_point_type method.
7802 * target.h: Include mem-break.h.
7803 (struct target_ops) <prepare_to_access_memory>: Update comment.
7804 <supports_z_point_type>: New field.
7805 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7806 instead of a char. Also take a raw breakpoint pointer.
7807 * win32-arm-low.c (the_low_target): Install NULL as
7808 supports_z_point_type.
7809 * win32-i386-low.c (i386_supports_z_point_type): New function.
7810 (i386_insert_point, i386_remove_point): Adjust to new interface.
7811 (the_low_target): Install i386_supports_z_point_type.
7812 * win32-low.c (win32_supports_z_point_type): New function.
7813 (win32_insert_point, win32_remove_point): Adjust to new interface.
7814 (win32_target_ops): Install win32_supports_z_point_type.
7815 * win32-low.h (struct win32_target_ops):
7816 <supports_z_point_type>: New method.
7817 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7818 instead of a char. Also take a raw breakpoint pointer.
7819
7820 2014-05-20 Pedro Alves <palves@redhat.com>
7821
7822 * mem-break.h: Include break-common.h.
7823 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7824 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7825 (Z_packet_to_target_hw_bp_type): New declaration.
7826 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7827 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7828 (Z_PACKET_ACCESS_WP): Delete macros.
7829 (Z_packet_to_hw_type): Delete function.
7830 * i386-low.h: Don't include break-common.h here.
7831 (Z_packet_to_hw_type): Delete declaration.
7832 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7833 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7834 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7835 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7836 * linux-aarch64-low.c: Don't include break-common.h here.
7837 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7838 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7839 (Z_packet_to_target_hw_bp_type): Delete function.
7840 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7841 function.
7842 (mips_insert_point, mips_remove_point): Use
7843 Z_packet_to_target_hw_bp_type.
7844
7845 2014-05-20 Pedro Alves <palves@redhat.com>
7846
7847 * linux-aarch64-low.c: Include break-common.h.
7848 (enum target_point_type): Delete.
7849 (Z_packet_to_point_type): Rename to ...
7850 (Z_packet_to_target_hw_bp_type): ... this, and return a
7851 target_hw_bp_type instead.
7852 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7853 instead of an enum target_point_type.
7854 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7855 breakpoint type.
7856 (aarch64_dr_state_insert_one_point)
7857 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7858 (aarch64_handle_aligned_watchpoint)
7859 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7860 Take an enum target_hw_bp_type instead of an enum
7861 target_point_type.
7862 (aarch64_supports_z_point_type): New function.
7863 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7864 use Z_packet_to_target_hw_bp_type.
7865
7866 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7867
7868 * configure.ac: Only use -Werror by default when DEVELOPMENT
7869 is true.
7870 * configure: Regenerate.
7871
7872 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7873
7874 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7875 * linux-x86-low.c (X86_64_USER_REGS): New.
7876 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7877
7878 2014-04-28 Yao Qi <yao@codesourcery.com>
7879
7880 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7881 name.
7882
7883 2014-04-25 Pedro Alves <palves@redhat.com>
7884
7885 PR server/16255
7886 * linux-low.c (linux_attach_fail_reason_string): New function.
7887 (linux_attach_lwp): Delete.
7888 (linux_attach_lwp_1): Rename to ...
7889 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7890 argument. Remove "initial" parameter. Return int instead of
7891 void. Don't error or warn here.
7892 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7893 failure to attach to the tgid. Call warning when failing to
7894 attach to an lwp.
7895 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7896 argument. Remove "initial" parameter. Return int instead of
7897 void. Don't error or warn here.
7898 (linux_attach_fail_reason_string): New declaration.
7899 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7900 interface change. Use linux_attach_fail_reason_string.
7901
7902 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7903 Walfred Tedeschi <walfred.tedeschi@intel.com>
7904
7905 * Makefile.in: Added rules to handle new files
7906 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7907 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7908 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7909 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7910 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7911 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7912 x32-avx512-linux.o.
7913 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7914 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7915 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7916 i386/x32-avx512.xml.
7917 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7918 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7919 i386/x32-avx512-linux.xml.
7920 * i387-fp.c (num_avx512_k_registers): New constant for number
7921 of K registers.
7922 (num_avx512_zmmh_low_registers): New constant for number of
7923 lower ZMM registers (0-15).
7924 (num_avx512_zmmh_high_registers): New constant for number of
7925 higher ZMM registers (16-31).
7926 (num_avx512_ymmh_registers): New contant for number of higher
7927 YMM registers (ymm16-31 added by avx521 on x86_64).
7928 (num_avx512_xmm_registers): New constant for number of higher
7929 XMM registers (xmm16-31 added by AVX512 on x86_64).
7930 (struct i387_xsave): Add space for AVX512 registers.
7931 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7932 Add code to handle AVX512 registers.
7933 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7934 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7935 prototypei from generated file.
7936 (tdesc_amd64_avx512_linux): Likewise.
7937 (init_registers_x32_avx512_linux): Likewise.
7938 (tdesc_x32_avx512_linux): Likewise.
7939 (init_registers_i386_avx512_linux): Likewise.
7940 (tdesc_i386_avx512_linux): Likewise.
7941 (x86_64_regmap): Add AVX512 registers.
7942 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7943 mask.
7944 (initialize_low_arch): Add code to initialize AVX512 registers.
7945
7946 2014-04-23 Pedro Alves <palves@redhat.com>
7947
7948 * mem-break.c (find_gdb_breakpoint_at): Make static.
7949 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7950
7951 2014-04-23 Pedro Alves <palves@redhat.com>
7952
7953 * i386-low.c: Don't include break-common.h here.
7954 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7955 prototype to take target_hw_bp_type as argument instead of a Z
7956 packet char.
7957 * i386-low.h: Include break-common.h here.
7958 (Z_packet_to_hw_type): Declare.
7959 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7960 prototypes.
7961 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7962 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7963 (x86_remove_point): Convert the packet number to a
7964 target_hw_bp_type before calling i386_low_remove_watchpoint.
7965 * win32-i386-low.c (i386_insert_point): Convert the packet number
7966 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7967 (i386_remove_point): Convert the packet number to a
7968 target_hw_bp_type before calling i386_low_remove_watchpoint.
7969
7970 2014-04-23 Pedro Alves <palves@redhat.com>
7971
7972 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7973
7974 2014-04-10 Pedro Alves <palves@redhat.com>
7975
7976 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7977 Check if the condition or command is NULL before checking if the
7978 breakpoint is known. On success, return true.
7979 * mem-break.h (add_breakpoint_condition): Document return.
7980 (add_breakpoint_commands): Add describing comment.
7981 * server.c (skip_to_semicolon): New function.
7982 (process_point_options): Use it.
7983
7984 2014-04-09 Pedro Alves <palves@redhat.com>
7985
7986 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7987 to lwpid_of.
7988
7989 2014-02-27 Pedro Alves <palves@redhat.com>
7990
7991 PR 12702
7992 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7993 macros.
7994 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7995 output.
7996 (last_thread_of_process_p): Take a PID argument instead of a
7997 thread pointer.
7998 (linux_wait_for_lwp): Delete.
7999 (num_lwps, check_zombie_leaders, not_stopped_callback): New
8000 functions.
8001 (linux_low_filter_event): New function, party factored out from
8002 linux_wait_for_event.
8003 (linux_wait_for_event): Rename to ...
8004 (linux_wait_for_event_filtered): ... this. Add new filter ptid
8005 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
8006 sigsuspend. Check for zombie leaders.
8007 (linux_wait_for_event): Reimplement as wrapper around
8008 linux_wait_for_event_filtered.
8009 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
8010 a normal or signal exit is seen, it's the whole process exiting.
8011 (wait_for_sigstop): No longer a for_each_inferior callback.
8012 Rewrite on top of linux_wait_for_event_filtered.
8013 (stop_all_lwps): Call wait_for_sigstop directly.
8014 * server.c (resume, handle_target_event): Handle
8015 TARGET_WAITKIND_NO_RESUMED.
8016
8017 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8018
8019 * win32-low.c (psapi_get_dll_name,
8020 * win32_CreateToolhelp32Snapshot): Delete.
8021 (win32_CreateToolhelp32Snapshot, win32_Module32First)
8022 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
8023 Delete.
8024 (handle_load_dll): Add function description.
8025 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
8026
8027 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8028
8029 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
8030 Add comment.
8031 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
8032 base address when calling win32_add_one_solib.
8033 (handle_load_dll): Delete local variable load_addr.
8034 Remove 0x1000 offset applied to DLL base address when calling
8035 win32_add_one_solib.
8036 (handle_unload_dll): Add comment.
8037
8038 2014-02-26 Joel Brobecker <brobecker@adacore.com>
8039
8040 * win32-low.c (win32_add_all_dlls): Renames
8041 win32_ensure_ntdll_loaded. Rewrite function documentation.
8042 Adjust implementation to always load all DLLs.
8043 Add 0x1000 offset to DLL base address when calling
8044 win32_add_one_solib.
8045 (child_initialization_done): New static global.
8046 (do_initial_child_stuff): Set child_initialization_done to
8047 zero during child initialization, and 1 after. Replace call
8048 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
8049 Add comment.
8050 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
8051 (handle_unload_dll): Add function documentation.
8052 (get_child_debug_event): Ignore load and unload DLL events
8053 during child initialization.
8054
8055 2014-02-20 Doug Evans <dje@google.com>
8056
8057 Remove global all_lwps.
8058 * inferiors.h (ptid_of): Move here from linux-low.h.
8059 (pid_of, lwpid_of): Ditto.
8060 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
8061 parameter is a struct thread_info * now.
8062 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
8063 directly. Pass &all_threads to find_inferior instead of &all_lwps.
8064 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
8065 directly.
8066 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
8067 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
8068 * linux-arm-low.c (update_registers_callback): Update, "entry"
8069 parameter is a struct thread_info * now.
8070 Fetch lwpid from current_inferior directly.
8071 (arm_insert_point): Pass &all_threads to find_inferior instead of
8072 &all_lwps.
8073 (arm_remove_point): Ditto.
8074 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
8075 (arm_prepare_to_resume): Fetch pid from thread.
8076 (arm_read_description): Fetch lwpid from current_inferior directly.
8077 * linux-low.c (all_lwps): Delete.
8078 (delete_lwp): Delete call to remove_inferior.
8079 (handle_extended_wait): Fetch lwpid from thread.
8080 (add_lwp): Don't set lwp->entry.id. Remove call to
8081 add_inferior_to_list.
8082 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
8083 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
8084 (kill_one_lwp_callback): Ditto.
8085 (linux_kill): Don't dereference NULL pointer.
8086 Fetch ptid,lwpid from thread.
8087 (get_detach_signal): Fetch ptid from thread.
8088 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8089 Simplify call to regcache_invalidate_thread.
8090 (delete_lwp_callback): Update, "entry" parameter is a
8091 struct thread_info * now. Fetch pid from thread.
8092 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8093 (status_pending_p_callback): Update, "entry" parameter is a
8094 struct thread_info * now. Fetch ptid from thread.
8095 (find_lwp_pid): Update, "entry" parameter is a
8096 struct thread_info * now.
8097 (linux_wait_for_lwp): Fetch pid from thread.
8098 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8099 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8100 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8101 (dequeue_one_deferred_signal): Ditto.
8102 (cancel_breakpoint): Fetch ptid from current_inferior.
8103 (linux_wait_for_event): Pass &all_threads to find_inferior,
8104 not &all_lwps. Fetch ptid, lwpid from thread.
8105 (count_events_callback): Update, "entry" parameter is a
8106 struct thread_info * now.
8107 (select_singlestep_lwp_callback): Ditto.
8108 (select_event_lwp_callback): Ditto.
8109 (cancel_breakpoints_callback): Ditto.
8110 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8111 not &all_lwps.
8112 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8113 (unsuspend_one_lwp): Update, "entry" parameter is a
8114 struct thread_info * now.
8115 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8116 not &all_lwps.
8117 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8118 Fetch lwpid from thread, not lwp.
8119 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8120 Pass &all_threads to find_inferior, not &all_lwps.
8121 (send_sigstop): Fetch lwpid from thread, not lwp.
8122 (send_sigstop_callback): Update, "entry" parameter is a
8123 struct thread_info * now.
8124 (suspend_and_send_sigstop_callback): Ditto.
8125 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8126 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8127 struct thread_info * now.
8128 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8129 from thread, lwp.
8130 (lwp_running): Update, "entry" parameter is a
8131 struct thread_info * now.
8132 (stop_all_lwps): Fetch ptid from thread.
8133 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8134 (linux_resume_one_lwp): Fetch lwpid from thread.
8135 (linux_set_resume_request): Update, "entry" parameter is a
8136 struct thread_info * now. Fetch pid, lwpid from thread.
8137 (resume_status_pending_p): Update, "entry" parameter is a
8138 struct thread_info * now.
8139 (need_step_over_p): Ditto. Fetch lwpid from thread.
8140 (start_step_over): Fetch lwpid from thread.
8141 (linux_resume_one_thread): Update, "entry" parameter is a
8142 struct thread_info * now. Fetch lwpid from thread.
8143 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8144 (proceed_one_lwp): Update, "entry" parameter is a
8145 struct thread_info * now. Fetch lwpid from thread.
8146 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8147 struct thread_info * now.
8148 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8149 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8150 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8151 directly.
8152 (regsets_store_inferior_registers): Ditto.
8153 (fetch_register, store_register): Ditto.
8154 (linux_read_memory, linux_write_memory): Ditto.
8155 (linux_request_interrupt): Ditto.
8156 (linux_read_auxv): Ditto.
8157 (linux_xfer_siginfo): Ditto.
8158 (linux_qxfer_spu): Ditto.
8159 (linux_qxfer_libraries_svr4): Ditto.
8160 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8161 moved to inferiors.h.
8162 (get_lwp): Delete.
8163 (get_thread_lwp): Update.
8164 (struct lwp_info): Delete member "entry". Simplify comment for
8165 member "thread".
8166 (all_lwps): Delete.
8167 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8168 current_inferior directly.
8169 (update_watch_registers_callback): Update, "entry" parameter is a
8170 struct thread_info * now. Fetch pid from thread.
8171 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8172 (mips_insert_point): Fetch lwpid from current_inferior.
8173 Pass &all_threads to find_inferior, not &all_lwps.
8174 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8175 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8176 directly.
8177 (mips_stopped_data_address): Ditto.
8178 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8179 directly.
8180 * linux-tile-low.c (tile_arch_setup): Ditto.
8181 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8182 (update_debug_registers_callback): Update, "entry" parameter is a
8183 struct thread_info * now. Fetch pid from thread.
8184 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8185 Pass &all_threads to find_inferior, not &all_lwps.
8186 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8187 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8188 Pass &all_threads to find_inferior, not &all_lwps.
8189 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8190 (i386_dr_low_get_status): Ditto.
8191 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8192 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8193 (x86_linux_read_description): Ditto.
8194 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8195
8196 2014-02-20 Doug Evans <dje@google.com>
8197
8198 * inferiors.c (get_first_inferior): Fix buglet.
8199
8200 2014-02-19 Doug Evans <dje@google.com>
8201
8202 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8203 * inferiors.c (add_thread): Change result type to struct thread_info *.
8204 All callers updated.
8205 (add_lwp): Call add_thread here instead of in callers.
8206 All callers updated.
8207 * linux-low.h (get_lwp_thread): Rewrite.
8208 (struct lwp_info): New member "thread".
8209
8210 2014-02-19 Doug Evans <dje@google.com>
8211
8212 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8213 All callers updated.
8214
8215 2014-02-19 Doug Evans <dje@google.com>
8216
8217 * inferiors.c (add_thread): Fix whitespace.
8218
8219 2014-02-19 Doug Evans <dje@google.com>
8220
8221 * dll.c (clear_dlls): Replace accessing list implemention details
8222 with API function.
8223 * gdbthread.h (get_first_thread): Declare.
8224 * inferiors.c (for_each_inferior_with_data): New function.
8225 (get_first_thread): New function.
8226 (find_thread_ptid): Simplify.
8227 (get_first_inferior): New function.
8228 (clear_list): Delete.
8229 (one_inferior_p): New function.
8230 (clear_inferior_list): New function.
8231 (clear_inferiors): Update.
8232 * inferiors.h (for_each_inferior_with_data): Declare.
8233 (clear_inferior_list): Declare.
8234 (one_inferior_p): Declare.
8235 (get_first_inferior): Declare.
8236 * linux-low.c (linux_wait_for_event): Replace accessing list
8237 implemention details with API function.
8238 * server.c (target_running): Ditto.
8239 (accumulate_file_name_length): New function.
8240 (emit_dll_description): New function.
8241 (handle_qxfer_libraries): Replace accessing list implemention
8242 details with API function.
8243 (handle_qxfer_threads_worker): New function.
8244 (handle_qxfer_threads_proper): Replace accessing list implemention
8245 details with API function.
8246 (handle_query): Ditto.
8247 (visit_actioned_threads_callback_ftype): New typedef.
8248 (visit_actioned_threads_data): New struct.
8249 (visit_actioned_threads): Rewrite to be find_inferior callback.
8250 (resume): Call find_inferior.
8251 (handle_status): Replace accessing list implemention
8252 details with API function.
8253 (process_serial_event): Replace accessing list implemention details
8254 with API function.
8255 * target.c (set_desired_inferior): Replace accessing list implemention
8256 details with API function.
8257 * tracepoint.c (same_process_p): New function.
8258 (gdb_agent_about_to_close): Replace accessing list implemention
8259 details with API function.
8260 * win32-low.c (child_delete_thread): Replace accessing list
8261 implemention details with API function.
8262 (match_dll_by_basename): New function.
8263 (dll_is_loaded_by_basename): New function.
8264 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8265 details call to dll_is_loaded_by_basename.
8266
8267 2014-02-19 Doug Evans <dje@google.com>
8268
8269 * dll.h (struct dll_info): Add comment.
8270 * gdbthread.h (struct thread_info): Add comment.
8271 (current_ptid): Simplify.
8272 * inferiors.c (add_process): Update.
8273 (remove_process): Update.
8274 * inferiors.h (struct process_info): Rename member "head" to "entry".
8275 * linux-low.c (delete_lwp): Update.
8276 (add_lwp): Update.
8277 (last_thread_of_process_p): Update.
8278 (kill_one_lwp_callback, linux_kill): Update.
8279 (status_pending_p_callback): Update.
8280 (wait_for_sigstop): Update. Simplify read of ptid.
8281 (start_step_over): Update.
8282 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8283 (get_lwp_thread): Update.
8284 (struct lwp_info): Rename member "head" to "entry".
8285 * regcache.h (inferior_list_entry): Delete.
8286 * server.c (kill_inferior_callback): Update.
8287 (detach_or_kill_inferior_callback): Update.
8288 (print_started_pid): Update.
8289 (print_attached_pid): Update.
8290 (process_serial_event): Simplify read of ptid.
8291 * thread-db.c (thread_db_create_event): Update.
8292 (thread_db_get_tls_address): Update.
8293 * win32-low.c (current_inferior_ptid): Simplify.
8294
8295 2014-02-19 Tom Tromey <tromey@redhat.com>
8296
8297 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8298 argument.
8299 (target_supports_btrace): Update.
8300
8301 2014-02-14 Yao Qi <yao@codesourcery.com>
8302
8303 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8304 (rsp-low-ipa.o): New target.
8305
8306 2014-02-12 Tom Tromey <tromey@redhat.com>
8307
8308 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8309 convert_ascii_to_int.
8310 * regcache.c (registers_to_string): Likewise.
8311 * remote-utils.c (decode_M_packet): Likewise.
8312 * server.c (process_serial_event): Likewise.
8313
8314 2014-02-12 Tom Tromey <tromey@redhat.com>
8315
8316 * server.c (handle_query, handle_v_run): Use hex2bin, not
8317 unhexify.
8318 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8319
8320 2014-02-12 Tom Tromey <tromey@redhat.com>
8321
8322 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8323 convert_int_to_ascii.
8324 * regcache.c (registers_to_string, collect_register_as_string):
8325 Likewise.
8326 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8327 Likewise.
8328 * server.c (process_serial_event): Likewise.
8329 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8330 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8331
8332 2014-02-12 Tom Tromey <tromey@redhat.com>
8333
8334 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8335 bin2hex, not hexify.
8336 * tracepoint.c (cmd_qtstatus): Likewise.
8337
8338 2014-02-12 Tom Tromey <tromey@redhat.com>
8339
8340 * remote-utils.c (monitor_output): Pass explicit length to
8341 hexify.
8342
8343 2014-02-12 Tom Tromey <tromey@redhat.com>
8344
8345 * tracepoint.c: Include rsp-low.h.
8346 * server.c: Include rsp-low.h.
8347 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8348 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8349 declare.
8350 * remote-utils.c: Include rsp-low.h.
8351 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8352 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8353 (convert_int_to_ascii, convert_ascii_to_int): Move to
8354 common/rsp-low.c.
8355 * regcache.c: Include rsp-low.h.
8356 * ax.c: Include rsp-low.h.
8357 * Makefile.in (SFILES): Add common/rsp-low.c.
8358 (OBS): Add rsp-low.o.
8359 (rsp-low.o): New target.
8360
8361 2014-02-12 Tom Tromey <tromey@redhat.com>
8362
8363 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8364 Include print-utils.h.
8365 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8366 (plongest, thirty_two, phex_nz): Remove.
8367 * Makefile.in (SFILES): Add common/print-utils.c.
8368 (OBS): Add print-utils.o.
8369 (print-utils-ipa.o): New target.
8370 (print-utils.o): New target.
8371 (IPA_OBJS): Add print-utils-ipa.o.
8372
8373 2014-02-06 Tom Tromey <tromey@redhat.com>
8374
8375 * Makefile.in (SFILES): Fix indentation.
8376
8377 2014-02-05 Doug Evans <dje@google.com>
8378
8379 * linux-low.c (linux_wait_for_event): Improve comment.
8380 (linux_wait_1): Keep current_inferior in sync with event_child.
8381
8382 2014-01-22 Doug Evans <dje@google.com>
8383
8384 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8385
8386 2014-01-22 Doug Evans <dje@google.com>
8387
8388 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8389 * configure: Regenerate.
8390 * config.in: Regenerate.
8391 * Makefile.in (SFILES): Add debug.c.
8392 (OBS): Add debug.o.
8393 * debug.c: New file.
8394 * debug.h: New file.
8395 * linux-aarch64-low.c (*): Update all debugging printfs to use
8396 debug_printf instead of fprintf.
8397 * linux-arm-low.c (*): Ditto.
8398 * linux-cris-low.c (*): Ditto.
8399 * linux-crisv32-low.c (*): Ditto.
8400 * linux-m32r-low.c (*): Ditto.
8401 * linux-sparc-low.c (*): Ditto.
8402 * linux-x86.c (*): Ditto.
8403 * linux-low.c (*): Ditto.
8404 (linux_wait_1): Add calls to debug_enter, debug_exit.
8405 (linux_wait): Remove redundant debugging printf.
8406 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8407 (linux_resume, unstop_all_lwps): Ditto.
8408 * mem-break.c (*): Update all debugging printfs to use
8409 debug_printf instead of fprintf.
8410 * remote-utils.c (*): Ditto.
8411 * thread-db.c (*): Ditto.
8412 * server.c #include <ctype.h>, "gdb_vecs.h".
8413 (debug_threads): Moved to debug.c.
8414 (*): Update all debugging printfs to use debug_printf instead of
8415 fprintf.
8416 (start_inferior): Replace call to fflush with call to debug_flush.
8417 (monitor_show_help): Mention set debug-format.
8418 (parse_debug_format_options): New function.
8419 (handle_monitor_command): Handle "monitor set debug-format".
8420 (gdbserver_usage): Mention --debug-format.
8421 (main): Parse --debug-format.
8422 * server.h (debug_threads): Declaration moved to debug.h.
8423 #include "debug.h".
8424 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8425 trace_debug_1 that uses debug_printf.
8426 (tracepoint_look_up_symbols): Update all debugging printfs to use
8427 debug_printf instead of fprintf.
8428
8429 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8430
8431 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8432 sys/ptrace.h.
8433
8434 2014-01-17 Pedro Alves <palves@redhat.com>
8435
8436 PR build/16445
8437 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8438 defined after including gdb_proc_service.h.
8439
8440 2014-01-16 Doug Evans <dje@google.com>
8441
8442 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8443 (match_dll): Use it.
8444
8445 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8446
8447 * target.h (target_ops) <read_btrace>: Change parameters and
8448 return type to allow error reporting.
8449 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8450 trace reading errors on.
8451 * linux-low.c (linux_low_read_btrace): Pass trace reading
8452 errors on.
8453 (linux_low_disable_btrace): New.
8454
8455 2014-01-15 Doug Evans <dje@google.com>
8456
8457 * inferiors.c (thread_id_to_gdb_id): Delete.
8458 * inferiors.h (thread_id_to_gdb_id): Delete.
8459
8460 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8461
8462 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8463 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8464 versions.
8465
8466 2014-01-08 Pedro Alves <palves@redhat.com>
8467
8468 * server.c (handle_status): Don't discard previous queued stop
8469 replies or thread's pending status here.
8470 (main) <disconnection>: Do it here instead.
8471
8472 2014-01-08 Pedro Alves <palves@redhat.com>
8473
8474 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8475 * server.c (visit_actioned_threads, handle_pending_status): New
8476 function.
8477 (handle_v_cont): Factor out parts to ...
8478 (resume): ... this new function. If in all-stop, and a thread
8479 being resumed has a pending status, report it without actually
8480 resuming.
8481 (myresume): Adjust to use the new 'resume' function.
8482 (clear_pending_status_callback, set_pending_status_callback)
8483 (find_status_pending_thread_callback): New functions.
8484 (handle_status): Handle the case of multiple threads having
8485 interesting statuses to report. Report threads' real last signal
8486 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8487 with an interesting thread to report the status for, instead of
8488 always reporting the status of the first thread.
8489
8490 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8491
8492 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8493 * gdbreplay.c (gdbreplay_version): Likewise.
8494
8495 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8496
8497 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8498 iov.iov_len with the real length in use.
8499
8500 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8501
8502 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8503 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8504 for all targets that use win32-low.c.
8505 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8506 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8507
8508 2013-12-13 Pedro Alves <palves@redhat.com>
8509
8510 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8511 if equal to TARGET_WAITKIND_LOADED.
8512 * win32-low.c (cached_status): New static global.
8513 (win32_wait): Add declaration.
8514 (do_initial_child_stuff): Flush all initial pending debug events
8515 up to the initial breakpoint.
8516 (win32_wait): If CACHED_STATUS was set, return that instead
8517 of doing a real wait. Remove the code resuming the execution
8518 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8519 during the initial phase. Also remove the code changing
8520 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8521 TARGET_WAITKIND_STOPPED.
8522
8523 2013-12-11 Yao Qi <yao@codesourcery.com>
8524
8525 * notif.c (handle_notif_ack): Return 0 if no notification
8526 matches.
8527
8528 2013-11-20 Doug Evans <dje@google.com>
8529
8530 * linux-low.c (linux_set_resume_request): Fix comment.
8531
8532 2013-11-20 Doug Evans <dje@google.com>
8533
8534 * linux-low.c (resume_status_pending_p): Tweak comment.
8535
8536 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8537
8538 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8539 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8540 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8541 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8542 (srv_amd64_regobj): Add amd64-mpx.o.
8543 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8544 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8545 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8546 * i387-fp.c (num_pl_bnd_register) Added constant.
8547 (num_pl_bnd_cfg_registers) Added constant.
8548 (struct i387_xsave) Added reserved area and MPX fields.
8549 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8550 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8551 function.
8552 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8553 (init_registers_amd64_mpx_linux): Declare new function.
8554 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8555 (x86_64_regmap): Add MPX registers.
8556 (x86_linux_read_description): Add MPX case.
8557 (initialize_low_arch): Initialize MPX targets.
8558
8559 2013-11-18 Tom Tromey <tromey@redhat.com>
8560
8561 * configure: Rebuild.
8562 * configure.ac: Don't check for stdlib.h.
8563 * gdbreplay.c: Unconditionally include stdlib.h.
8564
8565 2013-11-18 Tom Tromey <tromey@redhat.com>
8566
8567 * config.in: Rebuild.
8568 * configure: Rebuild.
8569 * configure.ac: Don't use AC_HEADER_DIRENT.
8570
8571 2013-11-18 Tom Tromey <tromey@redhat.com>
8572
8573 * server.h: Don't check HAVE_STRING_H.
8574 * gdbreplay.c: Don't check HAVE_STRING_H.
8575 * configure: Rebuild.
8576
8577 2013-11-18 Tom Tromey <tromey@redhat.com>
8578
8579 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8580 LIBGNU.
8581
8582 2013-11-08 Tom Tromey <tromey@redhat.com>
8583
8584 * configure, config.in: Rebuild.
8585 * configure.ac: Remove unused configury.
8586
8587 2013-11-08 Tom Tromey <tromey@redhat.com>
8588
8589 * acinclude.m4: Include common.m4, codeset.m4.
8590 * configure, config.in: Rebuild.
8591 * configure.ac: Use GDB_AC_COMMON.
8592
8593 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8594
8595 * linux-s390-low.c (HWCAP_S390_TE): New define.
8596 (s390_arch_setup): Consider the TE field in the HWCAP for
8597 determining 'have_regset_tdb'.
8598
8599 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8600
8601 PR gdb/16014
8602 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8603 call to sizeof.
8604
8605 2013-10-02 Pedro Alves <palves@redhat.com>
8606
8607 * server.c (process_serial_event): Don't output "GDBserver
8608 exiting" if GDB is connected through stdio.
8609 * target.c (mywait): Likewise, be silent if GDB is connected
8610 through stdio.
8611
8612 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8613
8614 * lynx-low.c (lynx_add_threads_after_attach): New function.
8615 (lynx_attach): Remove call to add_thread. Add call to
8616 lynx_add_threads_after_attach instead.
8617
8618 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8619
8620 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8621 * config.in, configure: Regenerated.
8622
8623 2013-09-18 Yao Qi <yao@codesourcery.com>
8624
8625 PR server/15959
8626 * server.c (start_inferior): Clear 'resume_info'.
8627
8628 2013-09-16 Jiong Wang <jiwang@tilera.com>
8629
8630 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8631 for each register.
8632
8633 2013-09-16 Jiong Wang <jiwang@tilera.com>
8634
8635 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8636 linux-tile-low.o to srv_tgtobj.
8637
8638 2013-09-16 Will Newton <will.newton@linaro.org>
8639
8640 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8641 out regs.
8642
8643 2013-09-06 Pedro Alves <palves@redhat.com>
8644
8645 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8646 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8647 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8648 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8649 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8650 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8651
8652 2013-09-06 Pedro Alves <palves@redhat.com>
8653
8654 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8655 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8656
8657 2013-09-06 Pedro Alves <palves@redhat.com>
8658
8659 * linux-amd64-ipa.c: Include tracepoint.h.
8660 * linux-i386-ipa.c: Include tracepoint.h.
8661
8662 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8663
8664 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8665 (ps_get_thread_area): New function.
8666
8667 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8668
8669 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8670 (initialize_low_arch): Call init_registers_crisv32 rather than
8671 init_register_crisv32.
8672
8673 2013-09-05 Pedro Alves <palves@redhat.com>
8674
8675 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8676 to ...
8677 * hostio.h: ... this new file.
8678 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8679 win32-low.c: Include hostio.h.
8680
8681 2013-09-05 Pedro Alves <palves@redhat.com>
8682
8683 * server.h (gdb_client_data, handler_func, callback_handler_func)
8684 (delete_file_handler, add_file_handler, append_callback_event)
8685 (delete_callback_event, start_event_loop, initialize_event_loop):
8686 Move to event-loop.h and include it.
8687 * event-loop.h: New file.
8688
8689 2013-09-05 Pedro Alves <palves@redhat.com>
8690
8691 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8692 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8693 (loaded_dll, unloaded_dll): Move to ...
8694 * dll.h: ... this new file.
8695 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8696
8697 2013-09-05 Pedro Alves <palves@redhat.com>
8698
8699 * server.h (current_process, get_thread_process, all_processes)
8700 (add_inferior_to_list, for_each_inferior, current_inferior)
8701 (remove_inferior, add_process, remove_process, find_process_pid)
8702 (have_started_inferiors_p, have_attached_inferiors_p)
8703 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8704 (clear_inferiors, find_inferior, find_inferior_id)
8705 (inferior_target_data, set_inferior_target_data)
8706 (inferior_regcache_data, set_inferior_regcache_data): Move to
8707 inferiors.h, and include it.
8708 * inferiors.h: New file.
8709
8710 2013-09-05 Pedro Alves <palves@redhat.com>
8711
8712 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8713 Move ...
8714 * ax.h: ... here.
8715
8716 2013-09-05 Pedro Alves <palves@redhat.com>
8717
8718 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8719 tracepoint.h.
8720 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8721 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8722 (handle_tracepoint_general_set, handle_tracepoint_query)
8723 (tracepoint_finished_step, tracepoint_was_hit)
8724 (release_while_stepping_state_list, current_traceframe)
8725 (in_readonly_region, traceframe_read_mem)
8726 (fetch_traceframe_registers, traceframe_read_sdata)
8727 (traceframe_read_info, struct fast_tpoint_collect_status)
8728 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8729 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8730 (supply_fast_tracepoint_registers)
8731 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8732 (ipa_tdesc, claim_trampoline_space)
8733 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8734 (agent_mem_read, agent_get_trace_state_variable_value)
8735 (agent_set_trace_state_variable_value, agent_tsv_read)
8736 (agent_mem_read_string, get_raw_reg_func_addr)
8737 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8738 * tracepoint.h: ... this new file.
8739
8740 2013-09-05 Pedro Alves <palves@redhat.com>
8741
8742 * server.h (perror_with_name, error, fatal, warning, paddress)
8743 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8744 include it.
8745 * utils.h: New file.
8746
8747 2013-09-05 Pedro Alves <palves@redhat.com>
8748
8749 * server.h (remote_debug, noack_mode, transport_is_reliable)
8750 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8751 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8752 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8753 (write_enn, initialize_async_io, enable_async_io)
8754 (disable_async_io, check_remote_input_interrupt_request)
8755 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8756 (dead_thread_notify, prepare_resume_reply)
8757 (decode_address_to_semicolon, decode_address, decode_m_packet)
8758 (decode_M_packet, decode_X_packet, decode_xfer_write)
8759 (decode_search_memory_packet, unhexify, hexify)
8760 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8761 (look_up_one_symbol, relocate_instruction)
8762 (monitor_output): Move to remote-utils.h, and include it.
8763 * remote-utils.h: New file.
8764
8765 2013-09-05 Pedro Alves <palves@redhat.com>
8766
8767 * server.h (_): Delete.
8768
8769 2013-09-02 Pedro Alves <palves@redhat.com>
8770
8771 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8772 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8773 allocated.
8774 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8775
8776 2013-09-02 Pierre Muller <muller@sourceware.org>
8777
8778 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8779 or WriteProcessMemory complete successfully and handle
8780 ERROR_PARTIAL_COPY error.
8781
8782 2013-09-02 Pedro Alves <palves@redhat.com>
8783
8784 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8785 error instead of EIO.
8786
8787 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8788
8789 PR server/15604
8790 * linux-low.c: Include filestuff.h.
8791 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8792 * lynx-low.c: Include filestuff.h.
8793 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8794 * server.c: Include filestuff.h.
8795 (main): Call notice_open_fds.
8796 * spu-low.c: Include filestuff.h.
8797 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8798
8799 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8800
8801 * Makefile.in: Explain why ../target and ../nat are not
8802 listed as include file search paths.
8803 (linux-waitpid.o): New object file rule.
8804 * configure.srv (srv_native_linux_obj): New variable.
8805 Replace all occurrences of linux native object files with
8806 $srv_native_linux_obj.
8807 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8808 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8809 (linux_enable_event_reporting): Remove declaration.
8810 (my_waitpid): Moved to common/linux-waitpid.c.
8811 (linux_wait_for_event): Pass ptid when calling
8812 linux_enable_event_reporting.
8813 (linux_supports_tracefork_flag): Remove.
8814 (linux_enable_event_reporting): Likewise.
8815 (linux_tracefork_grandchild): Remove.
8816 (STACK_SIZE): Moved to common/linux-ptrace.c.
8817 (linux_tracefork_child): Remove.
8818 (linux_test_for_tracefork): Remove.
8819 (linux_look_up_symbols): Call linux_supports_traceclone.
8820 (initialize_low): Remove call to linux_test_for_tracefork.
8821 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8822 common/linux-ptrace.h.
8823 (PTRACE_TYPE_ARG4): Likewise.
8824 Include linux-ptrace.h.
8825
8826 2013-08-21 Pedro Alves <palves@redhat.com>
8827
8828 * config.in: Renegerate.
8829
8830 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8831
8832 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8833 (SFILES): Remove $(srcdir)/common/target-common.c and
8834 add $(srcdir)/target/waitstatus.c.
8835 (OBS): Remove target-common.o and add waitstatus.o.
8836 (server_h): Remove $(srcdir)/../common/target-common.h and
8837 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8838 and $(srcdir)/../target/waitstatus.h.
8839 (target-common.o): Remove.
8840 (waitstatus.o): New target object file.
8841 * target.h: Do not include target-common.h and
8842 include target/resume.h, target/wait.h and
8843 target/waitstatus.h.
8844
8845 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8846
8847 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8848 to PTRACE_TYPE_ARG3.
8849 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8850 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8851 PTRACE_TYPE_ARG4.
8852 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8853 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8854
8855 2013-07-27 Jie Zhang <jie@codesourcery.com>
8856 Daniel Jacobowitz <dan@codesourcery.com>
8857 Yao Qi <yao@codesourcery.com>
8858
8859 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8860 (mips-linux-watch.o): New rule.
8861 (mips_linux_watch_h): New variable.
8862 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8863 srv_tgtobj.
8864 * linux-mips-low.c: Include mips-linux-watch.h.
8865 (struct arch_process_info, struct arch_lwp_info): New.
8866 (update_watch_registers_callback): New function.
8867 (mips_linux_new_process, mips_linux_new_thread) New functions.
8868 (mips_linux_prepare_to_resume, mips_insert_point): New
8869 functions.
8870 (mips_remove_point, mips_stopped_by_watchpoint): New
8871 functions.
8872 (rsp_bp_type_to_target_hw_bp_type): New function.
8873 (mips_stopped_data_address): New function.
8874 (the_low_target): Add watchpoint support functions.
8875
8876 2013-07-27 Yao Qi <yao@codesourcery.com>
8877
8878 * i386-low.c: Include break-common.h.
8879 (enum target_hw_bp_type): Remove.
8880
8881 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8882
8883 * Makefile.in (SFILES): /common/target-common.c.
8884 (OBS): Add target-common.o.
8885 (server_h): Add $(srcdir)/../common/target-common.h.
8886 (target-common.o): New target.
8887 * server.c (queue_stop_reply_callback): Free
8888 status string after use.
8889 * target.c (target_waitstatus_to_string): Remove.
8890 * target.h: Include target-common.h.
8891 (resume_kind): Likewise.
8892 (target_waitkind): Likewise.
8893 (target_waitstatus): Likewise.
8894 (TARGET_WNOHANG): Likewise.
8895
8896 2013-07-04 Yao Qi <yao@codesourcery.com>
8897
8898 * Makefile.in (host_alias): Use @host_noncanonical@.
8899 (target_alias): Use @target_noncanonical@.
8900 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8901 ACX_NONCANONICAL_HOST.
8902 * configure: Regenerated.
8903
8904 Revert:
8905 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8906
8907 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8908 * configure: Rebuild.
8909 * Makefile.in (version_host, version_target): Get from configure.
8910 (version.c): Use $(version_host) and $(version_target).
8911
8912 2013-07-03 Pedro Alves <palves@redhat.com>
8913
8914 * Makefile.in (config.status): Depend on development.sh.
8915 * acinclude.m4: Include libmcheck.m4.
8916 * configure: Regenerate.
8917
8918 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8919
8920 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8921 attribute inside the parentheses.
8922 (winapi_DebugSetProcessKillOnExit): Ditto.
8923 (winapi_DebugBreakProcess): Ditto.
8924 (winapi_GenerateConsoleCtrlEvent): Ditto.
8925
8926 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8927
8928 * notif.h (notif_event): Add a dummy member to avoid compiler
8929 errors.
8930
8931 2013-07-01 Pedro Alves <palves@redhat.com>
8932
8933 * hostio.c (HOSTIO_PATH_MAX): Define.
8934 (require_filename, handle_open, handle_unlink, handle_readlink):
8935 Use it.
8936
8937 2013-07-01 Pedro Alves <palves@redhat.com>
8938
8939 * server.h: Include "pathmax.h".
8940 * linux-low.c: Don't include sys/param.h.
8941 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8942 MAXPATHLEN.
8943 * win32-low.c: Don't include sys/param.h.
8944 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8945
8946 2013-07-01 Pedro Alves <palves@redhat.com>
8947
8948 * event-loop.c: Don't check HAVE_UNISTD_H before including
8949 <unistd.h>.
8950 * gdbreplay.c: Likewise.
8951 * remote-utils.c: Likewise.
8952 * server.c: Likewise.
8953 * configure.ac: Don't check for unistd.h.
8954 * configure: Regenerate.
8955
8956 2013-06-28 Tom Tromey <tromey@redhat.com>
8957
8958 * Makefile.in (version.c): Use version.in, not
8959 common/version.in.
8960
8961 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8962
8963 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8964 * configure: Rebuild.
8965 * Makefile.in (version_host, version_target): Get from configure.
8966 (version.c): Use $(version_host) and $(version_target).
8967
8968 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8969
8970 Fix trace-status to output user name without trailing colon.
8971 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8972
8973 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8974
8975 Fix trace-status to output proper start-time and stop-time.
8976 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8977 output start time and stop time in hex as gdb expects.
8978
8979 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8980
8981 * tracepoint.c (build_traceframe_info_xml): Output trace state
8982 variables present in the trace buffer.
8983
8984 2013-06-24 Tom Tromey <tromey@redhat.com>
8985
8986 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8987 create-version.sh.
8988 (version.o): Remove.
8989 * gdbreplay.c: Include version.h.
8990 (version, host_name): Don't declare.
8991 * server.h: Include version.h.
8992 (version, host_name): Don't declare.
8993
8994 2013-06-12 Pedro Alves <palves@redhat.com>
8995
8996 * linux-x86-low.c (linux_is_elf64): Delete global.
8997 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8998 with local linux_pid_exe_is_elf_64_file use.
8999
9000 2013-06-11 Pedro Alves <palves@redhat.com>
9001
9002 * linux-low.c (regset_disabled, disable_regset): New functions.
9003 (regsets_fetch_inferior_registers)
9004 (regsets_store_inferior_registers): Use them.
9005 (initialize_regsets_info); Don't allocate the disabled_regsets
9006 array here.
9007 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
9008 comment.
9009
9010 2013-06-11 Pedro Alves <palves@redhat.com>
9011
9012 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
9013 xmalloc.
9014
9015 2013-06-11 Pedro Alves <palves@redhat.com>
9016
9017 * linux-x86-low.c (initialize_low_arch): Call
9018 init_registers_x32_avx_linux.
9019
9020 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
9021
9022 Fix compatibility with Android Bionic.
9023 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
9024 it is not empty.
9025
9026 2013-06-07 Pedro Alves <palves@redhat.com>
9027
9028 PR server/14823
9029 * Makefile.in (OBS): Add tdesc.o.
9030 (IPA_OBJS): Add tdesc-ipa.o.
9031 (tdesc-ipa.o): New rule.
9032 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
9033 interface.
9034 * linux-low.c (new_inferior): Delete.
9035 (disabled_regsets, num_regsets): Delete.
9036 (linux_add_process): Adjust to set the new per-process
9037 new_inferior flag.
9038 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
9039 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
9040 was a stop. When calling arch_setup, switch the current inferior
9041 to the thread that got an event.
9042 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
9043 (regsets_fetch_inferior_registers)
9044 (regsets_store_inferior_registers): New regsets_info parameter.
9045 Adjust to use it.
9046 (linux_register_in_regsets): New regs_info parameter. Adjust to
9047 use it.
9048 (register_addr, fetch_register, store_register): New usrregs_info
9049 parameter. Adjust to use it.
9050 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
9051 parameter regs_info. Adjust to use it.
9052 (linux_fetch_registers): Get the current inferior's regs_info, and
9053 adjust to use it.
9054 (linux_store_registers): Ditto.
9055 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
9056 (initialize_low): Don't initialize the target_regsets here. Call
9057 initialize_low_arch.
9058 * linux-low.h (target_regsets): Delete declaration.
9059 (struct regsets_info): New.
9060 (struct usrregs_info): New.
9061 (struct regs_info): New.
9062 (struct process_info_private) <new_inferior>: New field.
9063 (struct linux_target_ops): Delete the num_regs, regmap, and
9064 regset_bitmap fields. New field regs_info.
9065 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
9066 * i387-fp.c (num_xmm_registers): Delete.
9067 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
9068 calls to new interface.
9069 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
9070 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
9071 Infer the number of xmm registers from the regcache's target
9072 description.
9073 * i387-fp.h (num_xmm_registers): Delete.
9074 * inferiors.c (add_thread): Don't install the thread's regcache
9075 here.
9076 * proc-service.c (gregset_info): Fetch the current inferior's
9077 regs_info. Adjust to use it.
9078 * regcache.c: Include tdesc.h.
9079 (register_bytes, reg_defs, num_registers)
9080 (gdbserver_expedite_regs): Delete.
9081 (get_thread_regcache): If the thread doesn't have a regcache yet,
9082 create one, instead of aborting gdbserver.
9083 (regcache_invalidate_one): Rename to ...
9084 (regcache_invalidate_thread): ... this.
9085 (regcache_invalidate_one): New.
9086 (regcache_invalidate): Only invalidate registers of the current
9087 process.
9088 (init_register_cache): Add target_desc parameter, and use it.
9089 (new_register_cache): Ditto. Assert the target description has a
9090 non zero registers_size.
9091 (regcache_cpy): Add assertions. Adjust.
9092 (realloc_register_cache, set_register_cache): Delete.
9093 (registers_to_string, registers_from_string): Adjust.
9094 (find_register_by_name, find_regno, find_register_by_number)
9095 (register_cache_size): Add target_desc parameter, and use it.
9096 (free_register_cache_thread, free_register_cache_thread_one)
9097 (regcache_release, register_cache_size): New.
9098 (register_size): Add target_desc parameter, and use it.
9099 (register_data, supply_register, supply_register_zeroed)
9100 (supply_regblock, supply_register_by_name, collect_register)
9101 (collect_register_as_string, collect_register_by_name): Adjust.
9102 * regcache.h (struct target_desc): Forward declare.
9103 (struct regcache) <tdesc>: New field.
9104 (init_register_cache, new_register_cache): Add target_desc
9105 parameter.
9106 (regcache_invalidate_thread): Declare.
9107 (regcache_invalidate_one): Delete declaration.
9108 (regcache_release): Declare.
9109 (find_register_by_number, register_cache_size, register_size)
9110 (find_regno): Add target_desc parameter.
9111 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9112 declarations.
9113 * remote-utils.c: Include tdesc.h.
9114 (outreg, prepare_resume_reply): Adjust.
9115 * server.c: Include tdesc.h.
9116 (gdbserver_xmltarget): Delete declaration.
9117 (get_features_xml, process_serial_event): Adjust.
9118 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9119 declare.
9120 (struct process_info) <tdesc>: New field.
9121 (ipa_tdesc): Declare.
9122 * tdesc.c: New file.
9123 * tdesc.h: New file.
9124 * tracepoint.c: Include tdesc.h.
9125 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9126 (get_context_regcache): Adjust to pass ipa_tdesc down.
9127 (do_action_at_tracepoint): Adjust to get the register cache size
9128 from the context regcache's description.
9129 (traceframe_walk_blocks): Adjust to get the register cache size
9130 from the current trace frame's description.
9131 (traceframe_get_pc): Adjust to get current trace frame's
9132 description and pass it down.
9133 (gdb_collect): Adjust to get the register cache size from the
9134 IPA's description.
9135 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9136 (gdbserver_xmltarget): Delete.
9137 (initialize_low_tracepoint): Set the ipa's target description.
9138 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9139 (initialize_low_tracepoint): Set the ipa's target description.
9140 * linux-x86-low.c: Include tdesc.h.
9141 [__x86_64__] (is_64bit_tdesc): New.
9142 (ps_get_thread_area, x86_get_thread_area): Use it.
9143 (i386_cannot_store_register): Rename to ...
9144 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9145 (i386_cannot_fetch_register): Rename to ...
9146 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9147 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9148 to new interface.
9149 (target_regsets): Rename to ...
9150 (x86_regsets): ... this.
9151 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9152 interface.
9153 (x86_siginfo_fixup): Use is_64bit_tdesc.
9154 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9155 (tdesc_x32_avx_linux, tdesc_x32_linux)
9156 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9157 Declare.
9158 (x86_linux_update_xmltarget): Delete.
9159 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9160 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9161 (AMD64_LINUX_USER64_CS): New.
9162 (x86_linux_read_description): New, based on
9163 x86_linux_update_xmltarget.
9164 (same_process_callback): New.
9165 (x86_arch_setup_process_callback): New.
9166 (x86_linux_update_xmltarget): New.
9167 (x86_regsets_info): New.
9168 (amd64_linux_regs_info): New.
9169 (i386_linux_usrregs_info): New.
9170 (i386_linux_regs_info): New.
9171 (x86_linux_regs_info): New.
9172 (x86_arch_setup): Reimplement.
9173 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9174 (x86_emit_ops): Ditto.
9175 (the_low_target): Adjust. Install x86_linux_regs_info,
9176 x86_cannot_fetch_register, and x86_cannot_store_register.
9177 (initialize_low_arch): New.
9178 * linux-ia64-low.c (tdesc_ia64): Declare.
9179 (ia64_fetch_register): Adjust.
9180 (ia64_usrregs_info, regs_info): New globals.
9181 (ia64_regs_info): New function.
9182 (the_low_target): Adjust.
9183 (initialize_low_arch): New function.
9184 * linux-sparc-low.c (tdesc_sparc64): Declare.
9185 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9186 Adjust.
9187 (sparc_arch_setup): New function.
9188 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9189 (the_low_target): Adjust.
9190 (initialize_low_arch): New function.
9191 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9192 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9193 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9194 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9195 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9196 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9197 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9198 (tdesc_powerpc_isa205_vsx64l): Declare.
9199 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9200 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9201 (ppc_set_pc, ppc_get_hwcap): Adjust.
9202 (ppc_usrregs_info): Forward declare.
9203 (!__powerpc64__) ppc_regmap_adjusted: New global.
9204 (ppc_arch_setup): Adjust to the current process'es target
9205 description.
9206 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9207 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9208 (ppc_store_evrregset): Adjust.
9209 (target_regsets): Rename to ...
9210 (ppc_regsets): ... this, and make static.
9211 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9212 (ppc_regs_info): New function.
9213 (the_low_target): Adjust.
9214 (initialize_low_arch): New function.
9215 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9216 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9217 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9218 (tdesc_s390x_linux64v2): Declare.
9219 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9220 (s390_fill_gregset, s390_store_last_break): Adjust.
9221 (target_regsets): Rename to ...
9222 (s390_regsets): ... this, and make static.
9223 (s390_get_pc, s390_set_pc): Adjust.
9224 (s390_get_hwcap): New target_desc parameter, and use it.
9225 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9226 (s390_arch_setup): Adjust to set the current process'es target
9227 description. Don't adjust the regmap.
9228 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9229 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9230 (regs_info_3264): New globals.
9231 (s390_regs_info): New function.
9232 (the_low_target): Adjust.
9233 (initialize_low_arch): New function.
9234 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9235 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9236 [__mips64] (init_registers_mips_linux)
9237 (init_registers_mips_dsp_linux): Delete defines.
9238 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9239 (have_dsp): New global.
9240 (mips_read_description): New, based on mips_arch_setup.
9241 (mips_arch_setup): Reimplement.
9242 (get_usrregs_info): New function.
9243 (mips_cannot_fetch_register, mips_cannot_store_register)
9244 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9245 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9246 (target_regsets): Rename to ...
9247 (mips_regsets): ... this, and make static.
9248 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9249 (dsp_regs_info, regs_info): New globals.
9250 (mips_regs_info): New function.
9251 (the_low_target): Adjust.
9252 (initialize_low_arch): New function.
9253 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9254 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9255 Declare.
9256 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9257 (arm_read_description): New, with bits factored from
9258 arm_arch_setup.
9259 (arm_arch_setup): Reimplement.
9260 (target_regsets): Rename to ...
9261 (arm_regsets): ... this, and make static.
9262 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9263 (arm_regs_info): New function.
9264 (the_low_target): Adjust.
9265 (initialize_low_arch): New function.
9266 * linux-m68k-low.c (tdesc_m68k): Declare.
9267 (target_regsets): Rename to ...
9268 (m68k_regsets): ... this, and make static.
9269 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9270 (m68k_regs_info): New function.
9271 (m68k_arch_setup): New function.
9272 (the_low_target): Adjust.
9273 (initialize_low_arch): New function.
9274 * linux-sh-low.c (tdesc_sharch): Declare.
9275 (target_regsets): Rename to ...
9276 (sh_regsets): ... this, and make static.
9277 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9278 (sh_regs_info, sh_arch_setup): New functions.
9279 (the_low_target): Adjust.
9280 (initialize_low_arch): New function.
9281 * linux-bfin-low.c (tdesc_bfin): Declare.
9282 (bfin_arch_setup): New function.
9283 (bfin_usrregs_info, regs_info): New globals.
9284 (bfin_regs_info): New function.
9285 (the_low_target): Adjust.
9286 (initialize_low_arch): New function.
9287 * linux-cris-low.c (tdesc_cris): Declare.
9288 (cris_arch_setup): New function.
9289 (cris_usrregs_info, regs_info): New globals.
9290 (cris_regs_info): New function.
9291 (the_low_target): Adjust.
9292 (initialize_low_arch): New function.
9293 * linux-cris-low.c (tdesc_crisv32): Declare.
9294 (cris_arch_setup): New function.
9295 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9296 (cris_regs_info): New function.
9297 (the_low_target): Adjust.
9298 (initialize_low_arch): New function.
9299 * linux-m32r-low.c (tdesc_m32r): Declare.
9300 (m32r_arch_setup): New function.
9301 (m32r_usrregs_info, regs_info): New globals.
9302 (m32r_regs_info): Adjust.
9303 (initialize_low_arch): New function.
9304 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9305 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9306 (tic6x_usrregs_info): Forward declare.
9307 (tic6x_read_description): New function, based on ...
9308 (tic6x_arch_setup): ... this. Reimplement.
9309 (target_regsets): Rename to ...
9310 (tic6x_regsets): ... this, and make static.
9311 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9312 (tic6x_regs_info): New function.
9313 (the_low_target): Adjust.
9314 (initialize_low_arch): New function.
9315 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9316 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9317 (target_regsets): Rename to ...
9318 (xtensa_regsets): ... this, and make static.
9319 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9320 globals.
9321 (xtensa_arch_setup, xtensa_regs_info): New functions.
9322 (the_low_target): Adjust.
9323 (initialize_low_arch): New function.
9324 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9325 (nios2_arch_setup): Set the current process'es tdesc.
9326 (target_regsets): Rename to ...
9327 (nios2_regsets): ... this.
9328 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9329 (nios2_regs_info): New function.
9330 (the_low_target): Adjust.
9331 (initialize_low_arch): New function.
9332 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9333 (aarch64_arch_setup): Set the current process'es tdesc.
9334 (target_regsets): Rename to ...
9335 (aarch64_regsets): ... this.
9336 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9337 (aarch64_regs_info): New function.
9338 (the_low_target): Adjust.
9339 (initialize_low_arch): New function.
9340 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9341 globals.
9342 (target_regsets): Rename to ...
9343 (tile_regsets): ... this.
9344 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9345 (tile_regs_info): New function.
9346 (tile_arch_setup): Set the current process'es tdesc.
9347 (the_low_target): Adjust.
9348 (initialize_low_arch): New function.
9349 * spu-low.c (tdesc_spu): Declare.
9350 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9351 * win32-arm-low.c (tdesc_arm): Declare.
9352 (arm_arch_setup): New function.
9353 (the_low_target): Install arm_arch_setup instead of
9354 init_registers_arm.
9355 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9356 (init_windows_x86): Rename to ...
9357 (i386_arch_setup): ... this. Set `win32_tdesc'.
9358 (the_low_target): Adjust.
9359 * win32-low.c (win32_tdesc): New global.
9360 (child_add_thread): Don't create the thread cache here.
9361 (do_initial_child_stuff): Set the new process'es tdesc.
9362 * win32-low.h (struct target_desc): Forward declare.
9363 (win32_tdesc): Declare.
9364 * lynx-i386-low.c (tdesc_i386): Declare global.
9365 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9366 * lynx-low.c (lynx_tdesc): New global.
9367 (lynx_add_process): Set the new process'es tdesc.
9368 * lynx-low.h (struct target_desc): Forward declare.
9369 (lynx_tdesc): Declare global.
9370 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9371 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9372 * nto-low.c (nto_tdesc): New global.
9373 (do_attach): Set the new process'es tdesc.
9374 * nto-low.h (struct target_desc): Forward declare.
9375 (nto_tdesc): Declare.
9376 * nto-x86-low.c (tdesc_i386): Declare.
9377 (nto_x86_arch_setup): Set `nto_tdesc'.
9378
9379 2013-06-04 Gary Benson <gbenson@redhat.com>
9380
9381 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9382 to qSupported response when appropriate.
9383 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9384 with nonzero-length annex.
9385 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9386 arguments supplied in annex.
9387
9388 2013-05-31 Doug Evans <dje@google.com>
9389
9390 PR server/15594
9391 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9392 64 bits in 64-cross-32 environment.
9393
9394 2013-05-28 Pedro Alves <palves@redhat.com>
9395
9396 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9397 (aarch64-without-fpu.c): Delete rule.
9398 * configure.srv (aarch64*-*-linux*): Remove references to
9399 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9400 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9401 declaration.
9402
9403 2013-05-24 Pedro Alves <palves@redhat.com>
9404
9405 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9406 instead of strchr/decode_address. Error if the range isn't split
9407 with a ','. Don't assume there's be a ':' in the action.
9408
9409 2013-05-23 Yao Qi <yao@codesourcery.com>
9410 Pedro Alves <palves@redhat.com>
9411
9412 * linux-low.c (lwp_in_step_range): New function.
9413 (linux_wait_1): If the thread was range stepping and stopped
9414 outside the stepping range, report the stop to GDB. Otherwise,
9415 continue stepping. Add range stepping debug output.
9416 (linux_set_resume_request): Copy the step range from the resume
9417 request to the lwp.
9418 (linux_supports_range_stepping): New.
9419 (linux_target_ops) <supports_range_stepping>: Set to
9420 linux_supports_range_stepping.
9421 * linux-low.h (struct linux_target_ops)
9422 <supports_range_stepping>: New field.
9423 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9424 * linux-x86-low.c (x86_supports_range_stepping): New.
9425 (the_low_target) <supports_range_stepping>: Set to
9426 x86_supports_range_stepping.
9427 * server.c (handle_v_cont): Handle 'r' action.
9428 (handle_v_requests): Append ";r" if the target supports range
9429 stepping.
9430 * target.h (struct thread_resume) <step_range_start,
9431 step_range_end>: New fields.
9432 (struct target_ops) <supports_range_stepping>:
9433 New field.
9434 (target_supports_range_stepping): New macro.
9435
9436 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9437
9438 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9439 confusion in comment.
9440
9441 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9442
9443 * lynx-low.c (struct process_info_private): New type.
9444 (lynx_add_process): New function.
9445 (lynx_create_inferior, lynx_attach): Replace calls to
9446 add_process by calls to lynx_add_process.
9447 (lynx_resume): If PTID is null, then try using
9448 current_process()->private->last_wait_event_ptid.
9449 Add comments.
9450 (lynx_clear_inferiors): Delete. The contents of that function
9451 has been inlined in lynx_mourn;
9452 (lynx_wait_1): Save the ptid in the process's private data.
9453 (lynx_mourn): Free the process' private data. Replace call
9454 to lynx_clear_inferiors by call to clear_inferiors.
9455
9456 2013-05-17 Yao Qi <yao@codesourcery.com>
9457
9458 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9459 the right place.
9460
9461 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9462
9463 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9464 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9465 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9466 PT_TEXT_END_ADDR guards. Update comments.
9467 (linux_target_op) <read_offsets>: Conditionally define to
9468 linux_read_offsets if the target is UCLIBC and if it defines
9469 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9470
9471 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9472 Andrew Jenner <andrew@codesourcery.com>
9473
9474 * Makefile.in (SFILES): Add linux-nios2-low.c.
9475 (clean): Add action to delete nios2-linux.c.
9476 (nios2-linux.c): New rule.
9477 * configure.srv: Add nios2*-*-linux*.
9478 * linux-nios2-low.c: New.
9479
9480 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9481
9482 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9483
9484 2013-04-25 Hui Zhu <hui@codesourcery.com>
9485
9486 PR gdb/15186
9487 * ax.c (ax_printf): Add fflush.
9488
9489 2013-04-22 Tom Tromey <tromey@redhat.com>
9490
9491 * Makefile.in (SFILES): Add filestuff.c.
9492 (OBS): Add filestuff.o.
9493 (filestuff.o): New target.
9494 * config.in, configure: Rebuild.
9495 * configure.ac: Check for fdwalk, pipe2.
9496
9497 2013-04-17 Pedro Alves <palves@redhat.com>
9498
9499 * configure.ac (USE_THREAD_DB): Delete variable.
9500 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9501 Don't AC_SUBST USE_THREAD_DB.
9502 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9503 * config.in, configure: Regenerate.
9504
9505 2013-04-16 Pedro Alves <palves@redhat.com>
9506
9507 * linux-low.h (struct lwp_info) <thread_known>: Move under
9508 the USE_THREAD_DB #ifdef.
9509
9510 2013-04-16 Pedro Alves <palves@redhat.com>
9511
9512 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9513 (linux-low.o): Delete rule.
9514 * linux-low.h: Always include "gdb_thread_db.h" instead of
9515 conditionally including thread_db.h.
9516 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9517 HAVE_THREAD_DB_H.
9518
9519 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9520
9521 * Makefile.in (install-only): Fix make install regression.
9522
9523 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9524
9525 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9526 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9527 installation.
9528 * gdbserver.1: Remove.
9529
9530 2013-03-22 Pedro Alves <palves@redhat.com>
9531
9532 * linux-low.c (handle_extended_wait): Don't call
9533 linux_enable_event_reporting.
9534
9535 2013-03-15 Tony Theodore <tonyt@logyst.com>
9536
9537 PR build/9098:
9538 * Makefile.in (SHELL): Use @SHELL@.
9539
9540 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9541
9542 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9543 compiler warning.
9544
9545 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9546
9547 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9548 Remove extraneous NULL element.
9549
9550 2013-03-13 Yao Qi <yao@codesourcery.com>
9551
9552 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9553 'V' block in trace frame.
9554
9555 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9556
9557 * target.h (struct target_ops): Add btrace ops.
9558 (target_supports_btrace): New macro.
9559 (target_enable_btrace): New macro.
9560 (target_disable_btrace): New macro.
9561 (target_read_btrace): New macro.
9562 * gdbthread.h (struct thread_info): Add btrace field.
9563 * server.c: Include btrace-common.h.
9564 (handle_btrace_general_set): New function.
9565 (handle_btrace_enable): New function.
9566 (handle_btrace_disable): New function.
9567 (handle_general_set): Call handle_btrace_general_set.
9568 (handle_qxfer_btrace): New function.
9569 (struct qxfer qxfer_packets[]): Add btrace entry.
9570 * inferiors.c (remove_thread): Disable btrace.
9571 * linux-low: Include linux-btrace.h.
9572 (linux_low_enable_btrace): New function.
9573 (linux_low_read_btrace): New function.
9574 (linux_target_ops): Add btrace ops.
9575 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9576 Add srv_linux_btrace=yes.
9577 (x86_64-*-linux*): Add linux-btrace.o.
9578 Add srv_linux_btrace=yes.
9579 * configure.ac: Define HAVE_LINUX_BTRACE.
9580 * config.in: Regenerated.
9581 * configure: Regenerated.
9582
9583 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9584
9585 * server.c (handle_qxfer): Preserve error message if -3 is
9586 returned.
9587 (qxfer): Document the -3 return value.
9588
9589 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9590
9591 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9592 (linux_btrace_h): New variable.
9593 (linux-btrace.o): New rule.
9594
9595 2013-03-08 Stan Shebs <stan@codesourcery.com>
9596 Hafiz Abid Qadeer <abidh@codesourcery.com>
9597
9598 * tracepoint.c (trace_buffer_size): New global.
9599 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9600 (init_trace_buffer): Change to one-argument function. Allocate
9601 trace buffer memory.
9602 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9603 handle QTBuffer:size packet.
9604 (cmd_bigqtbuffer_size): New function.
9605 (initialize_tracepoint): Call init_trace_buffer with
9606 DEFAULT_TRACE_BUFFER_SIZE.
9607 * server.c (handle_query): Add QTBuffer:size in the
9608 supported packets.
9609
9610 2013-03-07 Yao Qi <yao@codesourcery.com>
9611
9612 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9613 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9614 of -1.
9615 (cmd_qtsp): Adjust condition. Do post increment.
9616 Set cur_action and cur_step_action back to 0.
9617
9618 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9619
9620 PR server/15236
9621 * linux-low.c (linux_write_memory): Return early success if LEN is
9622 zero.
9623
9624 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9625
9626 * configure.srv: Add x86_64-*-cygwin* as target.
9627
9628 2013-02-28 Tom Tromey <tromey@redhat.com>
9629
9630 * configure.ac: Invoke AC_SYS_LARGEFILE.
9631 * configure, config.in: Rebuild.
9632
9633 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9634
9635 * win32-low.c: Throughout, fix format strings and casts of
9636 printf-like functions to avoid type related warnings on all
9637 platforms.
9638 (get_child_debug_event): Print dwDebugEventCode as hex since
9639 that's how it's usually documented.
9640
9641 2013-02-28 Yao Qi <yao@codesourcery.com>
9642
9643 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9644 pulongest.
9645
9646 2013-02-27 Jiong Wang <jiwang@tilera.com>
9647
9648 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9649 (reg-tilegx32.c): New rule.
9650 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9651 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9652 different register info initializer according to elf class.
9653 (init_registers_tilgx32): New function. The tilegx32 register info
9654 initializer.
9655 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9656 (tile_store_gregset): Likewise.
9657
9658 2013-02-27 Yao Qi <yao@codesourcery.com>
9659
9660 * server.c (process_point_options): Print debug message when
9661 debug_threads is true.
9662
9663 2013-02-26 Yao Qi <yao@codesourcery.com>
9664
9665 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9666
9667 2013-02-19 Pedro Alves <palves@redhat.com>
9668 Kai Tietz <ktietz@redhat.com>
9669
9670 PR gdb/15161
9671
9672 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9673 instead of strtoul to extract address from packet.
9674 (process_serial_event) <'z'>: Likewise.
9675
9676 2013-02-18 Yao Qi <yao@codesourcery.com>
9677
9678 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9679
9680 2013-02-14 Pedro Alves <palves@redhat.com>
9681
9682 Plug memory leak.
9683
9684 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9685 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9686
9687 2013-02-14 Pedro Alves <palves@redhat.com>
9688
9689 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9690
9691 2013-02-14 Pedro Alves <palves@redhat.com>
9692
9693 * tracepoint.c (save_string): Delete.
9694 (add_tracepoint_action): Use savestring instead of save_string.
9695
9696 2013-02-12 Pedro Alves <palves@redhat.com>
9697
9698 * linux-xtensa-low.c: Ditto.
9699 * xtensa-xtregs.c: Ditto.
9700
9701 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9702
9703 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9704 thread_db.
9705
9706 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9707
9708 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9709 aarch64_num_wp_regs and aarch64_num_bp_regs to
9710 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9711
9712 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9713
9714 * linux-aarch64-low.c (ps_get_thread_area): Replace
9715 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9716
9717 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9718 Marcus Shawcroft <marcus.shawcroft@arm.com>
9719 Nigel Stephens <nigel.stephens@arm.com>
9720 Yufeng Zhang <yufeng.zhang@arm.com>
9721
9722 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9723 (aarch64.c, aarch64-without-fpu.c): New targets.
9724 * configure.srv (aarch64*-*-linux*): New.
9725 * linux-aarch64-low.c: New file.
9726
9727 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9728
9729 * linux-low.c (handle_extended_wait, linux_create_inferior)
9730 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9731 (dequeue_one_deferred_signal, linux_resume_one_thread)
9732 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9733 (linux_tracefork_grandchild, linux_test_for_tracefork)
9734 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9735 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9736 where the argument is 0.
9737
9738 2013-01-25 Yao Qi <yao@codesourcery.com>
9739
9740 * event-loop.c: Include "queue.h".
9741 (gdb_event_p): New typedef.
9742 (struct gdb_event) <next_event>: Remove.
9743 (event_queue): Change to QUEUE(gdb_event_p).
9744 (async_queue_event): Remove.
9745 (gdb_event_xfree): New.
9746 (initialize_event_loop): New.
9747 (process_event): Use API from QUEUE.
9748 (wait_for_event): Likewise.
9749 * server.c (main): Call initialize_event_loop.
9750 * server.h (initialize_event_loop): Declare.
9751
9752 2013-01-18 Yao Qi <yao@codesourcery.com>
9753
9754 * ax.h (struct eval_agent_expr_context): New.
9755 (gdb_eval_agent_expr): Update declaration.
9756 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9757 TFRAME. Add new argument CTX.
9758 * server.h (struct eval_agent_expr_context): Declare.
9759 (agent_mem_read, agent_tsv_read): Update declaration.
9760 (agent_mem_read_string): Likewise.
9761 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9762 (add_traceframe_block): Add new argument TPOINT.
9763 Increase TPOINT->traceframe_usage.
9764 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9765 eval_tracepoint_agent_expr.
9766 (condition_true_at_tracepoint): Likewise.
9767 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9768 (agent_mem_read_string, agent_tsv_read): Likewise.
9769
9770 2013-01-16 Yao Qi <yao@codesourcery.com>
9771
9772 * linux-low.c (linux_resume_one_lwp): Don't check
9773 'lwp->bp_reinsert != 0'.
9774
9775 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9776 Pedro Alves <palves@redhat.com>
9777
9778 * lynx-low.c (ptrace_request_to_str): Define a temporary
9779 macro and use it to simplify this function's implementation.
9780
9781 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9782
9783 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9784 sets errno.
9785
9786 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9787
9788 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9789
9790 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9791
9792 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9793
9794 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9795
9796 * lynx-low.c (lynx_resume): Use the resume_info parameter
9797 to determine the ptid for the lynx_ptrace call, unless
9798 it is equal to minus_one_ptid, in which case we use the
9799 ptid of the current_inferior.
9800 (lynx_wait_1): After having received a thread create/exit
9801 event, resume the inferior's execution using the signaling
9802 thread's ptid, rather than the old ptid.
9803
9804 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9805
9806 * lynx-low.c (lynx_resume): Delete variable ret.
9807
9808 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9809
9810 * gdbreplay.c (gdbreplay_version): Update copyright year.
9811 * server.c (gdbserver_version): Likewise.
9812
9813 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9814
9815 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9816 new thread.
9817
9818 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9819
9820 * lynx-low.c (ptrace_request_to_str): Add handling for
9821 PTRACE_GETTRACESIG.
9822
9823 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9824
9825 * lynx-low.c (lynx_attach): Delete variable new_process.
9826
9827 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9828
9829 * lynx-low.c (lynx_create_inferior): Delete variable
9830 new_process.
9831
9832 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9833
9834 * lynx-low.c (ptrace_request_to_str): Do not handle
9835 PTRACE_GETTHREADLIST if this macro does not exist.
9836
9837 2012-12-15 Yao Qi <yao@codesourcery.com>
9838
9839 * Makefile.in (OBS): Add notif.o.
9840 * notif.c, notif.h: New.
9841 * server.c: Include "notif.h".
9842 (struct vstop_notif) <next>: Remove.
9843 <base>: New field.
9844 (queue_stop_reply): Update.
9845 (push_event, send_next_stop_reply): Remove.
9846 (discard_queued_stop_replies): Update.
9847 (notif_stop): New variable.
9848 (handle_v_stopped): Remove.
9849 (handle_v_requests): Don't call handle_v_stopped. Call
9850 handle_ack_notif instead.
9851 (queue_stop_reply_callback): Call notif_event_enque instead
9852 of queue_stop_reply.
9853 (handle_status): Don't call send_next_stop_reply, call
9854 notif_write_event instead.
9855 (kill_inferior_callback): Likewise.
9856 (detach_or_kill_inferior_callback): Likewise.
9857 (main): Call initialize_notif.
9858 (process_serial_event): Call QUEUE_is_empty.
9859 (handle_target_event): Call notif_push instead of push event.
9860 * server.h (push_event): Remove declaration.
9861
9862 2012-12-10 Tom Tromey <tromey@redhat.com>
9863
9864 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9865 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9866 macros.
9867 (.c.o): Rewrite.
9868 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9869 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9870 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9871 (amd64-linux-ipa.o, ax.o): Rewrite.
9872 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9873 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9874 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9875 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9876 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9877 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9878 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9879 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9880 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9881 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9882 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9883 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9884 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9885 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9886 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9887 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9888 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9889 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9890 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9891 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9892 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9893 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9894 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9895 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9896 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9897 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9898 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9899 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9900 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9901 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9902 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9903 (reg-tilegx.o): Remove.
9904 (all_object_files): New macro.
9905 Include .deps files.
9906 * aclocal.m4, configure: Rebuild.
9907 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9908 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9909 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9910
9911 2012-12-05 Tom Tromey <tromey@redhat.com>
9912
9913 PR gdb/14917:
9914 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9915
9916 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9917
9918 * configure.ac: Check for linux/perf_event.h.
9919 * config.in: Regenerated.
9920 * configure: Regenerated.
9921
9922 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9923
9924 * hostio.c (handle_readlink): Decrease buffer size
9925 parameter passed to readlink by one byte.
9926
9927 2012-11-26 Yao Qi <yao@codesourcery.com>
9928
9929 * configure.ac (build_warnings): Append '-Wempty-body'.
9930 * configure: Regenerated.
9931 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9932 body.
9933
9934 2012-11-15 Pierre Muller <muller@sourceware.org>
9935
9936 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9937 * config.in: Regenerate.
9938 * configure: Regenerate.
9939 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9940 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9941 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9942 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9943 header.
9944 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9945 instead of <sys/wait.h> header.
9946 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9947
9948 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9949
9950 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9951 (various make rules): Remove -DGDBSERVER
9952
9953 2012-11-09 Yao Qi <yao@codesourcery.com>
9954
9955 * spu-low.c (current_ptid): Move it to ..
9956 * gdbthread.h: ... here. New.
9957 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9958 * server.c (myresume, process_serial_event): Likewise.
9959 * thread-db.c (thread_db_find_new_threads): Likewise.
9960 * tracepoint.c (run_inferior_command): Likewise.
9961
9962 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9963
9964 * server.c (handle_search_memory_1): Include access length in
9965 warning message.
9966
9967 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9968
9969 * linux-crisv32-low.c: Fix compile errors.
9970
9971 2012-09-04 Yao Qi <yao@codesourcery.com>
9972
9973 * tracepoint.c (cmd_qtsv): Adjust debug message.
9974 Don't check CUR_TPOINT.
9975
9976 2012-08-28 Yao Qi <yao@codesourcery.com>
9977
9978 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9979 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9980 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9981 Remove declarations of xmalloc, xreallloc, xstrdup and
9982 freeargv.
9983 * Makefile.in (libiberty_h): New.
9984 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9985 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9986
9987 2012-08-23 Yao Qi <yao@codesourcery.com>
9988
9989 * server.h: Remove declaration of 'xsnprintf'.
9990
9991 2012-08-22 Keith Seitz <keiths@redhat.com>
9992
9993 * server.h: Include build-gnulib-gbserver/config.h.
9994 * gdbreplay.c: Likewise.
9995
9996 2012-08-08 Doug Evans <dje@google.com>
9997
9998 * Makefile.in (SFILES): Add gdb_vecs.c.
9999 (OBS): Add gdb_vecs.o.
10000 (gdb_vecs_h, host_defs_h): New variables.
10001 (thread-db.o): Add $(gdb_vecs_h) dependency.
10002 (gdb_vecs.o): New rule.
10003 * thread-db.c: #include "gdb_vecs.h".
10004 (thread_db_load_search): Use a vector to iterate over path elements.
10005 Handle text appearing after "$pdir".
10006
10007 * configure.ac: Add check for strstr.
10008 * config.in: Regenerate.
10009 * configure: Regenerate.
10010
10011 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
10012
10013 * hostio.c (handle_pread): If pread fails, fall back to attempting
10014 lseek/read.
10015 (handle_pwrite): Likewise for pwrite.
10016
10017 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
10018
10019 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
10020 between unsupported TYPE and unimplementable ADDR/LEN combination.
10021 (arm_insert_point): Act on new return value.
10022
10023 2012-07-31 Pedro Alves <palves@redhat.com>
10024
10025 * server.c (process_point_options): Only skip tokens if we find
10026 one that is unrecognized. Don't treat 'X' specially while
10027 skipping unrecognized tokens.
10028
10029 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
10030
10031 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
10032 to 4-byte-align HW breakpoint addresses for Thumb.
10033
10034 2012-07-27 Yao Qi <yao@codesourcery.com>
10035
10036 PR remote/14161.
10037
10038 * server.h: Declare gdb_agent_about_to_close.
10039 * target.c (kill_inferior): Include "agent.h".
10040 New. Send command 'kill'.
10041 * target.h (kill_inferior): Removed macro.
10042 * tracepoint.c (gdb_agent_about_to_close): New.
10043 (gdb_agent_helper_thread): Handle command 'close'.
10044 Wait endlessly until the inferior stops.
10045 Install gdb_agent_remove_socket to atexit hook.
10046 (agent_socket_name): New static variable.
10047 (gdb_agent_socket_init): Replace local variable 'name' with
10048 'agent_socket_name'.
10049 (gdb_agent_remove_socket): New.
10050
10051 2012-07-27 Yao Qi <yao@codesourcery.com>
10052
10053 * server.c (process_point_options): Stop at 'X' when parsing.
10054
10055 2012-07-19 Michael Eager <eager@eagercon.com>
10056
10057 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
10058 to hw_execute.
10059 * linux-x86-low.c (x86_insert_point, x86_remove_point):
10060 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
10061 hardware breakpoint.
10062
10063 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
10064
10065 * gdbserver/linux-low.c (initialize_low): Call
10066 linux_ptrace_init_warnings.
10067
10068 2012-07-02 Doug Evans <dje@google.com>
10069
10070 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
10071 pointer to int.
10072
10073 2012-07-02 Stan Shebs <stan@codesourcery.com>
10074
10075 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
10076 (ax.o): Add it to build rule.
10077 (ax-ipa.o): Ditto.
10078 (OBS): Add format.o.
10079 (IPA_OBS): Add format.o.
10080 * server.c (handle_query): Claim support for breakpoint commands.
10081 (process_point_options): Add command case.
10082 (process_serial_event): Leave running if there are printfs in
10083 effect.
10084 * mem-break.h (any_persistent_commands): Declare.
10085 (add_breakpoint_commands): Declare.
10086 (gdb_no_commands_at_breakpoint): Declare.
10087 (run_breakpoint_commands): Declare.
10088 * mem-break.c (struct point_command_list): New struct.
10089 (struct breakpoint): New field command_list.
10090 (any_persistent_commands): New function.
10091 (add_commands_to_breakpoint): New function.
10092 (add_breakpoint_commands): New function.
10093 (gdb_no_commands_at_breakpoint): New function.
10094 (run_breakpoint_commands): New function.
10095 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10096 locally.
10097 * ax.c: Include format.h.
10098 (ax_printf): New function.
10099 (gdb_eval_agent_expr): Add printf opcode.
10100
10101 2012-06-13 Yao Qi <yao@codesourcery.com>
10102
10103 * server.c (start_inferior): Remove duplicated writes to fields
10104 'last_resume_kind' and 'last_status' of 'current_inferior'.
10105
10106 2012-06-12 Yao Qi <yao@codesourcery.com>
10107 Pedro Alves <palves@redhat.com>
10108
10109 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10110 comment.
10111 * server.c (handle_v_cont): Extend comment.
10112
10113 2012-06-11 Yao Qi <yao@codesourcery.com>
10114
10115 * linux-low.c (linux_attach): Add 'static'.
10116
10117 2012-06-06 Yao Qi <yao@codesourcery.com>
10118
10119 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10120
10121 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10122
10123 Fix gcc -flto compilation warning.
10124 * server.c (main): Make variable multi_mode and attach volatile.
10125
10126 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10127
10128 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10129 if the platform doesn't know about it.
10130
10131 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10132
10133 * Makefile.in (SFILES): Add linux-tile-low.c.
10134 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10135 * configure.srv: Handle tilegx-*-linux*.
10136 * linux-tile-low.c: New file.
10137
10138 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10139
10140 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10141
10142 2012-05-24 Pedro Alves <palves@redhat.com>
10143
10144 PR gdb/7205
10145
10146 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10147
10148 2012-05-24 Pedro Alves <palves@redhat.com>
10149
10150 PR gdb/7205
10151
10152 Replace target_signal with gdb_signal throughout.
10153
10154 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10155
10156 * linux-low.c (linux_store_registers): Avoid the copying sequence
10157 when no data has been retrieved by ptrace.
10158
10159 2012-05-22 Will Deacon <will.deacon@arm.com>
10160
10161 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10162 Include asm/ptrace.h.
10163 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10164 already defined.
10165
10166 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10167
10168 * linux-low.c (linux_store_registers): Don't re-retrieve data
10169 with ptrace that has already been obtained from /proc. Always
10170 copy any data retrieved with ptrace to the buffer supplied.
10171
10172 2012-05-11 Yao Qi <yao@codesourcery.com>
10173 Pedro Alves <palves@redhat.com>
10174
10175 * linux-low.c (enum stopping_threads_kind): New.
10176 (stopping_threads): Change type to `enum stopping_threads_kind'.
10177 (handle_extended_wait): If stopping and suspending threads, leave
10178 the new_lwp suspended too.
10179 (linux_wait_for_event): Adjust.
10180 (stop_all_lwps): Set `stopping_threads' to
10181 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10182 whether we're suspending threads or just stopping them. Assert no
10183 recursion happens.
10184
10185 2012-04-29 Yao Qi <yao@codesourcery.com>
10186
10187 * server.h: Move some code to ...
10188 * gdbthread.h: ... here. New.
10189 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10190 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10191 (nto-low.o, win32-low.o): Likewise.
10192 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10193 * regcache.c, remote-utils.c, server.c: Likewise.
10194 * target.c, tracepoint.c, win32-low.c: Likewise.
10195
10196 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10197
10198 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10199 (PTRACE_ARG4_TYPE): Likewise.
10200 (PTRACE_XFER_TYPE): Likewise.
10201 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10202 ptrace to PTRACE_ARG3_TYPE.
10203 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10204 (PTRACE_ARG4_TYPE): Likewise.
10205 (PTRACE_XFER_TYPE): Likewise.
10206 (linux_detach_one_lwp): Cast fourth argument of
10207 ptrace to long then PTRACE_ARG4_TYPE.
10208 (regsets_fetch_inferior_registers): Cast third argument of
10209 ptrace to long then PTRACE_ARG3_TYPE.
10210 (regsets_store_inferior_registers): Likewise.
10211
10212 2012-04-20 Pedro Alves <palves@redhat.com>
10213
10214 * configure: Regenerate.
10215
10216 2012-04-19 Pedro Alves <palves@redhat.com>
10217
10218 * Makefile.in (GNULIB_BUILDDIR): New.
10219 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10220 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10221 (all, install-only, uninstall, clean-info, all-lib, clean): No
10222 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10223 (maintainer-clean realclean distclean): Use subdir_do.
10224 (subdir_do): New.
10225 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10226 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10227 * acinclude.m4: Include acx_configure_dir.m4.
10228 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10229 calls. Call AC_PROG_RANLIB. Configure gnulib using
10230 ACX_CONFIGURE_DIR.
10231 (GNULIB): New.
10232 (GNULIB_STDINT_H): Adjust.
10233 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10234 * gdbreplay.c: Include build-gnulib/config.h.
10235 * server.h: Likewise.
10236 * aclocal.m4: Regenerate.
10237 * config.in: Regenerate.
10238 * configure: Regenerate.
10239
10240 2012-04-19 Pedro Alves <palves@redhat.com>
10241
10242 * Makefile.in (LIBGNU, INCGNU): Adjust.
10243 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10244 (all, install-only, uninstall, clean-info, all-lib, clean)
10245 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10246 * configure.ac: Adjust AC_OUTPUT output.
10247 * aclocal.m4: Regenerate.
10248 * configure: Regenerate.
10249
10250 2012-04-19 Pedro Alves <palves@redhat.com>
10251
10252 * Makefile.in (generated_files): New.
10253 (server_h): Remove the explicit dependency on config.h, and depend
10254 on $generated_files.
10255
10256 2012-04-19 Pedro Alves <palves@redhat.com>
10257
10258 * Makefile.in (INCGNU): Add -Ignulib.
10259
10260 2012-04-19 Pedro Alves <palves@redhat.com>
10261
10262 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10263 (INCGNU): ... this, and spell out -I here.
10264 (GNULIB_LIB): Rename to ...
10265 (LIBGNU): ... this.
10266 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10267
10268 2012-04-19 Pedro Alves <palves@redhat.com>
10269
10270 * config.in: Regenerate.
10271
10272 2012-04-19 Pedro Alves <palves@redhat.com>
10273
10274 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10275 * server.h (memmem): Remove declaration.
10276 * config.in: Regenerate.
10277 * configure: Regenerate.
10278
10279 2012-04-19 Yao Qi <yao@codesourcery.com>
10280
10281 * Makefile.in (SFILES): Add common/vec.c.
10282 (OBS): Add vec.o.
10283 (vec.o): New rule.
10284
10285 2012-04-19 Yao Qi <yao@codesourcery.com>
10286
10287 * remote-utils.c (prepare_resume_reply): Replace with macro
10288 target_core_of_thread.
10289 * server.c (handle_qxfer_threads_proper): Likewise.
10290 * target.h (traget_core_of_thread): New macro.
10291
10292 2012-04-18 Pedro Alves <palves@redhat.com>
10293
10294 * aclocal.m4: Regenerate.
10295 * configure: Regenerate.
10296
10297 2012-04-16 Yao Qi <yao@codesourcery.com>
10298
10299 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10300 duplicated on address.
10301
10302 2012-04-16 Yao Qi <yao@codesourcery.com>
10303
10304 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10305 (struct tracepoint_action_ops) <send>: New field.
10306 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10307 (agent_expr_send, x_tracepoint_action_send): New.
10308 (l_tracepoint_action_send): New.
10309 (cmd_qtdp): Download and install tracepoint
10310 according to `use_agent'.
10311 (run_inferior_command): Add one more parameter `len'.
10312 Update callers.
10313 (tracepoint_send_agent): New.
10314 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10315
10316 2012-04-16 Yao Qi <yao@codesourcery.com>
10317
10318 * tracepoint.c (download_tracepoints): Moved to ...
10319 (cmd_qtstart): ... here.
10320
10321 2012-04-14 Yao Qi <yao@codesourcery.com>
10322
10323 * tracepoint.c: Include inttypes.h.
10324 (struct collect_memory_action): Use sized types.
10325 (struct tracepoint): Likewise.
10326 (cmd_qtdp, stop_tracing): Update print specifiers.
10327 (cmd_qtp, response_tracepoint): Likewise.
10328 (collect_data_at_tracepoint): Likewise.
10329 (collect_data_at_step): Likewise.
10330
10331 2012-04-14 Yao Qi <yao@codesourcery.com>
10332
10333 Import gnulib module inttypes.
10334 * aclocal.m4, config.in, configure: Regenerated.
10335
10336 2012-04-14 Yao Qi <yao@codesourcery.com>
10337
10338 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10339 Makefile and config.status at last.
10340
10341 2012-04-13 Yao Qi <yao@codesourcery.com>
10342
10343 * tracepoint.c: Include stdint.h unconditionally.
10344
10345 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10346
10347 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10348 on BFD_HAVE_SYS_PROCFS_TYPE.
10349 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10350 * configure: Regenerate.
10351 * config.in: Likewise.
10352
10353 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10354
10355 * Makefile.in (clean): Also remove x32.c x32-linux.c
10356 x32-avx.c x32-avx-linux.c.
10357 (x32.o): New target.
10358 (x32.c): Likewise.
10359 (x32-linux.o): Likewise.
10360 (x32-linux.c): Likewise.
10361 (x32-avx.o): Likewise.
10362 (x32-avx.c): Likewise.
10363 (x32-avx-linux.o): Likewise.
10364 (x32-avx-linux.c): Likewise.
10365
10366 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10367 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10368 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10369 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10370 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10371 i386/x32-avx-linux.xml.
10372
10373 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10374 (init_registers_x32_avx_linux): Likwise.
10375 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10376 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10377
10378 2012-04-13 Pedro Alves <palves@redhat.com>
10379
10380 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10381 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10382 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10383 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10384 the sub-make.
10385
10386 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10387
10388 * linux-x86-low.c (compat_x32_clock_t): New.
10389 (compat_x32_siginfo_t): Likewise.
10390 (compat_x32_siginfo_from_siginfo): Likewise.
10391 (siginfo_from_compat_x32_siginfo): Likewise.
10392 (linux_is_elf64): Likewise.
10393 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10394 and siginfo_from_compat_x32_siginfo for x32.
10395 (x86_arch_setup): Set linux_is_elf64.
10396
10397 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10398
10399 PR gdb/13969
10400 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10401 e_machine field.
10402 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10403 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10404 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10405 compatible with process.
10406
10407 2012-04-12 Yao Qi <yao@codesourcery.com>
10408
10409 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10410 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10411 (install-only, install-info, clean): Handle sub dir gnulib.
10412 (all-lib, am--refresh): New targets.
10413 (memmem.o): Remove target.
10414 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10415 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10416 (AC_REPLACE_FUNCS): Remove memmem.
10417 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10418 (AC_OUTPUT): Generate Makefile in gnulib/.
10419 * aclocal.m4, config.in, configure: Regenerated.
10420
10421 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10422
10423 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10424
10425 2012-04-05 Pedro Alves <palves@redhat.com>
10426
10427 -Werror=strict-aliasing
10428
10429 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10430 pointer.
10431
10432 2012-04-04 Pedro Alves <palves@redhat.com>
10433
10434 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10435 (sparc_store_gregset_from_stack, sparc_store_gregset)
10436 (sparc_breakpoint_at): Fix formatting.
10437
10438 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10439
10440 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10441 are available.
10442 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10443 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10444 * config.in: Regenerate.
10445 * configure: Likewise.
10446
10447 2012-03-29 Pedro Alves <palves@redhat.com>
10448
10449 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10450 Correct ptrace arguments.
10451
10452 2012-03-28 Pedro Alves <palves@redhat.com>
10453
10454 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10455 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10456 (IA64_FR1_REGNUM): New defines.
10457 (ia64_fetch_register): New.
10458 (the_low_target): Install it.
10459 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10460 field.
10461 * linux-low.c (linux_fetch_registers): Try the
10462 the_low_target.fetch_register hook first.
10463
10464 * linux-arm-low.c (the_low_target): Adjust.
10465 * linux-bfin-low.c (the_low_target): Adjust.
10466 * linux-cris-low.c (the_low_target): Adjust.
10467 * linux-crisv32-low.c (the_low_target): Adjust.
10468 * linux-m32r-low.c (the_low_target): Adjust.
10469 * linux-m68k-low.c (the_low_target): Adjust.
10470 * linux-mips-low.c (the_low_target): Adjust.
10471 * linux-ppc-low.c (the_low_target): Adjust.
10472 * linux-s390-low.c (the_low_target): Adjust.
10473 * linux-sh-low.c (the_low_target): Adjust.
10474 * linux-sparc-low.c (the_low_target): Adjust.
10475 * linux-tic6x-low.c (the_low_target): Adjust.
10476 * linux-x86-low.c (the_low_target): Adjust.
10477 * linux-xtensa-low.c (the_low_target): Adjust.
10478
10479 2012-03-26 Pedro Alves <palves@redhat.com>
10480
10481 * server.c (handle_qxfer_libraries): Don't bail early if
10482 the_target->qxfer_libraries_svr4 is not NULL.
10483
10484 2012-03-26 Pedro Alves <palves@redhat.com>
10485
10486 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10487
10488 2012-03-23 Pedro Alves <palves@redhat.com>
10489
10490 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10491 "library-list-svr4" element's start tag when the the DSO list is
10492 empty.
10493
10494 2012-03-23 Pedro Alves <palves@redhat.com>
10495
10496 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10497 a variable whose type size is the same as the inferior's pointer
10498 size.
10499
10500 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10501
10502 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10503 struct siginfo.
10504 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10505 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10506 * linux-low.h: Include <signal.h>.
10507 (struct siginfo): Remove forward declaration.
10508 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10509 struct siginfo.
10510
10511 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10512
10513 * .gitignore: Ignore more files.
10514
10515 2012-03-19 Pedro Alves <palves@redhat.com>
10516 Jan Kratochvil <jan.kratochvil@redhat.com>
10517
10518 * server.c (cont_thread, general_thread): Add describing comments.
10519 (start_inferior): Clear `cont_thread'.
10520 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10521 of a process.
10522
10523 2012-03-15 Yao Qi <yao@codesourcery.com>
10524
10525 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10526 handling to ...
10527 (cmd_qtdp): ... here.
10528
10529 2012-03-15 Yao Qi <yao@codesourcery.com>
10530
10531 * tracepoint.c (struct tracepoint_action_ops): New.
10532 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10533 (m_tracepoint_action_download): New.
10534 (r_tracepoint_action_download): New.
10535 (x_tracepoint_action_download): New.
10536 (l_tracepoint_action_download): New.
10537 (add_tracepoint_action): Install `action->ops' according type.
10538 (download_tracepoint_1): Move code `download' function pointer
10539 of various tracepoint_action_ops.
10540
10541 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10542
10543 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10544 linux_ptrace_attach_warnings.
10545
10546 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10547
10548 * Makefile.in (linux-ptrace.o): New.
10549 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10550 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10551 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10552 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10553 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10554 of these targets.
10555 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10556
10557 2012-03-08 Yao Qi <yao@codesourcery.com>
10558 Pedro Alves <palves@redhat.com>
10559
10560 Fix PR server/13392.
10561 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10562 offset of JMP insn.
10563 * tracepoint.c (remove_tracepoint): New.
10564 (cmd_qtdp): Call remove_tracepoint when failed to install.
10565
10566 2012-03-07 Pedro Alves <palves@redhat.com>
10567
10568 * linux-low.c (get_detach_signal): New.
10569 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10570 Pass on pending signals to PTRACE_DETACH. Check the result of the
10571 ptrace call.
10572 * server.c (program_signals, program_signals_p): New.
10573 (handle_general_set): Handle QProgramSignals.
10574 * server.h (program_signals, program_signals_p): Declare.
10575
10576 2012-03-05 Pedro Alves <palves@redhat.com>
10577 Jan Kratochvil <jan.kratochvil@redhat.com>
10578
10579 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10580 New comment why.
10581
10582 2012-03-03 Yao Qi <yao@codesourcery.com>
10583
10584 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10585 agent_look_up_symbols.
10586
10587 2012-03-03 Yao Qi <yao@codesourcery.com>
10588
10589 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10590 (linux-x86-low.o): Likewise.
10591 * server.h: Remove in_process_agent_loaded.
10592 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10593 common/agent.c.
10594 Update callers.
10595
10596 2012-03-03 Yao Qi <yao@codesourcery.com>
10597
10598 * tracepoint.c (gdb_agent_capability): New global.
10599 (in_process_agent_loaded_ust): Renamed to
10600 `in_process_agent_supports_ust'.
10601 Update callers.
10602 (in_process_agent_supports_ust): Call agent_capability_check.
10603 (clear_installed_tracepoints): Assert that agent supports
10604 agent.
10605
10606 2012-03-03 Yao Qi <yao@codesourcery.com>
10607
10608 * linux-low.c (linux_supports_agent): New.
10609 (linux_target_ops): Initialize field `supports_agent' with
10610 linux_supports_agent.
10611 * target.h (struct target_ops) <supports_agent>: New.
10612 (target_supports_agent): New macro.
10613 * server.c (handle_general_set): Handle packet 'QAgent'.
10614 (handle_query): Send `QAgent+'.
10615 * Makefile.in (server.o): Depends on agent.h.
10616
10617 2012-03-03 Yao Qi <yao@codesourcery.com>
10618
10619 * Makefile.in (OBS): Add agent.o.
10620 Add new rule for agent.o.
10621 Track dependence of tracepoint.c on agent.h.
10622 * tracepoint.c (run_inferior_command_1):
10623 (run_inferior_command): Call agent_run_command.
10624 (gdb_ust_connect_sync_socket): Deleted. Move it to
10625 common/agent.c.
10626 (resume_thread, stop_thread): Likewise.
10627 (gdb_ust_socket_init): Renamed to ...
10628 (gdb_agent_socket_init): ... New.
10629 (gdb_ust_thread): Renamed to ...
10630 (gdb_agent_helper_thread): ... New.
10631 (gdb_ust_init): Move some code to ...
10632 (gdb_agent_init): ... here. New.
10633 [HAVE_UST]: Call gdb_ust_init.
10634 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10635 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10636 * config.in, configure: Regenerated.
10637
10638 2012-03-02 Pedro Alves <palves@redhat.com>
10639
10640 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10641 * linux-low.c (struct simple_pid_list): New.
10642 (stopped_pids): New a struct simple_pid_list pointer.
10643 (add_to_pid_list, pull_pid_from_list): New.
10644 (handle_extended_wait): Don't assume the first signal new children
10645 report is SIGSTOP. Adjust call to pull_pid_from_list.
10646 (linux_wait_for_lwp): Adjust.
10647
10648 2012-03-02 Yao Qi <yao@codesourcery.com>
10649
10650 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10651 debug log.
10652
10653 2012-03-02 Yao Qi <yao@codesourcery.com>
10654
10655 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10656 `stop_pc' and `tpoint'. Update caller.
10657
10658 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10659
10660 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10661 * linux-low.c (use_linux_regsets): New macro.
10662 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10663 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10664 (linux_register_in_regsets): New function.
10665 (usr_fetch_inferior_registers): Skip registers covered by
10666 regsets.
10667 (usr_store_inferior_registers): Likewise.
10668 (usr_fetch_inferior_registers): New macro.
10669 (usr_store_inferior_registers): Likewise.
10670 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10671 (linux_store_registers): Likewise.
10672 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10673 prototype.
10674 (init_registers_mips64_dsp_linux): Likewise.
10675 (init_registers_mips_linux): New macro.
10676 (init_registers_mips_dsp_linux): Likewise.
10677 (mips_dsp_num_regs): Likewise.
10678 (DSP_BASE, DSP_CONTROL): New fallback macros.
10679 (mips_base_regs): New macro.
10680 (mips_regmap): Use it. Fix the size.
10681 (mips_dsp_regmap): New variable.
10682 (mips_dsp_regset_bitmap): Likewise.
10683 (mips_arch_setup): New function.
10684 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10685 than mips_regmap.
10686 (mips_cannot_store_register): Likewise.
10687 (the_low_target): Update .arch_setup, .num_regs and .regmap
10688 initializers. Add .regset_bitmap initializer.
10689 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10690 initializer.
10691 * linux-bfin-low.c (the_low_target): Likewise.
10692 * linux-cris-low.c (the_low_target): Likewise.
10693 * linux-crisv32-low.c (the_low_target): Likewise.
10694 * linux-ia64-low.c (the_low_target): Likewise.
10695 * linux-m32r-low.c (the_low_target): Likewise.
10696 * linux-m68k-low.c (the_low_target): Likewise.
10697 * linux-ppc-low.c (the_low_target): Likewise.
10698 * linux-s390-low.c (the_low_target): Likewise.
10699 * linux-sh-low.c (the_low_target): Likewise.
10700 * linux-sparc-low.c (the_low_target): Likewise.
10701 * linux-tic6x-low.c (the_low_target): Likewise.
10702 * linux-x86-low.c (the_low_target): Likewise.
10703 * linux-xtensa-low.c (the_low_target): Likewise.
10704 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10705 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10706 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10707 srv_xmlfiles.
10708 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10709 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10710
10711 2012-02-29 Yao Qi <yao@codesourcery.com>
10712 Pedro Alves <palves@redhat.com>
10713
10714 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10715 `step_over_finished' is true.
10716
10717 2012-02-27 Pedro Alves <palves@redhat.com>
10718
10719 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10720 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10721
10722 2012-02-27 Pedro Alves <palves@redhat.com>
10723
10724 PR server/9684
10725 * linux-low.c (pid_is_stopped): New.
10726 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10727
10728 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10729
10730 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10731 of conditions.
10732
10733 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10734
10735 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10736
10737 2012-02-24 Luis Machado <lgustavo@codesourcery>
10738
10739 * server.c (handle_query): Advertise support for target-side
10740 breakpoint condition evaluation.
10741 (process_point_options): New function.
10742 (process_serial_event): When inserting a breakpoint, check for
10743 a target-side condition that should be evaluated.
10744
10745 * mem-break.c: Include regcache.h and ax.h.
10746 (point_cond_list_t): New data structure.
10747 (breakpoint) <cond_list>: New field.
10748 (find_gdb_breakpoint_at): Make non-static.
10749 (delete_gdb_breakpoint_at): Clear any target-side
10750 conditions.
10751 (clear_gdb_breakpoint_conditions): New function.
10752 (add_condition_to_breakpoint): Likewise.
10753 (add_breakpoint_condition): Likewise.
10754 (gdb_condition_true_at_breakpoint): Likewise.
10755 (gdb_breakpoint_here): Return result directly instead
10756 of going through a local variable.
10757
10758 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10759 (clear_gdb_breakpoint_conditions): Likewise.
10760 (add_breakpoint_condition): Likewise.
10761 (gdb_condition_true_at_breakpoint): Likewise.
10762
10763 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10764 (need_step_over_p): Take target-side breakpoint condition into
10765 consideration.
10766
10767 2012-02-24 Luis Machado <lgustavo@codesourcery>
10768
10769 * server.h: Include tracepoint.h.
10770 (agent_mem_read, agent_get_trace_state_variable_value,
10771 agent_set_trace_state_variable_value,
10772 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10773 get_set_tsv_func_addr): New prototypes.
10774
10775 * ax.h: New include file.
10776 * ax.c: New source file.
10777
10778 * tracepoint.c: Include ax.h.
10779 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10780 agent_expr, eval_result_type): Move to ax.h.
10781 (parse_agent_expr): Rename to ...
10782 (gdb_parse_agent_expr): ... this, make it non-static and move
10783 to ax.h.
10784 (unparse_agent_expr) Rename to ...
10785 (gdb_unparse_agent_expr): ... this, make it non-static and move
10786 to ax.h.
10787 (eval_agent_expr): Rename to ...
10788 (eval_tracepoint_agent_expr): ... this.
10789 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10790 forward declarations.
10791 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10792 (agent_get_trace_state_variable_value): New function.
10793 (agent_set_trace_state_variable_value): New function.
10794 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10795 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10796 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10797 (condition_true_at_tracepoint): Likewise.
10798 (parse_agent_expr): Rename to ...
10799 (gdb_parse_agent_expr): ... this and move to ax.c.
10800 (unparse_agent_expr): Rename to ...
10801 (gdb_unparse_agent_expr): ... this and move to ax.c.
10802 (gdb_agent_op_name): Move to ax.c.
10803 (eval_agent_expr): Rename to ...
10804 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10805 and move to ax.c.
10806 (eval_tracepoint_agent_expr): New function.
10807 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10808 non-static.
10809 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10810 ax.c.
10811 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10812 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10813 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10814 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10815 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10816 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10817 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10818 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10819 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10820 (compile_bytecodes): Remove forward declaration.
10821 (is_goto_target): Move to ax.c.
10822 (compile_bytecodes): Move to ax.c and call
10823 agent_get_trace_state_variable_value (...) and
10824 agent_set_trace_state_variable_value (...).
10825
10826 * Makefile.in: Update ax.c and IPA dependencies.
10827
10828 2012-02-24 Pedro Alves <palves@redhat.com>
10829
10830 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10831 (cmd_bigqtbuffer_circular): ... this. Only handle
10832 'QTBuffer:circular:'.
10833 (handle_tracepoint_general_set): Adjust.
10834
10835 2012-02-16 Yao Qi <yao@codesourcery.com>
10836
10837 * inferiors.c: Move code to ...
10838 * dll.c: .... here. New.
10839 * server.h: Declare clear_dlls.
10840 * Makefile.in (SFILES): Add dll.c.
10841 (OBS): Add dll.o
10842 (dll.o): New rule.
10843
10844 2012-02-11 Yao Qi <yao@codesourcery.com>
10845
10846 * server.c: (handle_monitor_command): Add a new parameter
10847 `own_buf'.
10848 (handle_query): Update caller.
10849
10850 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10851
10852 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10853 * configure, config.in: Regenerate.
10854 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10855 is not defined.
10856
10857 2012-02-02 Pedro Alves <palves@redhat.com>
10858
10859 Try SIGKILL first, then PTRACE_KILL.
10860 * linux-low.c (linux_kill_one_lwp): New.
10861 (linux_kill_one_lwp): Rename to ...
10862 (kill_one_lwp_callback): ... this. Use the new
10863 linux_kill_one_lwp.
10864
10865 2012-02-02 Pedro Alves <palves@redhat.com>
10866
10867 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10868 inferior.
10869
10870 2012-01-27 Pedro Alves <palves@redhat.com>
10871
10872 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10873 (elf_64_file_p): Make static.
10874 (linux_pid_exe_is_elf_64_file): New.
10875 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10876 Delete declarations.
10877 (linux_pid_exe_is_elf_64_file): Declare.
10878 * linux-x86-low.c (x86_arch_setup): Use
10879 linux_pid_exe_is_elf_64_file.
10880
10881 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10882
10883 * linux-low.c (linux_wait_for_event_1): Rename to ...
10884 (linux_wait_for_event): ... here and merge it with former
10885 linux_wait_for_event - new variable wait_ptid, use it.
10886 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10887
10888 2012-01-23 Pedro Alves <palves@redhat.com>
10889
10890 * server.c (main): Avoid yet another case of infinite loop while
10891 detaching/killing after a longjmp.
10892
10893 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10894
10895 Code cleanup.
10896 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10897
10898 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10899
10900 * hostio.c (handle_readlink): New function.
10901 (handle_vFile): Call it to handle "vFile:readlink" packets.
10902
10903 2012-01-20 Pedro Alves <palves@redhat.com>
10904 Ulrich Weigand <ulrich.weigand@linaro.org>
10905
10906 * server.c (handle_v_requests): Only support vAttach and vRun to
10907 start multiple processes when in extended protocol mode.
10908
10909 2012-01-17 Pedro Alves <palves@redhat.com>
10910
10911 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10912 memalign plus mprotect to allocate the scratch buffer.
10913
10914 2012-01-13 Pedro Alves <palves@redhat.com>
10915
10916 * server.c (attach_inferior): Clear `cont_thread'.
10917
10918 2012-01-13 Pedro Alves <palves@redhat.com>
10919
10920 * server.c (main): Avoid infinite loop while detaching/killing
10921 after a longjmp.
10922
10923 2012-01-09 Doug Evans <dje@google.com>
10924
10925 * server.c (start_inferior): Set last_ptid in --wrapper case.
10926
10927 2012-01-06 Yao Qi <yao@codesourcery.com>
10928
10929 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10930 defined.
10931 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10932
10933 2012-01-04 Yao Qi <yao@codesourcery.com>
10934
10935 * tracepoint.c (cmd_qtdp): Print debug message
10936 for static tracepoint.
10937
10938 2012-01-04 Yao Qi <yao@codesourcery.com>
10939
10940 * tracepoint.c (trace_vdebug): Differentiate debug message
10941 between gdbserver and IPA.
10942
10943 2012-01-03 Yao Qi <yao@codesourcery.com>
10944
10945 * tracepoint.c (tracepoint_was_hit): Don't collect for
10946 static tracepoint.
10947
10948 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10949
10950 * terminal.h: Reformat copyright header.
10951
10952 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10953
10954 * server.c (gdbserver_version): Update copyright year.
10955 * gdbreplay.c (gdbreplay_version): Likewise.
10956
10957 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10958
10959 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10960
10961 Revert:
10962 2011-12-18 Hui Zhu <teawater@gmail.com>
10963 * linux-low.c (linux_create_inferior): Save return value to ret.
10964
10965 2011-12-18 Hui Zhu <teawater@gmail.com>
10966
10967 * linux-low.c (linux_create_inferior): Save return value to ret.
10968
10969 2011-12-16 Doug Evans <dje@google.com>
10970
10971 * linux-low.c (linux_create_inferior): If stdio connection,
10972 redirect stdin from /dev/null, stdout to stderr.
10973 * remote-utils.c (remote_is_stdio): New static global.
10974 (remote_connection_is_stdio): New function.
10975 (remote_prepare): Handle stdio connection.
10976 (remote_open): Ditto.
10977 (remote_close): Don't close stdin for stdio connections.
10978 (read_prim,write_prim): New functions. Replace all calls to
10979 read/write to these.
10980 * server.c (main): Watch for "-" argument. Move call to
10981 remote_prepare before start_inferior.
10982 * server.h (STDIO_CONNECTION_NAME): New macro.
10983 (remote_connection_is_stdio): Declare.
10984
10985 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10986 in debugging output.
10987
10988 2011-12-15 Yao Qi <yao@codesourcery.com>
10989
10990 * tracepoint.c: Include sys/syscall.h.
10991 (gdb_ust_thread): Remove preprocessor conditional.
10992
10993 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10994
10995 * linux-low.c (linux_detach_one_lwp): Call
10996 the_low_target.prepare_to_resume before detaching.
10997
10998 2011-12-14 Yao Qi <yao@codesourcery.com>
10999
11000 * tracepoint.c (gdb_ust_thread): Don't ignore return value
11001 of write.
11002
11003 2011-12-14 Yao Qi <yao@codesourcery.com>
11004
11005 * i386-low.c (i386_low_stopped_data_address): Initialize local
11006 variable `control'.
11007
11008 2011-12-13 Pedro Alves <pedro@codesourcery.com>
11009
11010 PR remote/13492
11011
11012 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
11013 DR_CONTROL unless necessary. Extend comments.
11014 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
11015 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
11016
11017 2011-12-13 Yao Qi <yao@codesourcery.com>
11018
11019 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
11020 macros.
11021 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
11022
11023 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
11024
11025 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
11026 Print new debug message for such case.
11027
11028 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11029
11030 Fix overlapping memcpy.
11031 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
11032 the read_inferior_memory transfer.
11033 (delete_fast_tracepoint_jump): New variable buf. Use it for the
11034 write_inferior_memory transfer.
11035 (set_fast_tracepoint_jump): New variable buf. Use it for the
11036 read_inferior_memory and write_inferior_memory transfers.
11037 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
11038 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
11039 Use it for the write_inferior_memory transfer.
11040 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
11041 buffers.
11042
11043 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11044
11045 * linux-low.c (fetch_register, store_register): Make code
11046 consistent, fix formatting.
11047
11048 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
11049
11050 * linux-low.c (usr_store_inferior_registers): Factor out code
11051 to handle individual registers into...
11052 (store_register): ... this new function.
11053
11054 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
11055
11056 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
11057 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
11058 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
11059 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
11060 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
11061 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
11062 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
11063 (srv_xmlfiles): Add new XML files.
11064
11065 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
11066 and <sys/uio.h>.
11067 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
11068 (init_registers_s390_linux32v1): Add prototype.
11069 (init_registers_s390_linux32v2): Likewise.
11070 (init_registers_s390_linux64v1): Likewise.
11071 (init_registers_s390_linux64v2): Likewise.
11072 (init_registers_s390x_linux64v1): Likewise.
11073 (init_registers_s390x_linux64v2): Likewise.
11074 (s390_num_regs): Increment to 52.
11075 (s390_regmap): Add orig_r2 register.
11076 (s390_num_regs_3264): Increment to 68.
11077 (s390_regmap_3264): Add orig_r2 register.
11078 (s390_collect_ptrace_register): Handle orig_r2 register.
11079 (s390_supply_ptrace_register): Likewise.
11080 (s390_fill_last_break): New function.
11081 (s390_store_last_break): Likewise.
11082 (s390_fill_system_call): New function.
11083 (s390_store_system_call): Likewise.
11084 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11085 register sets.
11086 (s390_check_regset): New function.
11087 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11088 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11089 Update target_regsets for available register sets.
11090
11091 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11092 Jan Kratochvil <jan.kratochvil@redhat.com>
11093
11094 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11095 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11096 New.
11097 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11098 * linux-low.h (struct process_info_private): New member r_debug.
11099 * server.c (handle_qxfer_libraries): Call
11100 the_target->qxfer_libraries_svr4.
11101 (handle_qxfer_libraries_svr4): New function.
11102 (qxfer_packets): New entry "libraries-svr4".
11103 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11104 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11105 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11106 PACKET_qXfer_libraries_svr4.
11107
11108 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11109
11110 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11111 PSW address/mask between 8-byte and 16-byte formats.
11112 (s390_supply_ptrace_register): Likewise.
11113 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11114 basic addressing mode bit.
11115
11116 2011-11-24 Stan Shebs <stan@codesourcery.com>
11117
11118 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11119
11120 2011-11-17 Stan Shebs <stan@codesourcery.com>
11121
11122 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11123 (tracing_start_time): New global.
11124 (tracing_stop_time): New global.
11125 (tracing_user_name): New global.
11126 (tracing_notes): New global.
11127 (tracing_stop_note): New global.
11128 (cmd_qtstart): Set traceframe_usage, start_time.
11129 (stop_tracing): Set stop_time.
11130 (cmd_qtstatus): Report additional status.
11131 (cmd_qtp): New function.
11132 (handle_tracepoint_query): Call it.
11133 (cmd_qtnotes): New function.
11134 (handle_tracepoint_general_set): Call it.
11135 (get_timestamp): Rename from tsv_get_timestamp.
11136
11137 2011-11-14 Stan Shebs <stan@codesourcery.com>
11138 Kwok Cheung Yeung <kcy@codesourcery.com>
11139
11140 * linux-x86-low.c (small_jump_insn): New.
11141 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11142 trampoline and error message, build a trampoline and issue a small
11143 jump instruction to it.
11144 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11145 trampoline and error message.
11146 (x86_get_min_fast_tracepoint_insn_len): New.
11147 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11148 * linux-low.h (struct linux_target_ops): Add arguments to
11149 install_fast_tracepoint_jump_pad operation, add new operation.
11150 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11151 arguments.
11152 (linux_get_min_fast_tracepoint_insn_len): New function.
11153 (linux_target_op): Add new operation.
11154 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11155 (gdb_trampoline_buffer_end): Ditto.
11156 (gdb_trampoline_buffer_error): Ditto.
11157 (struct ipa_sym_addresses): Add fields for new IPA variables.
11158 (symbol_list): Add entries for new IPA variables.
11159 (struct tracepoint): Add fields to hold the address range of the
11160 trampoline used by the tracepoint.
11161 (trampoline_buffer_head): New static variable.
11162 (trampoline_buffer_tail): Ditto.
11163 (claim_trampoline_space): New function.
11164 (have_fast_tracepoint_trampoline_buffer): New function.
11165 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11166 structure.
11167 (install_fast_tracepoint): Ditto, also add error buffer argument.
11168 (cmd_qtminftpilen): New function.
11169 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11170 (fast_tracepoint_from_trampoline_address): New function.
11171 (fast_tracepoint_collecting): Handle trampoline as part of jump
11172 pad space.
11173 (set_trampoline_buffer_space): New function.
11174 (initialize_tracepoint): Initialize new IPA variables.
11175 * target.h (struct target_ops): Add arguments to
11176 install_fast_tracepoint_jump_pad operation, add new
11177 get_min_fast_tracepoint_insn_len operation.
11178 (target_get_min_fast_tracepoint_insn_len): New.
11179 (install_fast_tracepoint_jump_pad): Add arguments.
11180 * server.h (IPA_BUFSIZ): Define.
11181 * linux-i386-ipa.c: Include extra header files.
11182 (initialize_fast_tracepoint_trampoline_buffer): New function.
11183 (initialize_low_tracepoint): Call it.
11184 * server.h (set_trampoline_buffer_space): Declare.
11185 (claim_trampoline_space): Ditto.
11186 (have_fast_tracepoint_trampoline_buffer): Ditto.
11187
11188 2011-11-14 Yao Qi <yao@codesourcery.com>
11189
11190 * server.c (handle_query): Handle InstallInTrace for qSupported.
11191 * tracepoint.c (add_tracepoint): Sort list.
11192 (install_tracepoint, download_tracepoint): New.
11193 (cmd_qtdp): Call them to install and download tracepoints.
11194 (sort_tracepoints): Removed.
11195 (cmd_qtstart): Update.
11196
11197 2011-11-14 Yao Qi <yao@codesourcery.com>
11198
11199 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11200 * mem-break.h: Declare.
11201 * tracepoint.c (cmd_qtstart): Move some code to ...
11202 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11203 New.
11204 (download_tracepoints): Move some code to ...
11205 (download_tracepoint_1): ... here. New.
11206
11207 2011-11-08 Yao Qi <yao@codesourcery.com>
11208
11209 * remote-utils.c (relocate_instruction): A comment fix.
11210
11211 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11212
11213 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11214 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11215 dr_status_mirror and dr_control_mirror from debug_reg_state.
11216 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11217 (i386_initial_stuff): Remove use of deleted globals.
11218 (i386_get_thread_context, i386_set_thread_context,
11219 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11220 from debug_reg_state.
11221
11222 2011-11-05 Yao Qi <yao@codesourcery.com>
11223
11224 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11225 address as TPOINT's.
11226
11227 2011-11-02 Stan Shebs <stan@codesourcery.com>
11228
11229 * tracepoint.c (agent_mem_read_string): New function.
11230 (eval_agent_expr): Call it for tracenz.
11231 * server.c (handle_query): Report support for tracenz.
11232
11233 2011-11-02 Yao Qi <yao@codesourcery.com>
11234
11235 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11236
11237 2011-11-02 Yao Qi <yao@codesourcery.com>
11238
11239 * target.h: Fix a typo in comment.
11240
11241 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11242
11243 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11244 clobber the breakpoints' shadows with fast tracepoint jumps.
11245 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11246 * target.c (write_inferior_memory): Also pass MYADDR down to
11247 check_mem_write.
11248
11249 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11250
11251 * configure.ac: Check support for personality routine.
11252 * configure: Regenerate.
11253 * config.in: Likewise.
11254 * linux-low.c: Include <sys/personality.h>.
11255 Define ADDR_NO_RANDOMIZE if necessary.
11256 (linux_create_inferior): Disable address space randomization when
11257 forking inferior, if requested.
11258 (linux_supports_disable_randomization): New function.
11259 (linux_target_ops): Install it.
11260 * server.h (disable_randomization): Declare.
11261 * server.c (disable_randomization): New global variable.
11262 (handle_general_set): Handle QDisableRandomization.
11263 (handle_query): Likewise for qSupported.
11264 (main): Support --disable-randomization and --no-disable-randomization
11265 command line arguments.
11266 * target.h (struct target_ops): Add supports_disable_randomization.
11267 (target_supports_disable_randomization): New macro.
11268
11269 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11270
11271 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11272 ifdef check.
11273 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11274 [!PT_GETDSBT] (target_loadmap): New definition.
11275 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11276 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11277 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11278 and PT_GETDSBT to LINUX_LOADMAP.
11279 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11280 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11281
11282 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11283
11284 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11285 (arm_linux_hwbp_cap): New static variable.
11286 (arm_linux_get_hwbp_cap): Replace by ...
11287 (arm_linux_init_hwbp_cap): ... this new function.
11288 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11289 (arm_linux_get_hw_watchpoint_count): Likewise.
11290 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11291 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11292 (arm_prepare_to_resume): Use perror_with_name instead of error.
11293
11294 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11295
11296 * linux-arm-low.c: Include <signal.h>.
11297 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11298 (struct arm_linux_hwbp_cap): New data type.
11299 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11300 (struct arm_linux_hw_breakpoint): New data type.
11301 (MAX_BPTS, MAX_WPTS): Define.
11302 (struct arch_process_info, struct arch_lwp_info): New data types.
11303 (arm_linux_get_hwbp_cap): New function.
11304 (arm_linux_get_hw_breakpoint_count): Likewise.
11305 (arm_linux_get_hw_watchpoint_count): Likewise.
11306 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11307 (arm_hwbp_control_initialize): Likewise.
11308 (arm_hwbp_control_is_enabled): Likewise.
11309 (arm_hwbp_control_is_initialized): Likewise.
11310 (arm_hwbp_control_disable): Likewise.
11311 (arm_linux_hw_breakpoint_equal): Likewise.
11312 (arm_linux_hw_point_initialize): Likewise.
11313 (struct update_registers_data): New data structure.
11314 (update_registers_callback: New function.
11315 (arm_insert_point): Likewise.
11316 (arm_remove_point): Likewise.
11317 (arm_stopped_by_watchpoint): Likewise.
11318 (arm_stopped_data_address): Likewise.
11319 (arm_new_process): Likewise.
11320 (arm_new_thread): Likewise.
11321 (arm_prepare_to_resume): Likewise.
11322 (the_low_target): Register arm_insert_point, arm_remove_point,
11323 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11324 arm_new_thread, and arm_prepare_to_resume.
11325
11326 2011-09-15 Stan Shebs <stan@codesourcery.com>
11327
11328 * server.h (struct emit_ops): Add compare-goto fields.
11329 * tracepoint.c (gdb_agent_op_sizes): New table.
11330 (emit_eq_goto): New function.
11331 (emit_ne_goto): New function.
11332 (emit_lt_goto): New function.
11333 (emit_le_goto): New function.
11334 (emit_gt_goto): New function.
11335 (emit_ge_goto): New function.
11336 (is_goto_target): New function.
11337 (compile_bytecodes): Recognize special cases of compare-goto
11338 combinations and call specialized emitters for them.
11339 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11340 (amd64_emit_ne_goto): New function.
11341 (amd64_emit_lt_goto): New function.
11342 (amd64_emit_le_goto): New function.
11343 (amd64_emit_gt_goto): New function.
11344 (amd64_emit_ge_goto): New function.
11345 (amd64_emit_ops): Add the new functions.
11346 (i386_emit_eq_goto): New function.
11347 (i386_emit_ne_goto): New function.
11348 (i386_emit_lt_goto): New function.
11349 (i386_emit_le_goto): New function.
11350 (i386_emit_gt_goto): New function.
11351 (i386_emit_ge_goto): New function.
11352 (i386_emit_ops): Add the new functions.
11353
11354 2011-09-08 Stan Shebs <stan@codesourcery.com>
11355
11356 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11357 (i386_emit_epilogue): Restore %ebx.
11358
11359 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11360
11361 * server.c (step_thread): Remove definition.
11362 (process_serial_event): Don't handle Hs.
11363 * server.h (step_thread): Remove declaration.
11364 * target.c (set_desired_inferior): Remove use of step_thread.
11365
11366 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11367
11368 * linux-low.c: Include linux-procfs.h.
11369 (linux_attach_lwp_1): Update comments.
11370 (linux_attach): Scan for existing threads when attaching to a
11371 process that is the tgid.
11372 * Makefile.in: Update dependencies.
11373
11374 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11375
11376 * configure.srv: Add linux-procfs.o dependencies.
11377
11378 2011-08-14 Yao Qi <yao@codesourcery.com>
11379
11380 * target.h (struct target_ops): Fix indent.
11381 * win32-low.c (win32_target_ops): Fix comment.
11382
11383 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11384 Yao Qi <yao@codesourcery.com>
11385
11386 * Makefile.in (clean): Remove tic6x-*.c files.
11387 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11388 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11389 (tic6x-c64xp-linux.c): Likewise.
11390 * configure.srv: Add support for tic6x-*-uclinux.
11391 * linux-tic6x-low.c: New.
11392 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11393
11394 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11395 Yao Qi <yao@codesourcery.com>
11396
11397 * target.h (struct target_ops): Add read_loadmap.
11398 * linux-low.c (struct target_loadseg): New type.
11399 (struct target_loadmap): New type.
11400 (linux_read_loadmap): New function.
11401 (linux_target_ops): Add linux_read_loadmap.
11402 * server.c (handle_query): Support qXfer:fdpic:read packet.
11403 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11404 to NULL.
11405
11406 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11407
11408 * win32-low.c: Include <stdint.h>.
11409
11410 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11411
11412 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11413 to the inferior here.
11414 (i386_remove_aligned_watchpoint): Ditto.
11415 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11416 fit part of the watchpoint in the debug registers.
11417 (i386_update_inferior_debug_regs): New.
11418 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11419 registers, and only update the inferior on success.
11420 (i386_low_remove_watchpoint): Ditto.
11421
11422 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11423
11424 * linux-low.c (compare_ints, unique, list_threads, show_process,
11425 linux_core_of_thread): Delete.
11426 (linux_target_ops): Change linux_core_of_thread to
11427 linux_common_core_of_thread.
11428 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11429 * utils.c (malloc_failure): Change type of argument.
11430 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11431 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11432 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11433 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11434 (IPA_OBJS): Add common-utils-ipa.o.
11435 (ptid_h, linux_osdata_h): New macros.
11436 (server_h): Add common/common-utils.h, common/xml-utils.h,
11437 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11438 common/ptid.h.
11439 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11440 ptid.o, buffer.o): New rules.
11441 (linux-low.o): Add common/linux-osdata.h as a dependency.
11442 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11443 * configure.ac: Add AC_HEADER_DIRENT check.
11444 * config.in: Regenerate.
11445 * configure: Regenerate.
11446 * remote-utils.c (xml_escape_text): Delete.
11447 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11448 buffer_xml_printf): Move to common/buffer.c.
11449 * server.c (main): Remove call to initialize_inferiors.
11450 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11451 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11452 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11453 internal_error, gdb_assert, gdb_assert_fail): Delete.
11454 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11455 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11456 common/buffer.h.
11457 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11458 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11459 initialize_inferiors): Delete.
11460
11461 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11462
11463 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11464 symbol error.
11465
11466 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11467
11468 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11469 assertion.
11470 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11471
11472 2011-05-26 Yao Qi <yao@codesourcery.com>
11473
11474 * Makefile.in (thread-db.o): Track dependence to
11475 common/gdb_thread_db.h.
11476 * thread-db.c: include gdb_thread_db.h from right place.
11477
11478 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11479
11480 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11481 __FILE__ and __LINE__ to internal_error.
11482
11483 2011-05-13 Doug Evans <dje@google.com>
11484
11485 * thread-db.c (try_thread_db_load_from_sdir): New function.
11486 (try_thread_db_load_from_dir): New function.
11487 (thread_db_load_search): Handle $sdir, ignore $pdir.
11488 Remove trying of system directories if search of
11489 libthread-db-search-path fails, that is now done via $sdir.
11490
11491 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11492
11493 * server.c (handle_query): Add EnableDisableTracepoints to the list
11494 of supported features.
11495 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11496 tracepoints.
11497 (cmd_qtenable_disable): New.
11498 (cmd_qtstart): Install tracepoints even if disabled.
11499 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11500 receiving a QTEnable or QTDisable packet.
11501 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11502 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11503 tracepoints.
11504 (gdb_probe): Skip data collection if static tracepoint is disabled.
11505
11506 2011-05-10 Doug Evans <dje@google.com>
11507
11508 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11509
11510 2011-05-04 Doug Evans <dje@google.com>
11511
11512 * linux-low.c (linux_join): Skip process lookup.
11513 * spu-low.c (spu_join): Ditto.
11514 * server.c (join_inferiors_callback): Delete.
11515 (process_serial_event): For 'D' packet (detach) call join_inferior
11516 directly.
11517
11518 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11519
11520 * README: Don't mention xscale*-*-linux*.
11521 * configure.srv (xscale*-*-linux*): Don't handle target.
11522
11523 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11524
11525 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11526 casting pointers.
11527 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11528 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11529 (i386_emit_void_call_2): Likewise.
11530
11531 2011-04-26 Yao Qi <yao@codesourcery.com>
11532
11533 * linux-low.c: Move common macros to linux-ptrace.h.
11534 Include linux-ptrace.h.
11535 * Makefile.in (linux_ptrace_h): New.
11536 (linux-low.o): Depends on linux-ptrace.h.
11537
11538 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11539
11540 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11541 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11542 (remote_prepare): New function with most of the TCP code from ...
11543 (remote_open): ... here. Detect PORT here unconditionally. Move also
11544 setting transport_is_reliable.
11545 * server.c (run_once): New variable.
11546 (gdbserver_usage): Document it.
11547 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11548 the first run if RUN_ONCE.
11549 * server.h (run_once, remote_prepare): New declarations.
11550
11551 2011-04-19 Tom Tromey <tromey@redhat.com>
11552
11553 * win32-low.c (handle_load_dll): Remove duplicate "the".
11554
11555 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11556
11557 Remove support for old Cygwin 1.5 versions.
11558 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11559 function to avoid warning.
11560 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11561 warning.
11562
11563 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11564
11565 * gdbserver/server.h (Macro _): Define it if not available.
11566
11567 2011-03-14 Michael Snyder <msnyder@vmware.com>
11568
11569 * hostio.c (handle_close): Remove unnecessary null test.
11570
11571 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11572
11573 * Makefile.in (maintainer-clean realclean distclean): Remove
11574 "make ... subdir_do" command.
11575
11576 2011-03-10 Michael Snyder <msnyder@vmware.com>
11577
11578 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11579
11580 * server.c (handle_v_run): Free alloced buffer on early return.
11581
11582 2011-03-09 Yao Qi <yao@codesourcery.com>
11583
11584 Revert:
11585 2011-03-04 Yao Qi <yao@codesourcery.com>
11586
11587 * Makefile.in: Remove GNU make feature --directory.
11588
11589 2011-03-05 Yao Qi <yao@codesourcery.com>
11590
11591 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11592 (subdir_do): New make target. Copied from gdb/Makefile.
11593 (maintainer-clean, realclean, distclean, clean): Call corresponding
11594 make targets in common/Makefile.
11595
11596 2011-02-11 Yao Qi <yao@codesourcery.com>
11597
11598 * configure.ac: Call AC_PROG_RANLIB.
11599 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11600 * configure: Regenerate.
11601
11602 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11603
11604 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11605
11606 2011-03-06 Yao Qi <yao@codesourcery.com>
11607
11608 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11609
11610 2011-03-05 Yao Qi <yao@codesourcery.com>
11611
11612 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11613 (subdir_do): New make target. Copied from gdb/Makefile.
11614 (maintainer-clean, realclean, distclean, clean): Call corresponding
11615 make targets in common/Makefile.
11616
11617 2011-03-04 Yao Qi <yao@codesourcery.com>
11618
11619 * Makefile.in: Remove GNU make feature --directory.
11620
11621 2011-03-04 Michael Snyder <msnyder@vmware.com>
11622
11623 * server.c (queue_stop_reply): Call xmalloc not malloc.
11624
11625 2011-03-02 Michael Snyder <msnyder@vmware.com>
11626
11627 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11628
11629 2011-02-28 Michael Snyder <msnyder@vmware.com>
11630
11631 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11632 (cmd_qtframe): Ditto.
11633 (cmd_qtbuffer): Ditto.
11634 (cmd_bigqtbuffer): Ditto.
11635
11636 * utils.c (decimal2str): Initialize 'width' to nine, then
11637 don't mess with it.
11638
11639 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11640
11641 * hostio.c (require_data): Free *data, not data.
11642
11643 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11644
11645 * hostio.c (require_data): Use free, not xfree.
11646
11647 2011-02-27 Michael Snyder <msnyder@vmware.com>
11648
11649 * server.c (handle_query): Discard unused value.
11650
11651 * hostio.c (require_data): Free malloc memory before returning
11652 error.
11653
11654 2011-02-26 Michael Snyder <msnyder@vmware.com>
11655
11656 * linux-low.c (list_threads): Call closedir for dirent.
11657
11658 2011-02-27 Michael Snyder <msnyder@vmware.com>
11659
11660 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11661 a case statement falls through.
11662
11663 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11664
11665 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11666 in comparison.
11667
11668 2011-02-26 Michael Snyder <msnyder@vmware.com>
11669
11670 * utils.c (decimal2str): Eliminate dead code and dead param.
11671 (pulongest): Drop dead param from call to decimal2str.
11672 (plongest): Ditto.
11673
11674 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11675
11676 Revert the following patch (not approved yet):
11677 2011-02-21 Hui Zhu <teawater@gmail.com>
11678 * tracepoint.c (tp_printf): New function.
11679 (eval_agent_expr): Handle gdb_agent_op_printf.
11680
11681 2011-02-21 Hui Zhu <teawater@gmail.com>
11682
11683 * tracepoint.c (tp_printf): New function.
11684 (eval_agent_expr): Handle gdb_agent_op_printf.
11685
11686 2011-02-18 Tom Tromey <tromey@redhat.com>
11687
11688 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11689 (tracepoint.o): Likewise.
11690 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11691 (gdb_agent_op_names): Likewise.
11692
11693 2011-02-18 Tom Tromey <tromey@redhat.com>
11694
11695 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11696 gdb_agent_op_rot>: New constants.
11697 (gdb_agent_op_names): Add pick and roll.
11698 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11699 cases.
11700
11701 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11702
11703 * aclocal.m4: Regenerated with aclocal-1.11.1.
11704
11705 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11706
11707 * server.c (handle_qxfer_traceframe_info): New.
11708 (qxfer_packets): Register "traceframe-info".
11709 (handle_query): Report support for qXfer:traceframe-info:read+.
11710 * tracepoint.c (match_blocktype): New.
11711 (traceframe_find_block_type): Rename to ...
11712 (traceframe_walk_blocks): ... this. Add callback filter argument,
11713 and use it.
11714 (traceframe_find_block_type): New, reimplemented on top of
11715 traceframe_walk_blocks.
11716 (build_traceframe_info_xml): New.
11717 (traceframe_read_info): New.
11718 * server.h (traceframe_read_info): Declare.
11719
11720 2011-02-11 Yao Qi <yao@codesourcery.com>
11721
11722 * configure.ac: Call AC_PROG_RANLIB.
11723 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11724 * configure: Regenerate.
11725
11726 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11727
11728 * server.c (gdb_read_memory): Change return semantics to allow
11729 partial transfers.
11730 (handle_search_memory_1): Adjust.
11731 (process_serial_event) <'m' packet>: Handle partial transfers.
11732 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11733
11734 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11735
11736 * regcache.c (init_register_cache): Initialize
11737 regcache->register_status.
11738 (free_register_cache): Release regcache->register_status.
11739 (regcache_cpy): Copy register_status.
11740 (registers_to_string): Print 'x's for unavailable registers.
11741 (supply_register): Mark the register's status valid or
11742 unavailable, depending on whether a buffer was passed in or not.
11743 (supply_register_zeroed): New.
11744 (supply_regblock): Mark the registers' status valid or
11745 unavailable, depending on whether a buffer was passed in or not.
11746 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11747 (struct regcache): New `register_status' field.
11748 (supply_register_zeroed): Declare.
11749 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11750 supply_register_zeroed, rather than passing a NULL buffer to
11751 supply_register.
11752 * tracepoint.c (fetch_traceframe_registers): Update comment.
11753
11754 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11755
11756 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11757 buffer explicit.
11758
11759 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11760
11761 * server.h (decode_xfer_write): Change prototype.
11762 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11763 and don't extract the annex here.
11764 * server.c (decode_xfer_read): Remove `annex' parameter,
11765 and don't extract the annex here.
11766 (decode_xfer): New.
11767 (struct qxfer): New.
11768 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11769 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11770 (handle_qxfer_statictrace): New functions, abstracted out from
11771 handle_query, and made to use the struct qxfer interface.
11772 (handle_threads_qxfer_proper): Rename to ...
11773 (handle_qxfer_threads_proper): ... this.
11774 (handle_threads_qxfer): Rename to ...
11775 (handle_qxfer_threads): ... this. Adjust.
11776 (qxfer_packets): New array.
11777 (handle_qxfer): New function.
11778 (handle_query): Use handle_qxfer.
11779
11780 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11781
11782 * gdbreplay.c: Shorten lines of >= 80 columns.
11783 * linux-low.c: Ditto.
11784 * linux-ppc-low.c: Ditto.
11785 * linux-s390-low.c: Ditto.
11786 * linux-sparc-low.c: Ditto.
11787 * linux-x86-low.c: Ditto.
11788 * linux-xtensa-low.c: Ditto.
11789 * mem-break.c: Ditto.
11790 * nto-low.c: Ditto.
11791 * regcache.h: Ditto.
11792 * remote-utils.c: Ditto.
11793 * server.c: Ditto.
11794 * server.h: Ditto.
11795 * thread-db.c: Ditto.
11796 * tracepoint.c: Ditto.
11797 * utils.c: Ditto.
11798 * win32-low.h: Ditto.
11799
11800 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11801
11802 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11803 update.
11804
11805 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11806
11807 * server.c (gdbserver_version): Update copyright year in version
11808 output.
11809 * gdbreplay.c (gdbreplay_version): Ditto.
11810
11811 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11812
11813 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11814 * linux-bfin-low.c: New file.
11815 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11816 PT_DATA_ADDR for BFIN targets.
11817 * Makefile.in (SFILES): Add linux-bfin-low.c.
11818 (clean): Remove reg-bfin.c.
11819 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11820 * README: Mention supported Blackfin targets.
11821
11822 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11823
11824 * .gitignore: New file.
11825
11826 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11827
11828 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11829
11830 2010-10-22 Jie Zhang <jie@codesourcery.com>
11831
11832 * Makefile.in: Add FLAGS_TO_PASS variable.
11833 (install): Remove dependency of install-only and recursively
11834 invoke make for install-only.
11835
11836 2010-10-04 Doug Evans <dje@google.com>
11837
11838 * Makefile.in (uninstall): Use $(DESTDIR).
11839
11840 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11841
11842 PR gdb/11842
11843
11844 * linux-x86-low.c (compat_siginfo_from_siginfo)
11845 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11846 si_code is < 0. Check for si_code == SI_TIMER before checking for
11847 si_code < 0.
11848
11849 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11850
11851 * lynx-i386-low.c: New file.
11852 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11853
11854 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11855
11856 * lynx-low.c (ptrace_request_to_str): Remove handling for
11857 request values that have been removed in LynxOS 5.x.
11858
11859 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11860
11861 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11862 <ptrace.h>
11863
11864 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11865
11866 * configure.ac: Add --enable-inprocess-agent option.
11867 * configure: Rebuilt.
11868
11869 2010-09-06 Yao Qi <yao@codesourcery.com>
11870
11871 * linux-low.c (linux_kill): Remove unused variable.
11872 (linux_stabilize_threads): Likewise.
11873 * server.c (start_inferior): Likewise.
11874 (queue_stop_reply_callback): Likewise.
11875 * tracepoint.c (do_action_at_tracepoint): Likewise.
11876
11877 2010-09-06 Yao Qi <yao@codesourcery.com>
11878
11879 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11880 on return.
11881
11882 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11883
11884 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11885
11886 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11887
11888 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11889 "$(IPA_DEPFILES)".
11890
11891 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11892
11893 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11894 gdbserver/lynx-ppc-low.c: New files.
11895 * Makefile.in (lynx_low_h): New variable.
11896 (lynx-low.o, lynx-ppc-low.o): New rules.
11897 * configure.ac: On LynxOS, link with -lnetinet.
11898 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11899 * configure: regenerate.
11900
11901 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11902
11903 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11904 * configure.ac: Add check for vasprintf and vsnprintf.
11905 * configure, config.in: Regenerate.
11906 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11907
11908 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11909
11910 * gdbreplay.c: Move include of alloca.h up, next to include of
11911 malloc.h.
11912 * server.h: Add include of malloc.h.
11913 * mem-break.c: Remove include of malloc.h.
11914 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11915
11916 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11917
11918 * Makefile.in (memmem.o): Build with -Wno-error.
11919
11920 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11921
11922 * utils.c (xsnprintf): Make non-static.
11923 * server.h: Add xsnprintf declaration.
11924 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11925 replace calls to snprintf by calls to xsnprintf throughout.
11926
11927 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11928
11929 * configure.ac: Add configure check for alloca.
11930 * configure, config.in: Regenerate.
11931 * server.h: Include alloca.h if it exists.
11932 * gdbreplay.c: Include alloca.h if it exists.
11933
11934 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11935
11936 * linux-low.c (__SIGRTMIN): Define if not already defined.
11937 (linux_create_inferior): Check for __ANDROID__ rather than
11938 __SIGRTMIN.
11939 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11940 are already deferred.
11941 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11942 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11943 stopped and already has a pending signal to report.
11944 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11945 a pending signal to report or is moving out of a jump pad.
11946 (linux_init_signals): Check for __ANDROID__ rather than
11947 __SIGRTMIN.
11948
11949 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11950
11951 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11952 debug_threads check. Avoid a linear search when not doing debug
11953 output.
11954
11955 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11956
11957 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11958 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11959 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11960 (process_event): Change local fd's type to gdb_fildes_t.
11961 (create_file_handler): Adjust prototype.
11962 (delete_file_handler): Adjust prototype.
11963 (handle_file_event): Adjust prototype. Use pfildes.
11964 (create_file_event): Adjsut prototype.
11965 * remote-utils.c (remote_desc, listen_desc): Change type to
11966 gdb_fildes_t.
11967 * server.h: New gdb_fildes_t typedef.
11968 [USE_WIN32API]: Include winsock2.h.
11969 (delete_file_handler, add_file_handler): Adjust prototypes.
11970 (pfildes): Declare.
11971 * utils.c (pfildes): New.
11972
11973 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11974
11975 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11976 * configure: Regenerate.
11977
11978 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11979
11980 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11981 (linux_done_accessing_memory): ... this.
11982 (linux_target_ops): Adjust.
11983 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11984 * nto-low.c (nto_target_ops): Adjust comment.
11985 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11986 * spu-low.c (spu_target_ops): Adjust comment.
11987 * target.h (target_ops): Rename unprepare_to_access_memory field
11988 to done_accessing_memory.
11989 (unprepare_to_access_memory): Rename to ...
11990 (done_accessing_memory): ... this.
11991
11992 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11993
11994 * linux-low.c (linux_prepare_to_access_memory): New.
11995 (linux_unprepare_to_access_memory): New.
11996 (linux_target_ops): Install them.
11997 * server.c (read_memory): Rename to ...
11998 (gdb_read_memory): ... this. Use
11999 prepare_to_access_memory/prepare_to_access_memory.
12000 (write_memory): Rename to ...
12001 (gdb_write_memory): ... this. Use
12002 prepare_to_access_memory/prepare_to_access_memory.
12003 (handle_search_memory_1): Adjust.
12004 (process_serial_event): Adjust.
12005 * target.h (struct target_ops): New fields
12006 prepare_to_access_memory and unprepare_to_access_memory.
12007 (prepare_to_access_memory, unprepare_to_access_memory): New.
12008 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
12009 prepare_to_access_memory/prepare_to_access_memory.
12010 * nto-low.c (nto_target_ops): Adjust.
12011 * spu-low.c (spu_target_ops): Adjust.
12012 * win32-low.c (win32_target_ops): Adjust.
12013
12014 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12015
12016 * Makefile.in (WARN_CFLAGS): Get it from configure.
12017 (WERROR_CFLAGS): New.
12018 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
12019 * configure.ac: Introduce --enable-werror, which adds -Werror to
12020 the compiler command line. Enabled by default. Disable with
12021 --disable-werror. Add -Wdeclaration-after-statement
12022 Wpointer-arith and -Wformat-nonliteral to warning flags.
12023 * configure: Regenerate.
12024
12025 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12026
12027 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
12028
12029 2010-08-26 Pedro Alves <pedro@codesourcery.com>
12030
12031 * gdbreplay.c (remote_error): New.
12032 (gdbchar): New.
12033 (expect): Use gdbchar. Check for error reading from GDB.
12034 Clarify sync error output.
12035 (play): Check for errors writing to GDB.
12036 * linux-low.c (sigchld_handler): Really ignore `write' errors.
12037 * remote-utils.c (getpkt): Check for errors writing to the remote
12038 descriptor.
12039
12040 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12041
12042 * linux-low.c (linux_wait_1): Move non-debugging code out of
12043 `debug_threads' control.
12044
12045 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12046
12047 * linux-low.c (linux_wait_1): Don't set last_status here.
12048 * server.c (push_event, queue_stop_reply_callback): Assert we're
12049 not pushing a TARGET_WAITKIND_IGNORE event.
12050 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
12051 (myresume, handle_target_event): Set the thread's last_resume_kind
12052 and last_status from the target returned status.
12053
12054 2010-08-25 Pedro Alves <pedro@codesourcery.com>
12055
12056 PR threads/10729
12057
12058 * linux-x86-low.c (update_debug_registers_callback): New.
12059 (i386_dr_low_set_addr): Use it.
12060 (i386_dr_low_get_addr): New.
12061 (i386_dr_low_set_control): Use update_debug_registers_callback.
12062 (i386_dr_low_get_control): New.
12063 (i386_dr_low_get_status): Adjust.
12064 * linux-low.c (linux_stop_lwp): New.
12065 * linux-low.h (linux_stop_lwp): Declare.
12066
12067 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
12068 argument instead of a i386_debug_reg_state.
12069 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
12070 a i386_debug_reg_state.
12071 (i386_insert_aligned_watchpoint): Adjust.
12072 (i386_remove_aligned_watchpoint): Adjust.
12073 (i386_low_stopped_data_address): Read the debug registers from the
12074 inferior instead of from the mirrors.
12075 * i386-low.h (struct i386_debug_reg_state): Extend comment.
12076 (i386_dr_low_get_addr): Declare.
12077 (i386_dr_low_get_control): Declare.
12078 (i386_dr_low_get_status): Change prototype.
12079
12080 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
12081 (i386_dr_low_get_addr): New.
12082 (i386_dr_low_get_control): New.
12083 (i386_dr_low_get_status): Adjust prototype. Return
12084 dr_status_mirror.
12085 (i386_initial_stuff): Clear dr_status_mirror and
12086 dr_control_mirror.
12087 (i386_get_thread_context): Adjust.
12088 (i386_set_thread_context): Adjust.
12089 (i386_thread_added): Adjust.
12090
12091 2010-08-24 Pedro Alves <pedro@codesourcery.com>
12092
12093 * linux-low.h (linux_thread_area): Delete declaration.
12094
12095 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12096
12097 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12098 after its termination.
12099
12100 2010-08-09 Pedro Alves <pedro@codesourcery.com>
12101
12102 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12103 (gdb_wants_all_stopped): Delete.
12104 (linux_wait_1): Don't call them.
12105 * server.c (handle_v_cont): Tag all threads as want-stopped.
12106 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12107 stopped as "client-wants-stopped".
12108
12109 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12110
12111 * Makefile.in (signals_h): New.
12112 (server_h): Depend on it.
12113 (server.o): Don't depend on $(signals_def).
12114 (signals.o): Depend on $(signals_def).
12115
12116 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12117
12118 * Makefile.in (signals_def): New.
12119 (server_h): Append include/gdb/signals.h and signals_def.
12120 (server.o): Append signals_def.
12121
12122 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12123
12124 * server.c (handle_target_event): Use target_signal_to_host for
12125 resume_info.sig initialization.
12126 * target.h (struct thread_resume) <sig>: New comment.
12127
12128 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12129
12130 * server.c (handle_query): strcpy() the returned string from paddress()
12131 instead of sprintf().
12132 * utils.c (paddress): Return phex_nz().
12133
12134 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12135
12136 * server.c (handle_v_cont): Call mourn_inferior if process
12137 just exited.
12138 (myresume): Likewise.
12139
12140 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12141
12142 Static tracepoints, and integration with UST.
12143
12144 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12145 * mem-break.c (uninsert_all_breakpoints)
12146 (reinsert_all_breakpoints): New.
12147 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12148 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12149 (gdb_agent_ust_loaded, helper_thread_id)
12150 (gdb_agent_helper_thread_id): New macros.
12151 (struct ipa_sym_addresses): Add addr_ust_loaded,
12152 addr_helper_thread_id, addr_cmd_buf.
12153 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12154 (in_process_agent_loaded_ust): New.
12155 (write_e_ust_not_loaded): New.
12156 (maybe_write_ipa_ust_not_loaded): New.
12157 (struct collect_static_trace_data_action): New.
12158 (enum tracepoint_type) <static_tracepoint>: New.
12159 (struct tracepoint) <handle>: Mention static tracepoints.
12160 (struct static_tracepoint_ctx): New.
12161 (CMD_BUF_SIZE): New.
12162 (add_tracepoint_action): Handle static tracepoint actions.
12163 (unprobe_marker_at): New.
12164 (clear_installed_tracepoints): Handle static tracepoints.
12165 (cmd_qtdp): Handle static tracepoints.
12166 (probe_marker_at): New.
12167 (cmd_qtstart): Handle static tracepoints.
12168 (response_tracepoint): Handle static tracepoints.
12169 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12170 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12171 (get_context_regcache): Handle static tracepoints.
12172 (do_action_at_tracepoint): Handle static tracepoint actions.
12173 (traceframe_find_block_type): Handle static trace data blocks.
12174 (traceframe_read_sdata): New.
12175 (download_tracepoints): Download static tracepoint actions.
12176 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12177 (GDB_PROBE_NAME): New.
12178 (ust_ops): New.
12179 (GET_UST_SYM): New.
12180 (USTF): New.
12181 (dlsym_ust): New.
12182 (ust_marker_to_static_tracepoint): New.
12183 (gdb_probe): New.
12184 (collect_ust_data_at_tracepoint): New.
12185 (gdb_ust_probe): New.
12186 (UNIX_PATH_MAX, SOCK_DIR): New.
12187 (gdb_ust_connect_sync_socket): New.
12188 (resume_thread, stop_thread): New.
12189 (run_inferior_command): New.
12190 (init_named_socket): New.
12191 (gdb_ust_socket_init): New.
12192 (cstr_to_hexstr): New.
12193 (next_st): New.
12194 (first_marker, next_marker): New.
12195 (response_ust_marker): New.
12196 (cmd_qtfstm, cmd_qtsstm): New.
12197 (unprobe_marker_at, probe_marker_at): New.
12198 (cmd_qtstmat, gdb_ust_thread): New.
12199 (gdb_ust_init): New.
12200 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12201 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12202 (ST_REGENTRY): New.
12203 (x86_64_st_collect_regmap): New.
12204 (X86_64_NUM_ST_COLLECT_GREGS): New.
12205 (AMD64_RIP_REGNUM): New.
12206 (supply_static_tracepoint_registers): New.
12207 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12208 (ST_REGENTRY): New.
12209 (i386_st_collect_regmap): New.
12210 (i386_NUM_ST_COLLECT_GREGS): New.
12211 (supply_static_tracepoint_registers): New.
12212 * server.c (handle_query): Handle qXfer:statictrace:read.
12213 <qSupported>: Report support for StaticTracepoints, and
12214 qXfer:statictrace:read features.
12215 * server.h (traceframe_read_sdata)
12216 (supply_static_tracepoint_registers): Declare.
12217 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12218 (unpack_varlen_hex): Include in IPA build.
12219 * Makefile.in (ustlibs, ustinc): New.
12220 (IPA_OBJS): Add remote-utils-ipa.o.
12221 ($(IPA_LIB)): Link -ldl and -lpthread.
12222 (UST_CFLAGS): New.
12223 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12224 * config.in, configure: Regenerate.
12225
12226 2010-06-20 Ian Lance Taylor <iant@google.com>
12227 Pedro Alves <pedro@codesourcery.com>
12228
12229 * linux-x86-low.c (always_true): Delete.
12230 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12231 trying to fool the compiler with always_true.
12232
12233 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12234
12235 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12236 conditions in gdbserver.
12237
12238 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12239
12240 * spu-low.c (spu_read_memory): Wrap around local store limit.
12241 (spu_write_memory): Likewise.
12242
12243 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12244
12245 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12246 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12247 LONGEST uses.
12248 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12249 uses.
12250 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12251 uses with LONGEST uses.
12252
12253 2010-06-14 Stan Shebs <stan@codesourcery.com>
12254 Pedro Alves <pedro@codesourcery.com>
12255
12256 Bytecode compiler.
12257
12258 * linux-x86-low.c: Include limits.h.
12259 (add_insns): New.
12260 (always_true): New.
12261 (EMIT_ASM): New.
12262 (EMIT_ASM32): New.
12263 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12264 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12265 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12266 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12267 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12268 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12269 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12270 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12271 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12272 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12273 (amd64_emit_void_call_2): New.
12274 (amd64_emit_ops): New.
12275 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12276 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12277 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12278 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12279 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12280 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12281 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12282 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12283 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12284 (i386_emit_stack_adjust, i386_emit_int_call_1)
12285 (i386_emit_void_call_2): New.
12286 (i386_emit_ops): New.
12287 (x86_emit_ops): New.
12288 (the_low_target): Install x86_emit_ops.
12289 * server.h (struct emit_ops): New.
12290 (get_raw_reg_func_addr): Declare.
12291 (current_insn_ptr, emit_error): Declare.
12292 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12293 (set_trace_state_variable_value): New defines.
12294 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12295 addr_get_trace_state_variable_value and
12296 addr_set_trace_state_variable_value.
12297 (symbol_list): New fields for get_raw_reg,
12298 get_trace_state_variable_value and set_trace_state_variable_value.
12299 (condfn): New typedef.
12300 (struct tracepoint): New field `compiled_cond'.
12301 (do_action_at_tracepoint): Clear compiled_cond.
12302 (get_trace_state_variable_value, set_trace_state_variable_value):
12303 Export in the IPA.
12304 (condition_true_at_tracepoint): If there's a compiled condition,
12305 run that.
12306 (current_insn_ptr, emit_error): New globals.
12307 (struct bytecode_address): New.
12308 (get_raw_reg_func_addr): New.
12309 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12310 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12311 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12312 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12313 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12314 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12315 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12316 (compile_tracepoint_condition, compile_bytecodes): New.
12317 * target.h (emit_ops): Forward declare.
12318 (struct target_ops): New field emit_ops.
12319 (target_emit_ops): New.
12320 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12321 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12322 * linux-low.c (linux_emit_ops): New.
12323 (linux_target_ops): Install it.
12324 * linux-low.h (struct linux_target_ops): New field emit_ops.
12325
12326 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12327
12328 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12329 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12330
12331 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12332 Stan Shebs <stan@codesourcery.com>
12333
12334 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12335 (all): Depend on $(extra_libraries).
12336 (install-only): Install the IPA.
12337 (IPA_OBJS, IPA_LIB): New.
12338 (clean): Remove the IPA lib.
12339 (IPAGENT_CFLAGS): New.
12340 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12341 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12342 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12343 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12344 * configure.ac: Check for atomic builtins support in the compiler.
12345 (IPA_DEPFILES, extra_libraries): Define.
12346 * configure.srv (ipa_obj): Add description.
12347 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12348 (i[34567]86-*-linux*): Set ipa_obj.
12349 (x86_64-*-linux*): Set ipa_obj.
12350 * linux-low.c (stabilizing_threads): New.
12351 (supports_fast_tracepoints): New.
12352 (linux_detach): Stabilize threads before detaching.
12353 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12354 the lwp is either not stabilizing, or is moving out of a jump pad.
12355 (linux_fast_tracepoint_collecting): New.
12356 (maybe_move_out_of_jump_pad): New.
12357 (enqueue_one_deferred_signal): New.
12358 (dequeue_one_deferred_signal): New.
12359 (linux_wait_for_event_1): If moving out of a jump pad, defer
12360 pending signals to later.
12361 (linux_stabilize_threads): New.
12362 (linux_wait_1): Check if threads need moving out of jump pads, and
12363 do it if so.
12364 (stuck_in_jump_pad_callback): New.
12365 (move_out_of_jump_pad_callback): New.
12366 (lwp_running): New.
12367 (linux_resume_one_lwp): Handle moving out of jump pads.
12368 (linux_set_resume_request): Dequeue deferred signals.
12369 (need_step_over_p): Also step over fast tracepoint jumps.
12370 (start_step_over): Also uninsert fast tracepoint jumps.
12371 (finish_step_over): Also reinsert fast tracepoint jumps.
12372 (linux_install_fast_tracepoint_jump): New.
12373 (linux_target_ops): Install linux_stabilize_threads and
12374 linux_install_fast_tracepoint_jump_pad.
12375 * linux-low.h (linux_target_ops) <get_thread_area,
12376 install_fast_tracepoint_jump_pad>: New fields.
12377 (struct lwp_info) <collecting_fast_tracepoint,
12378 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12379 (linux_get_thread_area): Declare.
12380 * linux-x86-low.c (jump_insn): New.
12381 (x86_get_thread_area): New.
12382 (append_insns): New.
12383 (push_opcode): New.
12384 (amd64_install_fast_tracepoint_jump_pad): New.
12385 (i386_install_fast_tracepoint_jump_pad): New.
12386 (x86_install_fast_tracepoint_jump_pad): New.
12387 (the_low_target): Install x86_get_thread_area and
12388 x86_install_fast_tracepoint_jump_pad.
12389 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12390 (struct fast_tracepoint_jump): New.
12391 (fast_tracepoint_jump_insn): New.
12392 (fast_tracepoint_jump_shadow): New.
12393 (find_fast_tracepoint_jump_at): New.
12394 (fast_tracepoint_jump_here): New.
12395 (delete_fast_tracepoint_jump): New.
12396 (set_fast_tracepoint_jump): New.
12397 (uninsert_fast_tracepoint_jumps_at): New.
12398 (reinsert_fast_tracepoint_jumps_at): New.
12399 (set_breakpoint_at): Use write_inferior_memory.
12400 (uninsert_raw_breakpoint): Use write_inferior_memory.
12401 (check_mem_read): Mask out fast tracepoint jumps.
12402 (check_mem_write): Mask out fast tracepoint jumps.
12403 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12404 (set_fast_tracepoint_jump): Declare.
12405 (delete_fast_tracepoint_jump)
12406 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12407 (reinsert_fast_tracepoint_jumps_at): Declare.
12408 * regcache.c: Don't compile many functions when building the
12409 in-process agent library.
12410 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12411 the register buffer in the heap.
12412 (free_register_cache): If the register buffer isn't owned by the
12413 regcache, don't free it.
12414 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12415 pre-existing register caches.
12416 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12417 type.
12418 (convert_ascii_to_int): : Constify `from' parameter type.
12419 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12420 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12421 the needed buffer in-place.
12422 (relocate_instruction): New.
12423 * server.c (handle_query) <qSymbols>: If the target supports
12424 tracepoints, give it a chance of looking up symbols. Report
12425 support for fast tracepoints.
12426 (handle_status): Stabilize threads.
12427 (process_serial_event): Adjust.
12428 * server.h (struct fast_tracepoint_jump): Forward declare.
12429 (struct process_info) <fast_tracepoint_jumps>: New field.
12430 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12431 (decode_X_packet, decode_M_packet): Adjust.
12432 (relocate_instruction): Declare.
12433 (in_process_agent_loaded): Declare.
12434 (tracepoint_look_up_symbols): Declare.
12435 (struct fast_tpoint_collect_status): Declare.
12436 (fast_tracepoint_collecting): Declare.
12437 (force_unlock_trace_buffer): Declare.
12438 (handle_tracepoint_bkpts): Declare.
12439 (initialize_low_tracepoint)
12440 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12441 * target.h (struct target_ops) <stabilize_threads,
12442 install_fast_tracepoint_jump_pad>: New fields.
12443 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12444 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12445 [HAVE_STDINT_H]: Include stdint.h.
12446 (trace_debug_1): Rename to ...
12447 (trace_vdebug): ... this.
12448 (trace_debug): Rename to ...
12449 (trace_debug_1): ... this. Add `level' parameter.
12450 (trace_debug): New.
12451 (ATTR_USED, ATTR_NOINLINE): New.
12452 (IP_AGENT_EXPORT): New.
12453 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12454 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12455 (about_to_request_buffer_space, trace_buffer_is_full)
12456 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12457 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12458 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12459 (traceframe_write_count, traceframes_created)
12460 (trace_state_variables)
12461 New renaming defines.
12462 (struct ipa_sym_addresses): New.
12463 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12464 (symbol_list): New.
12465 (ipa_sym_addrs): New.
12466 (all_tracepoint_symbols_looked_up): New.
12467 (in_process_agent_loaded): New.
12468 (write_e_ipa_not_loaded): New.
12469 (maybe_write_ipa_not_loaded): New.
12470 (tracepoint_look_up_symbols): New.
12471 (debug_threads) [IN_PROCESS_AGENT]: New.
12472 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12473 (UNKNOWN_SIDE_EFFECTS): New.
12474 (stop_tracing): New.
12475 (flush_trace_buffer): New.
12476 (stop_tracing_bkpt): New.
12477 (flush_trace_buffer_bkpt): New.
12478 (read_inferior_integer): New.
12479 (read_inferior_uinteger): New.
12480 (read_inferior_data_pointer): New.
12481 (write_inferior_data_pointer): New.
12482 (write_inferior_integer): New.
12483 (write_inferior_uinteger): New.
12484 (struct collect_static_trace_data_action): Delete.
12485 (enum tracepoint_type): New.
12486 (struct tracepoint) <type>: New field `type'.
12487 <actions_str, step_actions, step_actions_str>: Only include in
12488 GDBserver.
12489 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12490 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12491 (tracepoints): Use IP_AGENT_EXPORT.
12492 (last_tracepoint): Don't include in the IPA.
12493 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12494 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12495 (alloced_trace_state_variables): New.
12496 (trace_state_variables): Use IP_AGENT_EXPORT.
12497 (traceframe_t): Delete unused variable.
12498 (circular_trace_buffer): Don't include in the IPA.
12499 (trace_buffer_start): Delete.
12500 (struct trace_buffer_control): New.
12501 (trace_buffer_free): Delete.
12502 (struct ipa_trace_buffer_control): New.
12503 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12504 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12505 New.
12506 (trace_buffer_ctrl): New.
12507 (TRACE_BUFFER_CTRL_CURR): New.
12508 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12509 Reimplement as macros.
12510 (trace_buffer_wrap): Delete.
12511 (traceframe_write_count, traceframe_read_count)
12512 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12513 (struct tracepoint_hit_ctx) <type>: New field.
12514 (struct fast_tracepoint_ctx): New.
12515 (memory_barrier): New.
12516 (cmpxchg): New.
12517 (record_tracepoint_error): Update atomically in the IPA.
12518 (clear_inferior_trace_buffer): New.
12519 (about_to_request_buffer_space): New.
12520 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12521 updating the same buffer.
12522 (add_tracepoint): Default the tracepoint's type to trap
12523 tracepoint, and orig_size to -1.
12524 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12525 internal variables.
12526 (create_trace_state_variable): New parameter `gdb'. Handle it.
12527 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12528 (cmd_qtdp): Handle fast tracepoints.
12529 (cmd_qtdv): Adjust.
12530 (max_jump_pad_size): New.
12531 (gdb_jump_pad_head): New.
12532 (get_jump_space_head): New.
12533 (claim_jump_space): New.
12534 (sort_tracepoints): New.
12535 (MAX_JUMP_SIZE): New.
12536 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12537 IPA.
12538 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12539 support. Upload fast traceframes, and delete internal IPA
12540 breakpoints.
12541 (stop_tracing_handler): New.
12542 (flush_trace_buffer_handler): New.
12543 (cmd_qtstop): Upload fast tracepoints.
12544 (response_tracepoint): Handle fast tracepoints.
12545 (tracepoint_finished_step): Upload fast traceframes. Set the
12546 tracepoint hit context's tracepoint type.
12547 (handle_tracepoint_bkpts): New.
12548 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12549 type. Add comment about fast tracepoints.
12550 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12551 non-existing action_str field.
12552 (get_context_regcache): Handle fast tracepoints.
12553 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12554 to the regcache.
12555 (fast_tracepoint_from_jump_pad_address): New.
12556 (fast_tracepoint_from_ipa_tpoint_address): New.
12557 (collecting_t): New.
12558 (force_unlock_trace_buffer): New.
12559 (fast_tracepoint_collecting): New.
12560 (collecting): New.
12561 (gdb_collect): New.
12562 (write_inferior_data_ptr): New.
12563 (target_tp_heap): New.
12564 (target_malloc): New.
12565 (download_agent_expr): New.
12566 (UALIGN): New.
12567 (download_tracepoints): New.
12568 (download_trace_state_variables): New.
12569 (upload_fast_traceframes): New.
12570 (IPA_FIRST_TRACEFRAME): New.
12571 (IPA_NEXT_TRACEFRAME_1): New.
12572 (IPA_NEXT_TRACEFRAME): New.
12573 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12574 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12575 (gdb_jump_pad_buffer_end): New.
12576 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12577 (initialize_tracepoint): Adjust.
12578 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12579 buffer. Initialize the low module.
12580 * utils.c (PREFIX, TOOLNAME): New.
12581 (malloc_failure): Use PREFIX.
12582 (error): In the IPA, an error causes an exit.
12583 (fatal, warning): Use PREFIX.
12584 (internal_error): Use TOOLNAME.
12585 (NUMCELLS): Increase to 10.
12586 * configure, config.in: Regenerate.
12587
12588 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12589
12590 * server.c (handle_query) <qSupported>: Do two passes over the
12591 qSupported string to avoid nesting strtok.
12592
12593 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12594
12595 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12596 (CDEPS): New.
12597 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12598 -Wl,--dynamic-list.
12599 * configure: Regenerate.
12600 * proc-service.list: New.
12601
12602 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12603
12604 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12605 New comment.
12606
12607 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12608
12609 * gdbreplay.c (remote_open): Check error return from socket() call by
12610 its equality to -1 not by it being negative.
12611 * remote-utils.c (remote_open): Likewise.
12612
12613 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12614
12615 * config.h: Regenerate.
12616
12617 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12618
12619 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12620 doesn't provide PTRACE_GET_THREAD_AREA.
12621
12622 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12623
12624 * linux-m68k-low.c: Include <asm/ptrace.h>
12625 (ps_get_thread_area): Implement.
12626
12627 2010-05-03 Doug Evans <dje@google.com>
12628
12629 * event-loop.c (struct callback_event): New struct.
12630 (callback_list): New global.
12631 (append_callback_event, delete_callback_event): New functions.
12632 (process_callback): New function.
12633 (start_event_loop): Call it.
12634 * remote-utils.c (NOT_SCHEDULED): Define.
12635 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12636 moved out of readchar.
12637 (readchar): Rewrite. Call reschedule before returning.
12638 (reset_readchar): New function.
12639 (remote_close): Call it.
12640 (process_remaining, reschedule): New functions.
12641 * server.h (callback_handler_func): New typedef.
12642 (append_callback_event, delete_callback_event): Declare.
12643
12644 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12645
12646 * proc-service.c (ps_pglobal_lookup): Use
12647 thread_db_look_up_one_symbol.
12648 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12649 parameter. Use it instead of all_symbols_looked_up.
12650 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12651 field.
12652 (all_symbols_looked_up): Don't declare.
12653 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12654 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12655 field.
12656 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12657 Set all_symbols_looked_up here.
12658 (thread_db_look_up_one_symbol): New.
12659 (thread_db_get_tls_address): Adjust.
12660 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12661 thread_db object on the heap, and tentatively set it in the
12662 process structure.
12663 (thread_db_init): Don't set all_symbols_looked_up here.
12664 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12665
12666 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12667
12668 * linux-low.c (linux_kill, linux_detach): Adjust.
12669 (status_pending_p_callback): Remove redundant statement. Check
12670 for !TARGET_WAITIKIND_IGNORE, instead of
12671 TARGET_WAITKIND_STOPPED.
12672 (handle_tracepoints): Make sure LWP is locked. Adjust.
12673 (linux_wait_for_event_1): Adjust.
12674 (linux_cancel_breakpoints): New.
12675 (unsuspend_one_lwp): New.
12676 (unsuspend_all_lwps): New.
12677 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12678 (send_sigstop_callback): Change return type to int, add new
12679 `except' parameter and handle it.
12680 (suspend_and_send_sigstop_callback): New.
12681 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12682 pass them down. If SUSPEND, also increment the lwp's suspend
12683 count.
12684 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12685 (need_step_over_p): Don't consider suspended LWPs.
12686 (start_step_over): Adjust.
12687 (proceed_one_lwp): Change return type to int, add new `except'
12688 parameter and handle it.
12689 (unsuspend_and_proceed_one_lwp): New.
12690 (proceed_all_lwps): Use find_inferior instead of
12691 for_each_inferior.
12692 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12693 also decrement the suspend count of LWPs. Pass `except' down,
12694 instead of hacking its suspend count.
12695 (linux_pause_all): Add `freeze' parameter. Adjust.
12696 (linux_unpause_all): New.
12697 (linux_target_ops): Install linux_unpause_all.
12698 * server.c (handle_status): Adjust.
12699 * target.h (struct target_ops): New fields `unpause_all' and
12700 `cancel_breakpoints'. Add new parameter to `pause_all'.
12701 (pause_all): Add new `freeze' parameter.
12702 (unpause_all): New.
12703 (cancel_breakpoints): New.
12704 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12705 cancel breakpoints.
12706 (cmd_qtstart): Pause threads.
12707 (stop_tracing): Pause threads, and cancel breakpoints.
12708 * win32-low.c (win32_target_ops): Adjust.
12709
12710 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12711
12712 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12713 the inferior right away from here...
12714 (linux_wait_1): ... to here, and adjust to check the thread's
12715 last_resume_kind instead of the lwp's step or stop_expected flags.
12716
12717 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12718
12719 * README: Use consistent `GDB' and `GDBserver' spellings.
12720
12721 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12722
12723 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12724 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12725 (linux_detach_one_lwp): Assume the lwp is stopped.
12726 (any_thread_of): Delete.
12727 (linux_detach): Stop all lwps here. Don't blindly delete all
12728 breakpoints.
12729 (delete_lwp_callback): New.
12730 (linux_mourn): Delete all lwps of the process that is gone.
12731 (linux_wait_1): Don't delete the last lwp of the process here.
12732 * mem-break.h (mark_breakpoints_out): Declare.
12733 * mem-break.c (mark_breakpoints_out): New.
12734 (free_all_breakpoints): Use it.
12735 * server.c (handle_target_event): If the process is gone, mark
12736 breakpoints out.
12737 * thread-db.c (struct thread_db) <create_bp>: New field.
12738 (thread_db_enable_reporting): Fix prototype. Store a thread event
12739 breakpoint reference in the thread_db struct.
12740 (thread_db_load_search): Clear the thread_db object.
12741 (try_thread_db_load_1): Ditto.
12742 (switch_to_process): New.
12743 (disable_thread_event_reporting): Use it.
12744 (remove_thread_event_breakpoints): New.
12745 (thread_db_detach, thread_db_mourn): Use it.
12746
12747 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12748
12749 * linux-low.c (linux_enable_event_reporting): New.
12750 (linux_wait_for_event_1, handle_extended_wait): Use it.
12751
12752 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12753
12754 * linux-low.c (linux_kill_one_lwp, linux_kill)
12755 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12756 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12757 SIGSTOP even if the LWP is stopped.
12758 (send_sigstop_callback): New.
12759 (stop_all_lwps): Use send_sigstop_callback instead.
12760 (linux_resume_one_thread): Adjust.
12761 (proceed_one_lwp): Still proceed an LWP that the client has
12762 requested to stop, if we haven't reported it as stopped yet. Make
12763 sure that LWPs the client want stopped, have a pending SIGSTOP.
12764
12765 2010-04-26 Doug Evans <dje@google.com>
12766
12767 * server.c (handle_general_set): Make static.
12768
12769 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12770 Print received char after testing for error/eof instead of before.
12771 (input_interrupt): Tweak comment.
12772
12773 2010-04-23 Doug Evans <dje@google.com>
12774
12775 * server.c (start_inferior): Print inferior argv if --debug.
12776
12777 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12778
12779 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12780 * nto-x86-low.c: Include server.h
12781
12782 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12783
12784 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12785 be consistent with other sources of this directory.
12786 (init_registers_amd64): Correct name of source file of this function
12787 in the comment.
12788
12789 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12790
12791 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12792 64-bit executables.
12793
12794 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12795
12796 * win32-i386-low.c: Add 64-bit support.
12797 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12798 (init_registers_amd64): Declare.
12799 (mappings): Add 64-bit version of array.
12800 (init_windows_x86): New function.
12801 (the_low_target): Change init_arch field to init_windows_x86.
12802
12803 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12804
12805 * win32-low.c: Adapt to support also 64-bit architecture.
12806 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12807 (get_image_name): Use SIZE_T type for local variable `done'.
12808 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12809 (toolhelp_get_dll_name): Idem.
12810 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12811 Use uintptr_t typecast to avoid warning.
12812 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12813 (handle_exception): Use phex_nz to avoid warning.
12814 (win32_wait): Remove unused local variable `process'.
12815
12816 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12817
12818 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12819 `amd64-avx.o'.
12820
12821 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12822
12823 * configure.ac: Use `ws2_32' library for srv_mingw.
12824 * configure: Regenerate.
12825 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12826 * remote-utils.c: Likewise.
12827
12828 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12829
12830 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12831 if __x86_64__ is defined.
12832
12833 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12834
12835 * configure: Regenerate.
12836
12837 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12838
12839 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12840 * target.h (target_ops): New get_tib_address field.
12841 * win32-low.h (win32_thread_info): Add thread_local_base field.
12842 * win32-low.c (child_add_thread): Add tlb argument.
12843 Set thread_local_base field to TLB.
12844 (get_child_debug_event): Adapt to child_add_thread change.
12845 (win32_get_tib_address): New function.
12846 (win32_target_ops): Set get_tib_address field to
12847 win32_get_tib_address.
12848 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12849
12850 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12851
12852 * linux-low.c (linux_mourn): Also remove the process.
12853 * server.c (handle_target_event): Don't remove the process here.
12854 * nto-low.c (nto_mourn): New.
12855 (nto_target_ops): Install it.
12856 * spu-low.c (spu_mourn): New.
12857 (spu_target_ops): Install it.
12858 * win32-low.c (win32_mourn): New.
12859 (win32_target_ops): Install it.
12860
12861 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12862
12863 * server.h (buffer_xml_printf): Remove redundant `;'.
12864
12865 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12866
12867 * regcache.c (set_register_cache): Invalidate regcaches before
12868 changing the register cache layout.
12869 (regcache_invalidate_one): Allow a NULL regcache.
12870 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12871 regcaches before changing the register cache layout or the target
12872 regsets.
12873
12874 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12875
12876 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12877 variable warning on Linux/x86-64.
12878
12879 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12880
12881 GDBserver disconnected tracing support.
12882
12883 * linux-low.c (linux_remove_process): Delete.
12884 (add_lwp): Don't set last_resume_kind here.
12885 (linux_kill): Use `mourn'.
12886 (linux_detach): Use `thread_db_detach', and `mourn'.
12887 (linux_mourn): New.
12888 (linux_attach_lwp_1): Adjust comment.
12889 (linux_attach): last_resume_kind moved the thread_info; adjust.
12890 (status_pending_p_callback): Adjust.
12891 (linux_wait_for_event_1): Adjust.
12892 (count_events_callback, select_singlestep_lwp_callback)
12893 (select_event_lwp_callback, cancel_breakpoints_callback)
12894 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12895 (proceed_one_lwp): Adjust.
12896 (linux_async): Add debug output.
12897 (linux_thread_stopped): New.
12898 (linux_pause_all): New.
12899 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12900 linux_pause_all.
12901 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12902 (thread_db_free): Delete declaration.
12903 (thread_db_detach, thread_db_mourn): Declare.
12904 * thread-db.c (thread_db_init): Use thread_db_mourn.
12905 (thread_db_free): Delete, split in two.
12906 (disable_thread_event_reporting): New.
12907 (thread_db_detach): New.
12908 (thread_db_mourn): New.
12909
12910 * server.h (struct thread_info) <last_resume_kind>: New field.
12911 <attached>: Add comment.
12912 <gdb_detached>: New field.
12913 (handler_func): Change return type to int.
12914 (handle_serial_event, handle_target_event): Ditto.
12915 (gdb_connected): Declare.
12916 (tracing): Delete.
12917 (disconnected_tracing): Declare.
12918 (stop_tracing): Declare.
12919
12920 * server.c (handle_query) <qSupported>: Report support for
12921 disconnected tracing.
12922 (queue_stop_reply_callback): Account for running threads.
12923 (gdb_wants_thread_stopped): New.
12924 (gdb_wants_all_threads_stopped): New.
12925 (gdb_reattached_process): New.
12926 (handle_status): Clear the `gdb_detached' flag of all processes.
12927 In all-stop, stop all threads.
12928 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12929 (process_serial_event): If the remote connection breaks, or if an
12930 exit was forced with "monitor exit", force an event loop exit.
12931 Handle disconnected tracing on detach.
12932 (handle_serial_event): Adjust.
12933 (handle_target_event): If GDB isn't connected, forward events back
12934 to the inferior, unless the last process exited, in which case,
12935 exit gdbserver. Adjust interface.
12936
12937 * remote-utils.c (remote_open): Don't block in accept. Instead
12938 register an event loop source on the listen socket file
12939 descriptor. Refactor bits into ...
12940 (listen_desc): ... this new global.
12941 (gdb_connected): ... this new function.
12942 (enable_async_notification): ... this new function.
12943 (handle_accept_event): ... this new function.
12944 (remote_close): Clear remote_desc.
12945
12946 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12947
12948 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12949 New fields.
12950 (mourn_inferior): Define.
12951 (target_process_qsupported): Avoid the dangling else problem.
12952 (thread_stopped): Define.
12953 (pause_all): Define.
12954 (target_waitstatus_to_string): Declare.
12955 * target.c (target_waitstatus_to_string): New.
12956
12957 * tracepoint.c (tracing): Make extern.
12958 (disconnected_tracing): New.
12959 (stop_tracing): Make extern. Handle tracing stops due to GDB
12960 disconnecting.
12961 (cmd_qtdisconnected): New.
12962 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12963 (handle_tracepoint_general_set): Handle QTDisconnected.
12964
12965 * event-loop.c (event_handler_func): Change return type to int.
12966 (process_event): Bail out if the event handler wants the event
12967 loop to stop.
12968 (handle_file_event): Ditto.
12969 (start_event_loop): Bail out if the event handler wants the event
12970 loop to stop.
12971
12972 * nto-low.c (nto_target_ops): Adjust.
12973 * spu-low.c (spu_wait): Don't remove the process here.
12974 (spu_target_ops): Adjust.
12975 * win32-low.c (win32_wait): Don't remove the process here.
12976 (win32_target_ops): Adjust.
12977
12978 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12979
12980 * regcache.c (realloc_register_cache): Invalidate inferior's
12981 regcache before recreating it.
12982
12983 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12984
12985 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12986
12987 2010-04-09 Stan Shebs <stan@codesourcery.com>
12988 Pedro Alves <pedro@codesourcery.com>
12989
12990 * server.h (LONGEST): New.
12991 (struct thread_info) <while_stepping>: New field.
12992 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12993 Declare.
12994 (initialize_tracepoint, handle_tracepoint_general_set)
12995 (handle_tracepoint_query, tracepoint_finished_step)
12996 (tracepoint_was_hit, release_while_stepping_state_list):
12997 (current_traceframe): Declare.
12998 * server.c (handle_general_set): Handle tracepoint packets.
12999 (read_memory): New.
13000 (write_memory): New.
13001 (handle_search_memory_1): Use read_memory.
13002 (handle_query): Report support for conditional tracepoints, trace
13003 state variables, and tracepoint sources. Handle tracepoint
13004 queries.
13005 (main): Initialize the tracepoints module.
13006 (process_serial_event): Handle traceframe reads/writes.
13007
13008 * linux-low.c (handle_tracepoints): New.
13009 (linux_wait_1): Call it.
13010 (linux_resume_one_lwp): Handle while-stepping.
13011 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
13012 (linux_target_ops): Install them.
13013 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
13014 New field.
13015 * linux-x86-low.c (x86_supports_tracepoints): New.
13016 (the_low_target). Install it.
13017
13018 * mem-break.h (delete_breakpoint): Declare.
13019 * mem-break.c (delete_breakpoint): Make external.
13020
13021 * target.h (struct target_ops): Add `supports_tracepoints',
13022 `read_pc', and `write_pc' fields.
13023 (target_supports_tracepoints): Define.
13024 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
13025 (phex_nz): New.
13026
13027 * regcache.h (struct regcache) <registers_owned>: New field.
13028 (init_register_cache, regcache_cpy): Declare.
13029 (regcache_read_pc, regcache_write_pc): Declare.
13030 (register_cache_size): Declare.
13031 (supply_regblock): Declare.
13032 * regcache.c (init_register_cache): New.
13033 (new_register_cache): Use it.
13034 (regcache_cpy): New.
13035 (register_cache_size): New.
13036 (supply_regblock): New.
13037 (regcache_read_pc, regcache_write_pc): New.
13038
13039 * tracepoint.c: New.
13040
13041 * Makefile.in (OBS): Add tracepoint.o.
13042 (tracepoint.o): New rule.
13043
13044 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
13045
13046 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
13047 (i386-mmx.o): New.
13048 (i386-mmx.c): Likewise.
13049 (i386-mmx-linux.o): Likewise.
13050 (i386-mmx-linux.c): Likewise.
13051
13052 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
13053 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
13054 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
13055 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
13056
13057 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
13058 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
13059 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
13060
13061 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
13062
13063 * Makefile.in (clean): Updated.
13064 (i386-avx.o): New.
13065 (i386-avx.c): Likewise.
13066 (i386-avx-linux.o): Likewise.
13067 (i386-avx-linux.c): Likewise.
13068 (amd64-avx.o): Likewise.
13069 (amd64-avx.c): Likewise.
13070 (amd64-avx-linux.o): Likewise.
13071 (amd64-avx-linux.c): Likewise.
13072
13073 * configure.srv (srv_i386_regobj): Add i386-avx.o.
13074 (srv_i386_linux_regobj): Add i386-avx-linux.o.
13075 (srv_amd64_regobj): Add amd64-avx.o.
13076 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
13077 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
13078 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
13079 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
13080 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
13081 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
13082 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
13083
13084 * i387-fp.c: Include "i386-xstate.h".
13085 (i387_xsave): New.
13086 (i387_cache_to_xsave): Likewise.
13087 (i387_xsave_to_cache): Likewise.
13088 (x86_xcr0): Likewise.
13089
13090 * i387-fp.h (i387_cache_to_xsave): Likewise.
13091 (i387_xsave_to_cache): Likewise.
13092 (x86_xcr0): Likewise.
13093
13094 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13095 * linux-crisv32-low.c (target_regsets): Likewise.
13096 * linux-m68k-low.c (target_regsets): Likewise.
13097 * linux-mips-low.c (target_regsets): Likewise.
13098 * linux-ppc-low.c (target_regsets): Likewise.
13099 * linux-s390-low.c (target_regsets): Likewise.
13100 * linux-sh-low.c (target_regsets): Likewise.
13101 * linux-sparc-low.c (target_regsets): Likewise.
13102 * linux-xtensa-low.c (target_regsets): Likewise.
13103
13104 * linux-low.c: Include <sys/uio.h>.
13105 (regsets_fetch_inferior_registers): Support nt_type.
13106 (regsets_store_inferior_registers): Likewise.
13107 (linux_process_qsupported): New.
13108 (linux_target_ops): Add linux_process_qsupported.
13109
13110 * linux-low.h (regset_info): Add nt_type.
13111 (linux_target_ops): Add process_qsupported.
13112
13113 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13114 and <sys/uio.h>.
13115 (init_registers_i386_avx_linux): New.
13116 (init_registers_amd64_avx_linux): Likewise.
13117 (xmltarget_i386_linux_no_xml): Likewise.
13118 (xmltarget_amd64_linux_no_xml): Likewise.
13119 (PTRACE_GETREGSET): Likewise.
13120 (PTRACE_SETREGSET): Likewise.
13121 (x86_fill_xstateregset): Likewise.
13122 (x86_store_xstateregset): Likewise.
13123 (use_xml): Likewise.
13124 (x86_linux_update_xmltarget): Likewise.
13125 (x86_linux_process_qsupported): Likewise.
13126 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13127 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13128 init_registers_i386_linux here. Call
13129 x86_linux_update_xmltarget.
13130 (the_low_target): Add x86_linux_process_qsupported.
13131
13132 * server.c (handle_query): Call target_process_qsupported.
13133
13134 * target.h (target_ops): Add process_qsupported.
13135 (target_process_qsupported): New.
13136
13137 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13138
13139 * inferiors.c (add_thread): Set last_status kind to
13140 TARGET_WAITKIND_IGNORE.
13141 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13142 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13143 (linux_wait_1): Move `thread' local definition to block that uses
13144 it. Don't NULL initialize `event_child'.
13145 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13146 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13147 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13148
13149 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13150
13151 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13152 an extended waitstatus, or by a watchpoint.
13153 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13154 thread was stepping or has been stopped by a watchpoint.
13155
13156 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13157
13158 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13159 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13160 of another, then delete the previous, and validate all
13161 breakpoints.
13162 (validate_inserted_breakpoint): New.
13163 (delete_disabled_breakpoints): New.
13164 (validate_breakpoints): New.
13165 (check_mem_read): Validate breakpoints before trusting their
13166 shadow. Delete disabled breakpoints.
13167 (check_mem_write): Validate breakpoints before trusting they
13168 should be inserted. Delete disabled breakpoints.
13169 * mem-break.h (validate_breakpoints):
13170 * server.c (handle_query): Validate breakpoints when we see a
13171 qSymbol query.
13172
13173 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13174
13175 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13176 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13177 if we could tell there's a GDB breakpoint at stop_pc.
13178 (need_step_over_p): Don't do a step over if we find a GDB
13179 breakpoint at the resume PC.
13180
13181 * mem-break.c (struct raw_breakpoint): New.
13182 (enum bkpt_type): New type `gdb_breakpoint'.
13183 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13184 fields. New field `raw'.
13185 (find_raw_breakpoint_at): New.
13186 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13187 breakpoint instead.
13188 (set_breakpoint_at): Adjust.
13189 (delete_raw_breakpoint): New.
13190 (release_breakpoint): New.
13191 (delete_breakpoint): Rename to...
13192 (delete_breakpoint_1): ... this. Add proc parameter. Use
13193 release_breakpoint. Return ENOENT.
13194 (delete_breakpoint): Reimplement.
13195 (find_breakpoint_at): Delete.
13196 (find_gdb_breakpoint_at): New.
13197 (delete_breakpoint_at): Delete.
13198 (set_gdb_breakpoint_at): New.
13199 (delete_gdb_breakpoint_at): New.
13200 (gdb_breakpoint_here): New.
13201 (set_reinsert_breakpoint): Use release_breakpoint.
13202 (uninsert_breakpoint): Rename to ...
13203 (uninsert_raw_breakpoint): ... this.
13204 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13205 (reinsert_raw_breakpoint): Change parameter type to
13206 raw_breakpoint.
13207 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13208 instead.
13209 (check_breakpoints): Adjust. Use release_breakpoint.
13210 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13211 (breakpoint_inserted_here): Ditto.
13212 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13213 Don't trust the breakpoint's shadow if it is not inserted.
13214 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13215 (delete_all_breakpoints): Adjust.
13216 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13217 use delete_breakpoint_1.
13218
13219 * mem-break.h (breakpoints_supported): Delete declaration.
13220 (set_gdb_breakpoint_at): Declare.
13221 (gdb_breakpoint_here): Declare.
13222 (delete_breakpoint_at): Delete.
13223 (delete_gdb_breakpoint_at): Declare.
13224
13225 * server.h (struct raw_breakpoint): Forward declare.
13226 (struct process_info): New field `raw_breakpoints'.
13227
13228 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13229 breakpoints.
13230
13231 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13232
13233 * linux-low.c (status_pending_p_callback): Fix comment.
13234 (linux_wait_for_event_1): Move most of the internal breakpoint
13235 handling from here...
13236 (linux_wait_1): ... to here.
13237 (count_events_callback): New.
13238 (select_singlestep_lwp_callback): New.
13239 (select_event_lwp_callback): New.
13240 (cancel_breakpoints_callback): New.
13241 (select_event_lwp): New.
13242 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13243 priority to all LWPs that have had events that should be reported
13244 to the client. Cancel breakpoints when about to reporting the
13245 event to the client, not while stopping lwps. No longer cancel
13246 finished single-steps here.
13247 (cancel_finished_single_step): Delete.
13248 (cancel_finished_single_steps): Delete.
13249
13250 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13251
13252 * mem-break.c (enum bkpt_type): New.
13253 (struct breakpoint): New field `type'.
13254 (set_breakpoint_at): Change return type to struct breakpoint
13255 pointer. Set type to `other_breakpoint' by default.
13256 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13257 in the breakpoint list.
13258 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13259 (reinsert_breakpoint): Rename to ...
13260 (reinsert_raw_breakpoint): ... this.
13261 (reinsert_breakpoints_at): Adjust.
13262 * mem-break.h (struct breakpoint): Declare.
13263 (set_breakpoint_at): Change return type to struct breakpoint
13264 pointer.
13265
13266 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13267
13268 * server.c (handle_query): Assign, not compare.
13269
13270 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13271
13272 Teach linux gdbserver to step-over-breakpoints.
13273
13274 * linux-low.c (can_hardware_single_step): New.
13275 (supports_breakpoints): New.
13276 (handle_extended_wait): If stopping threads, read the stop pc of
13277 the new cloned LWP.
13278 (get_pc): New.
13279 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13280 low target doesn't support retrieving the PC.
13281 (add_lwp): Set last_resume_kind to resume_continue.
13282 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13283 (linux_attach): Don't clear stop_expected. Set the lwp's
13284 last_resume_kind to resume_stop.
13285 (linux_detach_one_lwp): Don't check for removed breakpoints.
13286 (check_removed_breakpoint): Delete.
13287 (status_pending_p): Rename to ...
13288 (status_pending_p_callback): ... this. Don't check for removed
13289 breakpoints. Don't consider threads that are stopped from GDB's
13290 perspective.
13291 (linux_wait_for_lwp): Always read the stop_pc here.
13292 (cancel_breakpoint): New.
13293 (step_over_bkpt): New global.
13294 (linux_wait_for_event_1): Implement stepping over breakpoints.
13295 (gdb_wants_lwp_stopped): New.
13296 (gdb_wants_all_stopped): New.
13297 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13298 single-step traps here. Store the thread's last reported target
13299 wait status.
13300 (send_sigstop): Don't clear stop_expected. Always set it,
13301 instead.
13302 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13303 (cancel_finished_single_step): New.
13304 (cancel_finished_single_steps): New.
13305 (wait_for_sigstop): Don't cancel finished single-step traps here.
13306 (linux_resume_one_lwp): Don't check for removed breakpoints.
13307 Don't set `step' on non-hardware step archs.
13308 (linux_set_resume_request): Ignore resume_stop requests if already
13309 stopping or stopped. Set the lwp's last_resume_kind.
13310 (resume_status_pending_p): Don't check for removed breakpoints.
13311 (need_step_over_p): New.
13312 (start_step_over): New.
13313 (finish_step_over): New.
13314 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13315 requests. Clear the thread's last reported target waitstatus.
13316 Don't use the `suspended' flag. Don't consider pending breakpoints.
13317 (linux_resume): Start a step-over if necessary.
13318 (proceed_one_lwp): New.
13319 (proceed_all_lwps): New.
13320 (unstop_all_lwps): New.
13321 * linux-low.h (struct lwp_info): Rewrite comment for the
13322 `suspended' flag. Add the `stop_pc' field. Delete the
13323 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13324 Add `'last_resume_kind' and `need_step_over' fields.
13325 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13326 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13327 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13328 (set_raw_breakpoint_at): New.
13329 (set_breakpoint_at): Rewrite to use it.
13330 (reinsert_breakpoint_handler): Delete.
13331 (set_reinsert_breakpoint): New.
13332 (reinsert_breakpoint_by_bp): Delete.
13333 (delete_reinsert_breakpoints): New.
13334 (uninsert_breakpoint): Rewrite.
13335 (uninsert_breakpoints_at): New.
13336 (reinsert_breakpoint): Rewrite.
13337 (reinsert_breakpoints_at): New.
13338 (check_breakpoints): Rewrite.
13339 (breakpoint_here): New.
13340 (breakpoint_inserted_here): New.
13341 (check_mem_read): Adjust.
13342 * mem-break.h (breakpoints_supported, breakpoint_here)
13343 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13344 (reinsert_breakpoint_by_bp): Delete declaration.
13345 (delete_reinsert_breakpoints): Declare.
13346 (reinsert_breakpoint): Delete declaration.
13347 (reinsert_breakpoints_at): Declare.
13348 (uninsert_breakpoint): Delete declaration.
13349 (uninsert_breakpoints_at): Declare.
13350 (check_breakpoints): Adjust prototype.
13351 * server.h: Adjust include order.
13352 (struct thread_info): Declare here. Add a `last_status' field.
13353
13354 2010-03-23 Michael Snyder <msnyder@vmware.com>
13355
13356 * server.c (crc32): New function.
13357 (handle_query): Add handling for 'qCRC:' request.
13358
13359 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13360
13361 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13362 lwp had been stopped by a watchpoint.
13363
13364 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13365
13366 * server.h (internal_error): Declare.
13367 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13368 * utils.c (internal_error): New function.
13369
13370 2010-03-15 Andreas Schwab <schwab@redhat.com>
13371
13372 * configure.srv: Fix typo setting srv_regobj.
13373
13374 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13375
13376 * linux-low.c (fetch_register): Avoid passing a non string literal
13377 format to `error'.
13378 (usr_store_inferior_registers): Ditto.
13379
13380 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13381
13382 * linux-low.c (linux_write_memory): Bail out early if peeking
13383 memory failed.
13384
13385 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13386
13387 * linux-low.h (struct lwp_info): New fields
13388 `stopped_by_watchpoint' and `stopped_data_address'.
13389 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13390 here, and cache them in the lwp object.
13391 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13392 directly.
13393 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13394 field.
13395 (linux_stopped_by_watchpoint): Rewrite.
13396 (linux_stopped_data_address): Rewrite.
13397
13398 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13399
13400 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13401 switching the current inferior, not before.
13402
13403 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13404
13405 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13406 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13407 i386-linux.c and amd64-linux.c.
13408 (reg-i386.o): Removed.
13409 (reg-i386.c): Likewise.
13410 (reg-i386-linux.o): Likewise.
13411 (reg-i386-linux.c): Likewise.
13412 (reg-x86-64.o): Likewise.
13413 (reg-x86-64.c): Likewise.
13414 (reg-x86-64-linux.o): Likewise.
13415 (reg-x86-64-linux.c): Likewise.
13416 (i386.o): New.
13417 (i386.c): Likewise.
13418 (i386-linux.o): Likewise.
13419 (i386-linux.c): Likewise.
13420 (amd64.o): Likewise.
13421 (amd64.c): Likewise.
13422 (amd64-linux.o): Likewise.
13423 (amd64-linux.c): Likewise.
13424
13425 * configure.srv (srv_i386_regobj): New.
13426 (srv_i386_linux_regobj): Likewise.
13427 (srv_amd64_regobj): Likewise.
13428 (srv_amd64_linux_regobj): Likewise.
13429 (srv_i386_32bit_xmlfiles): Likewise.
13430 (srv_i386_64bit_xmlfiles): Likewise.
13431 (srv_i386_xmlfiles): Likewise.
13432 (srv_amd64_xmlfiles): Likewise.
13433 (srv_i386_linux_xmlfiles): Likewise.
13434 (srv_amd64_linux_xmlfiles): Likewise.
13435 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13436 srv_xmlfiles to $srv_i386_xmlfiles.
13437 (i[34567]86-*-mingw32ce*): Likewise.
13438 (i[34567]86-*-mingw*): Likewise.
13439 (i[34567]86-*-nto*): Likewise.
13440 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13441 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13442 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13443 (x86_64-*-linux*): Likewise.
13444
13445 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13446 (init_registers_amd64_linux): New.
13447 (x86_arch_setup): Replace init_registers_x86_64_linux with
13448 init_registers_amd64_linux.
13449
13450 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13451
13452 * configure.ac: Check for libdl. If it is not available link against
13453 static libthread_db.
13454 * configure: Regenerate.
13455
13456 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13457
13458 PR9605
13459
13460 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13461 handing a read watchpoint.
13462 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13463
13464 2010-02-12 Doug Evans <dje@google.com>
13465
13466 * linux-low.c (linux_supports_tracefork_flag): Document.
13467 (linux_look_up_symbols): Add comment.
13468
13469 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13470
13471 * regcache.c (supply_register): Clear regcache if buf is NULL.
13472
13473 2010-02-02 Nicolas Roche <roche@sourceware.org>
13474 Joel Brobecker <brobecker@adacore.com>
13475
13476 * inferiors.c (find_inferior): Add function documentation.
13477 (unloaded_dll): Handle the case where the unloaded dll has not
13478 been previously registered in the dll list.
13479
13480 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13481
13482 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13483 (thumb2_breakpoint): New.
13484 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13485
13486 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13487
13488 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13489 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13490 breakpoints.
13491
13492 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13493
13494 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13495
13496 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13497
13498 * linux-s390-low.c (s390_collect_ptrace_register)
13499 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13500
13501 2010-01-21 Doug Evans <dje@google.com>
13502
13503 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13504 (PTRACE_ARG4_TYPE): New macro.
13505 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13506 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13507 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13508 (usr_store_inferior_registers): Ditto.
13509 (linux_read_memory, linux_write_memory): Ditto.
13510 (linux_test_for_tracefork): Ditto.
13511
13512 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13513 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13514
13515 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13516
13517 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13518 target.
13519
13520 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13521
13522 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13523 prototype to take a regcache. Adjust.
13524
13525 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13526
13527 * regcache.h (struct thread_info): Forward declare.
13528 (struct regcache): New.
13529 (new_register_cache): Adjust prototype.
13530 (get_thread_regcache): Declare.
13531 (free_register_cache): Adjust prototype.
13532 (registers_to_string, registers_from_string): Ditto.
13533 (supply_register, supply_register_by_name, collect_register)
13534 (collect_register_as_string, collect_register_by_name): Ditto.
13535 * regcache.c (struct inferior_regcache_data): Delete.
13536 (get_regcache): Rename to ...
13537 (get_thread_regcache): ... this. Adjust. Switch inferior before
13538 fetching registers.
13539 (regcache_invalidate_one): Adjust.
13540 (regcache_invalidate): Fix prototype.
13541 (new_register_cache): Return the new register cache.
13542 (free_register_cache): Change prototype.
13543 (realloc_register_cache): Adjust.
13544 (registers_to_string): Change prototype to take a regcache. Adjust.
13545 (registers_from_string): Ditto.
13546 (register_data): Ditto.
13547 (supply_register): Ditto.
13548 (supply_register_by_name): Ditto.
13549 (collect_register): Ditto.
13550 (collect_register_as_string): Ditto.
13551 (collect_register_by_name): Ditto.
13552 * server.c (process_serial_event): Adjust.
13553 * linux-low.h (regset_fill_func, regset_store_func): Change
13554 prototype.
13555 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13556 Change prototype.
13557 * linux-low.c (get_stop_pc): Adjust.
13558 (check_removed_breakpoint): Adjust.
13559 (linux_wait_for_event): Adjust.
13560 (linux_resume_one_lwp): Adjust.
13561 (fetch_register): Add regcache parameter. Adjust.
13562 (usr_store_inferior_registers): Ditto.
13563 (regsets_fetch_inferior_registers): Ditto.
13564 (regsets_store_inferior_registers): Ditto.
13565 (linux_fetch_registers, linux_store_registers): Ditto.
13566 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13567 regcache. Adjust.
13568 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13569 Ditto.
13570 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13571 prototype to take a regcache.
13572 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13573 * remote-utils.c (convert_ascii_to_int, outreg)
13574 (prepare_resume_reply): Change prototype to take a regcache.
13575 Adjust.
13576 * target.h (struct target_ops) <fetch_registers, store_registers>:
13577 Change prototype to take a regcache.
13578 (fetch_inferior_registers, store_inferior_registers): Change
13579 prototype to take a regcache. Adjust.
13580 * proc-service.c (ps_lgetregs): Adjust.
13581 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13582 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13583 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13584 take a regcache. Adjust.
13585 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13586 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13587 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13588 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13589 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13590 (cris_cannot_fetch_register):
13591 (cris_breakpoint_at): Change prototype to take a regcache.
13592 Adjust.
13593 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13594 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13595 to take a regcache. Adjust.
13596 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13597 Adjust.
13598 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13599 take a regcache. Adjust.
13600 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13601 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13602 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13603 * linux-mips-low.c (mips_get_pc):
13604 (mips_set_pc): Change prototype to take a regcache. Adjust.
13605 (mips_reinsert_addr): Adjust.
13606 (mips_collect_register): Change prototype to take a regcache.
13607 Adjust.
13608 (mips_supply_register):
13609 (mips_collect_register_32bit, mips_supply_register_32bit)
13610 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13611 (mips_store_fpregset): Ditto.
13612 * linux-ppc-low.c (ppc_supply_ptrace_register)
13613 (ppc_supply_ptrace_register): Ditto.
13614 (parse_spufs_run): Adjust.
13615 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13616 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13617 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13618 take a regcache. Adjust.
13619 * linux-s390-low.c (s390_collect_ptrace_register)
13620 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13621 (s390_set_pc): Change prototype to take a regcache. Adjust.
13622 (s390_arch_setup): Adjust.
13623 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13624 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13625 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13626 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13627 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13628 regcache. Adjust.
13629 (sparc_breakpoint_at): Adjust.
13630 * linux-xtensa-low.c (xtensa_fill_gregset):
13631 (xtensa_store_gregset):
13632 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13633 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13634 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13635 prototype to take a regcache. Adjust.
13636 * win32-arm-low.c (arm_fetch_inferior_register)
13637 (arm_store_inferior_register): Change prototype to take a
13638 regcache. Adjust.
13639 * win32-i386-low.c (i386_fetch_inferior_register)
13640 (i386_store_inferior_register): Change prototype to take a
13641 regcache. Adjust.
13642 * win32-low.c (child_fetch_inferior_registers)
13643 (child_store_inferior_registers): Change prototype to take a
13644 regcache. Adjust.
13645 (win32_wait): Adjust.
13646 (win32_fetch_inferior_registers): Change prototype to take a
13647 regcache. Adjust.
13648 (win32_store_inferior_registers): Adjust.
13649 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13650 store_inferior_register>: Change prototype to take a regcache.
13651
13652 2010-01-20 Doug Evans <dje@google.com>
13653
13654 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13655 #ifdef.
13656 (linux_wait_for_event1, linux_init_signals): Ditto.
13657 (W_STOPCODE): Provide definition if missing.
13658
13659 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13660
13661 * linux-low.c (linux_core_of_thread): New.
13662 (compare_ints, show_process, list_threads): New.
13663 (linux_qxfer_osdata): Report threads and cores.
13664 (linux_target_op): Register linux_core_of_thread.
13665 * remote-utils.c (prepare_resume_reply): Report the core.
13666 (buffer_xml_printf): Support %d specifier.
13667 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13668 New.
13669 (handle_query): Handle qXfer:threads. Announce availability
13670 thereof.
13671 * target.h (struct target_ops): New field core_of_thread.
13672
13673 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13674
13675 * Makefile.in (clean): Remove new generated files.
13676 (reg-s390.o, reg-s390.c): Remove rules.
13677 (reg-s390x.o, reg-s390x.c): Likewise.
13678 (s390-linux32.o, s390-linux32.c): Add rules.
13679 (s390-linux64.o, s390-linux64.c): Likewise.
13680 (s390x-linux64.o, s390x-linux64.c): Likewise.
13681 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13682 * linux-s390-low.c: Include <elf.h>.
13683 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13684 (init_registers_s390): Remove prototype.
13685 (init_registers_s390x): Likewise.
13686 (init_registers_s390_linux32): Add prototype.
13687 (init_registers_s390_linux64): Likewise.
13688 (init_registers_s390x_linux64): Likewise.
13689 (s390_num_regs_3264): New define.
13690 (s390_regmap_3264): New global variable.
13691 (s390_cannot_fetch_register): Remove obsolete check.
13692 (s390_cannot_store_register): Likewise.
13693 (s390_collect_ptrace_register): Handle upper/lower register halves.
13694 (s390_supply_ptrace_register): Likewise.
13695 (s390_fill_gregset): Update to register number changes.
13696 (s390_get_hwcap): New routine.
13697 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13698 Install appropriate regmap and register set.
13699
13700 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13701
13702 * server.c (gdbserver_version): Update copyright year to 2010.
13703 * gdbreplay.c (gdbreplay_version): Likewise.
13704
13705 2009-12-28 Doug Evans <dje@google.com>
13706
13707 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13708 elf/external.h. Include <elf.h> instead but only if necessary.
13709
13710 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13711
13712 * linux-low.c (linux_remove_process): Remove `detaching'
13713 parameter. Don't release/detach from thread_db here.
13714 (linux_kill): Release/detach from thread_db here, ...
13715 (linux_detach): ... and here, before actually detaching.
13716 (linux_wait_1): ... and here, when a process exits.
13717 * thread-db.c (any_thread_of): New.
13718 (thread_db_free): Switch the current inferior to a thread of the
13719 passed in process.
13720
13721 2009-12-21 Doug Evans <dje@google.com>
13722
13723 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13724
13725 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13726 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13727 warning ifndef __NR_tkill. Move setting of errno there too.
13728 Delete unnecessary resetting of errno after syscall.
13729 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13730
13731 * configure.ac: Check for dladdr.
13732 * config.in: Regenerate.
13733 * configure: Regenerate.
13734 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13735 (try_thread_db_load): Update.
13736
13737 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13738
13739 2009-12-18 Doug Evans <dje@google.com>
13740
13741 * event-loop.c: Include unistd.h if it exists.
13742
13743 * linux-low.c (my_waitpid): Move definition away from being in
13744 between linux_tracefork_child/linux_test_for_tracefork.
13745
13746 * gdb_proc_service.h (psaddr_t): Fix type.
13747 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13748 signature to match glibc.
13749
13750 2009-12-16 Doug Evans <dje@google.com>
13751
13752 * linux-low.c (linux_read_memory): Fix argument to read.
13753
13754 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13755
13756 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13757 events, don't leave current_inferior pointing at null.
13758
13759 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13760
13761 * win32-low.c (LOG): Delete.
13762 (OUTMSG): Output to stderr.
13763 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13764 on compile time LOG macro.
13765 (win32_wait): Fix debug output.
13766
13767 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13768
13769 * win32-low.c (win32_add_one_solib): If the dll name is
13770 "ntdll.dll", prepend the system directory to the dll path.
13771
13772 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13773
13774 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13775
13776 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13777 Vladimir Prus <vladimir@codesourcery.com>
13778
13779 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13780 * configure.ac: Check for __mcoldfire__ and set
13781 gdb_cv_m68k_is_coldfire.
13782 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13783 reg-cf.o and reg-m68k.o.
13784 * configure: Regenerated.
13785
13786 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13787
13788 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13789 Pass it to thread_db_free.
13790 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13791 proper `detaching' argument to linux_remove_process.
13792 * linux-low.h (thread_db_free): Add `detaching' parameter.
13793 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13794 to thread_db_free.
13795 (thread_db_free): Add `detaching' parameter. Only
13796 call td_ta_clear_event if detaching from process.
13797
13798 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13799
13800 * thread-db.c (thread_db_free): Fix typo.
13801
13802 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13803
13804 PR gdb/10838
13805 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13806
13807 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13808
13809 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13810 with an i686 compiler.
13811 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13812 needed.
13813 * configure: Rebuilt.
13814
13815 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13816
13817 PR gdb/10783
13818
13819 * server.c (handle_search_memory_1): Correct read_addr initialization
13820 in loop for searching subsequent chunks.
13821
13822 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13823
13824 * configure.ac: New --with-libthread-db option.
13825 * thread-db.c: Allow direct dependence on libthread_db.
13826 (thread_db_free): Adjust.
13827 * config.in: Regenerate.
13828 * configure: Likewise.
13829
13830 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13831
13832 PR gdb/10757
13833 * thread-db.c (attach_thread): New function.
13834 (maybe_attach_thread): Return success/failure.
13835 (find_new_threads_callback): Adjust.
13836 (thread_db_find_new_threads): Loop until no new threads.
13837
13838 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13839
13840 * proc-service.c (ps_lgetregs): Formatting.
13841
13842 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13843
13844 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13845 * configure.ac: Adjust.
13846 * linux-low.h (struct process_info_private): Move members to struct
13847 thread_db.
13848 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13849 * linux-low.c (linux_remove_process): Adjust.
13850 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13851 * server.c (handle_query): Move code ...
13852 (handle_monitor_command): ... here. New function.
13853 * target.h (struct target_ops): New member.
13854 * thread-db.c (struct thread_db): New.
13855 (libthread_db_search_path): New variable.
13856 (thread_db_create_event, thread_db_enable_reporting)
13857 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13858 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13859 (try_thread_db_load_1, dladdr_to_soname): New functions.
13860 (try_thread_db_load, thread_db_load_search): New functions.
13861 (thread_db_init): Search for libthread_db.
13862 (thread_db_free): New function.
13863 (thread_db_handle_monitor_command): Likewise.
13864 * config.in: Regenerate.
13865 * configure: Regenerate.
13866
13867 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13868
13869 * spu-low.c (spu_kill): Wait for inferior to terminate.
13870 Call clear_inferiors.
13871 (spu_detach): Call clear_inferiors.
13872
13873 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13874
13875 * aclocal.m4: Regenerate.
13876 * config.in: Likewise.
13877 * configure: Likewise.
13878
13879 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13880
13881 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13882 (parse_spufs_run): New function.
13883 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13884 (ppc_breakpoint_at): Handle SPU breakpoints.
13885
13886 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13887
13888 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13889 (SPUFS_MAGIC): Define.
13890 (spu_enumerate_spu_ids): New function.
13891 (linux_qxfer_spu): New function.
13892 (linux_target_ops): Install linux_qxfer_spu.
13893
13894 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13895
13896 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13897 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13898 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13899 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13900 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13901 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13902 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13903 (init_registers_powerpc_cell32l): Add prototype.
13904 (init_registers_powerpc_cell64l): Likewise.
13905 (ppc_arch_setup): Detect Cell/B.E. architecture.
13906
13907 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13908
13909 * Makefile.in (datarootdir): New variable.
13910
13911 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13912
13913 * linux-low.c (linux_write_memory): Update debugging output.
13914 * Makefile.in (clean): Add new descriptions.
13915 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13916 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13917 * configure.srv: Add new files for arm*-*-linux*.
13918 * linux-arm-low.c: Add new declarations.
13919 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13920 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13921 (HWCAP_VFPv3D16): New.
13922 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13923 instead of __IWMMXT__.
13924 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13925 (arm_arch_setup): New.
13926 (target_regsets): Remove #ifdef. Add VFP regset.
13927 (the_low_target): Use arm_arch_setup.
13928
13929 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13930
13931 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13932 the main thread again.
13933
13934 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13935
13936 Adding Neutrino gdbserver.
13937 * configure: Regenerated.
13938 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13939 * configure.srv (i[34567]86-*-nto*): New target.
13940 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13941 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13942 (nto_comctrl) [__QNX__]: New function.
13943 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13944
13945 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13946
13947 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13948 srv_tgtobj.
13949
13950 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13951 Pedro Alves <pedro@codesourcery.com>
13952
13953 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13954 don't support CONTEXT_EXTENDED_REGISTERS.
13955 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13956 (the_low_target): Install them.
13957 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13958 failing with ERROR_PIPE_NOT_CONNECTED.
13959
13960 2009-06-30 Doug Evans <dje@google.com>
13961 Pierre Muller <muller@ics.u-strasbg.fr>
13962
13963 Add h/w watchpoint support to x86-linux, win32-i386.
13964 * Makefile.in (SFILES): Add i386-low.c
13965 (i386_low_h): Define.
13966 (i386-low.o): Add dependencies.
13967 (linux-x86-low.o): Add i386-low.h dependency.
13968 (win32-i386-low.o): Ditto.
13969 * i386-low.c: New file.
13970 * i386-low.h: New file.
13971 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13972 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13973 * linux-low.c (linux_add_process): Initialize arch_private.
13974 (linux_remove_process): Free arch_private.
13975 (add_lwp): Initialize arch_private.
13976 (delete_lwp): Free arch_private.
13977 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13978 provided.
13979 * linux-low.h (process_info_private): New member arch_private.
13980 (lwp_info): New member arch_private.
13981 (linux_target_ops): New members new_process, new_thread,
13982 prepare_to_resume.
13983 (ptid_of): New macro.
13984 * linux-x86-low.c: Include stddef.h, i386-low.h.
13985 (arch_process_info): New struct.
13986 (arch_lwp_info): New struct.
13987 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13988 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13989 (i386_dr_low_get_status): New function.
13990 (x86_insert_point, x86_remove_point): New functions.
13991 (x86_stopped_by_watchpoint): New function.
13992 (x86_stopped_data_address): New function.
13993 (x86_linux_new_process, x86_linux_new_thread): New functions.
13994 (x86_linux_prepare_to_resume): New function.
13995 (the_low_target): Add entries for insert_point, remove_point,
13996 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13997 prepare_to_resume.
13998 * server.c (debug_hw_points): New global.
13999 (monitor_show_help): Document set debug-hw-points.
14000 (handle_query): Process "set debug-hw-points".
14001 * server.h (debug_hw_points): Declare.
14002 (paddress): Declare.
14003 * utils.c (NUMCELLS, CELLSIZE): New macros.
14004 (get_sell, xsnprintf, paddress): New functions.
14005 * win32-arm-low.c (the_low_target): Add entries for insert_point,
14006 remove_point, stopped_by_watchpoint, stopped_data_address.
14007 * win32-i386-low.c: Include i386-low.h.
14008 (debug_reg_state): Replaces dr.
14009 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
14010 (i386_dr_low_get_status): New function.
14011 (i386_insert_point, i386_remove_point): New functions.
14012 (i386_stopped_by_watchpoint): New function.
14013 (i386_stopped_data_address): New function.
14014 (i386_initial_stuff): Update.
14015 (get_thread_context,set_thread_context,i386_thread_added): Update.
14016 (the_low_target): Add entries for insert_point,
14017 remove_point, stopped_by_watchpoint, stopped_data_address.
14018 * win32-low.c (win32_insert_watchpoint): New function.
14019 (win32_remove_watchpoint): New function.
14020 (win32_stopped_by_watchpoint): New function.
14021 (win32_stopped_data_address): New function.
14022 (win32_target_ops): Add entries for insert_watchpoint,
14023 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
14024 * win32-low.h (win32_target_ops): New members insert_point,
14025 remove_point, stopped_by_watchpoint, stopped_data_address.
14026
14027 2009-06-25 Pedro Alves <pedro@codesourcery.com>
14028
14029 * server.c (process_serial_event): Re-return unsupported, not
14030 error, if the type isn't recognized. Re-allow supporting only
14031 insert or remove packets. Also call require_running for
14032 breakpoints. Add missing break statement to default case. Tidy.
14033 * target.h (struct target_ops): Rename insert_watchpoint to
14034 insert_point, and remove_watchpoint to remove_point.
14035
14036 * linux-low.h (struct linux_target_ops): Likewise.
14037 * linux-low.c (linux_insert_watchpoint): Rename to ...
14038 (linux_insert_point): ... this. Adjust.
14039 (linux_remove_watchpoint): Rename to ...
14040 (linux_remove_point): ... this. Adjust.
14041 (linux_target_ops): Adjust.
14042 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
14043 (cris_insert_point): ... this.
14044 (cris_remove_watchpoint): Rename to ...
14045 (cris_remove_point): ... this.
14046 (the_low_target): Adjust.
14047
14048 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
14049
14050 * server.c (handle_v_kill): Pass signal_pid to
14051 kill_inferior if multi_process is zero.
14052
14053 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
14054
14055 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
14056 * target.h (target_ops): Comment for *_watchpoint to make it clear
14057 the functions can get types '0' and '1'.
14058
14059 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
14060
14061 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
14062 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
14063 * regcache.c (get_regcache): Likewise.
14064 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
14065 * win32-low.c (child_fetch_inferior_registers): Remove check for
14066 regno 0.
14067
14068 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
14069 Pedro Alves <pedro@codesourcery.com>
14070
14071 * target.h (struct target_ops) <supports_multi_process>: New
14072 callback.
14073 (target_supports_multi_process): New.
14074 * server.c (handle_query): Even if GDB reports support, only
14075 enable multi-process if the target also supports it. Report
14076 multi-process support only if the target backend supports it.
14077 * linux-low.c (linux_supports_multi_process): New function.
14078 (linux_target_ops): Install it as target_supports_multi_process
14079 callback.
14080
14081 2009-05-24 Doug Evans <dje@google.com>
14082
14083 Global renaming of find_thread_pid to find_thread_ptid.
14084 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14085 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14086 All callers updated.
14087
14088 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14089 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14090 directly.
14091
14092 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14093 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14094 (linux_resume_one_lwp): Ditto.
14095
14096 2009-05-23 Doug Evans <dje@google.com>
14097
14098 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14099 from struct inferior_list_entry * to struct lwp_info *.
14100 All callers updated.
14101
14102 2009-05-13 Doug Evans <dje@google.com>
14103
14104 * linux-x86-low.c: Don't include assert.h.
14105 (x86_siginfo_fixup): Use fatal, not assert.
14106 (x86_arch_setup): Fix comment.
14107
14108 2009-05-12 Doug Evans <dje@google.com>
14109
14110 Biarch support for i386/amd64 gdbserver.
14111 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14112 Add linux-x86-low.c.
14113 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14114 (linux-x86-low.o): Add.
14115 * linux-x86-64-low.c: Delete.
14116 * linux-i386-low.c: Delete.
14117 * linux-x86-low.c: New file.
14118 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14119 linux-x86-low.o.
14120 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14121 linux-x86-low.o.
14122 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14123 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14124 (linux_child_pid_to_exec_file): New function.
14125 (elf_64_header_p, elf_64_file_p): New functions.
14126 (siginfo_fixup): New function.
14127 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14128 give target a chance to convert layout.
14129 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14130 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14131
14132 2009-05-07 Doug Evans <dje@google.com>
14133
14134 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14135 (regsets_store_inferior_registers): Ditto.
14136
14137 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14138
14139 PR server/10048
14140
14141 * linux-low.c (must_set_ptrace_flags): Delete.
14142 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14143 of the global.
14144 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14145 `lwp->must_set_ptrace_flags' instead.
14146 (linux_wait_for_event_1): Set ptrace options here.
14147 (linux_wait_1): ... not here.
14148
14149 2009-04-30 Doug Evans <dje@google.com>
14150
14151 * inferiors.c (started_inferior_callback): New function.
14152 (attached_inferior_callback): New function.
14153 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14154 * server.c (print_started_pid, print_attached_pid): New functions.
14155 (detach_or_kill_for_exit): New function.
14156 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14157 * server.h (have_started_inferiors_p): Declare.
14158 (have_attached_inferiors_p): Declare.
14159
14160 * inferiors.c (remove_process): Fix memory leak, free process.
14161 * linux-low.c (linux_remove_process): New function.
14162 (linux_kill): Call it instead of remove_process.
14163 (linux_detach, linux_wait_1): Ditto.
14164
14165 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14166
14167 * configure.srv: Add x86 Windows CE target.
14168
14169 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14170
14171 * inferiors.c (get_thread_process): Make global.
14172 * server.h (get_thread_process): Add prototype.
14173 * thread-db.c (find_one_thread): Use get_thread_process
14174 instead of current_process.
14175 (thread_db_get_tls_address): Do not crash if called when
14176 thread layer is not yet initialized.
14177
14178 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14179
14180 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14181 * spu-low.c (current_tid): Rename to ...
14182 (current_ptid): ... this.
14183 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14184 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14185 ptid_get_lwp (current_ptid) instead of current_tid.
14186 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14187 instead of current_tid. Use find_process_pid to verify pid
14188 argument is valid. Pass proper argument to remove_process.
14189 (spu_thread_alive): Compare current_ptid instead of current_tid.
14190 (spu_resume): Likewise.
14191
14192 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14193
14194 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14195 variable.
14196
14197 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14198
14199 Implement the multiprocess extensions, and add linux multiprocess
14200 support.
14201
14202 * server.h (ULONGEST): Declare.
14203 (struct ptid, ptid_t): New.
14204 (minus_one_ptid, null_ptid): Declare.
14205 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14206 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14207 (struct inferior_list_entry): Change `id' type from unsigned from
14208 to ptid_t.
14209 (struct sym_cache, struct breakpoint, struct
14210 process_info_private): Forward declare.
14211 (struct process_info): Declare.
14212 (current_process): Declare.
14213 (all_processes): Declare.
14214 (initialize_inferiors): Declare.
14215 (add_thread): Adjust to use ptid_t.
14216 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14217 (add_process, remove_process, find_thread_pid): Declare.
14218 (find_inferior_id): Adjust to use ptid_t.
14219 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14220 (multi_process): Declare.
14221 (push_event): Adjust to use ptid_t.
14222 (read_ptid, write_ptid): Declare.
14223 (prepare_resume_reply): Adjust to use ptid_t.
14224 (clear_symbol_cache): Declare.
14225 * inferiors.c (all_processes): New.
14226 (null_ptid, minus_one_ptid): New.
14227 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14228 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14229 (add_thread): Change unsigned long to ptid. Remove gdb_id
14230 parameter. Adjust.
14231 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14232 (gdb_id_to_thread): Rename to ...
14233 (find_thread_pid): ... this. Change unsigned long to ptid.
14234 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14235 (loaded_dll, pull_pid_from_list): Adjust.
14236 (add_process, remove_process, find_process_pid)
14237 (get_thread_process, current_process, initialize_inferiors): New.
14238 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14239 (struct target_waitstatus) <related_pid>: Ditto.
14240 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14241 return type to int.
14242 (struct target_ops) <join>: Add `pid' argument.
14243 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14244 (struct target_ops) <wait>: Add `ptid' field. Change return type
14245 to ptid.
14246 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14247 (mywait): Add `ptid' argument. Change return type to ptid_t.
14248 (target_pid_to_str): Declare.
14249 * target.c (set_desired_inferior): Adjust to use ptids.
14250 (mywait): Add new `ptid' argument. Adjust.
14251 (target_pid_to_str): New.
14252 * mem-break.h (free_all_breakpoints): Declare.
14253 * mem-break.c (breakpoints): Delelete.
14254 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14255 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14256 to use per-process breakpoint list.
14257 (free_all_breakpoints): New.
14258 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14259 (symbol_cache, all_symbols_looked_up): Delete.
14260 (hexchars): New.
14261 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14262 read_ptid): New.
14263 (prepare_resume_reply): Change ptid argument's type from unsigned
14264 long to ptid_t. Adjust. Implement W;process and X;process.
14265 (free_sym_cache, clear_symbol_cache): New.
14266 (look_up_one_symbol): Adjust to per-process symbol cache. *
14267 * server.c (cont_thread, general_thread, step_thread): Change type
14268 to ptid_t.
14269 (attached): Delete.
14270 (multi_process): New.
14271 (last_ptid): Change type to ptid_t.
14272 (struct vstop_notif) <ptid>: Change type to ptid_t.
14273 (queue_stop_reply, push_event): Change `ptid' argument's type to
14274 ptid_t.
14275 (discard_queued_stop_replies): Add `pid' argument.
14276 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14277 changes. Don't reference the `attached' global.
14278 (attach_inferior): Adjust to mywait interface changes.
14279 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14280 features. Handle and report "multiprocess+". Handle
14281 "qAttached:PID".
14282 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14283 changes.
14284 (handle_v_kill): New.
14285 (handle_v_stopped): Adjust to use target_pid_to_str.
14286 (handle_v_requests): Allow multiple attaches and runs when
14287 multiprocess extensions are in effect. Handle "vKill".
14288 (myresume): Adjust to use ptids.
14289 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14290 (handle_status): Adjust to discard_queued_stop_replies interface
14291 change.
14292 (first_thread_of, kill_inferior_callback)
14293 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14294 (main): Call initialize_inferiors. Adjust to use ptids, killing
14295 and detaching from all inferiors. Handle multiprocess packet
14296 variants.
14297 * linux-low.h: Include gdb_proc_service.h.
14298 (struct process_info_private): New.
14299 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14300 <lwpid_of>: Use ptid_get_lwp.
14301 (get_lwp_thread): Adjust.
14302 (struct lwp_info): Add `dead' member.
14303 (find_lwp_pid): Declare.
14304 * linux-low.c (thread_db_active): Delete.
14305 (new_inferior): Adjust comment.
14306 (inferior_pid): Delete.
14307 (linux_add_process): New.
14308 (handle_extended_wait): Adjust.
14309 (add_lwp): Change unsigned long to ptid.
14310 (linux_create_inferior): Add process to processes table. Adjust
14311 to use ptids. Don't set new_inferior here.
14312 (linux_attach_lwp): Rename to ...
14313 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14314 it. Adjust to use ptids.
14315 (linux_attach_lwp): New.
14316 (linux_attach): Add process to processes table. Don't set
14317 new_inferior here.
14318 (struct counter): New.
14319 (second_thread_of_pid_p, last_thread_of_process_p): New.
14320 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14321 multiple processes.
14322 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14323 processes. Remove process from process table.
14324 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14325 to multiple processes.
14326 (any_thread_of): New.
14327 (linux_detach): Add `pid' argument, and handle it. Remove process
14328 from processes table.
14329 (linux_join): Add `pid' argument. Handle it.
14330 (linux_thread_alive): Change unsighed long argument to ptid_t.
14331 Consider dead lwps as not being alive.
14332 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14333 threads we're not interested in.
14334 (same_lwp, find_lwp_pid): New.
14335 (linux_wait_for_lwp): Change `pid' argument's type from int to
14336 ptid_t. Adjust.
14337 (linux_wait_for_event): Rename to ...
14338 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14339 from int to ptid_t. Adjust.
14340 (linux_wait_for_event): New.
14341 (linux_wait_1): Add `ptid' argument. Change return type to
14342 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14343 that exit from the process table.
14344 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14345 Adjust.
14346 (mark_lwp_dead): New.
14347 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14348 stopping all threads, mark its main lwp as dead.
14349 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14350 ptids.
14351 (fetch_register, usr_store_inferior_registers)
14352 (regsets_fetch_inferior_registers)
14353 (regsets_store_inferior_registers, linux_read_memory)
14354 (linux_write_memory): Inline `inferior_pid'.
14355 (linux_look_up_symbols): Adjust to use per-process
14356 `thread_db_active'.
14357 (linux_request_interrupt): Adjust to use ptids.
14358 (linux_read_auxv): Inline `inferior_pid'.
14359 (initialize_low): Don't reference thread_db_active.
14360 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14361 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14362 (ps_getpid): Return the pid of the current inferior.
14363 * thread-db.c (proc_handle, thread_agent): Delete.
14364 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14365 per-process data.
14366 (find_one_thread): Change argument type to ptid_t. Adjust to
14367 per-process data.
14368 (maybe_attach_thread): Adjust to per-process data and ptids.
14369 (thread_db_find_new_threads): Ditto.
14370 (thread_db_init): Ditto.
14371 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14372 processes table. Adjust to use ptids.
14373 (spu_kill, spu_detach): Adjust interface. Remove process from
14374 processes table.
14375 (spu_join, spu_thread_alive): Adjust interface.
14376 (spu_wait): Adjust interface. Remove process from processes
14377 table. Adjust to use ptids.
14378 * win32-low.c (current_inferior_tid): Delete.
14379 (current_inferior_ptid): New.
14380 (debug_event_ptid): New.
14381 (thread_rec): Take a ptid. Adjust.
14382 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14383 (child_delete_thread): Ditto.
14384 (do_initial_child_stuff): Add `attached' argument. Add process to
14385 processes table.
14386 (child_fetch_inferior_registers, child_store_inferior_registers):
14387 Adjust.
14388 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14389 (win32_attach): Pass 1 to do_initial_child_stuff.
14390 (win32_kill): Adjust interface. Remove process from processes
14391 table.
14392 (win32_detach): Ditto.
14393 (win32_join): Adjust interface.
14394 (win32_thread_alive): Take a ptid.
14395 (win32_resume): Adjust to use ptids.
14396 (get_child_debug_event): Ditto.
14397 (win32_wait): Adjust interface. Remove exiting process from
14398 processes table.
14399
14400 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14401
14402 Non-stop mode support.
14403
14404 * server.h (non_stop): Declare.
14405 (gdb_client_data, handler_func): Declare.
14406 (delete_file_handler, add_file_handler, start_event_loop):
14407 Declare.
14408 (handle_serial_event, handle_target_event, push_event)
14409 (putpkt_notif): Declare.
14410 * target.h (enum resume_kind): New.
14411 (struct thread_resume): Replace `step' field by `kind' field.
14412 (TARGET_WNOHANG): Define.
14413 (struct target_ops) <wait>: Add `options' argument.
14414 <supports_non_stop, async, start_non_stop>: New fields.
14415 (target_supports_non_stop, target_async): New.
14416 (start_non_stop): Declare.
14417 (mywait): Add `options' argument.
14418 * target.c (mywait): Add `options' argument. Print child exit
14419 notifications here.
14420 (start_non_stop): New.
14421 * server.c (non_stop, own_buf, mem_buf): New globals.
14422 (struct vstop_notif): New.
14423 (notif_queue): New global.
14424 (queue_stop_reply, push_event, discard_queued_stop_replies)
14425 (send_next_stop_reply): New.
14426 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14427 interface changes.
14428 (attach_inferior): In non-stop mode, don't wait for the target
14429 here.
14430 (handle_general_set): Handle QNonStop.
14431 (handle_query): When handling qC, return the current general
14432 thread, instead of the first thread of the list.
14433 (handle_query): If the backend supports non-stop mode, include
14434 QNonStop+ in the qSupported query response.
14435 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14436 and non-stop mode.
14437 (handle_v_attach, handle_v_run): Handle non-stop mode.
14438 (handle_v_stopped): New.
14439 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14440 (myresume): Adjust to use resume_kind. Handle non-stop.
14441 (queue_stop_reply_callback): New.
14442 (handle_status): Handle non-stop mode.
14443 (main): Clear non_stop flag on reconnection. Use the event-loop.
14444 Refactor serial protocol handling from here ...
14445 (process_serial_event): ... to this new function. When GDB
14446 selects any thread, select one here. In non-stop mode, wait until
14447 GDB acks all pending events before exiting.
14448 (handle_serial_event, handle_target_event): New.
14449 * remote-utils.c (remote_open): Install remote_desc in the event
14450 loop.
14451 (remote_close): Remove remote_desc from the event loop.
14452 (putpkt_binary): Rename to...
14453 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14454 (putpkt_binary): New as wrapper around putpkt_binary_1.
14455 (putpkt_notif): New.
14456 (prepare_resume_reply): In non-stop mode, don't change the
14457 general_thread.
14458 * event-loop.c: New.
14459 * Makefile.in (OBJ): Add event-loop.o.
14460 (event-loop.o): New rule.
14461
14462 * linux-low.h (pid_of): Moved here.
14463 (lwpid_of): New.
14464 (get_lwp_thread): Use lwpid_of.
14465 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14466 * linux-low.c (pid_of): Delete.
14467 (inferior_pid): Use lwpid_of.
14468 (linux_event_pipe): New.
14469 (target_is_async_p): New.
14470 (delete_lwp): New.
14471 (handle_extended_wait): Use lwpid_of.
14472 (add_lwp): Don't set lwpid field.
14473 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14474 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14475 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14476 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14477 first. Adjust to linux_wait_for_event interface changes. Use
14478 lwpid_of.
14479 (linux_detach): Don't delete the main lwp here.
14480 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14481 (status_pending_p): Don't consider explicitly suspended lwps.
14482 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14483 pointer. Add OPTIONS argument. Change return type to int. Use
14484 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14485 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14486 pointer. Add status pointer argument. Return a pid instead of a
14487 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14488 changes. In non-stop mode, don't switch to a random thread.
14489 (linux_wait): Rename to...
14490 (linux_wait_1): ... this. Add target_options argument, and handle
14491 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14492 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14493 clean exit and signal exit code. Don't stop all threads in
14494 non-stop mode. In all-stop mode, only stop all threads when
14495 reporting a stop to GDB. Handle explicit thread stop requests.
14496 (async_file_flush, async_file_mark): New.
14497 (linux_wait): New.
14498 (send_sigstop): Use lwpid_of.
14499 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14500 interface changes. In non-stop mode, don't switch to a random
14501 thread.
14502 (linux_resume_one_lwp): Use lwpid_of.
14503 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14504 (linux_resume_one_thread): ... this. Handle resume_stop. In
14505 non-stop mode, don't look for pending flag in all threads.
14506 (resume_status_pending_p): Don't consider explicitly suspended
14507 threads.
14508 (my_waitpid): Reimplement. Emulate __WALL.
14509 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14510 Use lwpid_of.
14511 (sigchld_handler, linux_supports_non_stop, linux_async)
14512 (linux_start_non_stop): New.
14513 (linux_target_ops): Register linux_supports_non_stop, linux_async
14514 and linux_start_non_stop.
14515 (initialize_low): Install SIGCHLD handler.
14516 * thread-db.c (thread_db_create_event, find_one_thread)
14517 (thread_db_get_tls_address): Use lwpid_of.
14518 * win32-low.c (win32_detach): Adjust to use resume_kind.
14519 (win32_wait): Add `options' argument.
14520 * spu-low.c (spu_resume): Adjust to use resume_kind.
14521 (spu_wait): Add `options' argument.
14522
14523 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14524
14525 Decouple target code from remote protocol.
14526
14527 * target.h (enum target_waitkind): New.
14528 (struct target_waitstatus): New.
14529 (struct target_ops) <wait>: Return an unsigned long. Take a
14530 target_waitstatus pointer instead of a char pointer.
14531 (mywait): Likewise.
14532 * target.c (mywait): Change prototype to return an unsigned long.
14533 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14534 * server.h (thread_from_wait, old_thread_from_wait): Delete
14535 declarations.
14536 (prepare_resume_reply): Change prototype to take a
14537 target_waitstatus.
14538 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14539 (last_status, last_ptid): New.
14540 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14541 pid instead of a signal.
14542 (attach_inferior): Remove "status" and "signal" parameters.
14543 Adjust.
14544 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14545 not as an address.
14546 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14547 (handle_v_requests, myresume): Remove "status" and "signal"
14548 parameters. Adjust.
14549 (handle_status): New.
14550 (main): Delete local `status'. Adjust.
14551 * remote-utils.c: Include target.h.
14552 (prepare_resume_reply): Change prototype to take a
14553 target_waitstatus. Adjust.
14554
14555 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14556 interface.
14557 * spu-low.c (spu_wait): Adjust.
14558 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14559 Delete.
14560 (win32_wait): Adjust.
14561
14562 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14563
14564 * target.h (struct thread_resume): Delete leave_stopped member.
14565 (struct target_ops): Add a `n' argument to the `resume' callback.
14566 * server.c (start_inferior): Adjust.
14567 (handle_v_cont, myresume): Adjust.
14568 * linux-low.c (check_removed_breakpoint): Adjust to resume
14569 interface change, and to removed leave_stopped field.
14570 (resume_ptr): Delete.
14571 (struct thread_resume_array): New.
14572 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14573 resume interface change.
14574 (linux_continue_one_thread, linux_queue_one_thread)
14575 (resume_status_pending_p): Check if the resume field is NULL
14576 instead of checking the leave_stopped member.
14577 (linux_resume): Adjust to the target resume interface change.
14578 * spu-low.c (spu_resume): Adjust to the target resume interface
14579 change.
14580 * win32-low.c (win32_detach, win32_resume): Ditto.
14581
14582 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14583
14584 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14585 flag.
14586 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14587 pending.
14588 (linux_continue_one_thread): Only preserve the stepping flag if
14589 there's a pending breakpoint.
14590
14591 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14592
14593 * server.c (main): After the inferior having exited, call
14594 remote_close before exiting gdbserver.
14595
14596 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14597
14598 Fix size of FPSCR in Power 7 processors.
14599 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14600 (PPC_FEATURE_HAS_DFP): New #define.
14601 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14602 size of the FPSCR.
14603
14604 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14605
14606 * server.c (handle_query) Whitespace and formatting.
14607
14608 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14609
14610 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14611 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14612 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14613 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14614 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14615 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14616 Makefile.in, configure.ac: Fix whitespace throughout.
14617 * configure: Regenerate.
14618
14619 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14620
14621 * inferiors.c (find_inferior): Make it safe for the callback
14622 function to delete the currently iterated inferior.
14623
14624 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14625
14626 * Makefile.in (linuw_low_h): Move higher.
14627 (thread-db.o): Depend on $(linux_low_h).
14628
14629 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14630
14631 Rename "process" to "lwp" throughout.
14632
14633 * linux-low.c (all_processes): Rename to...
14634 (all_lwps): ... this.
14635 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14636 (add_process): Rename to ...
14637 (add_lwp): ... this. Adjust.
14638 (linux_create_inferior): Adjust.
14639 (linux_attach_lwp): Adjust.
14640 (linux_attach): Adjust.
14641 (linux_kill_one_process): Rename to ...
14642 (linux_kill_one_lwp): ... this. Adjust.
14643 (linux_kill): Adjust.
14644 (linux_detach_one_process): Rename to ...
14645 (linux_detach_one_lwp): ... this. Adjust.
14646 (linux_detach): Adjust.
14647 (check_removed_breakpoint): Adjust.
14648 (status_pending_p): Adjust.
14649 (linux_wait_for_process): Rename to ...
14650 (linux_wait_for_lwp): ... this. Adjust.
14651 (linux_wait_for_event): Adjust.
14652 (send_sigstop): Adjust.
14653 (wait_for_sigstop): Adjust.
14654 (stop_all_processes): Rename to ...
14655 (stop_all_lwps): ... this.
14656 (linux_resume_one_process): Rename to ...
14657 (linux_resume_one_lwp): ... this. Adjust.
14658 (linux_set_resume_request, linux_continue_one_thread)
14659 (linux_queue_one_thread, resume_status_pending_p)
14660 (usr_store_inferior_registers, regsets_store_inferior_registers)
14661 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14662 Adjust.
14663 * linux-low.h (get_process): Rename to ...
14664 (get_lwp): ... this. Adjust.
14665 (get_thread_process): Rename to ...
14666 (get_thread_lwp): ... this. Adjust.
14667 (get_process_thread): Rename to ...
14668 (get_lwp_thread): ... this. Adjust.
14669 (struct process_info): Rename to ...
14670 (struct lwp_info): ... this.
14671 (all_processes): Rename to ...
14672 (all_lwps): ... this.
14673 * proc-service.c (ps_lgetregs): Adjust.
14674 * thread-db.c (thread_db_create_event, find_one_thread)
14675 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14676
14677 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14678
14679 * server.c (handle_query): Handle "qAttached".
14680
14681 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14682
14683 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14684 GPLv3, update license URL.
14685
14686 2009-03-01 Doug Evans <dje@google.com>
14687
14688 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14689 (server_h): Add gdb_signals.h.
14690 (signals.o): Update.
14691 * server.h (target_signal_from_host,target_signal_to_host_p)
14692 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14693
14694 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14695
14696 * remote-utils.c (getpkt): Also generate remote-debug
14697 information if noack_mode is set.
14698
14699 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14700
14701 * server.c (handle_query): Report qXfer:siginfo:read and
14702 qXfer:siginfo:write as supported and handle them.
14703 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14704 * linux-low.c (linux_xfer_siginfo): New.
14705 (linux_target_ops): Set it.
14706
14707 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14708
14709 * server.c (gdbserver_usage): Mention --remote-debug.
14710 (main): Accept '--remote-debug' switch.
14711
14712 2009-01-18 Doug Evans <dje@google.com>
14713
14714 * regcache.c (new_register_cache): No need to check result of xcalloc.
14715 * server.c (handle_search_memory): Back out calls to xmalloc,
14716 result is checked and error is returned to user upon failure.
14717 (handle_query): Ditto. Add more checks for result of malloc.
14718 (handle_v_cont): Check result of malloc, report error back to
14719 user upon failure.
14720 (handle_v_run): Ditto. Call freeargv.
14721 * server.h (freeargv): Declare.
14722 * utils.c (freeargv): New fn.
14723
14724 2009-01-15 Doug Evans <dje@google.com>
14725
14726 * gdbreplay.c (perror_with_name): Make arg const char *.
14727 * server.h (target_signal_to_name): Make return type const char *.
14728 * thread-db.c (thread_db_err_str): Make return type const char *.
14729 * utils.c (perror_with_name): Make arg const char *.
14730
14731 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14732
14733 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14734 when handling a EXIT_PROCESS_DEBUG_EVENT.
14735
14736 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14737
14738 * gdbreplay.c (gdbreplay_version): Update copyright year.
14739 * server.c (gdbserver_version): Likewise.
14740
14741 2009-01-05 Doug Evans <dje@google.com>
14742
14743 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14744 (handle_extended_wait): Improve comment.
14745
14746 2008-12-13 Doug Evans <dje@google.com>
14747
14748 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14749 * server.h (ATTR_MALLOC): New macro.
14750 (xmalloc,xcalloc,xstrdup): Declare.
14751 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14752 * inferiors.c: Ditto.
14753 * linux-low.c: Ditto.
14754 * mem-break.c: Ditto.
14755 * regcache.c: Ditto.
14756 * remote-utils.c: Ditto.
14757 * server.c: Ditto.
14758 * target.c: Ditto.
14759 * win32-low.c: Ditto.
14760
14761 2008-12-12 Doug Evans <dje@google.com>
14762
14763 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14764 in debugging printf.
14765
14766 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14767
14768 2008-12-09 Doug Evans <dje@google.com>
14769
14770 * linux-low.h (struct process_info): Delete member tid, unused.
14771 * thread-db.c (find_one_thread): Update.
14772 (maybe_attach_thread): Update.
14773
14774 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14775
14776 * target.h (struct target_ops): Add qxfer_osdata member.
14777 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14778 and dirent.h.
14779 (linux_qxfer_osdata): New functions.
14780 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14781 callback.
14782 * server.c (handle_query): Handle "qXfer:osdata:read:".
14783 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14784 (buffer_xml_printf): New functions.
14785 * server.h (struct buffer): New.
14786 (buffer_grow_str, buffer_grow_str0): New macros.
14787 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14788 (buffer_xml_printf): Declare.
14789
14790 2008-11-24 Doug Evans <dje@google.com>
14791
14792 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14793
14794 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14795
14796 * server.c (handle_v_run): Always use the supplied argument list.
14797
14798 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14799
14800 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14801 (xtensa_regmap_table): Add entry for scompare1.
14802
14803 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14804
14805 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14806 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14807 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14808 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14809 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14810 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14811 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14812 XML target descriptions.
14813 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14814 when inferior is running on an ISA 2.05 or later processor. Add
14815 special case to return offset for full 64-bit slot of FPSCR when
14816 in 32-bits.
14817
14818 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14819
14820 * Makefile.in (SFILES, clean): Added sparc64 files.
14821 (reg-sparc64.o, reg-sparc64.c): New.
14822 * configure.srv (sparc*-*-linux*): New configuration.
14823 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14824 syscall arguments for SPARC.
14825 (regsets_store_inferior_registers): Likewise.
14826 * linux-sparc-low.c: New file.
14827
14828 2008-10-21 Doug Evans <dje@google.com>
14829
14830 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14831 (READLINE_DIR,READLINE_DEP): Delete.
14832 (INTERNAL_CFLAGS): Update.
14833 (LINTFLAGS): Update.
14834
14835 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14836
14837 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14838 whole argv from the last run, not just argv[0].
14839
14840 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14841
14842 * regcache.c (new_register_cache): Return NULL if the register
14843 cache size isn't known yet.
14844 (free_register_cache): Avoid dereferencing a NULL regcache.
14845
14846 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14847
14848 * configure.srv: Merge MIPS and MIPS64.
14849
14850 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14851
14852 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14853
14854 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14855
14856 * Makefile.in: Add required vsx dependencies.
14857
14858 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14859 Declare init_registers_powerpc_vsx32l.
14860 Declare init_registers_powerpc_vsx64l.
14861 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14862 (ppc_arch_setup): Check for VSX in hwcap.
14863 (ppc_fill_vsxregset): New function.
14864 (ppc_store_vsxregset): New function.
14865 Add new VSX entry in regset_info target_regsets.
14866
14867 * configure.srv: Add new VSX dependencies.
14868
14869 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14870
14871 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14872 (remote_open): Set or clear transport_is_reliable.
14873 (putpkt_binary): Don't expect acks in noack mode.
14874 (getpkt): Don't send ack/nac in noack mode.
14875 * server.c (handle_general_set): Handle QStartNoAckMode.
14876 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14877 qSupported.
14878 (main): Reset noack_mode on every connection.
14879 * server.h (noack_mode): Declare.
14880
14881 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14882
14883 * Makefile.in (GDBREPLAY_OBS): New variable.
14884 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14885
14886 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14887 Daniel Jacobowitz <dan@codesourcery.com>
14888
14889 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14890 (usr_store_inferior_registers): Likewise.
14891 (regsets_store_inferior_registers): Likewise.
14892
14893 2008-07-31 Rolf Jansen <rj@surtec.com>
14894 Pedro Alves <pedro@codesourcery.com>
14895
14896 * configure.ac: Check for memmem declaration.
14897 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14898 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14899 (disable_packet_qfThreadInfo): Unconditionally compile.
14900 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14901 * configure, config.in: Regenerate.
14902
14903 2008-07-28 Doug Kwan <dougkwan@google.com>
14904
14905 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14906 (linux_write_memory): Remove declaration of errno.
14907
14908 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14909
14910 * linux-low.c (handle_extended_wait): Do not use "status"
14911 variable uninitialized.
14912
14913 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14914
14915 * server.c (handle_v_attach): Inhibit reporting dll changes.
14916
14917 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14918
14919 * remote-utils.c (prepare_resume_reply): If requested, don't
14920 output "thread:TID" in the T stop reply.
14921
14922 * server.c (disable_packet_vCont, disable_packet_Tthread)
14923 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14924 (handle_query): If requested, disable support for qC, qfThreadInfo
14925 and qsThreadInfo.
14926 (handle_v_requests): If requested, disable support for vCont.
14927 (gdbserver_show_disableable): New.
14928 (main): Handle --disable-packet and --disable-packet=LIST.
14929
14930 * server.h (disable_packet_vCont, disable_packet_Tthread)
14931 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14932
14933 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14934
14935 * server.c (gdbserver_usage): Mention --version.
14936
14937 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14938
14939 * Makefile.in (gdbreplay.o): New rule.
14940
14941 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14942
14943 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14944 message, not gdbserver.
14945
14946 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14947 Nathan Sidwell <nathan@codesourcery.com>
14948 Joseph Myers <joseph@codesourcery.com>
14949
14950 * acinclude.m4: Include ../../config/acx.m4.
14951 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14952 * configure, config.in: Regenerate.
14953 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14954 * server.c (gdbserver_version): Print PKGVERSION.
14955 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14956 (main): Adjust gdbserver_usage calls.
14957 * gdbreplay.c (version, host_name): Add declarations.
14958 (gdbreplay_version, gdbreplay_usage): New.
14959 (main): Accept --version and --help options.
14960
14961 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14962
14963 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14964 (arm_breakpoint_at): Handle Thumb.
14965 (the_low_target): Add comment.
14966
14967 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14968
14969 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14970
14971 2008-05-09 Doug Evans <dje@google.com>
14972
14973 * server.h (decode_search_memory_packet): Declare.
14974 * remote-utils.c (decode_search_memory_packet): New fn.
14975 * server.c (handle_search_memory_1): New fn.
14976 (handle_search_memory): New fn.
14977 (handle_query): Process qSearch:memory packets.
14978
14979 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14980
14981 * regcache.c (registers_length): Remove.
14982 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14983 full register packet.
14984 * regcache.h (registers_length): Remove prototype.
14985 * server.h (PBUFSIZ): Define to 16384.
14986
14987 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14988
14989 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14990 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14991 powerpc-64l.o, and powerpc-altivec64l.o.
14992 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14993 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14994 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14995 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14996 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14997 to srv_xmlfiles.
14998
14999 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
15000 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
15001 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
15002 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
15003 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
15004 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
15005 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
15006 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
15007 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
15008 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
15009 (clean): Update.
15010
15011 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
15012 (init_registers_powerpc_32l): ... this new prototype.
15013 (init_registers_powerpc_32): Remove, replace by ...
15014 (init_registers_powerpc_altivec32l): ... this new prototype.
15015 (init_registers_powerpc_e500): Remove, replace by ...
15016 (init_registers_powerpc_e500l): ... this new prototype.
15017 (init_registers_ppc64): Remove, replace by ...
15018 (init_registers_powerpc_64l): ... this new prototype.
15019 (init_registers_powerpc_64): Remove, replace by ...
15020 (init_registers_powerpc_altivec64l): ... this new prototype.
15021 (ppc_num_regs): Set to 73.
15022 (PT_ORIG_R3, PT_TRAP): Define if necessary.
15023 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
15024 (ppc_cannot_store_register): Handle orig_r3 and trap.
15025 (ppc_arch_setup): Update init_registers_... calls.
15026 (ppc_fill_gregset): Handle orig_r3 and trap.
15027
15028 * inferiors.c (clear_inferiors): Reset current_inferior.
15029
15030 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
15031
15032 * acinclude.m4: Add override.m4.
15033 * configure: Regenerate.
15034
15035 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15036
15037 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
15038 initial call to init_register_ppc64.
15039
15040 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
15041
15042 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
15043 single powerpc*-*-linux* case.
15044 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
15045
15046 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
15047
15048 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
15049 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
15050 from reg_xmlfiles.
15051 * linux-ppc-low.c: Include <elf.h>.
15052 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
15053 (ppc_hwcap): New global variable.
15054 (ppc_regmap): Remove __SPE__ #ifdef sections.
15055 (ppc_regmap_e500): New global variable.
15056 (ppc_cannot_store_register): Update __SPE__ special case.
15057 (ppc_get_hwcap): New function.
15058 (ppc_arch_setup): Use it to determine whether inferior supports
15059 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
15060 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
15061 Do not access registers if target does not support AltiVec.
15062 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
15063 Do not access registers if target does not support SPE.
15064 (target_regsets): Unconditionally include AltiVec and SPE regsets.
15065
15066 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
15067
15068 * linux-low.c (disabled_regsets, num_regsets): New.
15069 (use_regsets_p): Delete.
15070 (linux_wait_for_process): Clear disabled_regsets.
15071 (regsets_fetch_inferior_registers): Check and set it.
15072 (regsets_store_inferior_registers): Likewise.
15073 (linux_fetch_registers, linux_store_registers): Do not use
15074 use_regsets_p.
15075 (initialize_low): Allocate disabled_regsets.
15076
15077 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
15078
15079 * Makefile.in (LIBOBJS): New.
15080 (OBS): Use LIBOBJS.
15081 (memmem.o): New rule.
15082 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
15083 * configure: Regenerated.
15084
15085 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15086
15087 * server.c (handle_query): Never return "unsupported" for
15088 qXfer:features:read queries.
15089
15090 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15091
15092 * server.c (get_features_xml): Fix inverted condition.
15093 (handle_query): Always support qXfer:feature:read.
15094
15095 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15096
15097 * server.c (wrapper_argv): New.
15098 (start_inferior): Handle wrapper_argv. If set, expect an extra
15099 trap.
15100 (gdbserver_usage): Document --wrapper.
15101 (main): Parse --wrapper.
15102
15103 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15104
15105 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15106 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15107 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15108 (ppc_set_pc): Likewise.
15109 (ppc_arch_setup): New function.
15110 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15111 of collect_register.
15112 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15113
15114 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15115
15116 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15117 instead of linux-ppc64-low.o.
15118 * linux-ppc64-low.c: Remove file.
15119 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15120 (linux-ppc64-low.o): Remove rule.
15121
15122 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15123 (init_registers_powerpc_64): Likewise.
15124 (ppc_regmap): Conditionally define depending on __powerpc64__.
15125 (ppc_cannot_store_register): Do not special-case "fpscr" when
15126 compiled on __powerpc64__.
15127 (ppc_collect_ptrace_register): New function.
15128 (ppc_supply_ptrace_register): New function.
15129 (ppc_breakpoint): Change type to "unsigned int".
15130 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15131 (the_low_target): Conditionally provide initializers for the
15132 arch_setup member depending on __powerpc64__. Install
15133 collect_ptrace_register and supply_ptrace_register members.
15134
15135 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15136
15137 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15138 * server.c (gdbserver_xmltarget): Define.
15139 (get_features_xml): Use it to replace "target.xml" and arch_string.
15140
15141 * configure.srv: Remove srv_xmltarget. Add XML files that were
15142 mentioned there to srv_xmlfiles instead. Remove conditional tests
15143 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15144 srv_xmlfiles and srv_regobj to include all possible choices.
15145 * configure.ac (srv_xmltarget): Remove.
15146 (srv_xmlfiles): Do not add "target.xml".
15147 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15148 checks for supplementary target information.
15149 * configure: Regenerate.
15150 * Makefile.in (XML_TARGET): Remove.
15151 (target.xml): Remove rule.
15152 (clean): Do not clean up target.xml.
15153 (.PRECIOUS): Do not mention target.xml.
15154
15155 * target.h (struct target_ops): Remove arch_string member.
15156 * linux-low.c (linux_arch_string): Remove.
15157 (linux_target_ops): Remove arch_string initializer.
15158 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15159 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15160 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15161 * spu-low.c (spu_arch_string): Remove.
15162 (spu_target_ops): Remove arch_string initializer.
15163 * win32-low.c (win32_arch_string): Remove.
15164 (win32_target_ops): Remove arch_string initializer.
15165 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15166 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15167 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15168
15169 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15170
15171 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15172 by collect_ptrace_register and supply_ptrace_register hooks.
15173 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15174 instead of checking for the_low_target.left_pad_xfer.
15175 (usr_store_inferior_registers): Use collect_ptrace_register callback
15176 instead of checking for the_low_target.left_pad_xfer.
15177
15178 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15179 (s390_supply_ptrace_register): Likewise.
15180 (s390_fill_gregset): Call s390_collect_ptrace_register.
15181 (the_low_target): Update.
15182
15183 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15184 (ppc_supply_ptrace_register): Likewise.
15185 (the_low_target): Update.
15186
15187 * linux-i386-low.c (the_low_target): Update.
15188 * linux-x86-64-low.c (the_low_target): Update.
15189
15190 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15191
15192 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15193 reg-s390.o and reg-s390x.o.
15194
15195 * linux-low.c (new_inferior): New global variable.
15196 (linux_create_inferior, linux_attach): Set it.
15197 (linux_wait_for_process): Call the_low_target.arch_setup after the
15198 target has stopped for the first time.
15199 (initialize_low): Do not call the_low_target.arch_setup.
15200
15201 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15202 (s390_set_pc): Likewise.
15203 (s390_arch_setup): New function.
15204 (the_low_target): Use s390_arch_setup as arch_setup routine.
15205
15206 * regcache.c (realloc_register_cache): New function.
15207 (set_register_cache): Call it for each existing regcache.
15208
15209 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15210
15211 * server.h (init_registers): Remove prototype.
15212
15213 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15214 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15215 instead of init_registers ().
15216 * linux-arm-low.c (init_registers_arm): Add prototype.
15217 (init_registers_arm_with_iwmmxt): Likewise.
15218 (the_low_target): Add initializer for arch_setup field.
15219 * linux-cris-low.c (init_registers_cris): Add prototype.
15220 (the_low_target): Add initializer for arch_setup field.
15221 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15222 (the_low_target): Add initializer for arch_setup field.
15223 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15224 (the_low_target): Add initializer for arch_setup field.
15225 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15226 (the_low_target): Add initializer for arch_setup field.
15227 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15228 (the_low_target): Add initializer for arch_setup field.
15229 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15230 (the_low_target): Add initializer for arch_setup field.
15231 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15232 (init_registers_mips64_linux): Likewise.
15233 (the_low_target): Add initializer for arch_setup field.
15234 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15235 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15236 (the_low_target): Add initializer for arch_setup field.
15237 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15238 (init_registers_powerpc_64): Likewise.
15239 (the_low_target): Add initializer for arch_setup field.
15240 * linux-s390-low.c (init_registers_s390): Add prototype.
15241 (init_registers_s390x): Likewise.
15242 (the_low_target): Add initializer for arch_setup field.
15243 * linux-sh-low.c (init_registers_sh): Add prototype.
15244 (the_low_target): Add initializer for arch_setup field.
15245 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15246 (the_low_target): Add initializer for arch_setup field.
15247 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15248 (the_low_target): Add initializer for arch_setup field.
15249
15250 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15251 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15252 instead of init_registers ().
15253 * win32-arm-low.c (init_registers_arm): Add prototype.
15254 (the_low_target): Add initializer for arch_setup field.
15255 * win32-i386-low.c (init_registers_i386): Add prototype.
15256 (the_low_target): Add initializer for arch_setup field.
15257
15258 * spu-low.c (init_registers_spu): Add prototype.
15259 (initialize_low): Call initialie_registers_spu () instead of
15260 initialize_registers ().
15261
15262 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15263
15264 * server.c (handle_v_requests): When handling the vRun and vAttach
15265 packets, if already debugging a process, don't kill it. Return an
15266 error instead.
15267
15268 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15269
15270 * server.c (handle_query): Correct length check.
15271
15272 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15273
15274 * win32-low.c (do_initial_child_stuff): Add process handle
15275 parameter. Set current_process_handle and current_process_id from the
15276 parameters. Clear globals.
15277 (win32_create_inferior): Don't set current_process_handle and
15278 current_process_id here. Instead pass them on the call to
15279 do_initial_child_stuff.
15280 (win32_attach): Likewise.
15281 (win32_clear_inferiors): New.
15282 (win32_kill): Don't close the current process handle or the
15283 current thread handle here. Instead call win32_clear_inferiors.
15284 (win32_detach): Don't open a new handle to the process. Call
15285 win32_clear_inferiors.
15286 (win32_join): Don't rely on current_process_handle; open a new
15287 handle using the process id.
15288 (win32_wait): Call win32_clear_inferiors when the inferior process
15289 has exited.
15290
15291 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15292
15293 * server.c (monitor_show_help): Add "exit".
15294
15295 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15296
15297 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15298 (clean): Add reg-xtensa.c.
15299 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15300 * configure.srv (xtensa*-*-linux*) New target.
15301 * linux-xtensa-low.c: New.
15302 * xtensa-xtregs.c: New.
15303
15304 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15305
15306 * hostio.c: Don't include errno.h.
15307 (errno_to_fileio_errno): Move to hostio-errno.
15308 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15309 error number outputting to the target->hostio_last_error callback.
15310 (hostio_packet_error): Use FILEIO_EINVAL directly.
15311 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15312 calls to hostio_error.
15313 * hostio-errno.c: New.
15314 * server.h (hostio_last_error_from_errno): Declare.
15315 * target.h (target_ops): Add hostio_last_error member.
15316 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15317 as hostio_last_error handler.
15318 * spu-low.c (spu_target_ops): Likewise.
15319 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15320 (wince_hostio_last_error): New functions.
15321 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15322 as hostio_last_error handler.
15323 (win32_target_ops) [!_WIN32_WCE]: Register
15324 hostio_last_error_from_errno as hostio_last_error handler.
15325 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15326 (hostio-errno.o): New rule.
15327 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15328 * configure.srv (srv_hostio_err_objs): New variable. Default to
15329 hostio-errno.o.
15330 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15331 * configure: Regenerate.
15332
15333 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15334
15335 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15336 (linux_kill, linux_detach): Clean up the process list.
15337 * remote-utils.c (remote_open): Improve port number parsing.
15338 (putpkt_binary, input_interrupt): Only send interrupts if the target
15339 is running.
15340 * server.c (extended_protocol): Make static.
15341 (attached): Define earlier.
15342 (exit_requested, response_needed, program_argv): New variables.
15343 (target_running): New.
15344 (start_inferior): Clear attached here.
15345 (attach_inferior): Set attached here.
15346 (require_running): Define.
15347 (handle_query): Use require_running and target_running. Implement
15348 "monitor exit".
15349 (handle_v_attach, handle_v_run): New.
15350 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15351 (gdbserver_usage): Update.
15352 (main): Redo argument parsing. Handle --debug and --multi. Handle
15353 --attach along with other options or after the port. Save
15354 program_argv. Support no initial program. Resynchronize
15355 communication with GDB after an error. Handle "monitor exit".
15356 Use require_running and target_running. Always allow the extended
15357 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15358 restart in extended mode.
15359 * README: Refer to the GDB manual. Update --attach usage.
15360
15361 2007-12-20 Andreas Schwab <schwab@suse.de>
15362
15363 * linux-low.c (STACK_SIZE): Define.
15364 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15365 (linux_test_for_tracefork): Likewise.
15366
15367 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15368
15369 * linux-low.c (linux_wait_for_event): Update messages. Do not
15370 reinsert auto-delete breakpoints.
15371 * mem-break.c (struct breakpoint): Change return type of handler to
15372 int.
15373 (set_breakpoint_at): Update handler type.
15374 (reinsert_breakpoint_handler): Return 1 instead of calling
15375 delete_breakpoint.
15376 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15377 setting a new one.
15378 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15379 * mem-break.h (set_breakpoint_at): Update handler type.
15380 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15381 * win32-low.c (auto_delete_breakpoint): New.
15382 (get_child_debug_event): Use it.
15383
15384 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15385
15386 * configure.ac: Check for pread and pwrite.
15387 * hostio.c (handle_pread): Fall back to lseek and read.
15388 (handle_pwrite): Fall back to lseek and write.
15389 * config.in, configure: Regenerated.
15390
15391 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15392
15393 * server.c (myresume): Add own_buf argument.
15394 (main): Update calls.
15395
15396 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15397
15398 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15399 * remote-utils.c (remote_open): Do not call disable_async_io.
15400 (block_async_io): Delete.
15401 (unblock_async_io): Make static.
15402 (initialize_async_io): New.
15403 * server.c (handle_v_cont): Handle async I/O here.
15404 (myresume): Likewise. Move other common resume tasks here...
15405 (main): ... from here. Call initialize_async_io. Disable async
15406 I/O before the main loop.
15407 * server.h (initialize_async_io): Declare.
15408 (block_async_io, unblock_async_io): Delete prototypes.
15409 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15410
15411 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15412
15413 * remote-utils.c (readchar): Allow binary data in received messages.
15414
15415 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15416
15417 * win32-low.c (attaching): New global.
15418 (win32_create_inferior): Clear the `attaching' global.
15419 (win32_attach): Set the `attaching' global.
15420 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15421 attaching. Only set a breakpoint at the entry point if not
15422 attaching.
15423
15424 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15425
15426 * server.c (main): Don't report dll events on the initial
15427 connection on attaches.
15428
15429 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15430
15431 * server.c (main): Relax numerical bases supported for the pid of
15432 the --attach command line argument.
15433
15434 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15435
15436 * win32-low.c (win32_attach): Call OpenProcess before
15437 DebugActiveProcess, not after. Add last error output to error
15438 call.
15439
15440 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15441
15442 * win32-low.c (win32_get_thread_context)
15443 (win32_set_thread_context): New functions.
15444 (thread_rec): Use win32_get_thread_context.
15445 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15446 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15447 field.
15448
15449 2007-12-03 Leo Zayas
15450 Pedro Alves <pedro_alves@portugalmail.pt>
15451
15452 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15453 global variables.
15454 (child_add_thread): Minor cleanup.
15455 (child_continue): Resume artificially suspended threads before
15456 calling ContinueDebugEvent.
15457 (suspend_one_thread): New.
15458 (fake_breakpoint_event): New.
15459 (get_child_debug_event): Change return type to int. Check here if
15460 gdb sent an interrupt request. If a soft interrupt was requested,
15461 fake a breakpoint event. Return 0 if there is no event to handle,
15462 and 1 otherwise.
15463 (win32_wait): Don't check here if gdb sent an interrupt request.
15464 Ensure there is a valid event to handle.
15465 (win32_request_interrupt): Add soft interruption method as last
15466 resort.
15467
15468 2007-12-03 Leo Zayas
15469 Pedro Alves <pedro_alves@portugalmail.pt>
15470
15471 * win32-low.h (win32_thread_info): Add descriptions to the
15472 structure members. Replace `suspend_count' counter by a
15473 `suspended' flag.
15474 * win32-low.c (thread_rec): Update condition of when to get the
15475 context from the inferior. Rely on ContextFlags being set if it
15476 has already been retrieved. Only suspend the inferior thread if
15477 we haven't already. Warn if that fails.
15478 (continue_one_thread): s/suspend_count/suspended/. Only call
15479 ResumeThread once. Warn if that fails.
15480
15481 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15482
15483 * win32-low.c (win32_wait): Don't read from the inferior when it
15484 has already exited.
15485
15486 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15487
15488 * Makefile.in (win32_low_h): New variable.
15489 (win32-low.o): Add dependency on $(win32_low_h).
15490 (win32-arm-low.o, win32-i386-low.o): New rules.
15491
15492 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15493
15494 * hostio.c: Correct copyright year.
15495
15496 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15497
15498 * Makefile.in (OBS): Add hostio.o.
15499 (hostio.o): New rule.
15500 * server.h (handle_vFile): Declare.
15501 * hostio.c: New file.
15502 * server.c (handle_v_requests): Take packet_len and new_packet_len
15503 for binary packets. Call handle_vFile.
15504 (main): Update call to handle_v_requests.
15505
15506 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15507
15508 * linux-low.c: Include <sched.h>.
15509
15510 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15511
15512 * linux-low.c (linux_tracefork_grandchild): New.
15513 (linux_tracefork_child): Use clone.
15514 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15515
15516 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15517
15518 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15519
15520 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15521
15522 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15523
15524 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15525
15526 * inferiors.c (change_inferior_id): Delete.
15527 (add_pid_to_list, pull_pid_from_list): New.
15528 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15529 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15530 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15531 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15532 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15533 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15534 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15535 (using_threads): Always set to 1.
15536 (handle_extended_wait): New.
15537 (add_process): Do not set TID.
15538 (linux_create_inferior): Set must_set_ptrace_flags.
15539 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15540 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15541 (linux_thread_alive): Rename TID argument to LWPID.
15542 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15543 (linux_wait_for_event): Do not use TID or check using_threads. Update
15544 call to dead_thread_notify. Call handle_extended_wait.
15545 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15546 (send_sigstop): Delete sigstop_sent.
15547 (wait_for_sigstop): Avoid TID.
15548 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15549 (linux_test_for_tracefork): New.
15550 (linux_lookup_signals): Use thread_db_active and
15551 linux_supports_tracefork_flag.
15552 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15553 * linux-low.h (get_process_thread): Avoid TID.
15554 (struct process_ifo): Move thread_known and tid to the end. Remove
15555 sigstop_sent.
15556 (linux_attach_lwp, thread_db_init): Update prototypes.
15557 * server.h (change_inferior_id): Delete prototype.
15558 (add_pid_to_list, pull_pid_from_list): New prototypes.
15559 * thread-db.c (thread_db_use_events): New.
15560 (find_first_thread): Rename to...
15561 (find_one_thread): ...this. Update callers and messages. Do not
15562 call fatal. Check thread_db_use_events. Do not call
15563 change_inferior_id or new_thread_notify.
15564 (maybe_attach_thread): Update. Do not call new_thread_notify.
15565 (thread_db_init): Set thread_db_use_events. Check use_events.
15566 * utils.c (fatal, warning): Correct message prefix.
15567
15568 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15569
15570 * Makefile.in (clean): Remove new files.
15571 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15572 (powerpc-64.o, powerpc-64.c): New rules.
15573 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15574 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15575 with SPE.
15576 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15577 SPE targets.
15578 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15579 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15580 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15581 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15582 (target_regsets): Add AltiVec and SPE register sets.
15583 * configure.ac: Check for AltiVec and SPE.
15584 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15585 (ppc_fill_vrregset, ppc_store_vrregset): New.
15586 (target_regsets): Add AltiVec register set.
15587 * configure: Regenerated.
15588
15589 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15590
15591 * linux-low.c (O_LARGEFILE): Define.
15592 (linux_read_memory): Use /proc/PID/mem.
15593 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15594 * configure, config.in: Regenerated.
15595
15596 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15597
15598 * linux-low.c (linux_wait_for_event): Do not pass signals while
15599 single-stepping.
15600
15601 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15602
15603 * win32-low.c (create_process): New.
15604 (win32_create_inferior): Use create_process instead of
15605 CreateProcess. If create_process failed retry appending an ".exe"
15606 suffix. Store the GetLastError result immediatelly after
15607 create_process calls and use it on the call to error.
15608
15609 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15610
15611 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15612
15613 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15614
15615 * configure.ac: Switch license to GPLv3.
15616
15617 2007-08-01 Michael Snyder <msnyder@access-company.com>
15618
15619 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15620
15621 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15622
15623 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15624 typedef.
15625 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15626 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15627 CloseToolhelp32Snapshot.
15628 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15629 CloseToolhelp32Snapshot.
15630
15631 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15632
15633 * server.c (main): Check for inferior exit before main loop.
15634
15635 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15636
15637 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15638 instead of on tmp_desc.
15639
15640 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15641 Daniel Jacobowitz <dan@codesourcery.com>
15642
15643 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15644 (add_thread): Minor cleanups.
15645 (clear_inferiors): Move lower in the file. Clear the DLL
15646 list.
15647 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15648 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15649 (xml_escape_text): New.
15650 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15651 for qSupported.
15652 (handle_v_cont): Report errors.
15653 (gdbserver_version): Update.
15654 (main): Correct size of own_buf. Do not report initial DLL events.
15655 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15656 (unloaded_dll, xml_escape_text): New.
15657 * win32-low.c (enum target_waitkind): Update comments.
15658 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15659 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15660 (win32_EnumProcessModules, win32_GetModuleInformation)
15661 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15662 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15663 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15664 (win32_Module32First, win32_Module32Next, load_toolhelp)
15665 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15666 (get_child_debug_event): Handle DLL events.
15667 (win32_wait): Likewise.
15668
15669 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15670
15671 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15672 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15673
15674 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15675
15676 * win32-low.c (handle_output_debug_string): Ignore event if not
15677 waiting.
15678
15679 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15680
15681 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15682
15683 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15684
15685 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15686
15687 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15688
15689 * inferiors.c (change_inferior_id): Add comment.
15690 * linux-low.c (check_removed_breakpoint): Add an early
15691 prototype. Improve debug output.
15692 (linux_attach): Doc update.
15693 (linux_detach_one_process, linux_detach): Clean up before releasing
15694 each process.
15695 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15696 * linux-low.h (struct process_info): Doc improvement.
15697 * mem-break.c (delete_all_breakpoints): New.
15698 * mem-break.h (delete_all_breakpoints): New prototype.
15699 * thread-db.c (find_first_thread): New.
15700 (thread_db_create_event): Call it instead of
15701 thread_db_find_new_threads. Clean up unused variables.
15702 (maybe_attach_thread): Remove first thread handling.
15703 (thread_db_find_new_threads): Use find_first_thread.
15704 (thread_db_get_tls_address): Likewise.
15705
15706 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15707
15708 * thread-db.c (thread_db_find_new_threads): Add prototype.
15709 (thread_db_create_event): Check for the main thread before adding
15710 a new thread.
15711 (maybe_attach_thread): Only enable event reporting if TID == 0.
15712 (thread_db_get_tls_address): Check for new threads.
15713
15714 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15715
15716 * linux-low.c (linux_create_inferior): Try execv before execvp.
15717 * spu-low.c (spu_create_inferior): Likewise.
15718
15719 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15720
15721 * linux-low.c (linux_create_inferior): Change execv to execvp.
15722 * spu-low.c (spu_create_inferior): Likewies.
15723
15724 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15725
15726 * Makefile.in (clean): Clean new files instead of deleted ones.
15727 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15728 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15729 rules.
15730 * configure.srv: Specify XML files and new regformats for MIPS and
15731 MIPS64 GNU/Linux.
15732 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15733 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15734 an entry for the restart register.
15735 (mips_cannot_fetch_register, mips_cannot_store_register)
15736 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15737 register names to match the XML descriptions.
15738 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15739 restart register instead of $0.
15740
15741 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15742 Markus Deuling <deuling@de.ibm.com>
15743
15744 * remote-utils.c (decode_xfer_write): New function.
15745 * server.h (decode_xfer_write): Add prototype.
15746 * server.c (handle_query): Add PACKET_LEN argument. Support
15747 qXfer:spu:read and qXfer:spu:write packets.
15748 (main): Pass packet_len to handle_query.
15749 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15750 * target.h (target_ops): Add qxfer_spu.
15751
15752 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15753
15754 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15755 accessing non-seekable spufs files.
15756
15757 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15758
15759 * server.c (handle_query): Add reply for qC packet.
15760
15761 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15762 Leo Zayas <lerele@champenstudios@com>
15763
15764 * server.h (check_remote_input_interrupt_request): New function.
15765 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15766 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15767 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15768 (check_remote_input_interrupt_request): New function.
15769 * server.h (check_remote_input_interrupt_request): Declare.
15770 * win32-low.c (winapi_DebugBreakProcess,
15771 winapi_GenerateConsoleCtrlEvent): New typedefs.
15772 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15773 to 250 ms.
15774 (win32_wait): Check for remote interrupt request
15775 with check_remote_input_interrupt_request.
15776 (win32_request_interrupt): New function.
15777 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15778
15779 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15780
15781 * win32-low.c (debug_registers_changed,
15782 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15783 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15784 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15785 (thread_rec): Get context using the low target.
15786 (child_add_thread): Call thread_added on the low target,
15787 which does the same thing.
15788 (regptr): Delete.
15789 (do_initial_child_stuff): Remove debug registers references.
15790 Set context using the low target. Resume threads after
15791 setting the contexts.
15792 (child_continue): Remove dead variable. Remove debug
15793 registers references.
15794 (child_fetch_inferior_registers): Go through the low target.
15795 (do_child_store_inferior_registers): Remove.
15796 (child_store_inferior_registers): Go through the low target.
15797 (win32_resume): Remove debug registers references.
15798 Set context using the low target.
15799 (handle_exception): Change return type to void. Don't record
15800 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15801 first chance exception.
15802 (get_child_debug_event): Change return type to void. Remove
15803 goto loop. Always return after waiting for debug event.
15804 (win32_wait): Convert to switch statement. Handle spurious
15805 events.
15806
15807 * win32-i386-low.c (debug_registers_changed,
15808 debug_registers_used): New.
15809 (initial_stuff): Rename to ...
15810 (i386_initial_stuff): ... this. Clear debug registers
15811 state variables.
15812 (store_debug_registers): Delete.
15813 (i386_get_thread_context): New.
15814 (load_debug_registers): Delete.
15815 (i386_set_thread_context): New.
15816 (i386_thread_added): New.
15817 (single_step): Rename to ...
15818 (i386_single_step): ... this.
15819 (do_fetch_inferior_registers): Rename to ...
15820 (i386_fetch_inferior_register): ... this.
15821 (i386_store_inferior_register): New.
15822 (the_low_target): Adapt to new interface.
15823
15824 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15825 (arm_get_thread_context): New.
15826 (arm_set_thread_context): New.
15827 (regptr): New.
15828 (do_fetch_inferior_registers): Rename to ...
15829 (arm_fetch_inferior_register): ... this.
15830 (arm_store_inferior_register): New.
15831 (arm_wince_breakpoint): Reimplement as unsigned long.
15832 (arm_wince_breakpoint_len): Define.
15833 (the_low_target): Adapt to new interface.
15834
15835 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15836 load_debug_registers. Add get_thread_context, set_thread_context,
15837 thread_added and store_inferior_register. Rename
15838 fetch_inferior_registers to fetch_inferior_register.
15839 (regptr): Remove declaration.
15840
15841 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15842
15843 * linux-low.c (linux_detach): Change return type to int. Return 0.
15844 * spu-low.c (spu_detach): Likewise.
15845
15846 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15847
15848 * target.h (target_ops): Change return type of detach to int.
15849 Add join.
15850 (join_inferior): New.
15851 * server.c (main): Don't skip detach support on mingw32.
15852 If the inferior doesn't support detaching return error.
15853 Call join_inferior instead of using waitpid.
15854 * linux-low.c (linux_join): New.
15855 (linux_target_op): Add linux_join.
15856 * spu-low.c (spu_join): New.
15857 (spu_target_ops): Add spu_join.
15858 * win32-low.c (win32_detach): Adapt to new interface.
15859 Reopen current_process_handle before detaching. Issue a child
15860 resume before detaching.
15861 (win32_join): New.
15862 (win32_target_op): Add win32_join.
15863
15864 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15865
15866 * win32-low.c (win32-attach): Fix return value.
15867 * target.h (target_ops): Describe ATTACH return values.
15868
15869 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15870
15871 * win32-low.c (GETPROCADDRESS): Define.
15872 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15873 (winapi_DebugSetProcessKillOnExit): Likewise.
15874 (win32_create_inferior): Force usage of ansi CreateProcessA.
15875 (win32_attach): Use GETPROCADDRESS.
15876 (win32_detach): Likewise.
15877
15878 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15879
15880 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15881
15882 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15883
15884 * win32-low.c: Commit leftover changes from 2007-03-29.
15885
15886 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15887
15888 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15889 fields short instead of int. Add explicit padding.
15890 (i387_cache_to_fsave): Remove unnecessary casts.
15891 (i387_fsave_to_cache): Doc fix.
15892 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15893
15894 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15895
15896 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15897 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15898
15899 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15900
15901 * configure.srv (arm*-*-mingw32ce*): Move near the other
15902 arm targets.
15903
15904 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15905
15906 * configure.ac: Add errno checking.
15907 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15908 sys/file.h and malloc.h.
15909 (AC_CHECK_DECLS): Add perror.
15910 (srv_mingwce): Handle.
15911 * configure.srv (i[34567]86-*-cygwin*): Add
15912 win32-i386-low.o to srv_tgtobj.
15913 (i[34567]86-*-mingw*): Likewise.
15914 (arm*-*-mingw32ce*): Add case.
15915 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15916 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15917 [__MINGW32CE__] (strerror): New function.
15918 [__MINGW32CE__] (errno): Define to GetLastError.
15919 [__MINGW32CE__] (COUNTOF): New macro.
15920 (remote_open): Remove extra close call.
15921 * mem-break.c (delete_breakpoint_at): New function.
15922 * mem-break.h (delete_breakpoint_at): Declare.
15923 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15924 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15925 [USE_WIN32API] (read, write): Add char* casts.
15926 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15927 * server.h: Include wincecompat.h on Windows CE.
15928 [HAVE_ERRNO_H]: Check.
15929 (perror): Declare if not declared.
15930 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15931 (perror_with_name): Remove errno declaration.
15932 * wincecompat.h: New.
15933 * wincecompat.c: New.
15934 * win32-low.h: New.
15935 * win32-arm-low.c: New.
15936 * win32-i386-low.c: New.
15937 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15938 (OUTMSG2): Make it safe.
15939 (_T): New macro.
15940 (COUNTOF): New macro.
15941 (NUM_REGS): Get it from the low target.
15942 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15943 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15944 (thread_rec): Let low target handle debug registers.
15945 (child_add_thread): Likewise.
15946 (child_init_thread_list): Likewise.
15947 (continue_one_thread): Likewise.
15948 (regptr): New.
15949 (do_child_fetch_inferior_registers): Move to ...
15950 * win32-i386-low.c: ... here, and rename to ...
15951 (do_fetch_inferior_registers): ... this.
15952 * win32-low.c (child_fetch_inferior_registers):
15953 Go through the low target.
15954 (do_child_store_inferior_registers): Use regptr.
15955 (strwinerror): New function.
15956 (win32_create_inferior): Handle Windows CE.
15957 Use strwinerror instead of strerror on Windows error
15958 codes. Add program to the error output.
15959 Don't close the main thread handle on Windows CE.
15960 (win32_attach): Use coredll.dll on Windows CE.
15961 (win32_kill): Close current process and current
15962 thread handles.
15963 (win32_detach): Use coredll.dll on Windows CE.
15964 (win32_resume): Let low target handle debug registers, and
15965 step request.
15966 (handle_exception): Add/Remove initial breakpoint. Avoid
15967 non-existant WSTOPSIG on Windows CE.
15968 (win32_read_inferior_memory): Cast to remove warning.
15969 (win32_arch_string): Go through the low target.
15970 (initialize_low): Call set_breakpoint_data with the low
15971 target's breakpoint.
15972 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15973 FOP_REGNUM, mappings): Move to ...
15974 * win32-i386-low.c: ... here.
15975 * win32-low.c (win32_thread_info): Move to ...
15976 * win32-low.h: ... here.
15977 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15978 win32-arm-low.c and wincecompat.c.
15979 (all:): Add $EXEEXT.
15980 (install-only:): Likewise.
15981 (gdbserver:): Likewise.
15982 (gdbreplay:): Likewise.
15983 * config.in: Regenerate.
15984 * configure: Regenerate.
15985
15986 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15987
15988 * win32-low.c: Rename typedef thread_info to
15989 win32_thread_info throughout.
15990
15991 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15992
15993 * win32-i386-low.c: Rename to ...
15994 * win32-low.c: ... this.
15995 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15996 * Makefile.in: Likewise.
15997
15998 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15999
16000 * remote-utils.c (monitor_output): Constify msg parameter.
16001 * server.h (monitor_output): Likewise.
16002 * win32-i386-low.c (handle_output_debug_string): New.
16003 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
16004 handle_output_debug_string.
16005 (get_child_debug_event): Likewise.
16006
16007 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
16008
16009 * server.c (main): Correct strtoul check.
16010
16011 2007-03-27 Jon Ringle <jon@ringle.org>
16012
16013 * linux-low.c: Check __ARCH_HAS_MMU__ also.
16014
16015 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
16016
16017 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
16018
16019 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
16020
16021 * terminal.h: Check HAVE_SGTTY_H.
16022
16023 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
16024
16025 * remote-utils.c (remote_open): Print out the assigned port number.
16026
16027 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
16028
16029 * remote-utils.c (monitor_output): New function.
16030 * server.c (debug_threads): Define here.
16031 (monitor_show_help): New function.
16032 (handle_query): Handle qRcmd.
16033 (main): Do not handle 'd' packet.
16034 * server.h (debug_threads, remote_debug, monitor_output): Declare.
16035 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
16036 of debug_threads.
16037
16038 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16039
16040 * Makefile.in (EXEEXT): New.
16041 (clean): Use $(EXEEXT).
16042
16043 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16044
16045 * target.h (target_ops): Rename send_signal to request_interrupt,
16046 and remove enum target_signal parameter.
16047 * linux-low.c (linux_request_interrupt): Rename from
16048 linux_send_signal, and always send SIGINT.
16049 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
16050 and always send SIGINT.
16051 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
16052 of send_signal.
16053 (input_interrupt): Likewise.
16054
16055 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
16056
16057 * server.c (get_features_xml): Check if target implemented
16058 arch_string.
16059 * win32-i386-low.c (win32_arch_string): New.
16060 (win32_target_ops): Add win32_arch_string as arch_string member.
16061
16062 2007-02-22 Markus Deuling <deuling@de.ibm.com>
16063
16064 * spu-low.c (spu_arch_string): New.
16065 (spu_target_ops): Add spu_arch_string.
16066
16067 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
16068
16069 * remote-utils.c: Remove HAVE_TERMINAL_H check.
16070 * configure.ac: Do not check for terminal.h.
16071 * configure, config.in: Regenerated.
16072
16073 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16074
16075 * Makefile.in (OBS): Add $(XML_BUILTIN).
16076 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
16077 (clean): Update.
16078 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
16079 (arm-with-iwmmxt.c): New.
16080 * config.in, configure: Regenerate.
16081 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
16082 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
16083 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
16084 (arm*-*-linux*): Add iWMMXt and regset support.
16085 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16086 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16087 (arm_store_wmmxregset, target_regsets): New.
16088 * server.c (get_features_xml): Take annex argument. Check builtin
16089 XML documents.
16090 (handle_query): Handle multiple annexes.
16091
16092 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16093
16094 * remote-utils.c [USE_WIN32API] (read, write): Define.
16095 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16096 write.
16097
16098 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16099
16100 * linux-i386-low.c (the_low_target): Set arch_string.
16101 * linux-x86-64-low.c (the_low_target): Likewise.
16102 * linux-low.c (linux_arch_string): New.
16103 (linux_target_ops): Add it.
16104 * linux-low.h (struct linux_target_ops): Add arch_string.
16105 * server.c (write_qxfer_response): Use const void * for DATA.
16106 (get_features_xml): New.
16107 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16108 * target.h (struct target_ops): Add arch_string method.
16109
16110 2007-01-03 Denis Pilat <denis.pilat@st.com>
16111 Daniel Jacobowitz <dan@codesourcery.com>
16112
16113 * linux-low.c (linux_kill): Handle being called with no threads.
16114 * win32-i386-low.c (win32_kill): Likewise.
16115 (get_child_debug_event): Clear current_process_handle.
16116
16117 2006-12-30 Denis PILAT <denis.pilat@st.com>
16118 Daniel Jacobowitz <dan@codesourcery.com>
16119
16120 * remote-utils.c (remote_open): Check the type of specified
16121 serial port devices before opening them.
16122 * server.c (main): Kill the inferior if an error occurs during
16123 the first remote_open.
16124
16125 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16126
16127 * README: Update supported targets.
16128
16129 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16130
16131 * Makefile.in (clean): Remove reg-mips64.c.
16132 (reg-mips64.c, reg-mips64.o): New rules.
16133 * configure.srv: Handle mips64. Include regset support for mips.
16134 * linux-mips-low.c (union mips_register): New.
16135 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16136 (mips_breakpoint, mips_breakpoint_at): Use int.
16137 (mips_collect_register, mips_supply_register)
16138 (mips_collect_register_32bit, mips_supply_register_32bit)
16139 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16140 (mips_store_fpregset, target_regsets): New.
16141 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16142
16143 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16144
16145 * configure.srv: Add target "spu*-*-*".
16146 * Makefile.in (clean): Remove reg-spu.c.
16147 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16148 * spu-low.c: New file.
16149
16150 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16151
16152 * configure.ac: Correct td_thr_tls_get_addr test.
16153 * configure: Regenerated.
16154
16155 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16156
16157 * linux-low.c (linux_wait_for_event): Reformat. Use the
16158 pass_signals array.
16159 * remote-utils.c (decode_address_to_semicolon): New.
16160 * server.c (pass_signals, handle_general_set): New.
16161 (handle_query): Mention QPassSignals for qSupported.
16162 (main): Call handle_general_set.
16163 * server.h (pass_signals, decode_address_to_semicolon): New.
16164
16165 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16166
16167 * server.c (handle_query): Correct error handling for read_auxv.
16168
16169 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16170
16171 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16172 and srv_linux_thread_db to yes.
16173 * linux-s390-low.c (s390_fill_gregset): New function.
16174 (target_regsets): Define data structure.
16175
16176 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16177
16178 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16179 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16180 * config.in, configure: Regenerated.
16181 * inferiors.c (gdb_id_to_thread): New function.
16182 (gdb_id_to_thread_id): Use it.
16183 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16184 * linux-low.h (struct process_info): Add th member.
16185 (thread_db_get_tls_address): New prototype.
16186 * remote-utils.c (decode_address): Make non-static.
16187 * server.c (handle_query): Handle qGetTLSAddr.
16188 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16189 * target.h (struct target_ops): Add get_tls_address.
16190 * thread-db.c (maybe_attach_thread): Save the thread handle.
16191 (thread_db_get_tls_address): New.
16192
16193 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16194
16195 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16196 (linux_resume_one_process): Take a siginfo_t *. Update all
16197 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16198 (struct pending_signals): Add a siginfo_t.
16199 (linux_wait_for_process): Always set last_status.
16200 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16201 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16202 * linux-low.h (struct process_info): Add last_status.
16203
16204 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16205
16206 * remote-utils.c (try_rle): New function.
16207 (putpkt_binary): Use it.
16208
16209 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16210
16211 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16212 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16213 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16214 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16215 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16216 point registers.
16217
16218 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16219
16220 * server.c (terminal_fd): New variable.
16221 (old_foreground_pgrp): Likewise.
16222 (restore_old_foreground_pgrp): New function.
16223 (start_inferior): Record the terminal file descriptor in terminal_fd
16224 and its original foreground group in old_foreground_pgrp. Register
16225 restore_old_foreground_pgrp with atexit().
16226
16227 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16228
16229 * server.c (handle_query): Correct qPart to qXfer.
16230
16231 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16232
16233 * configure.ac: Check for more headers which are missing on
16234 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16235 * configure.srv: Add Cygwin and mingw32.
16236 * remote-utils.c: Don't include headers unconditionally which
16237 are missing on mingw32. Include <winsock.h> for mingw32.
16238 (remote_open): Adjust for mingw32 support. Flush
16239 standard error after writing to it.
16240 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16241 (unblock_async_io, enable_async_io, disable_async_io)
16242 (readchar, getpkt): Update for Winsock support.
16243 (prepare_resume_reply): Expect a protocol signal number.
16244 * server.c: Disable <sys/wait.h> on mingw32.
16245 (start_inferior): Adjust for mingw32 support. Flush
16246 standard error after writing to it.
16247 (attach_inferior): Likewise. Use protocol signal
16248 numbers.
16249 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16250 and names.
16251 * win32-i386-low.c: New file.
16252 * Makefile.in (XM_CLIBS): Set.
16253 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16254 (win32-i386-low.o): New dependency rule.
16255 * linux-low.c (linux_wait): Use target signal numbers.
16256 * target.h (struct target_ops): Doc fix.
16257 * server.h (target_signal_to_name): New prototype.
16258 * gdbreplay.c: Don't include headers unconditionally which
16259 are missing on mingw32. Include <winsock.h> for mingw32.
16260 (remote_close, remote_open): Adjust for Winsock support.
16261 * configure, config.in: Regenerated.
16262
16263 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16264
16265 * server.c (decode_xfer_read, write_qxfer_response): New.
16266 (handle_query): Take a packet length argument. Handle
16267 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16268 the qSupported response.
16269 (main): Update call to handle_query.
16270
16271 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16272
16273 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16274 (putpkt_binary): Renamed from putpkt and adjusted for binary
16275 data.
16276 (putpkt): New wrapper for putpkt_binary.
16277 (readchar): Don't mask off the high bit.
16278 (decode_X_packet): New function.
16279 * server.c (main): Call putpkt_binary if a handler sets the packet
16280 length. Save the length of the incoming packet. Handle 'X'.
16281 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16282
16283 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16284
16285 * server.c (handle_query): Handle qSupported.
16286
16287 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16288
16289 * remote-utils.c (all_symbols_looked_up): New variable.
16290 (look_up_one_symbol): Check it.
16291 * server.h (look_up_one_symbol): New declaration.
16292 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16293
16294 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16295
16296 * Makefile.in (linux-arm-low.o): Update dependencies.
16297 * linux-arm-low.c: Include "gdb_proc_service.h".
16298 (PTRACE_GET_THREAD_AREA): Define.
16299 (ps_get_thread_area): New function.
16300
16301 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16302
16303 * configure.srv (m68k*-*-uclinux*): New target.
16304 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16305 (linux_resume_one_process): Remove extraneous cast.
16306 (linux_read_offsets): New.
16307 (linux_target_op): Add linux_read_offsets on mmuless systems.
16308 * server.c (handle_query): Add qOffsets logic.
16309 * target.h (struct target_ops): Add read_offsets.
16310
16311 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16312
16313 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16314 (PTRACE_GET_THREAD_AREA): Define.
16315 (ps_get_thread_area): New function.
16316 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16317 (linux-x86-64-low.o): Update.
16318
16319 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16320
16321 * configure.ac: Remove checks for prfpregset_t.
16322 * gdb_proc_service.h: New file.
16323 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16324 new "gdb_proc_service.h".
16325 * proc-service.c: Likewise.
16326 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16327 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16328 * Makefile.in (gdb_proc_service_h): Updated.
16329 * configure, config.in: Regenerated.
16330
16331 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16332
16333 * remote-utils.c (prepare_resume_reply): Move declaration
16334 of gdb_id_from_wait to the top of the block.
16335
16336 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16337
16338 * linux-low.c (regsets_store_inferior_registers): Read the regset
16339 from the target before filling it.
16340
16341 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16342
16343 * server.c (attach_inferior): Return SIGTRAP for a successful
16344 attach.
16345
16346 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16347
16348 * Makefile.in (OBS): Add version.o.
16349 (STAGESTUFF): Delete.
16350 (version.o): Add dependencies.
16351 (version.c): Replace rule.
16352 (clean): Remove version.c.
16353 * server.c (gdbserver_version): New.
16354 (gdbserver_usage): Use printf.
16355 (main): Handle --version and --help.
16356 * server.h (version, host_name): Add declarations.
16357
16358 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16359
16360 * linux-arm-low.c:
16361 * linux-arm-low.c:
16362 * inferiors.c:
16363 * i387-fp.h:
16364 * i387-fp.c:
16365 * gdbreplay.c:
16366 * regcache.c:
16367 * proc-service.c:
16368 * mem-break.h:
16369 * mem-break.c:
16370 * linux-x86-64-low.c:
16371 * linux-sh-low.c:
16372 * linux-s390-low.c:
16373 * linux-ppc64-low.c:
16374 * linux-ppc-low.c:
16375 * linux-mips-low.c:
16376 * linux-m68k-low.c:
16377 * linux-m32r-low.c:
16378 * linux-low.h:
16379 * linux-low.c:
16380 * linux-ia64-low.c:
16381 * linux-i386-low.c:
16382 * linux-crisv32-low.c:
16383 * thread-db.c:
16384 * terminal.h:
16385 * target.h:
16386 * target.c:
16387 * server.h:
16388 * server.c:
16389 * remote-utils.c:
16390 * regcache.h:
16391 * utils.c:
16392 * Makefile.in:
16393 * configure.ac:
16394 * gdbserver.1: Add (C) after Copyright. Update the FSF
16395 address.
16396
16397 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16398
16399 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16400 (arm_breakpoint_at): Recognize both breakpoints.
16401 (the_low_target): Use the correct breakpoint instruction.
16402
16403 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16404
16405 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16406 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16407 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16408 (the_low_target): Update.
16409
16410 2005-10-25 Andreas Schwab <schwab@suse.de>
16411
16412 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16413
16414 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16415 (ia64_num_regs): Reduce to 462.
16416
16417 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16418
16419 * acinclude.m4: Correct quoting.
16420 * aclocal.m4: Regenerated.
16421
16422 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16423 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16424 (thread_db_init): Call thread_db_err_str.
16425 * configure.ac: Check for TD_VERSION.
16426 * config.in, configure: Regenerated.
16427
16428 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16429
16430 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16431
16432 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16433
16434 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16435 is not available. Define HAVE_PTRACE_GETREGS if it is.
16436 * config.in, configure: Regenerated.
16437 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16438 * linux-i386-low.c, linux-m68k-low.c: Update to use
16439 HAVE_PTRACE_GETREGS.
16440 * linux-low.c (regsets_fetch_inferior_registers)
16441 (regsets_store_inferior_registers): Only return 0 if we processed
16442 GENERAL_REGS.
16443 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16444 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16445
16446 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16447
16448 * inferiors.c (struct thread_info): Add gdb_id.
16449 (add_thread): Add gdb_id argument.
16450 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16451 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16452 calls to add_thread.
16453 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16454 * server.c (handle_query): Use thread_to_gdb_id.
16455 (handle_v_cont, main): Use gdb_id_to_thread_id.
16456 * server.h (add_thread): Update prototype.
16457 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16458 prototypes.
16459
16460 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16461
16462 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16463 left-padded registers.
16464 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16465 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16466
16467 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16468
16469 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16470 * configure: Regenerate.
16471 * config.in: Regenerate.
16472 * server.h (NEED_DECLARATION_STRERROR):
16473 Replace with !HAVE_DECL_STRERROR.
16474
16475 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16476
16477 * linux-low.c (linux_wait, linux_send_signal): Don't test
16478 an unsigned long variable for > 0 if it could be MAX_ULONG.
16479 * server.c (myresume): Likewise.
16480 * target.c (set_desired_inferior): Likewise.
16481
16482 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16483
16484 * configure.ac: Simplify and improve check for socklen_t.
16485 * configure, config.in: Regenerate.
16486
16487 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16488
16489 * acconfig.h: Remove.
16490 * configure.ac: Add a test for socklen_t. Use three-argument
16491 AC_DEFINE throughout.
16492 * config.in: Regenerated using autoheader 2.59.
16493 * configure: Regenerated.
16494
16495 * gdbreplay.c (socklen_t): Provide a default.
16496 (remote_open): Use socklen_t.
16497 * remote-utils.c (socklen_t): Provide a default.
16498 (remote_open): Use socklen_t.
16499 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16500 unsigned char.
16501
16502 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16503 char for buffers.
16504 * linux-low.c (linux_read_memory, linux_write_memory)
16505 (linux_read_auxv): Likewise.
16506 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16507 (check_mem_write): Likewise.
16508 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16509 Likewise.
16510 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16511 (registers_from_string, register_data): Likewise.
16512 * server.c (handle_query, main): Likewise.
16513 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16514 (decode_M_packet): Likewise.
16515 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16516 * target.h (struct target_ops): Update read_memory, write_memory,
16517 and read_auxv.
16518 (read_inferior_memory, write_inferior_memory): Update.
16519 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16520 to unsigned char *.
16521 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16522 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16523 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16524 linux-s390-low.c, linux-sh-low.c: Update for changes in
16525 read_inferior_memory and the_low_target->breakpoint.
16526
16527 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16528
16529 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16530 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16531 * configure.srv: Add powerpc64-*-linux*.
16532 * linux-ppc64-low.c: New file.
16533
16534 2005-05-23 Orjan Friberg <orjanf@axis.com>
16535
16536 * linux-cris-low.c: New file with support for CRIS.
16537 * linux-crisv32-low.c: Ditto for CRISv32.
16538 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16539 (clean): Add reg-cris.c and reg-crisv32.c.
16540 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16541 reg-crisv32.o, and reg-crisv32.c to make rules.
16542 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16543 recognized targets.
16544
16545 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16546
16547 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16548 of sizeof (PTRACE_XFER_TYPE).
16549 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16550
16551 2005-05-12 Orjan Friberg <orjanf@axis.com>
16552
16553 * target.h (struct target_ops): Add insert_watchpoint,
16554 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16555 pointers for hardware watchpoint support.
16556 * linux-low.h (struct linux_target_ops): Ditto.
16557 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16558 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16559 to linux_target_ops.
16560 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16561 reply packet.
16562 * server.c (main): Recognize 'Z' and 'z' packets.
16563
16564 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16565
16566 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16567 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16568 (the_low_target): Add new members.
16569
16570 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16571
16572 * proc-service.c (ps_lgetregs): Search all_processes instead of
16573 all_threads.
16574
16575 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16576
16577 * server.c (start_inferior): Change return type to int.
16578 (attach_inferior): Change sigptr to int *.
16579 (handle_v_cont, handle_v_requests): Change signal to int *.
16580 (main): Change signal to int.
16581
16582 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16583
16584 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16585 * configure.srv: Add m32r*-*-linux*.
16586 * linux-m32r-low.c: New file.
16587
16588 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16589
16590 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16591
16592 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16593
16594 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16595 Take unsigned long arguments for PIDs.
16596 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16597 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16598 (wait_for_sigstop, linux_resume_one_process)
16599 (regsets_fetch_inferior_registers, linux_send_signal)
16600 (linux_read_auxv): Likewise. Update the types of variables holding
16601 PIDs. Update format string specifiers.
16602 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16603 * remote-utils.c (prepare_resume_reply): Likewise.
16604 * server.c (cont_thread, general_thread, step_thread)
16605 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16606 unsigned long.
16607 (handle_query): Update format specifiers.
16608 (handle_v_cont, main): Use strtoul for thread IDs.
16609 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16610 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16611 (general_thread, step_thread, thread_from_wait)
16612 (old_thread_from_wait): Update.
16613 * target.h (struct thread_resume): Use unsigned long for THREAD.
16614 (struct target_ops): Use unsigned long for arguments to attach and
16615 thread_alive.
16616
16617 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16618
16619 * acinclude.m4: Include bfd/bfd.m4 directly.
16620 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16621 <agriffis@toolchain.org>.
16622 * aclocal.m4, configure: Regenerated.
16623
16624 2005-01-07 Andrew Cagney <cagney@gnu.org>
16625
16626 * configure.ac: Rename configure.in, require autoconf 2.59.
16627 * configure: Re-generate.
16628
16629 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16630
16631 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16632 LIBS when finished.
16633 * aclocal.m4: Regenerated.
16634 * configure: Regenerated.
16635
16636 2004-11-21 Andreas Schwab <schwab@suse.de>
16637
16638 * linux-m68k-low.c (m68k_num_gregs): Define.
16639 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16640 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16641 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16642 (m68k_breakpoint_at): New. Add to the_low_target.
16643
16644 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16645 srv_linux_thread_db to yes.
16646
16647 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16648
16649 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16650 (ARCH_SET_FS): Likewise.
16651 (ARCH_GET_FS): Likewise.
16652 (ARCH_GET_GS): Likewise.
16653
16654 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16655
16656 * linux-i386-low.c (ps_get_thread_area): New.
16657 * linux-x86-64-low.c (ps_get_thread_area): New.
16658 * linux-low.c: Include <sys/syscall.h>.
16659 (linux_kill_one_process): Don't kill the first thread here.
16660 (linux_kill): Kill the first thread here.
16661 (kill_lwp): New function.
16662 (send_sigstop, linux_send_signal): Use it.
16663 * proc-service.c: Clean up #ifdefs.
16664 (fpregset_info): Delete.
16665 (ps_lgetregs): Update and enable implementation.
16666 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16667 implementations.
16668 * remote-utils.c (struct sym_cache, symbol_cache): New.
16669 (input_interrupt): Print a clearer message.
16670 (async_io_enabled): New variable.
16671 (enable_async_io, disable_async_io): Use it. Update comments.
16672 (look_up_one_symbol): Use the symbol cache.
16673 * thread-db.c (thread_db_look_up_symbols): New function.
16674 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16675
16676 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16677
16678 * configure.in: Test for -rdynamic.
16679 * configure: Regenerated.
16680 * Makefile (INTERNAL_LDFLAGS): New.
16681 (gdbserver, gdbreplay): Use it.
16682
16683 2004-09-02 Andrew Cagney <cagney@gnu.org>
16684
16685 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16686
16687 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16688
16689 * linux-low.c (linux_wait): Clear all_processes list also.
16690
16691 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16692
16693 * linux-low.c: Include <errno.h>. Remove extern declaration of
16694 errno.
16695
16696 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16697
16698 * gdbreplay.c, server.h, utils.c: Update copyright years.
16699
16700 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16701
16702 * server.c (main): Print child status or termination signal from
16703 variable 'signal', not 'sig'.
16704
16705 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16706
16707 * linux-low.c (linux_read_memory): Change return type to
16708 int. Check for and return error from ptrace().
16709 * target.c (read_inferior_memory): Change return type to int. Pass
16710 back return status from the_target->read_memory().
16711 * target.h (struct target_ops): Adapt *read_memory() prototype.
16712 Update comment.
16713 (read_inferior_memory): Adapt prototype.
16714 * server.c (main): Return an error packet if
16715 read_inferior_memory() returns an error.
16716
16717 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16718
16719 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16720 Unify with other clean targets.
16721
16722 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16723
16724 * server.c (handle_v_cont): Call set_desired_inferior.
16725
16726 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16727
16728 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16729
16730 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16731
16732 * linux-low.c (linux_wait): Unblock async I/O.
16733 (linux_resume): Block and enable async I/O.
16734 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16735 * server.h (block_async_io, unblock_async_io): Add prototypes.
16736
16737 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16738
16739 * remote-utils.c (remote_open): Print a status notice after
16740 opening a TCP port.
16741 * server.c (attach_inferior): Print a status notice after
16742 attaching.
16743
16744 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16745
16746 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16747
16748 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16749
16750 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16751 error packet.
16752 * server.c, target.h: Update copyright years.
16753
16754 2004-02-25 Roland McGrath <roland@redhat.com>
16755
16756 * target.h (struct target_ops): New member `read_auxv'.
16757 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16758 * linux-low.c (linux_read_auxv): New function.
16759 (linux_target_ops): Initialize `read_auxv' member to that.
16760
16761 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16762
16763 Committed by Jim Blandy <jimb@redhat.com>.
16764
16765 * linux-s390-low.c (s390_num_regs): Update.
16766 (s390_regmap): Remove control registers. Use __s390x__ predefine
16767 instead of GPR_SIZE to distiguish s390 and s390x targets.
16768
16769 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16770
16771 * linux-low.c: Update copyright year.
16772 (check_removed_breakpoint): Clear pending_is_breakpoint.
16773 (linux_set_resume_request, linux_queue_one_thread)
16774 (resume_status_pending_p): New functions.
16775 (linux_continue_one_thread): Use process->resume.
16776 (linux_resume): Only resume threads if there are no pending events.
16777 * linux-low.h (struct process_info): Add resume request
16778 pointer.
16779
16780 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16781
16782 * regcache.c (new_register_cache): Clear the allocated register
16783 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16784
16785 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16786
16787 * linux-low.c (linux_resume): Take a struct thread_resume *
16788 argument.
16789 (linux_wait): Update call.
16790 (resume_ptr): New static variable.
16791 (linux_continue_one_thread): Renamed from
16792 linux_continue_one_process. Use resume_ptr.
16793 (linux_resume): Use linux_continue_one_thread.
16794 * server.c (handle_v_cont, handle_v_requests): New functions.
16795 (myresume): New function.
16796 (main): Handle 'v' case.
16797 * target.h (struct thread_resume): New type.
16798 (struct target_ops): Change argument of "resume" to struct
16799 thread_resume *.
16800 (myresume): Delete macro.
16801
16802 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16803
16804 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16805 (uninstall): Support DESTDIR.
16806
16807 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16808
16809 * configure.srv: Add xscale*linux copy of arm*linux entry.
16810
16811 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16812
16813 * linux-arm-low.c (arm_reinsert_addr): New function.
16814 (the_low_target): Add arm_reinsert_addr.
16815
16816 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16817
16818 * mem-break.c: Remove whitespace at end of file.
16819
16820 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16821
16822 * configure.in: Check whether we need to prototype strerror.
16823 * server.h: Optionally prototype strerror.
16824 * gdbreplay.c (perror_with_name): Use strerror.
16825 * linux-low.c (linux_attach_lwp): Use strerror.
16826 * utils.c (perror_with_name): Use strerror.
16827 * config.in, configure: Regenerated.
16828
16829 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16830
16831 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16832 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16833
16834 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16835
16836 * Makefile.in (SFILES): Update.
16837 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16838 low-sun3.c: Remove files.
16839
16840 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16841
16842 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16843 (linux_detach_one_process, linux_detach): New functions.
16844 (linux_target_ops): Add linux_detach.
16845 * server.c (main): Handle 'D' packet.
16846 * target.h (struct target_ops): Add "detach" member.
16847 (detach_inferior): Define.
16848
16849 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16850
16851 From Kelley Cook <kelleycook@wideopenwest.com>:
16852 * configure.srv: Accept i[34567]86 variants.
16853
16854 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16855
16856 * linux-low.c (linux_wait_for_event): Correct comment typos.
16857 (linux_resume_one_process): Call check_removed_breakpoint.
16858 (linux_send_signal): New function.
16859 (linux_target_ops): Add linux_send_signal.
16860 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16861 of kill.
16862 * target.h (struct target_ops): Add send_signal.
16863
16864 2003-05-29 Jim Blandy <jimb@redhat.com>
16865
16866 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16867 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16868 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16869 away part of the register's value.
16870
16871 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16872
16873 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16874 (linux_wait_for_event, linux_init_signals): Likewise.
16875
16876 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16877
16878 * configure.in: Check for stdlib.h.
16879 * configure: Regenerated.
16880 * config.in: Regenerated.
16881
16882 2003-01-04 Andreas Schwab <schwab@suse.de>
16883
16884 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16885
16886 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16887
16888 * Makefile.in: Remove obsolete code.
16889
16890 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16891
16892 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16893 defined(PT_FPR0_HI).
16894
16895 2002-11-17 Stuart Hughes <seh@zee2.com>
16896
16897 * linux-arm-low.c (arm_num_regs): Increase.
16898 (arm_regmap): Include status register.
16899
16900 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16901
16902 * linux-low.c (register_addr): Remove incorrect -1 check.
16903
16904 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16905
16906 * linux-low.c (linux_create_inferior): Call setpgid. Return
16907 the new PID.
16908 (unstopped_p, linux_signal_pid): Remove.
16909 (linux_target_ops): Remove linux_signal_pid.
16910 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16911 global instead of target method.
16912 * target.h (struct target_ops): Remove signal_pid. Update comment
16913 for create_inferior.
16914 * server.c (signal_pid): New variable.
16915 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16916 gdbserver. Set the child to be the foreground process group.
16917 (attach_inferior): Set signal_pid.
16918
16919 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16920
16921 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16922
16923 2002-08-20 Jim Blandy <jimb@redhat.com>
16924
16925 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16926 default for this.
16927
16928 2002-08-01 Andrew Cagney <cagney@redhat.com>
16929
16930 * Makefile.in: Make chill references obsolete.
16931
16932 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16933
16934 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16935 * configure: Regenerate.
16936 * config.in: Regenerate.
16937
16938 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16939
16940 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16941 (perror_with_name, remote_close, remote_open, expect, play): Static.
16942
16943 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16944
16945 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16946 byte offsets instead of an array of indexes.
16947 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16948
16949 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16950
16951 * regcache.c: Add comment.
16952
16953 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16954
16955 * thread-db.c: New file.
16956 * proc-service.c: New file.
16957 * acinclude.m4: New file.
16958 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16959 proc-service.o, and thread-db.o.
16960 (linux-low.o): Add USE_THREAD_DB.
16961 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16962 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16963 * aclocal.m4: Regenerated.
16964 * config.in: Regenerated.
16965 * configure: Regenerated.
16966 * configure.in: Check for proc_service.h, sys/procfs.h,
16967 thread_db.h, and linux/elf.h headrs.
16968 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16969 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16970 Check for -lthread_db and thread support.
16971 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16972 PowerPC, and SuperH.
16973 * i387-fp.c: Constify arguments.
16974 * i387-fp.h: Likewise.
16975 * inferiors.c: (struct thread_info): Renamed from
16976 `struct inferior_info'. Remove PID member. Use generic inferior
16977 list header. All uses updated.
16978 (inferiors, signal_pid): Removed.
16979 (all_threads): New variable.
16980 (get_thread): Define.
16981 (add_inferior_to_list): New function.
16982 (for_each_inferior): New function.
16983 (change_inferior_id): New function.
16984 (add_inferior): Removed.
16985 (remove_inferior): New function.
16986 (add_thread): New function.
16987 (free_one_thread): New function.
16988 (remove_thread): New function.
16989 (clear_inferiors): Use for_each_inferior and free_one_thread.
16990 (find_inferior): New function.
16991 (find_inferior_id): New function.
16992 (inferior_target_data): Update argument type.
16993 (set_inferior_target_data): Likewise.
16994 (inferior_regcache_data): Likewise.
16995 (set_inferior_regcache_data): Likewise.
16996 * linux-low.c (linux_bp_reinsert): Remove.
16997 (all_processes, stopping_threads, using_thrads)
16998 (struct pending_signals, debug_threads, pid_of): New.
16999 (inferior_pid): Replace with macro.
17000 (struct inferior_linux_data): Remove.
17001 (get_stop_pc, add_process): New functions.
17002 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
17003 Use add_process and add_thread.
17004 (linux_attach_lwp): New function, based on old linux_attach. Use
17005 add_process and add_thread. Set stop_expected for new threads.
17006 (linux_attach): New function.
17007 (linux_kill_one_process): New function.
17008 (linux_kill): Kill all LWPs.
17009 (linux_thread_alive): Use find_inferior_id.
17010 (check_removed_breakpoints, status_pending_p): New functions.
17011 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
17012 Update. Use WNOHANG. Wait for cloned processes also. Update process
17013 struct for the found process.
17014 (linux_wait_for_event): New function.
17015 (linux_wait): Use it. Support LWPs.
17016 (send_sigstop, wait_for_sigstop, stop_all_processes)
17017 (linux_resume_one_process, linux_continue_one_process): New functions.
17018 (linux_resume): Support LWPs.
17019 (REGISTER_RAW_SIZE): Remove.
17020 (fetch_register): Use register_size instead. Call supply_register.
17021 (usr_store_inferior_registers): Likewise. Call collect_register.
17022 Fix recursive case.
17023 (regsets_fetch_inferior_registers): Improve error message.
17024 (regsets_store_inferior_registers): Add debugging.
17025 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
17026 (unstopped_p, linux_signal_pid): New functions.
17027 (linux_target_ops): Add linux_signal_pid.
17028 (linux_init_signals): New function.
17029 (initialize_low): Call it. Initialize using_threads.
17030 * regcache.c (inferior_regcache_data): Add valid
17031 flag.
17032 (get_regcache): Fetch registers lazily. Add fetch argument
17033 and update all callers.
17034 (regcache_invalidate_one, regcache_invalidate): New
17035 functions.
17036 (new_register_cache): Renamed from create_register_cache.
17037 Return the new regcache.
17038 (free_register_cache): Change argument to a void *.
17039 (registers_to_string, registers_from_string): Call get_regcache
17040 with fetch flag set.
17041 (register_data): Make static. Pass fetch flag to get_regcache.
17042 (supply_register): Call get_regcache with fetch flag clear.
17043 (collect_register): Call get_regcache with fetch flag set.
17044 (collect_register_as_string): New function.
17045 * regcache.h: Update.
17046 * remote-utils.c (putpkt): Flush after debug output and use
17047 stderr.
17048 Handle input interrupts while waiting for an ACK.
17049 (input_interrupt): Use signal_pid method.
17050 (getpkt): Flush after debug output and use stderr.
17051 (outreg): Use collect_register_as_string.
17052 (new_thread_notify, dead_thread_notify): New functions.
17053 (prepare_resume_reply): Check using_threads. Set thread_from_wait
17054 and general_thread.
17055 (look_up_one_symbol): Flush after debug output.
17056 * server.c (step_thread, server_waiting): New variables.
17057 (start_inferior): Don't use signal_pid. Update call to mywait.
17058 (attach_inferior): Update call to mywait.
17059 (handle_query): Handle qfThreadInfo and qsThreadInfo.
17060 (main): Don't fetch/store registers explicitly. Use
17061 set_desired_inferior. Support proposed ``Hs'' packet. Update
17062 calls to mywait.
17063 * server.h: Update.
17064 (struct inferior_list, struct_inferior_list_entry): New.
17065 * target.c (set_desired_inferior): New.
17066 (write_inferior_memory): Constify.
17067 (mywait): New function.
17068 * target.h: Update.
17069 (struct target_ops): New signal_pid method.
17070 (mywait): Removed macro, added prototype.
17071
17072 * linux-low.h (regset_func): Removed.
17073 (regset_fill_func, regset_store_func): New.
17074 (enum regset_type): New.
17075 (struct regset_info): Add type field. Use new operation types.
17076 (struct linux_target_ops): stop_pc renamed to get_pc.
17077 Add decr_pc_after_break and breakpoint_at.
17078 (get_process, get_thread_proess, get_process_thread)
17079 (strut process_info, all_processes, linux_attach_lwp)
17080 (thread_db_init): New.
17081
17082 * linux-arm-low.c (arm_get_pc, arm_set_pc,
17083 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
17084 (the_low_target): Add new members.
17085 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17086 (i386_store_fpxregset): Constify.
17087 (target_regsets): Add new kind identifier.
17088 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17089 (i386_set_pc): Add debugging.
17090 (i386_breakpoint_at): New function.
17091 (the_low_target): Add new members.
17092 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17093 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17094 (mips_breakpoint_at): New.
17095 (the_low_target): Add new members.
17096 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17097 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17098 (the_low_target): Add new members.
17099 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17100 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17101 (the_low_target): Add new members.
17102 * linux-x86-64-low.c (target_regsets): Add new kind
17103 identifier.
17104
17105 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
17106
17107 From Martin Pool <mbp@samba.org>:
17108 * server.c (gdbserver_usage): New function.
17109 (main): Call it.
17110
17111 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17112
17113 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17114 stop_at -> stop_pc.
17115
17116 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17117
17118 * Makefile.in: Remove obsolete code.
17119
17120 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17121
17122 * linux-low.c (regsets_fetch_inferior_registers),
17123 (regsets_store_inferior_registers): Removed cast to int from
17124 ptrace() calls.
17125 * regcache.h: Added declaration of struct inferior_info.
17126
17127 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17128
17129 * inferiors.c (struct inferior_info): Add regcache_data.
17130 (add_inferior): Call create_register_cache.
17131 (clear_inferiors): Call free_register_cache.
17132 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17133 * regcache.c (struct inferior_regcache_data): New.
17134 (registers): Remove.
17135 (get_regcache): New function.
17136 (create_register_cache, free_register_cache): New functions.
17137 (set_register_cache): Don't initialize the register cache here.
17138 (registers_to_string, registers_from_string, register_data): Call
17139 get_regcache.
17140 * regcache.h: Add prototypes.
17141 * server.h: Likewise.
17142
17143 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17144
17145 * mem-break.c: New file.
17146 * mem-break.h: New file.
17147 * Makefile.in: Add mem-break.o rule; update server.h
17148 dependencies.
17149 * inferiors.c (struct inferior_info): Add target_data
17150 member.
17151 (clear_inferiors): Free target_data member if set.
17152 (inferior_target_data, set_inferior_target_data): New functions.
17153 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17154 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17155 * linux-low.c (linux_bp_reinsert): New variable.
17156 (struct inferior_linux_data): New.
17157 (linux_create_inferior): Use set_inferior_target_data.
17158 (linux_attach): Likewise. Call add_inferior.
17159 (linux_wait_for_one_inferior): New function.
17160 (linux_wait): Call it.
17161 (linux_write_memory): Add const.
17162 (initialize_low): Call set_breakpoint_data.
17163 * linux-low.h (struct linux_target_ops): Add breakpoint
17164 handling members.
17165 * server.c (attach_inferior): Remove extra add_inferior
17166 call.
17167 * server.h: Include mem-break.h. Update inferior.c
17168 prototypes.
17169 * target.c (read_inferior_memory)
17170 (write_inferior_memory): New functions.
17171 * target.h (read_inferior_memory)
17172 (write_inferior_memory): Change macros to prototypes.
17173 (struct target_ops): Update comments. Add const to write_memory
17174 definition.
17175
17176 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17177
17178 * linux-low.c (usr_store_inferior_registers): Support
17179 registers which are allowed to fail to store.
17180 * linux-low.h (linux_target_ops): Likewise.
17181 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17182 (ppc_cannot_store_register): FPSCR may not be storable.
17183
17184 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17185
17186 * server.h: Include <string.h> if HAVE_STRING_H.
17187 * ChangeLog: Correct paths in last ChangeLog entry.
17188
17189 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17190
17191 * linux-low.h: Remove obsolete prototypes.
17192 (struct linux_target_ops): New.
17193 (extern the_low_target): New.
17194 * linux-low.c (num_regs, regmap): Remove declarations.
17195 (register_addr): Use the_low_target explicitly.
17196 (fetch_register): Likewise.
17197 (usr_fetch_inferior_registers): Likewise.
17198 (usr_store_inferior_registers): Likewise.
17199 * linux-arm-low.c (num_regs): Remove.
17200 (arm_num_regs): Define.
17201 (arm_regmap): Renamed from regmap, made static.
17202 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17203 made static.
17204 (arm_cannot_store_register): Renamed from cannot_store_register,
17205 made static.
17206 (the_low_target): New.
17207 * linux-i386-low.c (num_regs): Remove.
17208 (i386_num_regs): Define.
17209 (i386_regmap): Renamed from regmap, made static.
17210 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17211 made static.
17212 (i386_cannot_store_register): Renamed from cannot_store_register,
17213 made static.
17214 (the_low_target): New.
17215 * linux-ia64-low.c (num_regs): Remove.
17216 (ia64_num_regs): Define.
17217 (ia64_regmap): Renamed from regmap, made static.
17218 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17219 made static.
17220 (ia64_cannot_store_register): Renamed from cannot_store_register,
17221 made static.
17222 (the_low_target): New.
17223 * linux-m68k-low.c (num_regs): Remove.
17224 (m68k_num_regs): Define.
17225 (m68k_regmap): Renamed from regmap, made static.
17226 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17227 made static.
17228 (m68k_cannot_store_register): Renamed from cannot_store_register,
17229 made static.
17230 (the_low_target): New.
17231 * linux-mips-low.c (num_regs): Remove.
17232 (mips_num_regs): Define.
17233 (mips_regmap): Renamed from regmap, made static.
17234 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17235 made static.
17236 (mips_cannot_store_register): Renamed from cannot_store_register,
17237 made static.
17238 (the_low_target): New.
17239 * linux-ppc-low.c (num_regs): Remove.
17240 (ppc_num_regs): Define.
17241 (ppc_regmap): Renamed from regmap, made static.
17242 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17243 made static.
17244 (ppc_cannot_store_register): Renamed from cannot_store_register,
17245 made static.
17246 (the_low_target): New.
17247 * linux-s390-low.c (num_regs): Remove.
17248 (s390_num_regs): Define.
17249 (s390_regmap): Renamed from regmap, made static.
17250 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17251 made static.
17252 (s390_cannot_store_register): Renamed from cannot_store_register,
17253 made static.
17254 (the_low_target): New.
17255 * linux-sh-low.c (num_regs): Remove.
17256 (sh_num_regs): Define.
17257 (sh_regmap): Renamed from regmap, made static.
17258 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17259 made static.
17260 (sh_cannot_store_register): Renamed from cannot_store_register,
17261 made static.
17262 (the_low_target): New.
17263 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17264 (the_low_target): New.
17265
17266 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17267
17268 * Makefile.in: Add stamp-h target.
17269 * configure.in: Create stamp-h.
17270 * configure: Regenerated.
17271
17272 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17273
17274 * inferiors.c: New file.
17275 * target.c: New file.
17276 * target.h: New file.
17277 * Makefile.in: Add target.o and inferiors.o. Update
17278 dependencies.
17279 * linux-low.c (inferior_pid): New static variable,
17280 moved from server.c.
17281 (linux_create_inferior): Renamed from create_inferior.
17282 Call add_inferior. Return 0 on success instead of a PID.
17283 (linux_attach): Renamed from myattach.
17284 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17285 (linux_thread_alive): Renamed from mythread_alive.
17286 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17287 child dies.
17288 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17289 (regsets_store_inferior_registers): Correct error message.
17290 Add missing ``return 0''.
17291 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17292 (linux_store_registers): Renamed from store_inferior_registers.
17293 (linux_read_memory): Renamed from read_inferior_memory.
17294 (linux_write_memory): Renamed from write_inferior_memory.
17295 (linux_target_ops): New structure.
17296 (initialize_low): Call set_target_ops ().
17297 * remote-utils.c (unhexify): New function.
17298 (hexify): New function.
17299 (input_interrupt): Send signals to ``signal_pid''.
17300 * server.c (inferior_pid): Remove.
17301 (start_inferior): Update create_inferior call.
17302 (attach_inferior): Call add_inferior.
17303 (handle_query): New function.
17304 (main): Call handle_query for `q' packets.
17305 * server.h: Include "target.h". Remove obsolete prototypes.
17306 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17307
17308 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17309
17310 * Makefile.in: Add WARN_CFLAGS. Update configury
17311 dependencies.
17312 * configure.in: Check for <string.h>
17313 * configure: Regenerate.
17314 * config.in: Regenerate.
17315 * gdbreplay.c: Include needed system headers.
17316 (remote_open): Remove strchr prototype.
17317 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17318 * regcache.c (supply_register): Change buf argument to const void *.
17319 (supply_register_by_name): Likewise.
17320 (collect_register): Change buf argument to void *.
17321 (collect_register_by_name): Likewise.
17322 * regcache.h: Add missing prototypes.
17323 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17324 * server.c (handle_query): New function.
17325 (attached): New static variable, moved out of main.
17326 (main): Quiet longjmp clobber warnings.
17327 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17328 * utils.c (error): Remove NORETURN.
17329 (fatal): Likewise.
This page took 0.46367 seconds and 5 git commands to generate.