Handle \r\n in gdbreplay
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2019-02-27 Tom Tromey <tromey@adacore.com>
2
3 * gdbreplay.c (logchar): Handle \r\n.
4
5 2019-02-07 Alan Hayward <alan.hayward@arm.com>
6
7 * linux-low.c (linux_attach): Add process before lwp.
8 * server.c (attach_inferior): Check if already attached.
9
10 2019-02-07 Tom Tromey <tom@tromey.com>
11
12 * x86-tdesc.h: Rename include guard.
13 * x86-low.h: Add include guard.
14 * wincecompat.h: Rename include guard.
15 * win32-low.h: Add include guard.
16 * utils.h: Rename include guard.
17 * tracepoint.h: Rename include guard.
18 * tdesc.h: Rename include guard.
19 * target.h: Rename include guard.
20 * server.h: Rename include guard.
21 * remote-utils.h: Rename include guard.
22 * regcache.h: Rename include guard.
23 * nto-low.h: Rename include guard.
24 * notif.h: Add include guard.
25 * mem-break.h: Rename include guard.
26 * lynx-low.h: Add include guard.
27 * linux-x86-tdesc.h: Add include guard.
28 * linux-s390-tdesc.h: Add include guard.
29 * linux-ppc-tdesc-init.h: Add include guard.
30 * linux-low.h: Add include guard.
31 * linux-aarch64-tdesc.h: Add include guard.
32 * linux-aarch32-low.h: Add include guard.
33 * inferiors.h: Rename include guard.
34 * i387-fp.h: Rename include guard.
35 * hostio.h: Rename include guard.
36 * gdbthread.h: Rename include guard.
37 * gdb_proc_service.h: Rename include guard.
38 * event-loop.h: Rename include guard.
39 * dll.h: Rename include guard.
40 * debug.h: Rename include guard.
41 * ax.h: Rename include guard.
42
43 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
44
45 PR gdb/23985
46 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
47 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
48
49 2019-01-25 Tom Tromey <tom@tromey.com>
50
51 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
52
53 2019-01-25 Tom Tromey <tom@tromey.com>
54
55 * win32-low.c: Fix common/ includes.
56 * win32-i386-low.c: Fix common/ includes.
57 * tracepoint.c: Fix common/ includes.
58 * thread-db.c: Fix common/ includes.
59 * target.h: Fix common/ includes.
60 * symbol.c: Fix common/ includes.
61 * spu-low.c: Fix common/ includes.
62 * server.h: Fix common/ includes.
63 * server.c: Fix common/ includes.
64 * remote-utils.c: Fix common/ includes.
65 * regcache.h: Fix common/ includes.
66 * regcache.c: Fix common/ includes.
67 * nto-x86-low.c: Fix common/ includes.
68 * notif.h: Fix common/ includes.
69 * mem-break.h: Fix common/ includes.
70 * lynx-low.c: Fix common/ includes.
71 * lynx-i386-low.c: Fix common/ includes.
72 * linux-x86-tdesc-selftest.c: Fix common/ includes.
73 * linux-x86-low.c: Fix common/ includes.
74 * linux-low.c: Fix common/ includes.
75 * inferiors.h: Fix common/ includes.
76 * i387-fp.c: Fix common/ includes.
77 * hostio.c: Fix common/ includes.
78 * hostio-errno.c: Fix common/ includes.
79 * gdbthread.h: Fix common/ includes.
80 * gdbreplay.c: Fix common/ includes.
81 * fork-child.c: Fix common/ includes.
82 * event-loop.c: Fix common/ includes.
83 * ax.c:
84 (enum gdb_agent_op): Fix common/ includes.
85
86 2019-01-21 Tom Tromey <tom@tromey.com>
87
88 * tracepoint.c: Fix includes.
89 * remote-utils.c: Fix includes.
90 * linux-x86-low.c: Fix includes.
91
92 2019-01-01 Joel Brobecker <brobecker@adacore.com>
93
94 * gdbreplay.c (gdbreplay_version): Update copyright year in
95 version message.
96 * server.c (gdbserver_version): Likewise.
97
98 2018-12-05 Alan Hayward <alan.hayward@arm.com>
99
100 * linux-low.c (add_lwp): Switch ordering.
101
102 2018-11-29 Tom Tromey <tom@tromey.com>
103
104 * win32-low.c (win32_join): Take pid, not process.
105 * target.h (struct target_ops) <join>: Change argument type.
106 (join_inferior): Change argument name.
107 * spu-low.c (spu_join): Take pid, not process.
108 * server.c (handle_detach): Preserve pid before destroying
109 process.
110 * lynx-low.c (lynx_join): Take pid, not process.
111 * linux-low.c (linux_join): Take pid, not process.
112
113 2018-11-23 Alan Hayward <alan.hayward@arm.com>
114
115 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
116 (aarch64_cannot_fetch_register): Likewise.
117 (struct linux_target_ops): Update references.
118
119 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
120
121 * linux-ppc-low.c: Include nat/linux-ptrace.h.
122
123 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
124
125 * configure.srv (ipa_ppc_linux_regobj): Add
126 powerpc-isa207-htm-vsx32l-ipa.o and
127 powerpc-isa207-htm-vsx64l-ipa.o.
128 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
129 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
130 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
131 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
132 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
133 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
134 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
135 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
136 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
137 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
138 (init_registers_powerpc_isa207_htm_vsx32l)
139 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
140 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
141 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
142 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
143 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
144 (ppc_store_tm_ctarregset): New functions.
145 (ppc_regsets): Add entries for HTM regsets.
146 (ppc_arch_setup): Set htm in features struct when needed. Set
147 sizes for the HTM regsets.
148 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
149 (initialize_low_arch): Call
150 init_registers_powerpc_isa207_htm_vsx32l and
151 init_registers_powerpc_isa207_htm_vsx64l.
152 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
153 PPC_TDESC_ISA207_HTM_VSX.
154 (initialize_low_tracepoint): Call
155 init_registers_powerpc_isa207_htm_vsx32l and
156 init_registers_powerpc_isa207_htm_vsx64l.
157
158 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
159
160 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
161 rs6000/power-linux-pmu.xml to srv_xmlfiles.
162 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
163 (ppc_store_pmuregset): New functions.
164 (ppc_regsets): Add entries for ebb and pmu regsets.
165 (ppc_arch_setup): Set isa207 in features struct if the ebb and
166 pmu regsets are available. Set sizes for these regsets.
167
168 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
169
170 * configure.srv (ipa_ppc_linux_regobj): Add
171 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
172 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
173 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
174 rs6000/powerpc-isa207-vsx32l.xml, and
175 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
176 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
177 <PPC_TDESC_ISA207_VSX>: New enum value.
178 (init_registers_powerpc_isa207_vsx32l): Declare.
179 (init_registers_powerpc_isa207_vsx64l): Declare.
180 * linux-ppc-low.c (ppc_fill_tarregset): New function.
181 (ppc_store_tarregset): New function.
182 (ppc_regsets): Add entry for the TAR regset.
183 (ppc_arch_setup): Set isa207 in features struct when needed. Set
184 size for the TAR regsets.
185 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
186 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
187 and init_registers_powerpc_isa207_vsx64l.
188 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
189 (initialize_low_tracepoint): Call
190 init_registers_powerpc_isa207_vsx32l and
191 init_registers_powerpc_isa207_vsx64l.
192
193 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
194 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
195
196 * configure.srv (ipa_ppc_linux_regobj): Add
197 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
198 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
199 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
200 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
201 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
202 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
203 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
204 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
205 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
206 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
207 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
208 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
209 (ppc_hwcap): Add comment.
210 (ppc_hwcap2): New global.
211 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
212 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
213 (ppc_regsets): Add entries for the DSCR and PPR regsets.
214 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
215 when needed. Set sizes for the the DSCR and PPR regsets.
216 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
217 (initialize_low_arch): Call
218 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
219 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
220 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
221 PPC_TDESC_ISA205_PPR_DSCR_VSX.
222 (initialize_low_tracepoint): Call
223 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
224 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
225
226 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
227
228 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
229
230 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
231 Simon Marchi <simark@simark.ca>
232
233 * acinclude.m4: Include "../selftest.m4".
234 * configure: Regenerate.
235 * configure.ac: Use "GDB_AC_SELFTEST".
236 * configure.srv: Use "$enable_unittests" instead of
237 "$development" when checking whether unit tests have been
238 enabled.
239 * server.c (captured_main): Update message informing that
240 selftests have been disabled.
241
242 2018-10-04 Tom Tromey <tom@tromey.com>
243
244 * configure: Rebuild.
245
246 2018-10-04 Tom Tromey <tom@tromey.com>
247
248 * server.c (handle_status): Rename inner "thread".
249 (process_serial_event): Declare "res" in 'm' case.
250 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
251 (iterate_over_lwps): Rename inner "thread".
252 (linux_qxfer_libraries_svr4): Rename inner "len".
253 * gdbthread.h (find_thread_in_random): Rename inner "thread".
254
255 2018-10-01 Gary Benson <gbenson@redhat.com>
256
257 * gdb_proc_service.h: Moved common code to
258 common/gdb_proc_service.h.
259
260 2018-10-01 Gary Benson <gbenson@redhat.com>
261
262 * gdb_proc_service.h: Synchronize comments and whitespace with
263 GDB's version of this file.
264
265 2018-09-25 Tom Tromey <tom@tromey.com>
266
267 * configure: Rebuild.
268 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
269
270 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
271
272 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
273 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
274 ($(IPA_LIB)): Sort IPA_OBJS.
275
276 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
277
278 * Makefile.in: Remove references to $(ADD_DEPS).
279
280 2018-09-16 Tom Tromey <tom@tromey.com>
281
282 * remote-utils.c (remote_open): Use GNU style for metasyntactic
283 variables.
284 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
285 variables.
286
287 2018-09-05 Tom Tromey <tom@tromey.com>
288
289 * configure: Rebuild.
290
291 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
292
293 PR build/23399
294 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
295
296 2018-08-27 Tom Tromey <tom@tromey.com>
297
298 PR build/23087:
299 * configure: Rebuild.
300
301 2018-08-27 Tom Tromey <tom@tromey.com>
302
303 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
304 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
305 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
306 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
307 (s390x_emit_stack_adjust): Add casts to unsigned char.
308
309 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
310
311 PR gdb/23374
312 PR gdb/23375
313 * server.h (struct client_state) <disable_randomization>:
314 Initialize to 1.
315
316 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
317
318 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
319 variable.
320 (mips_supply_ptrace_register): Likewise.
321
322 2018-07-22 Tom Tromey <tom@tromey.com>
323
324 * configure: Rebuild.
325
326 2018-07-22 Tom Tromey <tom@tromey.com>
327
328 * win32-low.c (win32_create_inferior): Remove unused variables.
329 * gdbreplay.c (remote_open): Remove unused variable.
330 * remote-utils.c (remote_prepare): Remove unused variable.
331 * x86-tdesc.h (X86_TDESC_H): Define.
332 (amd64_expedite_regs): Define conditionally.
333 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
334 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
335 * remote-utils.c (readchar): Remove unused variable.
336
337 2018-07-13 Pedro Alves <palves@redhat.com>
338
339 * linux-low.c (linux_kill): Change parameter to process_info
340 pointer instead of pid. Adjust.
341 * lynx-low.c (lynx_kill): Likewise.
342 * nto-low.c (nto_kill): Likewise.
343 * spu-low.c (spu_kill): Likewise.
344 * win32-low.c (win32_kill): Likewise.
345 * server.c (handle_v_kill, kill_inferior_callback)
346 (detach_or_kill_for_exit): Adjust.
347 * target.c (kill_inferior): Change parameter to process_info
348 pointer instead of pid. Adjust.
349 * target.h (struct target_ops) <kill>: Change parameter to
350 process_info pointer instead of pid. Adjust all implementations
351 and callers.
352 (kill_inferior): Likewise.
353
354 2018-07-13 Pedro Alves <palves@redhat.com>
355
356 * linux-low.c (linux_detach, linux_join): Change parameter to
357 process_info pointer instead of pid. Adjust.
358 * lynx-low.c (lynx_detach, lynx_join): Likewise.
359 * nto-low.c (nto_detach): Likewise.
360 * spu-low.c (spu_detach, spu_join): Likewise.
361 * win32-low.c (win32_detach, win32_join): Likewise.
362 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
363 * target.h (struct target_ops) <detach, join>: Change parameter to
364 process_info pointer instead of pid. Adjust all implementations
365 and callers.
366 (detach_inferior, join_inferior): Rename 'pid' parameter to
367 'proc'.
368
369 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
370 Jan Kratochvil <jan.kratochvil@redhat.com>
371 Paul Fertser <fercerpav@gmail.com>
372 Tsutomu Seki <sekiriki@gmail.com>
373
374 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
375 (OBS): Add 'common/netstuff.o'.
376 (GDBREPLAY_OBS): Likewise.
377 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
378 (remote_open): Implement support for IPv6
379 connections.
380 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
381 and 'wspiapi.h'.
382 (handle_accept_event): Accept connections from IPv6 sources.
383 (remote_prepare): Handle IPv6-style hostnames; implement
384 support for IPv6 connections.
385 (remote_open): Implement support for printing connections from
386 IPv6 sources.
387
388 2018-07-11 Pedro Alves <palves@redhat.com>
389
390 PR gdb/23377
391 * mem-break.c (any_persistent_commands): Add process_info
392 parameter and use it instead of relying on the current process.
393 Change return type to bool.
394 * mem-break.h (any_persistent_commands): Add process_info
395 parameter and change return type to bool.
396 * server.c (handle_detach): Remove require_running_or_return call.
397 Look up the process_info for the process we're about to detach.
398 If not found, return back error to GDB. Adjust
399 any_persistent_commands call to pass down a process pointer.
400
401 2018-07-11 Pedro Alves <palves@redhat.com>
402
403 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
404 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
405 instead of collect_register_by_name.
406 * regcache.c (regcache_raw_get_unsigned_by_name): New.
407 * regcache.h (regcache_raw_get_unsigned_by_name): New.
408
409 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
410 Pedro Alves <palves@redhat.com>
411
412 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
413
414 2018-07-03 Tom Tromey <tom@tromey.com>
415
416 * linux-low.c: Update.
417 * lynx-low.c: Update.
418 * mem-break.c: Update.
419 * nto-low.c: Update.
420 * remote-utils.c: Update.
421 * server.c: Update.
422 * spu-low.c: Update.
423 * target.c: Update.
424 * win32-low.c: Update.
425
426 2018-07-03 Tom Tromey <tom@tromey.com>
427
428 * server.c: Update.
429
430 2018-07-03 Tom Tromey <tom@tromey.com>
431
432 * linux-low.c: Update.
433
434 2018-07-03 Tom Tromey <tom@tromey.com>
435
436 * target.c: Update.
437
438 2018-07-03 Tom Tromey <tom@tromey.com>
439
440 * linux-low.c: Update.
441 * linux-mips-low.c: Update.
442 * lynx-low.c: Update.
443 * nto-low.c: Update.
444 * remote-utils.c: Update.
445 * server.c: Update.
446 * spu-low.c: Update.
447 * target.c: Update.
448 * thread-db.c: Update.
449
450 2018-07-03 Tom Tromey <tom@tromey.com>
451
452 * linux-low.c: Update.
453 * linux-mips-low.c: Update.
454 * lynx-low.c: Update.
455 * mem-break.c: Update.
456 * nto-low.c: Update.
457 * remote-utils.c: Update.
458 * server.c: Update.
459 * spu-low.c: Update.
460 * target.c: Update.
461 * tracepoint.c: Update.
462
463 2018-07-03 Tom Tromey <tom@tromey.com>
464
465 * linux-low.c: Update.
466 * linux-ppc-low.c: Update.
467 * linux-x86-low.c: Update.
468 * proc-service.c: Update.
469 * server.c: Update.
470 * spu-low.c: Update.
471 * thread-db.c: Update.
472 * win32-low.c: Update.
473
474 2018-07-03 Tom Tromey <tom@tromey.com>
475
476 * linux-low.c: Update.
477 * lynx-low.c: Update.
478 * nto-low.c: Update.
479 * remote-utils.c: Update.
480 * spu-low.c: Update.
481 * thread-db.c: Update.
482 * win32-low.c: Update.
483
484 2018-06-29 Joel Brobecker <brobecker@adacore.com>
485
486 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
487 parameter in call to 'amd64_create_target_description'.
488
489 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
490
491 * x86-tdesc.h: Remove executable permission flag.
492
493 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
494
495 * configure.ac: Remove AC_PREREQ, add missing quoting.
496 * configure: Re-generate.
497 * config.in: Re-generate.
498 * aclocal.m4: Re-generate.
499
500 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
501
502 * tracepoint.h (current_traceframe): Remove declaration.
503
504 2018-06-18 Alan Hayward <alan.hayward@arm.com>
505
506 * linux-aarch64-low.c (is_sve_tdesc): New function.
507 (aarch64_sve_regs_copy_to_regcache): Likewise.
508 (aarch64_sve_regs_copy_from_regcache): Likewise.
509 (aarch64_regs_info): Add SVE checks.
510 (initialize_low_arch): Initialize SVE.
511
512 2018-06-18 Alan Hayward <alan.hayward@arm.com>
513
514 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
515
516 2018-06-11 Alan Hayward <alan.hayward@arm.com>
517
518 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
519 (initialize_low_tracepoint): Likewise
520 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
521 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
522 param.
523 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
524 checks.
525 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
526
527 2018-06-11 Alan Hayward <alan.hayward@arm.com>
528
529 * server.h (PBUFSIZ): Increase size
530
531 2018-06-11 Alan Hayward <alan.hayward@arm.com>
532
533 * regcache.c (regcache::raw_compare): New function.
534 * regcache.h (regcache::raw_compare): New declaration.
535
536 2018-06-11 Alan Hayward <alan.hayward@arm.com>
537
538 * regcache.c (new_register_cache): Use new.
539 (free_register_cache): Use delete.
540 (register_data): Use const.
541 (supply_register): Move body inside regcache.
542 (regcache::raw_supply): New override function.
543 (collect_register): Move body inside regcache.
544 (regcache::raw_collect): New override function.
545 (regcache::get_register_status): New override function.
546 * regcache.h (struct regcache): Inherit from reg_buffer_common.
547
548 2018-06-09 Tom Tromey <tom@tromey.com>
549
550 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
551 declare queue.
552 (event_queue): Use std::queue.
553 (gdb_event_xfree): Remove.
554 (initialize_event_loop, process_event, wait_for_event): Update.
555
556 2018-06-08 Stan Cox <scox@redhat.com>
557
558 * win32-low.c (win32_create_inferior): last_ptid and last_status
559 moved to client_state.
560
561 2018-06-08 Pedro Alves <palves@redhat.com>
562
563 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
564 common/common-exceptions.o, common/common-utils.o,
565 common/errors.o, common/print-utils.o and utils.o.
566 * gdbreplay.c: Include "common-defs.h" instead of the two
567 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
568 string.h or alloca.h.
569 (perror_with_name): Delete.
570 (remote_open): Use xstrdup instead of strdup.
571 (main): Rename to ...
572 (captured_main): ... this.
573 (main): New.
574
575 2018-06-08 Tom Tromey <tom@tromey.com>
576
577 * linux-low.c (linux_low_read_btrace): Update.
578
579 2018-06-04 Stan Cox <scox@redhat.com>
580
581 * server.h (struct client_state): New.
582 * server.c (cont_thread, general_thread, multi_process)
583 (report_fork_events, report_vfork_events, report_exec_events)
584 (report_thread_events, swbreak_feature, hwbreak_feature)
585 (vCont_supported, disable_randomization, pass_signals)
586 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
587 Moved to client_state.
588 * remote-utils.c (remote_debug, noack_mode)
589 (transport_is_reliable): Moved to client_state.
590 * tracepoint.c (current_traceframe): Moved to client_state.
591
592 Update all callers.
593 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
594 linux-low.c, remote-utils.h, target.c: Use client_state.
595
596 2018-05-31 Alan Hayward <alan.hayward@arm.com>
597
598 * configure.srv: Add new c/h file.
599
600 2018-05-31 Alan Hayward <alan.hayward@arm.com>
601
602 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
603 null VQ.
604
605 2018-05-25 Maciej W. Rozycki <macro@mips.com>
606
607 * gdb.arch/mips-fpregset-core.exp: New test.
608 * gdb.arch/mips-fpregset-core.c: New test source.
609
610 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
611
612 PR server/23198
613 * hostio.c (require_int): Do not report overflow for integers
614 between 0xfffffff and 0x7fffffff.
615
616 2018-05-22 Maciej W. Rozycki <macro@mips.com>
617
618 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
619 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
620 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
621 functions.
622 (the_low_target): Wire them.
623
624 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
625
626 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
627 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
628 mode. Call collect_register_by_name with vscr using
629 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
630 (ppc_store_vrregset): Add and set vscr_offset variable as in
631 ppc_fill_vrregset. Call supply_register_by_name with vscr using
632 vscr_offset.
633
634 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
635
636 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
637 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
638 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
639
640 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
641
642 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
643 (ppc_store_vsxregset): Likewise.
644 (ppc_fill_vrregset): Likewise.
645 (ppc_store_vrregset): Likewise.
646 (ppc_fill_evrregset): Likewise.
647 (ppc_store_evrregset): Likewise.
648 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
649 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
650 needed.
651
652 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
653
654 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
655 wordsize of the inferior. Call ppc_linux_target_wordsize.
656
657 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
658
659 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
660 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
661 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
662 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
663 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
664 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
665 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
666 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
667 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
668 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
669 (tdesc_powerpc_e500l): Remove.
670 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
671 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
672 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
673 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
674 linux-ppc-tdesc.h.
675 (ppc_arch_setup): Remove target description matching code. Fill a
676 ppc_linux_features struct and call ppc_linux_match_description
677 with it.
678
679 2018-05-22 Maciej W. Rozycki <macro@mips.com>
680
681 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
682 width of the requested register exceeds the width of the
683 `ptrace' data type.
684 (mips_cannot_store_register): Likewise.
685
686 2018-05-21 Maciej W. Rozycki <macro@mips.com>
687
688 * linux-mips-low.c (mips_fetch_register): New function. Update
689 preceding comment.
690 (mips_store_gregset): Supply 0 rather than $restart for $zero.
691 (the_low_target): Wire `mips_fetch_register'.
692
693 2018-05-10 Joel Brobecker <brobecker@adacore.com>
694
695 * lynx-i386-low.c (LYNXOS_178): New macro.
696 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
697 the layout on LynxOS-178.
698 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
699 handle floating point registers that are not supported by
700 LynxOS-178.
701
702 2018-05-10 Tom Tromey <tom@tromey.com>
703
704 * configure: Rebuild.
705
706 2018-05-10 Joel Brobecker <brobecker@adacore.com>
707
708 PR server/23158:
709 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
710 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
711 Use it to set the expedite_regs field in the given tdesc.
712 * x86-tdesc.h: New file.
713 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
714 Adjust following the addition of the new expedite_regs parameter
715 to init_target_desc.
716 * linux-tic6x-low.c (tic6x_read_description): Likewise.
717 * linux-x86-tdesc.c: #include "x86-tdesc.h".
718 (i386_linux_read_description, amd64_linux_read_description):
719 Adjust following the addition of the new expedite_regs parameter
720 to init_target_desc.
721 * lynx-i386-low.c: #include "x86-tdesc.h".
722 (lynx_i386_arch_setup): Adjust following the addition of the new
723 expedite_regs parameter to init_target_desc.
724 * nto-x86-low.c: #include "x86-tdesc.h".
725 (nto_x86_arch_setup): Adjust following the addition of the new
726 expedite_regs parameter to init_target_desc.
727 * win32-i386-low.c: #include "x86-tdesc.h".
728 (i386_arch_setup): Adjust following the addition of the new
729 expedite_regs parameter to init_target_desc.
730
731 2018-05-10 Joel Brobecker <brobecker@adacore.com>
732
733 PR server/23158:
734 * win32-low.c (win32_create_inferior): Add call to my_wait
735 setting last_status global.
736
737 2018-05-10 Joel Brobecker <brobecker@adacore.com>
738
739 PR server/23158:
740 * win32-low.c (create_process): Only call gdb_tilde_expand if
741 inferior_cwd is not NULL.
742
743 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
744
745 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
746 registers to the cache if their values have changed.
747 (i387_xsave_to_cache): Provide default values for x87 control
748 registers when these features are available, but disabled.
749 * regcache.c (supply_register_by_name_zeroed): New function.
750 * regcache.h (supply_register_by_name_zeroed): Declare new
751 function.
752
753 2018-05-07 Tom Tromey <tom@tromey.com>
754
755 * configure: Rebuild.
756
757 2018-05-04 Tom Tromey <tom@tromey.com>
758
759 * configure: Rebuild.
760
761 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
762 Pedro Alves <palves@redhat.com>
763
764 * linux-aarch64-low.c (aarch64_stopped_data_address):
765 Likewise.
766
767 2018-04-27 Tom Tromey <tom@tromey.com>
768
769 * configure: Rebuild.
770
771 2018-04-23 Tom Tromey <tom@tromey.com>
772
773 * configure: Rebuild.
774
775 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
776
777 * Makefile.in (depcomp): Add "..".
778 (all_deps_files): New and use it.
779
780 2018-04-18 Alan Hayward <alan.hayward@arm.com>
781
782 * configure.srv (aarch64*-*-linux*): Don't include xml.
783 (i[34567]86-*-cygwin*): Likewise.
784 (i[34567]86-*-linux*): Likewise.
785 (i[34567]86-*-lynxos*): Likewise.
786 (i[34567]86-*-mingw32ce*): Likewise.
787 (i[34567]86-*-mingw*): Likewise.
788 (i[34567]86-*-nto*): Likewise.
789 (tic6x-*-uclinux): Likewise.
790 (x86_64-*-linux*): Likewise.
791 (x86_64-*-mingw*): Likewise.
792 (x86_64-*-cygwin*): Likewise.
793
794 2018-04-18 Alan Hayward <alan.hayward@arm.com>
795
796 * tdesc.c: Remove xml parameter.
797
798 2018-04-18 Alan Hayward <alan.hayward@arm.com>
799
800 * server.c (get_features_xml): Remove cast.
801 * tdesc.c (void target_desc::accept): Fill in function.
802 (tdesc_get_features_xml): Remove old xml creation.
803 (print_xml_feature::visit_pre): Add xml vistor.
804 * tdesc.h (struct target_desc): Make xmltarget mutable.
805 (tdesc_get_features_xml): Remove declaration.
806
807 2018-04-18 Alan Hayward <alan.hayward@arm.com>
808
809 * tdesc.c (tdesc_architecture_name): Add new function.
810 (tdesc_osabi_name): Likewise.
811 (tdesc_get_features_xml): Use new functions.
812
813 2018-04-18 Alan Hayward <alan.hayward@arm.com>
814
815 * tdesc.c (tdesc_create_flags): Remove.
816 (tdesc_add_flag): Likewise.
817 (tdesc_named_type): Likewise.
818 (tdesc_create_union): Likewise.
819 (tdesc_create_struct): Likewise.
820 (tdesc_create_vector): Likewise.
821 (tdesc_add_bitfield): Likewise.
822 (tdesc_add_field): Likewise.
823 (tdesc_set_struct_size): Likewise.
824
825 2018-04-18 Alan Hayward <alan.hayward@arm.com>
826
827 * tdesc.c (~target_desc): Remove implictly deleted items.
828 (init_target_desc): Iterate all features.
829 (tdesc_get_features_xml): Use vector.
830 (tdesc_create_feature): Create feature.
831 * tdesc.h (tdesc_feature) Remove
832 (target_desc): Add features.
833
834 2018-04-18 Alan Hayward <alan.hayward@arm.com>
835
836 * Makefile.in: Add common/tdesc.c
837 * tdesc.c (init_target_desc): init all reg_defs from register
838 vector.
839 (tdesc_create_reg): Create tdesc_reg.
840 * tdesc.h (tdesc_feature): Add register vector.
841
842 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
843
844 * tdesc.h (struct target_desc) <features>: Change type to
845 std::vector<std::string>.
846 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
847 changes.
848 (tdesc_get_features_xml): Likewise.
849 (tdesc_create_feature): Likewise.
850
851 2018-03-26 Alan Hayward <alan.hayward@arm.com>
852
853 * regcache.c (find_register_by_number): Return a ref.
854 (find_regno): Use references.
855 (register_size): Likewise.
856 (register_data): Likewise.
857 * tdesc.c (target_desc::~target_desc): Remove free calls.
858 (target_desc::operator==): Use std::vector compare.
859 (init_target_desc): Use reference.
860 (tdesc_create_reg): Use reg constructors.
861 * tdesc.h (struct target_desc): Replace pointer with object.
862
863 2018-03-23 Alan Hayward <alan.hayward@arm.com>
864
865 * regcache.c (find_register_by_number): Make static.
866 (find_regno): Use find_register_by_number
867 * regcache.h (struct reg): Remove declaration.
868
869 2018-03-23 Alan Hayward <alan.hayward@arm.com>
870
871 * tdesc.c (target_desc::~target_desc): Move to here.
872 (target_desc::operator==): Likewise.
873 * tdesc.h (target_desc::~target_desc): Move from here.
874 (target_desc::operator==): Likewise.
875
876 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
877
878 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
879
880 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
881
882 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
883 S390_TDESC_GS.
884 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
885 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
886 and init_registers_s390_gs_linux64.
887
888 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
889
890 * linux-s390-low.c (s390_fill_gs): Remove function.
891 (s390_fill_gsbc): Remove function.
892 (s390_regsets): Set fill functions for the guarded storage regsets
893 to NULL.
894
895 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
896
897 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
898 the word size. Add comment.
899 (s390_get_wordsize): New function.
900 (s390_arch_setup): No longer select a temporary tdesc to fetch the
901 pswm with it. Instead, use s390_get_wordsize to determine the
902 word size first and derive the correct tdesc from that directly.
903
904 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
905
906 * Makefile.in: Include silent-rules.mk.
907 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
908 (COMPILE): Add ECHO_CXX.
909 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
910 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
911 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
912 (version-generated.c): Add ECHO_GEN.
913 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
914 (IPAGENT_COMPILE): Add ECHO_CXX.
915 (%-generated.c): Add ECHO_REGDAT.
916
917 2018-03-14 Tom Tromey <tom@tromey.com>
918
919 PR cli/14977:
920 * ax.c (ax_printf): Special case for NULL.
921
922 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
923
924 * linux-low.c (linux_qxfer_libraries_svr4): Use
925 xml_escape_text_append.
926
927 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
928
929 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
930
931 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
932
933 * server.c (handle_general_set): Remove unnecessary xstrdup.
934
935 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
936
937 * server.c (parse_debug_format_options): Adjust to
938 delim_string_to_char_ptr_vec changes.
939 * thread-db.c (thread_db_load_search): Adjust to
940 dirnames_to_char_ptr_vec changes.
941
942 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
943
944 * target.h (target_enable_btrace, target_disable_btrace)
945 (target_read_btrace, target_read_btrace_conf): Turn macro into
946 inline function. Throw error if target method is not defined.
947 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
948 check for btrace target method. Be prepared to handle exceptions
949 from btrace target methods.
950
951 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
952
953 * server.c (captured_main): Change order of error message printed
954 when the current working directory cannot be found.
955
956 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
957
958 * server.c: Include "filenames.h" and "pathstuff.h".
959 (program_name): Delete variable.
960 (program_path): New anonymous class.
961 (get_exec_wrapper): Use "program_path" instead of
962 "program_name".
963 (handle_v_run): Likewise.
964 (captured_main): Likewise.
965 (process_serial_event): Likewise.
966
967 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
968
969 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
970 (OBJS): Add "pathstuff.o".
971 * server.c (current_directory): New global variable.
972 (captured_main): Initialize "current_directory".
973
974 2018-02-26 Alan Hayward <alan.hayward@arm.com>
975
976 * tdesc.c: Use common/tdesc.h.
977 * tdesc.h: Likewise.
978
979 2018-02-20 Alan Hayward <alan.hayward@arm.com>
980 Simon Marchi <simon.marchi@ericsson.com>
981
982 * Makefile.in: Switch order of make rules.
983
984 2018-02-19 Alan Hayward <alan.hayward@arm.com>
985
986 * Makefile.in: Add common directory in build.
987 * configure.ac: Add common reference.
988 * configure: Regenerate.
989
990 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
991
992 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
993 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
994 * spu-low.c (spu_target_ops): Likewise.
995 * win32-low.c (win32_target_ops): Likewise.
996 * server.c (supported_btrace_packets): Report packets unconditionally.
997 * target.h (target_ops) <supports_btrace>: Remove.
998 (target_supports_btrace): Remove.
999
1000 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1001
1002 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1003 (handle_btrace_disable): Change return type to void. Use exceptions
1004 to report errors.
1005 (handle_btrace_general_set): Catch exception and copy message to
1006 return message.
1007
1008 2018-02-08 Tom Tromey <tom@tromey.com>
1009
1010 * linux-low.c (install_software_single_step_breakpoints): Use
1011 make_scoped_restore.
1012 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1013 (do_restore_current_thread_cleanup): Remove.
1014 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1015 declare.
1016
1017 2018-02-08 Tom Tromey <tom@tromey.com>
1018
1019 * mem-break.c (set_raw_breakpoint_at): Use
1020 gdb::unique_xmalloc_ptr.
1021
1022 2018-01-30 Pedro Alves <palves@redhat.com>
1023
1024 PR gdb/13211
1025 * target.c (target_terminal::terminal_state): Rename to ...
1026 (target_terminal::m_terminal_state): ... this.
1027
1028 2018-01-19 James Clarke <jrtc27@jrtc27.com>
1029
1030 * linux-low.c (handle_extended_wait): Surround call to
1031 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1032
1033 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1034
1035 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1036 linux_ptrace_attach_fail_reason_string now returning an
1037 std::string.
1038 (linux_attach): Likewise.
1039 * thread-db.c (attach_thread): Likewise.
1040
1041 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1042
1043 PR gdb/21559
1044 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1045 checking for fs_base/gs_base fields in struct user_regs_struct.
1046 * configure: Regenerate.
1047
1048 2018-01-16 Yao Qi <yao.qi@linaro.org>
1049
1050 PR gdb/18749
1051 * linux-low.c (fetch_register): Call supply_register instead of
1052 error.
1053
1054 2018-01-08 Yao Qi <yao.qi@linaro.org>
1055 Simon Marchi <simon.marchi@ericsson.com>
1056
1057 * Makefile.in (OBS): Remove selftest.o.
1058 * configure.ac: Set srv_selftest_objs if $development is true.
1059 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1060 * configure: Re-generated.
1061 * server.c (captured_main): Wrap variable selftest_filter with
1062 GDB_SELF_TEST.
1063
1064 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1065
1066 * server.c (parse_debug_format_options): Return std::string.
1067 (handle_monitor_command, captured_main): Adjust.
1068
1069 2018-01-05 Pedro Alves <palves@redhat.com>
1070
1071 PR gdb/18653
1072 * server.c (captured_main): Pass quiet=false to
1073 save_original_signals_state.
1074
1075 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1076
1077 * gdbreplay.c (gdbreplay_version): Update copyright year in
1078 version message.
1079 * server.c (gdbserver_version): Likewise.
1080
1081 2017-12-08 Tom Tromey <tom@tromey.com>
1082
1083 * ax.c (ax_printf): Update.
1084
1085 2017-12-07 Yao Qi <yao.qi@linaro.org>
1086
1087 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1088 aarch64_linux_read_description.
1089 * linux-amd64-ipa.c (idx2mask): New array.
1090 (get_ipa_tdesc): Move idx2mask out.
1091 (initialize_low_tracepoint): Initialize target descriptions.
1092 * linux-i386-ipa.c (idx2mask): New array.
1093 (get_ipa_tdesc): Move idx2mask out.
1094 (initialize_low_tracepoint): Initialize target descriptions.
1095
1096 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1097
1098 * tdesc.c (struct tdesc_type): Change return type.
1099 (tdesc_add_flag): Change parameter type.
1100 (tdesc_add_bitfield): Likewise.
1101 (tdesc_add_field): Likewise.
1102 (tdesc_set_struct_size): Likewise.
1103
1104 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1105
1106 * regcache.c (registers_to_string): Remove unused variable.
1107
1108 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1109
1110 * inferiors.c (for_each_inferior_with_data): Remove.
1111 * inferiors.h (for_each_inferior_with_data): Remove.
1112 * server.c (handle_qxfer_threads_worker): Change parameter type.
1113 (handle_qxfer_threads_proper): Use for_each_thread.
1114
1115 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1116
1117 * inferiors.c (for_each_inferior): Remove.
1118 (clear_inferiors): Use for_each_thread.
1119 * inferiors.h (for_each_inferior): Remove.
1120 * linux-low.c (linux_wait_for_event_filtered): Use
1121 for_each_thread.
1122 (linux_stabilize_threads): Likewise.
1123 * regcache.c (regcache_release): Likewise.
1124 * server.c (gdb_wants_all_threads_stopped): Likewise.
1125 (clear_pending_status_callback): Remove.
1126 (handle_status): Use for_each_thread.
1127 (captured_main): Likewise.
1128 * win32-low.c (child_init_thread_list): Likewise.
1129 (win32_clear_inferiors): Likewise.
1130 (fake_breakpoint_event): Likewise.
1131
1132 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1133
1134 * inferiors.h (find_inferior): Remove.
1135 * inferiors.c (find_inferior): Remove.
1136
1137 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1138
1139 * linux-low.c (resume_status_pending_p): Update comment.
1140 (need_step_over_p): Update comment.
1141
1142 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1143
1144 * linux-low.c (proceed_one_lwp): Return void, change parameter
1145 type.
1146 (unsuspend_and_proceed_one_lwp): Likewise.
1147 (proceed_all_lwps): Use for_each_thread.
1148 (unstop_all_lwps): Likewise.
1149
1150 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1151
1152 * linux-low.c (linux_resume_one_thread): Return void, take
1153 parameter directly.
1154 (linux_resume): Use for_each_thread.
1155
1156 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1157
1158 * linux-low.c (send_sigstop_callback): Return void, change
1159 parameter type. Rename to...
1160 (send_sigstop): ... this.
1161 (suspend_and_send_sigstop_callback): Return void, change parameter
1162 type. Rename to...
1163 (suspend_and_send_sigstop): ... this.
1164 (stop_all_lwps): Use for_each_thread.
1165
1166 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1167
1168 * linux-low.c (lwp_running): Return bool, remove unused
1169 argument.
1170 (linux_stabilize_threads): Use find_thread.
1171
1172 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1173
1174 * linux-low.c (select_singlestep_lwp_callback): Remove.
1175 (count_events_callback): Remove.
1176 (select_event_lwp_callback): Remove.
1177 (select_event_lwp): Use find_thread/for_each_thread.
1178
1179 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1180
1181 * linux-low.c (not_stopped_callback): Return bool, take filter
1182 argument directly.
1183 (linux_wait_for_event_filtered): Use find_thread.
1184 (linux_wait_1): Likewise.
1185
1186 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1187
1188 * linux-low.c (same_lwp): Remove.
1189 (find_lwp_pid): Use find_thread.
1190
1191 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1192
1193 * linux-low.c (delete_lwp_callback): Remove.
1194 (linux_mourn): Use for_each_thread.
1195
1196 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1197
1198 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1199 args parameter, don't check for pid.
1200 (linux_detach): Use for_each_thread.
1201
1202 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1203
1204 * linux-low.c (struct counter): Remove.
1205 (second_thread_of_pid_p): Remove.
1206 (last_thread_of_process_p): Use find_thread.
1207
1208 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1209
1210 * inferiors.c (find_inferior_in_random): Remove.
1211 * inferiors.h (find_inferior_in_random): Remove.
1212 * linux-low.c (status_pending_p_callback): Return bool, accept
1213 parameter ptid directly.
1214 (linux_wait_for_event_filtered): Use find_thread_in_random.
1215 (linux_wait_1): Likewise.
1216
1217 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1218
1219 * inferiors.c (find_inferior_id): Remove.
1220 (find_thread_ptid): Move implemention from find_inferior_id to
1221 here.
1222 * inferiors.h (find_inferior_id): Remove.
1223 * server.c (handle_status): Use find_thread_ptid.
1224 (process_serial_event): Likewise.
1225 * thread-db.c (find_one_thread): Likewise.
1226 (thread_db_thread_handle): Likewise.
1227 * win32-low.c (thread_rec): Likewise.
1228 (child_delete_thread): Likewise.
1229 (win32_thread_alive): Likewise.
1230 (get_child_debug_event): Likewise.
1231
1232 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1233
1234 * linux-mips-low.c (update_watch_registers_callback): Return
1235 void, remove pid_p parameter, don't check for pid.
1236 (mips_insert_point, mips_remove_point): Use for_each_thread.
1237
1238 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1239
1240 * lynx.low (lynx_delete_thread_callback): Remove.
1241 (lynx_mourn): Use for_each_thread.
1242
1243 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1244
1245 * regcache.c (regcache_invalidate_one): Remove.
1246 (regcache_invalidate_pid): use for_each_thread.
1247
1248 2017-11-26 Tom Tromey <tom@tromey.com>
1249
1250 * linux-low.c (linux_create_inferior): Update.
1251
1252 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1253
1254 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1255
1256 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1257
1258 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1259 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1260 * linux-aarch64-tdesc-selftest.c: New file.
1261 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1262
1263 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1264
1265 * configure.srv: Add new file.
1266 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1267 * linux-aarch64-tdesc-selftest.c: New file.
1268 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1269
1270 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1271
1272 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1273 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1274 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1275
1276 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1277
1278 * configure.srv: Add new files.
1279 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1280 aarch64_linux_read_description.
1281 * linux-aarch64-low.c (aarch64_linux_read_description):
1282 Merge with aarch64_arch_setup.
1283 (aarch64_arch_setup): Call aarch64_linux_read_description.
1284 * linux-aarch64-tdesc.c: New file.
1285 * linux-aarch64-tdesc.h: New file.
1286
1287 2017-11-24 Yao Qi <yao.qi@linaro.org>
1288
1289 * configure.srv: Set $srv_regobj for tic6x-linux.
1290 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1291 (tic6x_read_description): Move some code to tic6x_arch_setup.
1292 (tic6x_tdesc_test): New function.
1293 (initialize_low_arch): Call selftests::register_test.
1294
1295 2017-11-22 Yao Qi <yao.qi@linaro.org>
1296
1297 * remote-utils.c (prepare_resume_reply): Use memcpy.
1298
1299 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1300
1301 * linux-low.c (kill_one_lwp_callback): Return void, take
1302 argument directly, don't filter on pid.
1303 (linux_kill): Use for_each_thread.
1304
1305 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1306
1307 * linux-low.c (need_step_over_p): Return bool, remove dummy
1308 argument.
1309 (linux_resume, proceed_all_lwps): Use find_thread.
1310
1311 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1312
1313 * linux-low.c (resume_status_pending_p): Return bool, remove
1314 flag_p argument.
1315 (linux_resume): Use find_thread.
1316
1317 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1318
1319 * linux-low.c (struct thread_resume_array): Remove.
1320 (linux_set_resume_request): Return void, take arguments
1321 directly.
1322 (linux_resume): Use for_each_thread.
1323
1324 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1325
1326 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1327 return bool, remove data argument.
1328 (linux_stabilize_threads): Use find_thread.
1329
1330 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1331
1332 * linux-low.c (unsuspend_one_lwp): Remove.
1333 (unsuspend_all_lwps): Use for_each_thread, inline code from
1334 unsuspend_one_lwp.
1335
1336 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1337
1338 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1339 * linux-low.c (struct iterate_over_lwps_args): Remove.
1340 (iterate_over_lwps_filter): Remove.
1341 (iterate_over_lwps): Use find_thread.
1342
1343 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1344
1345 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1346 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1347 code from reset_lwp_ptrace_options_callback.
1348
1349 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1350
1351 * linux-arm-low.c (struct update_registers_data): Remove.
1352 (update_registers_callback): Return void, take arguments
1353 directly, don't check thread's pid.
1354 (arm_insert_point, arm_remove_point): Use for_each_thread.
1355
1356 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1357
1358 * win32-low.c (continue_one_thread): Return void, take argument
1359 directly.
1360 (child_continue): Use for_each_thread.
1361
1362 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1363
1364 * win32-i386-low.c (update_debug_registers_callback): Rename
1365 to ...
1366 (update_debug_registers): ... this, return void, remove pid_p arg.
1367 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1368
1369 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1370
1371 * inferiors.h (struct process_info): Add constructor, initialize
1372 fields..
1373 <syscalls_to_catch>: Change type to std::vector<int>.
1374 * inferiors.c (add_process): Allocate process_info with new.
1375 (remove_process): Free process_info with delete.
1376 * linux-low.c (handle_extended_wait): Adjust.
1377 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1378 * server.c (handle_general_set): Adjust.
1379
1380 2017-11-16 Pedro Alves <palves@redhat.com>
1381
1382 * remote-utils.c (remote_close): Block SIGIO signals instead of
1383 uninstalling the SIGIO handler.
1384
1385 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1386
1387 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1388
1389 2017-11-16 Yao Qi <yao.qi@linaro.org>
1390
1391 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1392 (tic6x_store_gregset): Likewise.
1393 (tic6x_usrregs_info): Move it up.
1394
1395 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1396
1397 * Makefile.in: Update arch rules.
1398 * configure.srv: Explicitly mark arch/ files.
1399
1400 2017-11-13 Andreas Schwab <schwab@suse.de>
1401
1402 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1403 function.
1404 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1405
1406 2017-11-06 Pedro Alves <palves@redhat.com>
1407
1408 * config.in, configure: Regenerate.
1409
1410 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1411
1412 * target.c (struct thread_search): Remove.
1413 (thread_search_callback): Remove.
1414 (prepare_to_access_memory): Use for_each_thread instead of
1415 find_inferior. Inline code from thread_search_callback.
1416
1417 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1418
1419 * server.c (struct visit_actioned_threads_data): Remove.
1420 (visit_actioned_threads): Change prototype to take arguments
1421 directly.
1422 (resume): Use find_thread instead of find_inferior.
1423
1424 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1425
1426 * server.c (queue_stop_reply_callback): Change prototype, return
1427 void.
1428 (find_status_pending_thread_callback): Remove.
1429 (handle_status): Replace find_inferior with find_thread and
1430 for_each_thread.
1431
1432 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1433
1434 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1435 with REGNO.
1436 (aarch64_store_gregset): Likewise.
1437 (aarch64_fill_fpregset): Likewise.
1438 (aarch64_store_fpregset): Likewise.
1439
1440 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1441
1442 * gdbthread.h (find_thread, for_each_thread): New functions.
1443 * inferiors.c (thread_of_pid): Remove.
1444 (find_any_thread_of_pid): Use find_thread.
1445 * linux-low.c (num_lwps): Use for_each_thread.
1446
1447 2017-10-17 Yao Qi <yao.qi@linaro.org>
1448
1449 * Makefile.in: Remove one rule.
1450 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1451
1452 2017-10-17 Yao Qi <yao.qi@linaro.org>
1453
1454 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1455 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1456
1457 2017-10-17 Yao Qi <yao.qi@linaro.org>
1458
1459 * configure.srv: Rename arm.o with arch/arm.o.
1460
1461 2017-10-17 Yao Qi <yao.qi@linaro.org>
1462
1463 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1464 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1465 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1466 (arch-i386.o, arch-amd64.o): Remove rules.
1467 (arch/%.o): New rule.
1468 Update POSTCOMPILE and COMPILE.pre.
1469 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1470 * configure: Re-generated.
1471 * configure.srv: Replace arch-i386.o with arch/i386.o.
1472 Replace arch-amd64.o with arch/amd64.o.
1473
1474 2017-10-16 Yao Qi <yao.qi@linaro.org>
1475
1476 * configure: Regenerated.
1477
1478 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1479
1480 * inferiors.h: (struct inferior_list): Remove.
1481 (struct inferior_list_entry); Remove.
1482 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1483 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1484 get_first_inferior): Remove.
1485 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1486 find_inferior_id, find_inferior_in_random): Change signature.
1487 * inferiors.c (all_threads): Change type to
1488 std::list<thread_info *>.
1489 (get_thread): Remove macro.
1490 (find_inferior, find_inferior_id): Change signature, implement
1491 using find_thread.
1492 (find_inferior_in_random): Change signature, implement using
1493 find_thread_in_random.
1494 (for_each_inferior, for_each_inferior_with_data): Change
1495 signature, implement using for_each_thread.
1496 (add_inferior_to_list, remove_inferior): Remove.
1497 (add_thread, get_first_thread, thread_of_pid,
1498 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1499 (get_first_inferior, one_inferior_p, clear_inferior_list):
1500 Remove.
1501 (clear_inferiors, get_thread_process): Update.
1502 * gdbthread.h: Include <list>.
1503 (struct thread_info) <entry>: Remove field.
1504 <id>: New field.
1505 (all_threads): Change type to std::list<thread_info *>.
1506 (get_first_inferior): Add doc.
1507 (find_thread, for_each_thread, find_thread_in_random): New
1508 functions.
1509 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1510 * linux-arm-low.c (update_registers_callback): Update.
1511 * linux-low.c (second_thread_of_pid_p): Update.
1512 (kill_one_lwp_callback, linux_detach_lwp_callback,
1513 delete_lwp_callback, status_pending_p_callback, same_lwp,
1514 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1515 iterate_over_lwps, not_stopped_callback,
1516 resume_stopped_resumed_lwps, count_events_callback,
1517 select_singlestep_lwp_callback, select_event_lwp_callback,
1518 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1519 suspend_and_send_sigstop_callback, wait_for_sigstop,
1520 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1521 lwp_running, linux_set_resume_request, resume_status_pending_p,
1522 need_step_over_p, start_step_over, linux_resume_one_thread,
1523 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1524 reset_lwp_ptrace_options_callback): Update.
1525 * linux-mips-low.c (update_watch_registers_callback): Update.
1526 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1527 Update.
1528 (free_register_cache_thread_one): Remove.
1529 (regcache_release): Update.
1530 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1531 handle_qxfer_threads_worker): Update.
1532 (handle_query): Update, use list iterator.
1533 (visit_actioned_threads, handle_pending_status,
1534 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1535 clear_pending_status_callback, set_pending_status_callback,
1536 find_status_pending_thread_callback, handle_status,
1537 process_serial_event): Update.
1538 * target.c (thread_search_callback): Update.
1539 * thread-db.c (thread_db_get_tls_address): Update.
1540 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1541 Update.
1542 * win32-i386-low.c (update_debug_registers_callback): Update.
1543 * win32-low.c (delete_thread_info, child_delete_thread,
1544 continue_one_thread, suspend_one_thread,
1545 get_child_debug_event): Adjust.
1546
1547 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1548
1549 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1550 * inferiors.h: Include <list>.
1551 (struct process_info) <entry>: Remove field.
1552 <pid>: New field.
1553 (pid_of): Change macro to function.
1554 (ptid_of, lwpid_of): Remove macro.
1555 (all_processes): Change type to std::list<process_info *>.
1556 (ALL_PROCESSES): Remove macro.
1557 (for_each_process, find_process): New function.
1558 * inferiors.c (all_processes): Change type to
1559 std::list<process_info *>.
1560 (find_thread_process): Adjust.
1561 (add_process): Likewise.
1562 (remove_process): Likewise.
1563 (find_process_pid): Likewise.
1564 (get_first_process): Likewise.
1565 (started_inferior_callback): Remove.
1566 (have_started_inferiors_p): Adjust.
1567 (attached_inferior_callback): Remove.
1568 (have_attached_inferiors_p): Adjust.
1569 * linux-low.c (check_zombie_leaders): Likewise.
1570 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1571 (x86_linux_update_xmltarget): Adjust.
1572 * server.c (handle_query): Likewise.
1573 (gdb_reattached_process): Remove.
1574 (handle_status): Adjust.
1575 (kill_inferior_callback): Likewise.
1576 (detach_or_kill_inferior): Remove.
1577 (print_started_pid): Likewise.
1578 (print_attached_pid): Likewise.
1579 (detach_or_kill_for_exit): Update.
1580 (process_serial_event): Likewise.
1581 * linux-arm-low.c (arm_new_fork): Likewise.
1582
1583 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1584
1585 * dll.h: Include <list>.
1586 (struct dll_info): Add constructor.
1587 <entry>: Remove field.
1588 (all_dlls): Change type to std::list<dll_info>.
1589 * dll.c: Include <algorithm>.
1590 (get_dll): Remove macro.
1591 (all_dlls): Change type to std::list<dll_info *>.
1592 (free_one_dll): Remove.
1593 (match_dll): Likewise.
1594 (loaded_dll): Adjust.
1595 (unloaded_dll): Adjust to all_dlls type change, use
1596 std::find_if. Inline code from match_dll.
1597 (clear_dlls): Adjust to all_dlls type change.
1598 * server.c (emit_dll_description): Remove.
1599 (handle_qxfer_libraries): Adjust to all_dlls type change,
1600 integrate emit_dll_description's functionality.
1601
1602 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1603
1604 * linux-low.h (struct linux_target_ops) <delete_process>: New
1605 field.
1606 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1607 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1608 (struct linux_target_ops): Add delete_process callback.
1609 * linux-arm-low.c (arm_delete_process): New.
1610 (struct linux_target_ops): Add delete_process callback.
1611 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1612 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1613 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1614 * linux-mips-low.c (mips_linux_delete_process): New.
1615 (struct linux_target_ops): Add delete_process callback.
1616 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1617 * linux-s390-low.c (struct linux_target_ops): Likewise.
1618 * linux-sh-low.c (struct linux_target_ops): Likewise.
1619 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1620 * linux-tile-low.c (struct linux_target_ops): Likewise.
1621 * linux-x86-low.c (x86_linux_delete_process): New.
1622 (struct linux_target_ops): Add delete_process callback.
1623 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1624
1625 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1626
1627 * linux-aarch64-low.c (the_low_target): Add thread delete
1628 callback.
1629 * linux-arm-low.c (arm_delete_thread): New function.
1630 (the_low_target): Add thread delete callback.
1631 * linux-bfin-low.c (the_low_target): Likewise.
1632 * linux-crisv32-low.c (the_low_target): Likewise.
1633 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1634 set.
1635 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1636 field.
1637 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1638 * linux-mips-low.c (mips_linux_delete_thread): New function.
1639 (the_low_target): Add thread delete callback.
1640 * linux-ppc-low.c (the_low_target): Likewise.
1641 * linux-s390-low.c (the_low_target): Likewise.
1642 * linux-sh-low.c (the_low_target): Likewise.
1643 * linux-tic6x-low.c (the_low_target): Likewise.
1644 * linux-tile-low.c (the_low_target): Likewise.
1645 * linux-x86-low.c (the_low_target): Likewise.
1646 * linux-xtensa-low.c (the_low_target): Likewise.
1647
1648 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1649
1650 * win32-low.c: Include "common-inferior.h".
1651
1652 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1653
1654 * inferiors.c (set_inferior_cwd): New function.
1655 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1656 (handle_query): Inform that QSetWorkingDir is supported.
1657 * win32-low.c (create_process): Pass the inferior's cwd to
1658 CreateProcess.
1659
1660 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1661
1662 * inferiors.c (current_inferior_cwd): New global variable.
1663 (get_inferior_cwd): New function.
1664 * inferiors.h (struct process_info) <cwd>: New field.
1665
1666 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1667
1668 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1669 (OBS): Add gdb_tilde_expand.o.
1670
1671 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1672
1673 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1674 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1675
1676 2017-09-29 Pedro Alves <palves@redhat.com>
1677
1678 * ax.c (gdb_parse_agent_expr): Constify.
1679 * ax.h (gdb_parse_agent_expr): Constify.
1680 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1681 Constify.
1682 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1683 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1684 * remote-utils.h (read_ptid): Constify.
1685 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1686 (process_point_options, process_serial_event): Constify.
1687 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1688 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1689 (cmd_qtbuffer): Constify.
1690
1691 2017-09-29 Pedro Alves <palves@redhat.com>
1692
1693 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1694 fails.
1695
1696 2017-09-29 Pedro Alves <palves@redhat.com>
1697
1698 * linux-low.c (handle_extended_wait): Pass parent thread instead
1699 of process to thread_db_notice_clone.
1700 * linux-low.h (thread_db_notice_clone): Replace parent process
1701 parameter with parent thread parameter.
1702 * thread-db.c (find_one_thread): Add comment.
1703 (thread_db_notice_clone): Replace parent process parameter with
1704 parent thread parameter. Temporarily switch to the parent thread.
1705
1706 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1707
1708 * gdbthread.h: Include "common-gdbthread.h".
1709 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1710 "if" when validating the ptid.
1711 * remote-utils.c: Include "gdbthread.h".
1712 (prepare_resume_reply): Use "switch_to_thread".
1713 * target.c (done_accessing_memory): Likewise.
1714
1715 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1716
1717 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1718 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1719 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1720 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1721 s390x-gs-linux64-ipa.o to ipa_obj.
1722 * linux-s390-low.c (HWCAP_S390_GS): New define.
1723 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1724 New functions.
1725 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1726 (s390_arch_setup): Check for guarded-storage support and choose
1727 appropriate tdesc.
1728 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1729 init_registers_s390x_gs_linux64.
1730 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1731 enum value.
1732 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1733 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1734
1735 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1736
1737 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1738
1739 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1740
1741 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1742 (thread_db_thread_handle): Declare.
1743 * linux-low.c (linux_target_ops): Initialize thread_handle.
1744 * server.c (handle_qxfer_threads_worker): Add support for
1745 "handle" attribute.
1746 * target.h (struct target_ops): Add new function pointer,
1747 thread_handle.
1748 (target_thread_handle): Define.
1749 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1750 field in lwp.
1751 (thread_db_thread_handle): New function.
1752
1753 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1754
1755 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1756 * linux-low.h (thread_db_notice_clone): Declare.
1757 * thread-db.c (thread_db_notice_clone): New function.
1758
1759 2017-09-21 Pedro Alves <palves@redhat.com>
1760
1761 * server.c (gdb_read_memory, handle_status, process_serial_event)
1762 (handle_serial_event, handle_target_event): Adjust to
1763 set_desired_thread prototype change.
1764 * target.c (set_desired_thread): Remove 'use_general' parameter
1765 and adjust.
1766 * target.h (set_desired_thread): Remove 'use_general' parameter.
1767
1768 2017-09-20 Tom Tromey <tom@tromey.com>
1769
1770 * target.c (target_terminal::terminal_state): Define.
1771 (target_terminal::init): Rename from target_terminal_init.
1772 (target_terminal::inferior): Rename from
1773 target_terminal_inferior.
1774 (target_terminal::ours): Rename from target_terminal_ours.
1775 (target_terminal::ours_for_output, target_terminal::info): New.
1776
1777 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1778
1779 * server.c (accumulate_file_name_length): Remove.
1780 (emit_dll_description): Adjust to std::string change.
1781 (handle_qxfer_libraries): Use std::string to hold document.
1782
1783 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1784
1785 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1786 return type of xml_escape_text.
1787 * server.c (emit_dll_description): Likewise.
1788
1789 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1790
1791 * server.c (captured_main): Accept argument for --selftest.
1792 Update run_tests call.
1793 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1794 when registering selftests.
1795
1796 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1797
1798 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1799 instead of "VEC" for "target_desc.reg_defs".
1800 (regcache_cpy): Likewise.
1801 (registers_to_string): Likewise.
1802 (registers_from_string): Likewise.
1803 (find_regno): Likewise.
1804 (supply_regblock): Likewise.
1805 (regcache_raw_read_unsigned): Likewise.
1806 * tdesc.c (init_target_desc): Likewise.
1807 (tdesc_create_reg): Likewise.
1808 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1809 (struct target_desc) <reg_defs>: Convert to "std::vector".
1810 (target_desc): Do not initialize "reg_defs".
1811 (~target_desc): Update code to use "std::vector" instead of "VEC"
1812 for "target_desc.reg_defs".
1813 (operator==): Likewise.
1814
1815 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1816
1817 * inferiors.h (thread_to_gdb_id): Remove.
1818 * inferiors.c (thread_to_gdb_id): Remove.
1819 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1820 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1821 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1822 Likewise.
1823 * nto-low.c (nto_fetch_registers, nto_store_registers,
1824 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1825
1826 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1827
1828 * inferiors.h (gdb_id_to_thread_id): Remove.
1829 * inferiors.c (gdb_id_to_thread_id): Remove.
1830 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1831 removal. Move pid declaration closer to where it's used.
1832
1833 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1834
1835 * server.c (handle_detach): New function.
1836 (process_serial_event): Move code out, call handle_detach.
1837
1838 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1839
1840 * server.c (require_running): Rename to ...
1841 (require_running_or_return): ... this ...
1842 (require_running_or_break): ... and this.
1843 (handle_query, process_serial_event): Adjust.
1844
1845 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1846
1847 * linux-low.c (linux_set_resume_request): Remove unused
1848 variables.
1849
1850 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1851
1852 * server.c (first_thread_of): Remove.
1853 (process_serial_event): Replace usage of first_thread_of with
1854 find_any_thread_of_pid.
1855 * tracepoint.c (same_process_p): Remove.
1856 (gdb_agent_about_to_close): Replace usage of same_process_p with
1857 find_any_thread_of_pid.
1858 * linux-x86-low.c (same_process_callback): Remove.
1859 (x86_arch_setup_process_callback): Replace usage of
1860 same_process_callback with find_any_thread_of_pid.
1861 * thread-db.c (any_thread_of): Remove.
1862 (switch_to_process): Replace usage of any_thread_of with
1863 find_any_thread_of_pid.
1864 * inferiors.c (thread_pid_matches_callback): Remove.
1865 (find_thread_process): Adjust to use find_any_thread_of_pid.
1866
1867 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1868
1869 * regcache.c (get_thread_regcache): Guard calls to "memset"
1870 with "!VEC_empty".
1871
1872 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1873
1874 * linux-low.c (handle_extended_wait): Use
1875 "allocate_target_description" instead of "XNEW".
1876 * linux-x86-low.c (initialize_low_arch): Likewise.
1877
1878 2017-09-05 Yao Qi <yao.qi@linaro.org>
1879
1880 * configure.srv (srv_i386_regobj): Remove.
1881 (srv_amd64_regobj): Remove.
1882 (srv_regobj): Set it to "" for x86 non-linux targets.
1883 * linux-x86-tdesc.c (i386_linux_read_description):
1884 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1885 (init_registers_i386): Remove the declaration.
1886 (tdesc_i386): Remove the declaration.
1887 (lynx_i386_arch_setup): Call i386_create_target_description.
1888 * nto-x86-low.c: Likewise.
1889 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1890 [!__x86_64__]: include arch/i386.h.
1891 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1892
1893 2017-09-05 Yao Qi <yao.qi@linaro.org>
1894
1895 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1896 i386/amd64-XXX-linux from it.
1897
1898 2017-09-05 Yao Qi <yao.qi@linaro.org>
1899
1900 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1901 false.
1902 (ipa_amd64_linux_regobj): Remove.
1903 (ipa_x32_linux_regobj): Remove.
1904
1905 2017-09-05 Yao Qi <yao.qi@linaro.org>
1906
1907 * Makefile.in (arch-amd64.o): New rule.
1908 * configure.srv: Append arch-amd64.o.
1909 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1910 (get_ipa_tdesc): Call amd64_linux_read_description.
1911 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1912 and init_registers_amd64_XXX.
1913 * linux-x86-low.c (x86_linux_read_description): Call
1914 amd64_linux_read_description.
1915 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1916 (initialize_low_arch): Don't call init_registers_x32_XXX and
1917 init_registers_amd64_XXX.
1918 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1919 and tdesc_amd64_XXX.
1920 [__x86_64__] (amd64_tdesc_test): New function.
1921 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1922 and init_registers_amd64_XXX.
1923 * linux-x86-tdesc.c: Include arch/amd64.h.
1924 (xcr0_to_tdesc_idx): New function.
1925 (i386_linux_read_description): New function.
1926 (amd64_get_ipa_tdesc_idx): New function.
1927 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1928 (amd64_get_ipa_tdesc): Declare.
1929
1930 2017-09-05 Yao Qi <yao.qi@linaro.org>
1931
1932 * configure.srv (srv_i386_linux_xmlfiles): Remove
1933 i386/i386-XXX-linux.xml from it.
1934
1935 2017-09-05 Yao Qi <yao.qi@linaro.org>
1936
1937 * configure.srv: Set srv_i386_linux_regobj empty if $development
1938 is false.
1939 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1940 initialize_low_tdesc.
1941 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1942 with #if initialize_low_tdesc.
1943 * linux-x86-tdesc-selftest.c: New file.
1944 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1945
1946 2017-09-05 Yao Qi <yao.qi@linaro.org>
1947
1948 * Makefile.in (arch-i386.o): New rule.
1949 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1950 (x86_64-*-linux*): Likewise.
1951 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1952 include arch/i386.h.
1953 (i386_linux_read_description): Remove code and call
1954 i386_create_target_description.
1955 * tdesc.c (allocate_target_description): New function.
1956 * tdesc.h (set_tdesc_architecture): Remove declaration.
1957 (set_tdesc_osabi): Likewise.
1958
1959 2017-09-05 Yao Qi <yao.qi@linaro.org>
1960
1961 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1962 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1963 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1964 .xmltarget.
1965 * server.c (get_features_xml): Call tdesc_get_features_xml.
1966 * tdesc.c (set_tdesc_architecture): New function.
1967 (set_tdesc_osabi): New function.
1968 (tdesc_get_features_xml): New function.
1969 (tdesc_create_feature): Add an argument.
1970 * tdesc.h (struct target_desc) <features>: New field.
1971 <arch, osabi>: New field.
1972 (~target_desc): xfree features, arch, and osabi.
1973 (target_desc::oerator==): Don't compare .xmltarget.
1974 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1975 (set_tdesc_osabi): Likewise.
1976 (tdesc_get_features_xml): Likewise.
1977
1978 2017-09-05 Yao Qi <yao.qi@linaro.org>
1979
1980 * linux-x86-tdesc.c: Include selftest.h.
1981 (i386_tdesc_test): New function.
1982 (initialize_low_tdesc): Call selftests::register_test.
1983 * tdesc.h: Include regdef.h.
1984 (target_desc): Override operator == and !=.
1985
1986 2017-09-05 Yao Qi <yao.qi@linaro.org>
1987
1988 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1989 (ipa_obj): Likewise.
1990 * linux-i386-ipa.c: Include common/x86-xstate.h
1991 (get_ipa_tdesc): Call i386_linux_read_description.
1992 (initialize_low_tracepoint): Don't call init_registers_XXX
1993 functions, call initialize_low_tdesc instead.
1994 * linux-x86-low.c (x86_linux_read_description): Call
1995 i386_linux_read_description.
1996 (initialize_low_arch): Don't call init_registers_i386_XXX
1997 functions, call initialize_low_tdesc.
1998 * linux-x86-tdesc.c: New file.
1999 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2000 (i386_get_ipa_tdesc_idx): Declare.
2001 (i386_get_ipa_tdesc): Declare.
2002 (initialize_low_tdesc): Declare.
2003
2004 2017-09-05 Yao Qi <yao.qi@linaro.org>
2005
2006 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2007 instead of 0.
2008
2009 2017-09-05 Yao Qi <yao.qi@linaro.org>
2010
2011 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2012 * regcache.c (get_thread_regcache): Use VEC_length.
2013 (init_register_cache): Likewise.
2014 (regcache_cpy): Likewise.
2015 (registers_to_string): Iterate reg_defs via VEC_iterate.
2016 (find_regno): Likewise.
2017 (find_register_by_number): Use VEC_index.
2018 (register_size): Call find_register_by_number.
2019 (register_data): Call find_register_by_number.
2020 (supply_regblock): Use VEC_length.
2021 (regcache_raw_read_unsigned): Likewise.
2022 * tdesc.c (init_target_desc): Iterate reg_defs via
2023 VEC_iterate.
2024 (default_description): Update initializer.
2025 (copy_target_description): Don't update field num_registers.
2026 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2027 <num_registers>: Remove.
2028
2029 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2030
2031 * Makefile.in (.SECONDARY): Define target.
2032
2033 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2034
2035 * linux-low.c (linux_wait_1): Adjust.
2036 * server.c (queue_stop_reply_callback): Adjust.
2037
2038 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2039
2040 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2041 QEnvironmentUnset and QEnvironmentReset packets.
2042 (handle_query): Inform remote that QEnvironmentHexEncoded,
2043 QEnvironmentUnset and QEnvironmentReset are supported.
2044
2045 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2046
2047 * inferiors.h (inferior_target_data): Rename to ...
2048 (thread_target_data): ... this.
2049 (inferior_regcache_data): Rename to ...
2050 (thread_regcache_data): ... this.
2051 (set_inferior_regcache_data): Rename to ...
2052 (set_thread_regcache_data): ... this.
2053 * inferiors.c (inferior_target_data): Rename to ...
2054 (thread_target_data): ... this.
2055 (inferior_regcache_data): Rename to ...
2056 (thread_regcache_data): ... this.
2057 (set_inferior_regcache_data): Rename to ...
2058 (set_thread_regcache_data): ... this.
2059 (free_one_thread): Update.
2060 * linux-low.h (get_thread_lwp): Update.
2061 * regcache.c (get_thread_regcache): Update.
2062 (regcache_invalidate_thread): Update.
2063 (free_register_cache_thread): Update.
2064 * win32-i386-low.c (update_debug_registers_callback): Update.
2065 (win32_get_current_dr): Update.
2066 * win32-low.c (thread_rec): Update.
2067 (delete_thread_info): Update.
2068 (continue_one_thread): Update.
2069 (suspend_one_thread): Update.
2070
2071 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2072
2073 * inferiors.c (set_inferior_target_data): Remove.
2074 * inferiors.h (set_inferior_target_data): Remove.
2075
2076 2017-08-18 Yao Qi <yao.qi@linaro.org>
2077
2078 * Makefile.in (OBS): Add selftest.o.
2079 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2080 * configure, config.in: Re-generated.
2081 * server.c: Include common/sefltest.h.
2082 (captured_main): Handle option --selftest.
2083
2084 2017-08-09 Yao Qi <yao.qi@linaro.org>
2085
2086 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2087 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2088 i386-avx-mpx.o and i386-mmx.o.
2089 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2090 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2091 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2092 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2093 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2094 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2095 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2096 i386/amd64-avx-mpx.xml.
2097
2098 2017-08-09 Yao Qi <yao.qi@linaro.org>
2099
2100 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2101 and x32-avx-avx512.o.
2102 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2103 i386/x32-avx-avx512.xml.
2104
2105 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2106
2107 * tracepoint.h (enum class fast_tpoint_collect_result): New
2108 enumeration.
2109 (fast_tracepoint_collecting): Change return type to
2110 fast_tpoint_collect_result.
2111 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2112 * linux-low.h: Include tracepoint.h.
2113 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2114 fast_tpoint_collect_result.
2115 * linux-low.c (handle_tracepoints): Adjust.
2116 (linux_fast_tracepoint_collecting): Change return type to
2117 fast_tpoint_collect_result.
2118 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2119 linux_wait_1, stuck_in_jump_pad_callback,
2120 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2121 proceed_one_lwp): Adjust to type change.
2122
2123 2017-07-10 Yao Qi <yao.qi@linaro.org>
2124
2125 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2126
2127 2017-06-29 Yao Qi <yao.qi@linaro.org>
2128
2129 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2130 Remove.
2131 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2132
2133 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2134
2135 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2136
2137 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2138
2139 * linux-low.c (linux_create_inferior): Adjust code to access the
2140 environment information via 'gdb_environ' class.
2141 * lynx-low.c (lynx_create_inferior): Likewise.
2142 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2143 (get_environ): Return a pointer to 'our_environ'.
2144 (captured_main): Initialize 'our_environ'.
2145 * server.h (get_environ): Adjust prototype.
2146 * spu-low.c (spu_create_inferior): Adjust code to access the
2147 environment information via 'gdb_environ' class.
2148
2149 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2150
2151 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2152 usage of "register" keyword.
2153
2154 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2155
2156 * configure: Re-generate.
2157
2158 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2159
2160 * configure: Re-generate.
2161
2162 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2163
2164 * Makefile.in (COMPILE.pre): Add "-x c++".
2165
2166 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2167
2168 * fork-child.c: Conditionally include <signal.h>.
2169
2170 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2171
2172 * server.c (handle_general_set): Handle new packet
2173 "QStartupWithShell".
2174 (handle_query): Add "QStartupWithShell" to the list of supported
2175 packets.
2176 (gdbserver_usage): Add help text explaining the
2177 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2178 options.
2179 (captured_main): Recognize and act upon the presence of the new
2180 CLI options.
2181
2182 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2183 Pedro Alves <palves@redhat.com>
2184
2185 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2186 * configure: Regenerate.
2187 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2188 "fork-inferior.o".
2189 (i[34567]86-*-lynxos*): Likewise.
2190 (spu*-*-*): Likewise.
2191 * fork-child.c: New file.
2192 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2193 and "environ.h".
2194 (linux_ptrace_fun): New function.
2195 (linux_create_inferior): Adjust function prototype to reflect
2196 change on "target.h". Adjust function code to use
2197 "fork_inferior".
2198 (linux_request_interrupt): Delete "signal_pid".
2199 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2200 (lynx_ptrace_fun): New function.
2201 (lynx_create_inferior): Adjust function prototype to reflect
2202 change on "target.h". Adjust function code to use
2203 "fork_inferior".
2204 * nto-low.c (nto_create_inferior): Adjust function prototype and
2205 code to reflect change on "target.h". Update comments.
2206 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2207 "common-terminal.h" and "environ.h".
2208 (terminal_fd): Moved to fork-child.c.
2209 (old_foreground_pgrp): Likewise.
2210 (restore_old_foreground_pgrp): Likewise.
2211 (last_status): Make it global.
2212 (last_ptid): Likewise.
2213 (our_environ): New variable.
2214 (startup_with_shell): Likewise.
2215 (program_name): Likewise.
2216 (program_argv): Rename to...
2217 (program_args): ...this.
2218 (wrapper_argv): New variable.
2219 (start_inferior): Delete function.
2220 (get_exec_wrapper): New function.
2221 (get_exec_file): Likewise.
2222 (get_environ): Likewise.
2223 (prefork_hook): Likewise.
2224 (post_fork_inferior): Likewise.
2225 (postfork_hook): Likewise.
2226 (postfork_child_hook): Likewise.
2227 (handle_v_run): Update code to deal with arguments coming from the
2228 remote host. Update calls from "start_inferior" to
2229 "create_inferior".
2230 (captured_main): Likewise. Initialize environment variable. Call
2231 "have_job_control".
2232 * server.h (post_fork_inferior): New prototype.
2233 (get_environ): Likewise.
2234 (last_status): Declare.
2235 (last_ptid): Likewise.
2236 (signal_pid): Likewise.
2237 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2238 (spu_ptrace_fun): New function.
2239 (spu_create_inferior): Adjust function prototype to reflect change
2240 on "target.h". Adjust function code to use "fork_inferior".
2241 * target.c (target_terminal_init): New function.
2242 (target_terminal_inferior): Likewise.
2243 (target_terminal_ours): Likewise.
2244 * target.h: Include <vector>.
2245 (struct target_ops) <create_inferior>: Update prototype.
2246 (create_inferior): Update macro.
2247 * utils.c (gdb_flush_out_err): New function.
2248 * win32-low.c (win32_create_inferior): Adjust function prototype
2249 and code to reflect change on "target.h".
2250
2251 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2252
2253 * inferiors.c (switch_to_thread): New function.
2254
2255 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2256
2257 * Makefile.in (SFILE): Add "common/job-control.c".
2258 (OBS): Add "job-control.o".
2259
2260 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2261
2262 * Makefile: Remove "@host_makefile_frag@".
2263
2264 2017-05-05 Pedro Alves <palves@redhat.com>
2265
2266 * configure: Regenerate.
2267
2268 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2269
2270 * configure: Regenerate.
2271
2272 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2273
2274 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2275 software_single_step change of return type to
2276 std::vector<CORE_ADDR>.
2277 * linux-low.c (install_software_single_step_breakpoints):
2278 Likewise.
2279 * linux-low.h (install_software_single_step_breakpoints):
2280 Likewise.
2281
2282 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2283
2284 * remote-utils.c: Include "gdb_termios.h" instead of
2285 "terminal.h".
2286 * terminal.h: Delete file.
2287
2288 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2289
2290 * server.c: Include <vector>.
2291 <program_argv, wrapper_argv>: Convert to std::vector.
2292 (start_inferior): Rewrite function to use C++.
2293 (handle_v_run): Likewise. Update code that calculates the argv
2294 based on the vRun packet; use C++.
2295 (captured_main): Likewise.
2296
2297 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2298
2299 * server.c (handle_v_cont): Initialize thread_resume::thread
2300 with null_ptid.
2301
2302 2017-04-05 Pedro Alves <palves@redhat.com>
2303
2304 * configure: Regenerate.
2305
2306 2017-04-05 Pedro Alves <palves@redhat.com>
2307
2308 * gdbreplay.c (sync_error): Constify.
2309 * linux-x86-low.c (push_opcode): Constify.
2310
2311 2017-04-05 Pedro Alves <palves@redhat.com>
2312
2313 * win32-low.c (get_child_debug_event)
2314 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2315 Report TARGET_WAITKIND_SPURIOUS instead.
2316
2317 2017-04-05 Pedro Alves <palves@redhat.com>
2318
2319 * remote-utils.c (remote_prepare, remote_open): Constify.
2320 * remote-utils.h (remote_prepare, remote_open): Constify.
2321 * server.c (captured_main): Constify 'port' handling.
2322
2323 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2324
2325 * Makefile.in (clean): Clear .deps.
2326
2327 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2328
2329 * .gitignore: Remove generated files, replace with wildcard.
2330 * (clean): Replace removal of generated files with wildcard.
2331 (version.c): Replace with...
2332 (version-generated.c): ...this.
2333 (xml-builtin.c): Replace with...
2334 (xml-builtin-generated.c): ...this.
2335 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2336 (%.c: *regformats*): Replace with...
2337 (%-generated.c: *regformats*): ...this.
2338
2339 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2340
2341 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2342 (xtensa_fill_gregset): Call collect_register_by_name for
2343 threadptr register.
2344 (xtensa_store_gregset): Call supply_register_by_name for
2345 threadptr register.
2346
2347 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2348
2349 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2350 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2351 (xtensa_store_gregset): Call supply_register for all registers in
2352 a0_regnum..a0_regnum + C0_NREGS range.
2353
2354 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2355
2356 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2357 (ax-ipa.o: ax.c): Remove.
2358 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2359 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2360 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2361 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2362 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2363
2364 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2365
2366 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2367 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2368 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2369 (errors-ipa.o: ../common/errors.c): Remove.
2370 (format-ipa.o: ../common/format.c): Remove.
2371 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2372
2373 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2374
2375 * Makefile.in (%-ipa.o: %.c): New rule.
2376 (tracepoint-ipa.o: tracepoint.c): Remove.
2377 (utils-ipa.o: utils.c): Remove.
2378 (remote-utils-ipa.o: remote-utils.c): Remove.
2379 (regcache-ipa.o: regcache.c): Remove.
2380 (i386-linux-ipa.o: i386-linux.c): Remove.
2381 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2382 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2383 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2384 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2385 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2386 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2387 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2388 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2389 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2390 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2391 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2392 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2393 (aarch64-ipa.o: aarch64.c): Remove.
2394 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2395 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2396 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2397 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2398 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2399 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2400 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2401 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2402 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2403 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2404 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2405 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2406 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2407 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2408 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2409 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2410 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2411 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2412 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2413 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2414 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2415 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2416 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2417 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2418 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2419 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2420 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2421 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2422 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2423 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2424 (tdesc-ipa.o: tdesc.c): Remove.
2425 (x32-linux-ipa.o: x32-linux.c): Remove.
2426 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2427 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2428
2429 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2430
2431 * Makefile.in (%.o: ../arch/%.c): New rule.
2432 (arm.o: ../arch/arm.c): Remove.
2433 (arm-linux.o: ../arch/arm-linux.c): Remove.
2434 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2435 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2436
2437 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2438
2439 * Makefile.in (%.o: ../nat/%.c): New rule.
2440 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2441 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2442 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2443 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2444 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2445 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2446 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2447 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2448 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2449 (linux-personality.o: ../nat/linux-personality.c): Remove.
2450 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2451 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2452 (x86-linux.o: ../nat/x86-linux.c): Remove.
2453 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2454 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2455
2456 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2457
2458 * Makefile.in (%.o: ../common/%.c): New rule.
2459 (signals.o: ../common/signals.c): Remove.
2460 (print-utils.o: ../common/print-utils.c): Remove.
2461 (rsp-low.o: ../common/rsp-low.c): Remove.
2462 (common-utils.o: ../common/common-utils.c): Remove.
2463 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2464 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2465 (vec.o: ../common/vec.c): Remove.
2466 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2467 (xml-utils.o: ../common/xml-utils.c): Remove.
2468 (ptid.o: ../common/ptid.c): Remove.
2469 (buffer.o: ../common/buffer.c): Remove.
2470 (format.o: ../common/format.c): Remove.
2471 (filestuff.o: ../common/filestuff.c): Remove.
2472 (agent.o: ../common/agent.c): Remove.
2473 (errors.o: ../common/errors.c): Remove.
2474 (environ.o: ../common/environ.c): Remove.
2475 (common-debug.o: ../common/common-debug.c): Remove.
2476 (cleanups.o: ../common/cleanups.c): Remove.
2477 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2478 (fileio.o: ../common/fileio.c): Remove.
2479 (common-regcache.o: ../common/common-regcache.c): Remove.
2480 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2481 (new-op.o: ../common/new-op.c): Remove.
2482 (btrace-common.o: ../common/btrace-common.c): Remove.
2483
2484 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2485
2486 * Makefile.in (%.o: ../target/%.c): New rule.
2487 (waitstatus.o: ../target/waitstatus.c): Remove.
2488
2489 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2490
2491 * Makefile.in
2492 (%.c: ../regformats/%.dat,
2493 (%.c: ../regformats/arm/%.dat,
2494 (%.c: ../regformats/i386/%.dat,
2495 (%.c: ../regformats/rs6000/%.dat): New rules.
2496 (aarch64.c): Remove.
2497 (reg-arm.c): Remove.
2498 (arm-with-iwmmxt.c): Remove.
2499 (arm-with-vfpv2.c): Remove.
2500 (arm-with-vfpv3.c): Remove.
2501 (arm-with-neon.c): Remove.
2502 (reg-bfin.c): Remove.
2503 (reg-cris.c): Remove.
2504 (reg-crisv32.c): Remove.
2505 (i386.c): Remove.
2506 (i386-linux.c): Remove.
2507 (i386-avx.c): Remove.
2508 (i386-avx-linux.c): Remove.
2509 (i386-avx-avx512.c): Remove.
2510 (i386-avx-avx512-linux.c): Remove.
2511 (i386-mpx.c): Remove.
2512 (i386-mpx-linux.c): Remove.
2513 (i386-avx-mpx-avx512-pku.c): Remove.
2514 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2515 (i386-avx-mpx.c): Remove.
2516 (i386-avx-mpx-linux.c): Remove.
2517 (i386-mmx.c): Remove.
2518 (i386-mmx-linux.c): Remove.
2519 (reg-ia64.c): Remove.
2520 (reg-m32r.c): Remove.
2521 (reg-m68k.c): Remove.
2522 (reg-cf.c): Remove.
2523 (mips-linux.c): Remove.
2524 (mips-dsp-linux.c): Remove.
2525 (mips64-linux.c): Remove.
2526 (mips64-dsp-linux.c): Remove.
2527 (nios2-linux.c): Remove.
2528 (powerpc-32.c): Remove.
2529 (powerpc-32l.c): Remove.
2530 (powerpc-altivec32l.c): Remove.
2531 (powerpc-cell32l.c): Remove.
2532 (powerpc-vsx32l.c): Remove.
2533 (powerpc-isa205-32l.c): Remove.
2534 (powerpc-isa205-altivec32l.c): Remove.
2535 (powerpc-isa205-vsx32l.c): Remove.
2536 (powerpc-e500l.c): Remove.
2537 (powerpc-64l.c): Remove.
2538 (powerpc-altivec64l.c): Remove.
2539 (powerpc-cell64l.c): Remove.
2540 (powerpc-vsx64l.c): Remove.
2541 (powerpc-isa205-64l.c): Remove.
2542 (powerpc-isa205-altivec64l.c): Remove.
2543 (powerpc-isa205-vsx64l.c): Remove.
2544 (s390-linux32.c): Remove.
2545 (s390-linux32v1.c): Remove.
2546 (s390-linux32v2.c): Remove.
2547 (s390-linux64.c): Remove.
2548 (s390-linux64v1.c): Remove.
2549 (s390-linux64v2.c): Remove.
2550 (s390-te-linux64.c): Remove.
2551 (s390-vx-linux64.c): Remove.
2552 (s390-tevx-linux64.c): Remove.
2553 (s390x-linux64.c): Remove.
2554 (s390x-linux64v1.c): Remove.
2555 (s390x-linux64v2.c): Remove.
2556 (s390x-te-linux64.c): Remove.
2557 (s390x-vx-linux64.c): Remove.
2558 (s390x-tevx-linux64.c): Remove.
2559 (tic6x-c64xp-linux.c): Remove.
2560 (tic6x-c64x-linux.c): Remove.
2561 (tic6x-c62x-linux.c): Remove.
2562 (reg-sh.c): Remove.
2563 (reg-sparc64.c): Remove.
2564 (reg-spu.c): Remove.
2565 (amd64.c): Remove.
2566 (amd64-linux.c): Remove.
2567 (amd64-avx.c): Remove.
2568 (amd64-avx-linux.c): Remove.
2569 (amd64-avx-avx512.c): Remove.
2570 (amd64-avx-avx512-linux.c): Remove.
2571 (amd64-mpx.c): Remove.
2572 (amd64-mpx-linux.c): Remove.
2573 (amd64-avx-mpx-avx512-pku.c): Remove.
2574 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2575 (amd64-avx-mpx.c): Remove.
2576 (amd64-avx-mpx-linux.c): Remove.
2577 (x32.c): Remove.
2578 (x32-linux.c): Remove.
2579 (x32-avx.c): Remove.
2580 (x32-avx-linux.c): Remove.
2581 (x32-avx-avx512.c): Remove.
2582 (x32-avx-avx512-linux.c): Remove.
2583 (reg-xtensa.c): Remove.
2584 (reg-tilegx.c): Remove.
2585 (reg-tilegx32.c): Remove.
2586
2587 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2588
2589 * Makefile.in (SFILES): Add "common/environ.c".
2590 (OBJS): Add "common/environ.h".
2591
2592 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2593
2594 * configure.ac: Check if the fs_base and gs_base members of
2595 `struct user_regs_struct' exist.
2596 * config.in: Regenerated.
2597 * configure: Likewise.
2598
2599 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2600
2601 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2602 target_read_memory.
2603 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2604 (get_next_pcs_syscall_next_pc): Likewise.
2605
2606 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2607
2608 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2609 * nto-x86-low.c: Likewise.
2610
2611 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2612
2613 * Makefile.in: Include disable-implicit-rules.mk.
2614
2615 2016-11-23 Pedro Alves <palves@redhat.com>
2616
2617 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2618 (debug_vprintf): Use std::chrono::steady_clock instead of
2619 gettimeofday. Use '.' instead of ':'.
2620 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2621 (get_timestamp): Use std::chrono::steady_clock instead of
2622 gettimeofday.
2623
2624 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2625
2626 * Makefile.in: Fix whitespace formatting.
2627
2628 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2629
2630 * Makefile.in (SFILES, OBS): Flatten list and order
2631 alphabetically.
2632
2633 2016-11-23 Pedro Alves <palves@redhat.com>
2634
2635 * event-loop.c (handle_file_event): Use warning.
2636 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2637 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2638 Use warning.
2639
2640 2016-11-23 Pedro Alves <palves@redhat.com>
2641
2642 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2643 output.
2644 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2645 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2646 debug_printf and debug_flush for debug output.
2647 * server.c (handle_general_set): Likewise.
2648 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2649 output.
2650
2651 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2652
2653 * Makefile.in (.c.o): Replace rule with ...
2654 (%.o: %.c): ... this one.
2655
2656 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2657
2658 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2659 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2660 make.
2661 * configure.ac: Remove checks for the make program.
2662 * configure: Re-generate.
2663
2664 2016-10-28 Pedro Alves <palves@redhat.com>
2665
2666 * Makefile.in (CXX_DIALECT): Get from configure.
2667 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2668 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2669 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2670 * config.in: Regenerate.
2671 * configure: Regenerate.
2672
2673 2016-10-27 Yao Qi <yao.qi@linaro.org>
2674
2675 * linux-low.c (linux_supports_range_stepping): Return true if
2676 can_software_single_step return true.
2677
2678 2016-10-27 Yao Qi <yao.qi@linaro.org>
2679
2680 * inferiors.c (find_inferior_in_random): New function.
2681 * inferiors.h (find_inferior_in_random): Declare.
2682 * linux-low.c (linux_wait_for_event_filtered): Call
2683 find_inferior_in_random instead of find_inferior.
2684
2685 2016-10-27 Yao Qi <yao.qi@linaro.org>
2686
2687 * linux-low.c (linux_wait_1): If single-step breakpoints are
2688 inserted, remove them.
2689
2690 2016-10-26 Pedro Alves <palves@redhat.com>
2691
2692 * linux-low.c (handle_extended_wait): Link parent/child fork
2693 threads.
2694 (linux_wait_1): Unlink them.
2695 (linux_set_resume_request): Ignore resume requests for
2696 already-resumed and unhandled fork child threads.
2697 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2698 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2699 New functions.
2700 (handle_v_requests) <vCont>: Don't call require_running.
2701 * server.h (in_queued_stop_replies): New declaration.
2702
2703 2016-10-24 Yao Qi <yao.qi@linaro.org>
2704
2705 PR server/20733
2706 * linux-aarch64-low.c (append_insns): Cast the return value to
2707 'uint32_t *'.
2708
2709 2016-10-10 Yao Qi <yao.qi@linaro.org>
2710
2711 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2712
2713 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2714
2715 * target.c (target_supports_multi_process): New function, moved
2716 from...
2717 * target.h (target_supports_multi_process): ... here. Remove
2718 macro.
2719
2720 2016-10-05 Tom Tromey <tom@tromey.com>
2721
2722 PR remote/20655:
2723 * tracepoint.c (handle_tracepoint_bkpts): Check
2724 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2725
2726 2016-10-05 Yao Qi <yao.qi@linaro.org>
2727
2728 * configure.srv: Update the path of arm-*.xml files.
2729
2730 2016-10-05 Terry Guo <terry.guo@arm.com>
2731 Yao Qi <yao.qi@linaro.org>
2732
2733 * Makefile.in: Adjust the path of rules.
2734 * configure.srv: Update the path of xml files.
2735 * regformats/arm-with-iwmmxt.dat: Regenerated.
2736 * regformats/arm-with-neon.dat: Likewise.
2737 * regformats/arm-with-vfpv2.dat: Likewise.
2738 * regformats/arm-with-vfpv3.dat Likewise.
2739
2740 2016-09-30 Yao Qi <yao.qi@linaro.org>
2741
2742 PR gdbserver/20627
2743 * target.c (target_stop_and_wait): Don't call
2744 target_continue_no_signal, use resume_stop instead.
2745
2746 2016-09-26 Yao Qi <yao.qi@linaro.org>
2747
2748 * linux-low.c (linux_wait_1): Call debug_exit.
2749
2750 2016-09-23 Pedro Alves <palves@redhat.com>
2751
2752 * Makefile.in (SFILES): Add common/new-op.c.
2753 (OBS): Add common/new-op.o.
2754 (new-op.o): New rule.
2755
2756 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2757
2758 * .gitinore: Ignore more files.
2759
2760 2016-09-21 Yao Qi <yao.qi@linaro.org>
2761
2762 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2763 23.
2764
2765 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2766
2767 * server.c (start_inferior): Call target_mourn_inferior instead of
2768 mourn_inferior; pass ptid_t argument to it.
2769 (resume): Likewise.
2770 (handle_target_event): Likewise.
2771 * target.c (target_mourn_inferior): New function.
2772 * target.h (mourn_inferior): Delete macro.
2773
2774 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2775
2776 * linux-low.c (lwp_is_stepping): New function.
2777
2778 2016-09-06 Carl Love <cel@us.ibm.com>
2779
2780 * server.c (start_inferior): Fixed comment, requested comment change
2781 didn't get updated correctly. Removed reference to ptrace () call as
2782 it is only true on Linux systems.
2783
2784 2016-09-06 Carl Love <cel@us.ibm.com>
2785
2786 * server.c (start_inferior): Do not call
2787 function target_post_create_inferior () if the
2788 inferior process has already exited.
2789
2790 2016-09-05 Pedro Alves <palves@redhat.com>
2791
2792 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2793 (COMPILE.pre, CC_LD): Use CXX directly.
2794 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2795 * acinclude.m4: Don't include build-with-cxx.m4.
2796 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2797 * configure: Regenerate.
2798
2799 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2800
2801 PR gdb/19495
2802 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2803 call writing data to own_buf.
2804
2805 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2806
2807 * target.c (mywait): Call target_wait instead of
2808 the_target->wait.
2809 (target_wait): New function.
2810
2811 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2812
2813 * server.c (start_inferior): New variable 'ptid'. Replace calls
2814 to the_target->resume by target_continue{,_no_signal}, depending
2815 on the case.
2816 * target.c (target_stop_and_wait): Call target_continue_no_signal
2817 instead of the_target->resume.
2818 (target_continue): New function.
2819
2820 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2821
2822 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2823
2824 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2825
2826 PR server/20491
2827 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2828 ps_prochandle.
2829 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2830 * linux-arm-low.c (ps_get_thread_area): Likewise.
2831 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2832 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2833 * linux-mips-low.c (ps_get_thread_area): Likewise.
2834 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2835 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2836 * linux-x86-low.c (ps_get_thread_area): Likewise.
2837 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2838
2839 2016-08-19 Pedro Alves <palves@redhat.com>
2840
2841 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2842
2843 2016-08-19 Pedro Alves <palves@redhat.com>
2844
2845 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2846 comment. Use memcpy instead of casting through unsigned long.
2847
2848 2016-08-19 Pedro Alves <palves@redhat.com>
2849
2850 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2851 allocating around 0x80000000.
2852
2853 2016-08-19 Pedro Alves <palves@redhat.com>
2854
2855 PR gdb/20415
2856 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2857 (x32-avx512-linux-ipa.o): New rules.
2858 * configure.ac (x86_64-*-linux*): New x32 check.
2859 * configure.srv (ipa_x32_linux_regobj): New.
2860 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2861 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2862 descriptions.
2863 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2864 descriptions.
2865 * configure: Regenerate.
2866
2867 2016-08-09 Pedro Alves <palves@redhat.com>
2868
2869 PR gdb/18653
2870 * Makefile.in (OBS): Add signals-state-save-restore.o.
2871 (signals-state-save-restore.o): New rule.
2872 * config.in: Regenerate.
2873 * configure: Regenerate.
2874 * linux-low.c: Include "signals-state-save-restore.h".
2875 (linux_create_inferior): Call
2876 restore_original_signals_state.
2877 * server.c: Include "dispositions-save-restore.h".
2878 (captured_main): Call save_original_signals_state.
2879
2880 2016-08-05 Pedro Alves <palves@redhat.com>
2881
2882 * configure: Regenerate.
2883
2884 2016-08-04 Yao Qi <yao.qi@linaro.org>
2885
2886 * linux-low.c (regsets_fetch_inferior_registers): Check
2887 errno is ESRCH or not.
2888
2889 2016-08-02 Yao Qi <yao.qi@linaro.org>
2890
2891 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2892 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2893 (thread_db_load_search): Update.
2894 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2895 td_ta_set_event and td_ta_event_getmsg.
2896
2897 2016-07-26 Pedro Alves <palves@redhat.com>
2898
2899 PR server/20414
2900 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2901 of unsigned long for 64-bit registers and use uint32_t instead of
2902 unsigned int for 32-bit registers.
2903
2904 2016-07-26 Pedro Alves <palves@redhat.com>
2905
2906 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2907 to 'ptrace'.
2908
2909 2016-07-21 Tom Tromey <tom@tromey.com>
2910
2911 * configure: Rebuild.
2912
2913 2016-07-21 Yao Qi <yao.qi@linaro.org>
2914
2915 * mem-break.c (find_gdb_breakpoint): Cast bp to
2916 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2917
2918 2016-07-21 Yao Qi <yao.qi@linaro.org>
2919
2920 * server.c (handle_v_requests): Support s and S actions
2921 if target_supports_software_single_step return true.
2922
2923 2016-07-21 Yao Qi <yao.qi@linaro.org>
2924
2925 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2926 is resume_step, call maybe_hw_step.
2927 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2928 and unstop them.
2929 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2930 breakpoints or not.
2931 (proceed_one_lwp): If resume request is resume_step, install
2932 reinsert breakpoints and call maybe_hw_step.
2933
2934 2016-07-21 Yao Qi <yao.qi@linaro.org>
2935
2936 * linux-low.c (proceed_one_lwp): Declare.
2937 (linux_resume_one_thread): Remove local variable 'step'.
2938 Lift code enqueue signal. Call proceed_one_lwp instead of
2939 linux_resume_one_lwp.
2940
2941 2016-07-21 Yao Qi <yao.qi@linaro.org>
2942
2943 * linux-low.c (linux_resume_one_thread): Call
2944 enqueue_pending_signal.
2945
2946 2016-07-21 Yao Qi <yao.qi@linaro.org>
2947
2948 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2949 * inferiors.c (do_restore_current_thread_cleanup): New function.
2950 (make_cleanup_restore_current_thread): Likewise.
2951 * linux-low.c (install_software_single_step_breakpoints): Call
2952 make_cleanup_restore_current_thread. Switch current_thread to
2953 thread.
2954
2955 2016-07-21 Yao Qi <yao.qi@linaro.org>
2956
2957 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2958 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2959 (clone_one_breakpoint): Likewise.
2960 (delete_reinsert_breakpoints): Change parameter to thread.
2961 Callers updated.
2962 (has_reinsert_breakpoints): Likewise.
2963 (uninsert_reinsert_breakpoints): Likewise.
2964 (reinsert_reinsert_breakpoints): Likewise.
2965 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2966 (delete_reinsert_breakpoints): Likewise.
2967 (reinsert_reinsert_breakpoints): Likewise.
2968 (uninsert_reinsert_breakpoints): Likewise.
2969 (has_reinsert_breakpoints): Likewise.
2970
2971 2016-07-21 Yao Qi <yao.qi@linaro.org>
2972
2973 * inferiors.c (get_thread_process): Make parameter const.
2974 * inferiors.h (get_thread_process): Update declaration.
2975 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2976 Add new parameters child_thread and parent_thread. Callers
2977 updated.
2978 * mem-break.h (clone_all_breakpoints): Update declaration.
2979
2980 2016-07-21 Yao Qi <yao.qi@linaro.org>
2981
2982 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2983 <command_list, handler>: Remove.
2984 (struct gdb_breakpoint): New.
2985 (struct other_breakpoint): New.
2986 (struct reinsert_breakpoint): New.
2987 (is_gdb_breakpoint): New function.
2988 (any_persistent_commands): Update command_list if
2989 is_gdb_breakpoint returns true.
2990 (set_breakpoint): Create breakpoints according to their types.
2991 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2992 (set_gdb_breakpoint_1): Likewise.
2993 (set_gdb_breakpoint): Likewise.
2994 (clear_breakpoint_conditions): Change parameter type to
2995 'struct gdb_breakpoint *'.
2996 (clear_breakpoint_commands): Likewise.
2997 (clear_breakpoint_conditions_and_commands): Likewise.
2998 (add_condition_to_breakpoint): Likewise.
2999 (add_breakpoint_condition): Likewise.
3000 (add_commands_to_breakpoint): Likewise.
3001 (check_breakpoints): Check other_breakpoint.
3002 (clone_one_breakpoint): Clone breakpopint according to its type.
3003 * mem-break.h (struct gdb_breakpoint): Declare.
3004 (set_gdb_breakpoint): Update declaration.
3005 (clear_breakpoint_conditions_and_commands): Likewise.
3006 (add_breakpoint_condition): Likewise.
3007 (add_breakpoint_commands): Likewise.
3008 * server.c (process_point_options): Change parameter type to
3009 'struct gdb_breakpoint *'.
3010
3011 2016-07-21 Yao Qi <yao.qi@linaro.org>
3012
3013 * mem-break.c (set_breakpoint_at): Rename it to ...
3014 (set_breakpoint_type_at): ... it.
3015 (set_breakpoint_at): Call set_breakpoint_type_at.
3016 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3017 * mem-break.h (set_breakpoint_at): Update comments.
3018
3019 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3020
3021 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3022 to buf parameter.
3023 (nios2_store_gregset): Likewise.
3024
3025 2016-07-01 Pedro Alves <palves@redhat.com>
3026 Antoine Tremblay <antoine.tremblay@ericsson.com>
3027
3028 * linux-low.c: Change interface to take the target lwp_info
3029 pointer directly and return void. Handle detaching from a zombie
3030 thread.
3031 (linux_detach_lwp_callback): New function.
3032 (linux_detach): Detach from the leader thread after detaching from
3033 the clone threads.
3034
3035 2016-06-28 Yao Qi <yao.qi@linaro.org>
3036
3037 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3038 for variable new_offset.
3039 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3040 (aarch64_ftrace_insn_reloc_cb): Likewise.
3041 (aarch64_ftrace_insn_reloc_tb): Likewise.
3042 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3043 PRIx64 instead of PRIx32.
3044
3045 2016-06-28 Yao Qi <yao.qi@linaro.org>
3046
3047 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3048 (the_low_target): Install arm_get_syscall_trapinfo.
3049
3050 2016-06-28 Yao Qi <yao.qi@linaro.org>
3051
3052 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3053 function.
3054 (the_low_target): Install aarch64_get_syscall_trapinfo.
3055
3056 2016-06-28 Yao Qi <yao.qi@linaro.org>
3057
3058 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3059 Callers updated.
3060 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3061 Remove parameter sysno.
3062 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3063 sysret.
3064
3065 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3066
3067 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3068 (s390_emit_ne_goto): Likewise.
3069 (s390_emit_lt_goto): Likewise.
3070 (s390_emit_le_goto): Likewise.
3071 (s390_emit_gt_goto): Likewise.
3072 (s390_emit_ge_goto): Likewise.
3073 (s390x_emit_eq_goto): Likewise.
3074 (s390x_emit_ne_goto): Likewise.
3075 (s390x_emit_lt_goto): Likewise.
3076 (s390x_emit_le_goto): Likewise.
3077 (s390x_emit_gt_goto): Likewise.
3078 (s390x_emit_ge_goto): Likewise.
3079 (s390_emit_ops_impl): Mark variable static.
3080 (s390x_emit_ops): Likewise.
3081
3082 2016-06-17 Yao Qi <yao.qi@linaro.org>
3083
3084 * linux-low.c (handle_extended_wait): Call
3085 uninsert_reinsert_breakpoints for the parent process. Remove
3086 reinsert breakpoints from the child process. Reinsert them to
3087 the parent process when vfork is done.
3088 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3089 (reinsert_reinsert_breakpoints): New function.
3090 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3091 (reinsert_reinsert_breakpoints): Declare.
3092
3093 2016-06-17 Yao Qi <yao.qi@linaro.org>
3094
3095 * linux-low.c (handle_extended_wait): If the parent is doing
3096 step-over, remove the reinsert breakpoints from the forked child.
3097
3098 2016-06-17 Yao Qi <yao.qi@linaro.org>
3099
3100 * linux-low.c (unsuspend_all_lwps): Declare.
3101 (linux_low_filter_event): If thread exited, call finish_step_over.
3102 If step-over is finished, unsuspend other threads.
3103
3104 2016-06-17 Yao Qi <yao.qi@linaro.org>
3105
3106 * linux-low.c (linux_resume_one_lwp_throw): Assert
3107 has_reinsert_breakpoints returns false.
3108 * mem-break.c (delete_disabled_breakpoints): Assert
3109 bp type isn't reinsert_breakpoint.
3110
3111 2016-06-17 Yao Qi <yao.qi@linaro.org>
3112
3113 * linux-low.c (maybe_hw_step): New function.
3114 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3115 (finish_step_over): Switch current_thread to lwp temporarily,
3116 and assert has_reinsert_breakpoints returns true.
3117 (proceed_one_lwp): Call maybe_hw_step.
3118 * mem-break.c (has_reinsert_breakpoints): New function.
3119 * mem-break.h (has_reinsert_breakpoints): Declare.
3120
3121 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3122
3123 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3124
3125 2016-05-17 Yao Qi <yao.qi@linaro.org>
3126
3127 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3128 instead of find_inferior.
3129
3130 2016-05-05 Yao Qi <yao.qi@linaro.org>
3131
3132 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3133 Initialize res to zero.
3134
3135 2016-05-05 Yao Qi <yao.qi@linaro.org>
3136
3137 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3138 to uint32_t.
3139
3140 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3141
3142 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3143 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3144 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3145
3146 2016-04-28 Par Olsson <par.olsson@windriver.com>
3147 Simon Marchi <simon.marchi@ericsson.com>
3148
3149 * tracepoint.c (write_inferior_int8): New function.
3150 (cmd_qtenable_disable): Write enable flag using
3151 write_inferior_int8.
3152
3153 2016-04-25 Yao Qi <yao.qi@linaro.org>
3154
3155 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3156 (need_step_over_p): Return zero if the LWP has pending signals
3157 can be delivered on software single step target.
3158
3159 2016-04-25 Yao Qi <yao.qi@linaro.org>
3160
3161 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3162 return instead of error.
3163
3164 2016-04-22 Yao Qi <yao.qi@linaro.org>
3165
3166 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3167 to 23.
3168
3169 2016-04-22 Yao Qi <yao.qi@linaro.org>
3170
3171 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3172 signal when stepping over breakpoint with software single
3173 step.
3174
3175 2016-04-21 Pedro Alves <palves@redhat.com>
3176
3177 * linux-s390-low.c (s390_collect_ptrace_register)
3178 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3179 add casts.
3180 (s390_check_regset): Use void * instead of gdb_byte *.
3181
3182 2016-04-20 Pedro Alves <palves@redhat.com>
3183
3184 * configure: Renegerate.
3185
3186 2016-04-20 Yao Qi <yao.qi@linaro.org>
3187
3188 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3189 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3190 number 16.
3191 (arm_store_gregset): Likewise.
3192
3193 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3194
3195 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3196 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3197 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3198 (amd64-avx-mpx-linux.c): New rules.
3199 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3200 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3201 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3202 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3203 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3204 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3205 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3206 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3207 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3208 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3209 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3210 * linux-x86-low.c (x86_linux_read_description): Add case for
3211 X86_XSTATE_AVX_MPX_MASK.
3212 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3213 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3214 init_registers_i386_avx_mpx_linux.
3215 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3216 (initialize_low_tracepoint): Call
3217 init_registers_i386_avx_mpx_linux.
3218 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3219 (initialize_low_tracepoint): Call
3220 init_registers_amd64_avx_mpx_linux.
3221 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3222 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3223 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3224 declarations.
3225
3226 2016-04-18 Pedro Alves <palves@redhat.com>
3227
3228 * configure: Regenerate.
3229
3230 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3231
3232 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3233 (aarch64_emit_sub): Likewise.
3234
3235 2016-04-12 Pedro Alves <palves@redhat.com>
3236
3237 * utils.c (prepare_to_throw_exception): Delete.
3238
3239 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3240
3241 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3242
3243 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3244
3245 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3246
3247 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3248
3249 * linux-aarch64-ipa.c: Add <elf.h> include.
3250 * linux-ppc-ipa.c: Add <elf.h> include.
3251 * linux-s390-ipa.c: Add <elf.h> include.
3252
3253 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3254
3255 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3256 (get_raw_reg_ptr): Likewise.
3257 (get_trace_state_variable_value_ptr): Likewise.
3258 (set_trace_state_variable_value_ptr): Likewise.
3259 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3260 char *.
3261
3262 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3263 Marcin Kościelnicki <koriakin@0x04.net>
3264
3265 PR/17221
3266 * linux-ppc-low.c (emit_insns): New function.
3267 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3268 (ppc_emit_prologue): New function.
3269 (ppc_emit_epilogue): New function.
3270 (ppc_emit_add): New function.
3271 (ppc_emit_sub): New function.
3272 (ppc_emit_mul): New function.
3273 (ppc_emit_lsh): New function.
3274 (ppc_emit_rsh_signed): New function.
3275 (ppc_emit_rsh_unsigned): New function.
3276 (ppc_emit_ext): New function.
3277 (ppc_emit_zero_ext): New function.
3278 (ppc_emit_log_not): New function.
3279 (ppc_emit_bit_and): New function.
3280 (ppc_emit_bit_or): New function.
3281 (ppc_emit_bit_xor): New function.
3282 (ppc_emit_bit_not): New function.
3283 (ppc_emit_equal): New function.
3284 (ppc_emit_less_signed): New function.
3285 (ppc_emit_less_unsigned): New function.
3286 (ppc_emit_ref): New function.
3287 (ppc_emit_const): New function.
3288 (ppc_emit_reg): New function.
3289 (ppc_emit_pop): New function.
3290 (ppc_emit_stack_flush): New function.
3291 (ppc_emit_swap): New function.
3292 (ppc_emit_stack_adjust): New function.
3293 (ppc_emit_call): New function.
3294 (ppc_emit_int_call_1): New function.
3295 (ppc_emit_void_call_2): New function.
3296 (ppc_emit_if_goto): New function.
3297 (ppc_emit_goto): New function.
3298 (ppc_emit_eq_goto): New function.
3299 (ppc_emit_ne_goto): New function.
3300 (ppc_emit_lt_goto): New function.
3301 (ppc_emit_le_goto): New function.
3302 (ppc_emit_gt_goto): New function.
3303 (ppc_emit_ge_goto): New function.
3304 (ppc_write_goto_address): New function.
3305 (ppc_emit_ops_impl): New static variable.
3306 (ppc64v1_emit_prologue): New function.
3307 (ppc64v2_emit_prologue): New function.
3308 (ppc64_emit_epilogue): New function.
3309 (ppc64_emit_add): New function.
3310 (ppc64_emit_sub): New function.
3311 (ppc64_emit_mul): New function.
3312 (ppc64_emit_lsh): New function.
3313 (ppc64_emit_rsh_signed): New function.
3314 (ppc64_emit_rsh_unsigned): New function.
3315 (ppc64_emit_ext): New function.
3316 (ppc64_emit_zero_ext): New function.
3317 (ppc64_emit_log_not): New function.
3318 (ppc64_emit_bit_and): New function.
3319 (ppc64_emit_bit_or): New function.
3320 (ppc64_emit_bit_xor): New function.
3321 (ppc64_emit_bit_not): New function.
3322 (ppc64_emit_equal): New function.
3323 (ppc64_emit_less_signed): New function.
3324 (ppc64_emit_less_unsigned): New function.
3325 (ppc64_emit_ref): New function.
3326 (ppc64_emit_const): New function.
3327 (ppc64v1_emit_reg): New function.
3328 (ppc64v2_emit_reg): New function.
3329 (ppc64_emit_pop): New function.
3330 (ppc64_emit_stack_flush): New function.
3331 (ppc64_emit_swap): New function.
3332 (ppc64v1_emit_call): New function.
3333 (ppc64v2_emit_call): New function.
3334 (ppc64v1_emit_int_call_1): New function.
3335 (ppc64v2_emit_int_call_1): New function.
3336 (ppc64v1_emit_void_call_2): New function.
3337 (ppc64v2_emit_void_call_2): New function.
3338 (ppc64_emit_if_goto): New function.
3339 (ppc64_emit_eq_goto): New function.
3340 (ppc64_emit_ne_goto): New function.
3341 (ppc64_emit_lt_goto): New function.
3342 (ppc64_emit_le_goto): New function.
3343 (ppc64_emit_gt_goto): New function.
3344 (ppc64_emit_ge_goto): New function.
3345 (ppc64v1_emit_ops_impl): New static variable.
3346 (ppc64v2_emit_ops_impl): New static variable.
3347 (ppc_emit_ops): New function.
3348 (linux_low_target): Wire in ppc_emit_ops.
3349
3350 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3351 Marcin Kościelnicki <koriakin@0x04.net>
3352
3353 PR/17221
3354 * Makefile.in: Add powerpc-*-ipa.o
3355 * configure.srv: Add ipa_obj for powerpc*-linux.
3356 * linux-ppc-ipa.c: New file.
3357 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3358 includes.
3359 (PPC_FIELD): New macro.
3360 (PPC_SEXT): New macro.
3361 (PPC_OP6): New macro.
3362 (PPC_BO): New macro.
3363 (PPC_LI): New macro.
3364 (PPC_BD): New macro.
3365 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3366 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3367 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3368 (ppc_get_thread_area): New function.
3369 (is_elfv2_inferior): New function.
3370 (gen_ds_form): New function.
3371 (GEN_STD): New macro.
3372 (GEN_STDU): New macro.
3373 (GEN_LD): New macro.
3374 (GEN_LDU): New macro.
3375 (gen_d_form): New function.
3376 (GEN_ADDI): New macro.
3377 (GEN_ADDIS): New macro.
3378 (GEN_LI): New macro.
3379 (GEN_LIS): New macro.
3380 (GEN_ORI): New macro.
3381 (GEN_ORIS): New macro.
3382 (GEN_LWZ): New macro.
3383 (GEN_STW): New macro.
3384 (GEN_STWU): New macro.
3385 (gen_xfx_form): New function.
3386 (GEN_MFSPR): New macro.
3387 (GEN_MTSPR): New macro.
3388 (GEN_MFCR): New macro.
3389 (GEN_MTCR): New macro.
3390 (GEN_SYNC): New macro.
3391 (GEN_LWSYNC): New macro.
3392 (gen_x_form): New function.
3393 (GEN_OR): New macro.
3394 (GEN_MR): New macro.
3395 (GEN_LWARX): New macro.
3396 (GEN_STWCX): New macro.
3397 (GEN_CMPW): New macro.
3398 (gen_md_form): New function.
3399 (GEN_RLDICL): New macro.
3400 (GEN_RLDICR): New macro.
3401 (gen_i_form): New function.
3402 (GEN_B): New macro.
3403 (GEN_BL): New macro.
3404 (gen_b_form): New function.
3405 (GEN_BNE): New macro.
3406 (GEN_LOAD): New macro.
3407 (GEN_STORE): New macro.
3408 (gen_limm): New function.
3409 (gen_atomic_xchg): New function.
3410 (gen_call): New function.
3411 (ppc_relocate_instruction): New function.
3412 (ppc_install_fast_tracepoint_jump_pad): New function.
3413 (ppc_get_min_fast_tracepoint_insn_len): New function.
3414 (ppc_get_ipa_tdesc_idx): New function.
3415 (the_low_target): Wire in the new functions.
3416 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3417 tdescs.
3418 * linux-ppc-tdesc.h: New file.
3419
3420 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3421
3422 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3423 (alloc_jump_pad_buffer): New function.
3424 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3425 (alloc_jump_pad_buffer): New function.
3426 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3427 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3428 (alloc_jump_pad_buffer): New function.
3429 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3430 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3431 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3432 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3433
3434 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3435
3436 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3437 * linux-amd64-ipa.c: Likewise.
3438 * linux-i386-ipa.c: Likewise.
3439 * linux-s390-ipa.c: Likewise.
3440 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3441 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3442 set_trace_state_variable_value_ptr.
3443 (struct ipa_sym_addresses): Likewise.
3444 (symbol_list): Likewise.
3445 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3446 accessing gdb_collect directly.
3447 (gdb_collect_ptr_type): New typedef.
3448 (get_raw_reg_ptr_type): New typedef.
3449 (get_trace_state_variable_value_ptr_type): New typedef.
3450 (set_trace_state_variable_value_ptr_type): New typedef.
3451 (gdb_collect_ptr): New global.
3452 (get_raw_reg_ptr): New global.
3453 (get_trace_state_variable_value_ptr): New global.
3454 (set_trace_state_variable_value_ptr): New global.
3455 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3456 accessing get_raw_reg directly.
3457 (get_get_tsv_func_addr): Likewise for
3458 get_trace_state_variable_value_ptr.
3459 (get_set_tsv_func_addr): Likewise for
3460 set_trace_state_variable_value_ptr.
3461 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3462
3463 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3464
3465 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3466
3467 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3468
3469 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3470 packets.
3471 (relocate_instruction): Remove own_buf.
3472 * server.c (own_buf): Make global.
3473 (handle_v_requests): Make global.
3474 * server.h (own_buf): New declaration.
3475 (handle_v_requests): New prototype.
3476
3477 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3478
3479 PR 18377
3480 * linux-s390-low.c (add_insns): New function.
3481 (s390_emit_prologue): New function.
3482 (s390_emit_epilogue): New function.
3483 (s390_emit_add): New function.
3484 (s390_emit_sub): New function.
3485 (s390_emit_mul): New function.
3486 (s390_emit_lsh): New function.
3487 (s390_emit_rsh_signed): New function.
3488 (s390_emit_rsh_unsigned): New function.
3489 (s390_emit_ext): New function.
3490 (s390_emit_log_not): New function.
3491 (s390_emit_bit_and): New function.
3492 (s390_emit_bit_or): New function.
3493 (s390_emit_bit_xor): New function.
3494 (s390_emit_bit_not): New function.
3495 (s390_emit_equal): New function.
3496 (s390_emit_less_signed): New function.
3497 (s390_emit_less_unsigned): New function.
3498 (s390_emit_ref): New function.
3499 (s390_emit_if_goto): New function.
3500 (s390_emit_goto): New function.
3501 (s390_write_goto_address): New function.
3502 (s390_emit_litpool): New function.
3503 (s390_emit_const): New function.
3504 (s390_emit_call): New function.
3505 (s390_emit_reg): New function.
3506 (s390_emit_pop): New function.
3507 (s390_emit_stack_flush): New function.
3508 (s390_emit_zero_ext): New function.
3509 (s390_emit_swap): New function.
3510 (s390_emit_stack_adjust): New function.
3511 (s390_emit_set_r2): New function.
3512 (s390_emit_int_call_1): New function.
3513 (s390_emit_void_call_2): New function.
3514 (s390_emit_eq_goto): New function.
3515 (s390_emit_ne_goto): New function.
3516 (s390_emit_lt_goto): New function.
3517 (s390_emit_le_goto): New function.
3518 (s390_emit_gt_goto): New function.
3519 (s390_emit_ge_goto): New function.
3520 (s390x_emit_prologue): New function.
3521 (s390x_emit_epilogue): New function.
3522 (s390x_emit_add): New function.
3523 (s390x_emit_sub): New function.
3524 (s390x_emit_mul): New function.
3525 (s390x_emit_lsh): New function.
3526 (s390x_emit_rsh_signed): New function.
3527 (s390x_emit_rsh_unsigned): New function.
3528 (s390x_emit_ext): New function.
3529 (s390x_emit_log_not): New function.
3530 (s390x_emit_bit_and): New function.
3531 (s390x_emit_bit_or): New function.
3532 (s390x_emit_bit_xor): New function.
3533 (s390x_emit_bit_not): New function.
3534 (s390x_emit_equal): New function.
3535 (s390x_emit_less_signed): New function.
3536 (s390x_emit_less_unsigned): New function.
3537 (s390x_emit_ref): New function.
3538 (s390x_emit_if_goto): New function.
3539 (s390x_emit_const): New function.
3540 (s390x_emit_call): New function.
3541 (s390x_emit_reg): New function.
3542 (s390x_emit_pop): New function.
3543 (s390x_emit_stack_flush): New function.
3544 (s390x_emit_zero_ext): New function.
3545 (s390x_emit_swap): New function.
3546 (s390x_emit_stack_adjust): New function.
3547 (s390x_emit_int_call_1): New function.
3548 (s390x_emit_void_call_2): New function.
3549 (s390x_emit_eq_goto): New function.
3550 (s390x_emit_ne_goto): New function.
3551 (s390x_emit_lt_goto): New function.
3552 (s390x_emit_le_goto): New function.
3553 (s390x_emit_gt_goto): New function.
3554 (s390x_emit_ge_goto): New function.
3555 (s390_emit_ops): New function.
3556 (struct linux_target_ops): Fill in emit_ops hook.
3557
3558 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3559
3560 PR 18377
3561 * Makefile.in: Add s390 IPA files.
3562 * configure.srv: Build IPA for s390.
3563 * linux-s390-ipa.c: New file.
3564 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3565 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3566 (tdesc_s390_linux32): Likewise.
3567 (init_registers_s390_linux32v1): Likewise.
3568 (tdesc_s390_linux32v1): Likewise.
3569 (init_registers_s390_linux32v2): Likewise.
3570 (tdesc_s390_linux32v2): Likewise.
3571 (init_registers_s390_linux64): Likewise.
3572 (tdesc_s390_linux64): Likewise.
3573 (init_registers_s390_linux64v1): Likewise.
3574 (tdesc_s390_linux64v1): Likewise.
3575 (init_registers_s390_linux64v2): Likewise.
3576 (tdesc_s390_linux64v2): Likewise.
3577 (init_registers_s390_te_linux64): Likewise.
3578 (tdesc_s390_te_linux64): Likewise.
3579 (init_registers_s390_vx_linux64): Likewise.
3580 (tdesc_s390_vx_linux64): Likewise.
3581 (init_registers_s390_tevx_linux64): Likewise.
3582 (tdesc_s390_tevx_linux64): Likewise.
3583 (init_registers_s390x_linux64): Likewise.
3584 (tdesc_s390x_linux64): Likewise.
3585 (init_registers_s390x_linux64v1): Likewise.
3586 (tdesc_s390x_linux64v1): Likewise.
3587 (init_registers_s390x_linux64v2): Likewise.
3588 (tdesc_s390x_linux64v2): Likewise.
3589 (init_registers_s390x_te_linux64): Likewise.
3590 (tdesc_s390x_te_linux64): Likewise.
3591 (init_registers_s390x_vx_linux64): Likewise.
3592 (tdesc_s390x_vx_linux64): Likewise.
3593 (init_registers_s390x_tevx_linux64): Likewise.
3594 (tdesc_s390x_tevx_linux64): Likewise.
3595 (have_hwcap_s390_vx): New static variable.
3596 (s390_arch_setup): Fill have_hwcap_s390_vx.
3597 (s390_get_thread_area): New function.
3598 (s390_ft_entry_gpr_esa): New const.
3599 (s390_ft_entry_gpr_zarch): New const.
3600 (s390_ft_entry_misc): New const.
3601 (s390_ft_entry_fr): New const.
3602 (s390_ft_entry_vr): New const.
3603 (s390_ft_main_31): New const.
3604 (s390_ft_main_64): New const.
3605 (s390_ft_exit_fr): New const.
3606 (s390_ft_exit_vr): New const.
3607 (s390_ft_exit_misc): New const.
3608 (s390_ft_exit_gpr_esa): New const.
3609 (s390_ft_exit_gpr_zarch): New const.
3610 (append_insns): New function.
3611 (s390_relocate_instruction): New function.
3612 (s390_install_fast_tracepoint_jump_pad): New function.
3613 (s390_get_min_fast_tracepoint_insn_len): New function.
3614 (s390_get_ipa_tdesc_idx): New function.
3615 (struct linux_target_ops): Wire in the above functions.
3616 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3617 * linux-s390-tdesc.h: New file.
3618
3619 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3620
3621 * linux-s390-low.c (s390_supports_tracepoints): New function.
3622 (struct linux_target_ops): Fill supports_tracepoints hook.
3623
3624 2016-03-18 Yao Qi <yao.qi@linaro.org>
3625
3626 * linux-low.c (lwp_signal_can_be_delivered): New function.
3627 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3628
3629 2016-03-18 Yao Qi <yao.qi@linaro.org>
3630
3631 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3632 0 if signal is enqueued. Remove 'signal' from one debugging
3633 message. Move one debugging message to some lines below.
3634 Remove code setting 'signal' to 0.
3635
3636 2016-03-18 Yao Qi <yao.qi@linaro.org>
3637
3638 * linux-low.c (linux_low_filter_event): Remove redundant
3639 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3640
3641 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3642
3643 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3644 (struct linux_target_ops): Wire in the above.
3645
3646 2016-03-03 Yao Qi <yao.qi@linaro.org>
3647
3648 * linux-low.c: Update comments to start_step_over.
3649
3650 2016-03-03 Yao Qi <yao.qi@linaro.org>
3651
3652 PR server/19736
3653 * linux-low.c (handle_extended_wait): Set child suspended
3654 if event_lwp->bp_reinsert isn't zero.
3655
3656 2016-03-02 Yao Qi <yao.qi@linaro.org>
3657
3658 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3659 enqueue_pending_signal.
3660
3661 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3662
3663 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3664 is actually loaded.
3665
3666 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3667
3668 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3669 (s390_regmap_3264) [!__s390x__]: New global.
3670 (s390_collect_ptrace_register): Skip map entries containing -1.
3671 (s390_supply_ptrace_register): Ditto.
3672 (s390_fill_gprs_high): New function.
3673 (s390_store_gprs_high): New function.
3674 (s390_regsets): Add NT_S390_HIGH_GPRS.
3675 (s390_get_hwcap): Enable on 31-bit.
3676 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3677 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3678 Detect NT_S390_HIGH_GPRS.
3679 (s390_usrregs_info_3264): Enable on 31-bit.
3680 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3681 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3682
3683 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3684
3685 PR gdb/13808
3686 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3687 * configure.srv: Ditto.
3688 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3689 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3690 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3691 (init_registers_amd64_linux): Remove prototype.
3692 (tdesc_amd64_linux): Remove declaration.
3693 (get_ipa_tdesc): New function.
3694 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3695 initialize remaining tdescs.
3696 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3697 (init_registers_i386_linux): Remove prototype.
3698 (tdesc_i386_linux): Remove declaration.
3699 (get_ipa_tdesc): New function.
3700 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3701 initialize remaining tdescs.
3702 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3703 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3704 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3705 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3706 (x86_get_ipa_tdesc_idx): New function.
3707 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3708 * linux-x86-tdesc.h: New file.
3709 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3710 (target_get_ipa_tdesc_idx): New macro.
3711 * tracepoint.c (ipa_tdesc_idx): New macro.
3712 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3713 (symbol_list): Add ipa_tdesc_idx.
3714 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3715 (ipa_tdesc): Remove.
3716 (ipa_tdesc_idx): New variable.
3717 (get_context_regcache): Use get_ipa_tdesc.
3718 (gdb_collect): Ditto.
3719 (gdb_probe): Ditto.
3720 * tracepoint.h (get_ipa_tdesc): New prototype.
3721 (ipa_tdesc): Remove.
3722
3723 2016-02-24 Pedro Alves <palves@redhat.com>
3724
3725 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3726 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3727 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3728 Factor out common code between the USE_SIGTRAP_SIGINFO and
3729 !USE_SIGTRAP_SIGINFO blocks.
3730 (linux_low_filter_event): Call save_stop_reason instead of
3731 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3732 Update comments.
3733 (linux_wait_1): Update comments.
3734
3735 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3736
3737 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3738 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3739 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3740 ppc_insert_point, ppc_remove_point.
3741
3742 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3743
3744 * linux-s390-low.c (s390_supports_z_point_type): New function.
3745 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3746
3747 2016-02-16 Yao Qi <yao.qi@linaro.org>
3748
3749 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3750 PC. Get pc from regcache_read_pc.
3751
3752 2016-02-12 Yao Qi <yao.qi@linaro.org>
3753
3754 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3755 or linux_get_pc_32bit.
3756 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3757
3758 2016-02-12 Yao Qi <yao.qi@linaro.org>
3759
3760 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3761 arm_linux_get_next_pcs_fixup.
3762
3763 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3764
3765 * tracepoint.c (x_tracepoint_action_download): Change
3766 write_inferior_data_ptr to write_inferior_data_pointer.
3767 (cmd_qtstart): Likewise.
3768 (write_inferior_data_ptr): Remove.
3769 (download_agent_expr): Change write_inferior_data_ptr to
3770 write_inferior_data_pointer.
3771 (download_tracepoint_1): Likewise.
3772 (download_tracepoint): Likewise.
3773 (download_trace_state_variables): Likewise.
3774
3775 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3776 Marcin Kościelnicki <koriakin@0x04.net>
3777
3778 * tracepoint.c (struct tracepoint_action_ops): Remove.
3779 (struct tracepoint_action): Remove ops.
3780 (m_tracepoint_action_download, r_tracepoint_action_download)
3781 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3782 size and offset accordingly.
3783 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3784 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3785 (tracepoint_action_send, tracepoint_action_download): New functions.
3786 Helpers for trace action handlers.
3787 (add_tracepoint_action): Remove setup actions ops.
3788 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3789
3790 2016-02-10 Yao Qi <yao.qi@linaro.org>
3791
3792 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3793
3794 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3795
3796 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3797 to AC_OUTPUT.
3798 * configure: Regenerate.
3799
3800 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3801
3802 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3803 void * to gdb_byte *.
3804 * linux-low.c (siginfo_fixup): Likewise.
3805 (linux_xfer_siginfo): Likewise.
3806 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3807 Likewise.
3808 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3809
3810 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3811
3812 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3813 to srv_tgtobj.
3814 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3815 to srv_tgtobj.
3816 * linux-x86-low.c [__x86_64__]: Include
3817 "nat/amd64-linux-siginfo.h".
3818 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3819 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3820 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3821 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3822 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3823 (cpt_si_fd, si_timerid, si_overrun): Move from
3824 nat/amd64-linux-siginfo.c.
3825 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3826
3827 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3828
3829 * server.c (skip_to_semicolon): Remove.
3830 (process_point_options): Use strchrnul instead of
3831 skip_to_semicolon.
3832
3833 2016-01-26 Yao Qi <yao.qi@linaro.org>
3834
3835 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3836 * linux-low.c (install_software_single_step_breakpoints): Don't
3837 call regcache_read_pc.
3838 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3839 argument pc.
3840
3841 2016-01-26 Yao Qi <yao.qi@linaro.org>
3842
3843 * linux-low.c (install_software_single_step_breakpoints): Call
3844 regcache_read_pc instead of get_pc.
3845
3846 2016-01-26 Yao Qi <yao.qi@linaro.org>
3847
3848 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3849 (unblock_async_io): Rename to ...
3850 (block_unblock_async_io): ... it. New function.
3851 (enable_async_io): Don't install SIGIO handler. Unblock it
3852 instead.
3853 (disable_async_io): Don't ignore SIGIO. Block it instead.
3854 (initialize_async_io): Install SIGIO handler. Don't call
3855 unblock_async_io.
3856
3857 2016-01-26 Yao Qi <yao.qi@linaro.org>
3858
3859 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3860 first character is '\003', call *the_target->request_interrupt.
3861
3862 2016-01-25 Yao Qi <yao.qi@linaro.org>
3863
3864 * remote-utils.c (new_thread_notify): Remove.
3865 (dead_thread_notify): Likewise.
3866 * remote-utils.h (new_thread_notify): Remove declaration.
3867 (dead_thread_notify): Likewise.
3868
3869 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3870
3871 * gdb.trace/pending.exp: Fix expected message on continue.
3872
3873 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3874
3875 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3876 it works properly on big-endian machines where sizeof (CORE_ADDR)
3877 != sizeof (void *).
3878
3879 2016-01-21 Pedro Alves <palves@redhat.com>
3880
3881 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3882 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3883 * configure: Regenerate.
3884
3885 2016-01-21 Yao Qi <yao.qi@linaro.org>
3886
3887 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3888 is_thumb and set it according to CPSR saved on the stack.
3889 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3890 arm_sigreturn_next_pc.
3891
3892 2016-01-18 Yao Qi <yao.qi@linaro.org>
3893
3894 * linux-low.c (linux_set_pc_64bit): New function.
3895 (linux_get_pc_64bit): New function.
3896 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3897 Declare.
3898 * linux-sparc-low.c (debug_threads): Remove declaration.
3899 (sparc_get_pc): Remove.
3900 (the_low_target): Use linux_get_pc_64bit instead of
3901 sparc_get_pc.
3902 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3903 (the_low_target): Use linux_get_pc_64bit and
3904 linux_set_pc_64bit.
3905
3906 2016-01-18 Yao Qi <yao.qi@linaro.org>
3907
3908 * linux-arm-low.c (debug_threads): Remove declaration.
3909 (arm_get_pc, arm_set_pc): Remove.
3910 (the_low_target): Use linux_get_pc_32bit and
3911 linux_set_pc_32bit.
3912 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3913 (the_low_target): Use linux_get_pc_32bit and
3914 linux_set_pc_32bit.
3915 * linux-cris-low.c (debug_threads): Remove declaration.
3916 (cris_get_pc, cris_set_pc,): Remove.
3917 (the_low_target): Use linux_get_pc_32bit and
3918 linux_set_pc_32bit.
3919 * linux-crisv32-low.c (debug_threads): Remove declaration.
3920 (cris_get_pc, cris_set_pc): Remove.
3921 (the_low_target): Use linux_get_pc_32bit and
3922 linux_set_pc_32bit.
3923 * linux-low.c: Include inttypes.h.
3924 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3925 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3926 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3927 (the_low_target): Use linux_get_pc_32bit and
3928 linux_set_pc_32bit.
3929 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3930 (the_low_target): Use linux_get_pc_32bit and
3931 linux_set_pc_32bit.
3932 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3933 (the_low_target): Use linux_get_pc_32bit and
3934 linux_set_pc_32bit.
3935 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3936 (the_low_target): Use linux_get_pc_32bit and
3937 linux_set_pc_32bit.
3938 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3939 (the_low_target): Use linux_get_pc_32bit and
3940 linux_set_pc_32bit.
3941
3942 2016-01-18 Gary Benson <gbenson@redhat.com>
3943
3944 * configure.ac (AC_FUNC_FORK): New check.
3945 * config.in: Regenerate.
3946 * configure: Likewise.
3947
3948 2016-01-14 Yao Qi <yao.qi@linaro.org>
3949
3950 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3951 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3952 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3953 arm_get_next_pcs_ctor.
3954
3955 2016-01-12 Josh Stone <jistone@redhat.com>
3956 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3957
3958 * inferiors.h: Include "gdb_vecs.h".
3959 (struct process_info): Add syscalls_to_catch.
3960 * inferiors.c (remove_process): Free syscalls_to_catch.
3961 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3962 syscall_return stops.
3963 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3964 * server.c (handle_general_set): Handle QCatchSyscalls.
3965 (handle_query): Report support for QCatchSyscalls.
3966 * target.h (struct target_ops): Add supports_catch_syscall.
3967 (target_supports_catch_syscall): New macro.
3968 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3969 (struct lwp_info): Add syscall_state.
3970 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3971 Maintain syscall_state and syscalls_to_catch across exec.
3972 (get_syscall_trapinfo): New function, proxy to the_low_target.
3973 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3974 (linux_low_filter_event): Toggle syscall_state entry/return for
3975 syscall traps, and set it ignored for all others.
3976 (gdb_catching_syscalls_p): New function.
3977 (gdb_catch_this_syscall_p): New function.
3978 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3979 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3980 (linux_supports_catch_syscall): New function.
3981 (linux_target_ops): Install it.
3982 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3983 (the_low_target): Install it.
3984
3985 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3986
3987 * acinclude.m4: Include new ../warning.m4 file.
3988 * configure: Regenerated.
3989 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3990
3991 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3992
3993 * ax.c (is_goto_target): Mark static.
3994 * linux-low.c (register_addr): Likewise.
3995 (linux_fetch_registers, linux_store_registers): Likewise.
3996 * mem-break.c (any_persistent_commands): Fix old prototype.
3997 (add_commands_to_breakpoint): Mark static.
3998 * regcache.c (find_register_by_name): Delete unused func.
3999 * remote-utils.c (hex_or_minus_one): Mark static.
4000 * server.c (monitor_show_help): Mark static.
4001 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4002 handle_v_requests): Likewise.
4003
4004 2016-01-12 Pedro Alves <palves@redhat.com>
4005
4006 Remove use of the registered trademark symbol throughout.
4007
4008 2016-01-08 Yao Qi <yao.qi@linaro.org>
4009
4010 * remote-utils.c (getpkt): If c is '\003', call target hook
4011 request_interrupt.
4012
4013 2016-01-06 Yao Qi <yao.qi@linaro.org>
4014
4015 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4016 linux-aarch32-low.c.
4017 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4018 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4019 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4020 (thumb2_breakpoint): Declare.
4021 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4022 linux-aarch32-low.h.
4023 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4024 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4025 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4026
4027 2016-01-01 Joel Brobecker <brobecker@adacore.com>
4028
4029 * gdbreplay.c (gdbreplay_version): Change copyright year in
4030 version message.
4031 * server.c (gdbserver_version): Likewise.
4032
4033 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4034
4035 * server.c (crc32_table): Delete.
4036 (crc32): Use libiberty's xcrc32 function.
4037
4038 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4039
4040 * lynx-low.c (lynx_delete_thread_callback): New function.
4041 (lynx_mourn): Properly delete our process and all of its
4042 threads. Remove call to clear_inferiors.
4043
4044 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4045
4046 * target.c (thread_search_callback): Add check that
4047 the thread_stopped target callback is not NULL before
4048 calling it.
4049
4050 2015-12-21 Yao Qi <yao.qi@linaro.org>
4051
4052 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4053 arm breakpoint.
4054
4055 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4056
4057 * server.c (handle_query): Call target_supports_software_single_step.
4058
4059 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4060
4061 * linux-low.c (single_step): New function.
4062 (linux_resume_one_lwp_throw): Call single_step.
4063 (start_step_over): Likewise.
4064
4065 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4066
4067 * Makefile.in (SFILES): Append arch/arm-linux.c,
4068 arch/arm-get-next-pcs.c.
4069 (arm-linux.o): New rule.
4070 (arm-get-next-pcs.o): New rule.
4071 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4072 arm-linux.o.
4073 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4074 to linux-aarch32-low.c.
4075 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4076 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4077 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4078 (thumb2_breakpoint_len): Likewise.
4079 (arm_is_thumb_mode): Make non-static.
4080 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4081 from linux-aarch32-low.c.
4082 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4083 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4084 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4085 (thumb2_breakpoint_len): Likewise.
4086 (arm_is_thumb_mode): New declaration.
4087 * linux-arm-low.c: Include arch/arm-linux.h
4088 aarch/arm-get-next-pcs.h, sys/syscall.h.
4089 (get_next_pcs_ops): New struct.
4090 (get_next_pcs_addr_bits_remove): New function.
4091 (get_next_pcs_is_thumb): New function.
4092 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4093 (arm_sigreturn_next_pc): Likewise.
4094 (get_next_pcs_syscall_next_pc): Likewise.
4095 (arm_gdbserver_get_next_pcs): Likewise.
4096 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4097 Initialize.
4098 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4099 * server.h: Include gdb_vecs.h.
4100
4101 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4102
4103 * Makefile.in (SFILES): Append common/common-regcache.c.
4104 (OBS): Append common-regcache.o.
4105 (common-regcache.o): New rule.
4106 * regcache.c (init_register_cache): Initialize cache to
4107 REG_UNAVAILABLE.
4108 (regcache_raw_read_unsigned): New function.
4109 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4110 register_status enum.
4111
4112 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4113
4114 * linux-aarch64-low.c (the_low_targets): Rename
4115 breakpoint_reinsert_addr to get_next_pcs.
4116 * linux-arm-low.c (the_low_targets): Likewise.
4117 * linux-bfin-low.c (the_low_targets): Likewise.
4118 * linux-cris-low.c (the_low_targets): Likewise.
4119 * linux-crisv32-low.c (the_low_targets): Likewise.
4120 * linux-low.c (can_software_single_step): Likewise.
4121 (install_software_single_step_breakpoints): New function.
4122 (start_step_over): Use install_software_single_step_breakpoints.
4123 * linux-low.h: New CORE_ADDR vector.
4124 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4125 get_next_pcs.
4126 * linux-mips-low.c (the_low_targets): Likewise.
4127 * linux-nios2-low.c (the_low_targets): Likewise.
4128 * linux-sparc-low.c (the_low_targets): Likewise.
4129
4130 2015-12-17 Pedro Alves <palves@redhat.com>
4131
4132 * linux-low.c (linux_kill_one_lwp): Remove references to
4133 LinuxThreads.
4134 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4135 to 'kill'.
4136 (linux_init_signals): Delete.
4137 (initialize_low): Adjust.
4138 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4139
4140 2015-12-16 Pedro Alves <palves@redhat.com>
4141
4142 * configure.ac (compiler warning flags): When testing a
4143 -Wno-foo option, check whether -Wfoo works instead.
4144 * configure: Regenerate.
4145
4146 2015-12-11 Don Breazeal <donb@codesourcery.com>
4147
4148 * server.c (process_serial_event): Don't exit from gdbserver
4149 in remote mode if there are still active inferiors.
4150
4151 2015-12-11 Yao Qi <yao.qi@linaro.org>
4152
4153 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4154 arm_breakpoint_at if the process is 32-bit.
4155
4156 2015-12-11 Yao Qi <yao.qi@linaro.org>
4157
4158 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4159 arm breakpoint.
4160
4161 2015-12-07 Yao Qi <yao.qi@linaro.org>
4162
4163 * configure.srv: Append arm.o to srv_tgtobj for
4164 aarch64*-*-linux* target.
4165 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4166 from linux-arm-low.c.
4167 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4168 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4169 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4170 (thumb2_breakpoint_len): Likewise.
4171 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4172 (arm_breakpoint_kinds): Likewise.
4173 (arm_breakpoint_kind_from_pc): Likewise.
4174 (arm_sw_breakpoint_from_kind): Likewise.
4175 (arm_breakpoint_kind_from_current_state): Likewise.
4176 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4177 (arm_sw_breakpoint_from_kind): Declare.
4178 (arm_breakpoint_kind_from_current_state): Declare.
4179 (arm_breakpoint_at): Declare.
4180 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4181 arm_sw_breakpoint_from_kind if process is 32-bit.
4182 (aarch64_breakpoint_kind_from_pc): New function.
4183 (aarch64_breakpoint_kind_from_current_state): New function.
4184 (the_low_target): Initialize fields breakpoint_kind_from_pc
4185 and breakpoint_kind_from_current_state.
4186 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4187 linux-aarch32-low.c.
4188 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4189 (arm_breakpoint, arm_breakpoint_len): Likewise.
4190 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4191 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4192 (arm_is_thumb_mode): Likewise.
4193 (arm_breakpoint_at): Likewise.
4194 (arm_breakpoint_kind_from_pc): Likewise.
4195 (arm_sw_breakpoint_from_kind): Likewise.
4196 (arm_breakpoint_kind_from_current_state): Likewise.
4197
4198 Revert:
4199 2015-08-04 Yao Qi <yao.qi@linaro.org>
4200
4201 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4202 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4203 * server.c (extended_protocol): Remove "static".
4204 * server.h (extended_protocol): Declare it.
4205
4206 2015-12-04 Josh Stone <jistone@redhat.com>
4207
4208 * target.h (struct target_ops) <arch_setup>: Rename to ...
4209 (struct target_ops) <post_create_inferior>: ... this.
4210 (target_arch_setup): Rename to ...
4211 (target_post_create_inferior): ... this, calling post_create_inferior.
4212 * server.c (start_inferior): Update target_arch_setup calls to
4213 target_post_create_inferior.
4214 * linux-low.c (linux_low_ptrace_options): Forward declare.
4215 (linux_arch_setup): Update its comment for general use.
4216 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4217 (struct linux_target_ops): Use linux_post_create_inferior.
4218 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4219 to post_create_inferior.
4220 * nto-low.c (struct nto_target_ops): Likewise.
4221 * spu-low.c (struct spu_target_ops): Likewise.
4222 * win32-low.c (struct win32_target_ops): Likewise.
4223
4224 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4225
4226 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4227
4228 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4229
4230 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4231 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4232 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4233 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4234 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4235 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4236 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4237 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4238 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4239 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4240 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4241 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4242
4243 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4244
4245 * linux-low.c (linux_look_up_symbols): Don't call
4246 linux_supports_traceclone.
4247 * linux-low.h (thread_db_init): Remove use_events argument.
4248 * thread-db.c (thread_db_use_event): Remove global variable.
4249 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4250 (struct thread_db) <td_create_bp>: Remove field.
4251 (thread_db_create_event): Remove function.
4252 (thread_db_enable_reporting): Likewise.
4253 (find_one_thread): Don't check for thread_db_use_events.
4254 (attach_thread): Likewise.
4255 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4256 (try_thread_db_load_1): Don't check for thread_db_use_events.
4257 (thread_db_init): Remove use_events argument and thread events
4258 handling.
4259 (remove_thread_event_breakpoints): Remove function.
4260 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4261
4262 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4263
4264 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4265 New function.
4266 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4267 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4268 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4269 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4270 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4271 Initialize.
4272 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4273 New function.
4274 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4275 * linux-low.c (can_hardware_single_step): Use
4276 supports_hardware_single_step.
4277 (can_software_single_step): New function.
4278 (start_step_over): Call can_software_single_step.
4279 (linux_supports_hardware_single_step): New function.
4280 (struct target_ops) <supports_software_single_step>: Initialize.
4281 * linux-low.h (struct linux_target_ops)
4282 <supports_hardware_single_step>: Initialize.
4283 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4284 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4285 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4286 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4287 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4288 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4289 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4290 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4291 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4292 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4293 Initialize.
4294 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4295 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4296 Initialize.
4297 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4298 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4299 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4300 New function.
4301 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4302 * target.h (struct target_ops): <supports_software_single_step>:
4303 New field.
4304 (target_supports_software_single_step): New macro.
4305
4306 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4307
4308 * linux-low.c (linux_wait_1): Fix pc advance condition.
4309 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4310 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4311
4312 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4313
4314 * linux-arm-low.c (arm_is_thumb_mode): New function.
4315 (arm_breakpoint_at): Use arm_is_thumb_mode.
4316 (arm_breakpoint_kind_from_current_state): New function.
4317 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4318 Initialize.
4319 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4320 (linux_breakpoint_kind_from_current_state): New function.
4321 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4322 * linux-low.h (struct linux_target_ops)
4323 <breakpoint_kind_from_current_state>: New field.
4324 * target.h (struct target_ops): Likewise.
4325 (target_breakpoint_kind_from_current_state): New macro.
4326
4327 2015-11-30 Pedro Alves <palves@redhat.com>
4328
4329 * linux-low.c (linux_resume): Wake up the event loop before
4330 returning.
4331
4332 2015-11-30 Pedro Alves <palves@redhat.com>
4333
4334 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4335 check.
4336 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4337 to -1.
4338 * target.c (struct thread_search): New structure.
4339 (thread_search_callback): New function.
4340 (prev_general_thread): New global.
4341 (prepare_to_access_memory, done_accessing_memory): New functions.
4342 * target.h (prepare_to_access_memory, done_accessing_memory):
4343 Replace macros with function declarations.
4344
4345 2015-11-30 Pedro Alves <palves@redhat.com>
4346
4347 PR 14618
4348 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4349 report TARGET_WAITKIND_NO_RESUMED.
4350 * remote-utils.c (prepare_resume_reply): Handle
4351 TARGET_WAITKIND_NO_RESUMED.
4352 * server.c (report_no_resumed): New global.
4353 (handle_query) <qSupported>: Handle "no-resumed+". Report
4354 "no-resumed+" support.
4355 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4356 return error if the client doesn't support no-resumed events.
4357 (push_stop_notification): New function.
4358 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4359 events if the client supports them.
4360
4361 2015-11-30 Pedro Alves <palves@redhat.com>
4362
4363 * linux-low.c (thread_still_has_status_pending_p): Don't check
4364 vCont;t here.
4365 (lwp_resumed): New function.
4366 (status_pending_p_callback): Return early if the LWP is not
4367 supposed to be resumed.
4368
4369 2015-11-30 Pedro Alves <palves@redhat.com>
4370
4371 * linux-low.c (handle_extended_wait): Assert that the LWP's
4372 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4373 thread create events, leave the new child's status pending.
4374 (linux_low_filter_event): If GDB wants to hear about thread exit
4375 events, leave the LWP marked dead and don't delete it.
4376 (linux_wait_for_event_filtered): Don't check for thread exit.
4377 (filter_exit_event): New function.
4378 (linux_wait_1): Use it, when returning an exit event.
4379 (linux_resume_one_lwp_throw): Assert that the LWP's
4380 waitstatus is TARGET_WAITKIND_IGNORE.
4381 * remote-utils.c (prepare_resume_reply): Handle
4382 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4383 * server.c (report_thread_events): New global.
4384 (handle_general_set): Handle QThreadEvents.
4385 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4386 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4387 TARGET_WAITKIND_THREAD_EXITED.
4388 * server.h (report_thread_events): Declare.
4389
4390 2015-11-30 Pedro Alves <palves@redhat.com>
4391
4392 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4393 the thread's last_resume_kind was resume_stop.
4394
4395 2015-11-30 Pedro Alves <palves@redhat.com>
4396
4397 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4398 before returning.
4399
4400 2015-11-30 Pedro Alves <palves@redhat.com>
4401
4402 * server.c (handle_v_requests): Handle vCtrlC.
4403
4404 2015-11-30 Pedro Alves <palves@redhat.com>
4405
4406 * gdbthread.h (find_any_thread_of_pid): Declare.
4407 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4408 functions.
4409 * server.c (handle_query): If current_thread is NULL, look for
4410 another thread of the selected process.
4411
4412 2015-11-26 Daniel Colascione <dancol@dancol.org>
4413 Simon Marchi <simon.marchi@ericsson.com>
4414
4415 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4416 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4417 name in reply.
4418 * target.h (struct target_ops) <thread_name>: New field.
4419 (target_thread_name): New macro.
4420
4421 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4422
4423 * regcache.h (regcache_invalidate_pid): Add declaration.
4424 * regcache.c (regcache_invalidate_pid): New function, extracted
4425 from regcache_invalidate.
4426 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4427 Add trivial documentation comment.
4428 * lynx-low.c: Use regcache_invalidate_pid instead of
4429 regcache_invalidate.
4430
4431 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4432
4433 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4434 and Elf64_auxv_t if the target is Android.
4435
4436 2015-11-22 Doug Evans <xdje42@gmail.com>
4437
4438 * target.h: #include <sys/types.h>.
4439
4440 2015-11-19 Pedro Alves <palves@redhat.com>
4441
4442 * linux-low.c (linux_process_qsupported): Change prototype.
4443 Adjust.
4444 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4445 Change prototype.
4446 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4447 and adjust to loop over all features.
4448 * server.c (handle_query) <qSupported>: Adjust to call
4449 target_process_qsupported once, passing it a vector of unprocessed
4450 features.
4451 * target.h (struct target_ops) <process_qsupported>: Change
4452 prototype.
4453 (target_process_qsupported): Adjust.
4454
4455 2015-11-19 Pedro Alves <palves@redhat.com>
4456
4457 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4458 mode.
4459 * configure: Regenerate.
4460
4461 2015-11-19 Pedro Alves <palves@redhat.com>
4462
4463 * configure: Regenerate.
4464
4465 2015-11-19 Yao Qi <yao.qi@linaro.org>
4466
4467 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4468 type to uint32_t.
4469
4470 2015-11-19 Yao Qi <yao.qi@linaro.org>
4471
4472 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4473 (struct aarch64_operand): Move enum out.
4474
4475 2015-11-19 Yao Qi <yao.qi@linaro.org>
4476
4477 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4478 struct user_fpsimd_state *.
4479 (aarch64_store_fpregset): Likewise.
4480
4481 2015-11-19 Yao Qi <yao.qi@linaro.org>
4482
4483 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4484 struct user_pt_regs *.
4485 (aarch64_store_gregset): Likewise.
4486
4487 2015-11-18 Pedro Alves <palves@redhat.com>
4488
4489 * Makefile.in (all_object_files): Add $IPA_OBJS.
4490
4491 2015-11-17 Pedro Alves <palves@redhat.com>
4492
4493 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4494 GDB_SIGNAL_0 and gdb_signal_to_string.
4495
4496 2015-11-17 Pedro Alves <palves@redhat.com>
4497
4498 * win32-low.c (handle_output_debug_string): Remove parameter.
4499 (win32_kill): Remove our_status local and adjust call to
4500 handle_output_debug_string.
4501 (get_child_debug_event): Adjust call to
4502 handle_output_debug_string.
4503
4504 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4505
4506 * linux-mips-low.c (mips_fill_gregset): Add cast.
4507 (mips_store_gregset): Likewise.
4508 (mips_fill_fpregset): Likewise.
4509 (mips_store_fpregset): Likewise.
4510
4511 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4512
4513 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4514 priv.
4515
4516 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4517
4518 * linux-mips-low.c (mips_linux_new_thread): Change type of
4519 watch_type to enum target_hw_bp_type.
4520
4521 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4522
4523 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4524 Change return type to arm_hwbp_type.
4525
4526 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4527
4528 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4529 (arm_store_gregset): Likewise.
4530 * linux-arm-low.c (arm_get_hwcap): Likewise.
4531 (arm_read_description): Likewise.
4532
4533 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4534
4535 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4536
4537 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4538
4539 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4540 (ppc_fill_vsxregset): Likewise.
4541 (ppc_store_vsxregset): Likewise.
4542 (ppc_fill_vrregset): Likewise.
4543 (ppc_store_vrregset): Likewise.
4544 (ppc_fill_evrregset): Likewise.
4545 (ppc_store_evrregset): Likewise.
4546
4547 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4548
4549 * linux-ppc-low.c (ppc_usrregs_info): Remove
4550 forward-declaration.
4551 (ppc_arch_setup): Move lower in file.
4552
4553 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4554
4555 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4556 (ps_pdwrite): Likewise.
4557
4558 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4559
4560 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4561 to after assert checks.
4562
4563 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4564
4565 * proc-service.c (ps_pdread): Add/adjust casts.
4566 (ps_pdwrite): Add/adjust casts.
4567
4568 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4569
4570 * server.c (handle_search_memory_1): Cast return value of
4571 memmem.
4572
4573 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4574
4575 * server.c (write_qxfer_response): Change type of data to
4576 gdb_byte *.
4577
4578 2015-10-29 Pedro Alves <palves@redhat.com>
4579
4580 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4581
4582 2015-10-29 Pedro Alves <palves@redhat.com>
4583
4584 * tracepoint.c (clear_installed_tracepoints): Add casts.
4585
4586 2015-10-29 Pedro Alves <palves@redhat.com>
4587
4588 * server.c (handle_v_cont, process_serial_event): Add enum
4589 gdb_signal casts to signal parsing code.
4590
4591 2015-10-29 Pedro Alves <palves@redhat.com>
4592
4593 * linux-low.h (NULL_REGSET): Define.
4594 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4595 * linux-arm-low.c (arm_regsets): Likewise.
4596 * linux-crisv32-low.c (cris_regsets): Likewise.
4597 * linux-m68k-low.c (m68k_regsets): Likewise.
4598 * linux-mips-low.c (mips_regsets): Likewise.
4599 * linux-nios2-low.c (nios2_regsets): Likewise.
4600 * linux-ppc-low.c (ppc_regsets): Likewise.
4601 * linux-s390-low.c (s390_regsets): Likewise.
4602 * linux-sh-low.c (sh_regsets): Likewise.
4603 * linux-sparc-low.c (sparc_regsets): Likewise.
4604 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4605 * linux-tile-low.c (tile_regsets): Likewise.
4606 * linux-x86-low.c (x86_regsets): Likewise.
4607 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4608
4609 2015-10-29 Pedro Alves <palves@redhat.com>
4610
4611 * linux-low.h (NULL_REGSET): Define.
4612 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4613 * linux-arm-low.c (arm_regsets): Likewise.
4614 * linux-crisv32-low.c (cris_regsets): Likewise.
4615 * linux-m68k-low.c (m68k_regsets): Likewise.
4616 * linux-mips-low.c (mips_regsets): Likewise.
4617 * linux-nios2-low.c (nios2_regsets): Likewise.
4618 * linux-ppc-low.c (ppc_regsets): Likewise.
4619 * linux-s390-low.c (s390_regsets): Likewise.
4620 * linux-sh-low.c (sh_regsets): Likewise.
4621 * linux-sparc-low.c (sparc_regsets): Likewise.
4622 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4623 * linux-tile-low.c (tile_regsets): Likewise.
4624 * linux-x86-low.c (x86_regsets): Likewise.
4625 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4626
4627 2015-10-26 Doug Evans <dje@google.com>
4628
4629 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4630
4631 2015-10-26 Doug Evans <dje@google.com>
4632
4633 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4634
4635 2015-10-26 Doug Evans <dje@google.com>
4636
4637 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4638 for debug_printf.
4639 (attach_thread, find_new_threads_callback): Ditto.
4640
4641 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4642
4643 * mem-break.h (set_breakpoint_data): Remove.
4644
4645 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4646
4647 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4648 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4649 (initialize_low): Remove set_breakpoint_data call.
4650 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4651 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4652 (initialize_low): Remove set_breakpoint_data call.
4653 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4654 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4655 (initialize_low): Remove set_breakpoint_data call.
4656
4657 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4658
4659 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4660 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4661 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4662 * target.h (target_breakpoint_kind_from_pc): New macro.
4663
4664 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4665
4666 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4667 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4668 the default breakpoint kind.
4669
4670 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4671
4672 * linux-arm-low.c (arm_supports_z_point_type): Add software
4673 breakpoint support.
4674
4675 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4676
4677 * linux-arm-low.c: Refactor breakpoint definitions.
4678 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4679 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4680
4681 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4682
4683 * Makefile.in: Add arm.c/o.
4684 * configure.srv: Likewise.
4685 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4686 (arm_breakpoint_kind_from_pc): New function.
4687 (arm_sw_breakpoint_from_kind): Return proper kind.
4688 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4689
4690 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4691
4692 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4693 removal.
4694 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4695 (struct raw_breakpoint) <size>: Remove.
4696 (struct raw_breakpoint) <kind>: Add.
4697 (bp_size): New function.
4698 (bp_opcode): Likewise.
4699 (find_raw_breakpoint_at): Adjust for kind.
4700 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4701 (remove_memory_breakpoint): Adjust for kind call bp_size.
4702 (set_raw_breakpoint_at): Adjust for kind.
4703 (set_breakpoint): Likewise.
4704 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4705 (delete_raw_breakpoint): Adjust for kind.
4706 (delete_breakpoint): Likewise.
4707 (find_gdb_breakpoint): Likewise.
4708 (set_gdb_breakpoint_1): Likewise.
4709 (set_gdb_breakpoint): Likewise.
4710 (delete_gdb_breakpoint_1): Likewise.
4711 (delete_gdb_breakpoint): Likewise.
4712 (uninsert_raw_breakpoint): Likewise.
4713 (reinsert_raw_breakpoint): Likewise.
4714 (set_breakpoint_data): Remove.
4715 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4716 (check_mem_read): Adjust for kind call bp_size.
4717 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4718 (clone_one_breakpoint): Adjust for kind.
4719 * mem-break.h (set_gdb_breakpoint): Likewise.
4720 (delete_gdb_breakpoint): Likewise.
4721 * server.c (process_serial_event): Likewise.
4722
4723 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4724
4725 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4726 (struct linux_target_ops) <breakpoint>: Remove.
4727 (struct linux_target_ops) <breakpoint_len>: Remove.
4728 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4729 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4730 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4731 (arm_sw_breakpoint_from_kind): New function.
4732 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4733 (struct linux_target_ops) <breakpoint>: Remove.
4734 (struct linux_target_ops) <breakpoint_len>: Remove.
4735 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4736 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4737 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4738 (struct linux_target_ops) <breakpoint>: Remove.
4739 (struct linux_target_ops) <breakpoint_len>: Remove.
4740 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4741 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4742 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4743 (struct linux_target_ops) <breakpoint>: Remove.
4744 (struct linux_target_ops) <breakpoint_len>: Remove.
4745 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4746 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4747 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4748 and sw_breakpoint_from_kind to increment the pc.
4749 (linux_breakpoint_kind_from_pc): New function.
4750 (linux_sw_breakpoint_from_kind): New function.
4751 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4752 (initialize_low): Call breakpoint_kind_from_pc and
4753 sw_breakpoint_from_kind to replace breakpoint_data/len.
4754 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4755 New field.
4756 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4757 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4758 (struct linux_target_ops) <breakpoint>: Remove.
4759 (struct linux_target_ops) <breakpoint_len>: Remove.
4760 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4761 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4762 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4763 (struct linux_target_ops) <breakpoint>: Remove.
4764 (struct linux_target_ops) <breakpoint_len>: Remove.
4765 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4766 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4767 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4768 (struct linux_target_ops) <breakpoint>: Remove.
4769 (struct linux_target_ops) <breakpoint_len>: Remove.
4770 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4771 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4772 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4773 (struct linux_target_ops) <breakpoint>: Remove.
4774 (struct linux_target_ops) <breakpoint_len>: Remove.
4775 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4776 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4777 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4778 (struct linux_target_ops) <breakpoint>: Remove.
4779 (struct linux_target_ops) <breakpoint_len>: Remove.
4780 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4781 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4782 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4783 (struct linux_target_ops) <breakpoint>: Remove.
4784 (struct linux_target_ops) <breakpoint_len>: Remove.
4785 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4786 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4787 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4788 (struct linux_target_ops) <breakpoint>: Remove.
4789 (struct linux_target_ops) <breakpoint_len>: Remove.
4790 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4791 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4792 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4793 (struct linux_target_ops) <breakpoint>: Remove.
4794 (struct linux_target_ops) <breakpoint_len>: Remove.
4795 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4796 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4797 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4798 (struct linux_target_ops) <breakpoint>: Remove.
4799 (struct linux_target_ops) <breakpoint_len>: Remove.
4800 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4801 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4802 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4803 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4804 (struct linux_target_ops) <breakpoint>: Remove.
4805 (struct linux_target_ops) <breakpoint_len>: Remove.
4806 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4807 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4808 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4809 (struct linux_target_ops) <breakpoint>: Remove.
4810 (struct linux_target_ops) <breakpoint_len>: Remove.
4811 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4812 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4813
4814 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4815
4816 * linux-cris-low.c (cris_get_pc): Remove void arg.
4817
4818 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4819
4820 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4821 variable name.
4822
4823 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4824
4825 * inferiors.c (thread_pid_matches_callback): New function.
4826 (find_thread_process): New function.
4827 (remove_thread): Reset current_thread.
4828 (remove_process): Assert threads have been removed first.
4829
4830 2015-10-15 Yao Qi <yao.qi@linaro.org>
4831
4832 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4833 if it is 3.
4834 (aarch64_remove_point): Likewise.
4835 * regcache.c (regcache_register_size): New function.
4836
4837 2015-10-12 Yao Qi <yao.qi@linaro.org>
4838
4839 * linux-aarch64-low.c: Update all callers as emit_load_store
4840 is renamed to aarch64_emit_load_store.
4841
4842 2015-10-12 Yao Qi <yao.qi@linaro.org>
4843
4844 * linux-aarch64-low.c: Update all callers of function renaming
4845 from emit_insn to aarch64_emit_insn.
4846
4847 2015-10-12 Yao Qi <yao.qi@linaro.org>
4848
4849 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4850 arch/aarch64-insn.h.
4851 (struct aarch64_memory_operand): Likewise.
4852 (ENCODE): Likewise.
4853 (emit_insn): Move to arch/aarch64-insn.c.
4854 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4855 (emit_load_store): Move to arch/aarch64-insn.c.
4856 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4857 (can_encode_int32): Remove.
4858
4859 2015-10-12 Yao Qi <yao.qi@linaro.org>
4860
4861 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4862 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4863 (aarch64_relocate_instruction): Likewise.
4864 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4865 (struct aarch64_insn_visitor): Likewise.
4866
4867 2015-10-12 Yao Qi <yao.qi@linaro.org>
4868
4869 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4870 (struct aarch64_insn_visitor): New.
4871 (struct aarch64_insn_relocation_data): New.
4872 (aarch64_ftrace_insn_reloc_b): New function.
4873 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4874 (aarch64_ftrace_insn_reloc_cb): Likewise.
4875 (aarch64_ftrace_insn_reloc_tb): Likewise.
4876 (aarch64_ftrace_insn_reloc_adr): Likewise.
4877 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4878 (aarch64_ftrace_insn_reloc_others): Likewise.
4879 (visitor): New.
4880 (aarch64_relocate_instruction): Use visitor.
4881
4882 2015-10-12 Yao Qi <yao.qi@linaro.org>
4883
4884 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4885 int. Add argument buf.
4886 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4887 aarch64_relocate_instruction.
4888
4889 2015-10-12 Yao Qi <yao.qi@linaro.org>
4890
4891 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4892 argument insn. Remove local variable insn. Don't call
4893 target_read_uint32.
4894 (aarch64_install_fast_tracepoint_jump_pad): Call
4895 target_read_uint32.
4896
4897 2015-09-30 Yao Qi <yao.qi@linaro.org>
4898
4899 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4900 (emit_load_store_pair): Likewise.
4901
4902 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4903
4904 * dll.c (match_dll): Add cast(s).
4905 (unloaded_dll): Likewise.
4906 * linux-low.c (second_thread_of_pid_p): Likewise.
4907 (delete_lwp_callback): Likewise.
4908 (count_events_callback): Likewise.
4909 (select_event_lwp_callback): Likewise.
4910 (linux_set_resume_request): Likewise.
4911 * server.c (accumulate_file_name_length): Likewise.
4912 (emit_dll_description): Likewise.
4913 (handle_qxfer_threads_worker): Likewise.
4914 (visit_actioned_threads): Likewise.
4915 * thread-db.c (any_thread_of): Likewise.
4916 * tracepoint.c (same_process_p): Likewise.
4917 (match_blocktype): Likewise.
4918 (build_traceframe_info_xml): Likewise.
4919
4920 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4921
4922 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4923 assignment.
4924 (gdb_unparse_agent_expr): Likewise.
4925 * hostio.c (require_data): Likewise.
4926 (handle_pread): Likewise.
4927 * linux-low.c (disable_regset): Likewise.
4928 (fetch_register): Likewise.
4929 (store_register): Likewise.
4930 (get_dynamic): Likewise.
4931 (linux_qxfer_libraries_svr4): Likewise.
4932 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4933 (set_fast_tracepoint_jump): Likewise.
4934 (uninsert_fast_tracepoint_jumps_at): Likewise.
4935 (reinsert_fast_tracepoint_jumps_at): Likewise.
4936 (validate_inserted_breakpoint): Likewise.
4937 (clone_agent_expr): Likewise.
4938 * regcache.c (init_register_cache): Likewise.
4939 * remote-utils.c (putpkt_binary_1): Likewise.
4940 (decode_M_packet): Likewise.
4941 (decode_X_packet): Likewise.
4942 (look_up_one_symbol): Likewise.
4943 (relocate_instruction): Likewise.
4944 (monitor_output): Likewise.
4945 * server.c (handle_search_memory): Likewise.
4946 (handle_qxfer_exec_file): Likewise.
4947 (handle_qxfer_libraries): Likewise.
4948 (handle_qxfer): Likewise.
4949 (handle_query): Likewise.
4950 (handle_v_cont): Likewise.
4951 (handle_v_run): Likewise.
4952 (captured_main): Likewise.
4953 * target.c (write_inferior_memory): Likewise.
4954 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4955 * tracepoint.c (init_trace_buffer): Likewise.
4956 (add_tracepoint_action): Likewise.
4957 (add_traceframe): Likewise.
4958 (add_traceframe_block): Likewise.
4959 (cmd_qtdpsrc): Likewise.
4960 (cmd_qtdv): Likewise.
4961 (cmd_qtstatus): Likewise.
4962 (response_source): Likewise.
4963 (response_tsv): Likewise.
4964 (cmd_qtnotes): Likewise.
4965 (gdb_collect): Likewise.
4966 (initialize_tracepoint): Likewise.
4967
4968 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4969
4970 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4971 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4972 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4973 <NOP>: New.
4974 (enum aarch64_condition_codes): New enum.
4975 (w0): New static global.
4976 (fp): Likewise.
4977 (lr): Likewise.
4978 (struct aarch64_memory_operand) <type>: New
4979 MEMORY_OPERAND_POSTINDEX type.
4980 (postindex_memory_operand): New helper function.
4981 (emit_ret): New function.
4982 (emit_load_store_pair): New function, factored out of emit_stp
4983 with support for MEMORY_OPERAND_POSTINDEX.
4984 (emit_stp): Rewrite using emit_load_store_pair.
4985 (emit_ldp): New function.
4986 (emit_load_store): Likewise.
4987 (emit_ldr): Mention post-index instruction in comment.
4988 (emit_ldrh): New function.
4989 (emit_ldrb): New function.
4990 (emit_ldrsw): Mention post-index instruction in comment.
4991 (emit_str): Likewise.
4992 (emit_subs): New function.
4993 (emit_cmp): Likewise.
4994 (emit_and): Likewise.
4995 (emit_orr): Likewise.
4996 (emit_orn): Likewise.
4997 (emit_eor): Likewise.
4998 (emit_mvn): Likewise.
4999 (emit_lslv): Likewise.
5000 (emit_lsrv): Likewise.
5001 (emit_asrv): Likewise.
5002 (emit_mul): Likewise.
5003 (emit_sbfm): Likewise.
5004 (emit_sbfx): Likewise.
5005 (emit_ubfm): Likewise.
5006 (emit_ubfx): Likewise.
5007 (emit_csinc): Likewise.
5008 (emit_cset): Likewise.
5009 (emit_nop): Likewise.
5010 (emit_ops_insns): New helper function.
5011 (emit_pop): Likewise.
5012 (emit_push): Likewise.
5013 (aarch64_emit_prologue): New function.
5014 (aarch64_emit_epilogue): Likewise.
5015 (aarch64_emit_add): Likewise.
5016 (aarch64_emit_sub): Likewise.
5017 (aarch64_emit_mul): Likewise.
5018 (aarch64_emit_lsh): Likewise.
5019 (aarch64_emit_rsh_signed): Likewise.
5020 (aarch64_emit_rsh_unsigned): Likewise.
5021 (aarch64_emit_ext): Likewise.
5022 (aarch64_emit_log_not): Likewise.
5023 (aarch64_emit_bit_and): Likewise.
5024 (aarch64_emit_bit_or): Likewise.
5025 (aarch64_emit_bit_xor): Likewise.
5026 (aarch64_emit_bit_not): Likewise.
5027 (aarch64_emit_equal): Likewise.
5028 (aarch64_emit_less_signed): Likewise.
5029 (aarch64_emit_less_unsigned): Likewise.
5030 (aarch64_emit_ref): Likewise.
5031 (aarch64_emit_if_goto): Likewise.
5032 (aarch64_emit_goto): Likewise.
5033 (aarch64_write_goto_address): Likewise.
5034 (aarch64_emit_const): Likewise.
5035 (aarch64_emit_call): Likewise.
5036 (aarch64_emit_reg): Likewise.
5037 (aarch64_emit_pop): Likewise.
5038 (aarch64_emit_stack_flush): Likewise.
5039 (aarch64_emit_zero_ext): Likewise.
5040 (aarch64_emit_swap): Likewise.
5041 (aarch64_emit_stack_adjust): Likewise.
5042 (aarch64_emit_int_call_1): Likewise.
5043 (aarch64_emit_void_call_2): Likewise.
5044 (aarch64_emit_eq_goto): Likewise.
5045 (aarch64_emit_ne_goto): Likewise.
5046 (aarch64_emit_lt_goto): Likewise.
5047 (aarch64_emit_le_goto): Likewise.
5048 (aarch64_emit_gt_goto): Likewise.
5049 (aarch64_emit_ge_got): Likewise.
5050 (aarch64_emit_ops_impl): New static global variable.
5051 (aarch64_emit_ops): New target function, return
5052 &aarch64_emit_ops_impl.
5053 (struct linux_target_ops): Install it.
5054
5055 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5056
5057 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5058 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5059 aarch64-ipa.o.
5060 * linux-aarch64-ipa.c: New file.
5061 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5062 and endian.h.
5063 (aarch64_get_thread_area): New target method.
5064 (extract_signed_bitfield): New helper function.
5065 (aarch64_decode_ldr_literal): New function.
5066 (enum aarch64_opcodes): New enum.
5067 (struct aarch64_register): New struct.
5068 (struct aarch64_operand): New struct.
5069 (x0): New static global.
5070 (x1): Likewise.
5071 (x2): Likewise.
5072 (x3): Likewise.
5073 (x4): Likewise.
5074 (w2): Likewise.
5075 (ip0): Likewise.
5076 (sp): Likewise.
5077 (xzr): Likewise.
5078 (aarch64_register): New helper function.
5079 (register_operand): Likewise.
5080 (immediate_operand): Likewise.
5081 (struct aarch64_memory_operand): New struct.
5082 (offset_memory_operand): New helper function.
5083 (preindex_memory_operand): Likewise.
5084 (enum aarch64_system_control_registers): New enum.
5085 (ENCODE): New macro.
5086 (emit_insn): New helper function.
5087 (emit_b): New function.
5088 (emit_bcond): Likewise.
5089 (emit_cb): Likewise.
5090 (emit_tb): Likewise.
5091 (emit_blr): Likewise.
5092 (emit_stp): Likewise.
5093 (emit_ldp_q_offset): Likewise.
5094 (emit_stp_q_offset): Likewise.
5095 (emit_load_store): Likewise.
5096 (emit_ldr): Likewise.
5097 (emit_ldrsw): Likewise.
5098 (emit_str): Likewise.
5099 (emit_ldaxr): Likewise.
5100 (emit_stxr): Likewise.
5101 (emit_stlr): Likewise.
5102 (emit_data_processing_reg): Likewise.
5103 (emit_data_processing): Likewise.
5104 (emit_add): Likewise.
5105 (emit_sub): Likewise.
5106 (emit_mov): Likewise.
5107 (emit_movk): Likewise.
5108 (emit_mov_addr): Likewise.
5109 (emit_mrs): Likewise.
5110 (emit_msr): Likewise.
5111 (emit_sevl): Likewise.
5112 (emit_wfe): Likewise.
5113 (append_insns): Likewise.
5114 (can_encode_int32_in): New helper function.
5115 (aarch64_relocate_instruction): New function.
5116 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5117 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5118 (struct linux_target_ops): Install aarch64_get_thread_area,
5119 aarch64_install_fast_tracepoint_jump_pad and
5120 aarch64_get_min_fast_tracepoint_insn_len.
5121
5122 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5123
5124 * Makefile.in (aarch64-insn.o): New rule.
5125 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5126
5127 2015-09-21 Yao Qi <yao.qi@linaro.org>
5128
5129 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5130
5131 2015-09-21 Yao Qi <yao.qi@linaro.org>
5132
5133 * tracepoint.c (max_jump_pad_size): Remove.
5134
5135 2015-09-18 Yao Qi <yao.qi@linaro.org>
5136
5137 * linux-aarch64-low.c: Don't include sys/uio.h.
5138 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5139
5140 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5141
5142 * tracepoint.c (eval_result_type): Change prototype.
5143 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5144
5145 2015-09-15 Pedro Alves <palves@redhat.com>
5146
5147 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5148 Check whether to report exec events instead of checking whether
5149 multiprocess is enabled.
5150
5151 2015-09-15 Pedro Alves <palves@redhat.com>
5152
5153 PR remote/18965
5154 * remote-utils.c (prepare_resume_reply): Merge
5155 TARGET_WAITKIND_VFORK_DONE switch case with the
5156 TARGET_WAITKIND_FORKED case.
5157
5158 2015-09-15 Yao Qi <yao.qi@linaro.org>
5159
5160 * server.c (handle_query): Check string comparison using
5161 "else if" instead of "if".
5162
5163 2015-09-15 Yao Qi <yao.qi@linaro.org>
5164
5165 * server.c (vCont_supported): New global variable.
5166 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5167 matches. Append ";vContSupported+" to own_buf.
5168 (handle_v_requests): Append ";s;S" to own_buf if target supports
5169 hardware single step or vCont_supported is false.
5170 (capture_main): Set vCont_supported to zero.
5171
5172 2015-09-15 Yao Qi <yao.qi@linaro.org>
5173
5174 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5175 it to ...
5176 (linux_supports_hardware_single_step): ... New function.
5177 (linux_target_ops): Update.
5178 * lynx-low.c (lynx_target_ops): Set field
5179 supports_hardware_single_step to target_can_do_hardware_single_step.
5180 * nto-low.c (nto_target_ops): Likewise.
5181 * spu-low.c (spu_target_ops): Likewise.
5182 * win32-low.c (win32_target_ops): Likewise.
5183 * target.c (target_can_do_hardware_single_step): New function.
5184 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5185 Remove. <supports_hardware_single_step>: New field.
5186 (target_supports_conditional_breakpoints): Remove.
5187 (target_supports_hardware_single_step): New macro.
5188 (target_can_do_hardware_single_step): Declare.
5189 * server.c (handle_query): Use target_supports_hardware_single_step
5190 instead of target_supports_conditional_breakpoints.
5191
5192 2015-09-15 Yao Qi <yao.qi@linaro.org>
5193
5194 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5195 function.
5196 (struct linux_target_ops the_low_target): Install
5197 aarch64_linux_siginfo_fixup.
5198
5199 2015-09-11 Don Breazeal <donb@codesourcery.com>
5200 Luis Machado <lgustavo@codesourcery.com>
5201
5202 * linux-low.c (linux_mourn): Static declaration.
5203 (linux_arch_setup): Move in front of
5204 handle_extended_wait.
5205 (linux_arch_setup_thread): New function.
5206 (handle_extended_wait): Handle exec events. Call
5207 linux_arch_setup_thread. Make event_lwp argument a
5208 pointer-to-a-pointer.
5209 (check_zombie_leaders): Do not check stopped threads.
5210 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5211 (linux_low_filter_event): Add lwp and thread for exec'ing
5212 non-leader thread if leader thread has been deleted.
5213 Refactor code into linux_arch_setup_thread and call it.
5214 Pass child lwp pointer by reference to handle_extended_wait.
5215 (linux_wait_for_event_filtered): Update comment.
5216 (linux_wait_1): Prevent clobbering exec event status.
5217 (linux_supports_exec_events): New function.
5218 (linux_target_ops) <supports_exec_events>: Initialize new member.
5219 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5220 new member.
5221 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5222 * server.c (report_exec_events): New global variable.
5223 (handle_query): Handle qSupported query for exec-events feature.
5224 (captured_main): Initialize report_exec_events.
5225 * server.h (report_exec_events): Declare new global variable.
5226 * target.h (struct target_ops) <supports_exec_events>: New
5227 member.
5228 (target_supports_exec_events): New macro.
5229 * win32-low.c (win32_target_ops) <supports_exec_events>:
5230 Initialize new member.
5231
5232 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5233
5234 * linux-low.c (linux_low_enable_btrace): Remove.
5235 (linux_target_ops): Replace linux_low_enable_btrace with
5236 linux_enable_btrace.
5237
5238 2015-09-03 Yao Qi <yao.qi@linaro.org>
5239
5240 * linux-aarch64-low.c (aarch64_insert_point): Call
5241 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5242 returns true.
5243
5244 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5245
5246 * linux-low.c (check_stopped_by_breakpoint): Use
5247 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5248
5249 2015-08-27 Pedro Alves <palves@redhat.com>
5250
5251 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5252
5253 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5254
5255 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5256 the XNEW-family equivalent.
5257 (compile_bytecodes): Likewise.
5258 * dll.c (loaded_dll): Likewise.
5259 * event-loop.c (append_callback_event): Likewise.
5260 (create_file_handler): Likewise.
5261 (create_file_event): Likewise.
5262 * hostio.c (handle_open): Likewise.
5263 * inferiors.c (add_thread): Likewise.
5264 (add_process): Likewise.
5265 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5266 * linux-arm-low.c (arm_new_process): Likewise.
5267 (arm_new_thread): Likewise.
5268 * linux-low.c (add_to_pid_list): Likewise.
5269 (linux_add_process): Likewise.
5270 (handle_extended_wait): Likewise.
5271 (add_lwp): Likewise.
5272 (enqueue_one_deferred_signal): Likewise.
5273 (enqueue_pending_signal): Likewise.
5274 (linux_resume_one_lwp_throw): Likewise.
5275 (linux_resume_one_thread): Likewise.
5276 (linux_read_memory): Likewise.
5277 (linux_write_memory): Likewise.
5278 * linux-mips-low.c (mips_linux_new_process): Likewise.
5279 (mips_linux_new_thread): Likewise.
5280 (mips_add_watchpoint): Likewise.
5281 * linux-x86-low.c (initialize_low_arch): Likewise.
5282 * lynx-low.c (lynx_add_process): Likewise.
5283 * mem-break.c (set_raw_breakpoint_at): Likewise.
5284 (set_breakpoint): Likewise.
5285 (add_condition_to_breakpoint): Likewise.
5286 (add_commands_to_breakpoint): Likewise.
5287 (clone_agent_expr): Likewise.
5288 (clone_one_breakpoint): Likewise.
5289 * regcache.c (new_register_cache): Likewise.
5290 * remote-utils.c (look_up_one_symbol): Likewise.
5291 * server.c (queue_stop_reply): Likewise.
5292 (start_inferior): Likewise.
5293 (queue_stop_reply_callback): Likewise.
5294 (handle_target_event): Likewise.
5295 * spu-low.c (fetch_ppc_memory): Likewise.
5296 (store_ppc_memory): Likewise.
5297 * target.c (set_target_ops): Likewise.
5298 * thread-db.c (thread_db_load_search): Likewise.
5299 (try_thread_db_load_1): Likewise.
5300 * tracepoint.c (add_tracepoint): Likewise.
5301 (add_tracepoint_action): Likewise.
5302 (create_trace_state_variable): Likewise.
5303 (cmd_qtdpsrc): Likewise.
5304 (cmd_qtro): Likewise.
5305 (add_while_stepping_state): Likewise.
5306 * win32-low.c (child_add_thread): Likewise.
5307 (get_image_name): Likewise.
5308
5309 2015-08-25 Yao Qi <yao.qi@linaro.org>
5310
5311 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5312
5313 2015-08-25 Yao Qi <yao.qi@linaro.org>
5314
5315 * Makefile.in (aarch64-linux.o): New rule.
5316 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5317 srv_tgtobj.
5318 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5319 (aarch64_init_debug_reg_state): Make it extern.
5320 (aarch64_linux_prepare_to_resume): Remove.
5321
5322 2015-08-25 Yao Qi <yao.qi@linaro.org>
5323
5324 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5325 lwp_arch_private_info and ptid_of_lwp.
5326
5327 2015-08-25 Yao Qi <yao.qi@linaro.org>
5328
5329 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5330 Find proc_info by find_process_pid. All callers updated.
5331
5332 2015-08-25 Yao Qi <yao.qi@linaro.org>
5333
5334 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5335 Remove.
5336 (debug_reg_change_callback): Remove.
5337 (aarch64_notify_debug_reg_change): Remove.
5338
5339 2015-08-25 Yao Qi <yao.qi@linaro.org>
5340
5341 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5342 Call current_lwp_ptid.
5343
5344 2015-08-25 Yao Qi <yao.qi@linaro.org>
5345
5346 * linux-aarch64-low.c (debug_reg_change_callback): Use
5347 debug_printf.
5348
5349 2015-08-25 Yao Qi <yao.qi@linaro.org>
5350
5351 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5352
5353 2015-08-25 Yao Qi <yao.qi@linaro.org>
5354
5355 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5356
5357 2015-08-25 Yao Qi <yao.qi@linaro.org>
5358
5359 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5360 the code.
5361
5362 2015-08-25 Yao Qi <yao.qi@linaro.org>
5363
5364 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5365 Remove.
5366 (debug_reg_change_callback): Remove argument entry and add argument
5367 lwp. Remove local variable thread. Don't print thread id in the
5368 debugging output. Don't check whether pid of thread equals to pid.
5369 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5370 iterate_over_lwps instead find_inferior.
5371
5372 2015-08-24 Pedro Alves <palves@redhat.com>
5373
5374 * inferiors.c (get_first_process): New function.
5375 * inferiors.h (get_first_process): New declaration.
5376 * remote-utils.c (read_ptid): Default to the first process in the
5377 list, instead of to the current thread's process.
5378
5379 2015-08-24 Pedro Alves <palves@redhat.com>
5380
5381 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5382 * event-loop.c: Likewise.
5383 * remote-utils.c: Likewise.
5384 * tracepoint.c: Likewise.
5385
5386 2015-08-24 Pedro Alves <palves@redhat.com>
5387
5388 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5389 ptid_get_lwp.
5390
5391 2015-08-21 Pedro Alves <palves@redhat.com>
5392
5393 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5394 instead of literal 1.
5395
5396 2015-08-21 Pedro Alves <palves@redhat.com>
5397
5398 * tdesc.c (default_description): Explicitly zero-initialize.
5399
5400 2015-08-21 Pedro Alves <palves@redhat.com>
5401
5402 PR gdb/18749
5403 * inferiors.c (remove_thread): Discard any pending stop reply for
5404 this thread.
5405 * server.c (remove_all_on_match_pid): Rename to ...
5406 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5407 instead of a pid.
5408 (discard_queued_stop_replies): Change parameter to a ptid. Now
5409 extern.
5410 (handle_v_kill, kill_inferior_callback, captured_main)
5411 (process_serial_event): Adjust.
5412 * server.h (discard_queued_stop_replies): Declare.
5413
5414 2015-08-21 Pedro Alves <palves@redhat.com>
5415
5416 * linux-low.c (wait_for_sigstop): Always switch to no thread
5417 selected if the previously current thread dies.
5418 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5419 process instead of the current thread's.
5420 * remote-utils.c (input_interrupt): Don't check if there's no
5421 current thread.
5422 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5423 current thread to the general thread fails, error out.
5424 (handle_qxfer_auxv, handle_qxfer_libraries)
5425 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5426 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5427 (handle_query): Check if there's a thread selected instead of
5428 checking whether there's any thread in the thread list.
5429 (handle_qxfer_threads, handle_qxfer_btrace)
5430 (handle_qxfer_btrace_conf): Don't error out early if there's no
5431 thread in the thread list.
5432 (handle_v_cont, myresume): Don't set the current thread to the
5433 continue thread.
5434 (process_serial_event) <Hg handling>: Also set thread_id if the
5435 previous general thread is still alive.
5436 (process_serial_event) <g/G handling>: If setting the current
5437 thread to the general thread fails, error out.
5438 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5439 thread's lwp instead of the current thread's.
5440 * target.c (set_desired_thread): If the desired thread was not
5441 found, leave the current thread pointing to NULL. Return an int
5442 (boolean) indicating success.
5443 * target.h (set_desired_thread): Change return type to int.
5444
5445 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5446
5447 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5448 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5449 #includes.
5450 (ps_get_thread_area): New function.
5451
5452 2015-08-19 Gary Benson <gbenson@redhat.com>
5453
5454 * hostio.c (handle_pread): Do not attempt to read more data
5455 than hostio_reply_with_data can fit in a packet.
5456
5457 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5458
5459 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5460
5461 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5462
5463 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5464
5465 2015-08-06 Pedro Alves <palves@redhat.com>
5466
5467 * tracepoint.c (expr_eval_result): Now an int.
5468
5469 2015-08-06 Pedro Alves <palves@redhat.com>
5470
5471 * gdbthread.h (struct regcache): Forward declare.
5472 (struct thread_info) <regcache_data>: Now a struct regcache
5473 pointer.
5474 * inferiors.c (inferior_regcache_data)
5475 (set_inferior_regcache_data): Now work with struct regcache
5476 pointers.
5477 * inferiors.h (struct regcache): Forward declare.
5478 (inferior_regcache_data, set_inferior_regcache_data): Now work
5479 with struct regcache pointers.
5480 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5481 (free_register_cache_thread): Remove struct regcache pointer
5482 casts.
5483
5484 2015-08-06 Pedro Alves <palves@redhat.com>
5485
5486 * server.c (captured_main): On error, print the exception message
5487 to stderr, and if run_once is set, throw a quit.
5488
5489 2015-08-06 Pedro Alves <palves@redhat.com>
5490
5491 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5492 the current thread.
5493
5494 2015-08-06 Pedro Alves <palves@redhat.com>
5495
5496 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5497 reading beyond the passed in buffer length.
5498
5499 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5500
5501 * tracepoint.c (symbol_list) <required>: Remove.
5502
5503 2015-08-06 Pedro Alves <palves@redhat.com>
5504
5505 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5506 count if stopping and suspending threads.
5507 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5508 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5509 (linux_detach): Complete an ongoing step-over.
5510 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5511 throughout.
5512 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5513 (linux_wait_1): If passing a signal to the inferior after
5514 finishing a step-over, unsuspend and re-resume all lwps. If we
5515 see a single-step event but the thread should be continuing, don't
5516 pass the trap to gdb.
5517 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5518 internal_error instead of gdb_assert.
5519 (enqueue_pending_signal): New function.
5520 (check_ptrace_stopped_lwp_gone): Add debug output.
5521 (start_step_over): Use internal_error instead of gdb_assert.
5522 (complete_ongoing_step_over): New function.
5523 (linux_resume_one_thread): Don't resume a suspended thread.
5524 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5525 it stepping.
5526
5527 2015-08-06 Pedro Alves <palves@redhat.com>
5528
5529 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5530 (linux_thread_alive): Use lwp_is_marked_dead.
5531 (extended_event_reported): Delete.
5532 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5533 instead of extended_event_reported.
5534 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5535 as well.
5536 (lwp_is_marked_dead): New function.
5537 (lwp_running): Use lwp_is_marked_dead.
5538 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5539 comment.
5540
5541 2015-08-06 Pedro Alves <palves@redhat.com>
5542
5543 * linux-low.c (linux_wait_1): Move fork event output out of the
5544 !report_to_gdb check. Pass event_child->waitstatus to
5545 target_waitstatus_to_string instead of ourstatus.
5546
5547 2015-08-04 Yao Qi <yao.qi@linaro.org>
5548
5549 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5550 if current_thread is 32 bit.
5551
5552 2015-08-04 Yao Qi <yao.qi@linaro.org>
5553
5554 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5555 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5556 * server.c (extended_protocol): Remove "static".
5557 * server.h (extended_protocol): Declare it.
5558
5559 2015-08-04 Yao Qi <yao.qi@linaro.org>
5560
5561 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5562 both aarch64 and aarch32.
5563 (aarch64_set_pc): Likewise.
5564
5565 2015-08-04 Yao Qi <yao.qi@linaro.org>
5566
5567 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5568 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5569 arm-with-neon.xml to srv_xmlfiles.
5570 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5571 (is_64bit_tdesc): New function.
5572 (aarch64_linux_read_description): New function.
5573 (aarch64_arch_setup): Call aarch64_linux_read_description.
5574 (regs_info): Rename to regs_info_aarch64.
5575 (aarch64_regs_info): Return right regs_info.
5576 (initialize_low_arch): Call initialize_low_arch_aarch32.
5577
5578 2015-08-04 Yao Qi <yao.qi@linaro.org>
5579
5580 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5581 * linux-aarch32-low.c: New file.
5582 * linux-aarch32-low.h: New file.
5583 * linux-arm-low.c (arm_fill_gregset): Move it to
5584 linux-aarch32-low.c.
5585 (arm_store_gregset): Likewise.
5586 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5587 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5588 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5589 (regs_info): Rename to regs_info_arm.
5590 (arm_regs_info): Return regs_info_aarch32 if
5591 have_ptrace_getregset is 1 and target description is
5592 arm_with_neon or arm_with_vfpv3.
5593 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5594 Call initialize_low_arch_aarch32 instead.
5595
5596 2015-08-04 Yao Qi <yao.qi@linaro.org>
5597
5598 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5599 * linux-low.c: ... here.
5600 * linux-low.h (have_ptrace_getregset): Declare it.
5601
5602 2015-08-04 Pedro Alves <palves@redhat.com>
5603
5604 * thread-db.c (struct thread_db): Use new typedefs.
5605 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5606 CHK calls.
5607 (disable_thread_event_reporting): Cast result of dlsym to
5608 destination function pointer type.
5609 (thread_db_mourn): Use td_ta_delete_ftype.
5610
5611 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5612
5613 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5614 arch variant.
5615 (CDX_BREAKPOINT): Define for R2.
5616 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5617 (the_low_target): Add comments.
5618
5619 2015-07-30 Yao Qi <yao.qi@linaro.org>
5620
5621 * linux-arm-low.c (arm_hwcap): Remove it.
5622 (arm_read_description): New local variable arm_hwcap. Don't
5623 set arm_hwcap to zero.
5624
5625 2015-07-30 Yao Qi <yao.qi@linaro.org>
5626
5627 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5628 Use regcache->tdesc instead.
5629 (arm_store_wmmxregset): Likewise.
5630 (arm_fill_vfpregset): Likewise.
5631 (arm_store_vfpregset): Likewise.
5632
5633 2015-07-30 Yao Qi <yao.qi@linaro.org>
5634
5635 * linux-arm-low.c: Include arch/arm.h.
5636 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5637 (arm_store_gregset): Likewise.
5638
5639 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5640
5641 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5642 ptrace's 4th parameter.
5643
5644 2015-07-27 Yao Qi <yao.qi@linaro.org>
5645
5646 * configure.srv (case aarch64*-*-linux*): Don't set
5647 srv_linux_usrregs.
5648
5649 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5650
5651 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5652 sys/ptrace.h.
5653 * linux-arm-low.c: Likewise.
5654 * linux-cris-low.c: Likewise.
5655 * linux-crisv32-low.c: Likewise.
5656 * linux-low.c: Likewise.
5657 * linux-m68k-low.c: Likewise.
5658 * linux-mips-low.c: Likewise.
5659 * linux-nios2-low.c: Likewise.
5660 * linux-s390-low.c: Likewise.
5661 * linux-sparc-low.c: Likewise.
5662 * linux-tic6x-low.c: Likewise.
5663 * linux-tile-low.c: Likewise.
5664 * linux-x86-low.c: Likewise.
5665
5666 2015-07-24 Pedro Alves <palves@redhat.com>
5667
5668 * config.in: Regenerate.
5669 * configure: Regenerate.
5670
5671 2015-07-24 Pedro Alves <palves@redhat.com>
5672
5673 * acinclude.m4: Include ../ptrace.m4.
5674 * configure.ac: Call GDB_AC_PTRACE.
5675 * config.in, configure: Regenerate.
5676
5677 2015-07-24 Yao Qi <yao.qi@linaro.org>
5678
5679 * linux-low.c (linux_create_inferior): Remove setting to
5680 proc->priv->new_inferior.
5681 (linux_attach): Likewise.
5682 (linux_low_filter_event): Likewise.
5683 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5684
5685 2015-07-24 Yao Qi <yao.qi@linaro.org>
5686
5687 * linux-low.c (linux_arch_setup): New function.
5688 (linux_low_filter_event): If proc->tdesc is NULL and
5689 proc->attached is true, call the_low_target.arch_setup.
5690 Otherwise, keep status pending, and return.
5691 (linux_resume_one_lwp_throw): Don't call get_pc if
5692 thread->while_stepping isn't NULL. Don't call
5693 get_thread_regcache if proc->tdesc is NULL.
5694 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5695 (linux_target_ops): Install arch_setup.
5696 * server.c (start_inferior): Call the_target->arch_setup.
5697 * target.h (struct target_ops) <arch_setup>: New field.
5698 (target_arch_setup): New marco.
5699 * lynx-low.c (lynx_target_ops): Update.
5700 * nto-low.c (nto_target_ops): Update.
5701 * spu-low.c (spu_target_ops): Update.
5702 * win32-low.c (win32_target_ops): Update.
5703
5704 2015-07-24 Yao Qi <yao.qi@linaro.org>
5705
5706 * linux-low.c (linux_add_process): Don't set
5707 proc->priv->new_inferior.
5708 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5709 (linux_attach): Likewise.
5710
5711 2015-07-24 Yao Qi <yao.qi@linaro.org>
5712
5713 * server.c (start_inferior): Code refactor.
5714
5715 2015-07-24 Yao Qi <yao.qi@linaro.org>
5716
5717 * server.c (process_serial_event): Set general_thread.
5718
5719 2015-07-21 Yao Qi <yao.qi@linaro.org>
5720
5721 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5722 aarch64_linux_get_debug_reg_capacity.
5723
5724 2015-07-17 Yao Qi <yao.qi@linaro.org>
5725
5726 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5727 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5728 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5729 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5730 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5731 (AARCH64_HWP_ALIGNMENT): Likewise.
5732 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5733 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5734 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5735 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5736 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5737 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5738 (struct aarch64_debug_reg_state): Likewise.
5739 (struct arch_lwp_info): Likewise.
5740 (aarch64_align_watchpoint): Likewise.
5741 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5742 (aarch64_watchpoint_length): Likewise.
5743 (aarch64_point_encode_ctrl_reg): Likewise
5744 (aarch64_point_is_aligned): Likewise.
5745 (aarch64_align_watchpoint): Likewise.
5746 (aarch64_linux_set_debug_regs):
5747 (aarch64_dr_state_insert_one_point): Likewise.
5748 (aarch64_dr_state_remove_one_point): Likewise.
5749 (aarch64_handle_breakpoint): Likewise.
5750 (aarch64_handle_aligned_watchpoint): Likewise.
5751 (aarch64_handle_unaligned_watchpoint): Likewise.
5752 (aarch64_handle_watchpoint): Likewise.
5753
5754 2015-07-17 Yao Qi <yao.qi@linaro.org>
5755
5756 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5757 and don't aarch64_get_debug_reg_state. All callers update.
5758 (aarch64_handle_aligned_watchpoint): Likewise.
5759 (aarch64_handle_unaligned_watchpoint): Likewise.
5760 (aarch64_handle_watchpoint): Likewise.
5761 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5762 (aarch64_remove_point): Likewise.
5763
5764 2015-07-17 Yao Qi <yao.qi@linaro.org>
5765
5766 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5767 debug_printf.
5768 (aarch64_handle_unaligned_watchpoint): Likewise.
5769
5770 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5771
5772 Revert the previous 3 commits:
5773 Move gdb_regex* to common/
5774 Move linux_find_memory_regions_full & co.
5775 gdbserver build-id attribute generator
5776
5777 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5778 Jan Kratochvil <jan.kratochvil@redhat.com>
5779
5780 gdbserver build-id attribute generator.
5781 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5782 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5783 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5784 (find_phdr): New.
5785 (get_dynamic): Use find_pdhr to traverse program headers.
5786 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5787 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5788 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5789 (get_hex_build_id): New.
5790 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5791 to reply XML document.
5792
5793 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5794 Jan Kratochvil <jan.kratochvil@redhat.com>
5795
5796 * target.c: Include target/target-utils.h and fcntl.h.
5797 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5798 (target_fileio_read_stralloc): New functions.
5799
5800 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5801
5802 * Makefile.in (OBS): Add gdb_regex.o.
5803 (gdb_regex.o): New.
5804 * config.in: Rebuilt.
5805 * configure: Rebuilt.
5806
5807 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5808 Jan Kratochvil <jan.kratochvil@redhat.com>
5809
5810 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5811 * Makefile.in (OBS): Add target-utils.o.
5812 (linux-maps.o, target-utils.o): New.
5813 * configure.srv (srv_linux_obj): Add linux-maps.o.
5814
5815 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5816
5817 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5818 function, return 1.
5819 (the_low_target): Install it.
5820
5821 2015-07-14 Pedro Alves <palves@redhat.com>
5822
5823 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5824 Instead, ignore ECHILD, and throw an error for other errnos.
5825
5826 2015-07-10 Pedro Alves <palves@redhat.com>
5827
5828 * event-loop.c (struct callback_event) <data>: Change type to
5829 gdb_client_data instance instead of gdb_client_data pointer.
5830 (append_callback_event): Adjust.
5831
5832 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5833
5834 * linux-aarch64-low.c: Add comments for each linux_target_ops
5835 method. Remove comments already covered in target_ops and
5836 linux_target_ops definitions.
5837 (the_low_target): Add comments for each unimplemented method.
5838
5839 2015-07-09 Yao Qi <yao.qi@linaro.org>
5840
5841 * linux-aarch64-low.c (aarch64_regmap): Remove.
5842 (aarch64_usrregs_info): Remove.
5843 (regs_info): Set field usrregs to NULL.
5844
5845 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5846
5847 * linux-low.c: Include "rsp-low.h"
5848 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5849 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5850 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5851 (handle_btrace_enable_pt): New.
5852 (handle_btrace_general_set): Support "pt".
5853 (handle_btrace_conf_general_set): Support "pt:size".
5854
5855 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5856
5857 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5858 Z_PACKET_SW_BP.
5859
5860 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5861
5862 * linux-aarch64-low.c: Remove comment about endianness.
5863 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5864 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5865 memcmp.
5866
5867 2015-06-24 Gary Benson <gbenson@redhat.com>
5868
5869 * linux-i386-ipa.c (stdint.h): Do not include.
5870 * lynx-i386-low.c (stdint.h): Likewise.
5871 * lynx-ppc-low.c (stdint.h): Likewise.
5872 * mem-break.c (stdint.h): Likewise.
5873 * thread-db.c (stdint.h): Likewise.
5874 * tracepoint.c (stdint.h): Likewise.
5875 * win32-low.c (stdint.h): Likewise.
5876
5877 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5878
5879 * server.c (write_qxfer_response): Update call to
5880 remote_escape_output.
5881
5882 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5883 Jan Kratochvil <jan.kratochvil@redhat.com>
5884
5885 Merge multiple hex conversions.
5886 * gdbreplay.c (tohex): Rename to 'fromhex'.
5887 (logchar): Use fromhex.
5888
5889 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5890
5891 * server.c (handle_qxfer_libraries): Set `version' attribute for
5892 <library-list>.
5893
5894 2015-06-10 Gary Benson <gbenson@redhat.com>
5895
5896 * target.h (struct target_ops) <multifs_open>: New field.
5897 <multifs_unlink>: Likewise.
5898 <multifs_readlink>: Likewise.
5899 * linux-low.c (nat/linux-namespaces.h): New include.
5900 (linux_target_ops): Initialize the_target->multifs_open,
5901 the_target->multifs_unlink and the_target->multifs_readlink.
5902 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5903 * hostio.c (hostio_fs_pid): New static variable.
5904 (hostio_handle_new_gdb_connection): New function.
5905 (handle_setfs): Likewise.
5906 (handle_open): Use the_target->multifs_open as appropriate.
5907 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5908 (handle_readlink): Use the_target->multifs_readlink as
5909 appropriate.
5910 (handle_vFile): Handle vFile:setfs packets.
5911 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5912 after target_handle_new_gdb_connection.
5913
5914 2015-06-10 Gary Benson <gbenson@redhat.com>
5915
5916 * configure.ac (AC_CHECK_FUNCS): Add setns.
5917 * config.in: Regenerate.
5918 * configure: Likewise.
5919 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5920 (linux-namespaces.o): New rule.
5921 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5922
5923 2015-06-09 Gary Benson <gbenson@redhat.com>
5924
5925 * hostio.c (handle_open): Process mode argument with
5926 fileio_to_host_mode.
5927
5928 2015-06-01 Yao Qi <yao.qi@linaro.org>
5929
5930 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5931 * linux-x86-low.c: Likewise.
5932
5933 2015-05-28 Don Breazeal <donb@codesourcery.com>
5934
5935 * linux-low.c (handle_extended_wait): Initialize
5936 thread_info.last_resume_kind for new fork children.
5937
5938 2015-05-15 Pedro Alves <palves@redhat.com>
5939
5940 * target.h (target_handle_new_gdb_connection): Rewrite using if
5941 wrapped in do/while.
5942
5943 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5944
5945 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5946 * configure, config.in: Regenerate.
5947 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5948 Declare typedef.
5949
5950 2015-05-12 Don Breazeal <donb@codesourcery.com>
5951
5952 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5953 PTRACE_EVENT_VFORK_DONE.
5954 (linux_low_ptrace_options, extended_event_reported): Add vfork
5955 events.
5956 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5957 and "vforkdone" for RSP 'T' Stop Reply Packet.
5958 * server.h (report_vfork_events): Declare
5959 global variable.
5960
5961 2015-05-12 Don Breazeal <donb@codesourcery.com>
5962
5963 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5964 (the_low_target) <new_fork>: Initialize new member.
5965 * linux-arm-low.c (arm_new_fork): New function.
5966 (the_low_target) <new_fork>: Initialize new member.
5967 * linux-low.c (handle_extended_wait): Call new target function
5968 new_fork.
5969 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5970 * linux-mips-low.c (mips_add_watchpoint): New function
5971 extracted from mips_insert_point.
5972 (the_low_target) <new_fork>: Initialize new member.
5973 (mips_linux_new_fork): New function.
5974 (mips_insert_point): Call mips_add_watchpoint.
5975 * linux-x86-low.c (x86_linux_new_fork): New function.
5976 (the_low_target) <new_fork>: Initialize new member.
5977
5978 2015-05-12 Don Breazeal <donb@codesourcery.com>
5979
5980 * linux-low.c (handle_extended_wait): Implement return value,
5981 rename argument 'event_child' to 'event_lwp', handle
5982 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5983 (linux_low_ptrace_options): New function.
5984 (linux_low_filter_event): Call linux_low_ptrace_options,
5985 use different argument fo linux_enable_event_reporting,
5986 use return value from handle_extended_wait.
5987 (extended_event_reported): New function.
5988 (linux_wait_1): Call extended_event_reported and set
5989 status to report fork events.
5990 (linux_write_memory): Add pid to debug message.
5991 (reset_lwp_ptrace_options_callback): New function.
5992 (linux_handle_new_gdb_connection): New function.
5993 (linux_target_ops): Initialize new structure member.
5994 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5995 * lynx-low.c: Initialize new structure member.
5996 * remote-utils.c (prepare_resume_reply): Implement stop reason
5997 "fork" for "T" stop message.
5998 * server.c (handle_query): Call handle_new_gdb_connection.
5999 * server.h (report_fork_events): Declare global flag.
6000 * target.h (struct target_ops) <handle_new_gdb_connection>:
6001 New member.
6002 (target_handle_new_gdb_connection): New macro.
6003 * win32-low.c: Initialize new structure member.
6004
6005 2015-05-12 Don Breazeal <donb@codesourcery.com>
6006
6007 * mem-break.c (APPEND_TO_LIST): Define macro.
6008 (clone_agent_expr): New function.
6009 (clone_one_breakpoint): New function.
6010 (clone_all_breakpoints): New function.
6011 * mem-break.h: Declare new functions.
6012
6013 2015-05-12 Don Breazeal <donb@codesourcery.com>
6014
6015 * linux-low.c (linux_supports_fork_events): New function.
6016 (linux_supports_vfork_events): New function.
6017 (linux_target_ops): Initialize new structure members.
6018 (initialize_low): Call linux_check_ptrace_features.
6019 * lynx-low.c (lynx_target_ops): Initialize new structure
6020 members.
6021 * server.c (report_fork_events, report_vfork_events):
6022 New global flags.
6023 (handle_query): Add new features to qSupported packet and
6024 response.
6025 (captured_main): Initialize new global variables.
6026 * target.h (struct target_ops) <supports_fork_events>:
6027 New member.
6028 <supports_vfork_events>: New member.
6029 (target_supports_fork_events): New macro.
6030 (target_supports_vfork_events): New macro.
6031 * win32-low.c (win32_target_ops): Initialize new structure
6032 members.
6033
6034 2015-05-12 Gary Benson <gbenson@redhat.com>
6035
6036 * server.c (handle_qxfer_exec_file): Use current process
6037 if annex is empty.
6038
6039 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6040
6041 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6042 Remove HAVE_PTRACE_GETREGS conditionals.
6043 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6044 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6045
6046 2015-05-08 Yao Qi <yao.qi@linaro.org>
6047
6048 * linux-low.c (linux_supports_conditional_breakpoints): New
6049 function.
6050 (linux_target_ops): Install new target method.
6051 * lynx-low.c (lynx_target_ops): Install NULL hook for
6052 supports_conditional_breakpoints.
6053 * nto-low.c (nto_target_ops): Likewise.
6054 * spu-low.c (spu_target_ops): Likewise.
6055 * win32-low.c (win32_target_ops): Likewise.
6056 * server.c (handle_query): Check
6057 target_supports_conditional_breakpoints.
6058 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6059 New field.
6060 (target_supports_conditional_breakpoints): New macro.
6061
6062 2015-05-06 Pedro Alves <palves@redhat.com>
6063
6064 PR server/18081
6065 * server.c (start_inferior): If the process exits, mourn it.
6066
6067 2015-04-21 Gary Benson <gbenson@redhat.com>
6068
6069 * hostio.c (fileio_open_flags_to_host): Factored out to
6070 fileio_to_host_openflags in common/fileio.c. Single use
6071 updated.
6072
6073 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6074
6075 * linux-xtensa-low.c (xtensa_fill_gregset)
6076 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6077 XCHAL_HAVE_LOOP.
6078
6079 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6080
6081 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6082 (regs_info): Replace usrregs pointer with NULL.
6083
6084 2015-04-17 Gary Benson <gbenson@redhat.com>
6085
6086 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6087 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6088 * server.c (handle_qxfer_exec_file): New function.
6089 (qxfer_packets): Add exec-file entry.
6090 (handle_query): Report qXfer:exec-file:read as supported packet.
6091
6092 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6093
6094 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6095
6096 2015-04-09 Gary Benson <gbenson@redhat.com>
6097
6098 * hostio-errno.c (errno_to_fileio_error): Remove function.
6099 Update caller to use remote_fileio_to_fio_error.
6100
6101 2015-04-09 Yao Qi <yao.qi@linaro.org>
6102
6103 * linux-low.c (linux_insert_point): Call
6104 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6105 (linux_remove_point): Call remove_memory_breakpoint if type is
6106 raw_bkpt_type_sw.
6107 * linux-x86-low.c (x86_insert_point): Don't call
6108 insert_memory_breakpoint.
6109 (x86_remove_point): Don't call remove_memory_breakpoint.
6110
6111 2015-04-01 Pedro Alves <palves@redhat.com>
6112 Cleber Rosa <crosa@redhat.com>
6113
6114 * server.c (gdbserver_usage): Reorganize and extend the usage
6115 message.
6116
6117 2015-03-24 Pedro Alves <palves@redhat.com>
6118
6119 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6120 output. Also dump TRAP_TRACE.
6121 (linux_low_filter_event): In debug output, distinguish a
6122 resume_stop SIGSTOP from a delayed SIGSTOP.
6123
6124 2015-03-24 Gary Benson <gbenson@redhat.com>
6125
6126 * linux-x86-low.c (x86_linux_new_thread): Moved to
6127 nat/x86-linux.c.
6128 (x86_linux_prepare_to_resume): Likewise.
6129
6130 2015-03-24 Gary Benson <gbenson@redhat.com>
6131
6132 * Makefile.in (x86-linux-dregs.o): New rule.
6133 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6134 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6135 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6136 (x86_linux_dr_get): Likewise.
6137 (x86_linux_dr_set): Likewise.
6138 (update_debug_registers_callback): Likewise.
6139 (x86_linux_dr_set_addr): Likewise.
6140 (x86_linux_dr_get_addr): Likewise.
6141 (x86_linux_dr_set_control): Likewise.
6142 (x86_linux_dr_get_control): Likewise.
6143 (x86_linux_dr_get_status): Likewise.
6144 (x86_linux_update_debug_registers): Likewise.
6145
6146 2015-03-24 Gary Benson <gbenson@redhat.com>
6147
6148 * linux-x86-low.c (x86_linux_update_debug_registers):
6149 New function, factored out from...
6150 (x86_linux_prepare_to_resume): ...this.
6151
6152 2015-03-24 Gary Benson <gbenson@redhat.com>
6153
6154 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6155 (x86_linux_dr_set): Likewise.
6156 (update_debug_registers_callback): Likewise.
6157 (x86_linux_dr_set_addr): Likewise.
6158 (x86_linux_dr_get_addr): Likewise.
6159 (x86_linux_dr_set_control): Likewise.
6160 (x86_linux_dr_get_control): Likewise.
6161 (x86_linux_dr_get_status): Likewise.
6162 (x86_linux_prepare_to_resume): Likewise.
6163
6164 2015-03-24 Gary Benson <gbenson@redhat.com>
6165
6166 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6167 Use perror_with_name. Pass string through gettext.
6168 (x86_linux_dr_set): Likewise.
6169
6170 2015-03-24 Gary Benson <gbenson@redhat.com>
6171
6172 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6173 (x86_linux_dr_set_addr): ...this.
6174 (x86_dr_low_get_addr): Rename to...
6175 (x86_linux_dr_get_addr): ...this.
6176 (x86_dr_low_set_control): Rename to...
6177 (x86_linux_dr_set_control): ...this.
6178 (x86_dr_low_get_control): Rename to...
6179 (x86_linux_dr_get_control): ...this.
6180 (x86_dr_low_get_status): Rename to...
6181 (x86_linux_dr_get_status): ...this.
6182 (x86_dr_low): Update with new function names.
6183
6184 2015-03-24 Gary Benson <gbenson@redhat.com>
6185
6186 * Makefile.in (x86-linux.o): New rule.
6187 * configure.srv: Add x86-linux.o to relevant targets.
6188 * linux-low.c (lwp_set_arch_private_info): New function.
6189 (lwp_arch_private_info): Likewise.
6190 * linux-x86-low.c: Include nat/x86-linux.h.
6191 (arch_lwp_info): Removed structure.
6192 (update_debug_registers_callback):
6193 Use lwp_set_debug_registers_changed.
6194 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6195 and lwp_set_debug_registers_changed.
6196 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6197
6198 2015-03-24 Gary Benson <gbenson@redhat.com>
6199
6200 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6201 * linux-arm-low.c (arm_new_thread): Likewise.
6202 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6203 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6204 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6205 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6206
6207 2015-03-24 Gary Benson <gbenson@redhat.com>
6208
6209 * linux-low.c (ptid_of_lwp): New function.
6210 (lwp_is_stopped): Likewise.
6211 (lwp_stop_reason): Likewise.
6212 * linux-x86-low.c (update_debug_registers_callback):
6213 Use lwp_is_stopped.
6214 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6215 lwp_stop_reason.
6216
6217 2015-03-24 Gary Benson <gbenson@redhat.com>
6218
6219 * linux-low.h (linux_stop_lwp): Remove declaration.
6220
6221 2015-03-24 Gary Benson <gbenson@redhat.com>
6222
6223 * linux-low.h: Include nat/linux-nat.h.
6224 * linux-low.c (iterate_over_lwps_args): New structure.
6225 (iterate_over_lwps_filter): New function.
6226 (iterate_over_lwps): Likewise.
6227 * linux-x86-low.c (update_debug_registers_callback):
6228 Update signature to what iterate_over_lwps expects.
6229 Remove PID check that iterate_over_lwps now performs.
6230 (x86_dr_low_set_addr): Use iterate_over_lwps.
6231 (x86_dr_low_set_control): Likewise.
6232
6233 2015-03-24 Gary Benson <gbenson@redhat.com>
6234
6235 * linux-x86-low.c (x86_debug_reg_state): New function.
6236 (x86_linux_prepare_to_resume): Use the above.
6237
6238 2015-03-24 Gary Benson <gbenson@redhat.com>
6239
6240 * linux-low.c (current_lwp_ptid): New function.
6241 * linux-x86-low.c: Include nat/linux-nat.h.
6242 (x86_dr_low_get_addr): Use current_lwp_ptid.
6243 (x86_dr_low_get_control): Likewise.
6244 (x86_dr_low_get_status): Likewise.
6245
6246 2015-03-20 Pedro Alves <palves@redhat.com>
6247
6248 * tracepoint.c (cmd_qtstatus): Make "str" const.
6249
6250 2015-03-20 Pedro Alves <palves@redhat.com>
6251
6252 * server.c (handle_general_set): Make "req_str" const.
6253
6254 2015-03-19 Pedro Alves <palves@redhat.com>
6255
6256 * linux-low.c (linux_resume_one_lwp): Rename to ...
6257 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6258 instead call perror_with_name.
6259 (check_ptrace_stopped_lwp_gone): New function.
6260 (linux_resume_one_lwp): Reimplement as wrapper around
6261 linux_resume_one_lwp_throw that swallows errors if the LWP is
6262 gone.
6263
6264 2015-03-19 Pedro Alves <palves@redhat.com>
6265
6266 * linux-low.c (count_events_callback, select_event_lwp_callback):
6267 No longer check whether the thread has resume_stop as last resume
6268 kind.
6269
6270 2015-03-19 Pedro Alves <palves@redhat.com>
6271
6272 * linux-low.c (count_events_callback, select_event_lwp_callback):
6273 Use the lwp's status_pending_p field, not the thread's.
6274
6275 2015-03-19 Pedro Alves <palves@redhat.com>
6276
6277 * linux-low.c (select_event_lwp_callback): Update comments to
6278 no longer mention SIGTRAP.
6279
6280 2015-03-18 Gary Benson <gbenson@redhat.com>
6281
6282 * server.c (handle_query): Do not report vFile:fstat as supported.
6283
6284 2015-03-11 Gary Benson <gbenson@redhat.com>
6285
6286 * hostio.c (sys/types.h): New include.
6287 (sys/stat.h): Likewise.
6288 (common-remote-fileio.h): Likewise.
6289 (handle_fstat): New function.
6290 (handle_vFile): Handle vFile:fstat packets.
6291
6292 2015-03-11 Gary Benson <gbenson@redhat.com>
6293
6294 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6295 struct stat.st_blocks and struct stat.st_blksize.
6296 * configure: Regenerate.
6297 * config.in: Likewise.
6298 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6299 (OBS): Add common-remote-fileio.o.
6300 (common-remote-fileio.o): New rule.
6301
6302 2015-03-09 Pedro Alves <palves@redhat.com>
6303
6304 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6305 'struct sockaddr' pointer in 'accept' call.
6306
6307 2015-03-09 Pedro Alves <palves@redhat.com>
6308
6309 Revert:
6310 2015-03-07 Pedro Alves <palves@redhat.com>
6311 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6312 or <winsock2.h> here. Instead include "gdb_socket.h".
6313 (remote_open): Use union gdb_sockaddr_u.
6314 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6315 or <winsock2.h> here. Instead include "gdb_socket.h".
6316 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6317 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6318 or <sys/un.h>.
6319 (init_named_socket, gdb_agent_helper_thread): Use union
6320 gdb_sockaddr_u.
6321
6322 2015-03-07 Pedro Alves <palves@redhat.com>
6323
6324 * configure.ac (build_warnings): Move
6325 -Wdeclaration-after-statement to the C-specific set.
6326 * configure: Regenerate.
6327
6328 2015-03-07 Pedro Alves <palves@redhat.com>
6329
6330 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6331 or <winsock2.h> here. Instead include "gdb_socket.h".
6332 (remote_open): Use union gdb_sockaddr_u.
6333 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6334 or <winsock2.h> here. Instead include "gdb_socket.h".
6335 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6336 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6337 or <sys/un.h>.
6338 (init_named_socket, gdb_agent_helper_thread): Use union
6339 gdb_sockaddr_u.
6340
6341 2015-03-07 Pedro Alves <palves@redhat.com>
6342
6343 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6344 instead.
6345
6346 2015-03-06 Yao Qi <yao.qi@linaro.org>
6347
6348 * linux-aarch64-low.c (aarch64_insert_point): Use
6349 show_debug_regs as a boolean.
6350 (aarch64_remove_point): Likewise.
6351
6352 2015-03-05 Pedro Alves <palves@redhat.com>
6353
6354 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6355 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6356 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6357 * nto-low.c (nto_target_ops): Likewise.
6358 * spu-low.c (spu_target_ops): Likewise.
6359 * win32-low.c (win32_target_ops): Likewise.
6360
6361 2015-03-04 Pedro Alves <palves@redhat.com>
6362
6363 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6364 Decide whether a breakpoint triggered based on the SIGTRAP's
6365 siginfo.si_code.
6366 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6367 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6368 (linux_low_filter_event): Check for breakpoints before checking
6369 watchpoints.
6370 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6371 siginfo.si_code.
6372 (linux_stopped_by_sw_breakpoint)
6373 (linux_supports_stopped_by_sw_breakpoint)
6374 (linux_stopped_by_hw_breakpoint)
6375 (linux_supports_stopped_by_hw_breakpoint): New functions.
6376 (linux_target_ops): Install new target methods.
6377
6378 2015-03-04 Pedro Alves <palves@redhat.com>
6379
6380 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6381 * server.c (swbreak_feature, hwbreak_feature): New globals.
6382 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6383 (captured_main): Clear swbreak_feature and hwbreak_feature.
6384 * server.h (swbreak_feature, hwbreak_feature): Declare.
6385 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6386 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6387 supports_stopped_by_hw_breakpoint>: New fields.
6388 (target_supports_stopped_by_sw_breakpoint)
6389 (target_stopped_by_sw_breakpoint)
6390 (target_supports_stopped_by_hw_breakpoint)
6391 (target_stopped_by_hw_breakpoint): Declare.
6392
6393 2015-03-04 Pedro Alves <palves@redhat.com>
6394
6395 enum lwp_stop_reason -> enum target_stop_reason
6396 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6397 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6398 (linux_wait_1, stuck_in_jump_pad_callback)
6399 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6400 (linux_stopped_by_watchpoint):
6401 * linux-low.h (enum lwp_stop_reason): Delete.
6402 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6403 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6404
6405 2015-03-04 Yao Qi <yao.qi@linaro.org>
6406
6407 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6408
6409 2015-03-03 Gary Benson <gbenson@redhat.com>
6410
6411 * hostio.c (handle_vFile): Fix prefix lengths.
6412
6413 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6414
6415 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6416 ptr_bits.
6417
6418 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6419
6420 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6421 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6422 (clean): Add "rm -f" for above C files.
6423 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6424 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6425 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6426 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6427 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6428 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6429 (init_registers_s390x_vx_linux64)
6430 (init_registers_s390x_tevx_linux64)
6431 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6432 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6433 declarations.
6434 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6435 (s390_store_vxrs_high): New functions.
6436 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6437 NT_S390_VXRS_HIGH.
6438 (s390_arch_setup): Add logic for selecting one of the new target
6439 descriptions. Activate the new vector regsets if applicable.
6440 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6441 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6442 and init_registers_s390x_tevx_linux64.
6443
6444 2015-03-01 Pedro Alves <palves@redhat.com>
6445
6446 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6447 parameter.
6448
6449 2015-02-27 Pedro Alves <palves@redhat.com>
6450
6451 * linux-x86-low.c (u_debugreg_offset): New function.
6452 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6453
6454 2015-02-27 Pedro Alves <palves@redhat.com>
6455
6456 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6457 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6458 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6459 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6460 (ps_lsetfpregs, ps_getpid)
6461 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6462 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6463 (ps_lsetxregs, ps_plog): Declare.
6464
6465 2015-02-27 Pedro Alves <palves@redhat.com>
6466
6467 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6468 IP_AGENT_EXPORT_FUNC.
6469 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6470 IP_AGENT_EXPORT_FUNC.
6471 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6472 (IP_AGENT_EXPORT): Delete.
6473 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6474 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6475 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6476 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6477 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6478 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6479 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6480 (traceframe_read_count, traceframe_write_count)
6481 (traceframes_created, trace_state_variables, get_raw_reg)
6482 (get_trace_state_variable_value, set_trace_state_variable_value)
6483 (ust_loaded, helper_thread_id, cmd_buf): Use
6484 IPA_SYM_EXPORTED_NAME.
6485 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6486 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6487 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6488 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6489 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6490 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6491 EXTERN_C_PUSH/EXTERN_C_POP.
6492 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6493 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6494 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6495 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6496 (traceframe_write_count, traceframe_read_count)
6497 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6498 (about_to_request_buffer_space, get_trace_state_variable_value)
6499 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6500 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6501 EXTERN_C_PUSH/EXTERN_C_POP.
6502 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6503 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6504 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6505 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6506 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6507 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6508 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6509 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6510 Define.
6511 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6512 (IP_AGENT_EXPORT_VAR_DECL): Define.
6513 (tracing): Declare.
6514 (gdb_agent_get_raw_reg): Declare.
6515
6516 2015-02-27 Tom Tromey <tromey@redhat.com>
6517 Pedro Alves <palves@redhat.com>
6518
6519 Rename symbols whose names are reserved C++ keywords throughout.
6520
6521 2015-02-27 Pedro Alves <palves@redhat.com>
6522
6523 * Makefile.in (COMPILER): New, get it from autoconf.
6524 (CXX): Get from autoconf instead.
6525 (COMPILE.pre): Use COMPILER.
6526 (CC-LD): Rename to ...
6527 (CC_LD): ... this. Use COMPILER.
6528 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6529 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6530 * acinclude.m4: Include build-with-cxx.m4.
6531 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6532 Disable -Werror by default if building in C++ mode.
6533 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6534 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6535 the C++ compiler. Save/restore CXXFLAGS too.
6536 * configure: Regenerate.
6537
6538 2015-02-27 Pedro Alves <palves@redhat.com>
6539
6540 * acinclude.m4: Include libiberty.m4.
6541 * configure.ac: Call libiberty_INIT.
6542 * config.in, configure: Regenerate.
6543
6544 2015-02-26 Pedro Alves <palves@redhat.com>
6545
6546 * linux-low.c (linux_wait_1): When incrementing the PC past a
6547 program breakpoint always use the_low_target.breakpoint_len as
6548 increment, rather than the maximum between that and
6549 the_low_target.decr_pc_after_break.
6550
6551 2015-02-23 Pedro Alves <palves@redhat.com>
6552
6553 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6554 thread was doing a step-over; always adjust the PC if
6555 we stepped over a permanent breakpoint.
6556 (linux_wait_1): If we stepped over breakpoint that was on top of a
6557 permanent breakpoint, manually advance the PC past it.
6558
6559 2015-02-23 Pedro Alves <palves@redhat.com>
6560
6561 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6562 modes.
6563 (x86_fill_gregset, x86_store_gregset): Use it when handling
6564 $orig_eax.
6565
6566 2015-02-20 Pedro Alves <palves@redhat.com>
6567
6568 * thread-db.c: Include "nat/linux-procfs.h".
6569 (thread_db_init): Skip listing new threads if the kernel supports
6570 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6571
6572 2015-02-20 Pedro Alves <palves@redhat.com>
6573
6574 * linux-low.c (status_pending_p_callback): Use ptid_match.
6575
6576 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6577
6578 PR breakpoints/16812
6579 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6580 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6581 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6582
6583 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6584
6585 PR breakpoints/15956
6586 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6587
6588 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6589
6590 * linux-low.c (linux_low_btrace_conf): Print size.
6591 * server.c (handle_btrace_conf_general_set): New.
6592 (hanle_general_set): Call handle_btrace_conf_general_set.
6593 (handle_query): Report Qbtrace-conf:bts:size as supported.
6594
6595 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6596
6597 * linux-low.c (linux_low_enable_btrace): Update parameters.
6598 (linux_low_btrace_conf): New.
6599 (linux_target_ops)<to_btrace_conf>: Initialize.
6600 * server.c (current_btrace_conf): New.
6601 (handle_btrace_enable): Rename to ...
6602 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6603 to target_enable_btrace. Update comment. Update users.
6604 (handle_qxfer_btrace_conf): New.
6605 (qxfer_packets): Add btrace-conf entry.
6606 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6607 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6608 (target_ops)<read_btrace_conf>: New.
6609 (target_enable_btrace): Update parameters.
6610 (target_read_btrace_conf): New.
6611
6612 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6613
6614 * server.c (handle_btrace_general_set): Remove call to
6615 target_supports_btrace.
6616 (supported_btrace_packets): New.
6617 (handle_query): Call supported_btrace_packets.
6618 * target.h: include btrace-common.h.
6619 (btrace_target_info): Removed.
6620 (supports_btrace, target_supports_btrace): Update parameters.
6621
6622 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6623
6624 * Makefile.in (SFILES): Add common/btrace-common.c.
6625 (OBS): Add common/btrace-common.o.
6626 (btrace-common.o): Add build rules.
6627 * linux-low: Include btrace-common.h.
6628 (linux_low_read_btrace): Use struct btrace_data. Call
6629 btrace_data_init and btrace_data_fini.
6630
6631 2015-02-06 Pedro Alves <palves@redhat.com>
6632
6633 * thread-db.c (find_new_threads_callback): Add debug output.
6634
6635 2015-02-04 Pedro Alves <palves@redhat.com>
6636
6637 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6638 (resume_stopped_resumed_lwps): New function.
6639 (linux_wait_for_event_filtered): Use it.
6640
6641 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6642
6643 * Makefile.in (SFILES): Add linux-personality.c.
6644 (linux-personality.o): New rule.
6645 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6646 list of objects to be built.
6647 * linux-low.c: Include nat/linux-personality.h.
6648 (linux_create_inferior): Remove code to disable address space
6649 randomization (moved to ../nat/linux-personality.c). Create
6650 cleanup to disable address space randomization.
6651
6652 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6653
6654 * Makefile.in (posix-strerror.o): New rule.
6655 (mingw-strerror.o): Likewise.
6656 * configure: Regenerated.
6657 * configure.ac: Source file ../common/common.host. Initialize new
6658 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6659
6660 2015-01-14 Yao Qi <yao@codesourcery.com>
6661
6662 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6663 (ppc-linux.o): New rule.
6664 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6665 * configure.ac: AC_CHECK_FUNCS(getauxval).
6666 * config.in: Re-generated.
6667 * configure: Re-generated.
6668 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6669 ppc64_64bit_inferior_p
6670
6671 2015-01-14 Yao Qi <yao@codesourcery.com>
6672
6673 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6674 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6675 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6676 (PT_ORIG_R3, PT_TRAP): Likewise.
6677 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6678 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6679 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6680
6681 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6682
6683 * i387-fp.c (i387_cache_to_xsave): In look over
6684 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6685 zmmh_low_space field by use of zmmh_high_space.
6686
6687 2015-01-09 Pedro Alves <palves@redhat.com>
6688
6689 * linux-low.c (step_over_bkpt): Move higher up in the file.
6690 (handle_extended_wait): Don't store the stop_pc here.
6691 (get_stop_pc): Adjust comments and rename to ...
6692 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6693 stopped for a software breakpoint or hardware breakpoint.
6694 (thread_still_has_status_pending_p): New function.
6695 (status_pending_p_callback): Use
6696 thread_still_has_status_pending_p. If the event is no longer
6697 interesting, resume the LWP.
6698 (handle_tracepoints): Add assert.
6699 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6700 (wstatus_maybe_breakpoint): New function.
6701 (cancel_breakpoint): Delete function.
6702 (check_stopped_by_watchpoint): New function, factored out from
6703 linux_low_filter_event.
6704 (lp_status_maybe_breakpoint): Delete function.
6705 (linux_low_filter_event): Remove filter_ptid argument.
6706 Leave thread group exits pending here. Store the LWP's stop PC.
6707 Always leave events pending.
6708 (linux_wait_for_event_filtered): Pull all events out of the
6709 kernel, and leave them all pending.
6710 (count_events_callback, select_event_lwp_callback): Consider all
6711 events.
6712 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6713 (select_event_lwp): Only give preference to the stepping LWP in
6714 all-stop mode. Adjust comments.
6715 (ignore_event): New function.
6716 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6717 references to cancel_breakpoints. Adjust to renames. Also give
6718 equal priority to all LWPs that have had events in non-stop mode.
6719 If reporting a software breakpoint event, unadjust the LWP's PC.
6720 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6721 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6722 Adjust.
6723 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6724 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6725 (linux_stopped_by_watchpoint): Adjust.
6726 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6727 * linux-low.h (enum lwp_stop_reason): New.
6728 (struct lwp_info) <stop_pc>: Adjust comment.
6729 <stopped_by_watchpoint>: Delete field.
6730 <stop_reason>: New field.
6731 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6732 * mem-break.c (software_breakpoint_inserted_here)
6733 (hardware_breakpoint_inserted_here): New function.
6734 * mem-break.h (software_breakpoint_inserted_here)
6735 (hardware_breakpoint_inserted_here): Declare.
6736 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6737 (cancel_breakpoints): Delete.
6738 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6739 (upload_fast_traceframes): Remove references to
6740 cancel_breakpoints.
6741
6742 2015-01-09 Pedro Alves <palves@redhat.com>
6743
6744 * thread-db.c (find_new_threads_callback): Ignore thread if the
6745 kernel thread ID is -1.
6746
6747 2015-01-09 Pedro Alves <palves@redhat.com>
6748
6749 * linux-low.c (linux_attach_fail_reason_string): Move to
6750 nat/linux-ptrace.c, and rename.
6751 (linux_attach_lwp): Update comment.
6752 (attach_proc_task_lwp_callback): New function.
6753 (linux_attach): Adjust to rename and use
6754 linux_proc_attach_tgid_threads.
6755 (linux_attach_fail_reason_string): Delete declaration.
6756
6757 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6758
6759 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6760 * server.c (gdbserver_version): Likewise.
6761
6762 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6763
6764 * remote-utils.c: Include ctype.h.
6765 (input_interrupt): Explicitly handle the case when the char
6766 received is the NUL byte. Improve the printing of non-ASCII
6767 characters.
6768
6769 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6770
6771 * linux-low.c (linux_low_filter_event): Update call to
6772 linux_enable_event_reporting following the addition of
6773 a new parameter to that function.
6774
6775 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6776
6777 PR server/17457
6778 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6779 (AARCH64_FPCR_REGNO): Likewise.
6780 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6781 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6782 (aarch64_store_fpregset): Likewise.
6783
6784 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6785
6786 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6787 Remove FIXME comment about assumption about N.
6788
6789 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6790
6791 * configure.ac: If large-file support is disabled in GDBserver,
6792 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6793 * configure: Regenerate.
6794
6795 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6796
6797 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6798 warning upon ENODATA from ptrace.
6799 * linux-s390-low.c (s390_store_tdb): New.
6800 (s390_regsets): Add regset for NT_S390_TDB.
6801
6802 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6803
6804 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6805 without a fill_function.
6806 * linux-s390-low.c (s390_fill_last_break): Remove.
6807 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6808 (s390_arch_setup): Use regset's size instead of fill_function for
6809 loop end condition.
6810
6811 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6812
6813 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6814 the regset's store function when ptrace returned an error.
6815 * regcache.c (get_thread_regcache): Invalidate register cache
6816 before fetching inferior's registers.
6817
6818 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6819
6820 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6821 while-loop as for-loop.
6822 (regsets_store_inferior_registers): Likewise.
6823
6824 2014-11-28 Yao Qi <yao@codesourcery.com>
6825
6826 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6827 * config.in, configure: Re-generate.
6828 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6829 is defined.
6830
6831 2014-11-21 Yao Qi <yao@codesourcery.com>
6832
6833 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6834 (AC_CHECK_HEADERS): Remove malloc.h.
6835 * configure: Re-generated.
6836 * config.in: Re-generated.
6837 * server.h: Don't include alloca.h and malloc.h.
6838 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6839 Don't include malloc.h.
6840
6841 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6842
6843 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6844 corresponding ERRNO check in same block.
6845
6846 2014-11-12 Pedro Alves <palves@redhat.com>
6847
6848 * server.c (cont_thread): Update comment.
6849 (start_inferior, attach_inferior): No longer clear cont_thread.
6850 (handle_v_cont): No longer set cont_thread.
6851 (captured_main): Clear cont_thread each time a GDB connects.
6852
6853 2014-11-12 Pedro Alves <palves@redhat.com>
6854
6855 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6856 thread, and don't resume all threads if the Hc thread has exited.
6857
6858 2014-11-12 Pedro Alves <palves@redhat.com>
6859
6860 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6861 the process group instead of to a specific LWP.
6862
6863 2014-10-15 Pedro Alves <palves@redhat.com>
6864
6865 PR server/17487
6866 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6867 parameter.
6868 (arm_set_thread_context): Delete.
6869 (the_low_target): Adjust.
6870 * win32-i386-low.c (debug_registers_changed)
6871 (debug_registers_used): Delete.
6872 (update_debug_registers_callback): New function.
6873 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6874 needing to update their debug registers.
6875 (win32_get_current_dr): New function.
6876 (x86_dr_low_get_addr, x86_dr_low_get_control)
6877 (x86_dr_low_get_status): Fetch the debug register from the thread
6878 record's context.
6879 (i386_initial_stuff): Adjust.
6880 (i386_get_thread_context): Remove current_event parameter. Don't
6881 clear debug_registers_changed nor copy DR values to
6882 debug_reg_state.
6883 (i386_set_thread_context): Delete.
6884 (i386_prepare_to_resume): New function.
6885 (i386_thread_added): Mark the thread as needing to update irs
6886 debug registers.
6887 (the_low_target): Remove i386_set_thread_context and install
6888 i386_prepare_to_resume.
6889 * win32-low.c (win32_get_thread_context): Adjust.
6890 (win32_set_thread_context): Use SetThreadContext
6891 directly.
6892 (win32_prepare_to_resume): New function.
6893 (win32_require_context): New function, factored out from ...
6894 (thread_rec): ... this.
6895 (continue_one_thread): Call win32_prepare_to_resume on each thread
6896 we're about to continue.
6897 (win32_resume): Call win32_prepare_to_resume on the event thread.
6898 * win32-low.h (struct win32_thread_info)
6899 <debug_registers_changed>: New field.
6900 (struct win32_target_ops): Change prototype of set_thread_context,
6901 delete set_thread_context and add prepare_to_resume.
6902 (win32_require_context): New declaration.
6903
6904 2014-10-08 Gary Benson <gbenson@redhat.com>
6905
6906 * server.h: Do not include common-exceptions.h.
6907
6908 2014-10-08 Gary Benson <gbenson@redhat.com>
6909
6910 * server.h: Do not include cleanups.h.
6911
6912 2014-09-30 James Hogan <james.hogan@imgtec.com>
6913
6914 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6915 mips64-dsp-linux.c.
6916
6917 2014-09-23 Yao Qi <yao@codesourcery.com>
6918
6919 * linux-low.c (lp_status_maybe_breakpoint): New function.
6920 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6921 (count_events_callback): Likewise.
6922 (select_event_lwp_callback): Likewise.
6923 (cancel_breakpoints_callback): Likewise.
6924
6925 2014-09-19 Don Breazeal <donb@codesourcery.com>
6926
6927 * linux-low.c (handle_extended_wait): Call
6928 linux_ptrace_get_extended_event.
6929 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6930 linux_is_extended_waitstatus.
6931
6932 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6933
6934 * Makefile.in (CPPFLAGS): Define.
6935 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6936 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6937
6938 2014-09-16 Gary Benson <gbenson@redhat.com>
6939
6940 * inferiors.h (current_inferior): Renamed as...
6941 (current_thread): New variable. All uses updated.
6942 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6943 (maybe_move_out_of_jump_pad): Likewise.
6944 (cancel_breakpoint): Likewise.
6945 (linux_low_filter_event): Likewise.
6946 (wait_for_sigstop): Likewise.
6947 (linux_resume_one_lwp): Likewise.
6948 (need_step_over_p): Likewise.
6949 (start_step_over): Likewise.
6950 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6951 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6952 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6953 and save_inferior as saved_thread.
6954 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6955 saved_thread.
6956 (regcache_invalidate_thread): Likewise.
6957 * remote-utils.c (prepare_resume_reply): Likewise.
6958 * thread-db.c (thread_db_get_tls_address): Likewise.
6959 (disable_thread_event_reporting): Likewise.
6960 (remove_thread_event_breakpoints): Likewise.
6961 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6962 as saved_thread.
6963 * target.h (set_desired_inferior): Renamed as...
6964 (set_desired_thread): New declaration. All uses updated.
6965 * server.c (myresume): Updated comment to reference thread instead
6966 of inferior.
6967 (handle_serial_event): Likewise.
6968 (handle_target_event): Likewise.
6969
6970 2014-09-12 Tom Tromey <tromey@redhat.com>
6971 Gary Benson <gbenson@redhat.com>
6972
6973 * regcache.h: Include common-regcache.h.
6974 (regcache_read_pc): Don't declare.
6975 * regcache.c (get_thread_regcache_for_ptid): New function.
6976
6977 2014-09-11 Tom Tromey <tromey@redhat.com>
6978 Gary Benson <gbenson@redhat.com>
6979
6980 * symbol.c: New file.
6981 * Makefile.in (SFILES): Add symbol.c.
6982 (OBS): Add symbol.o.
6983
6984 2014-09-11 Gary Benson <gbenson@redhat.com>
6985
6986 * target.c (target_stop_ptid, target_continue_ptid): New
6987 functions.
6988
6989 2014-09-11 Tom Tromey <tromey@redhat.com>
6990 Gary Benson <gbenson@redhat.com>
6991
6992 * target.h: Include target/target.h.
6993 * target.c (target_read_memory, target_read_uint32)
6994 (target_write_memory): New functions.
6995
6996 2014-09-11 Gary Benson <gbenson@redhat.com>
6997
6998 * server.h (debug_hw_points): Don't declare.
6999 * server.c (debug_hw_points): Don't define. Replace all uses
7000 with show_debug_regs.
7001 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7002 all uses with show_debug_regs.
7003
7004 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7005
7006 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7007 endianness into account.
7008 (ppc_supply_ptrace_register): Likewise.
7009
7010 2014-09-03 James Hogan <james.hogan@imgtec.com>
7011
7012 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7013 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7014
7015 2014-09-03 Gary Benson <gbenson@redhat.com>
7016
7017 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7018 ALL_DEBUG_ADDRESS_REGISTERS.
7019
7020 2014-09-02 Gary Benson <gbenson@redhat.com>
7021
7022 * i386-low.h: Renamed as...
7023 * x86-low.h: New file. All type, function and variable name
7024 prefixes changed from "i386_" to "x86_". All references updated.
7025 * i386-low.c: Renamed as...
7026 * x86-low.c: New file. All type, function and variable name
7027 prefixes changed from "i386_" to "x86_". All references updated.
7028
7029 2014-09-02 Gary Benson <gbenson@redhat.com>
7030
7031 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7032 (x86_linux_new_thread): Likewise.
7033
7034 2014-08-29 Gary Benson <gbenson@redhat.com>
7035
7036 * server.h (setjmp.h): Do not include.
7037 (toplevel): Do not declare.
7038 (common-exceptions.h): Include.
7039 (cleanups.h): Likewise.
7040 * server.c (toplevel): Do not define.
7041 (exit_code): New static global.
7042 (detach_or_kill_for_exit_cleanup): New function.
7043 (main): New function. Original main renamed to...
7044 (captured_main): New function.
7045 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7046
7047 2014-08-29 Gary Benson <gbenson@redhat.com>
7048
7049 * Makefile.in (SFILES): Add common/common-exceptions.c.
7050 (OBS): Add common-exceptions.o.
7051 (common-exceptions.o): New rule.
7052 * utils.c (prepare_to_throw_exception): New function.
7053
7054 2014-08-29 Gary Benson <gbenson@redhat.com>
7055
7056 * config.in: Regenerate.
7057 * configure: Likewise.
7058
7059 2014-08-29 Gary Benson <gbenson@redhat.com>
7060
7061 * Makefile.in (SFILES): Add common/cleanups.c.
7062 (OBS): cleanups.o.
7063 (cleanups.o): New rule.
7064
7065 2014-08-29 Gary Benson <gbenson@redhat.com>
7066
7067 * utils.c (internal_vwarning): New function.
7068
7069 2014-08-28 Gary Benson <gbenson@redhat.com>
7070
7071 * utils.h (fatal): Remove declaration.
7072 * utils.c (fatal): Remove function.
7073
7074 2014-08-28 Gary Benson <gbenson@redhat.com>
7075
7076 * tracepoint.c (gdb_agent_init): Replace fatal with
7077 perror_with_name.
7078 (initialize_tracepoint): Likewise.
7079
7080 2014-08-28 Gary Benson <gbenson@redhat.com>
7081
7082 * remote-utils.c (remote_prepare): Replace fatal with error.
7083
7084 2014-08-28 Gary Benson <gbenson@redhat.com>
7085
7086 * linux-low.c (linux_async): Replace fatal with warning.
7087 Tidy up and return.
7088 (linux_start_non_stop): Return -1 if linux_async failed.
7089
7090 2014-08-28 Gary Benson <gbenson@redhat.com>
7091
7092 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7093 gdb_assert.
7094 (i386_dr_low_get_addr): Remove vague comment.
7095 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7096 gdb_assert.
7097
7098 2014-08-28 Gary Benson <gbenson@redhat.com>
7099
7100 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7101 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7102 internal_error.
7103 (linux_resume_one_lwp): Likewise.
7104 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7105 gdb_assert.
7106 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7107 with internal_error.
7108 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7109 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7110 (find_register_by_name): Replace fatal with internal_error.
7111 (find_regno): Likewise.
7112 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7113 * thread-db.c (thread_db_create_event): Likewise.
7114 (thread_db_load_search): Likewise.
7115 (try_thread_db_load_1): Likewise.
7116 * tracepoint.c (get_jump_space_head): Replace fatal with
7117 internal_error.
7118 (claim_trampoline_space): Likewise.
7119 (have_fast_tracepoint_trampoline_buffer): Likewise.
7120 (cmd_qtstart): Likewise.
7121 (stop_tracing): Likewise.
7122 (fast_tracepoint_collecting): Likewise.
7123 (target_malloc): Likewise.
7124 (download_tracepoint): Likewise.
7125 (download_trace_state_variables): Replace check with gdb_assert.
7126 (upload_fast_traceframes): Replace fatal with internal_error.
7127
7128 2014-08-19 Tom Tromey <tromey@redhat.com>
7129 Gary Benson <gbenson@redhat.com>
7130
7131 * Makefile.in (SFILES): Add common/common-debug.c.
7132 (OBS): Add common-debug.o.
7133 (common-debug.o): New rule.
7134 * debug.h (debug_printf): Don't declare.
7135 * debug.c (debug_printf): Renamed and rewritten as...
7136 (debug_vprintf): New function.
7137
7138 2014-08-19 Gary Benson <gbenson@redhat.com>
7139
7140 * utils.h: Do not include print-utils.h.
7141
7142 2014-08-19 Tom Tromey <tromey@redhat.com>
7143 Gary Benson <gbenson@redhat.com>
7144
7145 * server.h: Add static assertion.
7146 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7147
7148 2014-08-19 Tom Tromey <tromey@redhat.com>
7149 Gary Benson <gbenson@redhat.com>
7150
7151 * Makefile.in (SFILES): Add common/errors.c.
7152 (OBS): Add errors.o.
7153 (IPA_OBS): Add errors-ipa.o.
7154 (errors.o): New rule.
7155 (errors-ipa.o): Likewise.
7156 * utils.h (perror_with_name, error, warning): Don't declare.
7157 * utils.c (warning): Renamed and rewritten as...
7158 (vwarning): New function.
7159 (error): Renamed and rewritten as...
7160 (verror): New function.
7161 (internal_error): Renamed and rewritten as...
7162 (internal_verror): New function.
7163
7164 2014-08-07 Gary Benson <gbenson@redhat.com>
7165
7166 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7167 * configure: Regenerate.
7168 * config.in: Likewise.
7169 * server.h: Do not include errno.h.
7170 * event-loop.c: Likewise.
7171 * hostio-errno.c: Likewise.
7172 * linux-low.c: Likewise.
7173 * remote-utils.c: Likewise.
7174 * spu-low.c: Likewise.
7175 * utils.c: Likewise.
7176 * gdbreplay.c: Unconditionally include errno.h.
7177
7178 2014-08-07 Gary Benson <gbenson@redhat.com>
7179
7180 * server.h: Do not include string.h.
7181 * event-loop.c: Likewise.
7182 * linux-low.c: Likewise.
7183 * regcache.c: Likewise.
7184 * remote-utils.c: Likewise.
7185 * spu-low.c: Likewise.
7186 * utils.c: Likewise.
7187
7188 2014-08-07 Gary Benson <gbenson@redhat.com>
7189
7190 * server.h: Do not include gdb_assert.h.
7191
7192 2014-08-07 Gary Benson <gbenson@redhat.com>
7193
7194 * server.h: Do not include common-utils.h.
7195
7196 2014-08-07 Gary Benson <gbenson@redhat.com>
7197
7198 * server.h: Do not include ptid.h.
7199 * notif.h: Likewise.
7200
7201 2014-08-07 Gary Benson <gbenson@redhat.com>
7202
7203 * server.h: Do not include gdb_locale.h.
7204
7205 2014-08-07 Gary Benson <gbenson@redhat.com>
7206
7207 * server.h: Do not include gdb/signals.h.
7208 * win32-low.c: Likewise.
7209
7210 2014-08-07 Gary Benson <gbenson@redhat.com>
7211
7212 * server.h: Do not include pathmax.h.
7213
7214 2014-08-07 Gary Benson <gbenson@redhat.com>
7215
7216 * server.h: Do not include libiberty.h.
7217 * linux-bfin-low.c: Likewise.
7218
7219 2014-08-07 Gary Benson <gbenson@redhat.com>
7220
7221 * server.h: Do not include ansidecl.h.
7222
7223 2014-08-07 Gary Benson <gbenson@redhat.com>
7224
7225 * linux-x86-low.c: Do not include stddef.h.
7226 * lynx-ppc-low.c: Likewise.
7227 * tracepoint.c: Likewise.
7228
7229 2014-08-07 Gary Benson <gbenson@redhat.com>
7230
7231 * server.h: Do not include stdarg.h.
7232 * nto-low.c: Likewise.
7233
7234 2014-08-07 Gary Benson <gbenson@redhat.com>
7235
7236 * server.h: Do not include stdlib.h.
7237 * inferiors.c: Likewise.
7238 * linux-low.c: Likewise.
7239 * regcache.c: Likewise.
7240 * spu-low.c: Likewise.
7241 * tracepoint.c: Likewise.
7242 * utils.c: Likewise.
7243
7244 2014-08-07 Gary Benson <gbenson@redhat.com>
7245
7246 * server.h: Do not include stdio.h.
7247 * linux-low.c: Likewise.
7248 * remote-utils.c: Likewise.
7249 * spu-low.c: Likewise.
7250 * utils.c: Likewise.
7251 * wincecompat.c: Likewise.
7252
7253 2014-08-06 Gary Benson <gbenson@redhat.com>
7254
7255 * regcache.c (init_register_cache): Move conditionals inside if.
7256
7257 2014-08-06 Gary Benson <gbenson@redhat.com>
7258
7259 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7260
7261 2014-07-31 Gary Benson <gbenson@redhat.com>
7262
7263 * ax.h: Do not include server.h.
7264 * gdbthread.h: Likewise.
7265 * lynx-low.h: Likewise.
7266 * notif.h: Likewise.
7267
7268 2014-07-30 Gary Benson <gbenson@redhat.com>
7269
7270 * server.h: Include common-defs.h.
7271 Do not include config.h or build-gnulib-gdbserver/config.h.
7272
7273 2014-07-30 Gary Benson <gbenson@redhat.com>
7274
7275 * hostio-errno.c: Move server.h to top of includes list.
7276 * inferiors.c: Likewise.
7277 * linux-x86-low.c: Likewise.
7278 * notif.c: Include server.h.
7279
7280 2014-07-24 Tom Tromey <tromey@redhat.com>
7281 Gary Benson <gbenson@redhat.com>
7282
7283 * server.h (CORE_ADDR): Now unsigned.
7284
7285 2014-07-16 Pedro Alves <palves@redhat.com>
7286
7287 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7288
7289 2014-07-15 Pedro Alves <palves@redhat.com>
7290
7291 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7292 copy.
7293
7294 2014-07-11 Pedro Alves <palves@redhat.com>
7295
7296 * linux-low.c (kill_wait_lwp): New function, based on
7297 kill_one_lwp_callback, but use my_waitpid directly.
7298 (kill_one_lwp_callback, linux_kill): Use it.
7299
7300 2014-06-23 Pedro Alves <palves@redhat.com>
7301
7302 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7303 before setting DR0..DR3.
7304
7305 2014-06-20 Gary Benson <gbenson@redhat.com>
7306
7307 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7308 * configure: Regenerated.
7309 * config.in: Likewise.
7310
7311 2014-06-20 Gary Benson <gbenson@redhat.com>
7312
7313 * Makefile.in (SFILES): Update locations for files moved
7314 from common to nat.
7315 (object file files): Reordered.
7316
7317 2014-06-20 Gary Benson <gbenson@redhat.com>
7318
7319 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7320 (i386_dr_low_set_addr): Likewise.
7321 (i386_dr_low_get_addr): Likewise.
7322 (i386_dr_low_can_set_control): Likewise.
7323 (i386_dr_low_set_control): Likewise.
7324 (i386_dr_low_get_control): Likewise.
7325 (i386_dr_low_get_status): Likewise.
7326 (i386_get_debug_register_length): Likewise.
7327 * linux-x86-low.c (i386_dr_low_set_addr):
7328 Changed signature. Made static.
7329 (i386_dr_low_get_addr): Likewise.
7330 (i386_dr_low_set_control): Likewise.
7331 (i386_dr_low_get_control): Likewise.
7332 (i386_dr_low_get_status): Likewise.
7333 (i386_dr_low): New global variable.
7334 * win32-i386-low.c (i386_dr_low_set_addr):
7335 Changed signature. Made static.
7336 (i386_dr_low_get_addr): Likewise.
7337 (i386_dr_low_set_control): Likewise.
7338 (i386_dr_low_get_control): Likewise.
7339 (i386_dr_low_get_status): Likewise.
7340 (i386_dr_low): New global variable.
7341
7342 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7343
7344 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7345 * Makefile.in (AR, AR_FLAGS): Define.
7346 * configure: Regenerate.
7347
7348 2014-06-19 Gary Benson <gbenson@redhat.com>
7349
7350 * Makefile.in (i386-dregs.o): New rule.
7351 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7352 * i386-low.c (target.h): Remove include.
7353 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7354 (DR_CONTROL_SHIFT): Likewise.
7355 (DR_CONTROL_SIZE): Likewise.
7356 (DR_RW_EXECUTE): Likewise.
7357 (DR_RW_WRITE): Likewise.
7358 (DR_RW_READ): Likewise.
7359 (DR_RW_IORW): Likewise.
7360 (DR_LEN_1): Likewise.
7361 (DR_LEN_2): Likewise.
7362 (DR_LEN_4): Likewise.
7363 (DR_LEN_8): Likewise.
7364 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7365 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7366 (DR_ENABLE_SIZE): Likewise.
7367 (DR_LOCAL_SLOWDOWN): Likewise.
7368 (DR_GLOBAL_SLOWDOWN): Likewise.
7369 (DR_CONTROL_RESERVED): Likewise.
7370 (I386_DR_CONTROL_MASK): Likewise.
7371 (I386_DR_VACANT): Likewise.
7372 (I386_DR_LOCAL_ENABLE): Likewise.
7373 (I386_DR_GLOBAL_ENABLE): Likewise.
7374 (I386_DR_DISABLE): Likewise.
7375 (I386_DR_SET_RW_LEN): Likewise.
7376 (I386_DR_GET_RW_LEN): Likewise.
7377 (I386_DR_WATCH_HIT): Likewise.
7378 (i386_wp_op_t): Likewise.
7379 (i386_show_dr): Likewise.
7380 (i386_length_and_rw_bits): Likewise.
7381 (i386_insert_aligned_watchpoint): Likewise.
7382 (i386_remove_aligned_watchpoint): Likewise.
7383 (i386_handle_nonaligned_watchpoint): Likewise.
7384 i386_update_inferior_debug_regs(): Likewise.
7385 (i386_dr_insert_watchpoint): Likewise.
7386 (i386_dr_remove_watchpoint): Likewise.
7387 (i386_dr_region_ok_for_watchpoint): Likewise.
7388 (i386_dr_stopped_data_address): Likewise.
7389 (i386_dr_stopped_by_watchpoint): Likewise.
7390
7391 2014-06-19 Gary Benson <gbenson@redhat.com>
7392
7393 * i386-low.c (i386_dr_show): Renamed to
7394 i386_show_dr and made static. All uses updated.
7395 (i386_dr_length_and_rw_bits): Renamed to
7396 i386_length_and_rw_bits and made static.
7397 All uses updated.
7398 (i386_dr_insert_aligned_watchpoint): Renamed to
7399 i386_insert_aligned_watchpoint and made static.
7400 All uses updated.
7401 (i386_dr_remove_aligned_watchpoint): Renamed to
7402 i386_remove_aligned_watchpoint and made static.
7403 All uses updated.
7404 (i386_dr_update_inferior_debug_regs): Renamed to
7405 i386_update_inferior_debug_regs and made static.
7406 All uses updated.
7407
7408 2014-06-18 Gary Benson <gbenson@redhat.com>
7409
7410 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7411 (i386_dr_low_can_set_control): Likewise.
7412 (i386_get_debug_register_length): Likewise.
7413 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7414 (i386_dr_low_can_set_control): Likewise.
7415 (i386_get_debug_register_length): Likewise.
7416
7417 2014-06-17 Gary Benson <gbenson@redhat.com>
7418
7419 * i386-low.h (i386-dregs.h): New include.
7420 (DR_FIRSTADDR): Now in i386-dregs.h.
7421 (DR_LASTADDR): Likewise.
7422 (DR_NADDR): Likewise.
7423 (DR_STATUS): Likewise.
7424 (DR_CONTROL): Likewise.
7425 (i386_debug_reg_state): Likewise.
7426 (i386_dr_insert_watchpoint): Likewise.
7427 (i386_dr_remove_watchpoint): Likewise.
7428 (i386_dr_region_ok_for_watchpoint): Likewise.
7429 (i386_dr_stopped_data_address): Likewise.
7430 (i386_dr_stopped_by_watchpoint): Likewise.
7431 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7432
7433 2014-06-18 Gary Benson <gbenson@redhat.com>
7434
7435 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7436 i386_dr_insert_watchpoint.
7437 (i386_low_remove_watchpoint): Renamed to
7438 i386_dr_remove_watchpoint.
7439 (i386_low_region_ok_for_watchpoint): Renamed to
7440 i386_dr_region_ok_for_watchpoint.
7441 (i386_low_stopped_data_address): Renamed to
7442 i386_dr_stopped_data_address.
7443 (i386_low_stopped_by_watchpoint): Renamed to
7444 i386_dr_stopped_by_watchpoint.
7445 * i386-low.c (i386_show_dr): Renamed to
7446 i386_dr_show and made nonstatic. All uses updated.
7447 (i386_length_and_rw_bits): Renamed to
7448 i386_dr_length_and_rw_bits and made nonstatic.
7449 All uses updated.
7450 (i386_insert_aligned_watchpoint): Renamed to
7451 i386_dr_insert_aligned_watchpoint and made nonstatic.
7452 All uses updated.
7453 (i386_remove_aligned_watchpoint): Renamed to
7454 i386_dr_remove_aligned_watchpoint and made nonstatic.
7455 All uses updated.
7456 (i386_update_inferior_debug_regs): Renamed to
7457 i386_dr_update_inferior_debug_regs and made nonstatic.
7458 All uses updated.
7459 (i386_low_insert_watchpoint): Renamed to
7460 i386_dr_insert_watchpoint. All uses updated.
7461 (i386_low_remove_watchpoint): Renamed to
7462 i386_dr_remove_watchpoint. All uses updated.
7463 (i386_low_region_ok_for_watchpoint): Renamed to
7464 i386_dr_region_ok_for_watchpoint. All uses updated.
7465 (i386_low_stopped_data_address): Renamed to
7466 i386_dr_stopped_data_address. All uses updated.
7467 (i386_low_stopped_by_watchpoint): Renamed to
7468 i386_dr_stopped_by_watchpoint. All uses updated.
7469
7470 2014-06-18 Gary Benson <gbenson@redhat.com>
7471
7472 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7473 (i386_dr_low_can_set_control): Likewise.
7474 (i386_insert_aligned_watchpoint): New check.
7475
7476 2014-06-18 Gary Benson <gbenson@redhat.com>
7477
7478 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7479 Renamed to state.
7480
7481 2014-06-18 Gary Benson <gbenson@redhat.com>
7482
7483 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7484 instead of fatal and error.
7485 (i386_handle_nonaligned_watchpoint): Likewise.
7486
7487 2014-06-18 Gary Benson <gbenson@redhat.com>
7488
7489 * i386-low.c (i386_get_debug_register_length): New macro.
7490 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7491 (i386_show_dr): Use debug_printf instead of fprintf. Use
7492 phex to format values.
7493
7494 2014-06-18 Gary Benson <gbenson@redhat.com>
7495
7496 * i386-low.h: Comment changes.
7497 * i386-low.c: Likewise.
7498
7499 2014-06-18 Gary Benson <gbenson@redhat.com>
7500
7501 * i386-low.c: Whitespace changes.
7502
7503 2014-06-12 Tom Tromey <tromey@redhat.com>
7504
7505 * utils.c (freeargv): Remove.
7506
7507 2014-06-12 Tom Tromey <tromey@redhat.com>
7508
7509 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7510 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7511 (parse_debug_format_options): Likewise.
7512 (gdbserver_usage): Likewise.
7513 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7514 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7515 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7516 against libiberty.
7517 ($(LIBGNU)): Depend on libiberty.
7518 (all-lib): Recurse into all subdirs.
7519 (install-only): Invoke "install" target in subdirs.
7520 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7521 targets.
7522 * configure: Rebuild.
7523 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7524 for vasprintf, vsnprintf, or gettimeofday.
7525 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7526 srv_tgtobj.
7527
7528 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7529
7530 * development.sh: Delete.
7531 * Makefile.in (config.status): Adjust dependency on development.sh.
7532 * configure.ac: Adjust development.sh source call.
7533 * configure: Regenerate.
7534
7535 2014-06-02 Pedro Alves <palves@redhat.com>
7536
7537 * ax.c (gdb_free_agent_expr): New function.
7538 * ax.h (gdb_free_agent_expr): New declaration.
7539 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7540 list.
7541 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7542 static.
7543 (clear_breakpoint_conditions_and_commands): New function.
7544 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7545 (clear_breakpoint_conditions_and_commands): New declaration.
7546
7547 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7548
7549 * linux-aarch64-low.c (asm/ptrace.h): Include.
7550
7551 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7552
7553 Fix TLS access for -static -pthread.
7554 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7555 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7556 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7557
7558 2014-05-20 Pedro Alves <palves@redhat.com>
7559
7560 * linux-aarch64-low.c (aarch64_insert_point)
7561 (aarch64_remove_point): No longer check whether the type is
7562 supported here. Adjust to new interface.
7563 (the_low_target): Install aarch64_supports_z_point_type as
7564 supports_z_point_type method.
7565 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7566 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7567 instead of a Z packet char. Adjust.
7568 (arm_supports_z_point_type): New function.
7569 (arm_insert_point, arm_remove_point): Adjust to new interface.
7570 (the_low_target): Install arm_supports_z_point_type.
7571 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7572 (cris_insert_point, cris_remove_point): Adjust to new interface.
7573 Don't check whether the type is supported here.
7574 (the_low_target): Install cris_supports_z_point_type.
7575 * linux-low.c (linux_supports_z_point_type): New function.
7576 (linux_insert_point, linux_remove_point): Adjust to new interface.
7577 * linux-low.h (struct linux_target_ops) <insert_point,
7578 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7579 raw_breakpoint pointer parameter.
7580 <supports_z_point_type>: New method.
7581 * linux-mips-low.c (mips_supports_z_point_type): New function.
7582 (mips_insert_point, mips_remove_point): Adjust to new interface.
7583 Use mips_supports_z_point_type.
7584 (the_low_target): Install mips_supports_z_point_type.
7585 * linux-ppc-low.c (the_low_target): Install NULL as
7586 supports_z_point_type method.
7587 * linux-s390-low.c (the_low_target): Install NULL as
7588 supports_z_point_type method.
7589 * linux-sparc-low.c (the_low_target): Install NULL as
7590 supports_z_point_type method.
7591 * linux-x86-low.c (x86_supports_z_point_type): New function.
7592 (x86_insert_point): Adjust to new insert_point interface. Use
7593 insert_memory_breakpoint. Adjust to new
7594 i386_low_insert_watchpoint interface.
7595 (x86_remove_point): Adjust to remove_point interface. Use
7596 remove_memory_breakpoint. Adjust to new
7597 i386_low_remove_watchpoint interface.
7598 (the_low_target): Install x86_supports_z_point_type.
7599 * lynx-low.c (lynx_target_ops): Install NULL as
7600 supports_z_point_type callback.
7601 * nto-low.c (nto_supports_z_point_type): New.
7602 (nto_insert_point, nto_remove_point): Adjust to new interface.
7603 (nto_target_ops): Install nto_supports_z_point_type.
7604 * mem-break.c: Adjust intro comment.
7605 (struct raw_breakpoint) <raw_type, size>: New fields.
7606 <inserted>: Update comment.
7607 <shlib_disabled>: Delete field.
7608 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7609 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7610 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7611 (raw_bkpt_type_to_target_hw_bp_type): New function.
7612 (find_enabled_raw_code_breakpoint_at): New function.
7613 (find_raw_breakpoint_at): New type and size parameters. Use them.
7614 (insert_memory_breakpoint): New function, based off
7615 set_raw_breakpoint_at.
7616 (remove_memory_breakpoint): New function.
7617 (set_raw_breakpoint_at): Reimplement.
7618 (set_breakpoint): New, based on set_breakpoint_at.
7619 (set_breakpoint_at): Reimplement.
7620 (delete_raw_breakpoint): Go through the_target->remove_point
7621 instead of assuming memory breakpoints.
7622 (find_gdb_breakpoint_at): Delete.
7623 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7624 (find_gdb_breakpoint): New function.
7625 (set_gdb_breakpoint_at): Delete.
7626 (z_type_supported): New function.
7627 (set_gdb_breakpoint_1): New function, loosely based off
7628 set_gdb_breakpoint_at.
7629 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7630 (delete_gdb_breakpoint_at): Delete.
7631 (delete_gdb_breakpoint_1): New function, loosely based off
7632 delete_gdb_breakpoint_at.
7633 (delete_gdb_breakpoint): New function.
7634 (clear_gdb_breakpoint_conditions): Rename to ...
7635 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7636 breakpoint.
7637 (add_condition_to_breakpoint): Make static.
7638 (add_breakpoint_condition): Take a struct breakpoint pointer
7639 instead of an address. Adjust.
7640 (gdb_condition_true_at_breakpoint): Rename to ...
7641 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7642 z_type parameter.
7643 (gdb_condition_true_at_breakpoint): Reimplement.
7644 (add_breakpoint_commands): Take a struct breakpoint pointer
7645 instead of an address. Adjust.
7646 (gdb_no_commands_at_breakpoint): Rename to ...
7647 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7648 parameter. Return true if no breakpoint was found. Change debug
7649 output.
7650 (gdb_no_commands_at_breakpoint): Reimplement.
7651 (run_breakpoint_commands): Rename to ...
7652 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7653 and change return type to boolean.
7654 (run_breakpoint_commands): New function.
7655 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7656 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7657 breakpoint. Go through the_target->remove_point instead of
7658 assuming memory breakpoint.
7659 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7660 software and hardware breakpoints.
7661 (reinsert_raw_breakpoint): Go through the_target->insert_point
7662 instead of assuming memory breakpoint.
7663 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7664 software and hardware breakpoints.
7665 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7666 Check both software and hardware breakpoints.
7667 (validate_inserted_breakpoint): Assert the breakpoint is a
7668 software breakpoint. Set the inserted flag to -1 instead of
7669 setting shlib_disabled.
7670 (delete_disabled_breakpoints): Adjust.
7671 (validate_breakpoints): Only validate software breakpoints.
7672 Adjust to inserted flag change.
7673 (check_mem_read, check_mem_write): Skip breakpoint types other
7674 than software breakpoints. Adjust to inserted flag change.
7675 * mem-break.h (enum raw_bkpt_type): New enum.
7676 (raw_breakpoint, struct process_info): Forward declare.
7677 (Z_packet_to_target_hw_bp_type): Delete declaration.
7678 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7679 (set_gdb_breakpoint, delete_gdb_breakpoint)
7680 (clear_breakpoint_conditions): New declarations.
7681 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7682 (breakpoint_inserted_here): Update comment.
7683 (add_breakpoint_condition, add_breakpoint_commands): Replace
7684 address parameter with a breakpoint pointer parameter.
7685 (gdb_breakpoint_here): Update comment.
7686 (delete_gdb_breakpoint_at): Delete.
7687 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7688 * server.c (process_point_options): Take a struct breakpoint
7689 pointer instead of an address. Adjust.
7690 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7691 delete_gdb_breakpoint.
7692 * spu-low.c (spu_target_ops): Install NULL as
7693 supports_z_point_type method.
7694 * target.h: Include mem-break.h.
7695 (struct target_ops) <prepare_to_access_memory>: Update comment.
7696 <supports_z_point_type>: New field.
7697 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7698 instead of a char. Also take a raw breakpoint pointer.
7699 * win32-arm-low.c (the_low_target): Install NULL as
7700 supports_z_point_type.
7701 * win32-i386-low.c (i386_supports_z_point_type): New function.
7702 (i386_insert_point, i386_remove_point): Adjust to new interface.
7703 (the_low_target): Install i386_supports_z_point_type.
7704 * win32-low.c (win32_supports_z_point_type): New function.
7705 (win32_insert_point, win32_remove_point): Adjust to new interface.
7706 (win32_target_ops): Install win32_supports_z_point_type.
7707 * win32-low.h (struct win32_target_ops):
7708 <supports_z_point_type>: New method.
7709 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7710 instead of a char. Also take a raw breakpoint pointer.
7711
7712 2014-05-20 Pedro Alves <palves@redhat.com>
7713
7714 * mem-break.h: Include break-common.h.
7715 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7716 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7717 (Z_packet_to_target_hw_bp_type): New declaration.
7718 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7719 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7720 (Z_PACKET_ACCESS_WP): Delete macros.
7721 (Z_packet_to_hw_type): Delete function.
7722 * i386-low.h: Don't include break-common.h here.
7723 (Z_packet_to_hw_type): Delete declaration.
7724 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7725 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7726 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7727 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7728 * linux-aarch64-low.c: Don't include break-common.h here.
7729 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7730 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7731 (Z_packet_to_target_hw_bp_type): Delete function.
7732 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7733 function.
7734 (mips_insert_point, mips_remove_point): Use
7735 Z_packet_to_target_hw_bp_type.
7736
7737 2014-05-20 Pedro Alves <palves@redhat.com>
7738
7739 * linux-aarch64-low.c: Include break-common.h.
7740 (enum target_point_type): Delete.
7741 (Z_packet_to_point_type): Rename to ...
7742 (Z_packet_to_target_hw_bp_type): ... this, and return a
7743 target_hw_bp_type instead.
7744 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7745 instead of an enum target_point_type.
7746 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7747 breakpoint type.
7748 (aarch64_dr_state_insert_one_point)
7749 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7750 (aarch64_handle_aligned_watchpoint)
7751 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7752 Take an enum target_hw_bp_type instead of an enum
7753 target_point_type.
7754 (aarch64_supports_z_point_type): New function.
7755 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7756 use Z_packet_to_target_hw_bp_type.
7757
7758 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7759
7760 * configure.ac: Only use -Werror by default when DEVELOPMENT
7761 is true.
7762 * configure: Regenerate.
7763
7764 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7765
7766 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7767 * linux-x86-low.c (X86_64_USER_REGS): New.
7768 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7769
7770 2014-04-28 Yao Qi <yao@codesourcery.com>
7771
7772 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7773 name.
7774
7775 2014-04-25 Pedro Alves <palves@redhat.com>
7776
7777 PR server/16255
7778 * linux-low.c (linux_attach_fail_reason_string): New function.
7779 (linux_attach_lwp): Delete.
7780 (linux_attach_lwp_1): Rename to ...
7781 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7782 argument. Remove "initial" parameter. Return int instead of
7783 void. Don't error or warn here.
7784 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7785 failure to attach to the tgid. Call warning when failing to
7786 attach to an lwp.
7787 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7788 argument. Remove "initial" parameter. Return int instead of
7789 void. Don't error or warn here.
7790 (linux_attach_fail_reason_string): New declaration.
7791 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7792 interface change. Use linux_attach_fail_reason_string.
7793
7794 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7795 Walfred Tedeschi <walfred.tedeschi@intel.com>
7796
7797 * Makefile.in: Added rules to handle new files
7798 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7799 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7800 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7801 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7802 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7803 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7804 x32-avx512-linux.o.
7805 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7806 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7807 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7808 i386/x32-avx512.xml.
7809 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7810 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7811 i386/x32-avx512-linux.xml.
7812 * i387-fp.c (num_avx512_k_registers): New constant for number
7813 of K registers.
7814 (num_avx512_zmmh_low_registers): New constant for number of
7815 lower ZMM registers (0-15).
7816 (num_avx512_zmmh_high_registers): New constant for number of
7817 higher ZMM registers (16-31).
7818 (num_avx512_ymmh_registers): New contant for number of higher
7819 YMM registers (ymm16-31 added by avx521 on x86_64).
7820 (num_avx512_xmm_registers): New constant for number of higher
7821 XMM registers (xmm16-31 added by AVX512 on x86_64).
7822 (struct i387_xsave): Add space for AVX512 registers.
7823 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7824 Add code to handle AVX512 registers.
7825 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7826 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7827 prototypei from generated file.
7828 (tdesc_amd64_avx512_linux): Likewise.
7829 (init_registers_x32_avx512_linux): Likewise.
7830 (tdesc_x32_avx512_linux): Likewise.
7831 (init_registers_i386_avx512_linux): Likewise.
7832 (tdesc_i386_avx512_linux): Likewise.
7833 (x86_64_regmap): Add AVX512 registers.
7834 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7835 mask.
7836 (initialize_low_arch): Add code to initialize AVX512 registers.
7837
7838 2014-04-23 Pedro Alves <palves@redhat.com>
7839
7840 * mem-break.c (find_gdb_breakpoint_at): Make static.
7841 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7842
7843 2014-04-23 Pedro Alves <palves@redhat.com>
7844
7845 * i386-low.c: Don't include break-common.h here.
7846 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7847 prototype to take target_hw_bp_type as argument instead of a Z
7848 packet char.
7849 * i386-low.h: Include break-common.h here.
7850 (Z_packet_to_hw_type): Declare.
7851 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7852 prototypes.
7853 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7854 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7855 (x86_remove_point): Convert the packet number to a
7856 target_hw_bp_type before calling i386_low_remove_watchpoint.
7857 * win32-i386-low.c (i386_insert_point): Convert the packet number
7858 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7859 (i386_remove_point): Convert the packet number to a
7860 target_hw_bp_type before calling i386_low_remove_watchpoint.
7861
7862 2014-04-23 Pedro Alves <palves@redhat.com>
7863
7864 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7865
7866 2014-04-10 Pedro Alves <palves@redhat.com>
7867
7868 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7869 Check if the condition or command is NULL before checking if the
7870 breakpoint is known. On success, return true.
7871 * mem-break.h (add_breakpoint_condition): Document return.
7872 (add_breakpoint_commands): Add describing comment.
7873 * server.c (skip_to_semicolon): New function.
7874 (process_point_options): Use it.
7875
7876 2014-04-09 Pedro Alves <palves@redhat.com>
7877
7878 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7879 to lwpid_of.
7880
7881 2014-02-27 Pedro Alves <palves@redhat.com>
7882
7883 PR 12702
7884 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7885 macros.
7886 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7887 output.
7888 (last_thread_of_process_p): Take a PID argument instead of a
7889 thread pointer.
7890 (linux_wait_for_lwp): Delete.
7891 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7892 functions.
7893 (linux_low_filter_event): New function, party factored out from
7894 linux_wait_for_event.
7895 (linux_wait_for_event): Rename to ...
7896 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7897 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7898 sigsuspend. Check for zombie leaders.
7899 (linux_wait_for_event): Reimplement as wrapper around
7900 linux_wait_for_event_filtered.
7901 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7902 a normal or signal exit is seen, it's the whole process exiting.
7903 (wait_for_sigstop): No longer a for_each_inferior callback.
7904 Rewrite on top of linux_wait_for_event_filtered.
7905 (stop_all_lwps): Call wait_for_sigstop directly.
7906 * server.c (resume, handle_target_event): Handle
7907 TARGET_WAITKIND_NO_RESUMED.
7908
7909 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7910
7911 * win32-low.c (psapi_get_dll_name,
7912 * win32_CreateToolhelp32Snapshot): Delete.
7913 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7914 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7915 Delete.
7916 (handle_load_dll): Add function description.
7917 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7918
7919 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7920
7921 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7922 Add comment.
7923 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7924 base address when calling win32_add_one_solib.
7925 (handle_load_dll): Delete local variable load_addr.
7926 Remove 0x1000 offset applied to DLL base address when calling
7927 win32_add_one_solib.
7928 (handle_unload_dll): Add comment.
7929
7930 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7931
7932 * win32-low.c (win32_add_all_dlls): Renames
7933 win32_ensure_ntdll_loaded. Rewrite function documentation.
7934 Adjust implementation to always load all DLLs.
7935 Add 0x1000 offset to DLL base address when calling
7936 win32_add_one_solib.
7937 (child_initialization_done): New static global.
7938 (do_initial_child_stuff): Set child_initialization_done to
7939 zero during child initialization, and 1 after. Replace call
7940 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7941 Add comment.
7942 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7943 (handle_unload_dll): Add function documentation.
7944 (get_child_debug_event): Ignore load and unload DLL events
7945 during child initialization.
7946
7947 2014-02-20 Doug Evans <dje@google.com>
7948
7949 Remove global all_lwps.
7950 * inferiors.h (ptid_of): Move here from linux-low.h.
7951 (pid_of, lwpid_of): Ditto.
7952 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7953 parameter is a struct thread_info * now.
7954 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7955 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7956 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7957 directly.
7958 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7959 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7960 * linux-arm-low.c (update_registers_callback): Update, "entry"
7961 parameter is a struct thread_info * now.
7962 Fetch lwpid from current_inferior directly.
7963 (arm_insert_point): Pass &all_threads to find_inferior instead of
7964 &all_lwps.
7965 (arm_remove_point): Ditto.
7966 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7967 (arm_prepare_to_resume): Fetch pid from thread.
7968 (arm_read_description): Fetch lwpid from current_inferior directly.
7969 * linux-low.c (all_lwps): Delete.
7970 (delete_lwp): Delete call to remove_inferior.
7971 (handle_extended_wait): Fetch lwpid from thread.
7972 (add_lwp): Don't set lwp->entry.id. Remove call to
7973 add_inferior_to_list.
7974 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7975 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7976 (kill_one_lwp_callback): Ditto.
7977 (linux_kill): Don't dereference NULL pointer.
7978 Fetch ptid,lwpid from thread.
7979 (get_detach_signal): Fetch ptid from thread.
7980 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7981 Simplify call to regcache_invalidate_thread.
7982 (delete_lwp_callback): Update, "entry" parameter is a
7983 struct thread_info * now. Fetch pid from thread.
7984 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7985 (status_pending_p_callback): Update, "entry" parameter is a
7986 struct thread_info * now. Fetch ptid from thread.
7987 (find_lwp_pid): Update, "entry" parameter is a
7988 struct thread_info * now.
7989 (linux_wait_for_lwp): Fetch pid from thread.
7990 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7991 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7992 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7993 (dequeue_one_deferred_signal): Ditto.
7994 (cancel_breakpoint): Fetch ptid from current_inferior.
7995 (linux_wait_for_event): Pass &all_threads to find_inferior,
7996 not &all_lwps. Fetch ptid, lwpid from thread.
7997 (count_events_callback): Update, "entry" parameter is a
7998 struct thread_info * now.
7999 (select_singlestep_lwp_callback): Ditto.
8000 (select_event_lwp_callback): Ditto.
8001 (cancel_breakpoints_callback): Ditto.
8002 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8003 not &all_lwps.
8004 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8005 (unsuspend_one_lwp): Update, "entry" parameter is a
8006 struct thread_info * now.
8007 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8008 not &all_lwps.
8009 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8010 Fetch lwpid from thread, not lwp.
8011 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8012 Pass &all_threads to find_inferior, not &all_lwps.
8013 (send_sigstop): Fetch lwpid from thread, not lwp.
8014 (send_sigstop_callback): Update, "entry" parameter is a
8015 struct thread_info * now.
8016 (suspend_and_send_sigstop_callback): Ditto.
8017 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8018 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8019 struct thread_info * now.
8020 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8021 from thread, lwp.
8022 (lwp_running): Update, "entry" parameter is a
8023 struct thread_info * now.
8024 (stop_all_lwps): Fetch ptid from thread.
8025 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8026 (linux_resume_one_lwp): Fetch lwpid from thread.
8027 (linux_set_resume_request): Update, "entry" parameter is a
8028 struct thread_info * now. Fetch pid, lwpid from thread.
8029 (resume_status_pending_p): Update, "entry" parameter is a
8030 struct thread_info * now.
8031 (need_step_over_p): Ditto. Fetch lwpid from thread.
8032 (start_step_over): Fetch lwpid from thread.
8033 (linux_resume_one_thread): Update, "entry" parameter is a
8034 struct thread_info * now. Fetch lwpid from thread.
8035 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8036 (proceed_one_lwp): Update, "entry" parameter is a
8037 struct thread_info * now. Fetch lwpid from thread.
8038 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8039 struct thread_info * now.
8040 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8041 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8042 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8043 directly.
8044 (regsets_store_inferior_registers): Ditto.
8045 (fetch_register, store_register): Ditto.
8046 (linux_read_memory, linux_write_memory): Ditto.
8047 (linux_request_interrupt): Ditto.
8048 (linux_read_auxv): Ditto.
8049 (linux_xfer_siginfo): Ditto.
8050 (linux_qxfer_spu): Ditto.
8051 (linux_qxfer_libraries_svr4): Ditto.
8052 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8053 moved to inferiors.h.
8054 (get_lwp): Delete.
8055 (get_thread_lwp): Update.
8056 (struct lwp_info): Delete member "entry". Simplify comment for
8057 member "thread".
8058 (all_lwps): Delete.
8059 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8060 current_inferior directly.
8061 (update_watch_registers_callback): Update, "entry" parameter is a
8062 struct thread_info * now. Fetch pid from thread.
8063 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8064 (mips_insert_point): Fetch lwpid from current_inferior.
8065 Pass &all_threads to find_inferior, not &all_lwps.
8066 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8067 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8068 directly.
8069 (mips_stopped_data_address): Ditto.
8070 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8071 directly.
8072 * linux-tile-low.c (tile_arch_setup): Ditto.
8073 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8074 (update_debug_registers_callback): Update, "entry" parameter is a
8075 struct thread_info * now. Fetch pid from thread.
8076 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8077 Pass &all_threads to find_inferior, not &all_lwps.
8078 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8079 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8080 Pass &all_threads to find_inferior, not &all_lwps.
8081 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8082 (i386_dr_low_get_status): Ditto.
8083 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8084 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8085 (x86_linux_read_description): Ditto.
8086 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8087
8088 2014-02-20 Doug Evans <dje@google.com>
8089
8090 * inferiors.c (get_first_inferior): Fix buglet.
8091
8092 2014-02-19 Doug Evans <dje@google.com>
8093
8094 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8095 * inferiors.c (add_thread): Change result type to struct thread_info *.
8096 All callers updated.
8097 (add_lwp): Call add_thread here instead of in callers.
8098 All callers updated.
8099 * linux-low.h (get_lwp_thread): Rewrite.
8100 (struct lwp_info): New member "thread".
8101
8102 2014-02-19 Doug Evans <dje@google.com>
8103
8104 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8105 All callers updated.
8106
8107 2014-02-19 Doug Evans <dje@google.com>
8108
8109 * inferiors.c (add_thread): Fix whitespace.
8110
8111 2014-02-19 Doug Evans <dje@google.com>
8112
8113 * dll.c (clear_dlls): Replace accessing list implemention details
8114 with API function.
8115 * gdbthread.h (get_first_thread): Declare.
8116 * inferiors.c (for_each_inferior_with_data): New function.
8117 (get_first_thread): New function.
8118 (find_thread_ptid): Simplify.
8119 (get_first_inferior): New function.
8120 (clear_list): Delete.
8121 (one_inferior_p): New function.
8122 (clear_inferior_list): New function.
8123 (clear_inferiors): Update.
8124 * inferiors.h (for_each_inferior_with_data): Declare.
8125 (clear_inferior_list): Declare.
8126 (one_inferior_p): Declare.
8127 (get_first_inferior): Declare.
8128 * linux-low.c (linux_wait_for_event): Replace accessing list
8129 implemention details with API function.
8130 * server.c (target_running): Ditto.
8131 (accumulate_file_name_length): New function.
8132 (emit_dll_description): New function.
8133 (handle_qxfer_libraries): Replace accessing list implemention
8134 details with API function.
8135 (handle_qxfer_threads_worker): New function.
8136 (handle_qxfer_threads_proper): Replace accessing list implemention
8137 details with API function.
8138 (handle_query): Ditto.
8139 (visit_actioned_threads_callback_ftype): New typedef.
8140 (visit_actioned_threads_data): New struct.
8141 (visit_actioned_threads): Rewrite to be find_inferior callback.
8142 (resume): Call find_inferior.
8143 (handle_status): Replace accessing list implemention
8144 details with API function.
8145 (process_serial_event): Replace accessing list implemention details
8146 with API function.
8147 * target.c (set_desired_inferior): Replace accessing list implemention
8148 details with API function.
8149 * tracepoint.c (same_process_p): New function.
8150 (gdb_agent_about_to_close): Replace accessing list implemention
8151 details with API function.
8152 * win32-low.c (child_delete_thread): Replace accessing list
8153 implemention details with API function.
8154 (match_dll_by_basename): New function.
8155 (dll_is_loaded_by_basename): New function.
8156 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8157 details call to dll_is_loaded_by_basename.
8158
8159 2014-02-19 Doug Evans <dje@google.com>
8160
8161 * dll.h (struct dll_info): Add comment.
8162 * gdbthread.h (struct thread_info): Add comment.
8163 (current_ptid): Simplify.
8164 * inferiors.c (add_process): Update.
8165 (remove_process): Update.
8166 * inferiors.h (struct process_info): Rename member "head" to "entry".
8167 * linux-low.c (delete_lwp): Update.
8168 (add_lwp): Update.
8169 (last_thread_of_process_p): Update.
8170 (kill_one_lwp_callback, linux_kill): Update.
8171 (status_pending_p_callback): Update.
8172 (wait_for_sigstop): Update. Simplify read of ptid.
8173 (start_step_over): Update.
8174 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8175 (get_lwp_thread): Update.
8176 (struct lwp_info): Rename member "head" to "entry".
8177 * regcache.h (inferior_list_entry): Delete.
8178 * server.c (kill_inferior_callback): Update.
8179 (detach_or_kill_inferior_callback): Update.
8180 (print_started_pid): Update.
8181 (print_attached_pid): Update.
8182 (process_serial_event): Simplify read of ptid.
8183 * thread-db.c (thread_db_create_event): Update.
8184 (thread_db_get_tls_address): Update.
8185 * win32-low.c (current_inferior_ptid): Simplify.
8186
8187 2014-02-19 Tom Tromey <tromey@redhat.com>
8188
8189 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8190 argument.
8191 (target_supports_btrace): Update.
8192
8193 2014-02-14 Yao Qi <yao@codesourcery.com>
8194
8195 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8196 (rsp-low-ipa.o): New target.
8197
8198 2014-02-12 Tom Tromey <tromey@redhat.com>
8199
8200 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8201 convert_ascii_to_int.
8202 * regcache.c (registers_to_string): Likewise.
8203 * remote-utils.c (decode_M_packet): Likewise.
8204 * server.c (process_serial_event): Likewise.
8205
8206 2014-02-12 Tom Tromey <tromey@redhat.com>
8207
8208 * server.c (handle_query, handle_v_run): Use hex2bin, not
8209 unhexify.
8210 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8211
8212 2014-02-12 Tom Tromey <tromey@redhat.com>
8213
8214 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8215 convert_int_to_ascii.
8216 * regcache.c (registers_to_string, collect_register_as_string):
8217 Likewise.
8218 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8219 Likewise.
8220 * server.c (process_serial_event): Likewise.
8221 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8222 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8223
8224 2014-02-12 Tom Tromey <tromey@redhat.com>
8225
8226 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8227 bin2hex, not hexify.
8228 * tracepoint.c (cmd_qtstatus): Likewise.
8229
8230 2014-02-12 Tom Tromey <tromey@redhat.com>
8231
8232 * remote-utils.c (monitor_output): Pass explicit length to
8233 hexify.
8234
8235 2014-02-12 Tom Tromey <tromey@redhat.com>
8236
8237 * tracepoint.c: Include rsp-low.h.
8238 * server.c: Include rsp-low.h.
8239 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8240 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8241 declare.
8242 * remote-utils.c: Include rsp-low.h.
8243 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8244 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8245 (convert_int_to_ascii, convert_ascii_to_int): Move to
8246 common/rsp-low.c.
8247 * regcache.c: Include rsp-low.h.
8248 * ax.c: Include rsp-low.h.
8249 * Makefile.in (SFILES): Add common/rsp-low.c.
8250 (OBS): Add rsp-low.o.
8251 (rsp-low.o): New target.
8252
8253 2014-02-12 Tom Tromey <tromey@redhat.com>
8254
8255 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8256 Include print-utils.h.
8257 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8258 (plongest, thirty_two, phex_nz): Remove.
8259 * Makefile.in (SFILES): Add common/print-utils.c.
8260 (OBS): Add print-utils.o.
8261 (print-utils-ipa.o): New target.
8262 (print-utils.o): New target.
8263 (IPA_OBJS): Add print-utils-ipa.o.
8264
8265 2014-02-06 Tom Tromey <tromey@redhat.com>
8266
8267 * Makefile.in (SFILES): Fix indentation.
8268
8269 2014-02-05 Doug Evans <dje@google.com>
8270
8271 * linux-low.c (linux_wait_for_event): Improve comment.
8272 (linux_wait_1): Keep current_inferior in sync with event_child.
8273
8274 2014-01-22 Doug Evans <dje@google.com>
8275
8276 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8277
8278 2014-01-22 Doug Evans <dje@google.com>
8279
8280 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8281 * configure: Regenerate.
8282 * config.in: Regenerate.
8283 * Makefile.in (SFILES): Add debug.c.
8284 (OBS): Add debug.o.
8285 * debug.c: New file.
8286 * debug.h: New file.
8287 * linux-aarch64-low.c (*): Update all debugging printfs to use
8288 debug_printf instead of fprintf.
8289 * linux-arm-low.c (*): Ditto.
8290 * linux-cris-low.c (*): Ditto.
8291 * linux-crisv32-low.c (*): Ditto.
8292 * linux-m32r-low.c (*): Ditto.
8293 * linux-sparc-low.c (*): Ditto.
8294 * linux-x86.c (*): Ditto.
8295 * linux-low.c (*): Ditto.
8296 (linux_wait_1): Add calls to debug_enter, debug_exit.
8297 (linux_wait): Remove redundant debugging printf.
8298 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8299 (linux_resume, unstop_all_lwps): Ditto.
8300 * mem-break.c (*): Update all debugging printfs to use
8301 debug_printf instead of fprintf.
8302 * remote-utils.c (*): Ditto.
8303 * thread-db.c (*): Ditto.
8304 * server.c #include <ctype.h>, "gdb_vecs.h".
8305 (debug_threads): Moved to debug.c.
8306 (*): Update all debugging printfs to use debug_printf instead of
8307 fprintf.
8308 (start_inferior): Replace call to fflush with call to debug_flush.
8309 (monitor_show_help): Mention set debug-format.
8310 (parse_debug_format_options): New function.
8311 (handle_monitor_command): Handle "monitor set debug-format".
8312 (gdbserver_usage): Mention --debug-format.
8313 (main): Parse --debug-format.
8314 * server.h (debug_threads): Declaration moved to debug.h.
8315 #include "debug.h".
8316 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8317 trace_debug_1 that uses debug_printf.
8318 (tracepoint_look_up_symbols): Update all debugging printfs to use
8319 debug_printf instead of fprintf.
8320
8321 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8322
8323 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8324 sys/ptrace.h.
8325
8326 2014-01-17 Pedro Alves <palves@redhat.com>
8327
8328 PR build/16445
8329 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8330 defined after including gdb_proc_service.h.
8331
8332 2014-01-16 Doug Evans <dje@google.com>
8333
8334 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8335 (match_dll): Use it.
8336
8337 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8338
8339 * target.h (target_ops) <read_btrace>: Change parameters and
8340 return type to allow error reporting.
8341 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8342 trace reading errors on.
8343 * linux-low.c (linux_low_read_btrace): Pass trace reading
8344 errors on.
8345 (linux_low_disable_btrace): New.
8346
8347 2014-01-15 Doug Evans <dje@google.com>
8348
8349 * inferiors.c (thread_id_to_gdb_id): Delete.
8350 * inferiors.h (thread_id_to_gdb_id): Delete.
8351
8352 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8353
8354 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8355 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8356 versions.
8357
8358 2014-01-08 Pedro Alves <palves@redhat.com>
8359
8360 * server.c (handle_status): Don't discard previous queued stop
8361 replies or thread's pending status here.
8362 (main) <disconnection>: Do it here instead.
8363
8364 2014-01-08 Pedro Alves <palves@redhat.com>
8365
8366 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8367 * server.c (visit_actioned_threads, handle_pending_status): New
8368 function.
8369 (handle_v_cont): Factor out parts to ...
8370 (resume): ... this new function. If in all-stop, and a thread
8371 being resumed has a pending status, report it without actually
8372 resuming.
8373 (myresume): Adjust to use the new 'resume' function.
8374 (clear_pending_status_callback, set_pending_status_callback)
8375 (find_status_pending_thread_callback): New functions.
8376 (handle_status): Handle the case of multiple threads having
8377 interesting statuses to report. Report threads' real last signal
8378 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8379 with an interesting thread to report the status for, instead of
8380 always reporting the status of the first thread.
8381
8382 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8383
8384 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8385 * gdbreplay.c (gdbreplay_version): Likewise.
8386
8387 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8388
8389 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8390 iov.iov_len with the real length in use.
8391
8392 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8393
8394 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8395 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8396 for all targets that use win32-low.c.
8397 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8398 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8399
8400 2013-12-13 Pedro Alves <palves@redhat.com>
8401
8402 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8403 if equal to TARGET_WAITKIND_LOADED.
8404 * win32-low.c (cached_status): New static global.
8405 (win32_wait): Add declaration.
8406 (do_initial_child_stuff): Flush all initial pending debug events
8407 up to the initial breakpoint.
8408 (win32_wait): If CACHED_STATUS was set, return that instead
8409 of doing a real wait. Remove the code resuming the execution
8410 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8411 during the initial phase. Also remove the code changing
8412 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8413 TARGET_WAITKIND_STOPPED.
8414
8415 2013-12-11 Yao Qi <yao@codesourcery.com>
8416
8417 * notif.c (handle_notif_ack): Return 0 if no notification
8418 matches.
8419
8420 2013-11-20 Doug Evans <dje@google.com>
8421
8422 * linux-low.c (linux_set_resume_request): Fix comment.
8423
8424 2013-11-20 Doug Evans <dje@google.com>
8425
8426 * linux-low.c (resume_status_pending_p): Tweak comment.
8427
8428 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8429
8430 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8431 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8432 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8433 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8434 (srv_amd64_regobj): Add amd64-mpx.o.
8435 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8436 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8437 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8438 * i387-fp.c (num_pl_bnd_register) Added constant.
8439 (num_pl_bnd_cfg_registers) Added constant.
8440 (struct i387_xsave) Added reserved area and MPX fields.
8441 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8442 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8443 function.
8444 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8445 (init_registers_amd64_mpx_linux): Declare new function.
8446 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8447 (x86_64_regmap): Add MPX registers.
8448 (x86_linux_read_description): Add MPX case.
8449 (initialize_low_arch): Initialize MPX targets.
8450
8451 2013-11-18 Tom Tromey <tromey@redhat.com>
8452
8453 * configure: Rebuild.
8454 * configure.ac: Don't check for stdlib.h.
8455 * gdbreplay.c: Unconditionally include stdlib.h.
8456
8457 2013-11-18 Tom Tromey <tromey@redhat.com>
8458
8459 * config.in: Rebuild.
8460 * configure: Rebuild.
8461 * configure.ac: Don't use AC_HEADER_DIRENT.
8462
8463 2013-11-18 Tom Tromey <tromey@redhat.com>
8464
8465 * server.h: Don't check HAVE_STRING_H.
8466 * gdbreplay.c: Don't check HAVE_STRING_H.
8467 * configure: Rebuild.
8468
8469 2013-11-18 Tom Tromey <tromey@redhat.com>
8470
8471 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8472 LIBGNU.
8473
8474 2013-11-08 Tom Tromey <tromey@redhat.com>
8475
8476 * configure, config.in: Rebuild.
8477 * configure.ac: Remove unused configury.
8478
8479 2013-11-08 Tom Tromey <tromey@redhat.com>
8480
8481 * acinclude.m4: Include common.m4, codeset.m4.
8482 * configure, config.in: Rebuild.
8483 * configure.ac: Use GDB_AC_COMMON.
8484
8485 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8486
8487 * linux-s390-low.c (HWCAP_S390_TE): New define.
8488 (s390_arch_setup): Consider the TE field in the HWCAP for
8489 determining 'have_regset_tdb'.
8490
8491 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8492
8493 PR gdb/16014
8494 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8495 call to sizeof.
8496
8497 2013-10-02 Pedro Alves <palves@redhat.com>
8498
8499 * server.c (process_serial_event): Don't output "GDBserver
8500 exiting" if GDB is connected through stdio.
8501 * target.c (mywait): Likewise, be silent if GDB is connected
8502 through stdio.
8503
8504 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8505
8506 * lynx-low.c (lynx_add_threads_after_attach): New function.
8507 (lynx_attach): Remove call to add_thread. Add call to
8508 lynx_add_threads_after_attach instead.
8509
8510 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8511
8512 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8513 * config.in, configure: Regenerated.
8514
8515 2013-09-18 Yao Qi <yao@codesourcery.com>
8516
8517 PR server/15959
8518 * server.c (start_inferior): Clear 'resume_info'.
8519
8520 2013-09-16 Jiong Wang <jiwang@tilera.com>
8521
8522 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8523 for each register.
8524
8525 2013-09-16 Jiong Wang <jiwang@tilera.com>
8526
8527 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8528 linux-tile-low.o to srv_tgtobj.
8529
8530 2013-09-16 Will Newton <will.newton@linaro.org>
8531
8532 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8533 out regs.
8534
8535 2013-09-06 Pedro Alves <palves@redhat.com>
8536
8537 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8538 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8539 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8540 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8541 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8542 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8543
8544 2013-09-06 Pedro Alves <palves@redhat.com>
8545
8546 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8547 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8548
8549 2013-09-06 Pedro Alves <palves@redhat.com>
8550
8551 * linux-amd64-ipa.c: Include tracepoint.h.
8552 * linux-i386-ipa.c: Include tracepoint.h.
8553
8554 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8555
8556 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8557 (ps_get_thread_area): New function.
8558
8559 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8560
8561 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8562 (initialize_low_arch): Call init_registers_crisv32 rather than
8563 init_register_crisv32.
8564
8565 2013-09-05 Pedro Alves <palves@redhat.com>
8566
8567 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8568 to ...
8569 * hostio.h: ... this new file.
8570 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8571 win32-low.c: Include hostio.h.
8572
8573 2013-09-05 Pedro Alves <palves@redhat.com>
8574
8575 * server.h (gdb_client_data, handler_func, callback_handler_func)
8576 (delete_file_handler, add_file_handler, append_callback_event)
8577 (delete_callback_event, start_event_loop, initialize_event_loop):
8578 Move to event-loop.h and include it.
8579 * event-loop.h: New file.
8580
8581 2013-09-05 Pedro Alves <palves@redhat.com>
8582
8583 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8584 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8585 (loaded_dll, unloaded_dll): Move to ...
8586 * dll.h: ... this new file.
8587 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8588
8589 2013-09-05 Pedro Alves <palves@redhat.com>
8590
8591 * server.h (current_process, get_thread_process, all_processes)
8592 (add_inferior_to_list, for_each_inferior, current_inferior)
8593 (remove_inferior, add_process, remove_process, find_process_pid)
8594 (have_started_inferiors_p, have_attached_inferiors_p)
8595 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8596 (clear_inferiors, find_inferior, find_inferior_id)
8597 (inferior_target_data, set_inferior_target_data)
8598 (inferior_regcache_data, set_inferior_regcache_data): Move to
8599 inferiors.h, and include it.
8600 * inferiors.h: New file.
8601
8602 2013-09-05 Pedro Alves <palves@redhat.com>
8603
8604 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8605 Move ...
8606 * ax.h: ... here.
8607
8608 2013-09-05 Pedro Alves <palves@redhat.com>
8609
8610 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8611 tracepoint.h.
8612 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8613 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8614 (handle_tracepoint_general_set, handle_tracepoint_query)
8615 (tracepoint_finished_step, tracepoint_was_hit)
8616 (release_while_stepping_state_list, current_traceframe)
8617 (in_readonly_region, traceframe_read_mem)
8618 (fetch_traceframe_registers, traceframe_read_sdata)
8619 (traceframe_read_info, struct fast_tpoint_collect_status)
8620 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8621 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8622 (supply_fast_tracepoint_registers)
8623 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8624 (ipa_tdesc, claim_trampoline_space)
8625 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8626 (agent_mem_read, agent_get_trace_state_variable_value)
8627 (agent_set_trace_state_variable_value, agent_tsv_read)
8628 (agent_mem_read_string, get_raw_reg_func_addr)
8629 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8630 * tracepoint.h: ... this new file.
8631
8632 2013-09-05 Pedro Alves <palves@redhat.com>
8633
8634 * server.h (perror_with_name, error, fatal, warning, paddress)
8635 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8636 include it.
8637 * utils.h: New file.
8638
8639 2013-09-05 Pedro Alves <palves@redhat.com>
8640
8641 * server.h (remote_debug, noack_mode, transport_is_reliable)
8642 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8643 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8644 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8645 (write_enn, initialize_async_io, enable_async_io)
8646 (disable_async_io, check_remote_input_interrupt_request)
8647 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8648 (dead_thread_notify, prepare_resume_reply)
8649 (decode_address_to_semicolon, decode_address, decode_m_packet)
8650 (decode_M_packet, decode_X_packet, decode_xfer_write)
8651 (decode_search_memory_packet, unhexify, hexify)
8652 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8653 (look_up_one_symbol, relocate_instruction)
8654 (monitor_output): Move to remote-utils.h, and include it.
8655 * remote-utils.h: New file.
8656
8657 2013-09-05 Pedro Alves <palves@redhat.com>
8658
8659 * server.h (_): Delete.
8660
8661 2013-09-02 Pedro Alves <palves@redhat.com>
8662
8663 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8664 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8665 allocated.
8666 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8667
8668 2013-09-02 Pierre Muller <muller@sourceware.org>
8669
8670 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8671 or WriteProcessMemory complete successfully and handle
8672 ERROR_PARTIAL_COPY error.
8673
8674 2013-09-02 Pedro Alves <palves@redhat.com>
8675
8676 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8677 error instead of EIO.
8678
8679 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8680
8681 PR server/15604
8682 * linux-low.c: Include filestuff.h.
8683 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8684 * lynx-low.c: Include filestuff.h.
8685 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8686 * server.c: Include filestuff.h.
8687 (main): Call notice_open_fds.
8688 * spu-low.c: Include filestuff.h.
8689 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8690
8691 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8692
8693 * Makefile.in: Explain why ../target and ../nat are not
8694 listed as include file search paths.
8695 (linux-waitpid.o): New object file rule.
8696 * configure.srv (srv_native_linux_obj): New variable.
8697 Replace all occurrences of linux native object files with
8698 $srv_native_linux_obj.
8699 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8700 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8701 (linux_enable_event_reporting): Remove declaration.
8702 (my_waitpid): Moved to common/linux-waitpid.c.
8703 (linux_wait_for_event): Pass ptid when calling
8704 linux_enable_event_reporting.
8705 (linux_supports_tracefork_flag): Remove.
8706 (linux_enable_event_reporting): Likewise.
8707 (linux_tracefork_grandchild): Remove.
8708 (STACK_SIZE): Moved to common/linux-ptrace.c.
8709 (linux_tracefork_child): Remove.
8710 (linux_test_for_tracefork): Remove.
8711 (linux_look_up_symbols): Call linux_supports_traceclone.
8712 (initialize_low): Remove call to linux_test_for_tracefork.
8713 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8714 common/linux-ptrace.h.
8715 (PTRACE_TYPE_ARG4): Likewise.
8716 Include linux-ptrace.h.
8717
8718 2013-08-21 Pedro Alves <palves@redhat.com>
8719
8720 * config.in: Renegerate.
8721
8722 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8723
8724 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8725 (SFILES): Remove $(srcdir)/common/target-common.c and
8726 add $(srcdir)/target/waitstatus.c.
8727 (OBS): Remove target-common.o and add waitstatus.o.
8728 (server_h): Remove $(srcdir)/../common/target-common.h and
8729 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8730 and $(srcdir)/../target/waitstatus.h.
8731 (target-common.o): Remove.
8732 (waitstatus.o): New target object file.
8733 * target.h: Do not include target-common.h and
8734 include target/resume.h, target/wait.h and
8735 target/waitstatus.h.
8736
8737 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8738
8739 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8740 to PTRACE_TYPE_ARG3.
8741 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8742 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8743 PTRACE_TYPE_ARG4.
8744 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8745 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8746
8747 2013-07-27 Jie Zhang <jie@codesourcery.com>
8748 Daniel Jacobowitz <dan@codesourcery.com>
8749 Yao Qi <yao@codesourcery.com>
8750
8751 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8752 (mips-linux-watch.o): New rule.
8753 (mips_linux_watch_h): New variable.
8754 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8755 srv_tgtobj.
8756 * linux-mips-low.c: Include mips-linux-watch.h.
8757 (struct arch_process_info, struct arch_lwp_info): New.
8758 (update_watch_registers_callback): New function.
8759 (mips_linux_new_process, mips_linux_new_thread) New functions.
8760 (mips_linux_prepare_to_resume, mips_insert_point): New
8761 functions.
8762 (mips_remove_point, mips_stopped_by_watchpoint): New
8763 functions.
8764 (rsp_bp_type_to_target_hw_bp_type): New function.
8765 (mips_stopped_data_address): New function.
8766 (the_low_target): Add watchpoint support functions.
8767
8768 2013-07-27 Yao Qi <yao@codesourcery.com>
8769
8770 * i386-low.c: Include break-common.h.
8771 (enum target_hw_bp_type): Remove.
8772
8773 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8774
8775 * Makefile.in (SFILES): /common/target-common.c.
8776 (OBS): Add target-common.o.
8777 (server_h): Add $(srcdir)/../common/target-common.h.
8778 (target-common.o): New target.
8779 * server.c (queue_stop_reply_callback): Free
8780 status string after use.
8781 * target.c (target_waitstatus_to_string): Remove.
8782 * target.h: Include target-common.h.
8783 (resume_kind): Likewise.
8784 (target_waitkind): Likewise.
8785 (target_waitstatus): Likewise.
8786 (TARGET_WNOHANG): Likewise.
8787
8788 2013-07-04 Yao Qi <yao@codesourcery.com>
8789
8790 * Makefile.in (host_alias): Use @host_noncanonical@.
8791 (target_alias): Use @target_noncanonical@.
8792 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8793 ACX_NONCANONICAL_HOST.
8794 * configure: Regenerated.
8795
8796 Revert:
8797 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8798
8799 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8800 * configure: Rebuild.
8801 * Makefile.in (version_host, version_target): Get from configure.
8802 (version.c): Use $(version_host) and $(version_target).
8803
8804 2013-07-03 Pedro Alves <palves@redhat.com>
8805
8806 * Makefile.in (config.status): Depend on development.sh.
8807 * acinclude.m4: Include libmcheck.m4.
8808 * configure: Regenerate.
8809
8810 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8811
8812 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8813 attribute inside the parentheses.
8814 (winapi_DebugSetProcessKillOnExit): Ditto.
8815 (winapi_DebugBreakProcess): Ditto.
8816 (winapi_GenerateConsoleCtrlEvent): Ditto.
8817
8818 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8819
8820 * notif.h (notif_event): Add a dummy member to avoid compiler
8821 errors.
8822
8823 2013-07-01 Pedro Alves <palves@redhat.com>
8824
8825 * hostio.c (HOSTIO_PATH_MAX): Define.
8826 (require_filename, handle_open, handle_unlink, handle_readlink):
8827 Use it.
8828
8829 2013-07-01 Pedro Alves <palves@redhat.com>
8830
8831 * server.h: Include "pathmax.h".
8832 * linux-low.c: Don't include sys/param.h.
8833 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8834 MAXPATHLEN.
8835 * win32-low.c: Don't include sys/param.h.
8836 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8837
8838 2013-07-01 Pedro Alves <palves@redhat.com>
8839
8840 * event-loop.c: Don't check HAVE_UNISTD_H before including
8841 <unistd.h>.
8842 * gdbreplay.c: Likewise.
8843 * remote-utils.c: Likewise.
8844 * server.c: Likewise.
8845 * configure.ac: Don't check for unistd.h.
8846 * configure: Regenerate.
8847
8848 2013-06-28 Tom Tromey <tromey@redhat.com>
8849
8850 * Makefile.in (version.c): Use version.in, not
8851 common/version.in.
8852
8853 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8854
8855 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8856 * configure: Rebuild.
8857 * Makefile.in (version_host, version_target): Get from configure.
8858 (version.c): Use $(version_host) and $(version_target).
8859
8860 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8861
8862 Fix trace-status to output user name without trailing colon.
8863 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8864
8865 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8866
8867 Fix trace-status to output proper start-time and stop-time.
8868 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8869 output start time and stop time in hex as gdb expects.
8870
8871 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8872
8873 * tracepoint.c (build_traceframe_info_xml): Output trace state
8874 variables present in the trace buffer.
8875
8876 2013-06-24 Tom Tromey <tromey@redhat.com>
8877
8878 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8879 create-version.sh.
8880 (version.o): Remove.
8881 * gdbreplay.c: Include version.h.
8882 (version, host_name): Don't declare.
8883 * server.h: Include version.h.
8884 (version, host_name): Don't declare.
8885
8886 2013-06-12 Pedro Alves <palves@redhat.com>
8887
8888 * linux-x86-low.c (linux_is_elf64): Delete global.
8889 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8890 with local linux_pid_exe_is_elf_64_file use.
8891
8892 2013-06-11 Pedro Alves <palves@redhat.com>
8893
8894 * linux-low.c (regset_disabled, disable_regset): New functions.
8895 (regsets_fetch_inferior_registers)
8896 (regsets_store_inferior_registers): Use them.
8897 (initialize_regsets_info); Don't allocate the disabled_regsets
8898 array here.
8899 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8900 comment.
8901
8902 2013-06-11 Pedro Alves <palves@redhat.com>
8903
8904 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8905 xmalloc.
8906
8907 2013-06-11 Pedro Alves <palves@redhat.com>
8908
8909 * linux-x86-low.c (initialize_low_arch): Call
8910 init_registers_x32_avx_linux.
8911
8912 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8913
8914 Fix compatibility with Android Bionic.
8915 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8916 it is not empty.
8917
8918 2013-06-07 Pedro Alves <palves@redhat.com>
8919
8920 PR server/14823
8921 * Makefile.in (OBS): Add tdesc.o.
8922 (IPA_OBJS): Add tdesc-ipa.o.
8923 (tdesc-ipa.o): New rule.
8924 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8925 interface.
8926 * linux-low.c (new_inferior): Delete.
8927 (disabled_regsets, num_regsets): Delete.
8928 (linux_add_process): Adjust to set the new per-process
8929 new_inferior flag.
8930 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8931 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8932 was a stop. When calling arch_setup, switch the current inferior
8933 to the thread that got an event.
8934 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8935 (regsets_fetch_inferior_registers)
8936 (regsets_store_inferior_registers): New regsets_info parameter.
8937 Adjust to use it.
8938 (linux_register_in_regsets): New regs_info parameter. Adjust to
8939 use it.
8940 (register_addr, fetch_register, store_register): New usrregs_info
8941 parameter. Adjust to use it.
8942 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8943 parameter regs_info. Adjust to use it.
8944 (linux_fetch_registers): Get the current inferior's regs_info, and
8945 adjust to use it.
8946 (linux_store_registers): Ditto.
8947 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8948 (initialize_low): Don't initialize the target_regsets here. Call
8949 initialize_low_arch.
8950 * linux-low.h (target_regsets): Delete declaration.
8951 (struct regsets_info): New.
8952 (struct usrregs_info): New.
8953 (struct regs_info): New.
8954 (struct process_info_private) <new_inferior>: New field.
8955 (struct linux_target_ops): Delete the num_regs, regmap, and
8956 regset_bitmap fields. New field regs_info.
8957 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8958 * i387-fp.c (num_xmm_registers): Delete.
8959 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8960 calls to new interface.
8961 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8962 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8963 Infer the number of xmm registers from the regcache's target
8964 description.
8965 * i387-fp.h (num_xmm_registers): Delete.
8966 * inferiors.c (add_thread): Don't install the thread's regcache
8967 here.
8968 * proc-service.c (gregset_info): Fetch the current inferior's
8969 regs_info. Adjust to use it.
8970 * regcache.c: Include tdesc.h.
8971 (register_bytes, reg_defs, num_registers)
8972 (gdbserver_expedite_regs): Delete.
8973 (get_thread_regcache): If the thread doesn't have a regcache yet,
8974 create one, instead of aborting gdbserver.
8975 (regcache_invalidate_one): Rename to ...
8976 (regcache_invalidate_thread): ... this.
8977 (regcache_invalidate_one): New.
8978 (regcache_invalidate): Only invalidate registers of the current
8979 process.
8980 (init_register_cache): Add target_desc parameter, and use it.
8981 (new_register_cache): Ditto. Assert the target description has a
8982 non zero registers_size.
8983 (regcache_cpy): Add assertions. Adjust.
8984 (realloc_register_cache, set_register_cache): Delete.
8985 (registers_to_string, registers_from_string): Adjust.
8986 (find_register_by_name, find_regno, find_register_by_number)
8987 (register_cache_size): Add target_desc parameter, and use it.
8988 (free_register_cache_thread, free_register_cache_thread_one)
8989 (regcache_release, register_cache_size): New.
8990 (register_size): Add target_desc parameter, and use it.
8991 (register_data, supply_register, supply_register_zeroed)
8992 (supply_regblock, supply_register_by_name, collect_register)
8993 (collect_register_as_string, collect_register_by_name): Adjust.
8994 * regcache.h (struct target_desc): Forward declare.
8995 (struct regcache) <tdesc>: New field.
8996 (init_register_cache, new_register_cache): Add target_desc
8997 parameter.
8998 (regcache_invalidate_thread): Declare.
8999 (regcache_invalidate_one): Delete declaration.
9000 (regcache_release): Declare.
9001 (find_register_by_number, register_cache_size, register_size)
9002 (find_regno): Add target_desc parameter.
9003 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9004 declarations.
9005 * remote-utils.c: Include tdesc.h.
9006 (outreg, prepare_resume_reply): Adjust.
9007 * server.c: Include tdesc.h.
9008 (gdbserver_xmltarget): Delete declaration.
9009 (get_features_xml, process_serial_event): Adjust.
9010 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9011 declare.
9012 (struct process_info) <tdesc>: New field.
9013 (ipa_tdesc): Declare.
9014 * tdesc.c: New file.
9015 * tdesc.h: New file.
9016 * tracepoint.c: Include tdesc.h.
9017 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9018 (get_context_regcache): Adjust to pass ipa_tdesc down.
9019 (do_action_at_tracepoint): Adjust to get the register cache size
9020 from the context regcache's description.
9021 (traceframe_walk_blocks): Adjust to get the register cache size
9022 from the current trace frame's description.
9023 (traceframe_get_pc): Adjust to get current trace frame's
9024 description and pass it down.
9025 (gdb_collect): Adjust to get the register cache size from the
9026 IPA's description.
9027 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9028 (gdbserver_xmltarget): Delete.
9029 (initialize_low_tracepoint): Set the ipa's target description.
9030 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9031 (initialize_low_tracepoint): Set the ipa's target description.
9032 * linux-x86-low.c: Include tdesc.h.
9033 [__x86_64__] (is_64bit_tdesc): New.
9034 (ps_get_thread_area, x86_get_thread_area): Use it.
9035 (i386_cannot_store_register): Rename to ...
9036 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9037 (i386_cannot_fetch_register): Rename to ...
9038 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9039 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9040 to new interface.
9041 (target_regsets): Rename to ...
9042 (x86_regsets): ... this.
9043 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9044 interface.
9045 (x86_siginfo_fixup): Use is_64bit_tdesc.
9046 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9047 (tdesc_x32_avx_linux, tdesc_x32_linux)
9048 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9049 Declare.
9050 (x86_linux_update_xmltarget): Delete.
9051 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9052 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9053 (AMD64_LINUX_USER64_CS): New.
9054 (x86_linux_read_description): New, based on
9055 x86_linux_update_xmltarget.
9056 (same_process_callback): New.
9057 (x86_arch_setup_process_callback): New.
9058 (x86_linux_update_xmltarget): New.
9059 (x86_regsets_info): New.
9060 (amd64_linux_regs_info): New.
9061 (i386_linux_usrregs_info): New.
9062 (i386_linux_regs_info): New.
9063 (x86_linux_regs_info): New.
9064 (x86_arch_setup): Reimplement.
9065 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9066 (x86_emit_ops): Ditto.
9067 (the_low_target): Adjust. Install x86_linux_regs_info,
9068 x86_cannot_fetch_register, and x86_cannot_store_register.
9069 (initialize_low_arch): New.
9070 * linux-ia64-low.c (tdesc_ia64): Declare.
9071 (ia64_fetch_register): Adjust.
9072 (ia64_usrregs_info, regs_info): New globals.
9073 (ia64_regs_info): New function.
9074 (the_low_target): Adjust.
9075 (initialize_low_arch): New function.
9076 * linux-sparc-low.c (tdesc_sparc64): Declare.
9077 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9078 Adjust.
9079 (sparc_arch_setup): New function.
9080 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9081 (the_low_target): Adjust.
9082 (initialize_low_arch): New function.
9083 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9084 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9085 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9086 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9087 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9088 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9089 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9090 (tdesc_powerpc_isa205_vsx64l): Declare.
9091 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9092 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9093 (ppc_set_pc, ppc_get_hwcap): Adjust.
9094 (ppc_usrregs_info): Forward declare.
9095 (!__powerpc64__) ppc_regmap_adjusted: New global.
9096 (ppc_arch_setup): Adjust to the current process'es target
9097 description.
9098 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9099 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9100 (ppc_store_evrregset): Adjust.
9101 (target_regsets): Rename to ...
9102 (ppc_regsets): ... this, and make static.
9103 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9104 (ppc_regs_info): New function.
9105 (the_low_target): Adjust.
9106 (initialize_low_arch): New function.
9107 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9108 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9109 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9110 (tdesc_s390x_linux64v2): Declare.
9111 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9112 (s390_fill_gregset, s390_store_last_break): Adjust.
9113 (target_regsets): Rename to ...
9114 (s390_regsets): ... this, and make static.
9115 (s390_get_pc, s390_set_pc): Adjust.
9116 (s390_get_hwcap): New target_desc parameter, and use it.
9117 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9118 (s390_arch_setup): Adjust to set the current process'es target
9119 description. Don't adjust the regmap.
9120 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9121 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9122 (regs_info_3264): New globals.
9123 (s390_regs_info): New function.
9124 (the_low_target): Adjust.
9125 (initialize_low_arch): New function.
9126 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9127 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9128 [__mips64] (init_registers_mips_linux)
9129 (init_registers_mips_dsp_linux): Delete defines.
9130 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9131 (have_dsp): New global.
9132 (mips_read_description): New, based on mips_arch_setup.
9133 (mips_arch_setup): Reimplement.
9134 (get_usrregs_info): New function.
9135 (mips_cannot_fetch_register, mips_cannot_store_register)
9136 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9137 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9138 (target_regsets): Rename to ...
9139 (mips_regsets): ... this, and make static.
9140 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9141 (dsp_regs_info, regs_info): New globals.
9142 (mips_regs_info): New function.
9143 (the_low_target): Adjust.
9144 (initialize_low_arch): New function.
9145 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9146 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9147 Declare.
9148 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9149 (arm_read_description): New, with bits factored from
9150 arm_arch_setup.
9151 (arm_arch_setup): Reimplement.
9152 (target_regsets): Rename to ...
9153 (arm_regsets): ... this, and make static.
9154 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9155 (arm_regs_info): New function.
9156 (the_low_target): Adjust.
9157 (initialize_low_arch): New function.
9158 * linux-m68k-low.c (tdesc_m68k): Declare.
9159 (target_regsets): Rename to ...
9160 (m68k_regsets): ... this, and make static.
9161 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9162 (m68k_regs_info): New function.
9163 (m68k_arch_setup): New function.
9164 (the_low_target): Adjust.
9165 (initialize_low_arch): New function.
9166 * linux-sh-low.c (tdesc_sharch): Declare.
9167 (target_regsets): Rename to ...
9168 (sh_regsets): ... this, and make static.
9169 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9170 (sh_regs_info, sh_arch_setup): New functions.
9171 (the_low_target): Adjust.
9172 (initialize_low_arch): New function.
9173 * linux-bfin-low.c (tdesc_bfin): Declare.
9174 (bfin_arch_setup): New function.
9175 (bfin_usrregs_info, regs_info): New globals.
9176 (bfin_regs_info): New function.
9177 (the_low_target): Adjust.
9178 (initialize_low_arch): New function.
9179 * linux-cris-low.c (tdesc_cris): Declare.
9180 (cris_arch_setup): New function.
9181 (cris_usrregs_info, regs_info): New globals.
9182 (cris_regs_info): New function.
9183 (the_low_target): Adjust.
9184 (initialize_low_arch): New function.
9185 * linux-cris-low.c (tdesc_crisv32): Declare.
9186 (cris_arch_setup): New function.
9187 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9188 (cris_regs_info): New function.
9189 (the_low_target): Adjust.
9190 (initialize_low_arch): New function.
9191 * linux-m32r-low.c (tdesc_m32r): Declare.
9192 (m32r_arch_setup): New function.
9193 (m32r_usrregs_info, regs_info): New globals.
9194 (m32r_regs_info): Adjust.
9195 (initialize_low_arch): New function.
9196 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9197 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9198 (tic6x_usrregs_info): Forward declare.
9199 (tic6x_read_description): New function, based on ...
9200 (tic6x_arch_setup): ... this. Reimplement.
9201 (target_regsets): Rename to ...
9202 (tic6x_regsets): ... this, and make static.
9203 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9204 (tic6x_regs_info): New function.
9205 (the_low_target): Adjust.
9206 (initialize_low_arch): New function.
9207 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9208 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9209 (target_regsets): Rename to ...
9210 (xtensa_regsets): ... this, and make static.
9211 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9212 globals.
9213 (xtensa_arch_setup, xtensa_regs_info): New functions.
9214 (the_low_target): Adjust.
9215 (initialize_low_arch): New function.
9216 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9217 (nios2_arch_setup): Set the current process'es tdesc.
9218 (target_regsets): Rename to ...
9219 (nios2_regsets): ... this.
9220 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9221 (nios2_regs_info): New function.
9222 (the_low_target): Adjust.
9223 (initialize_low_arch): New function.
9224 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9225 (aarch64_arch_setup): Set the current process'es tdesc.
9226 (target_regsets): Rename to ...
9227 (aarch64_regsets): ... this.
9228 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9229 (aarch64_regs_info): New function.
9230 (the_low_target): Adjust.
9231 (initialize_low_arch): New function.
9232 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9233 globals.
9234 (target_regsets): Rename to ...
9235 (tile_regsets): ... this.
9236 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9237 (tile_regs_info): New function.
9238 (tile_arch_setup): Set the current process'es tdesc.
9239 (the_low_target): Adjust.
9240 (initialize_low_arch): New function.
9241 * spu-low.c (tdesc_spu): Declare.
9242 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9243 * win32-arm-low.c (tdesc_arm): Declare.
9244 (arm_arch_setup): New function.
9245 (the_low_target): Install arm_arch_setup instead of
9246 init_registers_arm.
9247 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9248 (init_windows_x86): Rename to ...
9249 (i386_arch_setup): ... this. Set `win32_tdesc'.
9250 (the_low_target): Adjust.
9251 * win32-low.c (win32_tdesc): New global.
9252 (child_add_thread): Don't create the thread cache here.
9253 (do_initial_child_stuff): Set the new process'es tdesc.
9254 * win32-low.h (struct target_desc): Forward declare.
9255 (win32_tdesc): Declare.
9256 * lynx-i386-low.c (tdesc_i386): Declare global.
9257 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9258 * lynx-low.c (lynx_tdesc): New global.
9259 (lynx_add_process): Set the new process'es tdesc.
9260 * lynx-low.h (struct target_desc): Forward declare.
9261 (lynx_tdesc): Declare global.
9262 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9263 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9264 * nto-low.c (nto_tdesc): New global.
9265 (do_attach): Set the new process'es tdesc.
9266 * nto-low.h (struct target_desc): Forward declare.
9267 (nto_tdesc): Declare.
9268 * nto-x86-low.c (tdesc_i386): Declare.
9269 (nto_x86_arch_setup): Set `nto_tdesc'.
9270
9271 2013-06-04 Gary Benson <gbenson@redhat.com>
9272
9273 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9274 to qSupported response when appropriate.
9275 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9276 with nonzero-length annex.
9277 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9278 arguments supplied in annex.
9279
9280 2013-05-31 Doug Evans <dje@google.com>
9281
9282 PR server/15594
9283 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9284 64 bits in 64-cross-32 environment.
9285
9286 2013-05-28 Pedro Alves <palves@redhat.com>
9287
9288 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9289 (aarch64-without-fpu.c): Delete rule.
9290 * configure.srv (aarch64*-*-linux*): Remove references to
9291 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9292 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9293 declaration.
9294
9295 2013-05-24 Pedro Alves <palves@redhat.com>
9296
9297 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9298 instead of strchr/decode_address. Error if the range isn't split
9299 with a ','. Don't assume there's be a ':' in the action.
9300
9301 2013-05-23 Yao Qi <yao@codesourcery.com>
9302 Pedro Alves <palves@redhat.com>
9303
9304 * linux-low.c (lwp_in_step_range): New function.
9305 (linux_wait_1): If the thread was range stepping and stopped
9306 outside the stepping range, report the stop to GDB. Otherwise,
9307 continue stepping. Add range stepping debug output.
9308 (linux_set_resume_request): Copy the step range from the resume
9309 request to the lwp.
9310 (linux_supports_range_stepping): New.
9311 (linux_target_ops) <supports_range_stepping>: Set to
9312 linux_supports_range_stepping.
9313 * linux-low.h (struct linux_target_ops)
9314 <supports_range_stepping>: New field.
9315 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9316 * linux-x86-low.c (x86_supports_range_stepping): New.
9317 (the_low_target) <supports_range_stepping>: Set to
9318 x86_supports_range_stepping.
9319 * server.c (handle_v_cont): Handle 'r' action.
9320 (handle_v_requests): Append ";r" if the target supports range
9321 stepping.
9322 * target.h (struct thread_resume) <step_range_start,
9323 step_range_end>: New fields.
9324 (struct target_ops) <supports_range_stepping>:
9325 New field.
9326 (target_supports_range_stepping): New macro.
9327
9328 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9329
9330 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9331 confusion in comment.
9332
9333 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9334
9335 * lynx-low.c (struct process_info_private): New type.
9336 (lynx_add_process): New function.
9337 (lynx_create_inferior, lynx_attach): Replace calls to
9338 add_process by calls to lynx_add_process.
9339 (lynx_resume): If PTID is null, then try using
9340 current_process()->private->last_wait_event_ptid.
9341 Add comments.
9342 (lynx_clear_inferiors): Delete. The contents of that function
9343 has been inlined in lynx_mourn;
9344 (lynx_wait_1): Save the ptid in the process's private data.
9345 (lynx_mourn): Free the process' private data. Replace call
9346 to lynx_clear_inferiors by call to clear_inferiors.
9347
9348 2013-05-17 Yao Qi <yao@codesourcery.com>
9349
9350 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9351 the right place.
9352
9353 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9354
9355 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9356 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9357 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9358 PT_TEXT_END_ADDR guards. Update comments.
9359 (linux_target_op) <read_offsets>: Conditionally define to
9360 linux_read_offsets if the target is UCLIBC and if it defines
9361 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9362
9363 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9364 Andrew Jenner <andrew@codesourcery.com>
9365
9366 * Makefile.in (SFILES): Add linux-nios2-low.c.
9367 (clean): Add action to delete nios2-linux.c.
9368 (nios2-linux.c): New rule.
9369 * configure.srv: Add nios2*-*-linux*.
9370 * linux-nios2-low.c: New.
9371
9372 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9373
9374 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9375
9376 2013-04-25 Hui Zhu <hui@codesourcery.com>
9377
9378 PR gdb/15186
9379 * ax.c (ax_printf): Add fflush.
9380
9381 2013-04-22 Tom Tromey <tromey@redhat.com>
9382
9383 * Makefile.in (SFILES): Add filestuff.c.
9384 (OBS): Add filestuff.o.
9385 (filestuff.o): New target.
9386 * config.in, configure: Rebuild.
9387 * configure.ac: Check for fdwalk, pipe2.
9388
9389 2013-04-17 Pedro Alves <palves@redhat.com>
9390
9391 * configure.ac (USE_THREAD_DB): Delete variable.
9392 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9393 Don't AC_SUBST USE_THREAD_DB.
9394 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9395 * config.in, configure: Regenerate.
9396
9397 2013-04-16 Pedro Alves <palves@redhat.com>
9398
9399 * linux-low.h (struct lwp_info) <thread_known>: Move under
9400 the USE_THREAD_DB #ifdef.
9401
9402 2013-04-16 Pedro Alves <palves@redhat.com>
9403
9404 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9405 (linux-low.o): Delete rule.
9406 * linux-low.h: Always include "gdb_thread_db.h" instead of
9407 conditionally including thread_db.h.
9408 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9409 HAVE_THREAD_DB_H.
9410
9411 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9412
9413 * Makefile.in (install-only): Fix make install regression.
9414
9415 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9416
9417 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9418 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9419 installation.
9420 * gdbserver.1: Remove.
9421
9422 2013-03-22 Pedro Alves <palves@redhat.com>
9423
9424 * linux-low.c (handle_extended_wait): Don't call
9425 linux_enable_event_reporting.
9426
9427 2013-03-15 Tony Theodore <tonyt@logyst.com>
9428
9429 PR build/9098:
9430 * Makefile.in (SHELL): Use @SHELL@.
9431
9432 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9433
9434 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9435 compiler warning.
9436
9437 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9438
9439 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9440 Remove extraneous NULL element.
9441
9442 2013-03-13 Yao Qi <yao@codesourcery.com>
9443
9444 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9445 'V' block in trace frame.
9446
9447 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9448
9449 * target.h (struct target_ops): Add btrace ops.
9450 (target_supports_btrace): New macro.
9451 (target_enable_btrace): New macro.
9452 (target_disable_btrace): New macro.
9453 (target_read_btrace): New macro.
9454 * gdbthread.h (struct thread_info): Add btrace field.
9455 * server.c: Include btrace-common.h.
9456 (handle_btrace_general_set): New function.
9457 (handle_btrace_enable): New function.
9458 (handle_btrace_disable): New function.
9459 (handle_general_set): Call handle_btrace_general_set.
9460 (handle_qxfer_btrace): New function.
9461 (struct qxfer qxfer_packets[]): Add btrace entry.
9462 * inferiors.c (remove_thread): Disable btrace.
9463 * linux-low: Include linux-btrace.h.
9464 (linux_low_enable_btrace): New function.
9465 (linux_low_read_btrace): New function.
9466 (linux_target_ops): Add btrace ops.
9467 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9468 Add srv_linux_btrace=yes.
9469 (x86_64-*-linux*): Add linux-btrace.o.
9470 Add srv_linux_btrace=yes.
9471 * configure.ac: Define HAVE_LINUX_BTRACE.
9472 * config.in: Regenerated.
9473 * configure: Regenerated.
9474
9475 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9476
9477 * server.c (handle_qxfer): Preserve error message if -3 is
9478 returned.
9479 (qxfer): Document the -3 return value.
9480
9481 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9482
9483 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9484 (linux_btrace_h): New variable.
9485 (linux-btrace.o): New rule.
9486
9487 2013-03-08 Stan Shebs <stan@codesourcery.com>
9488 Hafiz Abid Qadeer <abidh@codesourcery.com>
9489
9490 * tracepoint.c (trace_buffer_size): New global.
9491 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9492 (init_trace_buffer): Change to one-argument function. Allocate
9493 trace buffer memory.
9494 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9495 handle QTBuffer:size packet.
9496 (cmd_bigqtbuffer_size): New function.
9497 (initialize_tracepoint): Call init_trace_buffer with
9498 DEFAULT_TRACE_BUFFER_SIZE.
9499 * server.c (handle_query): Add QTBuffer:size in the
9500 supported packets.
9501
9502 2013-03-07 Yao Qi <yao@codesourcery.com>
9503
9504 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9505 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9506 of -1.
9507 (cmd_qtsp): Adjust condition. Do post increment.
9508 Set cur_action and cur_step_action back to 0.
9509
9510 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9511
9512 PR server/15236
9513 * linux-low.c (linux_write_memory): Return early success if LEN is
9514 zero.
9515
9516 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9517
9518 * configure.srv: Add x86_64-*-cygwin* as target.
9519
9520 2013-02-28 Tom Tromey <tromey@redhat.com>
9521
9522 * configure.ac: Invoke AC_SYS_LARGEFILE.
9523 * configure, config.in: Rebuild.
9524
9525 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9526
9527 * win32-low.c: Throughout, fix format strings and casts of
9528 printf-like functions to avoid type related warnings on all
9529 platforms.
9530 (get_child_debug_event): Print dwDebugEventCode as hex since
9531 that's how it's usually documented.
9532
9533 2013-02-28 Yao Qi <yao@codesourcery.com>
9534
9535 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9536 pulongest.
9537
9538 2013-02-27 Jiong Wang <jiwang@tilera.com>
9539
9540 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9541 (reg-tilegx32.c): New rule.
9542 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9543 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9544 different register info initializer according to elf class.
9545 (init_registers_tilgx32): New function. The tilegx32 register info
9546 initializer.
9547 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9548 (tile_store_gregset): Likewise.
9549
9550 2013-02-27 Yao Qi <yao@codesourcery.com>
9551
9552 * server.c (process_point_options): Print debug message when
9553 debug_threads is true.
9554
9555 2013-02-26 Yao Qi <yao@codesourcery.com>
9556
9557 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9558
9559 2013-02-19 Pedro Alves <palves@redhat.com>
9560 Kai Tietz <ktietz@redhat.com>
9561
9562 PR gdb/15161
9563
9564 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9565 instead of strtoul to extract address from packet.
9566 (process_serial_event) <'z'>: Likewise.
9567
9568 2013-02-18 Yao Qi <yao@codesourcery.com>
9569
9570 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9571
9572 2013-02-14 Pedro Alves <palves@redhat.com>
9573
9574 Plug memory leak.
9575
9576 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9577 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9578
9579 2013-02-14 Pedro Alves <palves@redhat.com>
9580
9581 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9582
9583 2013-02-14 Pedro Alves <palves@redhat.com>
9584
9585 * tracepoint.c (save_string): Delete.
9586 (add_tracepoint_action): Use savestring instead of save_string.
9587
9588 2013-02-12 Pedro Alves <palves@redhat.com>
9589
9590 * linux-xtensa-low.c: Ditto.
9591 * xtensa-xtregs.c: Ditto.
9592
9593 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9594
9595 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9596 thread_db.
9597
9598 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9599
9600 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9601 aarch64_num_wp_regs and aarch64_num_bp_regs to
9602 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9603
9604 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9605
9606 * linux-aarch64-low.c (ps_get_thread_area): Replace
9607 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9608
9609 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9610 Marcus Shawcroft <marcus.shawcroft@arm.com>
9611 Nigel Stephens <nigel.stephens@arm.com>
9612 Yufeng Zhang <yufeng.zhang@arm.com>
9613
9614 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9615 (aarch64.c, aarch64-without-fpu.c): New targets.
9616 * configure.srv (aarch64*-*-linux*): New.
9617 * linux-aarch64-low.c: New file.
9618
9619 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9620
9621 * linux-low.c (handle_extended_wait, linux_create_inferior)
9622 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9623 (dequeue_one_deferred_signal, linux_resume_one_thread)
9624 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9625 (linux_tracefork_grandchild, linux_test_for_tracefork)
9626 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9627 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9628 where the argument is 0.
9629
9630 2013-01-25 Yao Qi <yao@codesourcery.com>
9631
9632 * event-loop.c: Include "queue.h".
9633 (gdb_event_p): New typedef.
9634 (struct gdb_event) <next_event>: Remove.
9635 (event_queue): Change to QUEUE(gdb_event_p).
9636 (async_queue_event): Remove.
9637 (gdb_event_xfree): New.
9638 (initialize_event_loop): New.
9639 (process_event): Use API from QUEUE.
9640 (wait_for_event): Likewise.
9641 * server.c (main): Call initialize_event_loop.
9642 * server.h (initialize_event_loop): Declare.
9643
9644 2013-01-18 Yao Qi <yao@codesourcery.com>
9645
9646 * ax.h (struct eval_agent_expr_context): New.
9647 (gdb_eval_agent_expr): Update declaration.
9648 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9649 TFRAME. Add new argument CTX.
9650 * server.h (struct eval_agent_expr_context): Declare.
9651 (agent_mem_read, agent_tsv_read): Update declaration.
9652 (agent_mem_read_string): Likewise.
9653 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9654 (add_traceframe_block): Add new argument TPOINT.
9655 Increase TPOINT->traceframe_usage.
9656 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9657 eval_tracepoint_agent_expr.
9658 (condition_true_at_tracepoint): Likewise.
9659 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9660 (agent_mem_read_string, agent_tsv_read): Likewise.
9661
9662 2013-01-16 Yao Qi <yao@codesourcery.com>
9663
9664 * linux-low.c (linux_resume_one_lwp): Don't check
9665 'lwp->bp_reinsert != 0'.
9666
9667 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9668 Pedro Alves <palves@redhat.com>
9669
9670 * lynx-low.c (ptrace_request_to_str): Define a temporary
9671 macro and use it to simplify this function's implementation.
9672
9673 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9674
9675 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9676 sets errno.
9677
9678 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9679
9680 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9681
9682 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9683
9684 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9685
9686 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9687
9688 * lynx-low.c (lynx_resume): Use the resume_info parameter
9689 to determine the ptid for the lynx_ptrace call, unless
9690 it is equal to minus_one_ptid, in which case we use the
9691 ptid of the current_inferior.
9692 (lynx_wait_1): After having received a thread create/exit
9693 event, resume the inferior's execution using the signaling
9694 thread's ptid, rather than the old ptid.
9695
9696 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9697
9698 * lynx-low.c (lynx_resume): Delete variable ret.
9699
9700 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9701
9702 * gdbreplay.c (gdbreplay_version): Update copyright year.
9703 * server.c (gdbserver_version): Likewise.
9704
9705 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9706
9707 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9708 new thread.
9709
9710 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9711
9712 * lynx-low.c (ptrace_request_to_str): Add handling for
9713 PTRACE_GETTRACESIG.
9714
9715 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9716
9717 * lynx-low.c (lynx_attach): Delete variable new_process.
9718
9719 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9720
9721 * lynx-low.c (lynx_create_inferior): Delete variable
9722 new_process.
9723
9724 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9725
9726 * lynx-low.c (ptrace_request_to_str): Do not handle
9727 PTRACE_GETTHREADLIST if this macro does not exist.
9728
9729 2012-12-15 Yao Qi <yao@codesourcery.com>
9730
9731 * Makefile.in (OBS): Add notif.o.
9732 * notif.c, notif.h: New.
9733 * server.c: Include "notif.h".
9734 (struct vstop_notif) <next>: Remove.
9735 <base>: New field.
9736 (queue_stop_reply): Update.
9737 (push_event, send_next_stop_reply): Remove.
9738 (discard_queued_stop_replies): Update.
9739 (notif_stop): New variable.
9740 (handle_v_stopped): Remove.
9741 (handle_v_requests): Don't call handle_v_stopped. Call
9742 handle_ack_notif instead.
9743 (queue_stop_reply_callback): Call notif_event_enque instead
9744 of queue_stop_reply.
9745 (handle_status): Don't call send_next_stop_reply, call
9746 notif_write_event instead.
9747 (kill_inferior_callback): Likewise.
9748 (detach_or_kill_inferior_callback): Likewise.
9749 (main): Call initialize_notif.
9750 (process_serial_event): Call QUEUE_is_empty.
9751 (handle_target_event): Call notif_push instead of push event.
9752 * server.h (push_event): Remove declaration.
9753
9754 2012-12-10 Tom Tromey <tromey@redhat.com>
9755
9756 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9757 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9758 macros.
9759 (.c.o): Rewrite.
9760 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9761 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9762 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9763 (amd64-linux-ipa.o, ax.o): Rewrite.
9764 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9765 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9766 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9767 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9768 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9769 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9770 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9771 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9772 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9773 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9774 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9775 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9776 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9777 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9778 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9779 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9780 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9781 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9782 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9783 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9784 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9785 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9786 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9787 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9788 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9789 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9790 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9791 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9792 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9793 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9794 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9795 (reg-tilegx.o): Remove.
9796 (all_object_files): New macro.
9797 Include .deps files.
9798 * aclocal.m4, configure: Rebuild.
9799 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9800 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9801 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9802
9803 2012-12-05 Tom Tromey <tromey@redhat.com>
9804
9805 PR gdb/14917:
9806 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9807
9808 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9809
9810 * configure.ac: Check for linux/perf_event.h.
9811 * config.in: Regenerated.
9812 * configure: Regenerated.
9813
9814 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9815
9816 * hostio.c (handle_readlink): Decrease buffer size
9817 parameter passed to readlink by one byte.
9818
9819 2012-11-26 Yao Qi <yao@codesourcery.com>
9820
9821 * configure.ac (build_warnings): Append '-Wempty-body'.
9822 * configure: Regenerated.
9823 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9824 body.
9825
9826 2012-11-15 Pierre Muller <muller@sourceware.org>
9827
9828 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9829 * config.in: Regenerate.
9830 * configure: Regenerate.
9831 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9832 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9833 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9834 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9835 header.
9836 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9837 instead of <sys/wait.h> header.
9838 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9839
9840 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9841
9842 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9843 (various make rules): Remove -DGDBSERVER
9844
9845 2012-11-09 Yao Qi <yao@codesourcery.com>
9846
9847 * spu-low.c (current_ptid): Move it to ..
9848 * gdbthread.h: ... here. New.
9849 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9850 * server.c (myresume, process_serial_event): Likewise.
9851 * thread-db.c (thread_db_find_new_threads): Likewise.
9852 * tracepoint.c (run_inferior_command): Likewise.
9853
9854 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9855
9856 * server.c (handle_search_memory_1): Include access length in
9857 warning message.
9858
9859 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9860
9861 * linux-crisv32-low.c: Fix compile errors.
9862
9863 2012-09-04 Yao Qi <yao@codesourcery.com>
9864
9865 * tracepoint.c (cmd_qtsv): Adjust debug message.
9866 Don't check CUR_TPOINT.
9867
9868 2012-08-28 Yao Qi <yao@codesourcery.com>
9869
9870 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9871 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9872 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9873 Remove declarations of xmalloc, xreallloc, xstrdup and
9874 freeargv.
9875 * Makefile.in (libiberty_h): New.
9876 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9877 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9878
9879 2012-08-23 Yao Qi <yao@codesourcery.com>
9880
9881 * server.h: Remove declaration of 'xsnprintf'.
9882
9883 2012-08-22 Keith Seitz <keiths@redhat.com>
9884
9885 * server.h: Include build-gnulib-gbserver/config.h.
9886 * gdbreplay.c: Likewise.
9887
9888 2012-08-08 Doug Evans <dje@google.com>
9889
9890 * Makefile.in (SFILES): Add gdb_vecs.c.
9891 (OBS): Add gdb_vecs.o.
9892 (gdb_vecs_h, host_defs_h): New variables.
9893 (thread-db.o): Add $(gdb_vecs_h) dependency.
9894 (gdb_vecs.o): New rule.
9895 * thread-db.c: #include "gdb_vecs.h".
9896 (thread_db_load_search): Use a vector to iterate over path elements.
9897 Handle text appearing after "$pdir".
9898
9899 * configure.ac: Add check for strstr.
9900 * config.in: Regenerate.
9901 * configure: Regenerate.
9902
9903 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9904
9905 * hostio.c (handle_pread): If pread fails, fall back to attempting
9906 lseek/read.
9907 (handle_pwrite): Likewise for pwrite.
9908
9909 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9910
9911 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9912 between unsupported TYPE and unimplementable ADDR/LEN combination.
9913 (arm_insert_point): Act on new return value.
9914
9915 2012-07-31 Pedro Alves <palves@redhat.com>
9916
9917 * server.c (process_point_options): Only skip tokens if we find
9918 one that is unrecognized. Don't treat 'X' specially while
9919 skipping unrecognized tokens.
9920
9921 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9922
9923 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9924 to 4-byte-align HW breakpoint addresses for Thumb.
9925
9926 2012-07-27 Yao Qi <yao@codesourcery.com>
9927
9928 PR remote/14161.
9929
9930 * server.h: Declare gdb_agent_about_to_close.
9931 * target.c (kill_inferior): Include "agent.h".
9932 New. Send command 'kill'.
9933 * target.h (kill_inferior): Removed macro.
9934 * tracepoint.c (gdb_agent_about_to_close): New.
9935 (gdb_agent_helper_thread): Handle command 'close'.
9936 Wait endlessly until the inferior stops.
9937 Install gdb_agent_remove_socket to atexit hook.
9938 (agent_socket_name): New static variable.
9939 (gdb_agent_socket_init): Replace local variable 'name' with
9940 'agent_socket_name'.
9941 (gdb_agent_remove_socket): New.
9942
9943 2012-07-27 Yao Qi <yao@codesourcery.com>
9944
9945 * server.c (process_point_options): Stop at 'X' when parsing.
9946
9947 2012-07-19 Michael Eager <eager@eagercon.com>
9948
9949 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9950 to hw_execute.
9951 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9952 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9953 hardware breakpoint.
9954
9955 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9956
9957 * gdbserver/linux-low.c (initialize_low): Call
9958 linux_ptrace_init_warnings.
9959
9960 2012-07-02 Doug Evans <dje@google.com>
9961
9962 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9963 pointer to int.
9964
9965 2012-07-02 Stan Shebs <stan@codesourcery.com>
9966
9967 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9968 (ax.o): Add it to build rule.
9969 (ax-ipa.o): Ditto.
9970 (OBS): Add format.o.
9971 (IPA_OBS): Add format.o.
9972 * server.c (handle_query): Claim support for breakpoint commands.
9973 (process_point_options): Add command case.
9974 (process_serial_event): Leave running if there are printfs in
9975 effect.
9976 * mem-break.h (any_persistent_commands): Declare.
9977 (add_breakpoint_commands): Declare.
9978 (gdb_no_commands_at_breakpoint): Declare.
9979 (run_breakpoint_commands): Declare.
9980 * mem-break.c (struct point_command_list): New struct.
9981 (struct breakpoint): New field command_list.
9982 (any_persistent_commands): New function.
9983 (add_commands_to_breakpoint): New function.
9984 (add_breakpoint_commands): New function.
9985 (gdb_no_commands_at_breakpoint): New function.
9986 (run_breakpoint_commands): New function.
9987 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9988 locally.
9989 * ax.c: Include format.h.
9990 (ax_printf): New function.
9991 (gdb_eval_agent_expr): Add printf opcode.
9992
9993 2012-06-13 Yao Qi <yao@codesourcery.com>
9994
9995 * server.c (start_inferior): Remove duplicated writes to fields
9996 'last_resume_kind' and 'last_status' of 'current_inferior'.
9997
9998 2012-06-12 Yao Qi <yao@codesourcery.com>
9999 Pedro Alves <palves@redhat.com>
10000
10001 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10002 comment.
10003 * server.c (handle_v_cont): Extend comment.
10004
10005 2012-06-11 Yao Qi <yao@codesourcery.com>
10006
10007 * linux-low.c (linux_attach): Add 'static'.
10008
10009 2012-06-06 Yao Qi <yao@codesourcery.com>
10010
10011 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10012
10013 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10014
10015 Fix gcc -flto compilation warning.
10016 * server.c (main): Make variable multi_mode and attach volatile.
10017
10018 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10019
10020 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10021 if the platform doesn't know about it.
10022
10023 2012-05-30 Jeff Kenton <jkenton@tilera.com>
10024
10025 * Makefile.in (SFILES): Add linux-tile-low.c.
10026 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10027 * configure.srv: Handle tilegx-*-linux*.
10028 * linux-tile-low.c: New file.
10029
10030 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10031
10032 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10033
10034 2012-05-24 Pedro Alves <palves@redhat.com>
10035
10036 PR gdb/7205
10037
10038 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10039
10040 2012-05-24 Pedro Alves <palves@redhat.com>
10041
10042 PR gdb/7205
10043
10044 Replace target_signal with gdb_signal throughout.
10045
10046 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10047
10048 * linux-low.c (linux_store_registers): Avoid the copying sequence
10049 when no data has been retrieved by ptrace.
10050
10051 2012-05-22 Will Deacon <will.deacon@arm.com>
10052
10053 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10054 Include asm/ptrace.h.
10055 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10056 already defined.
10057
10058 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10059
10060 * linux-low.c (linux_store_registers): Don't re-retrieve data
10061 with ptrace that has already been obtained from /proc. Always
10062 copy any data retrieved with ptrace to the buffer supplied.
10063
10064 2012-05-11 Yao Qi <yao@codesourcery.com>
10065 Pedro Alves <palves@redhat.com>
10066
10067 * linux-low.c (enum stopping_threads_kind): New.
10068 (stopping_threads): Change type to `enum stopping_threads_kind'.
10069 (handle_extended_wait): If stopping and suspending threads, leave
10070 the new_lwp suspended too.
10071 (linux_wait_for_event): Adjust.
10072 (stop_all_lwps): Set `stopping_threads' to
10073 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10074 whether we're suspending threads or just stopping them. Assert no
10075 recursion happens.
10076
10077 2012-04-29 Yao Qi <yao@codesourcery.com>
10078
10079 * server.h: Move some code to ...
10080 * gdbthread.h: ... here. New.
10081 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10082 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10083 (nto-low.o, win32-low.o): Likewise.
10084 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10085 * regcache.c, remote-utils.c, server.c: Likewise.
10086 * target.c, tracepoint.c, win32-low.c: Likewise.
10087
10088 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10089
10090 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10091 (PTRACE_ARG4_TYPE): Likewise.
10092 (PTRACE_XFER_TYPE): Likewise.
10093 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10094 ptrace to PTRACE_ARG3_TYPE.
10095 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10096 (PTRACE_ARG4_TYPE): Likewise.
10097 (PTRACE_XFER_TYPE): Likewise.
10098 (linux_detach_one_lwp): Cast fourth argument of
10099 ptrace to long then PTRACE_ARG4_TYPE.
10100 (regsets_fetch_inferior_registers): Cast third argument of
10101 ptrace to long then PTRACE_ARG3_TYPE.
10102 (regsets_store_inferior_registers): Likewise.
10103
10104 2012-04-20 Pedro Alves <palves@redhat.com>
10105
10106 * configure: Regenerate.
10107
10108 2012-04-19 Pedro Alves <palves@redhat.com>
10109
10110 * Makefile.in (GNULIB_BUILDDIR): New.
10111 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10112 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10113 (all, install-only, uninstall, clean-info, all-lib, clean): No
10114 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10115 (maintainer-clean realclean distclean): Use subdir_do.
10116 (subdir_do): New.
10117 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10118 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10119 * acinclude.m4: Include acx_configure_dir.m4.
10120 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10121 calls. Call AC_PROG_RANLIB. Configure gnulib using
10122 ACX_CONFIGURE_DIR.
10123 (GNULIB): New.
10124 (GNULIB_STDINT_H): Adjust.
10125 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10126 * gdbreplay.c: Include build-gnulib/config.h.
10127 * server.h: Likewise.
10128 * aclocal.m4: Regenerate.
10129 * config.in: Regenerate.
10130 * configure: Regenerate.
10131
10132 2012-04-19 Pedro Alves <palves@redhat.com>
10133
10134 * Makefile.in (LIBGNU, INCGNU): Adjust.
10135 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10136 (all, install-only, uninstall, clean-info, all-lib, clean)
10137 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10138 * configure.ac: Adjust AC_OUTPUT output.
10139 * aclocal.m4: Regenerate.
10140 * configure: Regenerate.
10141
10142 2012-04-19 Pedro Alves <palves@redhat.com>
10143
10144 * Makefile.in (generated_files): New.
10145 (server_h): Remove the explicit dependency on config.h, and depend
10146 on $generated_files.
10147
10148 2012-04-19 Pedro Alves <palves@redhat.com>
10149
10150 * Makefile.in (INCGNU): Add -Ignulib.
10151
10152 2012-04-19 Pedro Alves <palves@redhat.com>
10153
10154 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10155 (INCGNU): ... this, and spell out -I here.
10156 (GNULIB_LIB): Rename to ...
10157 (LIBGNU): ... this.
10158 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10159
10160 2012-04-19 Pedro Alves <palves@redhat.com>
10161
10162 * config.in: Regenerate.
10163
10164 2012-04-19 Pedro Alves <palves@redhat.com>
10165
10166 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10167 * server.h (memmem): Remove declaration.
10168 * config.in: Regenerate.
10169 * configure: Regenerate.
10170
10171 2012-04-19 Yao Qi <yao@codesourcery.com>
10172
10173 * Makefile.in (SFILES): Add common/vec.c.
10174 (OBS): Add vec.o.
10175 (vec.o): New rule.
10176
10177 2012-04-19 Yao Qi <yao@codesourcery.com>
10178
10179 * remote-utils.c (prepare_resume_reply): Replace with macro
10180 target_core_of_thread.
10181 * server.c (handle_qxfer_threads_proper): Likewise.
10182 * target.h (traget_core_of_thread): New macro.
10183
10184 2012-04-18 Pedro Alves <palves@redhat.com>
10185
10186 * aclocal.m4: Regenerate.
10187 * configure: Regenerate.
10188
10189 2012-04-16 Yao Qi <yao@codesourcery.com>
10190
10191 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10192 duplicated on address.
10193
10194 2012-04-16 Yao Qi <yao@codesourcery.com>
10195
10196 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10197 (struct tracepoint_action_ops) <send>: New field.
10198 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10199 (agent_expr_send, x_tracepoint_action_send): New.
10200 (l_tracepoint_action_send): New.
10201 (cmd_qtdp): Download and install tracepoint
10202 according to `use_agent'.
10203 (run_inferior_command): Add one more parameter `len'.
10204 Update callers.
10205 (tracepoint_send_agent): New.
10206 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10207
10208 2012-04-16 Yao Qi <yao@codesourcery.com>
10209
10210 * tracepoint.c (download_tracepoints): Moved to ...
10211 (cmd_qtstart): ... here.
10212
10213 2012-04-14 Yao Qi <yao@codesourcery.com>
10214
10215 * tracepoint.c: Include inttypes.h.
10216 (struct collect_memory_action): Use sized types.
10217 (struct tracepoint): Likewise.
10218 (cmd_qtdp, stop_tracing): Update print specifiers.
10219 (cmd_qtp, response_tracepoint): Likewise.
10220 (collect_data_at_tracepoint): Likewise.
10221 (collect_data_at_step): Likewise.
10222
10223 2012-04-14 Yao Qi <yao@codesourcery.com>
10224
10225 Import gnulib module inttypes.
10226 * aclocal.m4, config.in, configure: Regenerated.
10227
10228 2012-04-14 Yao Qi <yao@codesourcery.com>
10229
10230 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10231 Makefile and config.status at last.
10232
10233 2012-04-13 Yao Qi <yao@codesourcery.com>
10234
10235 * tracepoint.c: Include stdint.h unconditionally.
10236
10237 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10238
10239 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10240 on BFD_HAVE_SYS_PROCFS_TYPE.
10241 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10242 * configure: Regenerate.
10243 * config.in: Likewise.
10244
10245 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10246
10247 * Makefile.in (clean): Also remove x32.c x32-linux.c
10248 x32-avx.c x32-avx-linux.c.
10249 (x32.o): New target.
10250 (x32.c): Likewise.
10251 (x32-linux.o): Likewise.
10252 (x32-linux.c): Likewise.
10253 (x32-avx.o): Likewise.
10254 (x32-avx.c): Likewise.
10255 (x32-avx-linux.o): Likewise.
10256 (x32-avx-linux.c): Likewise.
10257
10258 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10259 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10260 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10261 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10262 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10263 i386/x32-avx-linux.xml.
10264
10265 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10266 (init_registers_x32_avx_linux): Likwise.
10267 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10268 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10269
10270 2012-04-13 Pedro Alves <palves@redhat.com>
10271
10272 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10273 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10274 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10275 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10276 the sub-make.
10277
10278 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10279
10280 * linux-x86-low.c (compat_x32_clock_t): New.
10281 (compat_x32_siginfo_t): Likewise.
10282 (compat_x32_siginfo_from_siginfo): Likewise.
10283 (siginfo_from_compat_x32_siginfo): Likewise.
10284 (linux_is_elf64): Likewise.
10285 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10286 and siginfo_from_compat_x32_siginfo for x32.
10287 (x86_arch_setup): Set linux_is_elf64.
10288
10289 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10290
10291 PR gdb/13969
10292 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10293 e_machine field.
10294 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10295 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10296 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10297 compatible with process.
10298
10299 2012-04-12 Yao Qi <yao@codesourcery.com>
10300
10301 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10302 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10303 (install-only, install-info, clean): Handle sub dir gnulib.
10304 (all-lib, am--refresh): New targets.
10305 (memmem.o): Remove target.
10306 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10307 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10308 (AC_REPLACE_FUNCS): Remove memmem.
10309 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10310 (AC_OUTPUT): Generate Makefile in gnulib/.
10311 * aclocal.m4, config.in, configure: Regenerated.
10312
10313 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10314
10315 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10316
10317 2012-04-05 Pedro Alves <palves@redhat.com>
10318
10319 -Werror=strict-aliasing
10320
10321 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10322 pointer.
10323
10324 2012-04-04 Pedro Alves <palves@redhat.com>
10325
10326 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10327 (sparc_store_gregset_from_stack, sparc_store_gregset)
10328 (sparc_breakpoint_at): Fix formatting.
10329
10330 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10331
10332 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10333 are available.
10334 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10335 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10336 * config.in: Regenerate.
10337 * configure: Likewise.
10338
10339 2012-03-29 Pedro Alves <palves@redhat.com>
10340
10341 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10342 Correct ptrace arguments.
10343
10344 2012-03-28 Pedro Alves <palves@redhat.com>
10345
10346 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10347 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10348 (IA64_FR1_REGNUM): New defines.
10349 (ia64_fetch_register): New.
10350 (the_low_target): Install it.
10351 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10352 field.
10353 * linux-low.c (linux_fetch_registers): Try the
10354 the_low_target.fetch_register hook first.
10355
10356 * linux-arm-low.c (the_low_target): Adjust.
10357 * linux-bfin-low.c (the_low_target): Adjust.
10358 * linux-cris-low.c (the_low_target): Adjust.
10359 * linux-crisv32-low.c (the_low_target): Adjust.
10360 * linux-m32r-low.c (the_low_target): Adjust.
10361 * linux-m68k-low.c (the_low_target): Adjust.
10362 * linux-mips-low.c (the_low_target): Adjust.
10363 * linux-ppc-low.c (the_low_target): Adjust.
10364 * linux-s390-low.c (the_low_target): Adjust.
10365 * linux-sh-low.c (the_low_target): Adjust.
10366 * linux-sparc-low.c (the_low_target): Adjust.
10367 * linux-tic6x-low.c (the_low_target): Adjust.
10368 * linux-x86-low.c (the_low_target): Adjust.
10369 * linux-xtensa-low.c (the_low_target): Adjust.
10370
10371 2012-03-26 Pedro Alves <palves@redhat.com>
10372
10373 * server.c (handle_qxfer_libraries): Don't bail early if
10374 the_target->qxfer_libraries_svr4 is not NULL.
10375
10376 2012-03-26 Pedro Alves <palves@redhat.com>
10377
10378 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10379
10380 2012-03-23 Pedro Alves <palves@redhat.com>
10381
10382 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10383 "library-list-svr4" element's start tag when the the DSO list is
10384 empty.
10385
10386 2012-03-23 Pedro Alves <palves@redhat.com>
10387
10388 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10389 a variable whose type size is the same as the inferior's pointer
10390 size.
10391
10392 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10393
10394 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10395 struct siginfo.
10396 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10397 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10398 * linux-low.h: Include <signal.h>.
10399 (struct siginfo): Remove forward declaration.
10400 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10401 struct siginfo.
10402
10403 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10404
10405 * .gitignore: Ignore more files.
10406
10407 2012-03-19 Pedro Alves <palves@redhat.com>
10408 Jan Kratochvil <jan.kratochvil@redhat.com>
10409
10410 * server.c (cont_thread, general_thread): Add describing comments.
10411 (start_inferior): Clear `cont_thread'.
10412 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10413 of a process.
10414
10415 2012-03-15 Yao Qi <yao@codesourcery.com>
10416
10417 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10418 handling to ...
10419 (cmd_qtdp): ... here.
10420
10421 2012-03-15 Yao Qi <yao@codesourcery.com>
10422
10423 * tracepoint.c (struct tracepoint_action_ops): New.
10424 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10425 (m_tracepoint_action_download): New.
10426 (r_tracepoint_action_download): New.
10427 (x_tracepoint_action_download): New.
10428 (l_tracepoint_action_download): New.
10429 (add_tracepoint_action): Install `action->ops' according type.
10430 (download_tracepoint_1): Move code `download' function pointer
10431 of various tracepoint_action_ops.
10432
10433 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10434
10435 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10436 linux_ptrace_attach_warnings.
10437
10438 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10439
10440 * Makefile.in (linux-ptrace.o): New.
10441 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10442 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10443 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10444 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10445 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10446 of these targets.
10447 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10448
10449 2012-03-08 Yao Qi <yao@codesourcery.com>
10450 Pedro Alves <palves@redhat.com>
10451
10452 Fix PR server/13392.
10453 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10454 offset of JMP insn.
10455 * tracepoint.c (remove_tracepoint): New.
10456 (cmd_qtdp): Call remove_tracepoint when failed to install.
10457
10458 2012-03-07 Pedro Alves <palves@redhat.com>
10459
10460 * linux-low.c (get_detach_signal): New.
10461 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10462 Pass on pending signals to PTRACE_DETACH. Check the result of the
10463 ptrace call.
10464 * server.c (program_signals, program_signals_p): New.
10465 (handle_general_set): Handle QProgramSignals.
10466 * server.h (program_signals, program_signals_p): Declare.
10467
10468 2012-03-05 Pedro Alves <palves@redhat.com>
10469 Jan Kratochvil <jan.kratochvil@redhat.com>
10470
10471 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10472 New comment why.
10473
10474 2012-03-03 Yao Qi <yao@codesourcery.com>
10475
10476 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10477 agent_look_up_symbols.
10478
10479 2012-03-03 Yao Qi <yao@codesourcery.com>
10480
10481 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10482 (linux-x86-low.o): Likewise.
10483 * server.h: Remove in_process_agent_loaded.
10484 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10485 common/agent.c.
10486 Update callers.
10487
10488 2012-03-03 Yao Qi <yao@codesourcery.com>
10489
10490 * tracepoint.c (gdb_agent_capability): New global.
10491 (in_process_agent_loaded_ust): Renamed to
10492 `in_process_agent_supports_ust'.
10493 Update callers.
10494 (in_process_agent_supports_ust): Call agent_capability_check.
10495 (clear_installed_tracepoints): Assert that agent supports
10496 agent.
10497
10498 2012-03-03 Yao Qi <yao@codesourcery.com>
10499
10500 * linux-low.c (linux_supports_agent): New.
10501 (linux_target_ops): Initialize field `supports_agent' with
10502 linux_supports_agent.
10503 * target.h (struct target_ops) <supports_agent>: New.
10504 (target_supports_agent): New macro.
10505 * server.c (handle_general_set): Handle packet 'QAgent'.
10506 (handle_query): Send `QAgent+'.
10507 * Makefile.in (server.o): Depends on agent.h.
10508
10509 2012-03-03 Yao Qi <yao@codesourcery.com>
10510
10511 * Makefile.in (OBS): Add agent.o.
10512 Add new rule for agent.o.
10513 Track dependence of tracepoint.c on agent.h.
10514 * tracepoint.c (run_inferior_command_1):
10515 (run_inferior_command): Call agent_run_command.
10516 (gdb_ust_connect_sync_socket): Deleted. Move it to
10517 common/agent.c.
10518 (resume_thread, stop_thread): Likewise.
10519 (gdb_ust_socket_init): Renamed to ...
10520 (gdb_agent_socket_init): ... New.
10521 (gdb_ust_thread): Renamed to ...
10522 (gdb_agent_helper_thread): ... New.
10523 (gdb_ust_init): Move some code to ...
10524 (gdb_agent_init): ... here. New.
10525 [HAVE_UST]: Call gdb_ust_init.
10526 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10527 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10528 * config.in, configure: Regenerated.
10529
10530 2012-03-02 Pedro Alves <palves@redhat.com>
10531
10532 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10533 * linux-low.c (struct simple_pid_list): New.
10534 (stopped_pids): New a struct simple_pid_list pointer.
10535 (add_to_pid_list, pull_pid_from_list): New.
10536 (handle_extended_wait): Don't assume the first signal new children
10537 report is SIGSTOP. Adjust call to pull_pid_from_list.
10538 (linux_wait_for_lwp): Adjust.
10539
10540 2012-03-02 Yao Qi <yao@codesourcery.com>
10541
10542 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10543 debug log.
10544
10545 2012-03-02 Yao Qi <yao@codesourcery.com>
10546
10547 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10548 `stop_pc' and `tpoint'. Update caller.
10549
10550 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10551
10552 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10553 * linux-low.c (use_linux_regsets): New macro.
10554 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10555 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10556 (linux_register_in_regsets): New function.
10557 (usr_fetch_inferior_registers): Skip registers covered by
10558 regsets.
10559 (usr_store_inferior_registers): Likewise.
10560 (usr_fetch_inferior_registers): New macro.
10561 (usr_store_inferior_registers): Likewise.
10562 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10563 (linux_store_registers): Likewise.
10564 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10565 prototype.
10566 (init_registers_mips64_dsp_linux): Likewise.
10567 (init_registers_mips_linux): New macro.
10568 (init_registers_mips_dsp_linux): Likewise.
10569 (mips_dsp_num_regs): Likewise.
10570 (DSP_BASE, DSP_CONTROL): New fallback macros.
10571 (mips_base_regs): New macro.
10572 (mips_regmap): Use it. Fix the size.
10573 (mips_dsp_regmap): New variable.
10574 (mips_dsp_regset_bitmap): Likewise.
10575 (mips_arch_setup): New function.
10576 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10577 than mips_regmap.
10578 (mips_cannot_store_register): Likewise.
10579 (the_low_target): Update .arch_setup, .num_regs and .regmap
10580 initializers. Add .regset_bitmap initializer.
10581 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10582 initializer.
10583 * linux-bfin-low.c (the_low_target): Likewise.
10584 * linux-cris-low.c (the_low_target): Likewise.
10585 * linux-crisv32-low.c (the_low_target): Likewise.
10586 * linux-ia64-low.c (the_low_target): Likewise.
10587 * linux-m32r-low.c (the_low_target): Likewise.
10588 * linux-m68k-low.c (the_low_target): Likewise.
10589 * linux-ppc-low.c (the_low_target): Likewise.
10590 * linux-s390-low.c (the_low_target): Likewise.
10591 * linux-sh-low.c (the_low_target): Likewise.
10592 * linux-sparc-low.c (the_low_target): Likewise.
10593 * linux-tic6x-low.c (the_low_target): Likewise.
10594 * linux-x86-low.c (the_low_target): Likewise.
10595 * linux-xtensa-low.c (the_low_target): Likewise.
10596 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10597 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10598 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10599 srv_xmlfiles.
10600 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10601 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10602
10603 2012-02-29 Yao Qi <yao@codesourcery.com>
10604 Pedro Alves <palves@redhat.com>
10605
10606 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10607 `step_over_finished' is true.
10608
10609 2012-02-27 Pedro Alves <palves@redhat.com>
10610
10611 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10612 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10613
10614 2012-02-27 Pedro Alves <palves@redhat.com>
10615
10616 PR server/9684
10617 * linux-low.c (pid_is_stopped): New.
10618 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10619
10620 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10621
10622 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10623 of conditions.
10624
10625 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10626
10627 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10628
10629 2012-02-24 Luis Machado <lgustavo@codesourcery>
10630
10631 * server.c (handle_query): Advertise support for target-side
10632 breakpoint condition evaluation.
10633 (process_point_options): New function.
10634 (process_serial_event): When inserting a breakpoint, check for
10635 a target-side condition that should be evaluated.
10636
10637 * mem-break.c: Include regcache.h and ax.h.
10638 (point_cond_list_t): New data structure.
10639 (breakpoint) <cond_list>: New field.
10640 (find_gdb_breakpoint_at): Make non-static.
10641 (delete_gdb_breakpoint_at): Clear any target-side
10642 conditions.
10643 (clear_gdb_breakpoint_conditions): New function.
10644 (add_condition_to_breakpoint): Likewise.
10645 (add_breakpoint_condition): Likewise.
10646 (gdb_condition_true_at_breakpoint): Likewise.
10647 (gdb_breakpoint_here): Return result directly instead
10648 of going through a local variable.
10649
10650 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10651 (clear_gdb_breakpoint_conditions): Likewise.
10652 (add_breakpoint_condition): Likewise.
10653 (gdb_condition_true_at_breakpoint): Likewise.
10654
10655 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10656 (need_step_over_p): Take target-side breakpoint condition into
10657 consideration.
10658
10659 2012-02-24 Luis Machado <lgustavo@codesourcery>
10660
10661 * server.h: Include tracepoint.h.
10662 (agent_mem_read, agent_get_trace_state_variable_value,
10663 agent_set_trace_state_variable_value,
10664 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10665 get_set_tsv_func_addr): New prototypes.
10666
10667 * ax.h: New include file.
10668 * ax.c: New source file.
10669
10670 * tracepoint.c: Include ax.h.
10671 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10672 agent_expr, eval_result_type): Move to ax.h.
10673 (parse_agent_expr): Rename to ...
10674 (gdb_parse_agent_expr): ... this, make it non-static and move
10675 to ax.h.
10676 (unparse_agent_expr) Rename to ...
10677 (gdb_unparse_agent_expr): ... this, make it non-static and move
10678 to ax.h.
10679 (eval_agent_expr): Rename to ...
10680 (eval_tracepoint_agent_expr): ... this.
10681 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10682 forward declarations.
10683 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10684 (agent_get_trace_state_variable_value): New function.
10685 (agent_set_trace_state_variable_value): New function.
10686 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10687 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10688 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10689 (condition_true_at_tracepoint): Likewise.
10690 (parse_agent_expr): Rename to ...
10691 (gdb_parse_agent_expr): ... this and move to ax.c.
10692 (unparse_agent_expr): Rename to ...
10693 (gdb_unparse_agent_expr): ... this and move to ax.c.
10694 (gdb_agent_op_name): Move to ax.c.
10695 (eval_agent_expr): Rename to ...
10696 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10697 and move to ax.c.
10698 (eval_tracepoint_agent_expr): New function.
10699 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10700 non-static.
10701 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10702 ax.c.
10703 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10704 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10705 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10706 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10707 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10708 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10709 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10710 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10711 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10712 (compile_bytecodes): Remove forward declaration.
10713 (is_goto_target): Move to ax.c.
10714 (compile_bytecodes): Move to ax.c and call
10715 agent_get_trace_state_variable_value (...) and
10716 agent_set_trace_state_variable_value (...).
10717
10718 * Makefile.in: Update ax.c and IPA dependencies.
10719
10720 2012-02-24 Pedro Alves <palves@redhat.com>
10721
10722 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10723 (cmd_bigqtbuffer_circular): ... this. Only handle
10724 'QTBuffer:circular:'.
10725 (handle_tracepoint_general_set): Adjust.
10726
10727 2012-02-16 Yao Qi <yao@codesourcery.com>
10728
10729 * inferiors.c: Move code to ...
10730 * dll.c: .... here. New.
10731 * server.h: Declare clear_dlls.
10732 * Makefile.in (SFILES): Add dll.c.
10733 (OBS): Add dll.o
10734 (dll.o): New rule.
10735
10736 2012-02-11 Yao Qi <yao@codesourcery.com>
10737
10738 * server.c: (handle_monitor_command): Add a new parameter
10739 `own_buf'.
10740 (handle_query): Update caller.
10741
10742 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10743
10744 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10745 * configure, config.in: Regenerate.
10746 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10747 is not defined.
10748
10749 2012-02-02 Pedro Alves <palves@redhat.com>
10750
10751 Try SIGKILL first, then PTRACE_KILL.
10752 * linux-low.c (linux_kill_one_lwp): New.
10753 (linux_kill_one_lwp): Rename to ...
10754 (kill_one_lwp_callback): ... this. Use the new
10755 linux_kill_one_lwp.
10756
10757 2012-02-02 Pedro Alves <palves@redhat.com>
10758
10759 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10760 inferior.
10761
10762 2012-01-27 Pedro Alves <palves@redhat.com>
10763
10764 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10765 (elf_64_file_p): Make static.
10766 (linux_pid_exe_is_elf_64_file): New.
10767 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10768 Delete declarations.
10769 (linux_pid_exe_is_elf_64_file): Declare.
10770 * linux-x86-low.c (x86_arch_setup): Use
10771 linux_pid_exe_is_elf_64_file.
10772
10773 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10774
10775 * linux-low.c (linux_wait_for_event_1): Rename to ...
10776 (linux_wait_for_event): ... here and merge it with former
10777 linux_wait_for_event - new variable wait_ptid, use it.
10778 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10779
10780 2012-01-23 Pedro Alves <palves@redhat.com>
10781
10782 * server.c (main): Avoid yet another case of infinite loop while
10783 detaching/killing after a longjmp.
10784
10785 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10786
10787 Code cleanup.
10788 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10789
10790 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10791
10792 * hostio.c (handle_readlink): New function.
10793 (handle_vFile): Call it to handle "vFile:readlink" packets.
10794
10795 2012-01-20 Pedro Alves <palves@redhat.com>
10796 Ulrich Weigand <ulrich.weigand@linaro.org>
10797
10798 * server.c (handle_v_requests): Only support vAttach and vRun to
10799 start multiple processes when in extended protocol mode.
10800
10801 2012-01-17 Pedro Alves <palves@redhat.com>
10802
10803 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10804 memalign plus mprotect to allocate the scratch buffer.
10805
10806 2012-01-13 Pedro Alves <palves@redhat.com>
10807
10808 * server.c (attach_inferior): Clear `cont_thread'.
10809
10810 2012-01-13 Pedro Alves <palves@redhat.com>
10811
10812 * server.c (main): Avoid infinite loop while detaching/killing
10813 after a longjmp.
10814
10815 2012-01-09 Doug Evans <dje@google.com>
10816
10817 * server.c (start_inferior): Set last_ptid in --wrapper case.
10818
10819 2012-01-06 Yao Qi <yao@codesourcery.com>
10820
10821 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10822 defined.
10823 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10824
10825 2012-01-04 Yao Qi <yao@codesourcery.com>
10826
10827 * tracepoint.c (cmd_qtdp): Print debug message
10828 for static tracepoint.
10829
10830 2012-01-04 Yao Qi <yao@codesourcery.com>
10831
10832 * tracepoint.c (trace_vdebug): Differentiate debug message
10833 between gdbserver and IPA.
10834
10835 2012-01-03 Yao Qi <yao@codesourcery.com>
10836
10837 * tracepoint.c (tracepoint_was_hit): Don't collect for
10838 static tracepoint.
10839
10840 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10841
10842 * terminal.h: Reformat copyright header.
10843
10844 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10845
10846 * server.c (gdbserver_version): Update copyright year.
10847 * gdbreplay.c (gdbreplay_version): Likewise.
10848
10849 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10850
10851 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10852
10853 Revert:
10854 2011-12-18 Hui Zhu <teawater@gmail.com>
10855 * linux-low.c (linux_create_inferior): Save return value to ret.
10856
10857 2011-12-18 Hui Zhu <teawater@gmail.com>
10858
10859 * linux-low.c (linux_create_inferior): Save return value to ret.
10860
10861 2011-12-16 Doug Evans <dje@google.com>
10862
10863 * linux-low.c (linux_create_inferior): If stdio connection,
10864 redirect stdin from /dev/null, stdout to stderr.
10865 * remote-utils.c (remote_is_stdio): New static global.
10866 (remote_connection_is_stdio): New function.
10867 (remote_prepare): Handle stdio connection.
10868 (remote_open): Ditto.
10869 (remote_close): Don't close stdin for stdio connections.
10870 (read_prim,write_prim): New functions. Replace all calls to
10871 read/write to these.
10872 * server.c (main): Watch for "-" argument. Move call to
10873 remote_prepare before start_inferior.
10874 * server.h (STDIO_CONNECTION_NAME): New macro.
10875 (remote_connection_is_stdio): Declare.
10876
10877 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10878 in debugging output.
10879
10880 2011-12-15 Yao Qi <yao@codesourcery.com>
10881
10882 * tracepoint.c: Include sys/syscall.h.
10883 (gdb_ust_thread): Remove preprocessor conditional.
10884
10885 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10886
10887 * linux-low.c (linux_detach_one_lwp): Call
10888 the_low_target.prepare_to_resume before detaching.
10889
10890 2011-12-14 Yao Qi <yao@codesourcery.com>
10891
10892 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10893 of write.
10894
10895 2011-12-14 Yao Qi <yao@codesourcery.com>
10896
10897 * i386-low.c (i386_low_stopped_data_address): Initialize local
10898 variable `control'.
10899
10900 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10901
10902 PR remote/13492
10903
10904 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10905 DR_CONTROL unless necessary. Extend comments.
10906 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10907 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10908
10909 2011-12-13 Yao Qi <yao@codesourcery.com>
10910
10911 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10912 macros.
10913 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10914
10915 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10916
10917 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10918 Print new debug message for such case.
10919
10920 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10921
10922 Fix overlapping memcpy.
10923 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10924 the read_inferior_memory transfer.
10925 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10926 write_inferior_memory transfer.
10927 (set_fast_tracepoint_jump): New variable buf. Use it for the
10928 read_inferior_memory and write_inferior_memory transfers.
10929 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10930 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10931 Use it for the write_inferior_memory transfer.
10932 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10933 buffers.
10934
10935 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10936
10937 * linux-low.c (fetch_register, store_register): Make code
10938 consistent, fix formatting.
10939
10940 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10941
10942 * linux-low.c (usr_store_inferior_registers): Factor out code
10943 to handle individual registers into...
10944 (store_register): ... this new function.
10945
10946 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10947
10948 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10949 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10950 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10951 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10952 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10953 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10954 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10955 (srv_xmlfiles): Add new XML files.
10956
10957 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10958 and <sys/uio.h>.
10959 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10960 (init_registers_s390_linux32v1): Add prototype.
10961 (init_registers_s390_linux32v2): Likewise.
10962 (init_registers_s390_linux64v1): Likewise.
10963 (init_registers_s390_linux64v2): Likewise.
10964 (init_registers_s390x_linux64v1): Likewise.
10965 (init_registers_s390x_linux64v2): Likewise.
10966 (s390_num_regs): Increment to 52.
10967 (s390_regmap): Add orig_r2 register.
10968 (s390_num_regs_3264): Increment to 68.
10969 (s390_regmap_3264): Add orig_r2 register.
10970 (s390_collect_ptrace_register): Handle orig_r2 register.
10971 (s390_supply_ptrace_register): Likewise.
10972 (s390_fill_last_break): New function.
10973 (s390_store_last_break): Likewise.
10974 (s390_fill_system_call): New function.
10975 (s390_store_system_call): Likewise.
10976 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10977 register sets.
10978 (s390_check_regset): New function.
10979 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10980 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10981 Update target_regsets for available register sets.
10982
10983 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10984 Jan Kratochvil <jan.kratochvil@redhat.com>
10985
10986 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10987 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10988 New.
10989 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10990 * linux-low.h (struct process_info_private): New member r_debug.
10991 * server.c (handle_qxfer_libraries): Call
10992 the_target->qxfer_libraries_svr4.
10993 (handle_qxfer_libraries_svr4): New function.
10994 (qxfer_packets): New entry "libraries-svr4".
10995 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10996 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10997 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10998 PACKET_qXfer_libraries_svr4.
10999
11000 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11001
11002 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11003 PSW address/mask between 8-byte and 16-byte formats.
11004 (s390_supply_ptrace_register): Likewise.
11005 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11006 basic addressing mode bit.
11007
11008 2011-11-24 Stan Shebs <stan@codesourcery.com>
11009
11010 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11011
11012 2011-11-17 Stan Shebs <stan@codesourcery.com>
11013
11014 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11015 (tracing_start_time): New global.
11016 (tracing_stop_time): New global.
11017 (tracing_user_name): New global.
11018 (tracing_notes): New global.
11019 (tracing_stop_note): New global.
11020 (cmd_qtstart): Set traceframe_usage, start_time.
11021 (stop_tracing): Set stop_time.
11022 (cmd_qtstatus): Report additional status.
11023 (cmd_qtp): New function.
11024 (handle_tracepoint_query): Call it.
11025 (cmd_qtnotes): New function.
11026 (handle_tracepoint_general_set): Call it.
11027 (get_timestamp): Rename from tsv_get_timestamp.
11028
11029 2011-11-14 Stan Shebs <stan@codesourcery.com>
11030 Kwok Cheung Yeung <kcy@codesourcery.com>
11031
11032 * linux-x86-low.c (small_jump_insn): New.
11033 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11034 trampoline and error message, build a trampoline and issue a small
11035 jump instruction to it.
11036 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11037 trampoline and error message.
11038 (x86_get_min_fast_tracepoint_insn_len): New.
11039 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11040 * linux-low.h (struct linux_target_ops): Add arguments to
11041 install_fast_tracepoint_jump_pad operation, add new operation.
11042 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11043 arguments.
11044 (linux_get_min_fast_tracepoint_insn_len): New function.
11045 (linux_target_op): Add new operation.
11046 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11047 (gdb_trampoline_buffer_end): Ditto.
11048 (gdb_trampoline_buffer_error): Ditto.
11049 (struct ipa_sym_addresses): Add fields for new IPA variables.
11050 (symbol_list): Add entries for new IPA variables.
11051 (struct tracepoint): Add fields to hold the address range of the
11052 trampoline used by the tracepoint.
11053 (trampoline_buffer_head): New static variable.
11054 (trampoline_buffer_tail): Ditto.
11055 (claim_trampoline_space): New function.
11056 (have_fast_tracepoint_trampoline_buffer): New function.
11057 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11058 structure.
11059 (install_fast_tracepoint): Ditto, also add error buffer argument.
11060 (cmd_qtminftpilen): New function.
11061 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11062 (fast_tracepoint_from_trampoline_address): New function.
11063 (fast_tracepoint_collecting): Handle trampoline as part of jump
11064 pad space.
11065 (set_trampoline_buffer_space): New function.
11066 (initialize_tracepoint): Initialize new IPA variables.
11067 * target.h (struct target_ops): Add arguments to
11068 install_fast_tracepoint_jump_pad operation, add new
11069 get_min_fast_tracepoint_insn_len operation.
11070 (target_get_min_fast_tracepoint_insn_len): New.
11071 (install_fast_tracepoint_jump_pad): Add arguments.
11072 * server.h (IPA_BUFSIZ): Define.
11073 * linux-i386-ipa.c: Include extra header files.
11074 (initialize_fast_tracepoint_trampoline_buffer): New function.
11075 (initialize_low_tracepoint): Call it.
11076 * server.h (set_trampoline_buffer_space): Declare.
11077 (claim_trampoline_space): Ditto.
11078 (have_fast_tracepoint_trampoline_buffer): Ditto.
11079
11080 2011-11-14 Yao Qi <yao@codesourcery.com>
11081
11082 * server.c (handle_query): Handle InstallInTrace for qSupported.
11083 * tracepoint.c (add_tracepoint): Sort list.
11084 (install_tracepoint, download_tracepoint): New.
11085 (cmd_qtdp): Call them to install and download tracepoints.
11086 (sort_tracepoints): Removed.
11087 (cmd_qtstart): Update.
11088
11089 2011-11-14 Yao Qi <yao@codesourcery.com>
11090
11091 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11092 * mem-break.h: Declare.
11093 * tracepoint.c (cmd_qtstart): Move some code to ...
11094 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11095 New.
11096 (download_tracepoints): Move some code to ...
11097 (download_tracepoint_1): ... here. New.
11098
11099 2011-11-08 Yao Qi <yao@codesourcery.com>
11100
11101 * remote-utils.c (relocate_instruction): A comment fix.
11102
11103 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11104
11105 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11106 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11107 dr_status_mirror and dr_control_mirror from debug_reg_state.
11108 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11109 (i386_initial_stuff): Remove use of deleted globals.
11110 (i386_get_thread_context, i386_set_thread_context,
11111 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11112 from debug_reg_state.
11113
11114 2011-11-05 Yao Qi <yao@codesourcery.com>
11115
11116 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11117 address as TPOINT's.
11118
11119 2011-11-02 Stan Shebs <stan@codesourcery.com>
11120
11121 * tracepoint.c (agent_mem_read_string): New function.
11122 (eval_agent_expr): Call it for tracenz.
11123 * server.c (handle_query): Report support for tracenz.
11124
11125 2011-11-02 Yao Qi <yao@codesourcery.com>
11126
11127 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11128
11129 2011-11-02 Yao Qi <yao@codesourcery.com>
11130
11131 * target.h: Fix a typo in comment.
11132
11133 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11134
11135 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11136 clobber the breakpoints' shadows with fast tracepoint jumps.
11137 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11138 * target.c (write_inferior_memory): Also pass MYADDR down to
11139 check_mem_write.
11140
11141 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11142
11143 * configure.ac: Check support for personality routine.
11144 * configure: Regenerate.
11145 * config.in: Likewise.
11146 * linux-low.c: Include <sys/personality.h>.
11147 Define ADDR_NO_RANDOMIZE if necessary.
11148 (linux_create_inferior): Disable address space randomization when
11149 forking inferior, if requested.
11150 (linux_supports_disable_randomization): New function.
11151 (linux_target_ops): Install it.
11152 * server.h (disable_randomization): Declare.
11153 * server.c (disable_randomization): New global variable.
11154 (handle_general_set): Handle QDisableRandomization.
11155 (handle_query): Likewise for qSupported.
11156 (main): Support --disable-randomization and --no-disable-randomization
11157 command line arguments.
11158 * target.h (struct target_ops): Add supports_disable_randomization.
11159 (target_supports_disable_randomization): New macro.
11160
11161 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11162
11163 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11164 ifdef check.
11165 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11166 [!PT_GETDSBT] (target_loadmap): New definition.
11167 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11168 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11169 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11170 and PT_GETDSBT to LINUX_LOADMAP.
11171 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11172 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11173
11174 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11175
11176 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11177 (arm_linux_hwbp_cap): New static variable.
11178 (arm_linux_get_hwbp_cap): Replace by ...
11179 (arm_linux_init_hwbp_cap): ... this new function.
11180 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11181 (arm_linux_get_hw_watchpoint_count): Likewise.
11182 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11183 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11184 (arm_prepare_to_resume): Use perror_with_name instead of error.
11185
11186 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11187
11188 * linux-arm-low.c: Include <signal.h>.
11189 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11190 (struct arm_linux_hwbp_cap): New data type.
11191 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11192 (struct arm_linux_hw_breakpoint): New data type.
11193 (MAX_BPTS, MAX_WPTS): Define.
11194 (struct arch_process_info, struct arch_lwp_info): New data types.
11195 (arm_linux_get_hwbp_cap): New function.
11196 (arm_linux_get_hw_breakpoint_count): Likewise.
11197 (arm_linux_get_hw_watchpoint_count): Likewise.
11198 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11199 (arm_hwbp_control_initialize): Likewise.
11200 (arm_hwbp_control_is_enabled): Likewise.
11201 (arm_hwbp_control_is_initialized): Likewise.
11202 (arm_hwbp_control_disable): Likewise.
11203 (arm_linux_hw_breakpoint_equal): Likewise.
11204 (arm_linux_hw_point_initialize): Likewise.
11205 (struct update_registers_data): New data structure.
11206 (update_registers_callback: New function.
11207 (arm_insert_point): Likewise.
11208 (arm_remove_point): Likewise.
11209 (arm_stopped_by_watchpoint): Likewise.
11210 (arm_stopped_data_address): Likewise.
11211 (arm_new_process): Likewise.
11212 (arm_new_thread): Likewise.
11213 (arm_prepare_to_resume): Likewise.
11214 (the_low_target): Register arm_insert_point, arm_remove_point,
11215 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11216 arm_new_thread, and arm_prepare_to_resume.
11217
11218 2011-09-15 Stan Shebs <stan@codesourcery.com>
11219
11220 * server.h (struct emit_ops): Add compare-goto fields.
11221 * tracepoint.c (gdb_agent_op_sizes): New table.
11222 (emit_eq_goto): New function.
11223 (emit_ne_goto): New function.
11224 (emit_lt_goto): New function.
11225 (emit_le_goto): New function.
11226 (emit_gt_goto): New function.
11227 (emit_ge_goto): New function.
11228 (is_goto_target): New function.
11229 (compile_bytecodes): Recognize special cases of compare-goto
11230 combinations and call specialized emitters for them.
11231 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11232 (amd64_emit_ne_goto): New function.
11233 (amd64_emit_lt_goto): New function.
11234 (amd64_emit_le_goto): New function.
11235 (amd64_emit_gt_goto): New function.
11236 (amd64_emit_ge_goto): New function.
11237 (amd64_emit_ops): Add the new functions.
11238 (i386_emit_eq_goto): New function.
11239 (i386_emit_ne_goto): New function.
11240 (i386_emit_lt_goto): New function.
11241 (i386_emit_le_goto): New function.
11242 (i386_emit_gt_goto): New function.
11243 (i386_emit_ge_goto): New function.
11244 (i386_emit_ops): Add the new functions.
11245
11246 2011-09-08 Stan Shebs <stan@codesourcery.com>
11247
11248 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11249 (i386_emit_epilogue): Restore %ebx.
11250
11251 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11252
11253 * server.c (step_thread): Remove definition.
11254 (process_serial_event): Don't handle Hs.
11255 * server.h (step_thread): Remove declaration.
11256 * target.c (set_desired_inferior): Remove use of step_thread.
11257
11258 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11259
11260 * linux-low.c: Include linux-procfs.h.
11261 (linux_attach_lwp_1): Update comments.
11262 (linux_attach): Scan for existing threads when attaching to a
11263 process that is the tgid.
11264 * Makefile.in: Update dependencies.
11265
11266 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11267
11268 * configure.srv: Add linux-procfs.o dependencies.
11269
11270 2011-08-14 Yao Qi <yao@codesourcery.com>
11271
11272 * target.h (struct target_ops): Fix indent.
11273 * win32-low.c (win32_target_ops): Fix comment.
11274
11275 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11276 Yao Qi <yao@codesourcery.com>
11277
11278 * Makefile.in (clean): Remove tic6x-*.c files.
11279 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11280 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11281 (tic6x-c64xp-linux.c): Likewise.
11282 * configure.srv: Add support for tic6x-*-uclinux.
11283 * linux-tic6x-low.c: New.
11284 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11285
11286 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11287 Yao Qi <yao@codesourcery.com>
11288
11289 * target.h (struct target_ops): Add read_loadmap.
11290 * linux-low.c (struct target_loadseg): New type.
11291 (struct target_loadmap): New type.
11292 (linux_read_loadmap): New function.
11293 (linux_target_ops): Add linux_read_loadmap.
11294 * server.c (handle_query): Support qXfer:fdpic:read packet.
11295 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11296 to NULL.
11297
11298 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11299
11300 * win32-low.c: Include <stdint.h>.
11301
11302 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11303
11304 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11305 to the inferior here.
11306 (i386_remove_aligned_watchpoint): Ditto.
11307 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11308 fit part of the watchpoint in the debug registers.
11309 (i386_update_inferior_debug_regs): New.
11310 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11311 registers, and only update the inferior on success.
11312 (i386_low_remove_watchpoint): Ditto.
11313
11314 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11315
11316 * linux-low.c (compare_ints, unique, list_threads, show_process,
11317 linux_core_of_thread): Delete.
11318 (linux_target_ops): Change linux_core_of_thread to
11319 linux_common_core_of_thread.
11320 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11321 * utils.c (malloc_failure): Change type of argument.
11322 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11323 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11324 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11325 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11326 (IPA_OBJS): Add common-utils-ipa.o.
11327 (ptid_h, linux_osdata_h): New macros.
11328 (server_h): Add common/common-utils.h, common/xml-utils.h,
11329 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11330 common/ptid.h.
11331 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11332 ptid.o, buffer.o): New rules.
11333 (linux-low.o): Add common/linux-osdata.h as a dependency.
11334 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11335 * configure.ac: Add AC_HEADER_DIRENT check.
11336 * config.in: Regenerate.
11337 * configure: Regenerate.
11338 * remote-utils.c (xml_escape_text): Delete.
11339 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11340 buffer_xml_printf): Move to common/buffer.c.
11341 * server.c (main): Remove call to initialize_inferiors.
11342 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11343 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11344 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11345 internal_error, gdb_assert, gdb_assert_fail): Delete.
11346 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11347 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11348 common/buffer.h.
11349 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11350 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11351 initialize_inferiors): Delete.
11352
11353 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11354
11355 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11356 symbol error.
11357
11358 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11359
11360 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11361 assertion.
11362 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11363
11364 2011-05-26 Yao Qi <yao@codesourcery.com>
11365
11366 * Makefile.in (thread-db.o): Track dependence to
11367 common/gdb_thread_db.h.
11368 * thread-db.c: include gdb_thread_db.h from right place.
11369
11370 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11371
11372 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11373 __FILE__ and __LINE__ to internal_error.
11374
11375 2011-05-13 Doug Evans <dje@google.com>
11376
11377 * thread-db.c (try_thread_db_load_from_sdir): New function.
11378 (try_thread_db_load_from_dir): New function.
11379 (thread_db_load_search): Handle $sdir, ignore $pdir.
11380 Remove trying of system directories if search of
11381 libthread-db-search-path fails, that is now done via $sdir.
11382
11383 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11384
11385 * server.c (handle_query): Add EnableDisableTracepoints to the list
11386 of supported features.
11387 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11388 tracepoints.
11389 (cmd_qtenable_disable): New.
11390 (cmd_qtstart): Install tracepoints even if disabled.
11391 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11392 receiving a QTEnable or QTDisable packet.
11393 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11394 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11395 tracepoints.
11396 (gdb_probe): Skip data collection if static tracepoint is disabled.
11397
11398 2011-05-10 Doug Evans <dje@google.com>
11399
11400 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11401
11402 2011-05-04 Doug Evans <dje@google.com>
11403
11404 * linux-low.c (linux_join): Skip process lookup.
11405 * spu-low.c (spu_join): Ditto.
11406 * server.c (join_inferiors_callback): Delete.
11407 (process_serial_event): For 'D' packet (detach) call join_inferior
11408 directly.
11409
11410 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11411
11412 * README: Don't mention xscale*-*-linux*.
11413 * configure.srv (xscale*-*-linux*): Don't handle target.
11414
11415 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11416
11417 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11418 casting pointers.
11419 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11420 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11421 (i386_emit_void_call_2): Likewise.
11422
11423 2011-04-26 Yao Qi <yao@codesourcery.com>
11424
11425 * linux-low.c: Move common macros to linux-ptrace.h.
11426 Include linux-ptrace.h.
11427 * Makefile.in (linux_ptrace_h): New.
11428 (linux-low.o): Depends on linux-ptrace.h.
11429
11430 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11431
11432 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11433 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11434 (remote_prepare): New function with most of the TCP code from ...
11435 (remote_open): ... here. Detect PORT here unconditionally. Move also
11436 setting transport_is_reliable.
11437 * server.c (run_once): New variable.
11438 (gdbserver_usage): Document it.
11439 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11440 the first run if RUN_ONCE.
11441 * server.h (run_once, remote_prepare): New declarations.
11442
11443 2011-04-19 Tom Tromey <tromey@redhat.com>
11444
11445 * win32-low.c (handle_load_dll): Remove duplicate "the".
11446
11447 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11448
11449 Remove support for old Cygwin 1.5 versions.
11450 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11451 function to avoid warning.
11452 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11453 warning.
11454
11455 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11456
11457 * gdbserver/server.h (Macro _): Define it if not available.
11458
11459 2011-03-14 Michael Snyder <msnyder@vmware.com>
11460
11461 * hostio.c (handle_close): Remove unnecessary null test.
11462
11463 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11464
11465 * Makefile.in (maintainer-clean realclean distclean): Remove
11466 "make ... subdir_do" command.
11467
11468 2011-03-10 Michael Snyder <msnyder@vmware.com>
11469
11470 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11471
11472 * server.c (handle_v_run): Free alloced buffer on early return.
11473
11474 2011-03-09 Yao Qi <yao@codesourcery.com>
11475
11476 Revert:
11477 2011-03-04 Yao Qi <yao@codesourcery.com>
11478
11479 * Makefile.in: Remove GNU make feature --directory.
11480
11481 2011-03-05 Yao Qi <yao@codesourcery.com>
11482
11483 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11484 (subdir_do): New make target. Copied from gdb/Makefile.
11485 (maintainer-clean, realclean, distclean, clean): Call corresponding
11486 make targets in common/Makefile.
11487
11488 2011-02-11 Yao Qi <yao@codesourcery.com>
11489
11490 * configure.ac: Call AC_PROG_RANLIB.
11491 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11492 * configure: Regenerate.
11493
11494 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11495
11496 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11497
11498 2011-03-06 Yao Qi <yao@codesourcery.com>
11499
11500 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11501
11502 2011-03-05 Yao Qi <yao@codesourcery.com>
11503
11504 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11505 (subdir_do): New make target. Copied from gdb/Makefile.
11506 (maintainer-clean, realclean, distclean, clean): Call corresponding
11507 make targets in common/Makefile.
11508
11509 2011-03-04 Yao Qi <yao@codesourcery.com>
11510
11511 * Makefile.in: Remove GNU make feature --directory.
11512
11513 2011-03-04 Michael Snyder <msnyder@vmware.com>
11514
11515 * server.c (queue_stop_reply): Call xmalloc not malloc.
11516
11517 2011-03-02 Michael Snyder <msnyder@vmware.com>
11518
11519 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11520
11521 2011-02-28 Michael Snyder <msnyder@vmware.com>
11522
11523 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11524 (cmd_qtframe): Ditto.
11525 (cmd_qtbuffer): Ditto.
11526 (cmd_bigqtbuffer): Ditto.
11527
11528 * utils.c (decimal2str): Initialize 'width' to nine, then
11529 don't mess with it.
11530
11531 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11532
11533 * hostio.c (require_data): Free *data, not data.
11534
11535 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11536
11537 * hostio.c (require_data): Use free, not xfree.
11538
11539 2011-02-27 Michael Snyder <msnyder@vmware.com>
11540
11541 * server.c (handle_query): Discard unused value.
11542
11543 * hostio.c (require_data): Free malloc memory before returning
11544 error.
11545
11546 2011-02-26 Michael Snyder <msnyder@vmware.com>
11547
11548 * linux-low.c (list_threads): Call closedir for dirent.
11549
11550 2011-02-27 Michael Snyder <msnyder@vmware.com>
11551
11552 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11553 a case statement falls through.
11554
11555 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11556
11557 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11558 in comparison.
11559
11560 2011-02-26 Michael Snyder <msnyder@vmware.com>
11561
11562 * utils.c (decimal2str): Eliminate dead code and dead param.
11563 (pulongest): Drop dead param from call to decimal2str.
11564 (plongest): Ditto.
11565
11566 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11567
11568 Revert the following patch (not approved yet):
11569 2011-02-21 Hui Zhu <teawater@gmail.com>
11570 * tracepoint.c (tp_printf): New function.
11571 (eval_agent_expr): Handle gdb_agent_op_printf.
11572
11573 2011-02-21 Hui Zhu <teawater@gmail.com>
11574
11575 * tracepoint.c (tp_printf): New function.
11576 (eval_agent_expr): Handle gdb_agent_op_printf.
11577
11578 2011-02-18 Tom Tromey <tromey@redhat.com>
11579
11580 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11581 (tracepoint.o): Likewise.
11582 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11583 (gdb_agent_op_names): Likewise.
11584
11585 2011-02-18 Tom Tromey <tromey@redhat.com>
11586
11587 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11588 gdb_agent_op_rot>: New constants.
11589 (gdb_agent_op_names): Add pick and roll.
11590 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11591 cases.
11592
11593 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11594
11595 * aclocal.m4: Regenerated with aclocal-1.11.1.
11596
11597 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11598
11599 * server.c (handle_qxfer_traceframe_info): New.
11600 (qxfer_packets): Register "traceframe-info".
11601 (handle_query): Report support for qXfer:traceframe-info:read+.
11602 * tracepoint.c (match_blocktype): New.
11603 (traceframe_find_block_type): Rename to ...
11604 (traceframe_walk_blocks): ... this. Add callback filter argument,
11605 and use it.
11606 (traceframe_find_block_type): New, reimplemented on top of
11607 traceframe_walk_blocks.
11608 (build_traceframe_info_xml): New.
11609 (traceframe_read_info): New.
11610 * server.h (traceframe_read_info): Declare.
11611
11612 2011-02-11 Yao Qi <yao@codesourcery.com>
11613
11614 * configure.ac: Call AC_PROG_RANLIB.
11615 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11616 * configure: Regenerate.
11617
11618 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11619
11620 * server.c (gdb_read_memory): Change return semantics to allow
11621 partial transfers.
11622 (handle_search_memory_1): Adjust.
11623 (process_serial_event) <'m' packet>: Handle partial transfers.
11624 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11625
11626 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11627
11628 * regcache.c (init_register_cache): Initialize
11629 regcache->register_status.
11630 (free_register_cache): Release regcache->register_status.
11631 (regcache_cpy): Copy register_status.
11632 (registers_to_string): Print 'x's for unavailable registers.
11633 (supply_register): Mark the register's status valid or
11634 unavailable, depending on whether a buffer was passed in or not.
11635 (supply_register_zeroed): New.
11636 (supply_regblock): Mark the registers' status valid or
11637 unavailable, depending on whether a buffer was passed in or not.
11638 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11639 (struct regcache): New `register_status' field.
11640 (supply_register_zeroed): Declare.
11641 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11642 supply_register_zeroed, rather than passing a NULL buffer to
11643 supply_register.
11644 * tracepoint.c (fetch_traceframe_registers): Update comment.
11645
11646 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11647
11648 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11649 buffer explicit.
11650
11651 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11652
11653 * server.h (decode_xfer_write): Change prototype.
11654 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11655 and don't extract the annex here.
11656 * server.c (decode_xfer_read): Remove `annex' parameter,
11657 and don't extract the annex here.
11658 (decode_xfer): New.
11659 (struct qxfer): New.
11660 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11661 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11662 (handle_qxfer_statictrace): New functions, abstracted out from
11663 handle_query, and made to use the struct qxfer interface.
11664 (handle_threads_qxfer_proper): Rename to ...
11665 (handle_qxfer_threads_proper): ... this.
11666 (handle_threads_qxfer): Rename to ...
11667 (handle_qxfer_threads): ... this. Adjust.
11668 (qxfer_packets): New array.
11669 (handle_qxfer): New function.
11670 (handle_query): Use handle_qxfer.
11671
11672 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11673
11674 * gdbreplay.c: Shorten lines of >= 80 columns.
11675 * linux-low.c: Ditto.
11676 * linux-ppc-low.c: Ditto.
11677 * linux-s390-low.c: Ditto.
11678 * linux-sparc-low.c: Ditto.
11679 * linux-x86-low.c: Ditto.
11680 * linux-xtensa-low.c: Ditto.
11681 * mem-break.c: Ditto.
11682 * nto-low.c: Ditto.
11683 * regcache.h: Ditto.
11684 * remote-utils.c: Ditto.
11685 * server.c: Ditto.
11686 * server.h: Ditto.
11687 * thread-db.c: Ditto.
11688 * tracepoint.c: Ditto.
11689 * utils.c: Ditto.
11690 * win32-low.h: Ditto.
11691
11692 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11693
11694 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11695 update.
11696
11697 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11698
11699 * server.c (gdbserver_version): Update copyright year in version
11700 output.
11701 * gdbreplay.c (gdbreplay_version): Ditto.
11702
11703 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11704
11705 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11706 * linux-bfin-low.c: New file.
11707 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11708 PT_DATA_ADDR for BFIN targets.
11709 * Makefile.in (SFILES): Add linux-bfin-low.c.
11710 (clean): Remove reg-bfin.c.
11711 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11712 * README: Mention supported Blackfin targets.
11713
11714 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11715
11716 * .gitignore: New file.
11717
11718 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11719
11720 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11721
11722 2010-10-22 Jie Zhang <jie@codesourcery.com>
11723
11724 * Makefile.in: Add FLAGS_TO_PASS variable.
11725 (install): Remove dependency of install-only and recursively
11726 invoke make for install-only.
11727
11728 2010-10-04 Doug Evans <dje@google.com>
11729
11730 * Makefile.in (uninstall): Use $(DESTDIR).
11731
11732 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11733
11734 PR gdb/11842
11735
11736 * linux-x86-low.c (compat_siginfo_from_siginfo)
11737 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11738 si_code is < 0. Check for si_code == SI_TIMER before checking for
11739 si_code < 0.
11740
11741 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11742
11743 * lynx-i386-low.c: New file.
11744 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11745
11746 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11747
11748 * lynx-low.c (ptrace_request_to_str): Remove handling for
11749 request values that have been removed in LynxOS 5.x.
11750
11751 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11752
11753 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11754 <ptrace.h>
11755
11756 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11757
11758 * configure.ac: Add --enable-inprocess-agent option.
11759 * configure: Rebuilt.
11760
11761 2010-09-06 Yao Qi <yao@codesourcery.com>
11762
11763 * linux-low.c (linux_kill): Remove unused variable.
11764 (linux_stabilize_threads): Likewise.
11765 * server.c (start_inferior): Likewise.
11766 (queue_stop_reply_callback): Likewise.
11767 * tracepoint.c (do_action_at_tracepoint): Likewise.
11768
11769 2010-09-06 Yao Qi <yao@codesourcery.com>
11770
11771 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11772 on return.
11773
11774 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11775
11776 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11777
11778 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11779
11780 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11781 "$(IPA_DEPFILES)".
11782
11783 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11784
11785 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11786 gdbserver/lynx-ppc-low.c: New files.
11787 * Makefile.in (lynx_low_h): New variable.
11788 (lynx-low.o, lynx-ppc-low.o): New rules.
11789 * configure.ac: On LynxOS, link with -lnetinet.
11790 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11791 * configure: regenerate.
11792
11793 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11794
11795 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11796 * configure.ac: Add check for vasprintf and vsnprintf.
11797 * configure, config.in: Regenerate.
11798 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11799
11800 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11801
11802 * gdbreplay.c: Move include of alloca.h up, next to include of
11803 malloc.h.
11804 * server.h: Add include of malloc.h.
11805 * mem-break.c: Remove include of malloc.h.
11806 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11807
11808 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11809
11810 * Makefile.in (memmem.o): Build with -Wno-error.
11811
11812 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11813
11814 * utils.c (xsnprintf): Make non-static.
11815 * server.h: Add xsnprintf declaration.
11816 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11817 replace calls to snprintf by calls to xsnprintf throughout.
11818
11819 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11820
11821 * configure.ac: Add configure check for alloca.
11822 * configure, config.in: Regenerate.
11823 * server.h: Include alloca.h if it exists.
11824 * gdbreplay.c: Include alloca.h if it exists.
11825
11826 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11827
11828 * linux-low.c (__SIGRTMIN): Define if not already defined.
11829 (linux_create_inferior): Check for __ANDROID__ rather than
11830 __SIGRTMIN.
11831 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11832 are already deferred.
11833 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11834 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11835 stopped and already has a pending signal to report.
11836 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11837 a pending signal to report or is moving out of a jump pad.
11838 (linux_init_signals): Check for __ANDROID__ rather than
11839 __SIGRTMIN.
11840
11841 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11842
11843 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11844 debug_threads check. Avoid a linear search when not doing debug
11845 output.
11846
11847 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11848
11849 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11850 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11851 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11852 (process_event): Change local fd's type to gdb_fildes_t.
11853 (create_file_handler): Adjust prototype.
11854 (delete_file_handler): Adjust prototype.
11855 (handle_file_event): Adjust prototype. Use pfildes.
11856 (create_file_event): Adjsut prototype.
11857 * remote-utils.c (remote_desc, listen_desc): Change type to
11858 gdb_fildes_t.
11859 * server.h: New gdb_fildes_t typedef.
11860 [USE_WIN32API]: Include winsock2.h.
11861 (delete_file_handler, add_file_handler): Adjust prototypes.
11862 (pfildes): Declare.
11863 * utils.c (pfildes): New.
11864
11865 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11866
11867 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11868 * configure: Regenerate.
11869
11870 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11871
11872 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11873 (linux_done_accessing_memory): ... this.
11874 (linux_target_ops): Adjust.
11875 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11876 * nto-low.c (nto_target_ops): Adjust comment.
11877 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11878 * spu-low.c (spu_target_ops): Adjust comment.
11879 * target.h (target_ops): Rename unprepare_to_access_memory field
11880 to done_accessing_memory.
11881 (unprepare_to_access_memory): Rename to ...
11882 (done_accessing_memory): ... this.
11883
11884 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11885
11886 * linux-low.c (linux_prepare_to_access_memory): New.
11887 (linux_unprepare_to_access_memory): New.
11888 (linux_target_ops): Install them.
11889 * server.c (read_memory): Rename to ...
11890 (gdb_read_memory): ... this. Use
11891 prepare_to_access_memory/prepare_to_access_memory.
11892 (write_memory): Rename to ...
11893 (gdb_write_memory): ... this. Use
11894 prepare_to_access_memory/prepare_to_access_memory.
11895 (handle_search_memory_1): Adjust.
11896 (process_serial_event): Adjust.
11897 * target.h (struct target_ops): New fields
11898 prepare_to_access_memory and unprepare_to_access_memory.
11899 (prepare_to_access_memory, unprepare_to_access_memory): New.
11900 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11901 prepare_to_access_memory/prepare_to_access_memory.
11902 * nto-low.c (nto_target_ops): Adjust.
11903 * spu-low.c (spu_target_ops): Adjust.
11904 * win32-low.c (win32_target_ops): Adjust.
11905
11906 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11907
11908 * Makefile.in (WARN_CFLAGS): Get it from configure.
11909 (WERROR_CFLAGS): New.
11910 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11911 * configure.ac: Introduce --enable-werror, which adds -Werror to
11912 the compiler command line. Enabled by default. Disable with
11913 --disable-werror. Add -Wdeclaration-after-statement
11914 Wpointer-arith and -Wformat-nonliteral to warning flags.
11915 * configure: Regenerate.
11916
11917 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11918
11919 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11920
11921 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11922
11923 * gdbreplay.c (remote_error): New.
11924 (gdbchar): New.
11925 (expect): Use gdbchar. Check for error reading from GDB.
11926 Clarify sync error output.
11927 (play): Check for errors writing to GDB.
11928 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11929 * remote-utils.c (getpkt): Check for errors writing to the remote
11930 descriptor.
11931
11932 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11933
11934 * linux-low.c (linux_wait_1): Move non-debugging code out of
11935 `debug_threads' control.
11936
11937 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11938
11939 * linux-low.c (linux_wait_1): Don't set last_status here.
11940 * server.c (push_event, queue_stop_reply_callback): Assert we're
11941 not pushing a TARGET_WAITKIND_IGNORE event.
11942 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11943 (myresume, handle_target_event): Set the thread's last_resume_kind
11944 and last_status from the target returned status.
11945
11946 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11947
11948 PR threads/10729
11949
11950 * linux-x86-low.c (update_debug_registers_callback): New.
11951 (i386_dr_low_set_addr): Use it.
11952 (i386_dr_low_get_addr): New.
11953 (i386_dr_low_set_control): Use update_debug_registers_callback.
11954 (i386_dr_low_get_control): New.
11955 (i386_dr_low_get_status): Adjust.
11956 * linux-low.c (linux_stop_lwp): New.
11957 * linux-low.h (linux_stop_lwp): Declare.
11958
11959 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11960 argument instead of a i386_debug_reg_state.
11961 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11962 a i386_debug_reg_state.
11963 (i386_insert_aligned_watchpoint): Adjust.
11964 (i386_remove_aligned_watchpoint): Adjust.
11965 (i386_low_stopped_data_address): Read the debug registers from the
11966 inferior instead of from the mirrors.
11967 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11968 (i386_dr_low_get_addr): Declare.
11969 (i386_dr_low_get_control): Declare.
11970 (i386_dr_low_get_status): Change prototype.
11971
11972 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11973 (i386_dr_low_get_addr): New.
11974 (i386_dr_low_get_control): New.
11975 (i386_dr_low_get_status): Adjust prototype. Return
11976 dr_status_mirror.
11977 (i386_initial_stuff): Clear dr_status_mirror and
11978 dr_control_mirror.
11979 (i386_get_thread_context): Adjust.
11980 (i386_set_thread_context): Adjust.
11981 (i386_thread_added): Adjust.
11982
11983 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11984
11985 * linux-low.h (linux_thread_area): Delete declaration.
11986
11987 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11988
11989 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11990 after its termination.
11991
11992 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11993
11994 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11995 (gdb_wants_all_stopped): Delete.
11996 (linux_wait_1): Don't call them.
11997 * server.c (handle_v_cont): Tag all threads as want-stopped.
11998 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11999 stopped as "client-wants-stopped".
12000
12001 2010-07-31 Pedro Alves <pedro@codesourcery.com>
12002
12003 * Makefile.in (signals_h): New.
12004 (server_h): Depend on it.
12005 (server.o): Don't depend on $(signals_def).
12006 (signals.o): Depend on $(signals_def).
12007
12008 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12009
12010 * Makefile.in (signals_def): New.
12011 (server_h): Append include/gdb/signals.h and signals_def.
12012 (server.o): Append signals_def.
12013
12014 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12015
12016 * server.c (handle_target_event): Use target_signal_to_host for
12017 resume_info.sig initialization.
12018 * target.h (struct thread_resume) <sig>: New comment.
12019
12020 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12021
12022 * server.c (handle_query): strcpy() the returned string from paddress()
12023 instead of sprintf().
12024 * utils.c (paddress): Return phex_nz().
12025
12026 2010-07-07 Joel Brobecker <brobecker@adacore.com>
12027
12028 * server.c (handle_v_cont): Call mourn_inferior if process
12029 just exited.
12030 (myresume): Likewise.
12031
12032 2010-07-01 Pedro Alves <pedro@codesourcery.com>
12033
12034 Static tracepoints, and integration with UST.
12035
12036 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12037 * mem-break.c (uninsert_all_breakpoints)
12038 (reinsert_all_breakpoints): New.
12039 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12040 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12041 (gdb_agent_ust_loaded, helper_thread_id)
12042 (gdb_agent_helper_thread_id): New macros.
12043 (struct ipa_sym_addresses): Add addr_ust_loaded,
12044 addr_helper_thread_id, addr_cmd_buf.
12045 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12046 (in_process_agent_loaded_ust): New.
12047 (write_e_ust_not_loaded): New.
12048 (maybe_write_ipa_ust_not_loaded): New.
12049 (struct collect_static_trace_data_action): New.
12050 (enum tracepoint_type) <static_tracepoint>: New.
12051 (struct tracepoint) <handle>: Mention static tracepoints.
12052 (struct static_tracepoint_ctx): New.
12053 (CMD_BUF_SIZE): New.
12054 (add_tracepoint_action): Handle static tracepoint actions.
12055 (unprobe_marker_at): New.
12056 (clear_installed_tracepoints): Handle static tracepoints.
12057 (cmd_qtdp): Handle static tracepoints.
12058 (probe_marker_at): New.
12059 (cmd_qtstart): Handle static tracepoints.
12060 (response_tracepoint): Handle static tracepoints.
12061 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12062 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12063 (get_context_regcache): Handle static tracepoints.
12064 (do_action_at_tracepoint): Handle static tracepoint actions.
12065 (traceframe_find_block_type): Handle static trace data blocks.
12066 (traceframe_read_sdata): New.
12067 (download_tracepoints): Download static tracepoint actions.
12068 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12069 (GDB_PROBE_NAME): New.
12070 (ust_ops): New.
12071 (GET_UST_SYM): New.
12072 (USTF): New.
12073 (dlsym_ust): New.
12074 (ust_marker_to_static_tracepoint): New.
12075 (gdb_probe): New.
12076 (collect_ust_data_at_tracepoint): New.
12077 (gdb_ust_probe): New.
12078 (UNIX_PATH_MAX, SOCK_DIR): New.
12079 (gdb_ust_connect_sync_socket): New.
12080 (resume_thread, stop_thread): New.
12081 (run_inferior_command): New.
12082 (init_named_socket): New.
12083 (gdb_ust_socket_init): New.
12084 (cstr_to_hexstr): New.
12085 (next_st): New.
12086 (first_marker, next_marker): New.
12087 (response_ust_marker): New.
12088 (cmd_qtfstm, cmd_qtsstm): New.
12089 (unprobe_marker_at, probe_marker_at): New.
12090 (cmd_qtstmat, gdb_ust_thread): New.
12091 (gdb_ust_init): New.
12092 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12093 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12094 (ST_REGENTRY): New.
12095 (x86_64_st_collect_regmap): New.
12096 (X86_64_NUM_ST_COLLECT_GREGS): New.
12097 (AMD64_RIP_REGNUM): New.
12098 (supply_static_tracepoint_registers): New.
12099 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12100 (ST_REGENTRY): New.
12101 (i386_st_collect_regmap): New.
12102 (i386_NUM_ST_COLLECT_GREGS): New.
12103 (supply_static_tracepoint_registers): New.
12104 * server.c (handle_query): Handle qXfer:statictrace:read.
12105 <qSupported>: Report support for StaticTracepoints, and
12106 qXfer:statictrace:read features.
12107 * server.h (traceframe_read_sdata)
12108 (supply_static_tracepoint_registers): Declare.
12109 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12110 (unpack_varlen_hex): Include in IPA build.
12111 * Makefile.in (ustlibs, ustinc): New.
12112 (IPA_OBJS): Add remote-utils-ipa.o.
12113 ($(IPA_LIB)): Link -ldl and -lpthread.
12114 (UST_CFLAGS): New.
12115 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12116 * config.in, configure: Regenerate.
12117
12118 2010-06-20 Ian Lance Taylor <iant@google.com>
12119 Pedro Alves <pedro@codesourcery.com>
12120
12121 * linux-x86-low.c (always_true): Delete.
12122 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12123 trying to fool the compiler with always_true.
12124
12125 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12126
12127 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12128 conditions in gdbserver.
12129
12130 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12131
12132 * spu-low.c (spu_read_memory): Wrap around local store limit.
12133 (spu_write_memory): Likewise.
12134
12135 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12136
12137 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12138 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12139 LONGEST uses.
12140 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12141 uses.
12142 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12143 uses with LONGEST uses.
12144
12145 2010-06-14 Stan Shebs <stan@codesourcery.com>
12146 Pedro Alves <pedro@codesourcery.com>
12147
12148 Bytecode compiler.
12149
12150 * linux-x86-low.c: Include limits.h.
12151 (add_insns): New.
12152 (always_true): New.
12153 (EMIT_ASM): New.
12154 (EMIT_ASM32): New.
12155 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12156 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12157 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12158 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12159 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12160 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12161 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12162 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12163 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12164 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12165 (amd64_emit_void_call_2): New.
12166 (amd64_emit_ops): New.
12167 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12168 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12169 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12170 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12171 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12172 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12173 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12174 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12175 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12176 (i386_emit_stack_adjust, i386_emit_int_call_1)
12177 (i386_emit_void_call_2): New.
12178 (i386_emit_ops): New.
12179 (x86_emit_ops): New.
12180 (the_low_target): Install x86_emit_ops.
12181 * server.h (struct emit_ops): New.
12182 (get_raw_reg_func_addr): Declare.
12183 (current_insn_ptr, emit_error): Declare.
12184 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12185 (set_trace_state_variable_value): New defines.
12186 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12187 addr_get_trace_state_variable_value and
12188 addr_set_trace_state_variable_value.
12189 (symbol_list): New fields for get_raw_reg,
12190 get_trace_state_variable_value and set_trace_state_variable_value.
12191 (condfn): New typedef.
12192 (struct tracepoint): New field `compiled_cond'.
12193 (do_action_at_tracepoint): Clear compiled_cond.
12194 (get_trace_state_variable_value, set_trace_state_variable_value):
12195 Export in the IPA.
12196 (condition_true_at_tracepoint): If there's a compiled condition,
12197 run that.
12198 (current_insn_ptr, emit_error): New globals.
12199 (struct bytecode_address): New.
12200 (get_raw_reg_func_addr): New.
12201 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12202 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12203 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12204 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12205 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12206 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12207 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12208 (compile_tracepoint_condition, compile_bytecodes): New.
12209 * target.h (emit_ops): Forward declare.
12210 (struct target_ops): New field emit_ops.
12211 (target_emit_ops): New.
12212 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12213 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12214 * linux-low.c (linux_emit_ops): New.
12215 (linux_target_ops): Install it.
12216 * linux-low.h (struct linux_target_ops): New field emit_ops.
12217
12218 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12219
12220 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12221 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12222
12223 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12224 Stan Shebs <stan@codesourcery.com>
12225
12226 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12227 (all): Depend on $(extra_libraries).
12228 (install-only): Install the IPA.
12229 (IPA_OBJS, IPA_LIB): New.
12230 (clean): Remove the IPA lib.
12231 (IPAGENT_CFLAGS): New.
12232 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12233 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12234 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12235 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12236 * configure.ac: Check for atomic builtins support in the compiler.
12237 (IPA_DEPFILES, extra_libraries): Define.
12238 * configure.srv (ipa_obj): Add description.
12239 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12240 (i[34567]86-*-linux*): Set ipa_obj.
12241 (x86_64-*-linux*): Set ipa_obj.
12242 * linux-low.c (stabilizing_threads): New.
12243 (supports_fast_tracepoints): New.
12244 (linux_detach): Stabilize threads before detaching.
12245 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12246 the lwp is either not stabilizing, or is moving out of a jump pad.
12247 (linux_fast_tracepoint_collecting): New.
12248 (maybe_move_out_of_jump_pad): New.
12249 (enqueue_one_deferred_signal): New.
12250 (dequeue_one_deferred_signal): New.
12251 (linux_wait_for_event_1): If moving out of a jump pad, defer
12252 pending signals to later.
12253 (linux_stabilize_threads): New.
12254 (linux_wait_1): Check if threads need moving out of jump pads, and
12255 do it if so.
12256 (stuck_in_jump_pad_callback): New.
12257 (move_out_of_jump_pad_callback): New.
12258 (lwp_running): New.
12259 (linux_resume_one_lwp): Handle moving out of jump pads.
12260 (linux_set_resume_request): Dequeue deferred signals.
12261 (need_step_over_p): Also step over fast tracepoint jumps.
12262 (start_step_over): Also uninsert fast tracepoint jumps.
12263 (finish_step_over): Also reinsert fast tracepoint jumps.
12264 (linux_install_fast_tracepoint_jump): New.
12265 (linux_target_ops): Install linux_stabilize_threads and
12266 linux_install_fast_tracepoint_jump_pad.
12267 * linux-low.h (linux_target_ops) <get_thread_area,
12268 install_fast_tracepoint_jump_pad>: New fields.
12269 (struct lwp_info) <collecting_fast_tracepoint,
12270 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12271 (linux_get_thread_area): Declare.
12272 * linux-x86-low.c (jump_insn): New.
12273 (x86_get_thread_area): New.
12274 (append_insns): New.
12275 (push_opcode): New.
12276 (amd64_install_fast_tracepoint_jump_pad): New.
12277 (i386_install_fast_tracepoint_jump_pad): New.
12278 (x86_install_fast_tracepoint_jump_pad): New.
12279 (the_low_target): Install x86_get_thread_area and
12280 x86_install_fast_tracepoint_jump_pad.
12281 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12282 (struct fast_tracepoint_jump): New.
12283 (fast_tracepoint_jump_insn): New.
12284 (fast_tracepoint_jump_shadow): New.
12285 (find_fast_tracepoint_jump_at): New.
12286 (fast_tracepoint_jump_here): New.
12287 (delete_fast_tracepoint_jump): New.
12288 (set_fast_tracepoint_jump): New.
12289 (uninsert_fast_tracepoint_jumps_at): New.
12290 (reinsert_fast_tracepoint_jumps_at): New.
12291 (set_breakpoint_at): Use write_inferior_memory.
12292 (uninsert_raw_breakpoint): Use write_inferior_memory.
12293 (check_mem_read): Mask out fast tracepoint jumps.
12294 (check_mem_write): Mask out fast tracepoint jumps.
12295 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12296 (set_fast_tracepoint_jump): Declare.
12297 (delete_fast_tracepoint_jump)
12298 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12299 (reinsert_fast_tracepoint_jumps_at): Declare.
12300 * regcache.c: Don't compile many functions when building the
12301 in-process agent library.
12302 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12303 the register buffer in the heap.
12304 (free_register_cache): If the register buffer isn't owned by the
12305 regcache, don't free it.
12306 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12307 pre-existing register caches.
12308 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12309 type.
12310 (convert_ascii_to_int): : Constify `from' parameter type.
12311 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12312 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12313 the needed buffer in-place.
12314 (relocate_instruction): New.
12315 * server.c (handle_query) <qSymbols>: If the target supports
12316 tracepoints, give it a chance of looking up symbols. Report
12317 support for fast tracepoints.
12318 (handle_status): Stabilize threads.
12319 (process_serial_event): Adjust.
12320 * server.h (struct fast_tracepoint_jump): Forward declare.
12321 (struct process_info) <fast_tracepoint_jumps>: New field.
12322 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12323 (decode_X_packet, decode_M_packet): Adjust.
12324 (relocate_instruction): Declare.
12325 (in_process_agent_loaded): Declare.
12326 (tracepoint_look_up_symbols): Declare.
12327 (struct fast_tpoint_collect_status): Declare.
12328 (fast_tracepoint_collecting): Declare.
12329 (force_unlock_trace_buffer): Declare.
12330 (handle_tracepoint_bkpts): Declare.
12331 (initialize_low_tracepoint)
12332 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12333 * target.h (struct target_ops) <stabilize_threads,
12334 install_fast_tracepoint_jump_pad>: New fields.
12335 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12336 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12337 [HAVE_STDINT_H]: Include stdint.h.
12338 (trace_debug_1): Rename to ...
12339 (trace_vdebug): ... this.
12340 (trace_debug): Rename to ...
12341 (trace_debug_1): ... this. Add `level' parameter.
12342 (trace_debug): New.
12343 (ATTR_USED, ATTR_NOINLINE): New.
12344 (IP_AGENT_EXPORT): New.
12345 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12346 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12347 (about_to_request_buffer_space, trace_buffer_is_full)
12348 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12349 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12350 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12351 (traceframe_write_count, traceframes_created)
12352 (trace_state_variables)
12353 New renaming defines.
12354 (struct ipa_sym_addresses): New.
12355 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12356 (symbol_list): New.
12357 (ipa_sym_addrs): New.
12358 (all_tracepoint_symbols_looked_up): New.
12359 (in_process_agent_loaded): New.
12360 (write_e_ipa_not_loaded): New.
12361 (maybe_write_ipa_not_loaded): New.
12362 (tracepoint_look_up_symbols): New.
12363 (debug_threads) [IN_PROCESS_AGENT]: New.
12364 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12365 (UNKNOWN_SIDE_EFFECTS): New.
12366 (stop_tracing): New.
12367 (flush_trace_buffer): New.
12368 (stop_tracing_bkpt): New.
12369 (flush_trace_buffer_bkpt): New.
12370 (read_inferior_integer): New.
12371 (read_inferior_uinteger): New.
12372 (read_inferior_data_pointer): New.
12373 (write_inferior_data_pointer): New.
12374 (write_inferior_integer): New.
12375 (write_inferior_uinteger): New.
12376 (struct collect_static_trace_data_action): Delete.
12377 (enum tracepoint_type): New.
12378 (struct tracepoint) <type>: New field `type'.
12379 <actions_str, step_actions, step_actions_str>: Only include in
12380 GDBserver.
12381 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12382 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12383 (tracepoints): Use IP_AGENT_EXPORT.
12384 (last_tracepoint): Don't include in the IPA.
12385 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12386 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12387 (alloced_trace_state_variables): New.
12388 (trace_state_variables): Use IP_AGENT_EXPORT.
12389 (traceframe_t): Delete unused variable.
12390 (circular_trace_buffer): Don't include in the IPA.
12391 (trace_buffer_start): Delete.
12392 (struct trace_buffer_control): New.
12393 (trace_buffer_free): Delete.
12394 (struct ipa_trace_buffer_control): New.
12395 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12396 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12397 New.
12398 (trace_buffer_ctrl): New.
12399 (TRACE_BUFFER_CTRL_CURR): New.
12400 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12401 Reimplement as macros.
12402 (trace_buffer_wrap): Delete.
12403 (traceframe_write_count, traceframe_read_count)
12404 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12405 (struct tracepoint_hit_ctx) <type>: New field.
12406 (struct fast_tracepoint_ctx): New.
12407 (memory_barrier): New.
12408 (cmpxchg): New.
12409 (record_tracepoint_error): Update atomically in the IPA.
12410 (clear_inferior_trace_buffer): New.
12411 (about_to_request_buffer_space): New.
12412 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12413 updating the same buffer.
12414 (add_tracepoint): Default the tracepoint's type to trap
12415 tracepoint, and orig_size to -1.
12416 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12417 internal variables.
12418 (create_trace_state_variable): New parameter `gdb'. Handle it.
12419 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12420 (cmd_qtdp): Handle fast tracepoints.
12421 (cmd_qtdv): Adjust.
12422 (max_jump_pad_size): New.
12423 (gdb_jump_pad_head): New.
12424 (get_jump_space_head): New.
12425 (claim_jump_space): New.
12426 (sort_tracepoints): New.
12427 (MAX_JUMP_SIZE): New.
12428 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12429 IPA.
12430 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12431 support. Upload fast traceframes, and delete internal IPA
12432 breakpoints.
12433 (stop_tracing_handler): New.
12434 (flush_trace_buffer_handler): New.
12435 (cmd_qtstop): Upload fast tracepoints.
12436 (response_tracepoint): Handle fast tracepoints.
12437 (tracepoint_finished_step): Upload fast traceframes. Set the
12438 tracepoint hit context's tracepoint type.
12439 (handle_tracepoint_bkpts): New.
12440 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12441 type. Add comment about fast tracepoints.
12442 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12443 non-existing action_str field.
12444 (get_context_regcache): Handle fast tracepoints.
12445 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12446 to the regcache.
12447 (fast_tracepoint_from_jump_pad_address): New.
12448 (fast_tracepoint_from_ipa_tpoint_address): New.
12449 (collecting_t): New.
12450 (force_unlock_trace_buffer): New.
12451 (fast_tracepoint_collecting): New.
12452 (collecting): New.
12453 (gdb_collect): New.
12454 (write_inferior_data_ptr): New.
12455 (target_tp_heap): New.
12456 (target_malloc): New.
12457 (download_agent_expr): New.
12458 (UALIGN): New.
12459 (download_tracepoints): New.
12460 (download_trace_state_variables): New.
12461 (upload_fast_traceframes): New.
12462 (IPA_FIRST_TRACEFRAME): New.
12463 (IPA_NEXT_TRACEFRAME_1): New.
12464 (IPA_NEXT_TRACEFRAME): New.
12465 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12466 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12467 (gdb_jump_pad_buffer_end): New.
12468 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12469 (initialize_tracepoint): Adjust.
12470 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12471 buffer. Initialize the low module.
12472 * utils.c (PREFIX, TOOLNAME): New.
12473 (malloc_failure): Use PREFIX.
12474 (error): In the IPA, an error causes an exit.
12475 (fatal, warning): Use PREFIX.
12476 (internal_error): Use TOOLNAME.
12477 (NUMCELLS): Increase to 10.
12478 * configure, config.in: Regenerate.
12479
12480 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12481
12482 * server.c (handle_query) <qSupported>: Do two passes over the
12483 qSupported string to avoid nesting strtok.
12484
12485 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12486
12487 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12488 (CDEPS): New.
12489 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12490 -Wl,--dynamic-list.
12491 * configure: Regenerate.
12492 * proc-service.list: New.
12493
12494 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12495
12496 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12497 New comment.
12498
12499 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12500
12501 * gdbreplay.c (remote_open): Check error return from socket() call by
12502 its equality to -1 not by it being negative.
12503 * remote-utils.c (remote_open): Likewise.
12504
12505 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12506
12507 * config.h: Regenerate.
12508
12509 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12510
12511 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12512 doesn't provide PTRACE_GET_THREAD_AREA.
12513
12514 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12515
12516 * linux-m68k-low.c: Include <asm/ptrace.h>
12517 (ps_get_thread_area): Implement.
12518
12519 2010-05-03 Doug Evans <dje@google.com>
12520
12521 * event-loop.c (struct callback_event): New struct.
12522 (callback_list): New global.
12523 (append_callback_event, delete_callback_event): New functions.
12524 (process_callback): New function.
12525 (start_event_loop): Call it.
12526 * remote-utils.c (NOT_SCHEDULED): Define.
12527 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12528 moved out of readchar.
12529 (readchar): Rewrite. Call reschedule before returning.
12530 (reset_readchar): New function.
12531 (remote_close): Call it.
12532 (process_remaining, reschedule): New functions.
12533 * server.h (callback_handler_func): New typedef.
12534 (append_callback_event, delete_callback_event): Declare.
12535
12536 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12537
12538 * proc-service.c (ps_pglobal_lookup): Use
12539 thread_db_look_up_one_symbol.
12540 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12541 parameter. Use it instead of all_symbols_looked_up.
12542 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12543 field.
12544 (all_symbols_looked_up): Don't declare.
12545 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12546 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12547 field.
12548 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12549 Set all_symbols_looked_up here.
12550 (thread_db_look_up_one_symbol): New.
12551 (thread_db_get_tls_address): Adjust.
12552 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12553 thread_db object on the heap, and tentatively set it in the
12554 process structure.
12555 (thread_db_init): Don't set all_symbols_looked_up here.
12556 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12557
12558 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12559
12560 * linux-low.c (linux_kill, linux_detach): Adjust.
12561 (status_pending_p_callback): Remove redundant statement. Check
12562 for !TARGET_WAITIKIND_IGNORE, instead of
12563 TARGET_WAITKIND_STOPPED.
12564 (handle_tracepoints): Make sure LWP is locked. Adjust.
12565 (linux_wait_for_event_1): Adjust.
12566 (linux_cancel_breakpoints): New.
12567 (unsuspend_one_lwp): New.
12568 (unsuspend_all_lwps): New.
12569 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12570 (send_sigstop_callback): Change return type to int, add new
12571 `except' parameter and handle it.
12572 (suspend_and_send_sigstop_callback): New.
12573 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12574 pass them down. If SUSPEND, also increment the lwp's suspend
12575 count.
12576 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12577 (need_step_over_p): Don't consider suspended LWPs.
12578 (start_step_over): Adjust.
12579 (proceed_one_lwp): Change return type to int, add new `except'
12580 parameter and handle it.
12581 (unsuspend_and_proceed_one_lwp): New.
12582 (proceed_all_lwps): Use find_inferior instead of
12583 for_each_inferior.
12584 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12585 also decrement the suspend count of LWPs. Pass `except' down,
12586 instead of hacking its suspend count.
12587 (linux_pause_all): Add `freeze' parameter. Adjust.
12588 (linux_unpause_all): New.
12589 (linux_target_ops): Install linux_unpause_all.
12590 * server.c (handle_status): Adjust.
12591 * target.h (struct target_ops): New fields `unpause_all' and
12592 `cancel_breakpoints'. Add new parameter to `pause_all'.
12593 (pause_all): Add new `freeze' parameter.
12594 (unpause_all): New.
12595 (cancel_breakpoints): New.
12596 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12597 cancel breakpoints.
12598 (cmd_qtstart): Pause threads.
12599 (stop_tracing): Pause threads, and cancel breakpoints.
12600 * win32-low.c (win32_target_ops): Adjust.
12601
12602 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12603
12604 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12605 the inferior right away from here...
12606 (linux_wait_1): ... to here, and adjust to check the thread's
12607 last_resume_kind instead of the lwp's step or stop_expected flags.
12608
12609 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12610
12611 * README: Use consistent `GDB' and `GDBserver' spellings.
12612
12613 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12614
12615 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12616 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12617 (linux_detach_one_lwp): Assume the lwp is stopped.
12618 (any_thread_of): Delete.
12619 (linux_detach): Stop all lwps here. Don't blindly delete all
12620 breakpoints.
12621 (delete_lwp_callback): New.
12622 (linux_mourn): Delete all lwps of the process that is gone.
12623 (linux_wait_1): Don't delete the last lwp of the process here.
12624 * mem-break.h (mark_breakpoints_out): Declare.
12625 * mem-break.c (mark_breakpoints_out): New.
12626 (free_all_breakpoints): Use it.
12627 * server.c (handle_target_event): If the process is gone, mark
12628 breakpoints out.
12629 * thread-db.c (struct thread_db) <create_bp>: New field.
12630 (thread_db_enable_reporting): Fix prototype. Store a thread event
12631 breakpoint reference in the thread_db struct.
12632 (thread_db_load_search): Clear the thread_db object.
12633 (try_thread_db_load_1): Ditto.
12634 (switch_to_process): New.
12635 (disable_thread_event_reporting): Use it.
12636 (remove_thread_event_breakpoints): New.
12637 (thread_db_detach, thread_db_mourn): Use it.
12638
12639 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12640
12641 * linux-low.c (linux_enable_event_reporting): New.
12642 (linux_wait_for_event_1, handle_extended_wait): Use it.
12643
12644 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12645
12646 * linux-low.c (linux_kill_one_lwp, linux_kill)
12647 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12648 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12649 SIGSTOP even if the LWP is stopped.
12650 (send_sigstop_callback): New.
12651 (stop_all_lwps): Use send_sigstop_callback instead.
12652 (linux_resume_one_thread): Adjust.
12653 (proceed_one_lwp): Still proceed an LWP that the client has
12654 requested to stop, if we haven't reported it as stopped yet. Make
12655 sure that LWPs the client want stopped, have a pending SIGSTOP.
12656
12657 2010-04-26 Doug Evans <dje@google.com>
12658
12659 * server.c (handle_general_set): Make static.
12660
12661 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12662 Print received char after testing for error/eof instead of before.
12663 (input_interrupt): Tweak comment.
12664
12665 2010-04-23 Doug Evans <dje@google.com>
12666
12667 * server.c (start_inferior): Print inferior argv if --debug.
12668
12669 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12670
12671 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12672 * nto-x86-low.c: Include server.h
12673
12674 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12675
12676 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12677 be consistent with other sources of this directory.
12678 (init_registers_amd64): Correct name of source file of this function
12679 in the comment.
12680
12681 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12682
12683 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12684 64-bit executables.
12685
12686 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12687
12688 * win32-i386-low.c: Add 64-bit support.
12689 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12690 (init_registers_amd64): Declare.
12691 (mappings): Add 64-bit version of array.
12692 (init_windows_x86): New function.
12693 (the_low_target): Change init_arch field to init_windows_x86.
12694
12695 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12696
12697 * win32-low.c: Adapt to support also 64-bit architecture.
12698 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12699 (get_image_name): Use SIZE_T type for local variable `done'.
12700 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12701 (toolhelp_get_dll_name): Idem.
12702 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12703 Use uintptr_t typecast to avoid warning.
12704 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12705 (handle_exception): Use phex_nz to avoid warning.
12706 (win32_wait): Remove unused local variable `process'.
12707
12708 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12709
12710 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12711 `amd64-avx.o'.
12712
12713 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12714
12715 * configure.ac: Use `ws2_32' library for srv_mingw.
12716 * configure: Regenerate.
12717 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12718 * remote-utils.c: Likewise.
12719
12720 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12721
12722 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12723 if __x86_64__ is defined.
12724
12725 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12726
12727 * configure: Regenerate.
12728
12729 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12730
12731 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12732 * target.h (target_ops): New get_tib_address field.
12733 * win32-low.h (win32_thread_info): Add thread_local_base field.
12734 * win32-low.c (child_add_thread): Add tlb argument.
12735 Set thread_local_base field to TLB.
12736 (get_child_debug_event): Adapt to child_add_thread change.
12737 (win32_get_tib_address): New function.
12738 (win32_target_ops): Set get_tib_address field to
12739 win32_get_tib_address.
12740 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12741
12742 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12743
12744 * linux-low.c (linux_mourn): Also remove the process.
12745 * server.c (handle_target_event): Don't remove the process here.
12746 * nto-low.c (nto_mourn): New.
12747 (nto_target_ops): Install it.
12748 * spu-low.c (spu_mourn): New.
12749 (spu_target_ops): Install it.
12750 * win32-low.c (win32_mourn): New.
12751 (win32_target_ops): Install it.
12752
12753 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12754
12755 * server.h (buffer_xml_printf): Remove redundant `;'.
12756
12757 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12758
12759 * regcache.c (set_register_cache): Invalidate regcaches before
12760 changing the register cache layout.
12761 (regcache_invalidate_one): Allow a NULL regcache.
12762 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12763 regcaches before changing the register cache layout or the target
12764 regsets.
12765
12766 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12767
12768 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12769 variable warning on Linux/x86-64.
12770
12771 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12772
12773 GDBserver disconnected tracing support.
12774
12775 * linux-low.c (linux_remove_process): Delete.
12776 (add_lwp): Don't set last_resume_kind here.
12777 (linux_kill): Use `mourn'.
12778 (linux_detach): Use `thread_db_detach', and `mourn'.
12779 (linux_mourn): New.
12780 (linux_attach_lwp_1): Adjust comment.
12781 (linux_attach): last_resume_kind moved the thread_info; adjust.
12782 (status_pending_p_callback): Adjust.
12783 (linux_wait_for_event_1): Adjust.
12784 (count_events_callback, select_singlestep_lwp_callback)
12785 (select_event_lwp_callback, cancel_breakpoints_callback)
12786 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12787 (proceed_one_lwp): Adjust.
12788 (linux_async): Add debug output.
12789 (linux_thread_stopped): New.
12790 (linux_pause_all): New.
12791 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12792 linux_pause_all.
12793 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12794 (thread_db_free): Delete declaration.
12795 (thread_db_detach, thread_db_mourn): Declare.
12796 * thread-db.c (thread_db_init): Use thread_db_mourn.
12797 (thread_db_free): Delete, split in two.
12798 (disable_thread_event_reporting): New.
12799 (thread_db_detach): New.
12800 (thread_db_mourn): New.
12801
12802 * server.h (struct thread_info) <last_resume_kind>: New field.
12803 <attached>: Add comment.
12804 <gdb_detached>: New field.
12805 (handler_func): Change return type to int.
12806 (handle_serial_event, handle_target_event): Ditto.
12807 (gdb_connected): Declare.
12808 (tracing): Delete.
12809 (disconnected_tracing): Declare.
12810 (stop_tracing): Declare.
12811
12812 * server.c (handle_query) <qSupported>: Report support for
12813 disconnected tracing.
12814 (queue_stop_reply_callback): Account for running threads.
12815 (gdb_wants_thread_stopped): New.
12816 (gdb_wants_all_threads_stopped): New.
12817 (gdb_reattached_process): New.
12818 (handle_status): Clear the `gdb_detached' flag of all processes.
12819 In all-stop, stop all threads.
12820 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12821 (process_serial_event): If the remote connection breaks, or if an
12822 exit was forced with "monitor exit", force an event loop exit.
12823 Handle disconnected tracing on detach.
12824 (handle_serial_event): Adjust.
12825 (handle_target_event): If GDB isn't connected, forward events back
12826 to the inferior, unless the last process exited, in which case,
12827 exit gdbserver. Adjust interface.
12828
12829 * remote-utils.c (remote_open): Don't block in accept. Instead
12830 register an event loop source on the listen socket file
12831 descriptor. Refactor bits into ...
12832 (listen_desc): ... this new global.
12833 (gdb_connected): ... this new function.
12834 (enable_async_notification): ... this new function.
12835 (handle_accept_event): ... this new function.
12836 (remote_close): Clear remote_desc.
12837
12838 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12839
12840 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12841 New fields.
12842 (mourn_inferior): Define.
12843 (target_process_qsupported): Avoid the dangling else problem.
12844 (thread_stopped): Define.
12845 (pause_all): Define.
12846 (target_waitstatus_to_string): Declare.
12847 * target.c (target_waitstatus_to_string): New.
12848
12849 * tracepoint.c (tracing): Make extern.
12850 (disconnected_tracing): New.
12851 (stop_tracing): Make extern. Handle tracing stops due to GDB
12852 disconnecting.
12853 (cmd_qtdisconnected): New.
12854 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12855 (handle_tracepoint_general_set): Handle QTDisconnected.
12856
12857 * event-loop.c (event_handler_func): Change return type to int.
12858 (process_event): Bail out if the event handler wants the event
12859 loop to stop.
12860 (handle_file_event): Ditto.
12861 (start_event_loop): Bail out if the event handler wants the event
12862 loop to stop.
12863
12864 * nto-low.c (nto_target_ops): Adjust.
12865 * spu-low.c (spu_wait): Don't remove the process here.
12866 (spu_target_ops): Adjust.
12867 * win32-low.c (win32_wait): Don't remove the process here.
12868 (win32_target_ops): Adjust.
12869
12870 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12871
12872 * regcache.c (realloc_register_cache): Invalidate inferior's
12873 regcache before recreating it.
12874
12875 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12876
12877 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12878
12879 2010-04-09 Stan Shebs <stan@codesourcery.com>
12880 Pedro Alves <pedro@codesourcery.com>
12881
12882 * server.h (LONGEST): New.
12883 (struct thread_info) <while_stepping>: New field.
12884 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12885 Declare.
12886 (initialize_tracepoint, handle_tracepoint_general_set)
12887 (handle_tracepoint_query, tracepoint_finished_step)
12888 (tracepoint_was_hit, release_while_stepping_state_list):
12889 (current_traceframe): Declare.
12890 * server.c (handle_general_set): Handle tracepoint packets.
12891 (read_memory): New.
12892 (write_memory): New.
12893 (handle_search_memory_1): Use read_memory.
12894 (handle_query): Report support for conditional tracepoints, trace
12895 state variables, and tracepoint sources. Handle tracepoint
12896 queries.
12897 (main): Initialize the tracepoints module.
12898 (process_serial_event): Handle traceframe reads/writes.
12899
12900 * linux-low.c (handle_tracepoints): New.
12901 (linux_wait_1): Call it.
12902 (linux_resume_one_lwp): Handle while-stepping.
12903 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12904 (linux_target_ops): Install them.
12905 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12906 New field.
12907 * linux-x86-low.c (x86_supports_tracepoints): New.
12908 (the_low_target). Install it.
12909
12910 * mem-break.h (delete_breakpoint): Declare.
12911 * mem-break.c (delete_breakpoint): Make external.
12912
12913 * target.h (struct target_ops): Add `supports_tracepoints',
12914 `read_pc', and `write_pc' fields.
12915 (target_supports_tracepoints): Define.
12916 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12917 (phex_nz): New.
12918
12919 * regcache.h (struct regcache) <registers_owned>: New field.
12920 (init_register_cache, regcache_cpy): Declare.
12921 (regcache_read_pc, regcache_write_pc): Declare.
12922 (register_cache_size): Declare.
12923 (supply_regblock): Declare.
12924 * regcache.c (init_register_cache): New.
12925 (new_register_cache): Use it.
12926 (regcache_cpy): New.
12927 (register_cache_size): New.
12928 (supply_regblock): New.
12929 (regcache_read_pc, regcache_write_pc): New.
12930
12931 * tracepoint.c: New.
12932
12933 * Makefile.in (OBS): Add tracepoint.o.
12934 (tracepoint.o): New rule.
12935
12936 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12937
12938 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12939 (i386-mmx.o): New.
12940 (i386-mmx.c): Likewise.
12941 (i386-mmx-linux.o): Likewise.
12942 (i386-mmx-linux.c): Likewise.
12943
12944 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12945 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12946 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12947 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12948
12949 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12950 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12951 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12952
12953 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12954
12955 * Makefile.in (clean): Updated.
12956 (i386-avx.o): New.
12957 (i386-avx.c): Likewise.
12958 (i386-avx-linux.o): Likewise.
12959 (i386-avx-linux.c): Likewise.
12960 (amd64-avx.o): Likewise.
12961 (amd64-avx.c): Likewise.
12962 (amd64-avx-linux.o): Likewise.
12963 (amd64-avx-linux.c): Likewise.
12964
12965 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12966 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12967 (srv_amd64_regobj): Add amd64-avx.o.
12968 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12969 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12970 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12971 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12972 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12973 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12974 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12975
12976 * i387-fp.c: Include "i386-xstate.h".
12977 (i387_xsave): New.
12978 (i387_cache_to_xsave): Likewise.
12979 (i387_xsave_to_cache): Likewise.
12980 (x86_xcr0): Likewise.
12981
12982 * i387-fp.h (i387_cache_to_xsave): Likewise.
12983 (i387_xsave_to_cache): Likewise.
12984 (x86_xcr0): Likewise.
12985
12986 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12987 * linux-crisv32-low.c (target_regsets): Likewise.
12988 * linux-m68k-low.c (target_regsets): Likewise.
12989 * linux-mips-low.c (target_regsets): Likewise.
12990 * linux-ppc-low.c (target_regsets): Likewise.
12991 * linux-s390-low.c (target_regsets): Likewise.
12992 * linux-sh-low.c (target_regsets): Likewise.
12993 * linux-sparc-low.c (target_regsets): Likewise.
12994 * linux-xtensa-low.c (target_regsets): Likewise.
12995
12996 * linux-low.c: Include <sys/uio.h>.
12997 (regsets_fetch_inferior_registers): Support nt_type.
12998 (regsets_store_inferior_registers): Likewise.
12999 (linux_process_qsupported): New.
13000 (linux_target_ops): Add linux_process_qsupported.
13001
13002 * linux-low.h (regset_info): Add nt_type.
13003 (linux_target_ops): Add process_qsupported.
13004
13005 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13006 and <sys/uio.h>.
13007 (init_registers_i386_avx_linux): New.
13008 (init_registers_amd64_avx_linux): Likewise.
13009 (xmltarget_i386_linux_no_xml): Likewise.
13010 (xmltarget_amd64_linux_no_xml): Likewise.
13011 (PTRACE_GETREGSET): Likewise.
13012 (PTRACE_SETREGSET): Likewise.
13013 (x86_fill_xstateregset): Likewise.
13014 (x86_store_xstateregset): Likewise.
13015 (use_xml): Likewise.
13016 (x86_linux_update_xmltarget): Likewise.
13017 (x86_linux_process_qsupported): Likewise.
13018 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13019 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13020 init_registers_i386_linux here. Call
13021 x86_linux_update_xmltarget.
13022 (the_low_target): Add x86_linux_process_qsupported.
13023
13024 * server.c (handle_query): Call target_process_qsupported.
13025
13026 * target.h (target_ops): Add process_qsupported.
13027 (target_process_qsupported): New.
13028
13029 2010-04-03 Pedro Alves <pedro@codesourcery.com>
13030
13031 * inferiors.c (add_thread): Set last_status kind to
13032 TARGET_WAITKIND_IGNORE.
13033 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13034 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13035 (linux_wait_1): Move `thread' local definition to block that uses
13036 it. Don't NULL initialize `event_child'.
13037 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13038 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13039 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13040
13041 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13042
13043 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13044 an extended waitstatus, or by a watchpoint.
13045 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13046 thread was stepping or has been stopped by a watchpoint.
13047
13048 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13049
13050 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13051 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13052 of another, then delete the previous, and validate all
13053 breakpoints.
13054 (validate_inserted_breakpoint): New.
13055 (delete_disabled_breakpoints): New.
13056 (validate_breakpoints): New.
13057 (check_mem_read): Validate breakpoints before trusting their
13058 shadow. Delete disabled breakpoints.
13059 (check_mem_write): Validate breakpoints before trusting they
13060 should be inserted. Delete disabled breakpoints.
13061 * mem-break.h (validate_breakpoints):
13062 * server.c (handle_query): Validate breakpoints when we see a
13063 qSymbol query.
13064
13065 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13066
13067 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13068 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13069 if we could tell there's a GDB breakpoint at stop_pc.
13070 (need_step_over_p): Don't do a step over if we find a GDB
13071 breakpoint at the resume PC.
13072
13073 * mem-break.c (struct raw_breakpoint): New.
13074 (enum bkpt_type): New type `gdb_breakpoint'.
13075 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13076 fields. New field `raw'.
13077 (find_raw_breakpoint_at): New.
13078 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13079 breakpoint instead.
13080 (set_breakpoint_at): Adjust.
13081 (delete_raw_breakpoint): New.
13082 (release_breakpoint): New.
13083 (delete_breakpoint): Rename to...
13084 (delete_breakpoint_1): ... this. Add proc parameter. Use
13085 release_breakpoint. Return ENOENT.
13086 (delete_breakpoint): Reimplement.
13087 (find_breakpoint_at): Delete.
13088 (find_gdb_breakpoint_at): New.
13089 (delete_breakpoint_at): Delete.
13090 (set_gdb_breakpoint_at): New.
13091 (delete_gdb_breakpoint_at): New.
13092 (gdb_breakpoint_here): New.
13093 (set_reinsert_breakpoint): Use release_breakpoint.
13094 (uninsert_breakpoint): Rename to ...
13095 (uninsert_raw_breakpoint): ... this.
13096 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13097 (reinsert_raw_breakpoint): Change parameter type to
13098 raw_breakpoint.
13099 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13100 instead.
13101 (check_breakpoints): Adjust. Use release_breakpoint.
13102 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13103 (breakpoint_inserted_here): Ditto.
13104 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13105 Don't trust the breakpoint's shadow if it is not inserted.
13106 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13107 (delete_all_breakpoints): Adjust.
13108 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13109 use delete_breakpoint_1.
13110
13111 * mem-break.h (breakpoints_supported): Delete declaration.
13112 (set_gdb_breakpoint_at): Declare.
13113 (gdb_breakpoint_here): Declare.
13114 (delete_breakpoint_at): Delete.
13115 (delete_gdb_breakpoint_at): Declare.
13116
13117 * server.h (struct raw_breakpoint): Forward declare.
13118 (struct process_info): New field `raw_breakpoints'.
13119
13120 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13121 breakpoints.
13122
13123 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13124
13125 * linux-low.c (status_pending_p_callback): Fix comment.
13126 (linux_wait_for_event_1): Move most of the internal breakpoint
13127 handling from here...
13128 (linux_wait_1): ... to here.
13129 (count_events_callback): New.
13130 (select_singlestep_lwp_callback): New.
13131 (select_event_lwp_callback): New.
13132 (cancel_breakpoints_callback): New.
13133 (select_event_lwp): New.
13134 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13135 priority to all LWPs that have had events that should be reported
13136 to the client. Cancel breakpoints when about to reporting the
13137 event to the client, not while stopping lwps. No longer cancel
13138 finished single-steps here.
13139 (cancel_finished_single_step): Delete.
13140 (cancel_finished_single_steps): Delete.
13141
13142 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13143
13144 * mem-break.c (enum bkpt_type): New.
13145 (struct breakpoint): New field `type'.
13146 (set_breakpoint_at): Change return type to struct breakpoint
13147 pointer. Set type to `other_breakpoint' by default.
13148 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13149 in the breakpoint list.
13150 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13151 (reinsert_breakpoint): Rename to ...
13152 (reinsert_raw_breakpoint): ... this.
13153 (reinsert_breakpoints_at): Adjust.
13154 * mem-break.h (struct breakpoint): Declare.
13155 (set_breakpoint_at): Change return type to struct breakpoint
13156 pointer.
13157
13158 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13159
13160 * server.c (handle_query): Assign, not compare.
13161
13162 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13163
13164 Teach linux gdbserver to step-over-breakpoints.
13165
13166 * linux-low.c (can_hardware_single_step): New.
13167 (supports_breakpoints): New.
13168 (handle_extended_wait): If stopping threads, read the stop pc of
13169 the new cloned LWP.
13170 (get_pc): New.
13171 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13172 low target doesn't support retrieving the PC.
13173 (add_lwp): Set last_resume_kind to resume_continue.
13174 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13175 (linux_attach): Don't clear stop_expected. Set the lwp's
13176 last_resume_kind to resume_stop.
13177 (linux_detach_one_lwp): Don't check for removed breakpoints.
13178 (check_removed_breakpoint): Delete.
13179 (status_pending_p): Rename to ...
13180 (status_pending_p_callback): ... this. Don't check for removed
13181 breakpoints. Don't consider threads that are stopped from GDB's
13182 perspective.
13183 (linux_wait_for_lwp): Always read the stop_pc here.
13184 (cancel_breakpoint): New.
13185 (step_over_bkpt): New global.
13186 (linux_wait_for_event_1): Implement stepping over breakpoints.
13187 (gdb_wants_lwp_stopped): New.
13188 (gdb_wants_all_stopped): New.
13189 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13190 single-step traps here. Store the thread's last reported target
13191 wait status.
13192 (send_sigstop): Don't clear stop_expected. Always set it,
13193 instead.
13194 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13195 (cancel_finished_single_step): New.
13196 (cancel_finished_single_steps): New.
13197 (wait_for_sigstop): Don't cancel finished single-step traps here.
13198 (linux_resume_one_lwp): Don't check for removed breakpoints.
13199 Don't set `step' on non-hardware step archs.
13200 (linux_set_resume_request): Ignore resume_stop requests if already
13201 stopping or stopped. Set the lwp's last_resume_kind.
13202 (resume_status_pending_p): Don't check for removed breakpoints.
13203 (need_step_over_p): New.
13204 (start_step_over): New.
13205 (finish_step_over): New.
13206 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13207 requests. Clear the thread's last reported target waitstatus.
13208 Don't use the `suspended' flag. Don't consider pending breakpoints.
13209 (linux_resume): Start a step-over if necessary.
13210 (proceed_one_lwp): New.
13211 (proceed_all_lwps): New.
13212 (unstop_all_lwps): New.
13213 * linux-low.h (struct lwp_info): Rewrite comment for the
13214 `suspended' flag. Add the `stop_pc' field. Delete the
13215 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13216 Add `'last_resume_kind' and `need_step_over' fields.
13217 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13218 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13219 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13220 (set_raw_breakpoint_at): New.
13221 (set_breakpoint_at): Rewrite to use it.
13222 (reinsert_breakpoint_handler): Delete.
13223 (set_reinsert_breakpoint): New.
13224 (reinsert_breakpoint_by_bp): Delete.
13225 (delete_reinsert_breakpoints): New.
13226 (uninsert_breakpoint): Rewrite.
13227 (uninsert_breakpoints_at): New.
13228 (reinsert_breakpoint): Rewrite.
13229 (reinsert_breakpoints_at): New.
13230 (check_breakpoints): Rewrite.
13231 (breakpoint_here): New.
13232 (breakpoint_inserted_here): New.
13233 (check_mem_read): Adjust.
13234 * mem-break.h (breakpoints_supported, breakpoint_here)
13235 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13236 (reinsert_breakpoint_by_bp): Delete declaration.
13237 (delete_reinsert_breakpoints): Declare.
13238 (reinsert_breakpoint): Delete declaration.
13239 (reinsert_breakpoints_at): Declare.
13240 (uninsert_breakpoint): Delete declaration.
13241 (uninsert_breakpoints_at): Declare.
13242 (check_breakpoints): Adjust prototype.
13243 * server.h: Adjust include order.
13244 (struct thread_info): Declare here. Add a `last_status' field.
13245
13246 2010-03-23 Michael Snyder <msnyder@vmware.com>
13247
13248 * server.c (crc32): New function.
13249 (handle_query): Add handling for 'qCRC:' request.
13250
13251 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13252
13253 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13254 lwp had been stopped by a watchpoint.
13255
13256 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13257
13258 * server.h (internal_error): Declare.
13259 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13260 * utils.c (internal_error): New function.
13261
13262 2010-03-15 Andreas Schwab <schwab@redhat.com>
13263
13264 * configure.srv: Fix typo setting srv_regobj.
13265
13266 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13267
13268 * linux-low.c (fetch_register): Avoid passing a non string literal
13269 format to `error'.
13270 (usr_store_inferior_registers): Ditto.
13271
13272 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13273
13274 * linux-low.c (linux_write_memory): Bail out early if peeking
13275 memory failed.
13276
13277 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13278
13279 * linux-low.h (struct lwp_info): New fields
13280 `stopped_by_watchpoint' and `stopped_data_address'.
13281 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13282 here, and cache them in the lwp object.
13283 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13284 directly.
13285 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13286 field.
13287 (linux_stopped_by_watchpoint): Rewrite.
13288 (linux_stopped_data_address): Rewrite.
13289
13290 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13291
13292 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13293 switching the current inferior, not before.
13294
13295 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13296
13297 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13298 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13299 i386-linux.c and amd64-linux.c.
13300 (reg-i386.o): Removed.
13301 (reg-i386.c): Likewise.
13302 (reg-i386-linux.o): Likewise.
13303 (reg-i386-linux.c): Likewise.
13304 (reg-x86-64.o): Likewise.
13305 (reg-x86-64.c): Likewise.
13306 (reg-x86-64-linux.o): Likewise.
13307 (reg-x86-64-linux.c): Likewise.
13308 (i386.o): New.
13309 (i386.c): Likewise.
13310 (i386-linux.o): Likewise.
13311 (i386-linux.c): Likewise.
13312 (amd64.o): Likewise.
13313 (amd64.c): Likewise.
13314 (amd64-linux.o): Likewise.
13315 (amd64-linux.c): Likewise.
13316
13317 * configure.srv (srv_i386_regobj): New.
13318 (srv_i386_linux_regobj): Likewise.
13319 (srv_amd64_regobj): Likewise.
13320 (srv_amd64_linux_regobj): Likewise.
13321 (srv_i386_32bit_xmlfiles): Likewise.
13322 (srv_i386_64bit_xmlfiles): Likewise.
13323 (srv_i386_xmlfiles): Likewise.
13324 (srv_amd64_xmlfiles): Likewise.
13325 (srv_i386_linux_xmlfiles): Likewise.
13326 (srv_amd64_linux_xmlfiles): Likewise.
13327 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13328 srv_xmlfiles to $srv_i386_xmlfiles.
13329 (i[34567]86-*-mingw32ce*): Likewise.
13330 (i[34567]86-*-mingw*): Likewise.
13331 (i[34567]86-*-nto*): Likewise.
13332 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13333 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13334 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13335 (x86_64-*-linux*): Likewise.
13336
13337 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13338 (init_registers_amd64_linux): New.
13339 (x86_arch_setup): Replace init_registers_x86_64_linux with
13340 init_registers_amd64_linux.
13341
13342 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13343
13344 * configure.ac: Check for libdl. If it is not available link against
13345 static libthread_db.
13346 * configure: Regenerate.
13347
13348 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13349
13350 PR9605
13351
13352 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13353 handing a read watchpoint.
13354 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13355
13356 2010-02-12 Doug Evans <dje@google.com>
13357
13358 * linux-low.c (linux_supports_tracefork_flag): Document.
13359 (linux_look_up_symbols): Add comment.
13360
13361 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13362
13363 * regcache.c (supply_register): Clear regcache if buf is NULL.
13364
13365 2010-02-02 Nicolas Roche <roche@sourceware.org>
13366 Joel Brobecker <brobecker@adacore.com>
13367
13368 * inferiors.c (find_inferior): Add function documentation.
13369 (unloaded_dll): Handle the case where the unloaded dll has not
13370 been previously registered in the dll list.
13371
13372 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13373
13374 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13375 (thumb2_breakpoint): New.
13376 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13377
13378 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13379
13380 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13381 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13382 breakpoints.
13383
13384 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13385
13386 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13387
13388 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13389
13390 * linux-s390-low.c (s390_collect_ptrace_register)
13391 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13392
13393 2010-01-21 Doug Evans <dje@google.com>
13394
13395 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13396 (PTRACE_ARG4_TYPE): New macro.
13397 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13398 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13399 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13400 (usr_store_inferior_registers): Ditto.
13401 (linux_read_memory, linux_write_memory): Ditto.
13402 (linux_test_for_tracefork): Ditto.
13403
13404 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13405 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13406
13407 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13408
13409 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13410 target.
13411
13412 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13413
13414 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13415 prototype to take a regcache. Adjust.
13416
13417 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13418
13419 * regcache.h (struct thread_info): Forward declare.
13420 (struct regcache): New.
13421 (new_register_cache): Adjust prototype.
13422 (get_thread_regcache): Declare.
13423 (free_register_cache): Adjust prototype.
13424 (registers_to_string, registers_from_string): Ditto.
13425 (supply_register, supply_register_by_name, collect_register)
13426 (collect_register_as_string, collect_register_by_name): Ditto.
13427 * regcache.c (struct inferior_regcache_data): Delete.
13428 (get_regcache): Rename to ...
13429 (get_thread_regcache): ... this. Adjust. Switch inferior before
13430 fetching registers.
13431 (regcache_invalidate_one): Adjust.
13432 (regcache_invalidate): Fix prototype.
13433 (new_register_cache): Return the new register cache.
13434 (free_register_cache): Change prototype.
13435 (realloc_register_cache): Adjust.
13436 (registers_to_string): Change prototype to take a regcache. Adjust.
13437 (registers_from_string): Ditto.
13438 (register_data): Ditto.
13439 (supply_register): Ditto.
13440 (supply_register_by_name): Ditto.
13441 (collect_register): Ditto.
13442 (collect_register_as_string): Ditto.
13443 (collect_register_by_name): Ditto.
13444 * server.c (process_serial_event): Adjust.
13445 * linux-low.h (regset_fill_func, regset_store_func): Change
13446 prototype.
13447 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13448 Change prototype.
13449 * linux-low.c (get_stop_pc): Adjust.
13450 (check_removed_breakpoint): Adjust.
13451 (linux_wait_for_event): Adjust.
13452 (linux_resume_one_lwp): Adjust.
13453 (fetch_register): Add regcache parameter. Adjust.
13454 (usr_store_inferior_registers): Ditto.
13455 (regsets_fetch_inferior_registers): Ditto.
13456 (regsets_store_inferior_registers): Ditto.
13457 (linux_fetch_registers, linux_store_registers): Ditto.
13458 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13459 regcache. Adjust.
13460 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13461 Ditto.
13462 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13463 prototype to take a regcache.
13464 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13465 * remote-utils.c (convert_ascii_to_int, outreg)
13466 (prepare_resume_reply): Change prototype to take a regcache.
13467 Adjust.
13468 * target.h (struct target_ops) <fetch_registers, store_registers>:
13469 Change prototype to take a regcache.
13470 (fetch_inferior_registers, store_inferior_registers): Change
13471 prototype to take a regcache. Adjust.
13472 * proc-service.c (ps_lgetregs): Adjust.
13473 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13474 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13475 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13476 take a regcache. Adjust.
13477 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13478 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13479 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13480 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13481 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13482 (cris_cannot_fetch_register):
13483 (cris_breakpoint_at): Change prototype to take a regcache.
13484 Adjust.
13485 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13486 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13487 to take a regcache. Adjust.
13488 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13489 Adjust.
13490 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13491 take a regcache. Adjust.
13492 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13493 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13494 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13495 * linux-mips-low.c (mips_get_pc):
13496 (mips_set_pc): Change prototype to take a regcache. Adjust.
13497 (mips_reinsert_addr): Adjust.
13498 (mips_collect_register): Change prototype to take a regcache.
13499 Adjust.
13500 (mips_supply_register):
13501 (mips_collect_register_32bit, mips_supply_register_32bit)
13502 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13503 (mips_store_fpregset): Ditto.
13504 * linux-ppc-low.c (ppc_supply_ptrace_register)
13505 (ppc_supply_ptrace_register): Ditto.
13506 (parse_spufs_run): Adjust.
13507 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13508 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13509 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13510 take a regcache. Adjust.
13511 * linux-s390-low.c (s390_collect_ptrace_register)
13512 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13513 (s390_set_pc): Change prototype to take a regcache. Adjust.
13514 (s390_arch_setup): Adjust.
13515 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13516 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13517 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13518 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13519 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13520 regcache. Adjust.
13521 (sparc_breakpoint_at): Adjust.
13522 * linux-xtensa-low.c (xtensa_fill_gregset):
13523 (xtensa_store_gregset):
13524 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13525 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13526 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13527 prototype to take a regcache. Adjust.
13528 * win32-arm-low.c (arm_fetch_inferior_register)
13529 (arm_store_inferior_register): Change prototype to take a
13530 regcache. Adjust.
13531 * win32-i386-low.c (i386_fetch_inferior_register)
13532 (i386_store_inferior_register): Change prototype to take a
13533 regcache. Adjust.
13534 * win32-low.c (child_fetch_inferior_registers)
13535 (child_store_inferior_registers): Change prototype to take a
13536 regcache. Adjust.
13537 (win32_wait): Adjust.
13538 (win32_fetch_inferior_registers): Change prototype to take a
13539 regcache. Adjust.
13540 (win32_store_inferior_registers): Adjust.
13541 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13542 store_inferior_register>: Change prototype to take a regcache.
13543
13544 2010-01-20 Doug Evans <dje@google.com>
13545
13546 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13547 #ifdef.
13548 (linux_wait_for_event1, linux_init_signals): Ditto.
13549 (W_STOPCODE): Provide definition if missing.
13550
13551 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13552
13553 * linux-low.c (linux_core_of_thread): New.
13554 (compare_ints, show_process, list_threads): New.
13555 (linux_qxfer_osdata): Report threads and cores.
13556 (linux_target_op): Register linux_core_of_thread.
13557 * remote-utils.c (prepare_resume_reply): Report the core.
13558 (buffer_xml_printf): Support %d specifier.
13559 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13560 New.
13561 (handle_query): Handle qXfer:threads. Announce availability
13562 thereof.
13563 * target.h (struct target_ops): New field core_of_thread.
13564
13565 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13566
13567 * Makefile.in (clean): Remove new generated files.
13568 (reg-s390.o, reg-s390.c): Remove rules.
13569 (reg-s390x.o, reg-s390x.c): Likewise.
13570 (s390-linux32.o, s390-linux32.c): Add rules.
13571 (s390-linux64.o, s390-linux64.c): Likewise.
13572 (s390x-linux64.o, s390x-linux64.c): Likewise.
13573 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13574 * linux-s390-low.c: Include <elf.h>.
13575 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13576 (init_registers_s390): Remove prototype.
13577 (init_registers_s390x): Likewise.
13578 (init_registers_s390_linux32): Add prototype.
13579 (init_registers_s390_linux64): Likewise.
13580 (init_registers_s390x_linux64): Likewise.
13581 (s390_num_regs_3264): New define.
13582 (s390_regmap_3264): New global variable.
13583 (s390_cannot_fetch_register): Remove obsolete check.
13584 (s390_cannot_store_register): Likewise.
13585 (s390_collect_ptrace_register): Handle upper/lower register halves.
13586 (s390_supply_ptrace_register): Likewise.
13587 (s390_fill_gregset): Update to register number changes.
13588 (s390_get_hwcap): New routine.
13589 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13590 Install appropriate regmap and register set.
13591
13592 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13593
13594 * server.c (gdbserver_version): Update copyright year to 2010.
13595 * gdbreplay.c (gdbreplay_version): Likewise.
13596
13597 2009-12-28 Doug Evans <dje@google.com>
13598
13599 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13600 elf/external.h. Include <elf.h> instead but only if necessary.
13601
13602 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13603
13604 * linux-low.c (linux_remove_process): Remove `detaching'
13605 parameter. Don't release/detach from thread_db here.
13606 (linux_kill): Release/detach from thread_db here, ...
13607 (linux_detach): ... and here, before actually detaching.
13608 (linux_wait_1): ... and here, when a process exits.
13609 * thread-db.c (any_thread_of): New.
13610 (thread_db_free): Switch the current inferior to a thread of the
13611 passed in process.
13612
13613 2009-12-21 Doug Evans <dje@google.com>
13614
13615 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13616
13617 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13618 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13619 warning ifndef __NR_tkill. Move setting of errno there too.
13620 Delete unnecessary resetting of errno after syscall.
13621 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13622
13623 * configure.ac: Check for dladdr.
13624 * config.in: Regenerate.
13625 * configure: Regenerate.
13626 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13627 (try_thread_db_load): Update.
13628
13629 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13630
13631 2009-12-18 Doug Evans <dje@google.com>
13632
13633 * event-loop.c: Include unistd.h if it exists.
13634
13635 * linux-low.c (my_waitpid): Move definition away from being in
13636 between linux_tracefork_child/linux_test_for_tracefork.
13637
13638 * gdb_proc_service.h (psaddr_t): Fix type.
13639 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13640 signature to match glibc.
13641
13642 2009-12-16 Doug Evans <dje@google.com>
13643
13644 * linux-low.c (linux_read_memory): Fix argument to read.
13645
13646 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13647
13648 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13649 events, don't leave current_inferior pointing at null.
13650
13651 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13652
13653 * win32-low.c (LOG): Delete.
13654 (OUTMSG): Output to stderr.
13655 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13656 on compile time LOG macro.
13657 (win32_wait): Fix debug output.
13658
13659 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13660
13661 * win32-low.c (win32_add_one_solib): If the dll name is
13662 "ntdll.dll", prepend the system directory to the dll path.
13663
13664 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13665
13666 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13667
13668 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13669 Vladimir Prus <vladimir@codesourcery.com>
13670
13671 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13672 * configure.ac: Check for __mcoldfire__ and set
13673 gdb_cv_m68k_is_coldfire.
13674 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13675 reg-cf.o and reg-m68k.o.
13676 * configure: Regenerated.
13677
13678 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13679
13680 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13681 Pass it to thread_db_free.
13682 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13683 proper `detaching' argument to linux_remove_process.
13684 * linux-low.h (thread_db_free): Add `detaching' parameter.
13685 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13686 to thread_db_free.
13687 (thread_db_free): Add `detaching' parameter. Only
13688 call td_ta_clear_event if detaching from process.
13689
13690 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13691
13692 * thread-db.c (thread_db_free): Fix typo.
13693
13694 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13695
13696 PR gdb/10838
13697 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13698
13699 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13700
13701 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13702 with an i686 compiler.
13703 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13704 needed.
13705 * configure: Rebuilt.
13706
13707 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13708
13709 PR gdb/10783
13710
13711 * server.c (handle_search_memory_1): Correct read_addr initialization
13712 in loop for searching subsequent chunks.
13713
13714 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13715
13716 * configure.ac: New --with-libthread-db option.
13717 * thread-db.c: Allow direct dependence on libthread_db.
13718 (thread_db_free): Adjust.
13719 * config.in: Regenerate.
13720 * configure: Likewise.
13721
13722 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13723
13724 PR gdb/10757
13725 * thread-db.c (attach_thread): New function.
13726 (maybe_attach_thread): Return success/failure.
13727 (find_new_threads_callback): Adjust.
13728 (thread_db_find_new_threads): Loop until no new threads.
13729
13730 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13731
13732 * proc-service.c (ps_lgetregs): Formatting.
13733
13734 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13735
13736 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13737 * configure.ac: Adjust.
13738 * linux-low.h (struct process_info_private): Move members to struct
13739 thread_db.
13740 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13741 * linux-low.c (linux_remove_process): Adjust.
13742 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13743 * server.c (handle_query): Move code ...
13744 (handle_monitor_command): ... here. New function.
13745 * target.h (struct target_ops): New member.
13746 * thread-db.c (struct thread_db): New.
13747 (libthread_db_search_path): New variable.
13748 (thread_db_create_event, thread_db_enable_reporting)
13749 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13750 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13751 (try_thread_db_load_1, dladdr_to_soname): New functions.
13752 (try_thread_db_load, thread_db_load_search): New functions.
13753 (thread_db_init): Search for libthread_db.
13754 (thread_db_free): New function.
13755 (thread_db_handle_monitor_command): Likewise.
13756 * config.in: Regenerate.
13757 * configure: Regenerate.
13758
13759 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13760
13761 * spu-low.c (spu_kill): Wait for inferior to terminate.
13762 Call clear_inferiors.
13763 (spu_detach): Call clear_inferiors.
13764
13765 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13766
13767 * aclocal.m4: Regenerate.
13768 * config.in: Likewise.
13769 * configure: Likewise.
13770
13771 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13772
13773 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13774 (parse_spufs_run): New function.
13775 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13776 (ppc_breakpoint_at): Handle SPU breakpoints.
13777
13778 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13779
13780 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13781 (SPUFS_MAGIC): Define.
13782 (spu_enumerate_spu_ids): New function.
13783 (linux_qxfer_spu): New function.
13784 (linux_target_ops): Install linux_qxfer_spu.
13785
13786 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13787
13788 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13789 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13790 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13791 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13792 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13793 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13794 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13795 (init_registers_powerpc_cell32l): Add prototype.
13796 (init_registers_powerpc_cell64l): Likewise.
13797 (ppc_arch_setup): Detect Cell/B.E. architecture.
13798
13799 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13800
13801 * Makefile.in (datarootdir): New variable.
13802
13803 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13804
13805 * linux-low.c (linux_write_memory): Update debugging output.
13806 * Makefile.in (clean): Add new descriptions.
13807 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13808 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13809 * configure.srv: Add new files for arm*-*-linux*.
13810 * linux-arm-low.c: Add new declarations.
13811 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13812 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13813 (HWCAP_VFPv3D16): New.
13814 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13815 instead of __IWMMXT__.
13816 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13817 (arm_arch_setup): New.
13818 (target_regsets): Remove #ifdef. Add VFP regset.
13819 (the_low_target): Use arm_arch_setup.
13820
13821 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13822
13823 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13824 the main thread again.
13825
13826 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13827
13828 Adding Neutrino gdbserver.
13829 * configure: Regenerated.
13830 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13831 * configure.srv (i[34567]86-*-nto*): New target.
13832 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13833 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13834 (nto_comctrl) [__QNX__]: New function.
13835 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13836
13837 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13838
13839 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13840 srv_tgtobj.
13841
13842 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13843 Pedro Alves <pedro@codesourcery.com>
13844
13845 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13846 don't support CONTEXT_EXTENDED_REGISTERS.
13847 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13848 (the_low_target): Install them.
13849 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13850 failing with ERROR_PIPE_NOT_CONNECTED.
13851
13852 2009-06-30 Doug Evans <dje@google.com>
13853 Pierre Muller <muller@ics.u-strasbg.fr>
13854
13855 Add h/w watchpoint support to x86-linux, win32-i386.
13856 * Makefile.in (SFILES): Add i386-low.c
13857 (i386_low_h): Define.
13858 (i386-low.o): Add dependencies.
13859 (linux-x86-low.o): Add i386-low.h dependency.
13860 (win32-i386-low.o): Ditto.
13861 * i386-low.c: New file.
13862 * i386-low.h: New file.
13863 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13864 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13865 * linux-low.c (linux_add_process): Initialize arch_private.
13866 (linux_remove_process): Free arch_private.
13867 (add_lwp): Initialize arch_private.
13868 (delete_lwp): Free arch_private.
13869 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13870 provided.
13871 * linux-low.h (process_info_private): New member arch_private.
13872 (lwp_info): New member arch_private.
13873 (linux_target_ops): New members new_process, new_thread,
13874 prepare_to_resume.
13875 (ptid_of): New macro.
13876 * linux-x86-low.c: Include stddef.h, i386-low.h.
13877 (arch_process_info): New struct.
13878 (arch_lwp_info): New struct.
13879 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13880 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13881 (i386_dr_low_get_status): New function.
13882 (x86_insert_point, x86_remove_point): New functions.
13883 (x86_stopped_by_watchpoint): New function.
13884 (x86_stopped_data_address): New function.
13885 (x86_linux_new_process, x86_linux_new_thread): New functions.
13886 (x86_linux_prepare_to_resume): New function.
13887 (the_low_target): Add entries for insert_point, remove_point,
13888 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13889 prepare_to_resume.
13890 * server.c (debug_hw_points): New global.
13891 (monitor_show_help): Document set debug-hw-points.
13892 (handle_query): Process "set debug-hw-points".
13893 * server.h (debug_hw_points): Declare.
13894 (paddress): Declare.
13895 * utils.c (NUMCELLS, CELLSIZE): New macros.
13896 (get_sell, xsnprintf, paddress): New functions.
13897 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13898 remove_point, stopped_by_watchpoint, stopped_data_address.
13899 * win32-i386-low.c: Include i386-low.h.
13900 (debug_reg_state): Replaces dr.
13901 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13902 (i386_dr_low_get_status): New function.
13903 (i386_insert_point, i386_remove_point): New functions.
13904 (i386_stopped_by_watchpoint): New function.
13905 (i386_stopped_data_address): New function.
13906 (i386_initial_stuff): Update.
13907 (get_thread_context,set_thread_context,i386_thread_added): Update.
13908 (the_low_target): Add entries for insert_point,
13909 remove_point, stopped_by_watchpoint, stopped_data_address.
13910 * win32-low.c (win32_insert_watchpoint): New function.
13911 (win32_remove_watchpoint): New function.
13912 (win32_stopped_by_watchpoint): New function.
13913 (win32_stopped_data_address): New function.
13914 (win32_target_ops): Add entries for insert_watchpoint,
13915 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13916 * win32-low.h (win32_target_ops): New members insert_point,
13917 remove_point, stopped_by_watchpoint, stopped_data_address.
13918
13919 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13920
13921 * server.c (process_serial_event): Re-return unsupported, not
13922 error, if the type isn't recognized. Re-allow supporting only
13923 insert or remove packets. Also call require_running for
13924 breakpoints. Add missing break statement to default case. Tidy.
13925 * target.h (struct target_ops): Rename insert_watchpoint to
13926 insert_point, and remove_watchpoint to remove_point.
13927
13928 * linux-low.h (struct linux_target_ops): Likewise.
13929 * linux-low.c (linux_insert_watchpoint): Rename to ...
13930 (linux_insert_point): ... this. Adjust.
13931 (linux_remove_watchpoint): Rename to ...
13932 (linux_remove_point): ... this. Adjust.
13933 (linux_target_ops): Adjust.
13934 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13935 (cris_insert_point): ... this.
13936 (cris_remove_watchpoint): Rename to ...
13937 (cris_remove_point): ... this.
13938 (the_low_target): Adjust.
13939
13940 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13941
13942 * server.c (handle_v_kill): Pass signal_pid to
13943 kill_inferior if multi_process is zero.
13944
13945 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13946
13947 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13948 * target.h (target_ops): Comment for *_watchpoint to make it clear
13949 the functions can get types '0' and '1'.
13950
13951 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13952
13953 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13954 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13955 * regcache.c (get_regcache): Likewise.
13956 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13957 * win32-low.c (child_fetch_inferior_registers): Remove check for
13958 regno 0.
13959
13960 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13961 Pedro Alves <pedro@codesourcery.com>
13962
13963 * target.h (struct target_ops) <supports_multi_process>: New
13964 callback.
13965 (target_supports_multi_process): New.
13966 * server.c (handle_query): Even if GDB reports support, only
13967 enable multi-process if the target also supports it. Report
13968 multi-process support only if the target backend supports it.
13969 * linux-low.c (linux_supports_multi_process): New function.
13970 (linux_target_ops): Install it as target_supports_multi_process
13971 callback.
13972
13973 2009-05-24 Doug Evans <dje@google.com>
13974
13975 Global renaming of find_thread_pid to find_thread_ptid.
13976 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13977 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13978 All callers updated.
13979
13980 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13981 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13982 directly.
13983
13984 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13985 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13986 (linux_resume_one_lwp): Ditto.
13987
13988 2009-05-23 Doug Evans <dje@google.com>
13989
13990 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13991 from struct inferior_list_entry * to struct lwp_info *.
13992 All callers updated.
13993
13994 2009-05-13 Doug Evans <dje@google.com>
13995
13996 * linux-x86-low.c: Don't include assert.h.
13997 (x86_siginfo_fixup): Use fatal, not assert.
13998 (x86_arch_setup): Fix comment.
13999
14000 2009-05-12 Doug Evans <dje@google.com>
14001
14002 Biarch support for i386/amd64 gdbserver.
14003 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14004 Add linux-x86-low.c.
14005 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14006 (linux-x86-low.o): Add.
14007 * linux-x86-64-low.c: Delete.
14008 * linux-i386-low.c: Delete.
14009 * linux-x86-low.c: New file.
14010 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14011 linux-x86-low.o.
14012 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14013 linux-x86-low.o.
14014 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14015 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14016 (linux_child_pid_to_exec_file): New function.
14017 (elf_64_header_p, elf_64_file_p): New functions.
14018 (siginfo_fixup): New function.
14019 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14020 give target a chance to convert layout.
14021 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14022 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14023
14024 2009-05-07 Doug Evans <dje@google.com>
14025
14026 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14027 (regsets_store_inferior_registers): Ditto.
14028
14029 2009-05-06 Pedro Alves <pedro@codesourcery.com>
14030
14031 PR server/10048
14032
14033 * linux-low.c (must_set_ptrace_flags): Delete.
14034 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14035 of the global.
14036 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14037 `lwp->must_set_ptrace_flags' instead.
14038 (linux_wait_for_event_1): Set ptrace options here.
14039 (linux_wait_1): ... not here.
14040
14041 2009-04-30 Doug Evans <dje@google.com>
14042
14043 * inferiors.c (started_inferior_callback): New function.
14044 (attached_inferior_callback): New function.
14045 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14046 * server.c (print_started_pid, print_attached_pid): New functions.
14047 (detach_or_kill_for_exit): New function.
14048 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14049 * server.h (have_started_inferiors_p): Declare.
14050 (have_attached_inferiors_p): Declare.
14051
14052 * inferiors.c (remove_process): Fix memory leak, free process.
14053 * linux-low.c (linux_remove_process): New function.
14054 (linux_kill): Call it instead of remove_process.
14055 (linux_detach, linux_wait_1): Ditto.
14056
14057 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14058
14059 * configure.srv: Add x86 Windows CE target.
14060
14061 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14062
14063 * inferiors.c (get_thread_process): Make global.
14064 * server.h (get_thread_process): Add prototype.
14065 * thread-db.c (find_one_thread): Use get_thread_process
14066 instead of current_process.
14067 (thread_db_get_tls_address): Do not crash if called when
14068 thread layer is not yet initialized.
14069
14070 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14071
14072 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14073 * spu-low.c (current_tid): Rename to ...
14074 (current_ptid): ... this.
14075 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14076 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14077 ptid_get_lwp (current_ptid) instead of current_tid.
14078 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14079 instead of current_tid. Use find_process_pid to verify pid
14080 argument is valid. Pass proper argument to remove_process.
14081 (spu_thread_alive): Compare current_ptid instead of current_tid.
14082 (spu_resume): Likewise.
14083
14084 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14085
14086 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14087 variable.
14088
14089 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14090
14091 Implement the multiprocess extensions, and add linux multiprocess
14092 support.
14093
14094 * server.h (ULONGEST): Declare.
14095 (struct ptid, ptid_t): New.
14096 (minus_one_ptid, null_ptid): Declare.
14097 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14098 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14099 (struct inferior_list_entry): Change `id' type from unsigned from
14100 to ptid_t.
14101 (struct sym_cache, struct breakpoint, struct
14102 process_info_private): Forward declare.
14103 (struct process_info): Declare.
14104 (current_process): Declare.
14105 (all_processes): Declare.
14106 (initialize_inferiors): Declare.
14107 (add_thread): Adjust to use ptid_t.
14108 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14109 (add_process, remove_process, find_thread_pid): Declare.
14110 (find_inferior_id): Adjust to use ptid_t.
14111 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14112 (multi_process): Declare.
14113 (push_event): Adjust to use ptid_t.
14114 (read_ptid, write_ptid): Declare.
14115 (prepare_resume_reply): Adjust to use ptid_t.
14116 (clear_symbol_cache): Declare.
14117 * inferiors.c (all_processes): New.
14118 (null_ptid, minus_one_ptid): New.
14119 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14120 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14121 (add_thread): Change unsigned long to ptid. Remove gdb_id
14122 parameter. Adjust.
14123 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14124 (gdb_id_to_thread): Rename to ...
14125 (find_thread_pid): ... this. Change unsigned long to ptid.
14126 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14127 (loaded_dll, pull_pid_from_list): Adjust.
14128 (add_process, remove_process, find_process_pid)
14129 (get_thread_process, current_process, initialize_inferiors): New.
14130 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14131 (struct target_waitstatus) <related_pid>: Ditto.
14132 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14133 return type to int.
14134 (struct target_ops) <join>: Add `pid' argument.
14135 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14136 (struct target_ops) <wait>: Add `ptid' field. Change return type
14137 to ptid.
14138 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14139 (mywait): Add `ptid' argument. Change return type to ptid_t.
14140 (target_pid_to_str): Declare.
14141 * target.c (set_desired_inferior): Adjust to use ptids.
14142 (mywait): Add new `ptid' argument. Adjust.
14143 (target_pid_to_str): New.
14144 * mem-break.h (free_all_breakpoints): Declare.
14145 * mem-break.c (breakpoints): Delelete.
14146 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14147 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14148 to use per-process breakpoint list.
14149 (free_all_breakpoints): New.
14150 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14151 (symbol_cache, all_symbols_looked_up): Delete.
14152 (hexchars): New.
14153 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14154 read_ptid): New.
14155 (prepare_resume_reply): Change ptid argument's type from unsigned
14156 long to ptid_t. Adjust. Implement W;process and X;process.
14157 (free_sym_cache, clear_symbol_cache): New.
14158 (look_up_one_symbol): Adjust to per-process symbol cache. *
14159 * server.c (cont_thread, general_thread, step_thread): Change type
14160 to ptid_t.
14161 (attached): Delete.
14162 (multi_process): New.
14163 (last_ptid): Change type to ptid_t.
14164 (struct vstop_notif) <ptid>: Change type to ptid_t.
14165 (queue_stop_reply, push_event): Change `ptid' argument's type to
14166 ptid_t.
14167 (discard_queued_stop_replies): Add `pid' argument.
14168 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14169 changes. Don't reference the `attached' global.
14170 (attach_inferior): Adjust to mywait interface changes.
14171 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14172 features. Handle and report "multiprocess+". Handle
14173 "qAttached:PID".
14174 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14175 changes.
14176 (handle_v_kill): New.
14177 (handle_v_stopped): Adjust to use target_pid_to_str.
14178 (handle_v_requests): Allow multiple attaches and runs when
14179 multiprocess extensions are in effect. Handle "vKill".
14180 (myresume): Adjust to use ptids.
14181 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14182 (handle_status): Adjust to discard_queued_stop_replies interface
14183 change.
14184 (first_thread_of, kill_inferior_callback)
14185 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14186 (main): Call initialize_inferiors. Adjust to use ptids, killing
14187 and detaching from all inferiors. Handle multiprocess packet
14188 variants.
14189 * linux-low.h: Include gdb_proc_service.h.
14190 (struct process_info_private): New.
14191 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14192 <lwpid_of>: Use ptid_get_lwp.
14193 (get_lwp_thread): Adjust.
14194 (struct lwp_info): Add `dead' member.
14195 (find_lwp_pid): Declare.
14196 * linux-low.c (thread_db_active): Delete.
14197 (new_inferior): Adjust comment.
14198 (inferior_pid): Delete.
14199 (linux_add_process): New.
14200 (handle_extended_wait): Adjust.
14201 (add_lwp): Change unsigned long to ptid.
14202 (linux_create_inferior): Add process to processes table. Adjust
14203 to use ptids. Don't set new_inferior here.
14204 (linux_attach_lwp): Rename to ...
14205 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14206 it. Adjust to use ptids.
14207 (linux_attach_lwp): New.
14208 (linux_attach): Add process to processes table. Don't set
14209 new_inferior here.
14210 (struct counter): New.
14211 (second_thread_of_pid_p, last_thread_of_process_p): New.
14212 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14213 multiple processes.
14214 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14215 processes. Remove process from process table.
14216 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14217 to multiple processes.
14218 (any_thread_of): New.
14219 (linux_detach): Add `pid' argument, and handle it. Remove process
14220 from processes table.
14221 (linux_join): Add `pid' argument. Handle it.
14222 (linux_thread_alive): Change unsighed long argument to ptid_t.
14223 Consider dead lwps as not being alive.
14224 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14225 threads we're not interested in.
14226 (same_lwp, find_lwp_pid): New.
14227 (linux_wait_for_lwp): Change `pid' argument's type from int to
14228 ptid_t. Adjust.
14229 (linux_wait_for_event): Rename to ...
14230 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14231 from int to ptid_t. Adjust.
14232 (linux_wait_for_event): New.
14233 (linux_wait_1): Add `ptid' argument. Change return type to
14234 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14235 that exit from the process table.
14236 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14237 Adjust.
14238 (mark_lwp_dead): New.
14239 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14240 stopping all threads, mark its main lwp as dead.
14241 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14242 ptids.
14243 (fetch_register, usr_store_inferior_registers)
14244 (regsets_fetch_inferior_registers)
14245 (regsets_store_inferior_registers, linux_read_memory)
14246 (linux_write_memory): Inline `inferior_pid'.
14247 (linux_look_up_symbols): Adjust to use per-process
14248 `thread_db_active'.
14249 (linux_request_interrupt): Adjust to use ptids.
14250 (linux_read_auxv): Inline `inferior_pid'.
14251 (initialize_low): Don't reference thread_db_active.
14252 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14253 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14254 (ps_getpid): Return the pid of the current inferior.
14255 * thread-db.c (proc_handle, thread_agent): Delete.
14256 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14257 per-process data.
14258 (find_one_thread): Change argument type to ptid_t. Adjust to
14259 per-process data.
14260 (maybe_attach_thread): Adjust to per-process data and ptids.
14261 (thread_db_find_new_threads): Ditto.
14262 (thread_db_init): Ditto.
14263 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14264 processes table. Adjust to use ptids.
14265 (spu_kill, spu_detach): Adjust interface. Remove process from
14266 processes table.
14267 (spu_join, spu_thread_alive): Adjust interface.
14268 (spu_wait): Adjust interface. Remove process from processes
14269 table. Adjust to use ptids.
14270 * win32-low.c (current_inferior_tid): Delete.
14271 (current_inferior_ptid): New.
14272 (debug_event_ptid): New.
14273 (thread_rec): Take a ptid. Adjust.
14274 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14275 (child_delete_thread): Ditto.
14276 (do_initial_child_stuff): Add `attached' argument. Add process to
14277 processes table.
14278 (child_fetch_inferior_registers, child_store_inferior_registers):
14279 Adjust.
14280 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14281 (win32_attach): Pass 1 to do_initial_child_stuff.
14282 (win32_kill): Adjust interface. Remove process from processes
14283 table.
14284 (win32_detach): Ditto.
14285 (win32_join): Adjust interface.
14286 (win32_thread_alive): Take a ptid.
14287 (win32_resume): Adjust to use ptids.
14288 (get_child_debug_event): Ditto.
14289 (win32_wait): Adjust interface. Remove exiting process from
14290 processes table.
14291
14292 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14293
14294 Non-stop mode support.
14295
14296 * server.h (non_stop): Declare.
14297 (gdb_client_data, handler_func): Declare.
14298 (delete_file_handler, add_file_handler, start_event_loop):
14299 Declare.
14300 (handle_serial_event, handle_target_event, push_event)
14301 (putpkt_notif): Declare.
14302 * target.h (enum resume_kind): New.
14303 (struct thread_resume): Replace `step' field by `kind' field.
14304 (TARGET_WNOHANG): Define.
14305 (struct target_ops) <wait>: Add `options' argument.
14306 <supports_non_stop, async, start_non_stop>: New fields.
14307 (target_supports_non_stop, target_async): New.
14308 (start_non_stop): Declare.
14309 (mywait): Add `options' argument.
14310 * target.c (mywait): Add `options' argument. Print child exit
14311 notifications here.
14312 (start_non_stop): New.
14313 * server.c (non_stop, own_buf, mem_buf): New globals.
14314 (struct vstop_notif): New.
14315 (notif_queue): New global.
14316 (queue_stop_reply, push_event, discard_queued_stop_replies)
14317 (send_next_stop_reply): New.
14318 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14319 interface changes.
14320 (attach_inferior): In non-stop mode, don't wait for the target
14321 here.
14322 (handle_general_set): Handle QNonStop.
14323 (handle_query): When handling qC, return the current general
14324 thread, instead of the first thread of the list.
14325 (handle_query): If the backend supports non-stop mode, include
14326 QNonStop+ in the qSupported query response.
14327 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14328 and non-stop mode.
14329 (handle_v_attach, handle_v_run): Handle non-stop mode.
14330 (handle_v_stopped): New.
14331 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14332 (myresume): Adjust to use resume_kind. Handle non-stop.
14333 (queue_stop_reply_callback): New.
14334 (handle_status): Handle non-stop mode.
14335 (main): Clear non_stop flag on reconnection. Use the event-loop.
14336 Refactor serial protocol handling from here ...
14337 (process_serial_event): ... to this new function. When GDB
14338 selects any thread, select one here. In non-stop mode, wait until
14339 GDB acks all pending events before exiting.
14340 (handle_serial_event, handle_target_event): New.
14341 * remote-utils.c (remote_open): Install remote_desc in the event
14342 loop.
14343 (remote_close): Remove remote_desc from the event loop.
14344 (putpkt_binary): Rename to...
14345 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14346 (putpkt_binary): New as wrapper around putpkt_binary_1.
14347 (putpkt_notif): New.
14348 (prepare_resume_reply): In non-stop mode, don't change the
14349 general_thread.
14350 * event-loop.c: New.
14351 * Makefile.in (OBJ): Add event-loop.o.
14352 (event-loop.o): New rule.
14353
14354 * linux-low.h (pid_of): Moved here.
14355 (lwpid_of): New.
14356 (get_lwp_thread): Use lwpid_of.
14357 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14358 * linux-low.c (pid_of): Delete.
14359 (inferior_pid): Use lwpid_of.
14360 (linux_event_pipe): New.
14361 (target_is_async_p): New.
14362 (delete_lwp): New.
14363 (handle_extended_wait): Use lwpid_of.
14364 (add_lwp): Don't set lwpid field.
14365 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14366 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14367 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14368 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14369 first. Adjust to linux_wait_for_event interface changes. Use
14370 lwpid_of.
14371 (linux_detach): Don't delete the main lwp here.
14372 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14373 (status_pending_p): Don't consider explicitly suspended lwps.
14374 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14375 pointer. Add OPTIONS argument. Change return type to int. Use
14376 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14377 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14378 pointer. Add status pointer argument. Return a pid instead of a
14379 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14380 changes. In non-stop mode, don't switch to a random thread.
14381 (linux_wait): Rename to...
14382 (linux_wait_1): ... this. Add target_options argument, and handle
14383 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14384 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14385 clean exit and signal exit code. Don't stop all threads in
14386 non-stop mode. In all-stop mode, only stop all threads when
14387 reporting a stop to GDB. Handle explicit thread stop requests.
14388 (async_file_flush, async_file_mark): New.
14389 (linux_wait): New.
14390 (send_sigstop): Use lwpid_of.
14391 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14392 interface changes. In non-stop mode, don't switch to a random
14393 thread.
14394 (linux_resume_one_lwp): Use lwpid_of.
14395 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14396 (linux_resume_one_thread): ... this. Handle resume_stop. In
14397 non-stop mode, don't look for pending flag in all threads.
14398 (resume_status_pending_p): Don't consider explicitly suspended
14399 threads.
14400 (my_waitpid): Reimplement. Emulate __WALL.
14401 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14402 Use lwpid_of.
14403 (sigchld_handler, linux_supports_non_stop, linux_async)
14404 (linux_start_non_stop): New.
14405 (linux_target_ops): Register linux_supports_non_stop, linux_async
14406 and linux_start_non_stop.
14407 (initialize_low): Install SIGCHLD handler.
14408 * thread-db.c (thread_db_create_event, find_one_thread)
14409 (thread_db_get_tls_address): Use lwpid_of.
14410 * win32-low.c (win32_detach): Adjust to use resume_kind.
14411 (win32_wait): Add `options' argument.
14412 * spu-low.c (spu_resume): Adjust to use resume_kind.
14413 (spu_wait): Add `options' argument.
14414
14415 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14416
14417 Decouple target code from remote protocol.
14418
14419 * target.h (enum target_waitkind): New.
14420 (struct target_waitstatus): New.
14421 (struct target_ops) <wait>: Return an unsigned long. Take a
14422 target_waitstatus pointer instead of a char pointer.
14423 (mywait): Likewise.
14424 * target.c (mywait): Change prototype to return an unsigned long.
14425 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14426 * server.h (thread_from_wait, old_thread_from_wait): Delete
14427 declarations.
14428 (prepare_resume_reply): Change prototype to take a
14429 target_waitstatus.
14430 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14431 (last_status, last_ptid): New.
14432 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14433 pid instead of a signal.
14434 (attach_inferior): Remove "status" and "signal" parameters.
14435 Adjust.
14436 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14437 not as an address.
14438 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14439 (handle_v_requests, myresume): Remove "status" and "signal"
14440 parameters. Adjust.
14441 (handle_status): New.
14442 (main): Delete local `status'. Adjust.
14443 * remote-utils.c: Include target.h.
14444 (prepare_resume_reply): Change prototype to take a
14445 target_waitstatus. Adjust.
14446
14447 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14448 interface.
14449 * spu-low.c (spu_wait): Adjust.
14450 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14451 Delete.
14452 (win32_wait): Adjust.
14453
14454 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14455
14456 * target.h (struct thread_resume): Delete leave_stopped member.
14457 (struct target_ops): Add a `n' argument to the `resume' callback.
14458 * server.c (start_inferior): Adjust.
14459 (handle_v_cont, myresume): Adjust.
14460 * linux-low.c (check_removed_breakpoint): Adjust to resume
14461 interface change, and to removed leave_stopped field.
14462 (resume_ptr): Delete.
14463 (struct thread_resume_array): New.
14464 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14465 resume interface change.
14466 (linux_continue_one_thread, linux_queue_one_thread)
14467 (resume_status_pending_p): Check if the resume field is NULL
14468 instead of checking the leave_stopped member.
14469 (linux_resume): Adjust to the target resume interface change.
14470 * spu-low.c (spu_resume): Adjust to the target resume interface
14471 change.
14472 * win32-low.c (win32_detach, win32_resume): Ditto.
14473
14474 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14475
14476 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14477 flag.
14478 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14479 pending.
14480 (linux_continue_one_thread): Only preserve the stepping flag if
14481 there's a pending breakpoint.
14482
14483 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14484
14485 * server.c (main): After the inferior having exited, call
14486 remote_close before exiting gdbserver.
14487
14488 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14489
14490 Fix size of FPSCR in Power 7 processors.
14491 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14492 (PPC_FEATURE_HAS_DFP): New #define.
14493 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14494 size of the FPSCR.
14495
14496 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14497
14498 * server.c (handle_query) Whitespace and formatting.
14499
14500 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14501
14502 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14503 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14504 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14505 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14506 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14507 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14508 Makefile.in, configure.ac: Fix whitespace throughout.
14509 * configure: Regenerate.
14510
14511 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14512
14513 * inferiors.c (find_inferior): Make it safe for the callback
14514 function to delete the currently iterated inferior.
14515
14516 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14517
14518 * Makefile.in (linuw_low_h): Move higher.
14519 (thread-db.o): Depend on $(linux_low_h).
14520
14521 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14522
14523 Rename "process" to "lwp" throughout.
14524
14525 * linux-low.c (all_processes): Rename to...
14526 (all_lwps): ... this.
14527 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14528 (add_process): Rename to ...
14529 (add_lwp): ... this. Adjust.
14530 (linux_create_inferior): Adjust.
14531 (linux_attach_lwp): Adjust.
14532 (linux_attach): Adjust.
14533 (linux_kill_one_process): Rename to ...
14534 (linux_kill_one_lwp): ... this. Adjust.
14535 (linux_kill): Adjust.
14536 (linux_detach_one_process): Rename to ...
14537 (linux_detach_one_lwp): ... this. Adjust.
14538 (linux_detach): Adjust.
14539 (check_removed_breakpoint): Adjust.
14540 (status_pending_p): Adjust.
14541 (linux_wait_for_process): Rename to ...
14542 (linux_wait_for_lwp): ... this. Adjust.
14543 (linux_wait_for_event): Adjust.
14544 (send_sigstop): Adjust.
14545 (wait_for_sigstop): Adjust.
14546 (stop_all_processes): Rename to ...
14547 (stop_all_lwps): ... this.
14548 (linux_resume_one_process): Rename to ...
14549 (linux_resume_one_lwp): ... this. Adjust.
14550 (linux_set_resume_request, linux_continue_one_thread)
14551 (linux_queue_one_thread, resume_status_pending_p)
14552 (usr_store_inferior_registers, regsets_store_inferior_registers)
14553 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14554 Adjust.
14555 * linux-low.h (get_process): Rename to ...
14556 (get_lwp): ... this. Adjust.
14557 (get_thread_process): Rename to ...
14558 (get_thread_lwp): ... this. Adjust.
14559 (get_process_thread): Rename to ...
14560 (get_lwp_thread): ... this. Adjust.
14561 (struct process_info): Rename to ...
14562 (struct lwp_info): ... this.
14563 (all_processes): Rename to ...
14564 (all_lwps): ... this.
14565 * proc-service.c (ps_lgetregs): Adjust.
14566 * thread-db.c (thread_db_create_event, find_one_thread)
14567 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14568
14569 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14570
14571 * server.c (handle_query): Handle "qAttached".
14572
14573 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14574
14575 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14576 GPLv3, update license URL.
14577
14578 2009-03-01 Doug Evans <dje@google.com>
14579
14580 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14581 (server_h): Add gdb_signals.h.
14582 (signals.o): Update.
14583 * server.h (target_signal_from_host,target_signal_to_host_p)
14584 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14585
14586 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14587
14588 * remote-utils.c (getpkt): Also generate remote-debug
14589 information if noack_mode is set.
14590
14591 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14592
14593 * server.c (handle_query): Report qXfer:siginfo:read and
14594 qXfer:siginfo:write as supported and handle them.
14595 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14596 * linux-low.c (linux_xfer_siginfo): New.
14597 (linux_target_ops): Set it.
14598
14599 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14600
14601 * server.c (gdbserver_usage): Mention --remote-debug.
14602 (main): Accept '--remote-debug' switch.
14603
14604 2009-01-18 Doug Evans <dje@google.com>
14605
14606 * regcache.c (new_register_cache): No need to check result of xcalloc.
14607 * server.c (handle_search_memory): Back out calls to xmalloc,
14608 result is checked and error is returned to user upon failure.
14609 (handle_query): Ditto. Add more checks for result of malloc.
14610 (handle_v_cont): Check result of malloc, report error back to
14611 user upon failure.
14612 (handle_v_run): Ditto. Call freeargv.
14613 * server.h (freeargv): Declare.
14614 * utils.c (freeargv): New fn.
14615
14616 2009-01-15 Doug Evans <dje@google.com>
14617
14618 * gdbreplay.c (perror_with_name): Make arg const char *.
14619 * server.h (target_signal_to_name): Make return type const char *.
14620 * thread-db.c (thread_db_err_str): Make return type const char *.
14621 * utils.c (perror_with_name): Make arg const char *.
14622
14623 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14624
14625 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14626 when handling a EXIT_PROCESS_DEBUG_EVENT.
14627
14628 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14629
14630 * gdbreplay.c (gdbreplay_version): Update copyright year.
14631 * server.c (gdbserver_version): Likewise.
14632
14633 2009-01-05 Doug Evans <dje@google.com>
14634
14635 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14636 (handle_extended_wait): Improve comment.
14637
14638 2008-12-13 Doug Evans <dje@google.com>
14639
14640 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14641 * server.h (ATTR_MALLOC): New macro.
14642 (xmalloc,xcalloc,xstrdup): Declare.
14643 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14644 * inferiors.c: Ditto.
14645 * linux-low.c: Ditto.
14646 * mem-break.c: Ditto.
14647 * regcache.c: Ditto.
14648 * remote-utils.c: Ditto.
14649 * server.c: Ditto.
14650 * target.c: Ditto.
14651 * win32-low.c: Ditto.
14652
14653 2008-12-12 Doug Evans <dje@google.com>
14654
14655 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14656 in debugging printf.
14657
14658 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14659
14660 2008-12-09 Doug Evans <dje@google.com>
14661
14662 * linux-low.h (struct process_info): Delete member tid, unused.
14663 * thread-db.c (find_one_thread): Update.
14664 (maybe_attach_thread): Update.
14665
14666 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14667
14668 * target.h (struct target_ops): Add qxfer_osdata member.
14669 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14670 and dirent.h.
14671 (linux_qxfer_osdata): New functions.
14672 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14673 callback.
14674 * server.c (handle_query): Handle "qXfer:osdata:read:".
14675 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14676 (buffer_xml_printf): New functions.
14677 * server.h (struct buffer): New.
14678 (buffer_grow_str, buffer_grow_str0): New macros.
14679 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14680 (buffer_xml_printf): Declare.
14681
14682 2008-11-24 Doug Evans <dje@google.com>
14683
14684 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14685
14686 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14687
14688 * server.c (handle_v_run): Always use the supplied argument list.
14689
14690 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14691
14692 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14693 (xtensa_regmap_table): Add entry for scompare1.
14694
14695 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14696
14697 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14698 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14699 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14700 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14701 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14702 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14703 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14704 XML target descriptions.
14705 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14706 when inferior is running on an ISA 2.05 or later processor. Add
14707 special case to return offset for full 64-bit slot of FPSCR when
14708 in 32-bits.
14709
14710 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14711
14712 * Makefile.in (SFILES, clean): Added sparc64 files.
14713 (reg-sparc64.o, reg-sparc64.c): New.
14714 * configure.srv (sparc*-*-linux*): New configuration.
14715 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14716 syscall arguments for SPARC.
14717 (regsets_store_inferior_registers): Likewise.
14718 * linux-sparc-low.c: New file.
14719
14720 2008-10-21 Doug Evans <dje@google.com>
14721
14722 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14723 (READLINE_DIR,READLINE_DEP): Delete.
14724 (INTERNAL_CFLAGS): Update.
14725 (LINTFLAGS): Update.
14726
14727 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14728
14729 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14730 whole argv from the last run, not just argv[0].
14731
14732 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14733
14734 * regcache.c (new_register_cache): Return NULL if the register
14735 cache size isn't known yet.
14736 (free_register_cache): Avoid dereferencing a NULL regcache.
14737
14738 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14739
14740 * configure.srv: Merge MIPS and MIPS64.
14741
14742 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14743
14744 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14745
14746 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14747
14748 * Makefile.in: Add required vsx dependencies.
14749
14750 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14751 Declare init_registers_powerpc_vsx32l.
14752 Declare init_registers_powerpc_vsx64l.
14753 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14754 (ppc_arch_setup): Check for VSX in hwcap.
14755 (ppc_fill_vsxregset): New function.
14756 (ppc_store_vsxregset): New function.
14757 Add new VSX entry in regset_info target_regsets.
14758
14759 * configure.srv: Add new VSX dependencies.
14760
14761 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14762
14763 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14764 (remote_open): Set or clear transport_is_reliable.
14765 (putpkt_binary): Don't expect acks in noack mode.
14766 (getpkt): Don't send ack/nac in noack mode.
14767 * server.c (handle_general_set): Handle QStartNoAckMode.
14768 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14769 qSupported.
14770 (main): Reset noack_mode on every connection.
14771 * server.h (noack_mode): Declare.
14772
14773 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14774
14775 * Makefile.in (GDBREPLAY_OBS): New variable.
14776 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14777
14778 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14779 Daniel Jacobowitz <dan@codesourcery.com>
14780
14781 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14782 (usr_store_inferior_registers): Likewise.
14783 (regsets_store_inferior_registers): Likewise.
14784
14785 2008-07-31 Rolf Jansen <rj@surtec.com>
14786 Pedro Alves <pedro@codesourcery.com>
14787
14788 * configure.ac: Check for memmem declaration.
14789 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14790 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14791 (disable_packet_qfThreadInfo): Unconditionally compile.
14792 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14793 * configure, config.in: Regenerate.
14794
14795 2008-07-28 Doug Kwan <dougkwan@google.com>
14796
14797 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14798 (linux_write_memory): Remove declaration of errno.
14799
14800 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14801
14802 * linux-low.c (handle_extended_wait): Do not use "status"
14803 variable uninitialized.
14804
14805 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14806
14807 * server.c (handle_v_attach): Inhibit reporting dll changes.
14808
14809 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14810
14811 * remote-utils.c (prepare_resume_reply): If requested, don't
14812 output "thread:TID" in the T stop reply.
14813
14814 * server.c (disable_packet_vCont, disable_packet_Tthread)
14815 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14816 (handle_query): If requested, disable support for qC, qfThreadInfo
14817 and qsThreadInfo.
14818 (handle_v_requests): If requested, disable support for vCont.
14819 (gdbserver_show_disableable): New.
14820 (main): Handle --disable-packet and --disable-packet=LIST.
14821
14822 * server.h (disable_packet_vCont, disable_packet_Tthread)
14823 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14824
14825 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14826
14827 * server.c (gdbserver_usage): Mention --version.
14828
14829 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14830
14831 * Makefile.in (gdbreplay.o): New rule.
14832
14833 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14834
14835 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14836 message, not gdbserver.
14837
14838 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14839 Nathan Sidwell <nathan@codesourcery.com>
14840 Joseph Myers <joseph@codesourcery.com>
14841
14842 * acinclude.m4: Include ../../config/acx.m4.
14843 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14844 * configure, config.in: Regenerate.
14845 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14846 * server.c (gdbserver_version): Print PKGVERSION.
14847 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14848 (main): Adjust gdbserver_usage calls.
14849 * gdbreplay.c (version, host_name): Add declarations.
14850 (gdbreplay_version, gdbreplay_usage): New.
14851 (main): Accept --version and --help options.
14852
14853 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14854
14855 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14856 (arm_breakpoint_at): Handle Thumb.
14857 (the_low_target): Add comment.
14858
14859 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14860
14861 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14862
14863 2008-05-09 Doug Evans <dje@google.com>
14864
14865 * server.h (decode_search_memory_packet): Declare.
14866 * remote-utils.c (decode_search_memory_packet): New fn.
14867 * server.c (handle_search_memory_1): New fn.
14868 (handle_search_memory): New fn.
14869 (handle_query): Process qSearch:memory packets.
14870
14871 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14872
14873 * regcache.c (registers_length): Remove.
14874 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14875 full register packet.
14876 * regcache.h (registers_length): Remove prototype.
14877 * server.h (PBUFSIZ): Define to 16384.
14878
14879 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14880
14881 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14882 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14883 powerpc-64l.o, and powerpc-altivec64l.o.
14884 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14885 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14886 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14887 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14888 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14889 to srv_xmlfiles.
14890
14891 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14892 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14893 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14894 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14895 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14896 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14897 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14898 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14899 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14900 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14901 (clean): Update.
14902
14903 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14904 (init_registers_powerpc_32l): ... this new prototype.
14905 (init_registers_powerpc_32): Remove, replace by ...
14906 (init_registers_powerpc_altivec32l): ... this new prototype.
14907 (init_registers_powerpc_e500): Remove, replace by ...
14908 (init_registers_powerpc_e500l): ... this new prototype.
14909 (init_registers_ppc64): Remove, replace by ...
14910 (init_registers_powerpc_64l): ... this new prototype.
14911 (init_registers_powerpc_64): Remove, replace by ...
14912 (init_registers_powerpc_altivec64l): ... this new prototype.
14913 (ppc_num_regs): Set to 73.
14914 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14915 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14916 (ppc_cannot_store_register): Handle orig_r3 and trap.
14917 (ppc_arch_setup): Update init_registers_... calls.
14918 (ppc_fill_gregset): Handle orig_r3 and trap.
14919
14920 * inferiors.c (clear_inferiors): Reset current_inferior.
14921
14922 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14923
14924 * acinclude.m4: Add override.m4.
14925 * configure: Regenerate.
14926
14927 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14928
14929 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14930 initial call to init_register_ppc64.
14931
14932 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14933
14934 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14935 single powerpc*-*-linux* case.
14936 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14937
14938 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14939
14940 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14941 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14942 from reg_xmlfiles.
14943 * linux-ppc-low.c: Include <elf.h>.
14944 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14945 (ppc_hwcap): New global variable.
14946 (ppc_regmap): Remove __SPE__ #ifdef sections.
14947 (ppc_regmap_e500): New global variable.
14948 (ppc_cannot_store_register): Update __SPE__ special case.
14949 (ppc_get_hwcap): New function.
14950 (ppc_arch_setup): Use it to determine whether inferior supports
14951 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14952 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14953 Do not access registers if target does not support AltiVec.
14954 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14955 Do not access registers if target does not support SPE.
14956 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14957
14958 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14959
14960 * linux-low.c (disabled_regsets, num_regsets): New.
14961 (use_regsets_p): Delete.
14962 (linux_wait_for_process): Clear disabled_regsets.
14963 (regsets_fetch_inferior_registers): Check and set it.
14964 (regsets_store_inferior_registers): Likewise.
14965 (linux_fetch_registers, linux_store_registers): Do not use
14966 use_regsets_p.
14967 (initialize_low): Allocate disabled_regsets.
14968
14969 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14970
14971 * Makefile.in (LIBOBJS): New.
14972 (OBS): Use LIBOBJS.
14973 (memmem.o): New rule.
14974 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14975 * configure: Regenerated.
14976
14977 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14978
14979 * server.c (handle_query): Never return "unsupported" for
14980 qXfer:features:read queries.
14981
14982 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14983
14984 * server.c (get_features_xml): Fix inverted condition.
14985 (handle_query): Always support qXfer:feature:read.
14986
14987 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14988
14989 * server.c (wrapper_argv): New.
14990 (start_inferior): Handle wrapper_argv. If set, expect an extra
14991 trap.
14992 (gdbserver_usage): Document --wrapper.
14993 (main): Parse --wrapper.
14994
14995 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14996
14997 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14998 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14999 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15000 (ppc_set_pc): Likewise.
15001 (ppc_arch_setup): New function.
15002 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15003 of collect_register.
15004 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15005
15006 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15007
15008 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15009 instead of linux-ppc64-low.o.
15010 * linux-ppc64-low.c: Remove file.
15011 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15012 (linux-ppc64-low.o): Remove rule.
15013
15014 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15015 (init_registers_powerpc_64): Likewise.
15016 (ppc_regmap): Conditionally define depending on __powerpc64__.
15017 (ppc_cannot_store_register): Do not special-case "fpscr" when
15018 compiled on __powerpc64__.
15019 (ppc_collect_ptrace_register): New function.
15020 (ppc_supply_ptrace_register): New function.
15021 (ppc_breakpoint): Change type to "unsigned int".
15022 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15023 (the_low_target): Conditionally provide initializers for the
15024 arch_setup member depending on __powerpc64__. Install
15025 collect_ptrace_register and supply_ptrace_register members.
15026
15027 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15028
15029 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15030 * server.c (gdbserver_xmltarget): Define.
15031 (get_features_xml): Use it to replace "target.xml" and arch_string.
15032
15033 * configure.srv: Remove srv_xmltarget. Add XML files that were
15034 mentioned there to srv_xmlfiles instead. Remove conditional tests
15035 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15036 srv_xmlfiles and srv_regobj to include all possible choices.
15037 * configure.ac (srv_xmltarget): Remove.
15038 (srv_xmlfiles): Do not add "target.xml".
15039 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15040 checks for supplementary target information.
15041 * configure: Regenerate.
15042 * Makefile.in (XML_TARGET): Remove.
15043 (target.xml): Remove rule.
15044 (clean): Do not clean up target.xml.
15045 (.PRECIOUS): Do not mention target.xml.
15046
15047 * target.h (struct target_ops): Remove arch_string member.
15048 * linux-low.c (linux_arch_string): Remove.
15049 (linux_target_ops): Remove arch_string initializer.
15050 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15051 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15052 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15053 * spu-low.c (spu_arch_string): Remove.
15054 (spu_target_ops): Remove arch_string initializer.
15055 * win32-low.c (win32_arch_string): Remove.
15056 (win32_target_ops): Remove arch_string initializer.
15057 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15058 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15059 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15060
15061 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15062
15063 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15064 by collect_ptrace_register and supply_ptrace_register hooks.
15065 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15066 instead of checking for the_low_target.left_pad_xfer.
15067 (usr_store_inferior_registers): Use collect_ptrace_register callback
15068 instead of checking for the_low_target.left_pad_xfer.
15069
15070 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15071 (s390_supply_ptrace_register): Likewise.
15072 (s390_fill_gregset): Call s390_collect_ptrace_register.
15073 (the_low_target): Update.
15074
15075 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15076 (ppc_supply_ptrace_register): Likewise.
15077 (the_low_target): Update.
15078
15079 * linux-i386-low.c (the_low_target): Update.
15080 * linux-x86-64-low.c (the_low_target): Update.
15081
15082 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15083
15084 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15085 reg-s390.o and reg-s390x.o.
15086
15087 * linux-low.c (new_inferior): New global variable.
15088 (linux_create_inferior, linux_attach): Set it.
15089 (linux_wait_for_process): Call the_low_target.arch_setup after the
15090 target has stopped for the first time.
15091 (initialize_low): Do not call the_low_target.arch_setup.
15092
15093 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15094 (s390_set_pc): Likewise.
15095 (s390_arch_setup): New function.
15096 (the_low_target): Use s390_arch_setup as arch_setup routine.
15097
15098 * regcache.c (realloc_register_cache): New function.
15099 (set_register_cache): Call it for each existing regcache.
15100
15101 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15102
15103 * server.h (init_registers): Remove prototype.
15104
15105 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15106 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15107 instead of init_registers ().
15108 * linux-arm-low.c (init_registers_arm): Add prototype.
15109 (init_registers_arm_with_iwmmxt): Likewise.
15110 (the_low_target): Add initializer for arch_setup field.
15111 * linux-cris-low.c (init_registers_cris): Add prototype.
15112 (the_low_target): Add initializer for arch_setup field.
15113 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15114 (the_low_target): Add initializer for arch_setup field.
15115 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15116 (the_low_target): Add initializer for arch_setup field.
15117 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15118 (the_low_target): Add initializer for arch_setup field.
15119 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15120 (the_low_target): Add initializer for arch_setup field.
15121 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15122 (the_low_target): Add initializer for arch_setup field.
15123 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15124 (init_registers_mips64_linux): Likewise.
15125 (the_low_target): Add initializer for arch_setup field.
15126 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15127 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15128 (the_low_target): Add initializer for arch_setup field.
15129 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15130 (init_registers_powerpc_64): Likewise.
15131 (the_low_target): Add initializer for arch_setup field.
15132 * linux-s390-low.c (init_registers_s390): Add prototype.
15133 (init_registers_s390x): Likewise.
15134 (the_low_target): Add initializer for arch_setup field.
15135 * linux-sh-low.c (init_registers_sh): Add prototype.
15136 (the_low_target): Add initializer for arch_setup field.
15137 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15138 (the_low_target): Add initializer for arch_setup field.
15139 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15140 (the_low_target): Add initializer for arch_setup field.
15141
15142 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15143 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15144 instead of init_registers ().
15145 * win32-arm-low.c (init_registers_arm): Add prototype.
15146 (the_low_target): Add initializer for arch_setup field.
15147 * win32-i386-low.c (init_registers_i386): Add prototype.
15148 (the_low_target): Add initializer for arch_setup field.
15149
15150 * spu-low.c (init_registers_spu): Add prototype.
15151 (initialize_low): Call initialie_registers_spu () instead of
15152 initialize_registers ().
15153
15154 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15155
15156 * server.c (handle_v_requests): When handling the vRun and vAttach
15157 packets, if already debugging a process, don't kill it. Return an
15158 error instead.
15159
15160 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15161
15162 * server.c (handle_query): Correct length check.
15163
15164 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15165
15166 * win32-low.c (do_initial_child_stuff): Add process handle
15167 parameter. Set current_process_handle and current_process_id from the
15168 parameters. Clear globals.
15169 (win32_create_inferior): Don't set current_process_handle and
15170 current_process_id here. Instead pass them on the call to
15171 do_initial_child_stuff.
15172 (win32_attach): Likewise.
15173 (win32_clear_inferiors): New.
15174 (win32_kill): Don't close the current process handle or the
15175 current thread handle here. Instead call win32_clear_inferiors.
15176 (win32_detach): Don't open a new handle to the process. Call
15177 win32_clear_inferiors.
15178 (win32_join): Don't rely on current_process_handle; open a new
15179 handle using the process id.
15180 (win32_wait): Call win32_clear_inferiors when the inferior process
15181 has exited.
15182
15183 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15184
15185 * server.c (monitor_show_help): Add "exit".
15186
15187 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15188
15189 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15190 (clean): Add reg-xtensa.c.
15191 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15192 * configure.srv (xtensa*-*-linux*) New target.
15193 * linux-xtensa-low.c: New.
15194 * xtensa-xtregs.c: New.
15195
15196 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15197
15198 * hostio.c: Don't include errno.h.
15199 (errno_to_fileio_errno): Move to hostio-errno.
15200 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15201 error number outputting to the target->hostio_last_error callback.
15202 (hostio_packet_error): Use FILEIO_EINVAL directly.
15203 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15204 calls to hostio_error.
15205 * hostio-errno.c: New.
15206 * server.h (hostio_last_error_from_errno): Declare.
15207 * target.h (target_ops): Add hostio_last_error member.
15208 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15209 as hostio_last_error handler.
15210 * spu-low.c (spu_target_ops): Likewise.
15211 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15212 (wince_hostio_last_error): New functions.
15213 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15214 as hostio_last_error handler.
15215 (win32_target_ops) [!_WIN32_WCE]: Register
15216 hostio_last_error_from_errno as hostio_last_error handler.
15217 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15218 (hostio-errno.o): New rule.
15219 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15220 * configure.srv (srv_hostio_err_objs): New variable. Default to
15221 hostio-errno.o.
15222 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15223 * configure: Regenerate.
15224
15225 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15226
15227 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15228 (linux_kill, linux_detach): Clean up the process list.
15229 * remote-utils.c (remote_open): Improve port number parsing.
15230 (putpkt_binary, input_interrupt): Only send interrupts if the target
15231 is running.
15232 * server.c (extended_protocol): Make static.
15233 (attached): Define earlier.
15234 (exit_requested, response_needed, program_argv): New variables.
15235 (target_running): New.
15236 (start_inferior): Clear attached here.
15237 (attach_inferior): Set attached here.
15238 (require_running): Define.
15239 (handle_query): Use require_running and target_running. Implement
15240 "monitor exit".
15241 (handle_v_attach, handle_v_run): New.
15242 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15243 (gdbserver_usage): Update.
15244 (main): Redo argument parsing. Handle --debug and --multi. Handle
15245 --attach along with other options or after the port. Save
15246 program_argv. Support no initial program. Resynchronize
15247 communication with GDB after an error. Handle "monitor exit".
15248 Use require_running and target_running. Always allow the extended
15249 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15250 restart in extended mode.
15251 * README: Refer to the GDB manual. Update --attach usage.
15252
15253 2007-12-20 Andreas Schwab <schwab@suse.de>
15254
15255 * linux-low.c (STACK_SIZE): Define.
15256 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15257 (linux_test_for_tracefork): Likewise.
15258
15259 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15260
15261 * linux-low.c (linux_wait_for_event): Update messages. Do not
15262 reinsert auto-delete breakpoints.
15263 * mem-break.c (struct breakpoint): Change return type of handler to
15264 int.
15265 (set_breakpoint_at): Update handler type.
15266 (reinsert_breakpoint_handler): Return 1 instead of calling
15267 delete_breakpoint.
15268 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15269 setting a new one.
15270 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15271 * mem-break.h (set_breakpoint_at): Update handler type.
15272 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15273 * win32-low.c (auto_delete_breakpoint): New.
15274 (get_child_debug_event): Use it.
15275
15276 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15277
15278 * configure.ac: Check for pread and pwrite.
15279 * hostio.c (handle_pread): Fall back to lseek and read.
15280 (handle_pwrite): Fall back to lseek and write.
15281 * config.in, configure: Regenerated.
15282
15283 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15284
15285 * server.c (myresume): Add own_buf argument.
15286 (main): Update calls.
15287
15288 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15289
15290 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15291 * remote-utils.c (remote_open): Do not call disable_async_io.
15292 (block_async_io): Delete.
15293 (unblock_async_io): Make static.
15294 (initialize_async_io): New.
15295 * server.c (handle_v_cont): Handle async I/O here.
15296 (myresume): Likewise. Move other common resume tasks here...
15297 (main): ... from here. Call initialize_async_io. Disable async
15298 I/O before the main loop.
15299 * server.h (initialize_async_io): Declare.
15300 (block_async_io, unblock_async_io): Delete prototypes.
15301 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15302
15303 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15304
15305 * remote-utils.c (readchar): Allow binary data in received messages.
15306
15307 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15308
15309 * win32-low.c (attaching): New global.
15310 (win32_create_inferior): Clear the `attaching' global.
15311 (win32_attach): Set the `attaching' global.
15312 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15313 attaching. Only set a breakpoint at the entry point if not
15314 attaching.
15315
15316 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15317
15318 * server.c (main): Don't report dll events on the initial
15319 connection on attaches.
15320
15321 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15322
15323 * server.c (main): Relax numerical bases supported for the pid of
15324 the --attach command line argument.
15325
15326 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15327
15328 * win32-low.c (win32_attach): Call OpenProcess before
15329 DebugActiveProcess, not after. Add last error output to error
15330 call.
15331
15332 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15333
15334 * win32-low.c (win32_get_thread_context)
15335 (win32_set_thread_context): New functions.
15336 (thread_rec): Use win32_get_thread_context.
15337 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15338 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15339 field.
15340
15341 2007-12-03 Leo Zayas
15342 Pedro Alves <pedro_alves@portugalmail.pt>
15343
15344 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15345 global variables.
15346 (child_add_thread): Minor cleanup.
15347 (child_continue): Resume artificially suspended threads before
15348 calling ContinueDebugEvent.
15349 (suspend_one_thread): New.
15350 (fake_breakpoint_event): New.
15351 (get_child_debug_event): Change return type to int. Check here if
15352 gdb sent an interrupt request. If a soft interrupt was requested,
15353 fake a breakpoint event. Return 0 if there is no event to handle,
15354 and 1 otherwise.
15355 (win32_wait): Don't check here if gdb sent an interrupt request.
15356 Ensure there is a valid event to handle.
15357 (win32_request_interrupt): Add soft interruption method as last
15358 resort.
15359
15360 2007-12-03 Leo Zayas
15361 Pedro Alves <pedro_alves@portugalmail.pt>
15362
15363 * win32-low.h (win32_thread_info): Add descriptions to the
15364 structure members. Replace `suspend_count' counter by a
15365 `suspended' flag.
15366 * win32-low.c (thread_rec): Update condition of when to get the
15367 context from the inferior. Rely on ContextFlags being set if it
15368 has already been retrieved. Only suspend the inferior thread if
15369 we haven't already. Warn if that fails.
15370 (continue_one_thread): s/suspend_count/suspended/. Only call
15371 ResumeThread once. Warn if that fails.
15372
15373 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15374
15375 * win32-low.c (win32_wait): Don't read from the inferior when it
15376 has already exited.
15377
15378 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15379
15380 * Makefile.in (win32_low_h): New variable.
15381 (win32-low.o): Add dependency on $(win32_low_h).
15382 (win32-arm-low.o, win32-i386-low.o): New rules.
15383
15384 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15385
15386 * hostio.c: Correct copyright year.
15387
15388 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15389
15390 * Makefile.in (OBS): Add hostio.o.
15391 (hostio.o): New rule.
15392 * server.h (handle_vFile): Declare.
15393 * hostio.c: New file.
15394 * server.c (handle_v_requests): Take packet_len and new_packet_len
15395 for binary packets. Call handle_vFile.
15396 (main): Update call to handle_v_requests.
15397
15398 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15399
15400 * linux-low.c: Include <sched.h>.
15401
15402 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15403
15404 * linux-low.c (linux_tracefork_grandchild): New.
15405 (linux_tracefork_child): Use clone.
15406 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15407
15408 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15409
15410 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15411
15412 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15413
15414 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15415
15416 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15417
15418 * inferiors.c (change_inferior_id): Delete.
15419 (add_pid_to_list, pull_pid_from_list): New.
15420 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15421 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15422 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15423 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15424 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15425 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15426 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15427 (using_threads): Always set to 1.
15428 (handle_extended_wait): New.
15429 (add_process): Do not set TID.
15430 (linux_create_inferior): Set must_set_ptrace_flags.
15431 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15432 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15433 (linux_thread_alive): Rename TID argument to LWPID.
15434 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15435 (linux_wait_for_event): Do not use TID or check using_threads. Update
15436 call to dead_thread_notify. Call handle_extended_wait.
15437 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15438 (send_sigstop): Delete sigstop_sent.
15439 (wait_for_sigstop): Avoid TID.
15440 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15441 (linux_test_for_tracefork): New.
15442 (linux_lookup_signals): Use thread_db_active and
15443 linux_supports_tracefork_flag.
15444 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15445 * linux-low.h (get_process_thread): Avoid TID.
15446 (struct process_ifo): Move thread_known and tid to the end. Remove
15447 sigstop_sent.
15448 (linux_attach_lwp, thread_db_init): Update prototypes.
15449 * server.h (change_inferior_id): Delete prototype.
15450 (add_pid_to_list, pull_pid_from_list): New prototypes.
15451 * thread-db.c (thread_db_use_events): New.
15452 (find_first_thread): Rename to...
15453 (find_one_thread): ...this. Update callers and messages. Do not
15454 call fatal. Check thread_db_use_events. Do not call
15455 change_inferior_id or new_thread_notify.
15456 (maybe_attach_thread): Update. Do not call new_thread_notify.
15457 (thread_db_init): Set thread_db_use_events. Check use_events.
15458 * utils.c (fatal, warning): Correct message prefix.
15459
15460 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15461
15462 * Makefile.in (clean): Remove new files.
15463 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15464 (powerpc-64.o, powerpc-64.c): New rules.
15465 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15466 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15467 with SPE.
15468 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15469 SPE targets.
15470 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15471 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15472 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15473 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15474 (target_regsets): Add AltiVec and SPE register sets.
15475 * configure.ac: Check for AltiVec and SPE.
15476 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15477 (ppc_fill_vrregset, ppc_store_vrregset): New.
15478 (target_regsets): Add AltiVec register set.
15479 * configure: Regenerated.
15480
15481 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15482
15483 * linux-low.c (O_LARGEFILE): Define.
15484 (linux_read_memory): Use /proc/PID/mem.
15485 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15486 * configure, config.in: Regenerated.
15487
15488 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15489
15490 * linux-low.c (linux_wait_for_event): Do not pass signals while
15491 single-stepping.
15492
15493 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15494
15495 * win32-low.c (create_process): New.
15496 (win32_create_inferior): Use create_process instead of
15497 CreateProcess. If create_process failed retry appending an ".exe"
15498 suffix. Store the GetLastError result immediatelly after
15499 create_process calls and use it on the call to error.
15500
15501 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15502
15503 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15504
15505 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15506
15507 * configure.ac: Switch license to GPLv3.
15508
15509 2007-08-01 Michael Snyder <msnyder@access-company.com>
15510
15511 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15512
15513 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15514
15515 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15516 typedef.
15517 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15518 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15519 CloseToolhelp32Snapshot.
15520 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15521 CloseToolhelp32Snapshot.
15522
15523 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15524
15525 * server.c (main): Check for inferior exit before main loop.
15526
15527 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15528
15529 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15530 instead of on tmp_desc.
15531
15532 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15533 Daniel Jacobowitz <dan@codesourcery.com>
15534
15535 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15536 (add_thread): Minor cleanups.
15537 (clear_inferiors): Move lower in the file. Clear the DLL
15538 list.
15539 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15540 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15541 (xml_escape_text): New.
15542 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15543 for qSupported.
15544 (handle_v_cont): Report errors.
15545 (gdbserver_version): Update.
15546 (main): Correct size of own_buf. Do not report initial DLL events.
15547 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15548 (unloaded_dll, xml_escape_text): New.
15549 * win32-low.c (enum target_waitkind): Update comments.
15550 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15551 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15552 (win32_EnumProcessModules, win32_GetModuleInformation)
15553 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15554 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15555 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15556 (win32_Module32First, win32_Module32Next, load_toolhelp)
15557 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15558 (get_child_debug_event): Handle DLL events.
15559 (win32_wait): Likewise.
15560
15561 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15562
15563 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15564 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15565
15566 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15567
15568 * win32-low.c (handle_output_debug_string): Ignore event if not
15569 waiting.
15570
15571 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15572
15573 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15574
15575 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15576
15577 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15578
15579 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15580
15581 * inferiors.c (change_inferior_id): Add comment.
15582 * linux-low.c (check_removed_breakpoint): Add an early
15583 prototype. Improve debug output.
15584 (linux_attach): Doc update.
15585 (linux_detach_one_process, linux_detach): Clean up before releasing
15586 each process.
15587 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15588 * linux-low.h (struct process_info): Doc improvement.
15589 * mem-break.c (delete_all_breakpoints): New.
15590 * mem-break.h (delete_all_breakpoints): New prototype.
15591 * thread-db.c (find_first_thread): New.
15592 (thread_db_create_event): Call it instead of
15593 thread_db_find_new_threads. Clean up unused variables.
15594 (maybe_attach_thread): Remove first thread handling.
15595 (thread_db_find_new_threads): Use find_first_thread.
15596 (thread_db_get_tls_address): Likewise.
15597
15598 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15599
15600 * thread-db.c (thread_db_find_new_threads): Add prototype.
15601 (thread_db_create_event): Check for the main thread before adding
15602 a new thread.
15603 (maybe_attach_thread): Only enable event reporting if TID == 0.
15604 (thread_db_get_tls_address): Check for new threads.
15605
15606 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15607
15608 * linux-low.c (linux_create_inferior): Try execv before execvp.
15609 * spu-low.c (spu_create_inferior): Likewise.
15610
15611 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15612
15613 * linux-low.c (linux_create_inferior): Change execv to execvp.
15614 * spu-low.c (spu_create_inferior): Likewies.
15615
15616 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15617
15618 * Makefile.in (clean): Clean new files instead of deleted ones.
15619 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15620 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15621 rules.
15622 * configure.srv: Specify XML files and new regformats for MIPS and
15623 MIPS64 GNU/Linux.
15624 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15625 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15626 an entry for the restart register.
15627 (mips_cannot_fetch_register, mips_cannot_store_register)
15628 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15629 register names to match the XML descriptions.
15630 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15631 restart register instead of $0.
15632
15633 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15634 Markus Deuling <deuling@de.ibm.com>
15635
15636 * remote-utils.c (decode_xfer_write): New function.
15637 * server.h (decode_xfer_write): Add prototype.
15638 * server.c (handle_query): Add PACKET_LEN argument. Support
15639 qXfer:spu:read and qXfer:spu:write packets.
15640 (main): Pass packet_len to handle_query.
15641 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15642 * target.h (target_ops): Add qxfer_spu.
15643
15644 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15645
15646 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15647 accessing non-seekable spufs files.
15648
15649 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15650
15651 * server.c (handle_query): Add reply for qC packet.
15652
15653 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15654 Leo Zayas <lerele@champenstudios@com>
15655
15656 * server.h (check_remote_input_interrupt_request): New function.
15657 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15658 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15659 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15660 (check_remote_input_interrupt_request): New function.
15661 * server.h (check_remote_input_interrupt_request): Declare.
15662 * win32-low.c (winapi_DebugBreakProcess,
15663 winapi_GenerateConsoleCtrlEvent): New typedefs.
15664 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15665 to 250 ms.
15666 (win32_wait): Check for remote interrupt request
15667 with check_remote_input_interrupt_request.
15668 (win32_request_interrupt): New function.
15669 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15670
15671 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15672
15673 * win32-low.c (debug_registers_changed,
15674 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15675 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15676 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15677 (thread_rec): Get context using the low target.
15678 (child_add_thread): Call thread_added on the low target,
15679 which does the same thing.
15680 (regptr): Delete.
15681 (do_initial_child_stuff): Remove debug registers references.
15682 Set context using the low target. Resume threads after
15683 setting the contexts.
15684 (child_continue): Remove dead variable. Remove debug
15685 registers references.
15686 (child_fetch_inferior_registers): Go through the low target.
15687 (do_child_store_inferior_registers): Remove.
15688 (child_store_inferior_registers): Go through the low target.
15689 (win32_resume): Remove debug registers references.
15690 Set context using the low target.
15691 (handle_exception): Change return type to void. Don't record
15692 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15693 first chance exception.
15694 (get_child_debug_event): Change return type to void. Remove
15695 goto loop. Always return after waiting for debug event.
15696 (win32_wait): Convert to switch statement. Handle spurious
15697 events.
15698
15699 * win32-i386-low.c (debug_registers_changed,
15700 debug_registers_used): New.
15701 (initial_stuff): Rename to ...
15702 (i386_initial_stuff): ... this. Clear debug registers
15703 state variables.
15704 (store_debug_registers): Delete.
15705 (i386_get_thread_context): New.
15706 (load_debug_registers): Delete.
15707 (i386_set_thread_context): New.
15708 (i386_thread_added): New.
15709 (single_step): Rename to ...
15710 (i386_single_step): ... this.
15711 (do_fetch_inferior_registers): Rename to ...
15712 (i386_fetch_inferior_register): ... this.
15713 (i386_store_inferior_register): New.
15714 (the_low_target): Adapt to new interface.
15715
15716 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15717 (arm_get_thread_context): New.
15718 (arm_set_thread_context): New.
15719 (regptr): New.
15720 (do_fetch_inferior_registers): Rename to ...
15721 (arm_fetch_inferior_register): ... this.
15722 (arm_store_inferior_register): New.
15723 (arm_wince_breakpoint): Reimplement as unsigned long.
15724 (arm_wince_breakpoint_len): Define.
15725 (the_low_target): Adapt to new interface.
15726
15727 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15728 load_debug_registers. Add get_thread_context, set_thread_context,
15729 thread_added and store_inferior_register. Rename
15730 fetch_inferior_registers to fetch_inferior_register.
15731 (regptr): Remove declaration.
15732
15733 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15734
15735 * linux-low.c (linux_detach): Change return type to int. Return 0.
15736 * spu-low.c (spu_detach): Likewise.
15737
15738 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15739
15740 * target.h (target_ops): Change return type of detach to int.
15741 Add join.
15742 (join_inferior): New.
15743 * server.c (main): Don't skip detach support on mingw32.
15744 If the inferior doesn't support detaching return error.
15745 Call join_inferior instead of using waitpid.
15746 * linux-low.c (linux_join): New.
15747 (linux_target_op): Add linux_join.
15748 * spu-low.c (spu_join): New.
15749 (spu_target_ops): Add spu_join.
15750 * win32-low.c (win32_detach): Adapt to new interface.
15751 Reopen current_process_handle before detaching. Issue a child
15752 resume before detaching.
15753 (win32_join): New.
15754 (win32_target_op): Add win32_join.
15755
15756 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15757
15758 * win32-low.c (win32-attach): Fix return value.
15759 * target.h (target_ops): Describe ATTACH return values.
15760
15761 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15762
15763 * win32-low.c (GETPROCADDRESS): Define.
15764 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15765 (winapi_DebugSetProcessKillOnExit): Likewise.
15766 (win32_create_inferior): Force usage of ansi CreateProcessA.
15767 (win32_attach): Use GETPROCADDRESS.
15768 (win32_detach): Likewise.
15769
15770 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15771
15772 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15773
15774 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15775
15776 * win32-low.c: Commit leftover changes from 2007-03-29.
15777
15778 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15779
15780 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15781 fields short instead of int. Add explicit padding.
15782 (i387_cache_to_fsave): Remove unnecessary casts.
15783 (i387_fsave_to_cache): Doc fix.
15784 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15785
15786 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15787
15788 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15789 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15790
15791 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15792
15793 * configure.srv (arm*-*-mingw32ce*): Move near the other
15794 arm targets.
15795
15796 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15797
15798 * configure.ac: Add errno checking.
15799 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15800 sys/file.h and malloc.h.
15801 (AC_CHECK_DECLS): Add perror.
15802 (srv_mingwce): Handle.
15803 * configure.srv (i[34567]86-*-cygwin*): Add
15804 win32-i386-low.o to srv_tgtobj.
15805 (i[34567]86-*-mingw*): Likewise.
15806 (arm*-*-mingw32ce*): Add case.
15807 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15808 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15809 [__MINGW32CE__] (strerror): New function.
15810 [__MINGW32CE__] (errno): Define to GetLastError.
15811 [__MINGW32CE__] (COUNTOF): New macro.
15812 (remote_open): Remove extra close call.
15813 * mem-break.c (delete_breakpoint_at): New function.
15814 * mem-break.h (delete_breakpoint_at): Declare.
15815 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15816 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15817 [USE_WIN32API] (read, write): Add char* casts.
15818 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15819 * server.h: Include wincecompat.h on Windows CE.
15820 [HAVE_ERRNO_H]: Check.
15821 (perror): Declare if not declared.
15822 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15823 (perror_with_name): Remove errno declaration.
15824 * wincecompat.h: New.
15825 * wincecompat.c: New.
15826 * win32-low.h: New.
15827 * win32-arm-low.c: New.
15828 * win32-i386-low.c: New.
15829 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15830 (OUTMSG2): Make it safe.
15831 (_T): New macro.
15832 (COUNTOF): New macro.
15833 (NUM_REGS): Get it from the low target.
15834 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15835 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15836 (thread_rec): Let low target handle debug registers.
15837 (child_add_thread): Likewise.
15838 (child_init_thread_list): Likewise.
15839 (continue_one_thread): Likewise.
15840 (regptr): New.
15841 (do_child_fetch_inferior_registers): Move to ...
15842 * win32-i386-low.c: ... here, and rename to ...
15843 (do_fetch_inferior_registers): ... this.
15844 * win32-low.c (child_fetch_inferior_registers):
15845 Go through the low target.
15846 (do_child_store_inferior_registers): Use regptr.
15847 (strwinerror): New function.
15848 (win32_create_inferior): Handle Windows CE.
15849 Use strwinerror instead of strerror on Windows error
15850 codes. Add program to the error output.
15851 Don't close the main thread handle on Windows CE.
15852 (win32_attach): Use coredll.dll on Windows CE.
15853 (win32_kill): Close current process and current
15854 thread handles.
15855 (win32_detach): Use coredll.dll on Windows CE.
15856 (win32_resume): Let low target handle debug registers, and
15857 step request.
15858 (handle_exception): Add/Remove initial breakpoint. Avoid
15859 non-existant WSTOPSIG on Windows CE.
15860 (win32_read_inferior_memory): Cast to remove warning.
15861 (win32_arch_string): Go through the low target.
15862 (initialize_low): Call set_breakpoint_data with the low
15863 target's breakpoint.
15864 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15865 FOP_REGNUM, mappings): Move to ...
15866 * win32-i386-low.c: ... here.
15867 * win32-low.c (win32_thread_info): Move to ...
15868 * win32-low.h: ... here.
15869 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15870 win32-arm-low.c and wincecompat.c.
15871 (all:): Add $EXEEXT.
15872 (install-only:): Likewise.
15873 (gdbserver:): Likewise.
15874 (gdbreplay:): Likewise.
15875 * config.in: Regenerate.
15876 * configure: Regenerate.
15877
15878 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15879
15880 * win32-low.c: Rename typedef thread_info to
15881 win32_thread_info throughout.
15882
15883 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15884
15885 * win32-i386-low.c: Rename to ...
15886 * win32-low.c: ... this.
15887 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15888 * Makefile.in: Likewise.
15889
15890 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15891
15892 * remote-utils.c (monitor_output): Constify msg parameter.
15893 * server.h (monitor_output): Likewise.
15894 * win32-i386-low.c (handle_output_debug_string): New.
15895 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15896 handle_output_debug_string.
15897 (get_child_debug_event): Likewise.
15898
15899 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15900
15901 * server.c (main): Correct strtoul check.
15902
15903 2007-03-27 Jon Ringle <jon@ringle.org>
15904
15905 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15906
15907 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15908
15909 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15910
15911 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15912
15913 * terminal.h: Check HAVE_SGTTY_H.
15914
15915 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15916
15917 * remote-utils.c (remote_open): Print out the assigned port number.
15918
15919 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15920
15921 * remote-utils.c (monitor_output): New function.
15922 * server.c (debug_threads): Define here.
15923 (monitor_show_help): New function.
15924 (handle_query): Handle qRcmd.
15925 (main): Do not handle 'd' packet.
15926 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15927 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15928 of debug_threads.
15929
15930 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15931
15932 * Makefile.in (EXEEXT): New.
15933 (clean): Use $(EXEEXT).
15934
15935 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15936
15937 * target.h (target_ops): Rename send_signal to request_interrupt,
15938 and remove enum target_signal parameter.
15939 * linux-low.c (linux_request_interrupt): Rename from
15940 linux_send_signal, and always send SIGINT.
15941 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15942 and always send SIGINT.
15943 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15944 of send_signal.
15945 (input_interrupt): Likewise.
15946
15947 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15948
15949 * server.c (get_features_xml): Check if target implemented
15950 arch_string.
15951 * win32-i386-low.c (win32_arch_string): New.
15952 (win32_target_ops): Add win32_arch_string as arch_string member.
15953
15954 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15955
15956 * spu-low.c (spu_arch_string): New.
15957 (spu_target_ops): Add spu_arch_string.
15958
15959 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15960
15961 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15962 * configure.ac: Do not check for terminal.h.
15963 * configure, config.in: Regenerated.
15964
15965 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15966
15967 * Makefile.in (OBS): Add $(XML_BUILTIN).
15968 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15969 (clean): Update.
15970 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15971 (arm-with-iwmmxt.c): New.
15972 * config.in, configure: Regenerate.
15973 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15974 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15975 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15976 (arm*-*-linux*): Add iWMMXt and regset support.
15977 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15978 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15979 (arm_store_wmmxregset, target_regsets): New.
15980 * server.c (get_features_xml): Take annex argument. Check builtin
15981 XML documents.
15982 (handle_query): Handle multiple annexes.
15983
15984 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15985
15986 * remote-utils.c [USE_WIN32API] (read, write): Define.
15987 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15988 write.
15989
15990 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15991
15992 * linux-i386-low.c (the_low_target): Set arch_string.
15993 * linux-x86-64-low.c (the_low_target): Likewise.
15994 * linux-low.c (linux_arch_string): New.
15995 (linux_target_ops): Add it.
15996 * linux-low.h (struct linux_target_ops): Add arch_string.
15997 * server.c (write_qxfer_response): Use const void * for DATA.
15998 (get_features_xml): New.
15999 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16000 * target.h (struct target_ops): Add arch_string method.
16001
16002 2007-01-03 Denis Pilat <denis.pilat@st.com>
16003 Daniel Jacobowitz <dan@codesourcery.com>
16004
16005 * linux-low.c (linux_kill): Handle being called with no threads.
16006 * win32-i386-low.c (win32_kill): Likewise.
16007 (get_child_debug_event): Clear current_process_handle.
16008
16009 2006-12-30 Denis PILAT <denis.pilat@st.com>
16010 Daniel Jacobowitz <dan@codesourcery.com>
16011
16012 * remote-utils.c (remote_open): Check the type of specified
16013 serial port devices before opening them.
16014 * server.c (main): Kill the inferior if an error occurs during
16015 the first remote_open.
16016
16017 2006-12-05 Markus Deuling <deuling@de.ibm.com>
16018
16019 * README: Update supported targets.
16020
16021 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16022
16023 * Makefile.in (clean): Remove reg-mips64.c.
16024 (reg-mips64.c, reg-mips64.o): New rules.
16025 * configure.srv: Handle mips64. Include regset support for mips.
16026 * linux-mips-low.c (union mips_register): New.
16027 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16028 (mips_breakpoint, mips_breakpoint_at): Use int.
16029 (mips_collect_register, mips_supply_register)
16030 (mips_collect_register_32bit, mips_supply_register_32bit)
16031 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16032 (mips_store_fpregset, target_regsets): New.
16033 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16034
16035 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16036
16037 * configure.srv: Add target "spu*-*-*".
16038 * Makefile.in (clean): Remove reg-spu.c.
16039 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16040 * spu-low.c: New file.
16041
16042 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16043
16044 * configure.ac: Correct td_thr_tls_get_addr test.
16045 * configure: Regenerated.
16046
16047 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16048
16049 * linux-low.c (linux_wait_for_event): Reformat. Use the
16050 pass_signals array.
16051 * remote-utils.c (decode_address_to_semicolon): New.
16052 * server.c (pass_signals, handle_general_set): New.
16053 (handle_query): Mention QPassSignals for qSupported.
16054 (main): Call handle_general_set.
16055 * server.h (pass_signals, decode_address_to_semicolon): New.
16056
16057 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16058
16059 * server.c (handle_query): Correct error handling for read_auxv.
16060
16061 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16062
16063 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16064 and srv_linux_thread_db to yes.
16065 * linux-s390-low.c (s390_fill_gregset): New function.
16066 (target_regsets): Define data structure.
16067
16068 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16069
16070 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16071 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16072 * config.in, configure: Regenerated.
16073 * inferiors.c (gdb_id_to_thread): New function.
16074 (gdb_id_to_thread_id): Use it.
16075 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16076 * linux-low.h (struct process_info): Add th member.
16077 (thread_db_get_tls_address): New prototype.
16078 * remote-utils.c (decode_address): Make non-static.
16079 * server.c (handle_query): Handle qGetTLSAddr.
16080 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16081 * target.h (struct target_ops): Add get_tls_address.
16082 * thread-db.c (maybe_attach_thread): Save the thread handle.
16083 (thread_db_get_tls_address): New.
16084
16085 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16086
16087 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16088 (linux_resume_one_process): Take a siginfo_t *. Update all
16089 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16090 (struct pending_signals): Add a siginfo_t.
16091 (linux_wait_for_process): Always set last_status.
16092 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16093 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16094 * linux-low.h (struct process_info): Add last_status.
16095
16096 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16097
16098 * remote-utils.c (try_rle): New function.
16099 (putpkt_binary): Use it.
16100
16101 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16102
16103 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16104 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16105 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16106 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16107 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16108 point registers.
16109
16110 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16111
16112 * server.c (terminal_fd): New variable.
16113 (old_foreground_pgrp): Likewise.
16114 (restore_old_foreground_pgrp): New function.
16115 (start_inferior): Record the terminal file descriptor in terminal_fd
16116 and its original foreground group in old_foreground_pgrp. Register
16117 restore_old_foreground_pgrp with atexit().
16118
16119 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16120
16121 * server.c (handle_query): Correct qPart to qXfer.
16122
16123 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16124
16125 * configure.ac: Check for more headers which are missing on
16126 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16127 * configure.srv: Add Cygwin and mingw32.
16128 * remote-utils.c: Don't include headers unconditionally which
16129 are missing on mingw32. Include <winsock.h> for mingw32.
16130 (remote_open): Adjust for mingw32 support. Flush
16131 standard error after writing to it.
16132 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16133 (unblock_async_io, enable_async_io, disable_async_io)
16134 (readchar, getpkt): Update for Winsock support.
16135 (prepare_resume_reply): Expect a protocol signal number.
16136 * server.c: Disable <sys/wait.h> on mingw32.
16137 (start_inferior): Adjust for mingw32 support. Flush
16138 standard error after writing to it.
16139 (attach_inferior): Likewise. Use protocol signal
16140 numbers.
16141 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16142 and names.
16143 * win32-i386-low.c: New file.
16144 * Makefile.in (XM_CLIBS): Set.
16145 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16146 (win32-i386-low.o): New dependency rule.
16147 * linux-low.c (linux_wait): Use target signal numbers.
16148 * target.h (struct target_ops): Doc fix.
16149 * server.h (target_signal_to_name): New prototype.
16150 * gdbreplay.c: Don't include headers unconditionally which
16151 are missing on mingw32. Include <winsock.h> for mingw32.
16152 (remote_close, remote_open): Adjust for Winsock support.
16153 * configure, config.in: Regenerated.
16154
16155 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16156
16157 * server.c (decode_xfer_read, write_qxfer_response): New.
16158 (handle_query): Take a packet length argument. Handle
16159 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16160 the qSupported response.
16161 (main): Update call to handle_query.
16162
16163 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16164
16165 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16166 (putpkt_binary): Renamed from putpkt and adjusted for binary
16167 data.
16168 (putpkt): New wrapper for putpkt_binary.
16169 (readchar): Don't mask off the high bit.
16170 (decode_X_packet): New function.
16171 * server.c (main): Call putpkt_binary if a handler sets the packet
16172 length. Save the length of the incoming packet. Handle 'X'.
16173 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16174
16175 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16176
16177 * server.c (handle_query): Handle qSupported.
16178
16179 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16180
16181 * remote-utils.c (all_symbols_looked_up): New variable.
16182 (look_up_one_symbol): Check it.
16183 * server.h (look_up_one_symbol): New declaration.
16184 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16185
16186 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16187
16188 * Makefile.in (linux-arm-low.o): Update dependencies.
16189 * linux-arm-low.c: Include "gdb_proc_service.h".
16190 (PTRACE_GET_THREAD_AREA): Define.
16191 (ps_get_thread_area): New function.
16192
16193 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16194
16195 * configure.srv (m68k*-*-uclinux*): New target.
16196 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16197 (linux_resume_one_process): Remove extraneous cast.
16198 (linux_read_offsets): New.
16199 (linux_target_op): Add linux_read_offsets on mmuless systems.
16200 * server.c (handle_query): Add qOffsets logic.
16201 * target.h (struct target_ops): Add read_offsets.
16202
16203 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16204
16205 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16206 (PTRACE_GET_THREAD_AREA): Define.
16207 (ps_get_thread_area): New function.
16208 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16209 (linux-x86-64-low.o): Update.
16210
16211 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16212
16213 * configure.ac: Remove checks for prfpregset_t.
16214 * gdb_proc_service.h: New file.
16215 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16216 new "gdb_proc_service.h".
16217 * proc-service.c: Likewise.
16218 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16219 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16220 * Makefile.in (gdb_proc_service_h): Updated.
16221 * configure, config.in: Regenerated.
16222
16223 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16224
16225 * remote-utils.c (prepare_resume_reply): Move declaration
16226 of gdb_id_from_wait to the top of the block.
16227
16228 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16229
16230 * linux-low.c (regsets_store_inferior_registers): Read the regset
16231 from the target before filling it.
16232
16233 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16234
16235 * server.c (attach_inferior): Return SIGTRAP for a successful
16236 attach.
16237
16238 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16239
16240 * Makefile.in (OBS): Add version.o.
16241 (STAGESTUFF): Delete.
16242 (version.o): Add dependencies.
16243 (version.c): Replace rule.
16244 (clean): Remove version.c.
16245 * server.c (gdbserver_version): New.
16246 (gdbserver_usage): Use printf.
16247 (main): Handle --version and --help.
16248 * server.h (version, host_name): Add declarations.
16249
16250 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16251
16252 * linux-arm-low.c:
16253 * linux-arm-low.c:
16254 * inferiors.c:
16255 * i387-fp.h:
16256 * i387-fp.c:
16257 * gdbreplay.c:
16258 * regcache.c:
16259 * proc-service.c:
16260 * mem-break.h:
16261 * mem-break.c:
16262 * linux-x86-64-low.c:
16263 * linux-sh-low.c:
16264 * linux-s390-low.c:
16265 * linux-ppc64-low.c:
16266 * linux-ppc-low.c:
16267 * linux-mips-low.c:
16268 * linux-m68k-low.c:
16269 * linux-m32r-low.c:
16270 * linux-low.h:
16271 * linux-low.c:
16272 * linux-ia64-low.c:
16273 * linux-i386-low.c:
16274 * linux-crisv32-low.c:
16275 * thread-db.c:
16276 * terminal.h:
16277 * target.h:
16278 * target.c:
16279 * server.h:
16280 * server.c:
16281 * remote-utils.c:
16282 * regcache.h:
16283 * utils.c:
16284 * Makefile.in:
16285 * configure.ac:
16286 * gdbserver.1: Add (C) after Copyright. Update the FSF
16287 address.
16288
16289 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16290
16291 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16292 (arm_breakpoint_at): Recognize both breakpoints.
16293 (the_low_target): Use the correct breakpoint instruction.
16294
16295 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16296
16297 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16298 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16299 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16300 (the_low_target): Update.
16301
16302 2005-10-25 Andreas Schwab <schwab@suse.de>
16303
16304 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16305
16306 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16307 (ia64_num_regs): Reduce to 462.
16308
16309 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16310
16311 * acinclude.m4: Correct quoting.
16312 * aclocal.m4: Regenerated.
16313
16314 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16315 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16316 (thread_db_init): Call thread_db_err_str.
16317 * configure.ac: Check for TD_VERSION.
16318 * config.in, configure: Regenerated.
16319
16320 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16321
16322 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16323
16324 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16325
16326 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16327 is not available. Define HAVE_PTRACE_GETREGS if it is.
16328 * config.in, configure: Regenerated.
16329 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16330 * linux-i386-low.c, linux-m68k-low.c: Update to use
16331 HAVE_PTRACE_GETREGS.
16332 * linux-low.c (regsets_fetch_inferior_registers)
16333 (regsets_store_inferior_registers): Only return 0 if we processed
16334 GENERAL_REGS.
16335 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16336 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16337
16338 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16339
16340 * inferiors.c (struct thread_info): Add gdb_id.
16341 (add_thread): Add gdb_id argument.
16342 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16343 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16344 calls to add_thread.
16345 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16346 * server.c (handle_query): Use thread_to_gdb_id.
16347 (handle_v_cont, main): Use gdb_id_to_thread_id.
16348 * server.h (add_thread): Update prototype.
16349 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16350 prototypes.
16351
16352 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16353
16354 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16355 left-padded registers.
16356 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16357 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16358
16359 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16360
16361 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16362 * configure: Regenerate.
16363 * config.in: Regenerate.
16364 * server.h (NEED_DECLARATION_STRERROR):
16365 Replace with !HAVE_DECL_STRERROR.
16366
16367 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16368
16369 * linux-low.c (linux_wait, linux_send_signal): Don't test
16370 an unsigned long variable for > 0 if it could be MAX_ULONG.
16371 * server.c (myresume): Likewise.
16372 * target.c (set_desired_inferior): Likewise.
16373
16374 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16375
16376 * configure.ac: Simplify and improve check for socklen_t.
16377 * configure, config.in: Regenerate.
16378
16379 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16380
16381 * acconfig.h: Remove.
16382 * configure.ac: Add a test for socklen_t. Use three-argument
16383 AC_DEFINE throughout.
16384 * config.in: Regenerated using autoheader 2.59.
16385 * configure: Regenerated.
16386
16387 * gdbreplay.c (socklen_t): Provide a default.
16388 (remote_open): Use socklen_t.
16389 * remote-utils.c (socklen_t): Provide a default.
16390 (remote_open): Use socklen_t.
16391 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16392 unsigned char.
16393
16394 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16395 char for buffers.
16396 * linux-low.c (linux_read_memory, linux_write_memory)
16397 (linux_read_auxv): Likewise.
16398 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16399 (check_mem_write): Likewise.
16400 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16401 Likewise.
16402 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16403 (registers_from_string, register_data): Likewise.
16404 * server.c (handle_query, main): Likewise.
16405 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16406 (decode_M_packet): Likewise.
16407 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16408 * target.h (struct target_ops): Update read_memory, write_memory,
16409 and read_auxv.
16410 (read_inferior_memory, write_inferior_memory): Update.
16411 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16412 to unsigned char *.
16413 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16414 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16415 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16416 linux-s390-low.c, linux-sh-low.c: Update for changes in
16417 read_inferior_memory and the_low_target->breakpoint.
16418
16419 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16420
16421 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16422 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16423 * configure.srv: Add powerpc64-*-linux*.
16424 * linux-ppc64-low.c: New file.
16425
16426 2005-05-23 Orjan Friberg <orjanf@axis.com>
16427
16428 * linux-cris-low.c: New file with support for CRIS.
16429 * linux-crisv32-low.c: Ditto for CRISv32.
16430 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16431 (clean): Add reg-cris.c and reg-crisv32.c.
16432 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16433 reg-crisv32.o, and reg-crisv32.c to make rules.
16434 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16435 recognized targets.
16436
16437 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16438
16439 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16440 of sizeof (PTRACE_XFER_TYPE).
16441 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16442
16443 2005-05-12 Orjan Friberg <orjanf@axis.com>
16444
16445 * target.h (struct target_ops): Add insert_watchpoint,
16446 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16447 pointers for hardware watchpoint support.
16448 * linux-low.h (struct linux_target_ops): Ditto.
16449 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16450 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16451 to linux_target_ops.
16452 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16453 reply packet.
16454 * server.c (main): Recognize 'Z' and 'z' packets.
16455
16456 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16457
16458 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16459 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16460 (the_low_target): Add new members.
16461
16462 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16463
16464 * proc-service.c (ps_lgetregs): Search all_processes instead of
16465 all_threads.
16466
16467 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16468
16469 * server.c (start_inferior): Change return type to int.
16470 (attach_inferior): Change sigptr to int *.
16471 (handle_v_cont, handle_v_requests): Change signal to int *.
16472 (main): Change signal to int.
16473
16474 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16475
16476 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16477 * configure.srv: Add m32r*-*-linux*.
16478 * linux-m32r-low.c: New file.
16479
16480 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16481
16482 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16483
16484 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16485
16486 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16487 Take unsigned long arguments for PIDs.
16488 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16489 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16490 (wait_for_sigstop, linux_resume_one_process)
16491 (regsets_fetch_inferior_registers, linux_send_signal)
16492 (linux_read_auxv): Likewise. Update the types of variables holding
16493 PIDs. Update format string specifiers.
16494 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16495 * remote-utils.c (prepare_resume_reply): Likewise.
16496 * server.c (cont_thread, general_thread, step_thread)
16497 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16498 unsigned long.
16499 (handle_query): Update format specifiers.
16500 (handle_v_cont, main): Use strtoul for thread IDs.
16501 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16502 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16503 (general_thread, step_thread, thread_from_wait)
16504 (old_thread_from_wait): Update.
16505 * target.h (struct thread_resume): Use unsigned long for THREAD.
16506 (struct target_ops): Use unsigned long for arguments to attach and
16507 thread_alive.
16508
16509 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16510
16511 * acinclude.m4: Include bfd/bfd.m4 directly.
16512 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16513 <agriffis@toolchain.org>.
16514 * aclocal.m4, configure: Regenerated.
16515
16516 2005-01-07 Andrew Cagney <cagney@gnu.org>
16517
16518 * configure.ac: Rename configure.in, require autoconf 2.59.
16519 * configure: Re-generate.
16520
16521 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16522
16523 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16524 LIBS when finished.
16525 * aclocal.m4: Regenerated.
16526 * configure: Regenerated.
16527
16528 2004-11-21 Andreas Schwab <schwab@suse.de>
16529
16530 * linux-m68k-low.c (m68k_num_gregs): Define.
16531 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16532 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16533 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16534 (m68k_breakpoint_at): New. Add to the_low_target.
16535
16536 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16537 srv_linux_thread_db to yes.
16538
16539 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16540
16541 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16542 (ARCH_SET_FS): Likewise.
16543 (ARCH_GET_FS): Likewise.
16544 (ARCH_GET_GS): Likewise.
16545
16546 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16547
16548 * linux-i386-low.c (ps_get_thread_area): New.
16549 * linux-x86-64-low.c (ps_get_thread_area): New.
16550 * linux-low.c: Include <sys/syscall.h>.
16551 (linux_kill_one_process): Don't kill the first thread here.
16552 (linux_kill): Kill the first thread here.
16553 (kill_lwp): New function.
16554 (send_sigstop, linux_send_signal): Use it.
16555 * proc-service.c: Clean up #ifdefs.
16556 (fpregset_info): Delete.
16557 (ps_lgetregs): Update and enable implementation.
16558 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16559 implementations.
16560 * remote-utils.c (struct sym_cache, symbol_cache): New.
16561 (input_interrupt): Print a clearer message.
16562 (async_io_enabled): New variable.
16563 (enable_async_io, disable_async_io): Use it. Update comments.
16564 (look_up_one_symbol): Use the symbol cache.
16565 * thread-db.c (thread_db_look_up_symbols): New function.
16566 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16567
16568 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16569
16570 * configure.in: Test for -rdynamic.
16571 * configure: Regenerated.
16572 * Makefile (INTERNAL_LDFLAGS): New.
16573 (gdbserver, gdbreplay): Use it.
16574
16575 2004-09-02 Andrew Cagney <cagney@gnu.org>
16576
16577 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16578
16579 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16580
16581 * linux-low.c (linux_wait): Clear all_processes list also.
16582
16583 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16584
16585 * linux-low.c: Include <errno.h>. Remove extern declaration of
16586 errno.
16587
16588 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16589
16590 * gdbreplay.c, server.h, utils.c: Update copyright years.
16591
16592 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16593
16594 * server.c (main): Print child status or termination signal from
16595 variable 'signal', not 'sig'.
16596
16597 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16598
16599 * linux-low.c (linux_read_memory): Change return type to
16600 int. Check for and return error from ptrace().
16601 * target.c (read_inferior_memory): Change return type to int. Pass
16602 back return status from the_target->read_memory().
16603 * target.h (struct target_ops): Adapt *read_memory() prototype.
16604 Update comment.
16605 (read_inferior_memory): Adapt prototype.
16606 * server.c (main): Return an error packet if
16607 read_inferior_memory() returns an error.
16608
16609 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16610
16611 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16612 Unify with other clean targets.
16613
16614 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16615
16616 * server.c (handle_v_cont): Call set_desired_inferior.
16617
16618 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16619
16620 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16621
16622 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16623
16624 * linux-low.c (linux_wait): Unblock async I/O.
16625 (linux_resume): Block and enable async I/O.
16626 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16627 * server.h (block_async_io, unblock_async_io): Add prototypes.
16628
16629 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16630
16631 * remote-utils.c (remote_open): Print a status notice after
16632 opening a TCP port.
16633 * server.c (attach_inferior): Print a status notice after
16634 attaching.
16635
16636 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16637
16638 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16639
16640 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16641
16642 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16643 error packet.
16644 * server.c, target.h: Update copyright years.
16645
16646 2004-02-25 Roland McGrath <roland@redhat.com>
16647
16648 * target.h (struct target_ops): New member `read_auxv'.
16649 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16650 * linux-low.c (linux_read_auxv): New function.
16651 (linux_target_ops): Initialize `read_auxv' member to that.
16652
16653 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16654
16655 Committed by Jim Blandy <jimb@redhat.com>.
16656
16657 * linux-s390-low.c (s390_num_regs): Update.
16658 (s390_regmap): Remove control registers. Use __s390x__ predefine
16659 instead of GPR_SIZE to distiguish s390 and s390x targets.
16660
16661 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16662
16663 * linux-low.c: Update copyright year.
16664 (check_removed_breakpoint): Clear pending_is_breakpoint.
16665 (linux_set_resume_request, linux_queue_one_thread)
16666 (resume_status_pending_p): New functions.
16667 (linux_continue_one_thread): Use process->resume.
16668 (linux_resume): Only resume threads if there are no pending events.
16669 * linux-low.h (struct process_info): Add resume request
16670 pointer.
16671
16672 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16673
16674 * regcache.c (new_register_cache): Clear the allocated register
16675 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16676
16677 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16678
16679 * linux-low.c (linux_resume): Take a struct thread_resume *
16680 argument.
16681 (linux_wait): Update call.
16682 (resume_ptr): New static variable.
16683 (linux_continue_one_thread): Renamed from
16684 linux_continue_one_process. Use resume_ptr.
16685 (linux_resume): Use linux_continue_one_thread.
16686 * server.c (handle_v_cont, handle_v_requests): New functions.
16687 (myresume): New function.
16688 (main): Handle 'v' case.
16689 * target.h (struct thread_resume): New type.
16690 (struct target_ops): Change argument of "resume" to struct
16691 thread_resume *.
16692 (myresume): Delete macro.
16693
16694 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16695
16696 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16697 (uninstall): Support DESTDIR.
16698
16699 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16700
16701 * configure.srv: Add xscale*linux copy of arm*linux entry.
16702
16703 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16704
16705 * linux-arm-low.c (arm_reinsert_addr): New function.
16706 (the_low_target): Add arm_reinsert_addr.
16707
16708 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16709
16710 * mem-break.c: Remove whitespace at end of file.
16711
16712 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16713
16714 * configure.in: Check whether we need to prototype strerror.
16715 * server.h: Optionally prototype strerror.
16716 * gdbreplay.c (perror_with_name): Use strerror.
16717 * linux-low.c (linux_attach_lwp): Use strerror.
16718 * utils.c (perror_with_name): Use strerror.
16719 * config.in, configure: Regenerated.
16720
16721 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16722
16723 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16724 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16725
16726 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16727
16728 * Makefile.in (SFILES): Update.
16729 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16730 low-sun3.c: Remove files.
16731
16732 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16733
16734 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16735 (linux_detach_one_process, linux_detach): New functions.
16736 (linux_target_ops): Add linux_detach.
16737 * server.c (main): Handle 'D' packet.
16738 * target.h (struct target_ops): Add "detach" member.
16739 (detach_inferior): Define.
16740
16741 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16742
16743 From Kelley Cook <kelleycook@wideopenwest.com>:
16744 * configure.srv: Accept i[34567]86 variants.
16745
16746 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16747
16748 * linux-low.c (linux_wait_for_event): Correct comment typos.
16749 (linux_resume_one_process): Call check_removed_breakpoint.
16750 (linux_send_signal): New function.
16751 (linux_target_ops): Add linux_send_signal.
16752 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16753 of kill.
16754 * target.h (struct target_ops): Add send_signal.
16755
16756 2003-05-29 Jim Blandy <jimb@redhat.com>
16757
16758 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16759 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16760 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16761 away part of the register's value.
16762
16763 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16764
16765 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16766 (linux_wait_for_event, linux_init_signals): Likewise.
16767
16768 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16769
16770 * configure.in: Check for stdlib.h.
16771 * configure: Regenerated.
16772 * config.in: Regenerated.
16773
16774 2003-01-04 Andreas Schwab <schwab@suse.de>
16775
16776 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16777
16778 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16779
16780 * Makefile.in: Remove obsolete code.
16781
16782 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16783
16784 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16785 defined(PT_FPR0_HI).
16786
16787 2002-11-17 Stuart Hughes <seh@zee2.com>
16788
16789 * linux-arm-low.c (arm_num_regs): Increase.
16790 (arm_regmap): Include status register.
16791
16792 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16793
16794 * linux-low.c (register_addr): Remove incorrect -1 check.
16795
16796 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16797
16798 * linux-low.c (linux_create_inferior): Call setpgid. Return
16799 the new PID.
16800 (unstopped_p, linux_signal_pid): Remove.
16801 (linux_target_ops): Remove linux_signal_pid.
16802 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16803 global instead of target method.
16804 * target.h (struct target_ops): Remove signal_pid. Update comment
16805 for create_inferior.
16806 * server.c (signal_pid): New variable.
16807 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16808 gdbserver. Set the child to be the foreground process group.
16809 (attach_inferior): Set signal_pid.
16810
16811 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16812
16813 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16814
16815 2002-08-20 Jim Blandy <jimb@redhat.com>
16816
16817 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16818 default for this.
16819
16820 2002-08-01 Andrew Cagney <cagney@redhat.com>
16821
16822 * Makefile.in: Make chill references obsolete.
16823
16824 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16825
16826 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16827 * configure: Regenerate.
16828 * config.in: Regenerate.
16829
16830 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16831
16832 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16833 (perror_with_name, remote_close, remote_open, expect, play): Static.
16834
16835 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16836
16837 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16838 byte offsets instead of an array of indexes.
16839 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16840
16841 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16842
16843 * regcache.c: Add comment.
16844
16845 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16846
16847 * thread-db.c: New file.
16848 * proc-service.c: New file.
16849 * acinclude.m4: New file.
16850 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16851 proc-service.o, and thread-db.o.
16852 (linux-low.o): Add USE_THREAD_DB.
16853 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16854 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16855 * aclocal.m4: Regenerated.
16856 * config.in: Regenerated.
16857 * configure: Regenerated.
16858 * configure.in: Check for proc_service.h, sys/procfs.h,
16859 thread_db.h, and linux/elf.h headrs.
16860 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16861 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16862 Check for -lthread_db and thread support.
16863 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16864 PowerPC, and SuperH.
16865 * i387-fp.c: Constify arguments.
16866 * i387-fp.h: Likewise.
16867 * inferiors.c: (struct thread_info): Renamed from
16868 `struct inferior_info'. Remove PID member. Use generic inferior
16869 list header. All uses updated.
16870 (inferiors, signal_pid): Removed.
16871 (all_threads): New variable.
16872 (get_thread): Define.
16873 (add_inferior_to_list): New function.
16874 (for_each_inferior): New function.
16875 (change_inferior_id): New function.
16876 (add_inferior): Removed.
16877 (remove_inferior): New function.
16878 (add_thread): New function.
16879 (free_one_thread): New function.
16880 (remove_thread): New function.
16881 (clear_inferiors): Use for_each_inferior and free_one_thread.
16882 (find_inferior): New function.
16883 (find_inferior_id): New function.
16884 (inferior_target_data): Update argument type.
16885 (set_inferior_target_data): Likewise.
16886 (inferior_regcache_data): Likewise.
16887 (set_inferior_regcache_data): Likewise.
16888 * linux-low.c (linux_bp_reinsert): Remove.
16889 (all_processes, stopping_threads, using_thrads)
16890 (struct pending_signals, debug_threads, pid_of): New.
16891 (inferior_pid): Replace with macro.
16892 (struct inferior_linux_data): Remove.
16893 (get_stop_pc, add_process): New functions.
16894 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16895 Use add_process and add_thread.
16896 (linux_attach_lwp): New function, based on old linux_attach. Use
16897 add_process and add_thread. Set stop_expected for new threads.
16898 (linux_attach): New function.
16899 (linux_kill_one_process): New function.
16900 (linux_kill): Kill all LWPs.
16901 (linux_thread_alive): Use find_inferior_id.
16902 (check_removed_breakpoints, status_pending_p): New functions.
16903 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16904 Update. Use WNOHANG. Wait for cloned processes also. Update process
16905 struct for the found process.
16906 (linux_wait_for_event): New function.
16907 (linux_wait): Use it. Support LWPs.
16908 (send_sigstop, wait_for_sigstop, stop_all_processes)
16909 (linux_resume_one_process, linux_continue_one_process): New functions.
16910 (linux_resume): Support LWPs.
16911 (REGISTER_RAW_SIZE): Remove.
16912 (fetch_register): Use register_size instead. Call supply_register.
16913 (usr_store_inferior_registers): Likewise. Call collect_register.
16914 Fix recursive case.
16915 (regsets_fetch_inferior_registers): Improve error message.
16916 (regsets_store_inferior_registers): Add debugging.
16917 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16918 (unstopped_p, linux_signal_pid): New functions.
16919 (linux_target_ops): Add linux_signal_pid.
16920 (linux_init_signals): New function.
16921 (initialize_low): Call it. Initialize using_threads.
16922 * regcache.c (inferior_regcache_data): Add valid
16923 flag.
16924 (get_regcache): Fetch registers lazily. Add fetch argument
16925 and update all callers.
16926 (regcache_invalidate_one, regcache_invalidate): New
16927 functions.
16928 (new_register_cache): Renamed from create_register_cache.
16929 Return the new regcache.
16930 (free_register_cache): Change argument to a void *.
16931 (registers_to_string, registers_from_string): Call get_regcache
16932 with fetch flag set.
16933 (register_data): Make static. Pass fetch flag to get_regcache.
16934 (supply_register): Call get_regcache with fetch flag clear.
16935 (collect_register): Call get_regcache with fetch flag set.
16936 (collect_register_as_string): New function.
16937 * regcache.h: Update.
16938 * remote-utils.c (putpkt): Flush after debug output and use
16939 stderr.
16940 Handle input interrupts while waiting for an ACK.
16941 (input_interrupt): Use signal_pid method.
16942 (getpkt): Flush after debug output and use stderr.
16943 (outreg): Use collect_register_as_string.
16944 (new_thread_notify, dead_thread_notify): New functions.
16945 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16946 and general_thread.
16947 (look_up_one_symbol): Flush after debug output.
16948 * server.c (step_thread, server_waiting): New variables.
16949 (start_inferior): Don't use signal_pid. Update call to mywait.
16950 (attach_inferior): Update call to mywait.
16951 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16952 (main): Don't fetch/store registers explicitly. Use
16953 set_desired_inferior. Support proposed ``Hs'' packet. Update
16954 calls to mywait.
16955 * server.h: Update.
16956 (struct inferior_list, struct_inferior_list_entry): New.
16957 * target.c (set_desired_inferior): New.
16958 (write_inferior_memory): Constify.
16959 (mywait): New function.
16960 * target.h: Update.
16961 (struct target_ops): New signal_pid method.
16962 (mywait): Removed macro, added prototype.
16963
16964 * linux-low.h (regset_func): Removed.
16965 (regset_fill_func, regset_store_func): New.
16966 (enum regset_type): New.
16967 (struct regset_info): Add type field. Use new operation types.
16968 (struct linux_target_ops): stop_pc renamed to get_pc.
16969 Add decr_pc_after_break and breakpoint_at.
16970 (get_process, get_thread_proess, get_process_thread)
16971 (strut process_info, all_processes, linux_attach_lwp)
16972 (thread_db_init): New.
16973
16974 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16975 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16976 (the_low_target): Add new members.
16977 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16978 (i386_store_fpxregset): Constify.
16979 (target_regsets): Add new kind identifier.
16980 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16981 (i386_set_pc): Add debugging.
16982 (i386_breakpoint_at): New function.
16983 (the_low_target): Add new members.
16984 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16985 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16986 (mips_breakpoint_at): New.
16987 (the_low_target): Add new members.
16988 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16989 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16990 (the_low_target): Add new members.
16991 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16992 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16993 (the_low_target): Add new members.
16994 * linux-x86-64-low.c (target_regsets): Add new kind
16995 identifier.
16996
16997 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16998
16999 From Martin Pool <mbp@samba.org>:
17000 * server.c (gdbserver_usage): New function.
17001 (main): Call it.
17002
17003 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
17004
17005 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17006 stop_at -> stop_pc.
17007
17008 2002-05-04 Andrew Cagney <ac131313@redhat.com>
17009
17010 * Makefile.in: Remove obsolete code.
17011
17012 2002-04-24 Michal Ludvig <mludvig@suse.cz>
17013
17014 * linux-low.c (regsets_fetch_inferior_registers),
17015 (regsets_store_inferior_registers): Removed cast to int from
17016 ptrace() calls.
17017 * regcache.h: Added declaration of struct inferior_info.
17018
17019 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17020
17021 * inferiors.c (struct inferior_info): Add regcache_data.
17022 (add_inferior): Call create_register_cache.
17023 (clear_inferiors): Call free_register_cache.
17024 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17025 * regcache.c (struct inferior_regcache_data): New.
17026 (registers): Remove.
17027 (get_regcache): New function.
17028 (create_register_cache, free_register_cache): New functions.
17029 (set_register_cache): Don't initialize the register cache here.
17030 (registers_to_string, registers_from_string, register_data): Call
17031 get_regcache.
17032 * regcache.h: Add prototypes.
17033 * server.h: Likewise.
17034
17035 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
17036
17037 * mem-break.c: New file.
17038 * mem-break.h: New file.
17039 * Makefile.in: Add mem-break.o rule; update server.h
17040 dependencies.
17041 * inferiors.c (struct inferior_info): Add target_data
17042 member.
17043 (clear_inferiors): Free target_data member if set.
17044 (inferior_target_data, set_inferior_target_data): New functions.
17045 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17046 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17047 * linux-low.c (linux_bp_reinsert): New variable.
17048 (struct inferior_linux_data): New.
17049 (linux_create_inferior): Use set_inferior_target_data.
17050 (linux_attach): Likewise. Call add_inferior.
17051 (linux_wait_for_one_inferior): New function.
17052 (linux_wait): Call it.
17053 (linux_write_memory): Add const.
17054 (initialize_low): Call set_breakpoint_data.
17055 * linux-low.h (struct linux_target_ops): Add breakpoint
17056 handling members.
17057 * server.c (attach_inferior): Remove extra add_inferior
17058 call.
17059 * server.h: Include mem-break.h. Update inferior.c
17060 prototypes.
17061 * target.c (read_inferior_memory)
17062 (write_inferior_memory): New functions.
17063 * target.h (read_inferior_memory)
17064 (write_inferior_memory): Change macros to prototypes.
17065 (struct target_ops): Update comments. Add const to write_memory
17066 definition.
17067
17068 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17069
17070 * linux-low.c (usr_store_inferior_registers): Support
17071 registers which are allowed to fail to store.
17072 * linux-low.h (linux_target_ops): Likewise.
17073 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17074 (ppc_cannot_store_register): FPSCR may not be storable.
17075
17076 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17077
17078 * server.h: Include <string.h> if HAVE_STRING_H.
17079 * ChangeLog: Correct paths in last ChangeLog entry.
17080
17081 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17082
17083 * linux-low.h: Remove obsolete prototypes.
17084 (struct linux_target_ops): New.
17085 (extern the_low_target): New.
17086 * linux-low.c (num_regs, regmap): Remove declarations.
17087 (register_addr): Use the_low_target explicitly.
17088 (fetch_register): Likewise.
17089 (usr_fetch_inferior_registers): Likewise.
17090 (usr_store_inferior_registers): Likewise.
17091 * linux-arm-low.c (num_regs): Remove.
17092 (arm_num_regs): Define.
17093 (arm_regmap): Renamed from regmap, made static.
17094 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17095 made static.
17096 (arm_cannot_store_register): Renamed from cannot_store_register,
17097 made static.
17098 (the_low_target): New.
17099 * linux-i386-low.c (num_regs): Remove.
17100 (i386_num_regs): Define.
17101 (i386_regmap): Renamed from regmap, made static.
17102 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17103 made static.
17104 (i386_cannot_store_register): Renamed from cannot_store_register,
17105 made static.
17106 (the_low_target): New.
17107 * linux-ia64-low.c (num_regs): Remove.
17108 (ia64_num_regs): Define.
17109 (ia64_regmap): Renamed from regmap, made static.
17110 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17111 made static.
17112 (ia64_cannot_store_register): Renamed from cannot_store_register,
17113 made static.
17114 (the_low_target): New.
17115 * linux-m68k-low.c (num_regs): Remove.
17116 (m68k_num_regs): Define.
17117 (m68k_regmap): Renamed from regmap, made static.
17118 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17119 made static.
17120 (m68k_cannot_store_register): Renamed from cannot_store_register,
17121 made static.
17122 (the_low_target): New.
17123 * linux-mips-low.c (num_regs): Remove.
17124 (mips_num_regs): Define.
17125 (mips_regmap): Renamed from regmap, made static.
17126 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17127 made static.
17128 (mips_cannot_store_register): Renamed from cannot_store_register,
17129 made static.
17130 (the_low_target): New.
17131 * linux-ppc-low.c (num_regs): Remove.
17132 (ppc_num_regs): Define.
17133 (ppc_regmap): Renamed from regmap, made static.
17134 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17135 made static.
17136 (ppc_cannot_store_register): Renamed from cannot_store_register,
17137 made static.
17138 (the_low_target): New.
17139 * linux-s390-low.c (num_regs): Remove.
17140 (s390_num_regs): Define.
17141 (s390_regmap): Renamed from regmap, made static.
17142 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17143 made static.
17144 (s390_cannot_store_register): Renamed from cannot_store_register,
17145 made static.
17146 (the_low_target): New.
17147 * linux-sh-low.c (num_regs): Remove.
17148 (sh_num_regs): Define.
17149 (sh_regmap): Renamed from regmap, made static.
17150 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17151 made static.
17152 (sh_cannot_store_register): Renamed from cannot_store_register,
17153 made static.
17154 (the_low_target): New.
17155 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17156 (the_low_target): New.
17157
17158 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17159
17160 * Makefile.in: Add stamp-h target.
17161 * configure.in: Create stamp-h.
17162 * configure: Regenerated.
17163
17164 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17165
17166 * inferiors.c: New file.
17167 * target.c: New file.
17168 * target.h: New file.
17169 * Makefile.in: Add target.o and inferiors.o. Update
17170 dependencies.
17171 * linux-low.c (inferior_pid): New static variable,
17172 moved from server.c.
17173 (linux_create_inferior): Renamed from create_inferior.
17174 Call add_inferior. Return 0 on success instead of a PID.
17175 (linux_attach): Renamed from myattach.
17176 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17177 (linux_thread_alive): Renamed from mythread_alive.
17178 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17179 child dies.
17180 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17181 (regsets_store_inferior_registers): Correct error message.
17182 Add missing ``return 0''.
17183 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17184 (linux_store_registers): Renamed from store_inferior_registers.
17185 (linux_read_memory): Renamed from read_inferior_memory.
17186 (linux_write_memory): Renamed from write_inferior_memory.
17187 (linux_target_ops): New structure.
17188 (initialize_low): Call set_target_ops ().
17189 * remote-utils.c (unhexify): New function.
17190 (hexify): New function.
17191 (input_interrupt): Send signals to ``signal_pid''.
17192 * server.c (inferior_pid): Remove.
17193 (start_inferior): Update create_inferior call.
17194 (attach_inferior): Call add_inferior.
17195 (handle_query): New function.
17196 (main): Call handle_query for `q' packets.
17197 * server.h: Include "target.h". Remove obsolete prototypes.
17198 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17199
17200 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17201
17202 * Makefile.in: Add WARN_CFLAGS. Update configury
17203 dependencies.
17204 * configure.in: Check for <string.h>
17205 * configure: Regenerate.
17206 * config.in: Regenerate.
17207 * gdbreplay.c: Include needed system headers.
17208 (remote_open): Remove strchr prototype.
17209 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17210 * regcache.c (supply_register): Change buf argument to const void *.
17211 (supply_register_by_name): Likewise.
17212 (collect_register): Change buf argument to void *.
17213 (collect_register_by_name): Likewise.
17214 * regcache.h: Add missing prototypes.
17215 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17216 * server.c (handle_query): New function.
17217 (attached): New static variable, moved out of main.
17218 (main): Quiet longjmp clobber warnings.
17219 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17220 * utils.c (error): Remove NORETURN.
17221 (fatal): Likewise.
This page took 0.455312 seconds and 5 git commands to generate.