Testsuite: Ensure pie is disabled on some tests
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
... / ...
CommitLineData
12019-03-12 John Baldwin <jhb@FreeBSD.org>
2
3 * linux-x86-tdesc.c (i386_linux_read_description): Update call to
4 i386_create_target_description for 'segments' parameter.
5 * lynx-i386-low.c (lynx_i386_arch_setup): Likewise.
6 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
7 * win32-i386-low.c (i386_arch_setup): Likewise.
8
92019-03-12 Tom Tromey <tromey@adacore.com>
10
11 * linux-low.c (iterate_over_lwps): Update.
12
132019-03-06 Tom Tromey <tom@tromey.com>
14
15 * server.c (detach_or_kill_for_exit_cleanup): Remove parameter.
16 (captured_main): Use SCOPE_EXIT.
17
182019-03-04 Sergio Durigan Junior <sergiodj@redhat.com>
19
20 * configure.srv: Use '$enable_unittest' instead of '$development'
21 when checking whether to fill 'srv_regobj' on 'aarch64*-*-linux*'
22 case.
23
242019-02-27 Tom Tromey <tromey@adacore.com>
25
26 * gdbreplay.c (logchar): Handle \r\n.
27
282019-02-07 Alan Hayward <alan.hayward@arm.com>
29
30 * linux-low.c (linux_attach): Add process before lwp.
31 * server.c (attach_inferior): Check if already attached.
32
332019-02-07 Tom Tromey <tom@tromey.com>
34
35 * x86-tdesc.h: Rename include guard.
36 * x86-low.h: Add include guard.
37 * wincecompat.h: Rename include guard.
38 * win32-low.h: Add include guard.
39 * utils.h: Rename include guard.
40 * tracepoint.h: Rename include guard.
41 * tdesc.h: Rename include guard.
42 * target.h: Rename include guard.
43 * server.h: Rename include guard.
44 * remote-utils.h: Rename include guard.
45 * regcache.h: Rename include guard.
46 * nto-low.h: Rename include guard.
47 * notif.h: Add include guard.
48 * mem-break.h: Rename include guard.
49 * lynx-low.h: Add include guard.
50 * linux-x86-tdesc.h: Add include guard.
51 * linux-s390-tdesc.h: Add include guard.
52 * linux-ppc-tdesc-init.h: Add include guard.
53 * linux-low.h: Add include guard.
54 * linux-aarch64-tdesc.h: Add include guard.
55 * linux-aarch32-low.h: Add include guard.
56 * inferiors.h: Rename include guard.
57 * i387-fp.h: Rename include guard.
58 * hostio.h: Rename include guard.
59 * gdbthread.h: Rename include guard.
60 * gdb_proc_service.h: Rename include guard.
61 * event-loop.h: Rename include guard.
62 * dll.h: Rename include guard.
63 * debug.h: Rename include guard.
64 * ax.h: Rename include guard.
65
662018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
67
68 PR gdb/23985
69 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
70 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
71
722019-01-25 Tom Tromey <tom@tromey.com>
73
74 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
75
762019-01-25 Tom Tromey <tom@tromey.com>
77
78 * win32-low.c: Fix common/ includes.
79 * win32-i386-low.c: Fix common/ includes.
80 * tracepoint.c: Fix common/ includes.
81 * thread-db.c: Fix common/ includes.
82 * target.h: Fix common/ includes.
83 * symbol.c: Fix common/ includes.
84 * spu-low.c: Fix common/ includes.
85 * server.h: Fix common/ includes.
86 * server.c: Fix common/ includes.
87 * remote-utils.c: Fix common/ includes.
88 * regcache.h: Fix common/ includes.
89 * regcache.c: Fix common/ includes.
90 * nto-x86-low.c: Fix common/ includes.
91 * notif.h: Fix common/ includes.
92 * mem-break.h: Fix common/ includes.
93 * lynx-low.c: Fix common/ includes.
94 * lynx-i386-low.c: Fix common/ includes.
95 * linux-x86-tdesc-selftest.c: Fix common/ includes.
96 * linux-x86-low.c: Fix common/ includes.
97 * linux-low.c: Fix common/ includes.
98 * inferiors.h: Fix common/ includes.
99 * i387-fp.c: Fix common/ includes.
100 * hostio.c: Fix common/ includes.
101 * hostio-errno.c: Fix common/ includes.
102 * gdbthread.h: Fix common/ includes.
103 * gdbreplay.c: Fix common/ includes.
104 * fork-child.c: Fix common/ includes.
105 * event-loop.c: Fix common/ includes.
106 * ax.c:
107 (enum gdb_agent_op): Fix common/ includes.
108
1092019-01-21 Tom Tromey <tom@tromey.com>
110
111 * tracepoint.c: Fix includes.
112 * remote-utils.c: Fix includes.
113 * linux-x86-low.c: Fix includes.
114
1152019-01-01 Joel Brobecker <brobecker@adacore.com>
116
117 * gdbreplay.c (gdbreplay_version): Update copyright year in
118 version message.
119 * server.c (gdbserver_version): Likewise.
120
1212018-12-05 Alan Hayward <alan.hayward@arm.com>
122
123 * linux-low.c (add_lwp): Switch ordering.
124
1252018-11-29 Tom Tromey <tom@tromey.com>
126
127 * win32-low.c (win32_join): Take pid, not process.
128 * target.h (struct target_ops) <join>: Change argument type.
129 (join_inferior): Change argument name.
130 * spu-low.c (spu_join): Take pid, not process.
131 * server.c (handle_detach): Preserve pid before destroying
132 process.
133 * lynx-low.c (lynx_join): Take pid, not process.
134 * linux-low.c (linux_join): Take pid, not process.
135
1362018-11-23 Alan Hayward <alan.hayward@arm.com>
137
138 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
139 (aarch64_cannot_fetch_register): Likewise.
140 (struct linux_target_ops): Update references.
141
1422018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
143
144 * linux-ppc-low.c: Include nat/linux-ptrace.h.
145
1462018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
147
148 * configure.srv (ipa_ppc_linux_regobj): Add
149 powerpc-isa207-htm-vsx32l-ipa.o and
150 powerpc-isa207-htm-vsx64l-ipa.o.
151 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
152 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
153 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
154 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
155 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
156 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
157 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
158 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
159 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
160 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
161 (init_registers_powerpc_isa207_htm_vsx32l)
162 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
163 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
164 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
165 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
166 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
167 (ppc_store_tm_ctarregset): New functions.
168 (ppc_regsets): Add entries for HTM regsets.
169 (ppc_arch_setup): Set htm in features struct when needed. Set
170 sizes for the HTM regsets.
171 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
172 (initialize_low_arch): Call
173 init_registers_powerpc_isa207_htm_vsx32l and
174 init_registers_powerpc_isa207_htm_vsx64l.
175 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
176 PPC_TDESC_ISA207_HTM_VSX.
177 (initialize_low_tracepoint): Call
178 init_registers_powerpc_isa207_htm_vsx32l and
179 init_registers_powerpc_isa207_htm_vsx64l.
180
1812018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
182
183 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
184 rs6000/power-linux-pmu.xml to srv_xmlfiles.
185 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
186 (ppc_store_pmuregset): New functions.
187 (ppc_regsets): Add entries for ebb and pmu regsets.
188 (ppc_arch_setup): Set isa207 in features struct if the ebb and
189 pmu regsets are available. Set sizes for these regsets.
190
1912018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
192
193 * configure.srv (ipa_ppc_linux_regobj): Add
194 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
195 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
196 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
197 rs6000/powerpc-isa207-vsx32l.xml, and
198 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
199 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
200 <PPC_TDESC_ISA207_VSX>: New enum value.
201 (init_registers_powerpc_isa207_vsx32l): Declare.
202 (init_registers_powerpc_isa207_vsx64l): Declare.
203 * linux-ppc-low.c (ppc_fill_tarregset): New function.
204 (ppc_store_tarregset): New function.
205 (ppc_regsets): Add entry for the TAR regset.
206 (ppc_arch_setup): Set isa207 in features struct when needed. Set
207 size for the TAR regsets.
208 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
209 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
210 and init_registers_powerpc_isa207_vsx64l.
211 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
212 (initialize_low_tracepoint): Call
213 init_registers_powerpc_isa207_vsx32l and
214 init_registers_powerpc_isa207_vsx64l.
215
2162018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
217 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
218
219 * configure.srv (ipa_ppc_linux_regobj): Add
220 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
221 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
222 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
223 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
224 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
225 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
226 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
227 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
228 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
229 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
230 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
231 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
232 (ppc_hwcap): Add comment.
233 (ppc_hwcap2): New global.
234 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
235 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
236 (ppc_regsets): Add entries for the DSCR and PPR regsets.
237 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
238 when needed. Set sizes for the the DSCR and PPR regsets.
239 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
240 (initialize_low_arch): Call
241 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
242 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
243 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
244 PPC_TDESC_ISA205_PPR_DSCR_VSX.
245 (initialize_low_tracepoint): Call
246 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
247 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
248
2492018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
250
251 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
252
2532018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
254 Simon Marchi <simark@simark.ca>
255
256 * acinclude.m4: Include "../selftest.m4".
257 * configure: Regenerate.
258 * configure.ac: Use "GDB_AC_SELFTEST".
259 * configure.srv: Use "$enable_unittests" instead of
260 "$development" when checking whether unit tests have been
261 enabled.
262 * server.c (captured_main): Update message informing that
263 selftests have been disabled.
264
2652018-10-04 Tom Tromey <tom@tromey.com>
266
267 * configure: Rebuild.
268
2692018-10-04 Tom Tromey <tom@tromey.com>
270
271 * server.c (handle_status): Rename inner "thread".
272 (process_serial_event): Declare "res" in 'm' case.
273 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
274 (iterate_over_lwps): Rename inner "thread".
275 (linux_qxfer_libraries_svr4): Rename inner "len".
276 * gdbthread.h (find_thread_in_random): Rename inner "thread".
277
2782018-10-01 Gary Benson <gbenson@redhat.com>
279
280 * gdb_proc_service.h: Moved common code to
281 common/gdb_proc_service.h.
282
2832018-10-01 Gary Benson <gbenson@redhat.com>
284
285 * gdb_proc_service.h: Synchronize comments and whitespace with
286 GDB's version of this file.
287
2882018-09-25 Tom Tromey <tom@tromey.com>
289
290 * configure: Rebuild.
291 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
292
2932018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
294
295 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
296 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
297 ($(IPA_LIB)): Sort IPA_OBJS.
298
2992018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
300
301 * Makefile.in: Remove references to $(ADD_DEPS).
302
3032018-09-16 Tom Tromey <tom@tromey.com>
304
305 * remote-utils.c (remote_open): Use GNU style for metasyntactic
306 variables.
307 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
308 variables.
309
3102018-09-05 Tom Tromey <tom@tromey.com>
311
312 * configure: Rebuild.
313
3142018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
315
316 PR build/23399
317 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
318
3192018-08-27 Tom Tromey <tom@tromey.com>
320
321 PR build/23087:
322 * configure: Rebuild.
323
3242018-08-27 Tom Tromey <tom@tromey.com>
325
326 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
327 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
328 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
329 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
330 (s390x_emit_stack_adjust): Add casts to unsigned char.
331
3322018-08-22 Simon Marchi <simon.marchi@ericsson.com>
333
334 PR gdb/23374
335 PR gdb/23375
336 * server.h (struct client_state) <disable_randomization>:
337 Initialize to 1.
338
3392018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
340
341 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
342 variable.
343 (mips_supply_ptrace_register): Likewise.
344
3452018-07-22 Tom Tromey <tom@tromey.com>
346
347 * configure: Rebuild.
348
3492018-07-22 Tom Tromey <tom@tromey.com>
350
351 * win32-low.c (win32_create_inferior): Remove unused variables.
352 * gdbreplay.c (remote_open): Remove unused variable.
353 * remote-utils.c (remote_prepare): Remove unused variable.
354 * x86-tdesc.h (X86_TDESC_H): Define.
355 (amd64_expedite_regs): Define conditionally.
356 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
357 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
358 * remote-utils.c (readchar): Remove unused variable.
359
3602018-07-13 Pedro Alves <palves@redhat.com>
361
362 * linux-low.c (linux_kill): Change parameter to process_info
363 pointer instead of pid. Adjust.
364 * lynx-low.c (lynx_kill): Likewise.
365 * nto-low.c (nto_kill): Likewise.
366 * spu-low.c (spu_kill): Likewise.
367 * win32-low.c (win32_kill): Likewise.
368 * server.c (handle_v_kill, kill_inferior_callback)
369 (detach_or_kill_for_exit): Adjust.
370 * target.c (kill_inferior): Change parameter to process_info
371 pointer instead of pid. Adjust.
372 * target.h (struct target_ops) <kill>: Change parameter to
373 process_info pointer instead of pid. Adjust all implementations
374 and callers.
375 (kill_inferior): Likewise.
376
3772018-07-13 Pedro Alves <palves@redhat.com>
378
379 * linux-low.c (linux_detach, linux_join): Change parameter to
380 process_info pointer instead of pid. Adjust.
381 * lynx-low.c (lynx_detach, lynx_join): Likewise.
382 * nto-low.c (nto_detach): Likewise.
383 * spu-low.c (spu_detach, spu_join): Likewise.
384 * win32-low.c (win32_detach, win32_join): Likewise.
385 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
386 * target.h (struct target_ops) <detach, join>: Change parameter to
387 process_info pointer instead of pid. Adjust all implementations
388 and callers.
389 (detach_inferior, join_inferior): Rename 'pid' parameter to
390 'proc'.
391
3922018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
393 Jan Kratochvil <jan.kratochvil@redhat.com>
394 Paul Fertser <fercerpav@gmail.com>
395 Tsutomu Seki <sekiriki@gmail.com>
396
397 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
398 (OBS): Add 'common/netstuff.o'.
399 (GDBREPLAY_OBS): Likewise.
400 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
401 (remote_open): Implement support for IPv6
402 connections.
403 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
404 and 'wspiapi.h'.
405 (handle_accept_event): Accept connections from IPv6 sources.
406 (remote_prepare): Handle IPv6-style hostnames; implement
407 support for IPv6 connections.
408 (remote_open): Implement support for printing connections from
409 IPv6 sources.
410
4112018-07-11 Pedro Alves <palves@redhat.com>
412
413 PR gdb/23377
414 * mem-break.c (any_persistent_commands): Add process_info
415 parameter and use it instead of relying on the current process.
416 Change return type to bool.
417 * mem-break.h (any_persistent_commands): Add process_info
418 parameter and change return type to bool.
419 * server.c (handle_detach): Remove require_running_or_return call.
420 Look up the process_info for the process we're about to detach.
421 If not found, return back error to GDB. Adjust
422 any_persistent_commands call to pass down a process pointer.
423
4242018-07-11 Pedro Alves <palves@redhat.com>
425
426 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
427 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
428 instead of collect_register_by_name.
429 * regcache.c (regcache_raw_get_unsigned_by_name): New.
430 * regcache.h (regcache_raw_get_unsigned_by_name): New.
431
4322018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
433 Pedro Alves <palves@redhat.com>
434
435 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
436
4372018-07-03 Tom Tromey <tom@tromey.com>
438
439 * linux-low.c: Update.
440 * lynx-low.c: Update.
441 * mem-break.c: Update.
442 * nto-low.c: Update.
443 * remote-utils.c: Update.
444 * server.c: Update.
445 * spu-low.c: Update.
446 * target.c: Update.
447 * win32-low.c: Update.
448
4492018-07-03 Tom Tromey <tom@tromey.com>
450
451 * server.c: Update.
452
4532018-07-03 Tom Tromey <tom@tromey.com>
454
455 * linux-low.c: Update.
456
4572018-07-03 Tom Tromey <tom@tromey.com>
458
459 * target.c: Update.
460
4612018-07-03 Tom Tromey <tom@tromey.com>
462
463 * linux-low.c: Update.
464 * linux-mips-low.c: Update.
465 * lynx-low.c: Update.
466 * nto-low.c: Update.
467 * remote-utils.c: Update.
468 * server.c: Update.
469 * spu-low.c: Update.
470 * target.c: Update.
471 * thread-db.c: Update.
472
4732018-07-03 Tom Tromey <tom@tromey.com>
474
475 * linux-low.c: Update.
476 * linux-mips-low.c: Update.
477 * lynx-low.c: Update.
478 * mem-break.c: Update.
479 * nto-low.c: Update.
480 * remote-utils.c: Update.
481 * server.c: Update.
482 * spu-low.c: Update.
483 * target.c: Update.
484 * tracepoint.c: Update.
485
4862018-07-03 Tom Tromey <tom@tromey.com>
487
488 * linux-low.c: Update.
489 * linux-ppc-low.c: Update.
490 * linux-x86-low.c: Update.
491 * proc-service.c: Update.
492 * server.c: Update.
493 * spu-low.c: Update.
494 * thread-db.c: Update.
495 * win32-low.c: Update.
496
4972018-07-03 Tom Tromey <tom@tromey.com>
498
499 * linux-low.c: Update.
500 * lynx-low.c: Update.
501 * nto-low.c: Update.
502 * remote-utils.c: Update.
503 * spu-low.c: Update.
504 * thread-db.c: Update.
505 * win32-low.c: Update.
506
5072018-06-29 Joel Brobecker <brobecker@adacore.com>
508
509 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
510 parameter in call to 'amd64_create_target_description'.
511
5122018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
513
514 * x86-tdesc.h: Remove executable permission flag.
515
5162018-06-19 Simon Marchi <simon.marchi@ericsson.com>
517
518 * configure.ac: Remove AC_PREREQ, add missing quoting.
519 * configure: Re-generate.
520 * config.in: Re-generate.
521 * aclocal.m4: Re-generate.
522
5232018-06-18 Simon Marchi <simon.marchi@ericsson.com>
524
525 * tracepoint.h (current_traceframe): Remove declaration.
526
5272018-06-18 Alan Hayward <alan.hayward@arm.com>
528
529 * linux-aarch64-low.c (is_sve_tdesc): New function.
530 (aarch64_sve_regs_copy_to_regcache): Likewise.
531 (aarch64_sve_regs_copy_from_regcache): Likewise.
532 (aarch64_regs_info): Add SVE checks.
533 (initialize_low_arch): Initialize SVE.
534
5352018-06-18 Alan Hayward <alan.hayward@arm.com>
536
537 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
538
5392018-06-11 Alan Hayward <alan.hayward@arm.com>
540
541 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
542 (initialize_low_tracepoint): Likewise
543 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
544 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
545 param.
546 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
547 checks.
548 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
549
5502018-06-11 Alan Hayward <alan.hayward@arm.com>
551
552 * server.h (PBUFSIZ): Increase size
553
5542018-06-11 Alan Hayward <alan.hayward@arm.com>
555
556 * regcache.c (regcache::raw_compare): New function.
557 * regcache.h (regcache::raw_compare): New declaration.
558
5592018-06-11 Alan Hayward <alan.hayward@arm.com>
560
561 * regcache.c (new_register_cache): Use new.
562 (free_register_cache): Use delete.
563 (register_data): Use const.
564 (supply_register): Move body inside regcache.
565 (regcache::raw_supply): New override function.
566 (collect_register): Move body inside regcache.
567 (regcache::raw_collect): New override function.
568 (regcache::get_register_status): New override function.
569 * regcache.h (struct regcache): Inherit from reg_buffer_common.
570
5712018-06-09 Tom Tromey <tom@tromey.com>
572
573 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
574 declare queue.
575 (event_queue): Use std::queue.
576 (gdb_event_xfree): Remove.
577 (initialize_event_loop, process_event, wait_for_event): Update.
578
5792018-06-08 Stan Cox <scox@redhat.com>
580
581 * win32-low.c (win32_create_inferior): last_ptid and last_status
582 moved to client_state.
583
5842018-06-08 Pedro Alves <palves@redhat.com>
585
586 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
587 common/common-exceptions.o, common/common-utils.o,
588 common/errors.o, common/print-utils.o and utils.o.
589 * gdbreplay.c: Include "common-defs.h" instead of the two
590 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
591 string.h or alloca.h.
592 (perror_with_name): Delete.
593 (remote_open): Use xstrdup instead of strdup.
594 (main): Rename to ...
595 (captured_main): ... this.
596 (main): New.
597
5982018-06-08 Tom Tromey <tom@tromey.com>
599
600 * linux-low.c (linux_low_read_btrace): Update.
601
6022018-06-04 Stan Cox <scox@redhat.com>
603
604 * server.h (struct client_state): New.
605 * server.c (cont_thread, general_thread, multi_process)
606 (report_fork_events, report_vfork_events, report_exec_events)
607 (report_thread_events, swbreak_feature, hwbreak_feature)
608 (vCont_supported, disable_randomization, pass_signals)
609 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
610 Moved to client_state.
611 * remote-utils.c (remote_debug, noack_mode)
612 (transport_is_reliable): Moved to client_state.
613 * tracepoint.c (current_traceframe): Moved to client_state.
614
615 Update all callers.
616 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
617 linux-low.c, remote-utils.h, target.c: Use client_state.
618
6192018-05-31 Alan Hayward <alan.hayward@arm.com>
620
621 * configure.srv: Add new c/h file.
622
6232018-05-31 Alan Hayward <alan.hayward@arm.com>
624
625 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
626 null VQ.
627
6282018-05-25 Maciej W. Rozycki <macro@mips.com>
629
630 * gdb.arch/mips-fpregset-core.exp: New test.
631 * gdb.arch/mips-fpregset-core.c: New test source.
632
6332018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
634
635 PR server/23198
636 * hostio.c (require_int): Do not report overflow for integers
637 between 0xfffffff and 0x7fffffff.
638
6392018-05-22 Maciej W. Rozycki <macro@mips.com>
640
641 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
642 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
643 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
644 functions.
645 (the_low_target): Wire them.
646
6472018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
648
649 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
650 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
651 mode. Call collect_register_by_name with vscr using
652 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
653 (ppc_store_vrregset): Add and set vscr_offset variable as in
654 ppc_fill_vrregset. Call supply_register_by_name with vscr using
655 vscr_offset.
656
6572018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
658
659 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
660 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
661 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
662
6632018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
664
665 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
666 (ppc_store_vsxregset): Likewise.
667 (ppc_fill_vrregset): Likewise.
668 (ppc_store_vrregset): Likewise.
669 (ppc_fill_evrregset): Likewise.
670 (ppc_store_evrregset): Likewise.
671 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
672 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
673 needed.
674
6752018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
676
677 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
678 wordsize of the inferior. Call ppc_linux_target_wordsize.
679
6802018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
681
682 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
683 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
684 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
685 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
686 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
687 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
688 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
689 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
690 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
691 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
692 (tdesc_powerpc_e500l): Remove.
693 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
694 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
695 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
696 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
697 linux-ppc-tdesc.h.
698 (ppc_arch_setup): Remove target description matching code. Fill a
699 ppc_linux_features struct and call ppc_linux_match_description
700 with it.
701
7022018-05-22 Maciej W. Rozycki <macro@mips.com>
703
704 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
705 width of the requested register exceeds the width of the
706 `ptrace' data type.
707 (mips_cannot_store_register): Likewise.
708
7092018-05-21 Maciej W. Rozycki <macro@mips.com>
710
711 * linux-mips-low.c (mips_fetch_register): New function. Update
712 preceding comment.
713 (mips_store_gregset): Supply 0 rather than $restart for $zero.
714 (the_low_target): Wire `mips_fetch_register'.
715
7162018-05-10 Joel Brobecker <brobecker@adacore.com>
717
718 * lynx-i386-low.c (LYNXOS_178): New macro.
719 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
720 the layout on LynxOS-178.
721 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
722 handle floating point registers that are not supported by
723 LynxOS-178.
724
7252018-05-10 Tom Tromey <tom@tromey.com>
726
727 * configure: Rebuild.
728
7292018-05-10 Joel Brobecker <brobecker@adacore.com>
730
731 PR server/23158:
732 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
733 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
734 Use it to set the expedite_regs field in the given tdesc.
735 * x86-tdesc.h: New file.
736 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
737 Adjust following the addition of the new expedite_regs parameter
738 to init_target_desc.
739 * linux-tic6x-low.c (tic6x_read_description): Likewise.
740 * linux-x86-tdesc.c: #include "x86-tdesc.h".
741 (i386_linux_read_description, amd64_linux_read_description):
742 Adjust following the addition of the new expedite_regs parameter
743 to init_target_desc.
744 * lynx-i386-low.c: #include "x86-tdesc.h".
745 (lynx_i386_arch_setup): Adjust following the addition of the new
746 expedite_regs parameter to init_target_desc.
747 * nto-x86-low.c: #include "x86-tdesc.h".
748 (nto_x86_arch_setup): Adjust following the addition of the new
749 expedite_regs parameter to init_target_desc.
750 * win32-i386-low.c: #include "x86-tdesc.h".
751 (i386_arch_setup): Adjust following the addition of the new
752 expedite_regs parameter to init_target_desc.
753
7542018-05-10 Joel Brobecker <brobecker@adacore.com>
755
756 PR server/23158:
757 * win32-low.c (win32_create_inferior): Add call to my_wait
758 setting last_status global.
759
7602018-05-10 Joel Brobecker <brobecker@adacore.com>
761
762 PR server/23158:
763 * win32-low.c (create_process): Only call gdb_tilde_expand if
764 inferior_cwd is not NULL.
765
7662018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
767
768 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
769 registers to the cache if their values have changed.
770 (i387_xsave_to_cache): Provide default values for x87 control
771 registers when these features are available, but disabled.
772 * regcache.c (supply_register_by_name_zeroed): New function.
773 * regcache.h (supply_register_by_name_zeroed): Declare new
774 function.
775
7762018-05-07 Tom Tromey <tom@tromey.com>
777
778 * configure: Rebuild.
779
7802018-05-04 Tom Tromey <tom@tromey.com>
781
782 * configure: Rebuild.
783
7842018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
785 Pedro Alves <palves@redhat.com>
786
787 * linux-aarch64-low.c (aarch64_stopped_data_address):
788 Likewise.
789
7902018-04-27 Tom Tromey <tom@tromey.com>
791
792 * configure: Rebuild.
793
7942018-04-23 Tom Tromey <tom@tromey.com>
795
796 * configure: Rebuild.
797
7982018-04-19 Simon Marchi <simon.marchi@ericsson.com>
799
800 * Makefile.in (depcomp): Add "..".
801 (all_deps_files): New and use it.
802
8032018-04-18 Alan Hayward <alan.hayward@arm.com>
804
805 * configure.srv (aarch64*-*-linux*): Don't include xml.
806 (i[34567]86-*-cygwin*): Likewise.
807 (i[34567]86-*-linux*): Likewise.
808 (i[34567]86-*-lynxos*): Likewise.
809 (i[34567]86-*-mingw32ce*): Likewise.
810 (i[34567]86-*-mingw*): Likewise.
811 (i[34567]86-*-nto*): Likewise.
812 (tic6x-*-uclinux): Likewise.
813 (x86_64-*-linux*): Likewise.
814 (x86_64-*-mingw*): Likewise.
815 (x86_64-*-cygwin*): Likewise.
816
8172018-04-18 Alan Hayward <alan.hayward@arm.com>
818
819 * tdesc.c: Remove xml parameter.
820
8212018-04-18 Alan Hayward <alan.hayward@arm.com>
822
823 * server.c (get_features_xml): Remove cast.
824 * tdesc.c (void target_desc::accept): Fill in function.
825 (tdesc_get_features_xml): Remove old xml creation.
826 (print_xml_feature::visit_pre): Add xml vistor.
827 * tdesc.h (struct target_desc): Make xmltarget mutable.
828 (tdesc_get_features_xml): Remove declaration.
829
8302018-04-18 Alan Hayward <alan.hayward@arm.com>
831
832 * tdesc.c (tdesc_architecture_name): Add new function.
833 (tdesc_osabi_name): Likewise.
834 (tdesc_get_features_xml): Use new functions.
835
8362018-04-18 Alan Hayward <alan.hayward@arm.com>
837
838 * tdesc.c (tdesc_create_flags): Remove.
839 (tdesc_add_flag): Likewise.
840 (tdesc_named_type): Likewise.
841 (tdesc_create_union): Likewise.
842 (tdesc_create_struct): Likewise.
843 (tdesc_create_vector): Likewise.
844 (tdesc_add_bitfield): Likewise.
845 (tdesc_add_field): Likewise.
846 (tdesc_set_struct_size): Likewise.
847
8482018-04-18 Alan Hayward <alan.hayward@arm.com>
849
850 * tdesc.c (~target_desc): Remove implictly deleted items.
851 (init_target_desc): Iterate all features.
852 (tdesc_get_features_xml): Use vector.
853 (tdesc_create_feature): Create feature.
854 * tdesc.h (tdesc_feature) Remove
855 (target_desc): Add features.
856
8572018-04-18 Alan Hayward <alan.hayward@arm.com>
858
859 * Makefile.in: Add common/tdesc.c
860 * tdesc.c (init_target_desc): init all reg_defs from register
861 vector.
862 (tdesc_create_reg): Create tdesc_reg.
863 * tdesc.h (tdesc_feature): Add register vector.
864
8652018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
866
867 * tdesc.h (struct target_desc) <features>: Change type to
868 std::vector<std::string>.
869 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
870 changes.
871 (tdesc_get_features_xml): Likewise.
872 (tdesc_create_feature): Likewise.
873
8742018-03-26 Alan Hayward <alan.hayward@arm.com>
875
876 * regcache.c (find_register_by_number): Return a ref.
877 (find_regno): Use references.
878 (register_size): Likewise.
879 (register_data): Likewise.
880 * tdesc.c (target_desc::~target_desc): Remove free calls.
881 (target_desc::operator==): Use std::vector compare.
882 (init_target_desc): Use reference.
883 (tdesc_create_reg): Use reg constructors.
884 * tdesc.h (struct target_desc): Replace pointer with object.
885
8862018-03-23 Alan Hayward <alan.hayward@arm.com>
887
888 * regcache.c (find_register_by_number): Make static.
889 (find_regno): Use find_register_by_number
890 * regcache.h (struct reg): Remove declaration.
891
8922018-03-23 Alan Hayward <alan.hayward@arm.com>
893
894 * tdesc.c (target_desc::~target_desc): Move to here.
895 (target_desc::operator==): Likewise.
896 * tdesc.h (target_desc::~target_desc): Move from here.
897 (target_desc::operator==): Likewise.
898
8992018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
900
901 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
902
9032018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
904
905 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
906 S390_TDESC_GS.
907 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
908 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
909 and init_registers_s390_gs_linux64.
910
9112018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
912
913 * linux-s390-low.c (s390_fill_gs): Remove function.
914 (s390_fill_gsbc): Remove function.
915 (s390_regsets): Set fill functions for the guarded storage regsets
916 to NULL.
917
9182018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
919
920 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
921 the word size. Add comment.
922 (s390_get_wordsize): New function.
923 (s390_arch_setup): No longer select a temporary tdesc to fetch the
924 pswm with it. Instead, use s390_get_wordsize to determine the
925 word size first and derive the correct tdesc from that directly.
926
9272018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
928
929 * Makefile.in: Include silent-rules.mk.
930 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
931 (COMPILE): Add ECHO_CXX.
932 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
933 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
934 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
935 (version-generated.c): Add ECHO_GEN.
936 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
937 (IPAGENT_COMPILE): Add ECHO_CXX.
938 (%-generated.c): Add ECHO_REGDAT.
939
9402018-03-14 Tom Tromey <tom@tromey.com>
941
942 PR cli/14977:
943 * ax.c (ax_printf): Special case for NULL.
944
9452018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
946
947 * linux-low.c (linux_qxfer_libraries_svr4): Use
948 xml_escape_text_append.
949
9502018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
951
952 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
953
9542018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
955
956 * server.c (handle_general_set): Remove unnecessary xstrdup.
957
9582018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
959
960 * server.c (parse_debug_format_options): Adjust to
961 delim_string_to_char_ptr_vec changes.
962 * thread-db.c (thread_db_load_search): Adjust to
963 dirnames_to_char_ptr_vec changes.
964
9652018-03-01 Markus Metzger <markus.t.metzger@intel.com>
966
967 * target.h (target_enable_btrace, target_disable_btrace)
968 (target_read_btrace, target_read_btrace_conf): Turn macro into
969 inline function. Throw error if target method is not defined.
970 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
971 check for btrace target method. Be prepared to handle exceptions
972 from btrace target methods.
973
9742018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
975
976 * server.c (captured_main): Change order of error message printed
977 when the current working directory cannot be found.
978
9792018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
980
981 * server.c: Include "filenames.h" and "pathstuff.h".
982 (program_name): Delete variable.
983 (program_path): New anonymous class.
984 (get_exec_wrapper): Use "program_path" instead of
985 "program_name".
986 (handle_v_run): Likewise.
987 (captured_main): Likewise.
988 (process_serial_event): Likewise.
989
9902018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
991
992 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
993 (OBJS): Add "pathstuff.o".
994 * server.c (current_directory): New global variable.
995 (captured_main): Initialize "current_directory".
996
9972018-02-26 Alan Hayward <alan.hayward@arm.com>
998
999 * tdesc.c: Use common/tdesc.h.
1000 * tdesc.h: Likewise.
1001
10022018-02-20 Alan Hayward <alan.hayward@arm.com>
1003 Simon Marchi <simon.marchi@ericsson.com>
1004
1005 * Makefile.in: Switch order of make rules.
1006
10072018-02-19 Alan Hayward <alan.hayward@arm.com>
1008
1009 * Makefile.in: Add common directory in build.
1010 * configure.ac: Add common reference.
1011 * configure: Regenerate.
1012
10132018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1014
1015 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
1016 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
1017 * spu-low.c (spu_target_ops): Likewise.
1018 * win32-low.c (win32_target_ops): Likewise.
1019 * server.c (supported_btrace_packets): Report packets unconditionally.
1020 * target.h (target_ops) <supports_btrace>: Remove.
1021 (target_supports_btrace): Remove.
1022
10232018-02-09 Markus Metzger <markus.t.metzger@intel.com>
1024
1025 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
1026 (handle_btrace_disable): Change return type to void. Use exceptions
1027 to report errors.
1028 (handle_btrace_general_set): Catch exception and copy message to
1029 return message.
1030
10312018-02-08 Tom Tromey <tom@tromey.com>
1032
1033 * linux-low.c (install_software_single_step_breakpoints): Use
1034 make_scoped_restore.
1035 * inferiors.c (make_cleanup_restore_current_thread): Remove.
1036 (do_restore_current_thread_cleanup): Remove.
1037 * gdbthread.h (make_cleanup_restore_current_thread): Don't
1038 declare.
1039
10402018-02-08 Tom Tromey <tom@tromey.com>
1041
1042 * mem-break.c (set_raw_breakpoint_at): Use
1043 gdb::unique_xmalloc_ptr.
1044
10452018-01-30 Pedro Alves <palves@redhat.com>
1046
1047 PR gdb/13211
1048 * target.c (target_terminal::terminal_state): Rename to ...
1049 (target_terminal::m_terminal_state): ... this.
1050
10512018-01-19 James Clarke <jrtc27@jrtc27.com>
1052
1053 * linux-low.c (handle_extended_wait): Surround call to
1054 thread_db_notice_clone with #ifdef USE_THREAD_DB.
1055
10562018-01-17 Simon Marchi <simon.marchi@ericsson.com>
1057
1058 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
1059 linux_ptrace_attach_fail_reason_string now returning an
1060 std::string.
1061 (linux_attach): Likewise.
1062 * thread-db.c (attach_thread): Likewise.
1063
10642018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1065
1066 PR gdb/21559
1067 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1068 checking for fs_base/gs_base fields in struct user_regs_struct.
1069 * configure: Regenerate.
1070
10712018-01-16 Yao Qi <yao.qi@linaro.org>
1072
1073 PR gdb/18749
1074 * linux-low.c (fetch_register): Call supply_register instead of
1075 error.
1076
10772018-01-08 Yao Qi <yao.qi@linaro.org>
1078 Simon Marchi <simon.marchi@ericsson.com>
1079
1080 * Makefile.in (OBS): Remove selftest.o.
1081 * configure.ac: Set srv_selftest_objs if $development is true.
1082 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1083 * configure: Re-generated.
1084 * server.c (captured_main): Wrap variable selftest_filter with
1085 GDB_SELF_TEST.
1086
10872018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1088
1089 * server.c (parse_debug_format_options): Return std::string.
1090 (handle_monitor_command, captured_main): Adjust.
1091
10922018-01-05 Pedro Alves <palves@redhat.com>
1093
1094 PR gdb/18653
1095 * server.c (captured_main): Pass quiet=false to
1096 save_original_signals_state.
1097
10982018-01-01 Joel Brobecker <brobecker@adacore.com>
1099
1100 * gdbreplay.c (gdbreplay_version): Update copyright year in
1101 version message.
1102 * server.c (gdbserver_version): Likewise.
1103
11042017-12-08 Tom Tromey <tom@tromey.com>
1105
1106 * ax.c (ax_printf): Update.
1107
11082017-12-07 Yao Qi <yao.qi@linaro.org>
1109
1110 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1111 aarch64_linux_read_description.
1112 * linux-amd64-ipa.c (idx2mask): New array.
1113 (get_ipa_tdesc): Move idx2mask out.
1114 (initialize_low_tracepoint): Initialize target descriptions.
1115 * linux-i386-ipa.c (idx2mask): New array.
1116 (get_ipa_tdesc): Move idx2mask out.
1117 (initialize_low_tracepoint): Initialize target descriptions.
1118
11192017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1120
1121 * tdesc.c (struct tdesc_type): Change return type.
1122 (tdesc_add_flag): Change parameter type.
1123 (tdesc_add_bitfield): Likewise.
1124 (tdesc_add_field): Likewise.
1125 (tdesc_set_struct_size): Likewise.
1126
11272017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1128
1129 * regcache.c (registers_to_string): Remove unused variable.
1130
11312017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1132
1133 * inferiors.c (for_each_inferior_with_data): Remove.
1134 * inferiors.h (for_each_inferior_with_data): Remove.
1135 * server.c (handle_qxfer_threads_worker): Change parameter type.
1136 (handle_qxfer_threads_proper): Use for_each_thread.
1137
11382017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1139
1140 * inferiors.c (for_each_inferior): Remove.
1141 (clear_inferiors): Use for_each_thread.
1142 * inferiors.h (for_each_inferior): Remove.
1143 * linux-low.c (linux_wait_for_event_filtered): Use
1144 for_each_thread.
1145 (linux_stabilize_threads): Likewise.
1146 * regcache.c (regcache_release): Likewise.
1147 * server.c (gdb_wants_all_threads_stopped): Likewise.
1148 (clear_pending_status_callback): Remove.
1149 (handle_status): Use for_each_thread.
1150 (captured_main): Likewise.
1151 * win32-low.c (child_init_thread_list): Likewise.
1152 (win32_clear_inferiors): Likewise.
1153 (fake_breakpoint_event): Likewise.
1154
11552017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1156
1157 * inferiors.h (find_inferior): Remove.
1158 * inferiors.c (find_inferior): Remove.
1159
11602017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1161
1162 * linux-low.c (resume_status_pending_p): Update comment.
1163 (need_step_over_p): Update comment.
1164
11652017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1166
1167 * linux-low.c (proceed_one_lwp): Return void, change parameter
1168 type.
1169 (unsuspend_and_proceed_one_lwp): Likewise.
1170 (proceed_all_lwps): Use for_each_thread.
1171 (unstop_all_lwps): Likewise.
1172
11732017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1174
1175 * linux-low.c (linux_resume_one_thread): Return void, take
1176 parameter directly.
1177 (linux_resume): Use for_each_thread.
1178
11792017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1180
1181 * linux-low.c (send_sigstop_callback): Return void, change
1182 parameter type. Rename to...
1183 (send_sigstop): ... this.
1184 (suspend_and_send_sigstop_callback): Return void, change parameter
1185 type. Rename to...
1186 (suspend_and_send_sigstop): ... this.
1187 (stop_all_lwps): Use for_each_thread.
1188
11892017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1190
1191 * linux-low.c (lwp_running): Return bool, remove unused
1192 argument.
1193 (linux_stabilize_threads): Use find_thread.
1194
11952017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1196
1197 * linux-low.c (select_singlestep_lwp_callback): Remove.
1198 (count_events_callback): Remove.
1199 (select_event_lwp_callback): Remove.
1200 (select_event_lwp): Use find_thread/for_each_thread.
1201
12022017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1203
1204 * linux-low.c (not_stopped_callback): Return bool, take filter
1205 argument directly.
1206 (linux_wait_for_event_filtered): Use find_thread.
1207 (linux_wait_1): Likewise.
1208
12092017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1210
1211 * linux-low.c (same_lwp): Remove.
1212 (find_lwp_pid): Use find_thread.
1213
12142017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1215
1216 * linux-low.c (delete_lwp_callback): Remove.
1217 (linux_mourn): Use for_each_thread.
1218
12192017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1220
1221 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1222 args parameter, don't check for pid.
1223 (linux_detach): Use for_each_thread.
1224
12252017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1226
1227 * linux-low.c (struct counter): Remove.
1228 (second_thread_of_pid_p): Remove.
1229 (last_thread_of_process_p): Use find_thread.
1230
12312017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1232
1233 * inferiors.c (find_inferior_in_random): Remove.
1234 * inferiors.h (find_inferior_in_random): Remove.
1235 * linux-low.c (status_pending_p_callback): Return bool, accept
1236 parameter ptid directly.
1237 (linux_wait_for_event_filtered): Use find_thread_in_random.
1238 (linux_wait_1): Likewise.
1239
12402017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1241
1242 * inferiors.c (find_inferior_id): Remove.
1243 (find_thread_ptid): Move implemention from find_inferior_id to
1244 here.
1245 * inferiors.h (find_inferior_id): Remove.
1246 * server.c (handle_status): Use find_thread_ptid.
1247 (process_serial_event): Likewise.
1248 * thread-db.c (find_one_thread): Likewise.
1249 (thread_db_thread_handle): Likewise.
1250 * win32-low.c (thread_rec): Likewise.
1251 (child_delete_thread): Likewise.
1252 (win32_thread_alive): Likewise.
1253 (get_child_debug_event): Likewise.
1254
12552017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1256
1257 * linux-mips-low.c (update_watch_registers_callback): Return
1258 void, remove pid_p parameter, don't check for pid.
1259 (mips_insert_point, mips_remove_point): Use for_each_thread.
1260
12612017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1262
1263 * lynx.low (lynx_delete_thread_callback): Remove.
1264 (lynx_mourn): Use for_each_thread.
1265
12662017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1267
1268 * regcache.c (regcache_invalidate_one): Remove.
1269 (regcache_invalidate_pid): use for_each_thread.
1270
12712017-11-26 Tom Tromey <tom@tromey.com>
1272
1273 * linux-low.c (linux_create_inferior): Update.
1274
12752017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1276
1277 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1278
12792017-11-24 Alan Hayward <alan.hayward@arm.com>
1280
1281 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1282 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1283 * linux-aarch64-tdesc-selftest.c: New file.
1284 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1285
12862017-11-24 Alan Hayward <alan.hayward@arm.com>
1287
1288 * configure.srv: Add new file.
1289 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1290 * linux-aarch64-tdesc-selftest.c: New file.
1291 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1292
12932017-11-24 Alan Hayward <alan.hayward@arm.com>
1294
1295 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1296 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1297 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1298
12992017-11-24 Alan Hayward <alan.hayward@arm.com>
1300
1301 * configure.srv: Add new files.
1302 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1303 aarch64_linux_read_description.
1304 * linux-aarch64-low.c (aarch64_linux_read_description):
1305 Merge with aarch64_arch_setup.
1306 (aarch64_arch_setup): Call aarch64_linux_read_description.
1307 * linux-aarch64-tdesc.c: New file.
1308 * linux-aarch64-tdesc.h: New file.
1309
13102017-11-24 Yao Qi <yao.qi@linaro.org>
1311
1312 * configure.srv: Set $srv_regobj for tic6x-linux.
1313 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1314 (tic6x_read_description): Move some code to tic6x_arch_setup.
1315 (tic6x_tdesc_test): New function.
1316 (initialize_low_arch): Call selftests::register_test.
1317
13182017-11-22 Yao Qi <yao.qi@linaro.org>
1319
1320 * remote-utils.c (prepare_resume_reply): Use memcpy.
1321
13222017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1323
1324 * linux-low.c (kill_one_lwp_callback): Return void, take
1325 argument directly, don't filter on pid.
1326 (linux_kill): Use for_each_thread.
1327
13282017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1329
1330 * linux-low.c (need_step_over_p): Return bool, remove dummy
1331 argument.
1332 (linux_resume, proceed_all_lwps): Use find_thread.
1333
13342017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1335
1336 * linux-low.c (resume_status_pending_p): Return bool, remove
1337 flag_p argument.
1338 (linux_resume): Use find_thread.
1339
13402017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1341
1342 * linux-low.c (struct thread_resume_array): Remove.
1343 (linux_set_resume_request): Return void, take arguments
1344 directly.
1345 (linux_resume): Use for_each_thread.
1346
13472017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1348
1349 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1350 return bool, remove data argument.
1351 (linux_stabilize_threads): Use find_thread.
1352
13532017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1354
1355 * linux-low.c (unsuspend_one_lwp): Remove.
1356 (unsuspend_all_lwps): Use for_each_thread, inline code from
1357 unsuspend_one_lwp.
1358
13592017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1360
1361 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1362 * linux-low.c (struct iterate_over_lwps_args): Remove.
1363 (iterate_over_lwps_filter): Remove.
1364 (iterate_over_lwps): Use find_thread.
1365
13662017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1367
1368 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1369 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1370 code from reset_lwp_ptrace_options_callback.
1371
13722017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1373
1374 * linux-arm-low.c (struct update_registers_data): Remove.
1375 (update_registers_callback): Return void, take arguments
1376 directly, don't check thread's pid.
1377 (arm_insert_point, arm_remove_point): Use for_each_thread.
1378
13792017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1380
1381 * win32-low.c (continue_one_thread): Return void, take argument
1382 directly.
1383 (child_continue): Use for_each_thread.
1384
13852017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1386
1387 * win32-i386-low.c (update_debug_registers_callback): Rename
1388 to ...
1389 (update_debug_registers): ... this, return void, remove pid_p arg.
1390 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1391
13922017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1393
1394 * inferiors.h (struct process_info): Add constructor, initialize
1395 fields..
1396 <syscalls_to_catch>: Change type to std::vector<int>.
1397 * inferiors.c (add_process): Allocate process_info with new.
1398 (remove_process): Free process_info with delete.
1399 * linux-low.c (handle_extended_wait): Adjust.
1400 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1401 * server.c (handle_general_set): Adjust.
1402
14032017-11-16 Pedro Alves <palves@redhat.com>
1404
1405 * remote-utils.c (remote_close): Block SIGIO signals instead of
1406 uninstalling the SIGIO handler.
1407
14082017-11-16 Alan Hayward <alan.hayward@arm.com>
1409
1410 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1411
14122017-11-16 Yao Qi <yao.qi@linaro.org>
1413
1414 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1415 (tic6x_store_gregset): Likewise.
1416 (tic6x_usrregs_info): Move it up.
1417
14182017-11-15 Alan Hayward <alan.hayward@arm.com>
1419
1420 * Makefile.in: Update arch rules.
1421 * configure.srv: Explicitly mark arch/ files.
1422
14232017-11-13 Andreas Schwab <schwab@suse.de>
1424
1425 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1426 function.
1427 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1428
14292017-11-06 Pedro Alves <palves@redhat.com>
1430
1431 * config.in, configure: Regenerate.
1432
14332017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1434
1435 * target.c (struct thread_search): Remove.
1436 (thread_search_callback): Remove.
1437 (prepare_to_access_memory): Use for_each_thread instead of
1438 find_inferior. Inline code from thread_search_callback.
1439
14402017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1441
1442 * server.c (struct visit_actioned_threads_data): Remove.
1443 (visit_actioned_threads): Change prototype to take arguments
1444 directly.
1445 (resume): Use find_thread instead of find_inferior.
1446
14472017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1448
1449 * server.c (queue_stop_reply_callback): Change prototype, return
1450 void.
1451 (find_status_pending_thread_callback): Remove.
1452 (handle_status): Replace find_inferior with find_thread and
1453 for_each_thread.
1454
14552017-10-25 Alan Hayward <alan.hayward@arm.com>
1456
1457 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1458 with REGNO.
1459 (aarch64_store_gregset): Likewise.
1460 (aarch64_fill_fpregset): Likewise.
1461 (aarch64_store_fpregset): Likewise.
1462
14632017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1464
1465 * gdbthread.h (find_thread, for_each_thread): New functions.
1466 * inferiors.c (thread_of_pid): Remove.
1467 (find_any_thread_of_pid): Use find_thread.
1468 * linux-low.c (num_lwps): Use for_each_thread.
1469
14702017-10-17 Yao Qi <yao.qi@linaro.org>
1471
1472 * Makefile.in: Remove one rule.
1473 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1474
14752017-10-17 Yao Qi <yao.qi@linaro.org>
1476
1477 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1478 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1479
14802017-10-17 Yao Qi <yao.qi@linaro.org>
1481
1482 * configure.srv: Rename arm.o with arch/arm.o.
1483
14842017-10-17 Yao Qi <yao.qi@linaro.org>
1485
1486 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1487 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1488 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1489 (arch-i386.o, arch-amd64.o): Remove rules.
1490 (arch/%.o): New rule.
1491 Update POSTCOMPILE and COMPILE.pre.
1492 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1493 * configure: Re-generated.
1494 * configure.srv: Replace arch-i386.o with arch/i386.o.
1495 Replace arch-amd64.o with arch/amd64.o.
1496
14972017-10-16 Yao Qi <yao.qi@linaro.org>
1498
1499 * configure: Regenerated.
1500
15012017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1502
1503 * inferiors.h: (struct inferior_list): Remove.
1504 (struct inferior_list_entry); Remove.
1505 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1506 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1507 get_first_inferior): Remove.
1508 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1509 find_inferior_id, find_inferior_in_random): Change signature.
1510 * inferiors.c (all_threads): Change type to
1511 std::list<thread_info *>.
1512 (get_thread): Remove macro.
1513 (find_inferior, find_inferior_id): Change signature, implement
1514 using find_thread.
1515 (find_inferior_in_random): Change signature, implement using
1516 find_thread_in_random.
1517 (for_each_inferior, for_each_inferior_with_data): Change
1518 signature, implement using for_each_thread.
1519 (add_inferior_to_list, remove_inferior): Remove.
1520 (add_thread, get_first_thread, thread_of_pid,
1521 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1522 (get_first_inferior, one_inferior_p, clear_inferior_list):
1523 Remove.
1524 (clear_inferiors, get_thread_process): Update.
1525 * gdbthread.h: Include <list>.
1526 (struct thread_info) <entry>: Remove field.
1527 <id>: New field.
1528 (all_threads): Change type to std::list<thread_info *>.
1529 (get_first_inferior): Add doc.
1530 (find_thread, for_each_thread, find_thread_in_random): New
1531 functions.
1532 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1533 * linux-arm-low.c (update_registers_callback): Update.
1534 * linux-low.c (second_thread_of_pid_p): Update.
1535 (kill_one_lwp_callback, linux_detach_lwp_callback,
1536 delete_lwp_callback, status_pending_p_callback, same_lwp,
1537 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1538 iterate_over_lwps, not_stopped_callback,
1539 resume_stopped_resumed_lwps, count_events_callback,
1540 select_singlestep_lwp_callback, select_event_lwp_callback,
1541 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1542 suspend_and_send_sigstop_callback, wait_for_sigstop,
1543 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1544 lwp_running, linux_set_resume_request, resume_status_pending_p,
1545 need_step_over_p, start_step_over, linux_resume_one_thread,
1546 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1547 reset_lwp_ptrace_options_callback): Update.
1548 * linux-mips-low.c (update_watch_registers_callback): Update.
1549 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1550 Update.
1551 (free_register_cache_thread_one): Remove.
1552 (regcache_release): Update.
1553 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1554 handle_qxfer_threads_worker): Update.
1555 (handle_query): Update, use list iterator.
1556 (visit_actioned_threads, handle_pending_status,
1557 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1558 clear_pending_status_callback, set_pending_status_callback,
1559 find_status_pending_thread_callback, handle_status,
1560 process_serial_event): Update.
1561 * target.c (thread_search_callback): Update.
1562 * thread-db.c (thread_db_get_tls_address): Update.
1563 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1564 Update.
1565 * win32-i386-low.c (update_debug_registers_callback): Update.
1566 * win32-low.c (delete_thread_info, child_delete_thread,
1567 continue_one_thread, suspend_one_thread,
1568 get_child_debug_event): Adjust.
1569
15702017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1571
1572 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1573 * inferiors.h: Include <list>.
1574 (struct process_info) <entry>: Remove field.
1575 <pid>: New field.
1576 (pid_of): Change macro to function.
1577 (ptid_of, lwpid_of): Remove macro.
1578 (all_processes): Change type to std::list<process_info *>.
1579 (ALL_PROCESSES): Remove macro.
1580 (for_each_process, find_process): New function.
1581 * inferiors.c (all_processes): Change type to
1582 std::list<process_info *>.
1583 (find_thread_process): Adjust.
1584 (add_process): Likewise.
1585 (remove_process): Likewise.
1586 (find_process_pid): Likewise.
1587 (get_first_process): Likewise.
1588 (started_inferior_callback): Remove.
1589 (have_started_inferiors_p): Adjust.
1590 (attached_inferior_callback): Remove.
1591 (have_attached_inferiors_p): Adjust.
1592 * linux-low.c (check_zombie_leaders): Likewise.
1593 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1594 (x86_linux_update_xmltarget): Adjust.
1595 * server.c (handle_query): Likewise.
1596 (gdb_reattached_process): Remove.
1597 (handle_status): Adjust.
1598 (kill_inferior_callback): Likewise.
1599 (detach_or_kill_inferior): Remove.
1600 (print_started_pid): Likewise.
1601 (print_attached_pid): Likewise.
1602 (detach_or_kill_for_exit): Update.
1603 (process_serial_event): Likewise.
1604 * linux-arm-low.c (arm_new_fork): Likewise.
1605
16062017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1607
1608 * dll.h: Include <list>.
1609 (struct dll_info): Add constructor.
1610 <entry>: Remove field.
1611 (all_dlls): Change type to std::list<dll_info>.
1612 * dll.c: Include <algorithm>.
1613 (get_dll): Remove macro.
1614 (all_dlls): Change type to std::list<dll_info *>.
1615 (free_one_dll): Remove.
1616 (match_dll): Likewise.
1617 (loaded_dll): Adjust.
1618 (unloaded_dll): Adjust to all_dlls type change, use
1619 std::find_if. Inline code from match_dll.
1620 (clear_dlls): Adjust to all_dlls type change.
1621 * server.c (emit_dll_description): Remove.
1622 (handle_qxfer_libraries): Adjust to all_dlls type change,
1623 integrate emit_dll_description's functionality.
1624
16252017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1626
1627 * linux-low.h (struct linux_target_ops) <delete_process>: New
1628 field.
1629 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1630 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1631 (struct linux_target_ops): Add delete_process callback.
1632 * linux-arm-low.c (arm_delete_process): New.
1633 (struct linux_target_ops): Add delete_process callback.
1634 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1635 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1636 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1637 * linux-mips-low.c (mips_linux_delete_process): New.
1638 (struct linux_target_ops): Add delete_process callback.
1639 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1640 * linux-s390-low.c (struct linux_target_ops): Likewise.
1641 * linux-sh-low.c (struct linux_target_ops): Likewise.
1642 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1643 * linux-tile-low.c (struct linux_target_ops): Likewise.
1644 * linux-x86-low.c (x86_linux_delete_process): New.
1645 (struct linux_target_ops): Add delete_process callback.
1646 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1647
16482017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1649
1650 * linux-aarch64-low.c (the_low_target): Add thread delete
1651 callback.
1652 * linux-arm-low.c (arm_delete_thread): New function.
1653 (the_low_target): Add thread delete callback.
1654 * linux-bfin-low.c (the_low_target): Likewise.
1655 * linux-crisv32-low.c (the_low_target): Likewise.
1656 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1657 set.
1658 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1659 field.
1660 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1661 * linux-mips-low.c (mips_linux_delete_thread): New function.
1662 (the_low_target): Add thread delete callback.
1663 * linux-ppc-low.c (the_low_target): Likewise.
1664 * linux-s390-low.c (the_low_target): Likewise.
1665 * linux-sh-low.c (the_low_target): Likewise.
1666 * linux-tic6x-low.c (the_low_target): Likewise.
1667 * linux-tile-low.c (the_low_target): Likewise.
1668 * linux-x86-low.c (the_low_target): Likewise.
1669 * linux-xtensa-low.c (the_low_target): Likewise.
1670
16712017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1672
1673 * win32-low.c: Include "common-inferior.h".
1674
16752017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1676
1677 * inferiors.c (set_inferior_cwd): New function.
1678 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1679 (handle_query): Inform that QSetWorkingDir is supported.
1680 * win32-low.c (create_process): Pass the inferior's cwd to
1681 CreateProcess.
1682
16832017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1684
1685 * inferiors.c (current_inferior_cwd): New global variable.
1686 (get_inferior_cwd): New function.
1687 * inferiors.h (struct process_info) <cwd>: New field.
1688
16892017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1690
1691 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1692 (OBS): Add gdb_tilde_expand.o.
1693
16942017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1695
1696 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1697 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1698
16992017-09-29 Pedro Alves <palves@redhat.com>
1700
1701 * ax.c (gdb_parse_agent_expr): Constify.
1702 * ax.h (gdb_parse_agent_expr): Constify.
1703 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1704 Constify.
1705 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1706 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1707 * remote-utils.h (read_ptid): Constify.
1708 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1709 (process_point_options, process_serial_event): Constify.
1710 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1711 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1712 (cmd_qtbuffer): Constify.
1713
17142017-09-29 Pedro Alves <palves@redhat.com>
1715
1716 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1717 fails.
1718
17192017-09-29 Pedro Alves <palves@redhat.com>
1720
1721 * linux-low.c (handle_extended_wait): Pass parent thread instead
1722 of process to thread_db_notice_clone.
1723 * linux-low.h (thread_db_notice_clone): Replace parent process
1724 parameter with parent thread parameter.
1725 * thread-db.c (find_one_thread): Add comment.
1726 (thread_db_notice_clone): Replace parent process parameter with
1727 parent thread parameter. Temporarily switch to the parent thread.
1728
17292017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1730
1731 * gdbthread.h: Include "common-gdbthread.h".
1732 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1733 "if" when validating the ptid.
1734 * remote-utils.c: Include "gdbthread.h".
1735 (prepare_resume_reply): Use "switch_to_thread".
1736 * target.c (done_accessing_memory): Likewise.
1737
17382017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1739
1740 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1741 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1742 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1743 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1744 s390x-gs-linux64-ipa.o to ipa_obj.
1745 * linux-s390-low.c (HWCAP_S390_GS): New define.
1746 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1747 New functions.
1748 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1749 (s390_arch_setup): Check for guarded-storage support and choose
1750 appropriate tdesc.
1751 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1752 init_registers_s390x_gs_linux64.
1753 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1754 enum value.
1755 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1756 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1757
17582017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1759
1760 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1761
17622017-09-21 Kevin Buettner <kevinb@redhat.com>
1763
1764 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1765 (thread_db_thread_handle): Declare.
1766 * linux-low.c (linux_target_ops): Initialize thread_handle.
1767 * server.c (handle_qxfer_threads_worker): Add support for
1768 "handle" attribute.
1769 * target.h (struct target_ops): Add new function pointer,
1770 thread_handle.
1771 (target_thread_handle): Define.
1772 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1773 field in lwp.
1774 (thread_db_thread_handle): New function.
1775
17762017-09-21 Kevin Buettner <kevinb@redhat.com>
1777
1778 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1779 * linux-low.h (thread_db_notice_clone): Declare.
1780 * thread-db.c (thread_db_notice_clone): New function.
1781
17822017-09-21 Pedro Alves <palves@redhat.com>
1783
1784 * server.c (gdb_read_memory, handle_status, process_serial_event)
1785 (handle_serial_event, handle_target_event): Adjust to
1786 set_desired_thread prototype change.
1787 * target.c (set_desired_thread): Remove 'use_general' parameter
1788 and adjust.
1789 * target.h (set_desired_thread): Remove 'use_general' parameter.
1790
17912017-09-20 Tom Tromey <tom@tromey.com>
1792
1793 * target.c (target_terminal::terminal_state): Define.
1794 (target_terminal::init): Rename from target_terminal_init.
1795 (target_terminal::inferior): Rename from
1796 target_terminal_inferior.
1797 (target_terminal::ours): Rename from target_terminal_ours.
1798 (target_terminal::ours_for_output, target_terminal::info): New.
1799
18002017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1801
1802 * server.c (accumulate_file_name_length): Remove.
1803 (emit_dll_description): Adjust to std::string change.
1804 (handle_qxfer_libraries): Use std::string to hold document.
1805
18062017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1807
1808 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1809 return type of xml_escape_text.
1810 * server.c (emit_dll_description): Likewise.
1811
18122017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1813
1814 * server.c (captured_main): Accept argument for --selftest.
1815 Update run_tests call.
1816 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1817 when registering selftests.
1818
18192017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1820
1821 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1822 instead of "VEC" for "target_desc.reg_defs".
1823 (regcache_cpy): Likewise.
1824 (registers_to_string): Likewise.
1825 (registers_from_string): Likewise.
1826 (find_regno): Likewise.
1827 (supply_regblock): Likewise.
1828 (regcache_raw_read_unsigned): Likewise.
1829 * tdesc.c (init_target_desc): Likewise.
1830 (tdesc_create_reg): Likewise.
1831 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1832 (struct target_desc) <reg_defs>: Convert to "std::vector".
1833 (target_desc): Do not initialize "reg_defs".
1834 (~target_desc): Update code to use "std::vector" instead of "VEC"
1835 for "target_desc.reg_defs".
1836 (operator==): Likewise.
1837
18382017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1839
1840 * inferiors.h (thread_to_gdb_id): Remove.
1841 * inferiors.c (thread_to_gdb_id): Remove.
1842 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1843 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1844 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1845 Likewise.
1846 * nto-low.c (nto_fetch_registers, nto_store_registers,
1847 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1848
18492017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1850
1851 * inferiors.h (gdb_id_to_thread_id): Remove.
1852 * inferiors.c (gdb_id_to_thread_id): Remove.
1853 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1854 removal. Move pid declaration closer to where it's used.
1855
18562017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1857
1858 * server.c (handle_detach): New function.
1859 (process_serial_event): Move code out, call handle_detach.
1860
18612017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1862
1863 * server.c (require_running): Rename to ...
1864 (require_running_or_return): ... this ...
1865 (require_running_or_break): ... and this.
1866 (handle_query, process_serial_event): Adjust.
1867
18682017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1869
1870 * linux-low.c (linux_set_resume_request): Remove unused
1871 variables.
1872
18732017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1874
1875 * server.c (first_thread_of): Remove.
1876 (process_serial_event): Replace usage of first_thread_of with
1877 find_any_thread_of_pid.
1878 * tracepoint.c (same_process_p): Remove.
1879 (gdb_agent_about_to_close): Replace usage of same_process_p with
1880 find_any_thread_of_pid.
1881 * linux-x86-low.c (same_process_callback): Remove.
1882 (x86_arch_setup_process_callback): Replace usage of
1883 same_process_callback with find_any_thread_of_pid.
1884 * thread-db.c (any_thread_of): Remove.
1885 (switch_to_process): Replace usage of any_thread_of with
1886 find_any_thread_of_pid.
1887 * inferiors.c (thread_pid_matches_callback): Remove.
1888 (find_thread_process): Adjust to use find_any_thread_of_pid.
1889
18902017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1891
1892 * regcache.c (get_thread_regcache): Guard calls to "memset"
1893 with "!VEC_empty".
1894
18952017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1896
1897 * linux-low.c (handle_extended_wait): Use
1898 "allocate_target_description" instead of "XNEW".
1899 * linux-x86-low.c (initialize_low_arch): Likewise.
1900
19012017-09-05 Yao Qi <yao.qi@linaro.org>
1902
1903 * configure.srv (srv_i386_regobj): Remove.
1904 (srv_amd64_regobj): Remove.
1905 (srv_regobj): Set it to "" for x86 non-linux targets.
1906 * linux-x86-tdesc.c (i386_linux_read_description):
1907 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1908 (init_registers_i386): Remove the declaration.
1909 (tdesc_i386): Remove the declaration.
1910 (lynx_i386_arch_setup): Call i386_create_target_description.
1911 * nto-x86-low.c: Likewise.
1912 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1913 [!__x86_64__]: include arch/i386.h.
1914 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1915
19162017-09-05 Yao Qi <yao.qi@linaro.org>
1917
1918 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1919 i386/amd64-XXX-linux from it.
1920
19212017-09-05 Yao Qi <yao.qi@linaro.org>
1922
1923 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1924 false.
1925 (ipa_amd64_linux_regobj): Remove.
1926 (ipa_x32_linux_regobj): Remove.
1927
19282017-09-05 Yao Qi <yao.qi@linaro.org>
1929
1930 * Makefile.in (arch-amd64.o): New rule.
1931 * configure.srv: Append arch-amd64.o.
1932 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1933 (get_ipa_tdesc): Call amd64_linux_read_description.
1934 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1935 and init_registers_amd64_XXX.
1936 * linux-x86-low.c (x86_linux_read_description): Call
1937 amd64_linux_read_description.
1938 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1939 (initialize_low_arch): Don't call init_registers_x32_XXX and
1940 init_registers_amd64_XXX.
1941 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1942 and tdesc_amd64_XXX.
1943 [__x86_64__] (amd64_tdesc_test): New function.
1944 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1945 and init_registers_amd64_XXX.
1946 * linux-x86-tdesc.c: Include arch/amd64.h.
1947 (xcr0_to_tdesc_idx): New function.
1948 (i386_linux_read_description): New function.
1949 (amd64_get_ipa_tdesc_idx): New function.
1950 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1951 (amd64_get_ipa_tdesc): Declare.
1952
19532017-09-05 Yao Qi <yao.qi@linaro.org>
1954
1955 * configure.srv (srv_i386_linux_xmlfiles): Remove
1956 i386/i386-XXX-linux.xml from it.
1957
19582017-09-05 Yao Qi <yao.qi@linaro.org>
1959
1960 * configure.srv: Set srv_i386_linux_regobj empty if $development
1961 is false.
1962 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1963 initialize_low_tdesc.
1964 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1965 with #if initialize_low_tdesc.
1966 * linux-x86-tdesc-selftest.c: New file.
1967 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1968
19692017-09-05 Yao Qi <yao.qi@linaro.org>
1970
1971 * Makefile.in (arch-i386.o): New rule.
1972 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1973 (x86_64-*-linux*): Likewise.
1974 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1975 include arch/i386.h.
1976 (i386_linux_read_description): Remove code and call
1977 i386_create_target_description.
1978 * tdesc.c (allocate_target_description): New function.
1979 * tdesc.h (set_tdesc_architecture): Remove declaration.
1980 (set_tdesc_osabi): Likewise.
1981
19822017-09-05 Yao Qi <yao.qi@linaro.org>
1983
1984 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1985 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1986 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1987 .xmltarget.
1988 * server.c (get_features_xml): Call tdesc_get_features_xml.
1989 * tdesc.c (set_tdesc_architecture): New function.
1990 (set_tdesc_osabi): New function.
1991 (tdesc_get_features_xml): New function.
1992 (tdesc_create_feature): Add an argument.
1993 * tdesc.h (struct target_desc) <features>: New field.
1994 <arch, osabi>: New field.
1995 (~target_desc): xfree features, arch, and osabi.
1996 (target_desc::oerator==): Don't compare .xmltarget.
1997 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1998 (set_tdesc_osabi): Likewise.
1999 (tdesc_get_features_xml): Likewise.
2000
20012017-09-05 Yao Qi <yao.qi@linaro.org>
2002
2003 * linux-x86-tdesc.c: Include selftest.h.
2004 (i386_tdesc_test): New function.
2005 (initialize_low_tdesc): Call selftests::register_test.
2006 * tdesc.h: Include regdef.h.
2007 (target_desc): Override operator == and !=.
2008
20092017-09-05 Yao Qi <yao.qi@linaro.org>
2010
2011 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
2012 (ipa_obj): Likewise.
2013 * linux-i386-ipa.c: Include common/x86-xstate.h
2014 (get_ipa_tdesc): Call i386_linux_read_description.
2015 (initialize_low_tracepoint): Don't call init_registers_XXX
2016 functions, call initialize_low_tdesc instead.
2017 * linux-x86-low.c (x86_linux_read_description): Call
2018 i386_linux_read_description.
2019 (initialize_low_arch): Don't call init_registers_i386_XXX
2020 functions, call initialize_low_tdesc.
2021 * linux-x86-tdesc.c: New file.
2022 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
2023 (i386_get_ipa_tdesc_idx): Declare.
2024 (i386_get_ipa_tdesc): Declare.
2025 (initialize_low_tdesc): Declare.
2026
20272017-09-05 Yao Qi <yao.qi@linaro.org>
2028
2029 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
2030 instead of 0.
2031
20322017-09-05 Yao Qi <yao.qi@linaro.org>
2033
2034 * Makefile.in (IPA_OBJS): Add vec-ipa.o
2035 * regcache.c (get_thread_regcache): Use VEC_length.
2036 (init_register_cache): Likewise.
2037 (regcache_cpy): Likewise.
2038 (registers_to_string): Iterate reg_defs via VEC_iterate.
2039 (find_regno): Likewise.
2040 (find_register_by_number): Use VEC_index.
2041 (register_size): Call find_register_by_number.
2042 (register_data): Call find_register_by_number.
2043 (supply_regblock): Use VEC_length.
2044 (regcache_raw_read_unsigned): Likewise.
2045 * tdesc.c (init_target_desc): Iterate reg_defs via
2046 VEC_iterate.
2047 (default_description): Update initializer.
2048 (copy_target_description): Don't update field num_registers.
2049 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
2050 <num_registers>: Remove.
2051
20522017-09-04 Simon Marchi <simon.marchi@ericsson.com>
2053
2054 * Makefile.in (.SECONDARY): Define target.
2055
20562017-09-03 Simon Marchi <simon.marchi@ericsson.com>
2057
2058 * linux-low.c (linux_wait_1): Adjust.
2059 * server.c (queue_stop_reply_callback): Adjust.
2060
20612017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
2062
2063 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
2064 QEnvironmentUnset and QEnvironmentReset packets.
2065 (handle_query): Inform remote that QEnvironmentHexEncoded,
2066 QEnvironmentUnset and QEnvironmentReset are supported.
2067
20682017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2069
2070 * inferiors.h (inferior_target_data): Rename to ...
2071 (thread_target_data): ... this.
2072 (inferior_regcache_data): Rename to ...
2073 (thread_regcache_data): ... this.
2074 (set_inferior_regcache_data): Rename to ...
2075 (set_thread_regcache_data): ... this.
2076 * inferiors.c (inferior_target_data): Rename to ...
2077 (thread_target_data): ... this.
2078 (inferior_regcache_data): Rename to ...
2079 (thread_regcache_data): ... this.
2080 (set_inferior_regcache_data): Rename to ...
2081 (set_thread_regcache_data): ... this.
2082 (free_one_thread): Update.
2083 * linux-low.h (get_thread_lwp): Update.
2084 * regcache.c (get_thread_regcache): Update.
2085 (regcache_invalidate_thread): Update.
2086 (free_register_cache_thread): Update.
2087 * win32-i386-low.c (update_debug_registers_callback): Update.
2088 (win32_get_current_dr): Update.
2089 * win32-low.c (thread_rec): Update.
2090 (delete_thread_info): Update.
2091 (continue_one_thread): Update.
2092 (suspend_one_thread): Update.
2093
20942017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2095
2096 * inferiors.c (set_inferior_target_data): Remove.
2097 * inferiors.h (set_inferior_target_data): Remove.
2098
20992017-08-18 Yao Qi <yao.qi@linaro.org>
2100
2101 * Makefile.in (OBS): Add selftest.o.
2102 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2103 * configure, config.in: Re-generated.
2104 * server.c: Include common/sefltest.h.
2105 (captured_main): Handle option --selftest.
2106
21072017-08-09 Yao Qi <yao.qi@linaro.org>
2108
2109 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2110 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2111 i386-avx-mpx.o and i386-mmx.o.
2112 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2113 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2114 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2115 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2116 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2117 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2118 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2119 i386/amd64-avx-mpx.xml.
2120
21212017-08-09 Yao Qi <yao.qi@linaro.org>
2122
2123 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2124 and x32-avx-avx512.o.
2125 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2126 i386/x32-avx-avx512.xml.
2127
21282017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2129
2130 * tracepoint.h (enum class fast_tpoint_collect_result): New
2131 enumeration.
2132 (fast_tracepoint_collecting): Change return type to
2133 fast_tpoint_collect_result.
2134 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2135 * linux-low.h: Include tracepoint.h.
2136 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2137 fast_tpoint_collect_result.
2138 * linux-low.c (handle_tracepoints): Adjust.
2139 (linux_fast_tracepoint_collecting): Change return type to
2140 fast_tpoint_collect_result.
2141 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2142 linux_wait_1, stuck_in_jump_pad_callback,
2143 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2144 proceed_one_lwp): Adjust to type change.
2145
21462017-07-10 Yao Qi <yao.qi@linaro.org>
2147
2148 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2149
21502017-06-29 Yao Qi <yao.qi@linaro.org>
2151
2152 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2153 Remove.
2154 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2155
21562017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2157
2158 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2159
21602017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2161
2162 * linux-low.c (linux_create_inferior): Adjust code to access the
2163 environment information via 'gdb_environ' class.
2164 * lynx-low.c (lynx_create_inferior): Likewise.
2165 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2166 (get_environ): Return a pointer to 'our_environ'.
2167 (captured_main): Initialize 'our_environ'.
2168 * server.h (get_environ): Adjust prototype.
2169 * spu-low.c (spu_create_inferior): Adjust code to access the
2170 environment information via 'gdb_environ' class.
2171
21722017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2173
2174 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2175 usage of "register" keyword.
2176
21772017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2178
2179 * configure: Re-generate.
2180
21812017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2182
2183 * configure: Re-generate.
2184
21852017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2186
2187 * Makefile.in (COMPILE.pre): Add "-x c++".
2188
21892017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2190
2191 * fork-child.c: Conditionally include <signal.h>.
2192
21932017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2194
2195 * server.c (handle_general_set): Handle new packet
2196 "QStartupWithShell".
2197 (handle_query): Add "QStartupWithShell" to the list of supported
2198 packets.
2199 (gdbserver_usage): Add help text explaining the
2200 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2201 options.
2202 (captured_main): Recognize and act upon the presence of the new
2203 CLI options.
2204
22052017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2206 Pedro Alves <palves@redhat.com>
2207
2208 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2209 * configure: Regenerate.
2210 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2211 "fork-inferior.o".
2212 (i[34567]86-*-lynxos*): Likewise.
2213 (spu*-*-*): Likewise.
2214 * fork-child.c: New file.
2215 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2216 and "environ.h".
2217 (linux_ptrace_fun): New function.
2218 (linux_create_inferior): Adjust function prototype to reflect
2219 change on "target.h". Adjust function code to use
2220 "fork_inferior".
2221 (linux_request_interrupt): Delete "signal_pid".
2222 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2223 (lynx_ptrace_fun): New function.
2224 (lynx_create_inferior): Adjust function prototype to reflect
2225 change on "target.h". Adjust function code to use
2226 "fork_inferior".
2227 * nto-low.c (nto_create_inferior): Adjust function prototype and
2228 code to reflect change on "target.h". Update comments.
2229 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2230 "common-terminal.h" and "environ.h".
2231 (terminal_fd): Moved to fork-child.c.
2232 (old_foreground_pgrp): Likewise.
2233 (restore_old_foreground_pgrp): Likewise.
2234 (last_status): Make it global.
2235 (last_ptid): Likewise.
2236 (our_environ): New variable.
2237 (startup_with_shell): Likewise.
2238 (program_name): Likewise.
2239 (program_argv): Rename to...
2240 (program_args): ...this.
2241 (wrapper_argv): New variable.
2242 (start_inferior): Delete function.
2243 (get_exec_wrapper): New function.
2244 (get_exec_file): Likewise.
2245 (get_environ): Likewise.
2246 (prefork_hook): Likewise.
2247 (post_fork_inferior): Likewise.
2248 (postfork_hook): Likewise.
2249 (postfork_child_hook): Likewise.
2250 (handle_v_run): Update code to deal with arguments coming from the
2251 remote host. Update calls from "start_inferior" to
2252 "create_inferior".
2253 (captured_main): Likewise. Initialize environment variable. Call
2254 "have_job_control".
2255 * server.h (post_fork_inferior): New prototype.
2256 (get_environ): Likewise.
2257 (last_status): Declare.
2258 (last_ptid): Likewise.
2259 (signal_pid): Likewise.
2260 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2261 (spu_ptrace_fun): New function.
2262 (spu_create_inferior): Adjust function prototype to reflect change
2263 on "target.h". Adjust function code to use "fork_inferior".
2264 * target.c (target_terminal_init): New function.
2265 (target_terminal_inferior): Likewise.
2266 (target_terminal_ours): Likewise.
2267 * target.h: Include <vector>.
2268 (struct target_ops) <create_inferior>: Update prototype.
2269 (create_inferior): Update macro.
2270 * utils.c (gdb_flush_out_err): New function.
2271 * win32-low.c (win32_create_inferior): Adjust function prototype
2272 and code to reflect change on "target.h".
2273
22742017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2275
2276 * inferiors.c (switch_to_thread): New function.
2277
22782017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2279
2280 * Makefile.in (SFILE): Add "common/job-control.c".
2281 (OBS): Add "job-control.o".
2282
22832017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2284
2285 * Makefile: Remove "@host_makefile_frag@".
2286
22872017-05-05 Pedro Alves <palves@redhat.com>
2288
2289 * configure: Regenerate.
2290
22912017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2292
2293 * configure: Regenerate.
2294
22952017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2296
2297 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2298 software_single_step change of return type to
2299 std::vector<CORE_ADDR>.
2300 * linux-low.c (install_software_single_step_breakpoints):
2301 Likewise.
2302 * linux-low.h (install_software_single_step_breakpoints):
2303 Likewise.
2304
23052017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2306
2307 * remote-utils.c: Include "gdb_termios.h" instead of
2308 "terminal.h".
2309 * terminal.h: Delete file.
2310
23112017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2312
2313 * server.c: Include <vector>.
2314 <program_argv, wrapper_argv>: Convert to std::vector.
2315 (start_inferior): Rewrite function to use C++.
2316 (handle_v_run): Likewise. Update code that calculates the argv
2317 based on the vRun packet; use C++.
2318 (captured_main): Likewise.
2319
23202017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2321
2322 * server.c (handle_v_cont): Initialize thread_resume::thread
2323 with null_ptid.
2324
23252017-04-05 Pedro Alves <palves@redhat.com>
2326
2327 * configure: Regenerate.
2328
23292017-04-05 Pedro Alves <palves@redhat.com>
2330
2331 * gdbreplay.c (sync_error): Constify.
2332 * linux-x86-low.c (push_opcode): Constify.
2333
23342017-04-05 Pedro Alves <palves@redhat.com>
2335
2336 * win32-low.c (get_child_debug_event)
2337 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2338 Report TARGET_WAITKIND_SPURIOUS instead.
2339
23402017-04-05 Pedro Alves <palves@redhat.com>
2341
2342 * remote-utils.c (remote_prepare, remote_open): Constify.
2343 * remote-utils.h (remote_prepare, remote_open): Constify.
2344 * server.c (captured_main): Constify 'port' handling.
2345
23462017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2347
2348 * Makefile.in (clean): Clear .deps.
2349
23502017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2351
2352 * .gitignore: Remove generated files, replace with wildcard.
2353 * (clean): Replace removal of generated files with wildcard.
2354 (version.c): Replace with...
2355 (version-generated.c): ...this.
2356 (xml-builtin.c): Replace with...
2357 (xml-builtin-generated.c): ...this.
2358 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2359 (%.c: *regformats*): Replace with...
2360 (%-generated.c: *regformats*): ...this.
2361
23622017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2363
2364 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2365 (xtensa_fill_gregset): Call collect_register_by_name for
2366 threadptr register.
2367 (xtensa_store_gregset): Call supply_register_by_name for
2368 threadptr register.
2369
23702017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2371
2372 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2373 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2374 (xtensa_store_gregset): Call supply_register for all registers in
2375 a0_regnum..a0_regnum + C0_NREGS range.
2376
23772017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2378
2379 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2380 (ax-ipa.o: ax.c): Remove.
2381 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2382 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2383 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2384 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2385 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2386
23872017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2388
2389 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2390 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2391 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2392 (errors-ipa.o: ../common/errors.c): Remove.
2393 (format-ipa.o: ../common/format.c): Remove.
2394 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2395
23962017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2397
2398 * Makefile.in (%-ipa.o: %.c): New rule.
2399 (tracepoint-ipa.o: tracepoint.c): Remove.
2400 (utils-ipa.o: utils.c): Remove.
2401 (remote-utils-ipa.o: remote-utils.c): Remove.
2402 (regcache-ipa.o: regcache.c): Remove.
2403 (i386-linux-ipa.o: i386-linux.c): Remove.
2404 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2405 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2406 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2407 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2408 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2409 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2410 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2411 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2412 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2413 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2414 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2415 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2416 (aarch64-ipa.o: aarch64.c): Remove.
2417 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2418 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2419 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2420 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2421 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2422 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2423 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2424 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2425 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2426 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2427 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2428 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2429 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2430 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2431 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2432 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2433 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2434 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2435 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2436 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2437 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2438 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2439 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2440 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2441 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2442 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2443 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2444 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2445 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2446 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2447 (tdesc-ipa.o: tdesc.c): Remove.
2448 (x32-linux-ipa.o: x32-linux.c): Remove.
2449 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2450 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2451
24522017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2453
2454 * Makefile.in (%.o: ../arch/%.c): New rule.
2455 (arm.o: ../arch/arm.c): Remove.
2456 (arm-linux.o: ../arch/arm-linux.c): Remove.
2457 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2458 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2459
24602017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2461
2462 * Makefile.in (%.o: ../nat/%.c): New rule.
2463 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2464 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2465 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2466 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2467 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2468 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2469 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2470 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2471 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2472 (linux-personality.o: ../nat/linux-personality.c): Remove.
2473 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2474 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2475 (x86-linux.o: ../nat/x86-linux.c): Remove.
2476 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2477 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2478
24792017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2480
2481 * Makefile.in (%.o: ../common/%.c): New rule.
2482 (signals.o: ../common/signals.c): Remove.
2483 (print-utils.o: ../common/print-utils.c): Remove.
2484 (rsp-low.o: ../common/rsp-low.c): Remove.
2485 (common-utils.o: ../common/common-utils.c): Remove.
2486 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2487 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2488 (vec.o: ../common/vec.c): Remove.
2489 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2490 (xml-utils.o: ../common/xml-utils.c): Remove.
2491 (ptid.o: ../common/ptid.c): Remove.
2492 (buffer.o: ../common/buffer.c): Remove.
2493 (format.o: ../common/format.c): Remove.
2494 (filestuff.o: ../common/filestuff.c): Remove.
2495 (agent.o: ../common/agent.c): Remove.
2496 (errors.o: ../common/errors.c): Remove.
2497 (environ.o: ../common/environ.c): Remove.
2498 (common-debug.o: ../common/common-debug.c): Remove.
2499 (cleanups.o: ../common/cleanups.c): Remove.
2500 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2501 (fileio.o: ../common/fileio.c): Remove.
2502 (common-regcache.o: ../common/common-regcache.c): Remove.
2503 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2504 (new-op.o: ../common/new-op.c): Remove.
2505 (btrace-common.o: ../common/btrace-common.c): Remove.
2506
25072017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2508
2509 * Makefile.in (%.o: ../target/%.c): New rule.
2510 (waitstatus.o: ../target/waitstatus.c): Remove.
2511
25122017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2513
2514 * Makefile.in
2515 (%.c: ../regformats/%.dat,
2516 (%.c: ../regformats/arm/%.dat,
2517 (%.c: ../regformats/i386/%.dat,
2518 (%.c: ../regformats/rs6000/%.dat): New rules.
2519 (aarch64.c): Remove.
2520 (reg-arm.c): Remove.
2521 (arm-with-iwmmxt.c): Remove.
2522 (arm-with-vfpv2.c): Remove.
2523 (arm-with-vfpv3.c): Remove.
2524 (arm-with-neon.c): Remove.
2525 (reg-bfin.c): Remove.
2526 (reg-cris.c): Remove.
2527 (reg-crisv32.c): Remove.
2528 (i386.c): Remove.
2529 (i386-linux.c): Remove.
2530 (i386-avx.c): Remove.
2531 (i386-avx-linux.c): Remove.
2532 (i386-avx-avx512.c): Remove.
2533 (i386-avx-avx512-linux.c): Remove.
2534 (i386-mpx.c): Remove.
2535 (i386-mpx-linux.c): Remove.
2536 (i386-avx-mpx-avx512-pku.c): Remove.
2537 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2538 (i386-avx-mpx.c): Remove.
2539 (i386-avx-mpx-linux.c): Remove.
2540 (i386-mmx.c): Remove.
2541 (i386-mmx-linux.c): Remove.
2542 (reg-ia64.c): Remove.
2543 (reg-m32r.c): Remove.
2544 (reg-m68k.c): Remove.
2545 (reg-cf.c): Remove.
2546 (mips-linux.c): Remove.
2547 (mips-dsp-linux.c): Remove.
2548 (mips64-linux.c): Remove.
2549 (mips64-dsp-linux.c): Remove.
2550 (nios2-linux.c): Remove.
2551 (powerpc-32.c): Remove.
2552 (powerpc-32l.c): Remove.
2553 (powerpc-altivec32l.c): Remove.
2554 (powerpc-cell32l.c): Remove.
2555 (powerpc-vsx32l.c): Remove.
2556 (powerpc-isa205-32l.c): Remove.
2557 (powerpc-isa205-altivec32l.c): Remove.
2558 (powerpc-isa205-vsx32l.c): Remove.
2559 (powerpc-e500l.c): Remove.
2560 (powerpc-64l.c): Remove.
2561 (powerpc-altivec64l.c): Remove.
2562 (powerpc-cell64l.c): Remove.
2563 (powerpc-vsx64l.c): Remove.
2564 (powerpc-isa205-64l.c): Remove.
2565 (powerpc-isa205-altivec64l.c): Remove.
2566 (powerpc-isa205-vsx64l.c): Remove.
2567 (s390-linux32.c): Remove.
2568 (s390-linux32v1.c): Remove.
2569 (s390-linux32v2.c): Remove.
2570 (s390-linux64.c): Remove.
2571 (s390-linux64v1.c): Remove.
2572 (s390-linux64v2.c): Remove.
2573 (s390-te-linux64.c): Remove.
2574 (s390-vx-linux64.c): Remove.
2575 (s390-tevx-linux64.c): Remove.
2576 (s390x-linux64.c): Remove.
2577 (s390x-linux64v1.c): Remove.
2578 (s390x-linux64v2.c): Remove.
2579 (s390x-te-linux64.c): Remove.
2580 (s390x-vx-linux64.c): Remove.
2581 (s390x-tevx-linux64.c): Remove.
2582 (tic6x-c64xp-linux.c): Remove.
2583 (tic6x-c64x-linux.c): Remove.
2584 (tic6x-c62x-linux.c): Remove.
2585 (reg-sh.c): Remove.
2586 (reg-sparc64.c): Remove.
2587 (reg-spu.c): Remove.
2588 (amd64.c): Remove.
2589 (amd64-linux.c): Remove.
2590 (amd64-avx.c): Remove.
2591 (amd64-avx-linux.c): Remove.
2592 (amd64-avx-avx512.c): Remove.
2593 (amd64-avx-avx512-linux.c): Remove.
2594 (amd64-mpx.c): Remove.
2595 (amd64-mpx-linux.c): Remove.
2596 (amd64-avx-mpx-avx512-pku.c): Remove.
2597 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2598 (amd64-avx-mpx.c): Remove.
2599 (amd64-avx-mpx-linux.c): Remove.
2600 (x32.c): Remove.
2601 (x32-linux.c): Remove.
2602 (x32-avx.c): Remove.
2603 (x32-avx-linux.c): Remove.
2604 (x32-avx-avx512.c): Remove.
2605 (x32-avx-avx512-linux.c): Remove.
2606 (reg-xtensa.c): Remove.
2607 (reg-tilegx.c): Remove.
2608 (reg-tilegx32.c): Remove.
2609
26102017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2611
2612 * Makefile.in (SFILES): Add "common/environ.c".
2613 (OBJS): Add "common/environ.h".
2614
26152017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2616
2617 * configure.ac: Check if the fs_base and gs_base members of
2618 `struct user_regs_struct' exist.
2619 * config.in: Regenerated.
2620 * configure: Likewise.
2621
26222017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2623
2624 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2625 target_read_memory.
2626 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2627 (get_next_pcs_syscall_next_pc): Likewise.
2628
26292016-12-23 Luis Machado <lgustavo@codesourcery.com>
2630
2631 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2632 * nto-x86-low.c: Likewise.
2633
26342016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2635
2636 * Makefile.in: Include disable-implicit-rules.mk.
2637
26382016-11-23 Pedro Alves <palves@redhat.com>
2639
2640 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2641 (debug_vprintf): Use std::chrono::steady_clock instead of
2642 gettimeofday. Use '.' instead of ':'.
2643 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2644 (get_timestamp): Use std::chrono::steady_clock instead of
2645 gettimeofday.
2646
26472016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2648
2649 * Makefile.in: Fix whitespace formatting.
2650
26512016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2652
2653 * Makefile.in (SFILES, OBS): Flatten list and order
2654 alphabetically.
2655
26562016-11-23 Pedro Alves <palves@redhat.com>
2657
2658 * event-loop.c (handle_file_event): Use warning.
2659 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2660 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2661 Use warning.
2662
26632016-11-23 Pedro Alves <palves@redhat.com>
2664
2665 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2666 output.
2667 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2668 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2669 debug_printf and debug_flush for debug output.
2670 * server.c (handle_general_set): Likewise.
2671 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2672 output.
2673
26742016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2675
2676 * Makefile.in (.c.o): Replace rule with ...
2677 (%.o: %.c): ... this one.
2678
26792016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2680
2681 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2682 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2683 make.
2684 * configure.ac: Remove checks for the make program.
2685 * configure: Re-generate.
2686
26872016-10-28 Pedro Alves <palves@redhat.com>
2688
2689 * Makefile.in (CXX_DIALECT): Get from configure.
2690 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2691 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2692 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2693 * config.in: Regenerate.
2694 * configure: Regenerate.
2695
26962016-10-27 Yao Qi <yao.qi@linaro.org>
2697
2698 * linux-low.c (linux_supports_range_stepping): Return true if
2699 can_software_single_step return true.
2700
27012016-10-27 Yao Qi <yao.qi@linaro.org>
2702
2703 * inferiors.c (find_inferior_in_random): New function.
2704 * inferiors.h (find_inferior_in_random): Declare.
2705 * linux-low.c (linux_wait_for_event_filtered): Call
2706 find_inferior_in_random instead of find_inferior.
2707
27082016-10-27 Yao Qi <yao.qi@linaro.org>
2709
2710 * linux-low.c (linux_wait_1): If single-step breakpoints are
2711 inserted, remove them.
2712
27132016-10-26 Pedro Alves <palves@redhat.com>
2714
2715 * linux-low.c (handle_extended_wait): Link parent/child fork
2716 threads.
2717 (linux_wait_1): Unlink them.
2718 (linux_set_resume_request): Ignore resume requests for
2719 already-resumed and unhandled fork child threads.
2720 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2721 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2722 New functions.
2723 (handle_v_requests) <vCont>: Don't call require_running.
2724 * server.h (in_queued_stop_replies): New declaration.
2725
27262016-10-24 Yao Qi <yao.qi@linaro.org>
2727
2728 PR server/20733
2729 * linux-aarch64-low.c (append_insns): Cast the return value to
2730 'uint32_t *'.
2731
27322016-10-10 Yao Qi <yao.qi@linaro.org>
2733
2734 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2735
27362016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2737
2738 * target.c (target_supports_multi_process): New function, moved
2739 from...
2740 * target.h (target_supports_multi_process): ... here. Remove
2741 macro.
2742
27432016-10-05 Tom Tromey <tom@tromey.com>
2744
2745 PR remote/20655:
2746 * tracepoint.c (handle_tracepoint_bkpts): Check
2747 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2748
27492016-10-05 Yao Qi <yao.qi@linaro.org>
2750
2751 * configure.srv: Update the path of arm-*.xml files.
2752
27532016-10-05 Terry Guo <terry.guo@arm.com>
2754 Yao Qi <yao.qi@linaro.org>
2755
2756 * Makefile.in: Adjust the path of rules.
2757 * configure.srv: Update the path of xml files.
2758 * regformats/arm-with-iwmmxt.dat: Regenerated.
2759 * regformats/arm-with-neon.dat: Likewise.
2760 * regformats/arm-with-vfpv2.dat: Likewise.
2761 * regformats/arm-with-vfpv3.dat Likewise.
2762
27632016-09-30 Yao Qi <yao.qi@linaro.org>
2764
2765 PR gdbserver/20627
2766 * target.c (target_stop_and_wait): Don't call
2767 target_continue_no_signal, use resume_stop instead.
2768
27692016-09-26 Yao Qi <yao.qi@linaro.org>
2770
2771 * linux-low.c (linux_wait_1): Call debug_exit.
2772
27732016-09-23 Pedro Alves <palves@redhat.com>
2774
2775 * Makefile.in (SFILES): Add common/new-op.c.
2776 (OBS): Add common/new-op.o.
2777 (new-op.o): New rule.
2778
27792016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2780
2781 * .gitinore: Ignore more files.
2782
27832016-09-21 Yao Qi <yao.qi@linaro.org>
2784
2785 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2786 23.
2787
27882016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2789
2790 * server.c (start_inferior): Call target_mourn_inferior instead of
2791 mourn_inferior; pass ptid_t argument to it.
2792 (resume): Likewise.
2793 (handle_target_event): Likewise.
2794 * target.c (target_mourn_inferior): New function.
2795 * target.h (mourn_inferior): Delete macro.
2796
27972016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2798
2799 * linux-low.c (lwp_is_stepping): New function.
2800
28012016-09-06 Carl Love <cel@us.ibm.com>
2802
2803 * server.c (start_inferior): Fixed comment, requested comment change
2804 didn't get updated correctly. Removed reference to ptrace () call as
2805 it is only true on Linux systems.
2806
28072016-09-06 Carl Love <cel@us.ibm.com>
2808
2809 * server.c (start_inferior): Do not call
2810 function target_post_create_inferior () if the
2811 inferior process has already exited.
2812
28132016-09-05 Pedro Alves <palves@redhat.com>
2814
2815 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2816 (COMPILE.pre, CC_LD): Use CXX directly.
2817 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2818 * acinclude.m4: Don't include build-with-cxx.m4.
2819 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2820 * configure: Regenerate.
2821
28222016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2823
2824 PR gdb/19495
2825 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2826 call writing data to own_buf.
2827
28282016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2829
2830 * target.c (mywait): Call target_wait instead of
2831 the_target->wait.
2832 (target_wait): New function.
2833
28342016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2835
2836 * server.c (start_inferior): New variable 'ptid'. Replace calls
2837 to the_target->resume by target_continue{,_no_signal}, depending
2838 on the case.
2839 * target.c (target_stop_and_wait): Call target_continue_no_signal
2840 instead of the_target->resume.
2841 (target_continue): New function.
2842
28432016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2844
2845 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2846
28472016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2848
2849 PR server/20491
2850 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2851 ps_prochandle.
2852 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2853 * linux-arm-low.c (ps_get_thread_area): Likewise.
2854 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2855 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2856 * linux-mips-low.c (ps_get_thread_area): Likewise.
2857 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2858 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2859 * linux-x86-low.c (ps_get_thread_area): Likewise.
2860 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2861
28622016-08-19 Pedro Alves <palves@redhat.com>
2863
2864 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2865
28662016-08-19 Pedro Alves <palves@redhat.com>
2867
2868 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2869 comment. Use memcpy instead of casting through unsigned long.
2870
28712016-08-19 Pedro Alves <palves@redhat.com>
2872
2873 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2874 allocating around 0x80000000.
2875
28762016-08-19 Pedro Alves <palves@redhat.com>
2877
2878 PR gdb/20415
2879 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2880 (x32-avx512-linux-ipa.o): New rules.
2881 * configure.ac (x86_64-*-linux*): New x32 check.
2882 * configure.srv (ipa_x32_linux_regobj): New.
2883 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2884 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2885 descriptions.
2886 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2887 descriptions.
2888 * configure: Regenerate.
2889
28902016-08-09 Pedro Alves <palves@redhat.com>
2891
2892 PR gdb/18653
2893 * Makefile.in (OBS): Add signals-state-save-restore.o.
2894 (signals-state-save-restore.o): New rule.
2895 * config.in: Regenerate.
2896 * configure: Regenerate.
2897 * linux-low.c: Include "signals-state-save-restore.h".
2898 (linux_create_inferior): Call
2899 restore_original_signals_state.
2900 * server.c: Include "dispositions-save-restore.h".
2901 (captured_main): Call save_original_signals_state.
2902
29032016-08-05 Pedro Alves <palves@redhat.com>
2904
2905 * configure: Regenerate.
2906
29072016-08-04 Yao Qi <yao.qi@linaro.org>
2908
2909 * linux-low.c (regsets_fetch_inferior_registers): Check
2910 errno is ESRCH or not.
2911
29122016-08-02 Yao Qi <yao.qi@linaro.org>
2913
2914 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2915 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2916 (thread_db_load_search): Update.
2917 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2918 td_ta_set_event and td_ta_event_getmsg.
2919
29202016-07-26 Pedro Alves <palves@redhat.com>
2921
2922 PR server/20414
2923 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2924 of unsigned long for 64-bit registers and use uint32_t instead of
2925 unsigned int for 32-bit registers.
2926
29272016-07-26 Pedro Alves <palves@redhat.com>
2928
2929 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2930 to 'ptrace'.
2931
29322016-07-21 Tom Tromey <tom@tromey.com>
2933
2934 * configure: Rebuild.
2935
29362016-07-21 Yao Qi <yao.qi@linaro.org>
2937
2938 * mem-break.c (find_gdb_breakpoint): Cast bp to
2939 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2940
29412016-07-21 Yao Qi <yao.qi@linaro.org>
2942
2943 * server.c (handle_v_requests): Support s and S actions
2944 if target_supports_software_single_step return true.
2945
29462016-07-21 Yao Qi <yao.qi@linaro.org>
2947
2948 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2949 is resume_step, call maybe_hw_step.
2950 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2951 and unstop them.
2952 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2953 breakpoints or not.
2954 (proceed_one_lwp): If resume request is resume_step, install
2955 reinsert breakpoints and call maybe_hw_step.
2956
29572016-07-21 Yao Qi <yao.qi@linaro.org>
2958
2959 * linux-low.c (proceed_one_lwp): Declare.
2960 (linux_resume_one_thread): Remove local variable 'step'.
2961 Lift code enqueue signal. Call proceed_one_lwp instead of
2962 linux_resume_one_lwp.
2963
29642016-07-21 Yao Qi <yao.qi@linaro.org>
2965
2966 * linux-low.c (linux_resume_one_thread): Call
2967 enqueue_pending_signal.
2968
29692016-07-21 Yao Qi <yao.qi@linaro.org>
2970
2971 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2972 * inferiors.c (do_restore_current_thread_cleanup): New function.
2973 (make_cleanup_restore_current_thread): Likewise.
2974 * linux-low.c (install_software_single_step_breakpoints): Call
2975 make_cleanup_restore_current_thread. Switch current_thread to
2976 thread.
2977
29782016-07-21 Yao Qi <yao.qi@linaro.org>
2979
2980 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2981 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2982 (clone_one_breakpoint): Likewise.
2983 (delete_reinsert_breakpoints): Change parameter to thread.
2984 Callers updated.
2985 (has_reinsert_breakpoints): Likewise.
2986 (uninsert_reinsert_breakpoints): Likewise.
2987 (reinsert_reinsert_breakpoints): Likewise.
2988 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2989 (delete_reinsert_breakpoints): Likewise.
2990 (reinsert_reinsert_breakpoints): Likewise.
2991 (uninsert_reinsert_breakpoints): Likewise.
2992 (has_reinsert_breakpoints): Likewise.
2993
29942016-07-21 Yao Qi <yao.qi@linaro.org>
2995
2996 * inferiors.c (get_thread_process): Make parameter const.
2997 * inferiors.h (get_thread_process): Update declaration.
2998 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2999 Add new parameters child_thread and parent_thread. Callers
3000 updated.
3001 * mem-break.h (clone_all_breakpoints): Update declaration.
3002
30032016-07-21 Yao Qi <yao.qi@linaro.org>
3004
3005 * mem-break.c (struct breakpoint) <cond_list>: Remove.
3006 <command_list, handler>: Remove.
3007 (struct gdb_breakpoint): New.
3008 (struct other_breakpoint): New.
3009 (struct reinsert_breakpoint): New.
3010 (is_gdb_breakpoint): New function.
3011 (any_persistent_commands): Update command_list if
3012 is_gdb_breakpoint returns true.
3013 (set_breakpoint): Create breakpoints according to their types.
3014 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
3015 (set_gdb_breakpoint_1): Likewise.
3016 (set_gdb_breakpoint): Likewise.
3017 (clear_breakpoint_conditions): Change parameter type to
3018 'struct gdb_breakpoint *'.
3019 (clear_breakpoint_commands): Likewise.
3020 (clear_breakpoint_conditions_and_commands): Likewise.
3021 (add_condition_to_breakpoint): Likewise.
3022 (add_breakpoint_condition): Likewise.
3023 (add_commands_to_breakpoint): Likewise.
3024 (check_breakpoints): Check other_breakpoint.
3025 (clone_one_breakpoint): Clone breakpopint according to its type.
3026 * mem-break.h (struct gdb_breakpoint): Declare.
3027 (set_gdb_breakpoint): Update declaration.
3028 (clear_breakpoint_conditions_and_commands): Likewise.
3029 (add_breakpoint_condition): Likewise.
3030 (add_breakpoint_commands): Likewise.
3031 * server.c (process_point_options): Change parameter type to
3032 'struct gdb_breakpoint *'.
3033
30342016-07-21 Yao Qi <yao.qi@linaro.org>
3035
3036 * mem-break.c (set_breakpoint_at): Rename it to ...
3037 (set_breakpoint_type_at): ... it.
3038 (set_breakpoint_at): Call set_breakpoint_type_at.
3039 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
3040 * mem-break.h (set_breakpoint_at): Update comments.
3041
30422016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
3043
3044 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
3045 to buf parameter.
3046 (nios2_store_gregset): Likewise.
3047
30482016-07-01 Pedro Alves <palves@redhat.com>
3049 Antoine Tremblay <antoine.tremblay@ericsson.com>
3050
3051 * linux-low.c: Change interface to take the target lwp_info
3052 pointer directly and return void. Handle detaching from a zombie
3053 thread.
3054 (linux_detach_lwp_callback): New function.
3055 (linux_detach): Detach from the leader thread after detaching from
3056 the clone threads.
3057
30582016-06-28 Yao Qi <yao.qi@linaro.org>
3059
3060 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
3061 for variable new_offset.
3062 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
3063 (aarch64_ftrace_insn_reloc_cb): Likewise.
3064 (aarch64_ftrace_insn_reloc_tb): Likewise.
3065 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3066 PRIx64 instead of PRIx32.
3067
30682016-06-28 Yao Qi <yao.qi@linaro.org>
3069
3070 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3071 (the_low_target): Install arm_get_syscall_trapinfo.
3072
30732016-06-28 Yao Qi <yao.qi@linaro.org>
3074
3075 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3076 function.
3077 (the_low_target): Install aarch64_get_syscall_trapinfo.
3078
30792016-06-28 Yao Qi <yao.qi@linaro.org>
3080
3081 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3082 Callers updated.
3083 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3084 Remove parameter sysno.
3085 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3086 sysret.
3087
30882016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3089
3090 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3091 (s390_emit_ne_goto): Likewise.
3092 (s390_emit_lt_goto): Likewise.
3093 (s390_emit_le_goto): Likewise.
3094 (s390_emit_gt_goto): Likewise.
3095 (s390_emit_ge_goto): Likewise.
3096 (s390x_emit_eq_goto): Likewise.
3097 (s390x_emit_ne_goto): Likewise.
3098 (s390x_emit_lt_goto): Likewise.
3099 (s390x_emit_le_goto): Likewise.
3100 (s390x_emit_gt_goto): Likewise.
3101 (s390x_emit_ge_goto): Likewise.
3102 (s390_emit_ops_impl): Mark variable static.
3103 (s390x_emit_ops): Likewise.
3104
31052016-06-17 Yao Qi <yao.qi@linaro.org>
3106
3107 * linux-low.c (handle_extended_wait): Call
3108 uninsert_reinsert_breakpoints for the parent process. Remove
3109 reinsert breakpoints from the child process. Reinsert them to
3110 the parent process when vfork is done.
3111 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3112 (reinsert_reinsert_breakpoints): New function.
3113 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3114 (reinsert_reinsert_breakpoints): Declare.
3115
31162016-06-17 Yao Qi <yao.qi@linaro.org>
3117
3118 * linux-low.c (handle_extended_wait): If the parent is doing
3119 step-over, remove the reinsert breakpoints from the forked child.
3120
31212016-06-17 Yao Qi <yao.qi@linaro.org>
3122
3123 * linux-low.c (unsuspend_all_lwps): Declare.
3124 (linux_low_filter_event): If thread exited, call finish_step_over.
3125 If step-over is finished, unsuspend other threads.
3126
31272016-06-17 Yao Qi <yao.qi@linaro.org>
3128
3129 * linux-low.c (linux_resume_one_lwp_throw): Assert
3130 has_reinsert_breakpoints returns false.
3131 * mem-break.c (delete_disabled_breakpoints): Assert
3132 bp type isn't reinsert_breakpoint.
3133
31342016-06-17 Yao Qi <yao.qi@linaro.org>
3135
3136 * linux-low.c (maybe_hw_step): New function.
3137 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3138 (finish_step_over): Switch current_thread to lwp temporarily,
3139 and assert has_reinsert_breakpoints returns true.
3140 (proceed_one_lwp): Call maybe_hw_step.
3141 * mem-break.c (has_reinsert_breakpoints): New function.
3142 * mem-break.h (has_reinsert_breakpoints): Declare.
3143
31442016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3145
3146 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3147
31482016-05-17 Yao Qi <yao.qi@linaro.org>
3149
3150 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3151 instead of find_inferior.
3152
31532016-05-05 Yao Qi <yao.qi@linaro.org>
3154
3155 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3156 Initialize res to zero.
3157
31582016-05-05 Yao Qi <yao.qi@linaro.org>
3159
3160 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3161 to uint32_t.
3162
31632016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3164
3165 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3166 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3167 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3168
31692016-04-28 Par Olsson <par.olsson@windriver.com>
3170 Simon Marchi <simon.marchi@ericsson.com>
3171
3172 * tracepoint.c (write_inferior_int8): New function.
3173 (cmd_qtenable_disable): Write enable flag using
3174 write_inferior_int8.
3175
31762016-04-25 Yao Qi <yao.qi@linaro.org>
3177
3178 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3179 (need_step_over_p): Return zero if the LWP has pending signals
3180 can be delivered on software single step target.
3181
31822016-04-25 Yao Qi <yao.qi@linaro.org>
3183
3184 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3185 return instead of error.
3186
31872016-04-22 Yao Qi <yao.qi@linaro.org>
3188
3189 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3190 to 23.
3191
31922016-04-22 Yao Qi <yao.qi@linaro.org>
3193
3194 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3195 signal when stepping over breakpoint with software single
3196 step.
3197
31982016-04-21 Pedro Alves <palves@redhat.com>
3199
3200 * linux-s390-low.c (s390_collect_ptrace_register)
3201 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3202 add casts.
3203 (s390_check_regset): Use void * instead of gdb_byte *.
3204
32052016-04-20 Pedro Alves <palves@redhat.com>
3206
3207 * configure: Renegerate.
3208
32092016-04-20 Yao Qi <yao.qi@linaro.org>
3210
3211 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3212 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3213 number 16.
3214 (arm_store_gregset): Likewise.
3215
32162016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3217
3218 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3219 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3220 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3221 (amd64-avx-mpx-linux.c): New rules.
3222 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3223 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3224 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3225 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3226 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3227 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3228 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3229 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3230 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3231 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3232 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3233 * linux-x86-low.c (x86_linux_read_description): Add case for
3234 X86_XSTATE_AVX_MPX_MASK.
3235 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3236 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3237 init_registers_i386_avx_mpx_linux.
3238 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3239 (initialize_low_tracepoint): Call
3240 init_registers_i386_avx_mpx_linux.
3241 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3242 (initialize_low_tracepoint): Call
3243 init_registers_amd64_avx_mpx_linux.
3244 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3245 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3246 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3247 declarations.
3248
32492016-04-18 Pedro Alves <palves@redhat.com>
3250
3251 * configure: Regenerate.
3252
32532016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3254
3255 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3256 (aarch64_emit_sub): Likewise.
3257
32582016-04-12 Pedro Alves <palves@redhat.com>
3259
3260 * utils.c (prepare_to_throw_exception): Delete.
3261
32622016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3263
3264 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3265
32662016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3267
3268 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3269
32702016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3271
3272 * linux-aarch64-ipa.c: Add <elf.h> include.
3273 * linux-ppc-ipa.c: Add <elf.h> include.
3274 * linux-s390-ipa.c: Add <elf.h> include.
3275
32762016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3277
3278 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3279 (get_raw_reg_ptr): Likewise.
3280 (get_trace_state_variable_value_ptr): Likewise.
3281 (set_trace_state_variable_value_ptr): Likewise.
3282 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3283 char *.
3284
32852016-03-31 Wei-cheng Wang <cole945@gmail.com>
3286 Marcin Kościelnicki <koriakin@0x04.net>
3287
3288 PR/17221
3289 * linux-ppc-low.c (emit_insns): New function.
3290 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3291 (ppc_emit_prologue): New function.
3292 (ppc_emit_epilogue): New function.
3293 (ppc_emit_add): New function.
3294 (ppc_emit_sub): New function.
3295 (ppc_emit_mul): New function.
3296 (ppc_emit_lsh): New function.
3297 (ppc_emit_rsh_signed): New function.
3298 (ppc_emit_rsh_unsigned): New function.
3299 (ppc_emit_ext): New function.
3300 (ppc_emit_zero_ext): New function.
3301 (ppc_emit_log_not): New function.
3302 (ppc_emit_bit_and): New function.
3303 (ppc_emit_bit_or): New function.
3304 (ppc_emit_bit_xor): New function.
3305 (ppc_emit_bit_not): New function.
3306 (ppc_emit_equal): New function.
3307 (ppc_emit_less_signed): New function.
3308 (ppc_emit_less_unsigned): New function.
3309 (ppc_emit_ref): New function.
3310 (ppc_emit_const): New function.
3311 (ppc_emit_reg): New function.
3312 (ppc_emit_pop): New function.
3313 (ppc_emit_stack_flush): New function.
3314 (ppc_emit_swap): New function.
3315 (ppc_emit_stack_adjust): New function.
3316 (ppc_emit_call): New function.
3317 (ppc_emit_int_call_1): New function.
3318 (ppc_emit_void_call_2): New function.
3319 (ppc_emit_if_goto): New function.
3320 (ppc_emit_goto): New function.
3321 (ppc_emit_eq_goto): New function.
3322 (ppc_emit_ne_goto): New function.
3323 (ppc_emit_lt_goto): New function.
3324 (ppc_emit_le_goto): New function.
3325 (ppc_emit_gt_goto): New function.
3326 (ppc_emit_ge_goto): New function.
3327 (ppc_write_goto_address): New function.
3328 (ppc_emit_ops_impl): New static variable.
3329 (ppc64v1_emit_prologue): New function.
3330 (ppc64v2_emit_prologue): New function.
3331 (ppc64_emit_epilogue): New function.
3332 (ppc64_emit_add): New function.
3333 (ppc64_emit_sub): New function.
3334 (ppc64_emit_mul): New function.
3335 (ppc64_emit_lsh): New function.
3336 (ppc64_emit_rsh_signed): New function.
3337 (ppc64_emit_rsh_unsigned): New function.
3338 (ppc64_emit_ext): New function.
3339 (ppc64_emit_zero_ext): New function.
3340 (ppc64_emit_log_not): New function.
3341 (ppc64_emit_bit_and): New function.
3342 (ppc64_emit_bit_or): New function.
3343 (ppc64_emit_bit_xor): New function.
3344 (ppc64_emit_bit_not): New function.
3345 (ppc64_emit_equal): New function.
3346 (ppc64_emit_less_signed): New function.
3347 (ppc64_emit_less_unsigned): New function.
3348 (ppc64_emit_ref): New function.
3349 (ppc64_emit_const): New function.
3350 (ppc64v1_emit_reg): New function.
3351 (ppc64v2_emit_reg): New function.
3352 (ppc64_emit_pop): New function.
3353 (ppc64_emit_stack_flush): New function.
3354 (ppc64_emit_swap): New function.
3355 (ppc64v1_emit_call): New function.
3356 (ppc64v2_emit_call): New function.
3357 (ppc64v1_emit_int_call_1): New function.
3358 (ppc64v2_emit_int_call_1): New function.
3359 (ppc64v1_emit_void_call_2): New function.
3360 (ppc64v2_emit_void_call_2): New function.
3361 (ppc64_emit_if_goto): New function.
3362 (ppc64_emit_eq_goto): New function.
3363 (ppc64_emit_ne_goto): New function.
3364 (ppc64_emit_lt_goto): New function.
3365 (ppc64_emit_le_goto): New function.
3366 (ppc64_emit_gt_goto): New function.
3367 (ppc64_emit_ge_goto): New function.
3368 (ppc64v1_emit_ops_impl): New static variable.
3369 (ppc64v2_emit_ops_impl): New static variable.
3370 (ppc_emit_ops): New function.
3371 (linux_low_target): Wire in ppc_emit_ops.
3372
33732016-03-31 Wei-cheng Wang <cole945@gmail.com>
3374 Marcin Kościelnicki <koriakin@0x04.net>
3375
3376 PR/17221
3377 * Makefile.in: Add powerpc-*-ipa.o
3378 * configure.srv: Add ipa_obj for powerpc*-linux.
3379 * linux-ppc-ipa.c: New file.
3380 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3381 includes.
3382 (PPC_FIELD): New macro.
3383 (PPC_SEXT): New macro.
3384 (PPC_OP6): New macro.
3385 (PPC_BO): New macro.
3386 (PPC_LI): New macro.
3387 (PPC_BD): New macro.
3388 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3389 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3390 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3391 (ppc_get_thread_area): New function.
3392 (is_elfv2_inferior): New function.
3393 (gen_ds_form): New function.
3394 (GEN_STD): New macro.
3395 (GEN_STDU): New macro.
3396 (GEN_LD): New macro.
3397 (GEN_LDU): New macro.
3398 (gen_d_form): New function.
3399 (GEN_ADDI): New macro.
3400 (GEN_ADDIS): New macro.
3401 (GEN_LI): New macro.
3402 (GEN_LIS): New macro.
3403 (GEN_ORI): New macro.
3404 (GEN_ORIS): New macro.
3405 (GEN_LWZ): New macro.
3406 (GEN_STW): New macro.
3407 (GEN_STWU): New macro.
3408 (gen_xfx_form): New function.
3409 (GEN_MFSPR): New macro.
3410 (GEN_MTSPR): New macro.
3411 (GEN_MFCR): New macro.
3412 (GEN_MTCR): New macro.
3413 (GEN_SYNC): New macro.
3414 (GEN_LWSYNC): New macro.
3415 (gen_x_form): New function.
3416 (GEN_OR): New macro.
3417 (GEN_MR): New macro.
3418 (GEN_LWARX): New macro.
3419 (GEN_STWCX): New macro.
3420 (GEN_CMPW): New macro.
3421 (gen_md_form): New function.
3422 (GEN_RLDICL): New macro.
3423 (GEN_RLDICR): New macro.
3424 (gen_i_form): New function.
3425 (GEN_B): New macro.
3426 (GEN_BL): New macro.
3427 (gen_b_form): New function.
3428 (GEN_BNE): New macro.
3429 (GEN_LOAD): New macro.
3430 (GEN_STORE): New macro.
3431 (gen_limm): New function.
3432 (gen_atomic_xchg): New function.
3433 (gen_call): New function.
3434 (ppc_relocate_instruction): New function.
3435 (ppc_install_fast_tracepoint_jump_pad): New function.
3436 (ppc_get_min_fast_tracepoint_insn_len): New function.
3437 (ppc_get_ipa_tdesc_idx): New function.
3438 (the_low_target): Wire in the new functions.
3439 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3440 tdescs.
3441 * linux-ppc-tdesc.h: New file.
3442
34432016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3444
3445 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3446 (alloc_jump_pad_buffer): New function.
3447 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3448 (alloc_jump_pad_buffer): New function.
3449 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3450 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3451 (alloc_jump_pad_buffer): New function.
3452 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3453 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3454 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3455 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3456
34572016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3458
3459 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3460 * linux-amd64-ipa.c: Likewise.
3461 * linux-i386-ipa.c: Likewise.
3462 * linux-s390-ipa.c: Likewise.
3463 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3464 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3465 set_trace_state_variable_value_ptr.
3466 (struct ipa_sym_addresses): Likewise.
3467 (symbol_list): Likewise.
3468 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3469 accessing gdb_collect directly.
3470 (gdb_collect_ptr_type): New typedef.
3471 (get_raw_reg_ptr_type): New typedef.
3472 (get_trace_state_variable_value_ptr_type): New typedef.
3473 (set_trace_state_variable_value_ptr_type): New typedef.
3474 (gdb_collect_ptr): New global.
3475 (get_raw_reg_ptr): New global.
3476 (get_trace_state_variable_value_ptr): New global.
3477 (set_trace_state_variable_value_ptr): New global.
3478 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3479 accessing get_raw_reg directly.
3480 (get_get_tsv_func_addr): Likewise for
3481 get_trace_state_variable_value_ptr.
3482 (get_set_tsv_func_addr): Likewise for
3483 set_trace_state_variable_value_ptr.
3484 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3485
34862016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3487
3488 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3489
34902016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3491
3492 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3493 packets.
3494 (relocate_instruction): Remove own_buf.
3495 * server.c (own_buf): Make global.
3496 (handle_v_requests): Make global.
3497 * server.h (own_buf): New declaration.
3498 (handle_v_requests): New prototype.
3499
35002016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3501
3502 PR 18377
3503 * linux-s390-low.c (add_insns): New function.
3504 (s390_emit_prologue): New function.
3505 (s390_emit_epilogue): New function.
3506 (s390_emit_add): New function.
3507 (s390_emit_sub): New function.
3508 (s390_emit_mul): New function.
3509 (s390_emit_lsh): New function.
3510 (s390_emit_rsh_signed): New function.
3511 (s390_emit_rsh_unsigned): New function.
3512 (s390_emit_ext): New function.
3513 (s390_emit_log_not): New function.
3514 (s390_emit_bit_and): New function.
3515 (s390_emit_bit_or): New function.
3516 (s390_emit_bit_xor): New function.
3517 (s390_emit_bit_not): New function.
3518 (s390_emit_equal): New function.
3519 (s390_emit_less_signed): New function.
3520 (s390_emit_less_unsigned): New function.
3521 (s390_emit_ref): New function.
3522 (s390_emit_if_goto): New function.
3523 (s390_emit_goto): New function.
3524 (s390_write_goto_address): New function.
3525 (s390_emit_litpool): New function.
3526 (s390_emit_const): New function.
3527 (s390_emit_call): New function.
3528 (s390_emit_reg): New function.
3529 (s390_emit_pop): New function.
3530 (s390_emit_stack_flush): New function.
3531 (s390_emit_zero_ext): New function.
3532 (s390_emit_swap): New function.
3533 (s390_emit_stack_adjust): New function.
3534 (s390_emit_set_r2): New function.
3535 (s390_emit_int_call_1): New function.
3536 (s390_emit_void_call_2): New function.
3537 (s390_emit_eq_goto): New function.
3538 (s390_emit_ne_goto): New function.
3539 (s390_emit_lt_goto): New function.
3540 (s390_emit_le_goto): New function.
3541 (s390_emit_gt_goto): New function.
3542 (s390_emit_ge_goto): New function.
3543 (s390x_emit_prologue): New function.
3544 (s390x_emit_epilogue): New function.
3545 (s390x_emit_add): New function.
3546 (s390x_emit_sub): New function.
3547 (s390x_emit_mul): New function.
3548 (s390x_emit_lsh): New function.
3549 (s390x_emit_rsh_signed): New function.
3550 (s390x_emit_rsh_unsigned): New function.
3551 (s390x_emit_ext): New function.
3552 (s390x_emit_log_not): New function.
3553 (s390x_emit_bit_and): New function.
3554 (s390x_emit_bit_or): New function.
3555 (s390x_emit_bit_xor): New function.
3556 (s390x_emit_bit_not): New function.
3557 (s390x_emit_equal): New function.
3558 (s390x_emit_less_signed): New function.
3559 (s390x_emit_less_unsigned): New function.
3560 (s390x_emit_ref): New function.
3561 (s390x_emit_if_goto): New function.
3562 (s390x_emit_const): New function.
3563 (s390x_emit_call): New function.
3564 (s390x_emit_reg): New function.
3565 (s390x_emit_pop): New function.
3566 (s390x_emit_stack_flush): New function.
3567 (s390x_emit_zero_ext): New function.
3568 (s390x_emit_swap): New function.
3569 (s390x_emit_stack_adjust): New function.
3570 (s390x_emit_int_call_1): New function.
3571 (s390x_emit_void_call_2): New function.
3572 (s390x_emit_eq_goto): New function.
3573 (s390x_emit_ne_goto): New function.
3574 (s390x_emit_lt_goto): New function.
3575 (s390x_emit_le_goto): New function.
3576 (s390x_emit_gt_goto): New function.
3577 (s390x_emit_ge_goto): New function.
3578 (s390_emit_ops): New function.
3579 (struct linux_target_ops): Fill in emit_ops hook.
3580
35812016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3582
3583 PR 18377
3584 * Makefile.in: Add s390 IPA files.
3585 * configure.srv: Build IPA for s390.
3586 * linux-s390-ipa.c: New file.
3587 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3588 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3589 (tdesc_s390_linux32): Likewise.
3590 (init_registers_s390_linux32v1): Likewise.
3591 (tdesc_s390_linux32v1): Likewise.
3592 (init_registers_s390_linux32v2): Likewise.
3593 (tdesc_s390_linux32v2): Likewise.
3594 (init_registers_s390_linux64): Likewise.
3595 (tdesc_s390_linux64): Likewise.
3596 (init_registers_s390_linux64v1): Likewise.
3597 (tdesc_s390_linux64v1): Likewise.
3598 (init_registers_s390_linux64v2): Likewise.
3599 (tdesc_s390_linux64v2): Likewise.
3600 (init_registers_s390_te_linux64): Likewise.
3601 (tdesc_s390_te_linux64): Likewise.
3602 (init_registers_s390_vx_linux64): Likewise.
3603 (tdesc_s390_vx_linux64): Likewise.
3604 (init_registers_s390_tevx_linux64): Likewise.
3605 (tdesc_s390_tevx_linux64): Likewise.
3606 (init_registers_s390x_linux64): Likewise.
3607 (tdesc_s390x_linux64): Likewise.
3608 (init_registers_s390x_linux64v1): Likewise.
3609 (tdesc_s390x_linux64v1): Likewise.
3610 (init_registers_s390x_linux64v2): Likewise.
3611 (tdesc_s390x_linux64v2): Likewise.
3612 (init_registers_s390x_te_linux64): Likewise.
3613 (tdesc_s390x_te_linux64): Likewise.
3614 (init_registers_s390x_vx_linux64): Likewise.
3615 (tdesc_s390x_vx_linux64): Likewise.
3616 (init_registers_s390x_tevx_linux64): Likewise.
3617 (tdesc_s390x_tevx_linux64): Likewise.
3618 (have_hwcap_s390_vx): New static variable.
3619 (s390_arch_setup): Fill have_hwcap_s390_vx.
3620 (s390_get_thread_area): New function.
3621 (s390_ft_entry_gpr_esa): New const.
3622 (s390_ft_entry_gpr_zarch): New const.
3623 (s390_ft_entry_misc): New const.
3624 (s390_ft_entry_fr): New const.
3625 (s390_ft_entry_vr): New const.
3626 (s390_ft_main_31): New const.
3627 (s390_ft_main_64): New const.
3628 (s390_ft_exit_fr): New const.
3629 (s390_ft_exit_vr): New const.
3630 (s390_ft_exit_misc): New const.
3631 (s390_ft_exit_gpr_esa): New const.
3632 (s390_ft_exit_gpr_zarch): New const.
3633 (append_insns): New function.
3634 (s390_relocate_instruction): New function.
3635 (s390_install_fast_tracepoint_jump_pad): New function.
3636 (s390_get_min_fast_tracepoint_insn_len): New function.
3637 (s390_get_ipa_tdesc_idx): New function.
3638 (struct linux_target_ops): Wire in the above functions.
3639 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3640 * linux-s390-tdesc.h: New file.
3641
36422016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3643
3644 * linux-s390-low.c (s390_supports_tracepoints): New function.
3645 (struct linux_target_ops): Fill supports_tracepoints hook.
3646
36472016-03-18 Yao Qi <yao.qi@linaro.org>
3648
3649 * linux-low.c (lwp_signal_can_be_delivered): New function.
3650 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3651
36522016-03-18 Yao Qi <yao.qi@linaro.org>
3653
3654 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3655 0 if signal is enqueued. Remove 'signal' from one debugging
3656 message. Move one debugging message to some lines below.
3657 Remove code setting 'signal' to 0.
3658
36592016-03-18 Yao Qi <yao.qi@linaro.org>
3660
3661 * linux-low.c (linux_low_filter_event): Remove redundant
3662 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3663
36642016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3665
3666 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3667 (struct linux_target_ops): Wire in the above.
3668
36692016-03-03 Yao Qi <yao.qi@linaro.org>
3670
3671 * linux-low.c: Update comments to start_step_over.
3672
36732016-03-03 Yao Qi <yao.qi@linaro.org>
3674
3675 PR server/19736
3676 * linux-low.c (handle_extended_wait): Set child suspended
3677 if event_lwp->bp_reinsert isn't zero.
3678
36792016-03-02 Yao Qi <yao.qi@linaro.org>
3680
3681 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3682 enqueue_pending_signal.
3683
36842016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3685
3686 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3687 is actually loaded.
3688
36892016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3690
3691 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3692 (s390_regmap_3264) [!__s390x__]: New global.
3693 (s390_collect_ptrace_register): Skip map entries containing -1.
3694 (s390_supply_ptrace_register): Ditto.
3695 (s390_fill_gprs_high): New function.
3696 (s390_store_gprs_high): New function.
3697 (s390_regsets): Add NT_S390_HIGH_GPRS.
3698 (s390_get_hwcap): Enable on 31-bit.
3699 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3700 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3701 Detect NT_S390_HIGH_GPRS.
3702 (s390_usrregs_info_3264): Enable on 31-bit.
3703 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3704 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3705
37062016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3707
3708 PR gdb/13808
3709 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3710 * configure.srv: Ditto.
3711 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3712 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3713 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3714 (init_registers_amd64_linux): Remove prototype.
3715 (tdesc_amd64_linux): Remove declaration.
3716 (get_ipa_tdesc): New function.
3717 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3718 initialize remaining tdescs.
3719 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3720 (init_registers_i386_linux): Remove prototype.
3721 (tdesc_i386_linux): Remove declaration.
3722 (get_ipa_tdesc): New function.
3723 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3724 initialize remaining tdescs.
3725 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3726 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3727 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3728 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3729 (x86_get_ipa_tdesc_idx): New function.
3730 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3731 * linux-x86-tdesc.h: New file.
3732 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3733 (target_get_ipa_tdesc_idx): New macro.
3734 * tracepoint.c (ipa_tdesc_idx): New macro.
3735 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3736 (symbol_list): Add ipa_tdesc_idx.
3737 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3738 (ipa_tdesc): Remove.
3739 (ipa_tdesc_idx): New variable.
3740 (get_context_regcache): Use get_ipa_tdesc.
3741 (gdb_collect): Ditto.
3742 (gdb_probe): Ditto.
3743 * tracepoint.h (get_ipa_tdesc): New prototype.
3744 (ipa_tdesc): Remove.
3745
37462016-02-24 Pedro Alves <palves@redhat.com>
3747
3748 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3749 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3750 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3751 Factor out common code between the USE_SIGTRAP_SIGINFO and
3752 !USE_SIGTRAP_SIGINFO blocks.
3753 (linux_low_filter_event): Call save_stop_reason instead of
3754 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3755 Update comments.
3756 (linux_wait_1): Update comments.
3757
37582016-02-24 Wei-cheng Wang <cole945@gmail.com>
3759
3760 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3761 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3762 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3763 ppc_insert_point, ppc_remove_point.
3764
37652016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3766
3767 * linux-s390-low.c (s390_supports_z_point_type): New function.
3768 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3769
37702016-02-16 Yao Qi <yao.qi@linaro.org>
3771
3772 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3773 PC. Get pc from regcache_read_pc.
3774
37752016-02-12 Yao Qi <yao.qi@linaro.org>
3776
3777 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3778 or linux_get_pc_32bit.
3779 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3780
37812016-02-12 Yao Qi <yao.qi@linaro.org>
3782
3783 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3784 arm_linux_get_next_pcs_fixup.
3785
37862016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3787
3788 * tracepoint.c (x_tracepoint_action_download): Change
3789 write_inferior_data_ptr to write_inferior_data_pointer.
3790 (cmd_qtstart): Likewise.
3791 (write_inferior_data_ptr): Remove.
3792 (download_agent_expr): Change write_inferior_data_ptr to
3793 write_inferior_data_pointer.
3794 (download_tracepoint_1): Likewise.
3795 (download_tracepoint): Likewise.
3796 (download_trace_state_variables): Likewise.
3797
37982016-02-11 Wei-cheng Wang <cole945@gmail.com>
3799 Marcin Kościelnicki <koriakin@0x04.net>
3800
3801 * tracepoint.c (struct tracepoint_action_ops): Remove.
3802 (struct tracepoint_action): Remove ops.
3803 (m_tracepoint_action_download, r_tracepoint_action_download)
3804 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3805 size and offset accordingly.
3806 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3807 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3808 (tracepoint_action_send, tracepoint_action_download): New functions.
3809 Helpers for trace action handlers.
3810 (add_tracepoint_action): Remove setup actions ops.
3811 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3812
38132016-02-10 Yao Qi <yao.qi@linaro.org>
3814
3815 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3816
38172016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3818
3819 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3820 to AC_OUTPUT.
3821 * configure: Regenerate.
3822
38232016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3824
3825 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3826 void * to gdb_byte *.
3827 * linux-low.c (siginfo_fixup): Likewise.
3828 (linux_xfer_siginfo): Likewise.
3829 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3830 Likewise.
3831 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3832
38332016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3834
3835 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3836 to srv_tgtobj.
3837 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3838 to srv_tgtobj.
3839 * linux-x86-low.c [__x86_64__]: Include
3840 "nat/amd64-linux-siginfo.h".
3841 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3842 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3843 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3844 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3845 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3846 (cpt_si_fd, si_timerid, si_overrun): Move from
3847 nat/amd64-linux-siginfo.c.
3848 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3849
38502016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3851
3852 * server.c (skip_to_semicolon): Remove.
3853 (process_point_options): Use strchrnul instead of
3854 skip_to_semicolon.
3855
38562016-01-26 Yao Qi <yao.qi@linaro.org>
3857
3858 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3859 * linux-low.c (install_software_single_step_breakpoints): Don't
3860 call regcache_read_pc.
3861 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3862 argument pc.
3863
38642016-01-26 Yao Qi <yao.qi@linaro.org>
3865
3866 * linux-low.c (install_software_single_step_breakpoints): Call
3867 regcache_read_pc instead of get_pc.
3868
38692016-01-26 Yao Qi <yao.qi@linaro.org>
3870
3871 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3872 (unblock_async_io): Rename to ...
3873 (block_unblock_async_io): ... it. New function.
3874 (enable_async_io): Don't install SIGIO handler. Unblock it
3875 instead.
3876 (disable_async_io): Don't ignore SIGIO. Block it instead.
3877 (initialize_async_io): Install SIGIO handler. Don't call
3878 unblock_async_io.
3879
38802016-01-26 Yao Qi <yao.qi@linaro.org>
3881
3882 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3883 first character is '\003', call *the_target->request_interrupt.
3884
38852016-01-25 Yao Qi <yao.qi@linaro.org>
3886
3887 * remote-utils.c (new_thread_notify): Remove.
3888 (dead_thread_notify): Likewise.
3889 * remote-utils.h (new_thread_notify): Remove declaration.
3890 (dead_thread_notify): Likewise.
3891
38922016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3893
3894 * gdb.trace/pending.exp: Fix expected message on continue.
3895
38962016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3897
3898 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3899 it works properly on big-endian machines where sizeof (CORE_ADDR)
3900 != sizeof (void *).
3901
39022016-01-21 Pedro Alves <palves@redhat.com>
3903
3904 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3905 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3906 * configure: Regenerate.
3907
39082016-01-21 Yao Qi <yao.qi@linaro.org>
3909
3910 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3911 is_thumb and set it according to CPSR saved on the stack.
3912 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3913 arm_sigreturn_next_pc.
3914
39152016-01-18 Yao Qi <yao.qi@linaro.org>
3916
3917 * linux-low.c (linux_set_pc_64bit): New function.
3918 (linux_get_pc_64bit): New function.
3919 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3920 Declare.
3921 * linux-sparc-low.c (debug_threads): Remove declaration.
3922 (sparc_get_pc): Remove.
3923 (the_low_target): Use linux_get_pc_64bit instead of
3924 sparc_get_pc.
3925 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3926 (the_low_target): Use linux_get_pc_64bit and
3927 linux_set_pc_64bit.
3928
39292016-01-18 Yao Qi <yao.qi@linaro.org>
3930
3931 * linux-arm-low.c (debug_threads): Remove declaration.
3932 (arm_get_pc, arm_set_pc): Remove.
3933 (the_low_target): Use linux_get_pc_32bit and
3934 linux_set_pc_32bit.
3935 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3936 (the_low_target): Use linux_get_pc_32bit and
3937 linux_set_pc_32bit.
3938 * linux-cris-low.c (debug_threads): Remove declaration.
3939 (cris_get_pc, cris_set_pc,): Remove.
3940 (the_low_target): Use linux_get_pc_32bit and
3941 linux_set_pc_32bit.
3942 * linux-crisv32-low.c (debug_threads): Remove declaration.
3943 (cris_get_pc, cris_set_pc): Remove.
3944 (the_low_target): Use linux_get_pc_32bit and
3945 linux_set_pc_32bit.
3946 * linux-low.c: Include inttypes.h.
3947 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3948 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3949 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3950 (the_low_target): Use linux_get_pc_32bit and
3951 linux_set_pc_32bit.
3952 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3953 (the_low_target): Use linux_get_pc_32bit and
3954 linux_set_pc_32bit.
3955 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3956 (the_low_target): Use linux_get_pc_32bit and
3957 linux_set_pc_32bit.
3958 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3959 (the_low_target): Use linux_get_pc_32bit and
3960 linux_set_pc_32bit.
3961 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3962 (the_low_target): Use linux_get_pc_32bit and
3963 linux_set_pc_32bit.
3964
39652016-01-18 Gary Benson <gbenson@redhat.com>
3966
3967 * configure.ac (AC_FUNC_FORK): New check.
3968 * config.in: Regenerate.
3969 * configure: Likewise.
3970
39712016-01-14 Yao Qi <yao.qi@linaro.org>
3972
3973 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3974 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3975 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3976 arm_get_next_pcs_ctor.
3977
39782016-01-12 Josh Stone <jistone@redhat.com>
3979 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3980
3981 * inferiors.h: Include "gdb_vecs.h".
3982 (struct process_info): Add syscalls_to_catch.
3983 * inferiors.c (remove_process): Free syscalls_to_catch.
3984 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3985 syscall_return stops.
3986 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3987 * server.c (handle_general_set): Handle QCatchSyscalls.
3988 (handle_query): Report support for QCatchSyscalls.
3989 * target.h (struct target_ops): Add supports_catch_syscall.
3990 (target_supports_catch_syscall): New macro.
3991 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3992 (struct lwp_info): Add syscall_state.
3993 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3994 Maintain syscall_state and syscalls_to_catch across exec.
3995 (get_syscall_trapinfo): New function, proxy to the_low_target.
3996 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3997 (linux_low_filter_event): Toggle syscall_state entry/return for
3998 syscall traps, and set it ignored for all others.
3999 (gdb_catching_syscalls_p): New function.
4000 (gdb_catch_this_syscall_p): New function.
4001 (linux_wait_1): Handle SYSCALL_SIGTRAP.
4002 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
4003 (linux_supports_catch_syscall): New function.
4004 (linux_target_ops): Install it.
4005 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
4006 (the_low_target): Install it.
4007
40082016-01-12 Mike Frysinger <vapier@gentoo.org>
4009
4010 * acinclude.m4: Include new ../warning.m4 file.
4011 * configure: Regenerated.
4012 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
4013
40142016-01-12 Mike Frysinger <vapier@gentoo.org>
4015
4016 * ax.c (is_goto_target): Mark static.
4017 * linux-low.c (register_addr): Likewise.
4018 (linux_fetch_registers, linux_store_registers): Likewise.
4019 * mem-break.c (any_persistent_commands): Fix old prototype.
4020 (add_commands_to_breakpoint): Mark static.
4021 * regcache.c (find_register_by_name): Delete unused func.
4022 * remote-utils.c (hex_or_minus_one): Mark static.
4023 * server.c (monitor_show_help): Mark static.
4024 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
4025 handle_v_requests): Likewise.
4026
40272016-01-12 Pedro Alves <palves@redhat.com>
4028
4029 Remove use of the registered trademark symbol throughout.
4030
40312016-01-08 Yao Qi <yao.qi@linaro.org>
4032
4033 * remote-utils.c (getpkt): If c is '\003', call target hook
4034 request_interrupt.
4035
40362016-01-06 Yao Qi <yao.qi@linaro.org>
4037
4038 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
4039 linux-aarch32-low.c.
4040 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4041 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4042 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4043 (thumb2_breakpoint): Declare.
4044 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
4045 linux-aarch32-low.h.
4046 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4047 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
4048 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4049
40502016-01-01 Joel Brobecker <brobecker@adacore.com>
4051
4052 * gdbreplay.c (gdbreplay_version): Change copyright year in
4053 version message.
4054 * server.c (gdbserver_version): Likewise.
4055
40562015-12-28 Patrick Palka <patrick@parcs.ath.cx>
4057
4058 * server.c (crc32_table): Delete.
4059 (crc32): Use libiberty's xcrc32 function.
4060
40612015-12-22 Joel Brobecker <brobecker@adacore.com>
4062
4063 * lynx-low.c (lynx_delete_thread_callback): New function.
4064 (lynx_mourn): Properly delete our process and all of its
4065 threads. Remove call to clear_inferiors.
4066
40672015-12-22 Joel Brobecker <brobecker@adacore.com>
4068
4069 * target.c (thread_search_callback): Add check that
4070 the thread_stopped target callback is not NULL before
4071 calling it.
4072
40732015-12-21 Yao Qi <yao.qi@linaro.org>
4074
4075 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4076 arm breakpoint.
4077
40782015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4079
4080 * server.c (handle_query): Call target_supports_software_single_step.
4081
40822015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4083
4084 * linux-low.c (single_step): New function.
4085 (linux_resume_one_lwp_throw): Call single_step.
4086 (start_step_over): Likewise.
4087
40882015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4089
4090 * Makefile.in (SFILES): Append arch/arm-linux.c,
4091 arch/arm-get-next-pcs.c.
4092 (arm-linux.o): New rule.
4093 (arm-get-next-pcs.o): New rule.
4094 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4095 arm-linux.o.
4096 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4097 to linux-aarch32-low.c.
4098 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4099 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4100 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4101 (thumb2_breakpoint_len): Likewise.
4102 (arm_is_thumb_mode): Make non-static.
4103 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4104 from linux-aarch32-low.c.
4105 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4106 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4107 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4108 (thumb2_breakpoint_len): Likewise.
4109 (arm_is_thumb_mode): New declaration.
4110 * linux-arm-low.c: Include arch/arm-linux.h
4111 aarch/arm-get-next-pcs.h, sys/syscall.h.
4112 (get_next_pcs_ops): New struct.
4113 (get_next_pcs_addr_bits_remove): New function.
4114 (get_next_pcs_is_thumb): New function.
4115 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4116 (arm_sigreturn_next_pc): Likewise.
4117 (get_next_pcs_syscall_next_pc): Likewise.
4118 (arm_gdbserver_get_next_pcs): Likewise.
4119 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4120 Initialize.
4121 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4122 * server.h: Include gdb_vecs.h.
4123
41242015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4125
4126 * Makefile.in (SFILES): Append common/common-regcache.c.
4127 (OBS): Append common-regcache.o.
4128 (common-regcache.o): New rule.
4129 * regcache.c (init_register_cache): Initialize cache to
4130 REG_UNAVAILABLE.
4131 (regcache_raw_read_unsigned): New function.
4132 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4133 register_status enum.
4134
41352015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4136
4137 * linux-aarch64-low.c (the_low_targets): Rename
4138 breakpoint_reinsert_addr to get_next_pcs.
4139 * linux-arm-low.c (the_low_targets): Likewise.
4140 * linux-bfin-low.c (the_low_targets): Likewise.
4141 * linux-cris-low.c (the_low_targets): Likewise.
4142 * linux-crisv32-low.c (the_low_targets): Likewise.
4143 * linux-low.c (can_software_single_step): Likewise.
4144 (install_software_single_step_breakpoints): New function.
4145 (start_step_over): Use install_software_single_step_breakpoints.
4146 * linux-low.h: New CORE_ADDR vector.
4147 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4148 get_next_pcs.
4149 * linux-mips-low.c (the_low_targets): Likewise.
4150 * linux-nios2-low.c (the_low_targets): Likewise.
4151 * linux-sparc-low.c (the_low_targets): Likewise.
4152
41532015-12-17 Pedro Alves <palves@redhat.com>
4154
4155 * linux-low.c (linux_kill_one_lwp): Remove references to
4156 LinuxThreads.
4157 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4158 to 'kill'.
4159 (linux_init_signals): Delete.
4160 (initialize_low): Adjust.
4161 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4162
41632015-12-16 Pedro Alves <palves@redhat.com>
4164
4165 * configure.ac (compiler warning flags): When testing a
4166 -Wno-foo option, check whether -Wfoo works instead.
4167 * configure: Regenerate.
4168
41692015-12-11 Don Breazeal <donb@codesourcery.com>
4170
4171 * server.c (process_serial_event): Don't exit from gdbserver
4172 in remote mode if there are still active inferiors.
4173
41742015-12-11 Yao Qi <yao.qi@linaro.org>
4175
4176 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4177 arm_breakpoint_at if the process is 32-bit.
4178
41792015-12-11 Yao Qi <yao.qi@linaro.org>
4180
4181 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4182 arm breakpoint.
4183
41842015-12-07 Yao Qi <yao.qi@linaro.org>
4185
4186 * configure.srv: Append arm.o to srv_tgtobj for
4187 aarch64*-*-linux* target.
4188 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4189 from linux-arm-low.c.
4190 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4191 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4192 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4193 (thumb2_breakpoint_len): Likewise.
4194 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4195 (arm_breakpoint_kinds): Likewise.
4196 (arm_breakpoint_kind_from_pc): Likewise.
4197 (arm_sw_breakpoint_from_kind): Likewise.
4198 (arm_breakpoint_kind_from_current_state): Likewise.
4199 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4200 (arm_sw_breakpoint_from_kind): Declare.
4201 (arm_breakpoint_kind_from_current_state): Declare.
4202 (arm_breakpoint_at): Declare.
4203 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4204 arm_sw_breakpoint_from_kind if process is 32-bit.
4205 (aarch64_breakpoint_kind_from_pc): New function.
4206 (aarch64_breakpoint_kind_from_current_state): New function.
4207 (the_low_target): Initialize fields breakpoint_kind_from_pc
4208 and breakpoint_kind_from_current_state.
4209 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4210 linux-aarch32-low.c.
4211 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4212 (arm_breakpoint, arm_breakpoint_len): Likewise.
4213 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4214 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4215 (arm_is_thumb_mode): Likewise.
4216 (arm_breakpoint_at): Likewise.
4217 (arm_breakpoint_kind_from_pc): Likewise.
4218 (arm_sw_breakpoint_from_kind): Likewise.
4219 (arm_breakpoint_kind_from_current_state): Likewise.
4220
4221 Revert:
4222 2015-08-04 Yao Qi <yao.qi@linaro.org>
4223
4224 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4225 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4226 * server.c (extended_protocol): Remove "static".
4227 * server.h (extended_protocol): Declare it.
4228
42292015-12-04 Josh Stone <jistone@redhat.com>
4230
4231 * target.h (struct target_ops) <arch_setup>: Rename to ...
4232 (struct target_ops) <post_create_inferior>: ... this.
4233 (target_arch_setup): Rename to ...
4234 (target_post_create_inferior): ... this, calling post_create_inferior.
4235 * server.c (start_inferior): Update target_arch_setup calls to
4236 target_post_create_inferior.
4237 * linux-low.c (linux_low_ptrace_options): Forward declare.
4238 (linux_arch_setup): Update its comment for general use.
4239 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4240 (struct linux_target_ops): Use linux_post_create_inferior.
4241 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4242 to post_create_inferior.
4243 * nto-low.c (struct nto_target_ops): Likewise.
4244 * spu-low.c (struct spu_target_ops): Likewise.
4245 * win32-low.c (struct win32_target_ops): Likewise.
4246
42472015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4248
4249 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4250
42512015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4252
4253 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4254 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4255 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4256 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4257 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4258 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4259 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4260 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4261 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4262 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4263 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4264 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4265
42662015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4267
4268 * linux-low.c (linux_look_up_symbols): Don't call
4269 linux_supports_traceclone.
4270 * linux-low.h (thread_db_init): Remove use_events argument.
4271 * thread-db.c (thread_db_use_event): Remove global variable.
4272 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4273 (struct thread_db) <td_create_bp>: Remove field.
4274 (thread_db_create_event): Remove function.
4275 (thread_db_enable_reporting): Likewise.
4276 (find_one_thread): Don't check for thread_db_use_events.
4277 (attach_thread): Likewise.
4278 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4279 (try_thread_db_load_1): Don't check for thread_db_use_events.
4280 (thread_db_init): Remove use_events argument and thread events
4281 handling.
4282 (remove_thread_event_breakpoints): Remove function.
4283 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4284
42852015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4286
4287 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4288 New function.
4289 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4290 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4291 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4292 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4293 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4294 Initialize.
4295 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4296 New function.
4297 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4298 * linux-low.c (can_hardware_single_step): Use
4299 supports_hardware_single_step.
4300 (can_software_single_step): New function.
4301 (start_step_over): Call can_software_single_step.
4302 (linux_supports_hardware_single_step): New function.
4303 (struct target_ops) <supports_software_single_step>: Initialize.
4304 * linux-low.h (struct linux_target_ops)
4305 <supports_hardware_single_step>: Initialize.
4306 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4307 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4308 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4309 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4310 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4311 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4312 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4313 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4314 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4315 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4316 Initialize.
4317 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4318 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4319 Initialize.
4320 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4321 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4322 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4323 New function.
4324 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4325 * target.h (struct target_ops): <supports_software_single_step>:
4326 New field.
4327 (target_supports_software_single_step): New macro.
4328
43292015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4330
4331 * linux-low.c (linux_wait_1): Fix pc advance condition.
4332 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4333 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4334
43352015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4336
4337 * linux-arm-low.c (arm_is_thumb_mode): New function.
4338 (arm_breakpoint_at): Use arm_is_thumb_mode.
4339 (arm_breakpoint_kind_from_current_state): New function.
4340 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4341 Initialize.
4342 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4343 (linux_breakpoint_kind_from_current_state): New function.
4344 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4345 * linux-low.h (struct linux_target_ops)
4346 <breakpoint_kind_from_current_state>: New field.
4347 * target.h (struct target_ops): Likewise.
4348 (target_breakpoint_kind_from_current_state): New macro.
4349
43502015-11-30 Pedro Alves <palves@redhat.com>
4351
4352 * linux-low.c (linux_resume): Wake up the event loop before
4353 returning.
4354
43552015-11-30 Pedro Alves <palves@redhat.com>
4356
4357 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4358 check.
4359 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4360 to -1.
4361 * target.c (struct thread_search): New structure.
4362 (thread_search_callback): New function.
4363 (prev_general_thread): New global.
4364 (prepare_to_access_memory, done_accessing_memory): New functions.
4365 * target.h (prepare_to_access_memory, done_accessing_memory):
4366 Replace macros with function declarations.
4367
43682015-11-30 Pedro Alves <palves@redhat.com>
4369
4370 PR 14618
4371 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4372 report TARGET_WAITKIND_NO_RESUMED.
4373 * remote-utils.c (prepare_resume_reply): Handle
4374 TARGET_WAITKIND_NO_RESUMED.
4375 * server.c (report_no_resumed): New global.
4376 (handle_query) <qSupported>: Handle "no-resumed+". Report
4377 "no-resumed+" support.
4378 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4379 return error if the client doesn't support no-resumed events.
4380 (push_stop_notification): New function.
4381 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4382 events if the client supports them.
4383
43842015-11-30 Pedro Alves <palves@redhat.com>
4385
4386 * linux-low.c (thread_still_has_status_pending_p): Don't check
4387 vCont;t here.
4388 (lwp_resumed): New function.
4389 (status_pending_p_callback): Return early if the LWP is not
4390 supposed to be resumed.
4391
43922015-11-30 Pedro Alves <palves@redhat.com>
4393
4394 * linux-low.c (handle_extended_wait): Assert that the LWP's
4395 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4396 thread create events, leave the new child's status pending.
4397 (linux_low_filter_event): If GDB wants to hear about thread exit
4398 events, leave the LWP marked dead and don't delete it.
4399 (linux_wait_for_event_filtered): Don't check for thread exit.
4400 (filter_exit_event): New function.
4401 (linux_wait_1): Use it, when returning an exit event.
4402 (linux_resume_one_lwp_throw): Assert that the LWP's
4403 waitstatus is TARGET_WAITKIND_IGNORE.
4404 * remote-utils.c (prepare_resume_reply): Handle
4405 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4406 * server.c (report_thread_events): New global.
4407 (handle_general_set): Handle QThreadEvents.
4408 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4409 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4410 TARGET_WAITKIND_THREAD_EXITED.
4411 * server.h (report_thread_events): Declare.
4412
44132015-11-30 Pedro Alves <palves@redhat.com>
4414
4415 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4416 the thread's last_resume_kind was resume_stop.
4417
44182015-11-30 Pedro Alves <palves@redhat.com>
4419
4420 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4421 before returning.
4422
44232015-11-30 Pedro Alves <palves@redhat.com>
4424
4425 * server.c (handle_v_requests): Handle vCtrlC.
4426
44272015-11-30 Pedro Alves <palves@redhat.com>
4428
4429 * gdbthread.h (find_any_thread_of_pid): Declare.
4430 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4431 functions.
4432 * server.c (handle_query): If current_thread is NULL, look for
4433 another thread of the selected process.
4434
44352015-11-26 Daniel Colascione <dancol@dancol.org>
4436 Simon Marchi <simon.marchi@ericsson.com>
4437
4438 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4439 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4440 name in reply.
4441 * target.h (struct target_ops) <thread_name>: New field.
4442 (target_thread_name): New macro.
4443
44442015-11-23 Joel Brobecker <brobecker@adacore.com>
4445
4446 * regcache.h (regcache_invalidate_pid): Add declaration.
4447 * regcache.c (regcache_invalidate_pid): New function, extracted
4448 from regcache_invalidate.
4449 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4450 Add trivial documentation comment.
4451 * lynx-low.c: Use regcache_invalidate_pid instead of
4452 regcache_invalidate.
4453
44542015-11-23 Joel Brobecker <brobecker@adacore.com>
4455
4456 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4457 and Elf64_auxv_t if the target is Android.
4458
44592015-11-22 Doug Evans <xdje42@gmail.com>
4460
4461 * target.h: #include <sys/types.h>.
4462
44632015-11-19 Pedro Alves <palves@redhat.com>
4464
4465 * linux-low.c (linux_process_qsupported): Change prototype.
4466 Adjust.
4467 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4468 Change prototype.
4469 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4470 and adjust to loop over all features.
4471 * server.c (handle_query) <qSupported>: Adjust to call
4472 target_process_qsupported once, passing it a vector of unprocessed
4473 features.
4474 * target.h (struct target_ops) <process_qsupported>: Change
4475 prototype.
4476 (target_process_qsupported): Adjust.
4477
44782015-11-19 Pedro Alves <palves@redhat.com>
4479
4480 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4481 mode.
4482 * configure: Regenerate.
4483
44842015-11-19 Pedro Alves <palves@redhat.com>
4485
4486 * configure: Regenerate.
4487
44882015-11-19 Yao Qi <yao.qi@linaro.org>
4489
4490 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4491 type to uint32_t.
4492
44932015-11-19 Yao Qi <yao.qi@linaro.org>
4494
4495 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4496 (struct aarch64_operand): Move enum out.
4497
44982015-11-19 Yao Qi <yao.qi@linaro.org>
4499
4500 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4501 struct user_fpsimd_state *.
4502 (aarch64_store_fpregset): Likewise.
4503
45042015-11-19 Yao Qi <yao.qi@linaro.org>
4505
4506 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4507 struct user_pt_regs *.
4508 (aarch64_store_gregset): Likewise.
4509
45102015-11-18 Pedro Alves <palves@redhat.com>
4511
4512 * Makefile.in (all_object_files): Add $IPA_OBJS.
4513
45142015-11-17 Pedro Alves <palves@redhat.com>
4515
4516 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4517 GDB_SIGNAL_0 and gdb_signal_to_string.
4518
45192015-11-17 Pedro Alves <palves@redhat.com>
4520
4521 * win32-low.c (handle_output_debug_string): Remove parameter.
4522 (win32_kill): Remove our_status local and adjust call to
4523 handle_output_debug_string.
4524 (get_child_debug_event): Adjust call to
4525 handle_output_debug_string.
4526
45272015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4528
4529 * linux-mips-low.c (mips_fill_gregset): Add cast.
4530 (mips_store_gregset): Likewise.
4531 (mips_fill_fpregset): Likewise.
4532 (mips_store_fpregset): Likewise.
4533
45342015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4535
4536 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4537 priv.
4538
45392015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4540
4541 * linux-mips-low.c (mips_linux_new_thread): Change type of
4542 watch_type to enum target_hw_bp_type.
4543
45442015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4545
4546 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4547 Change return type to arm_hwbp_type.
4548
45492015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4550
4551 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4552 (arm_store_gregset): Likewise.
4553 * linux-arm-low.c (arm_get_hwcap): Likewise.
4554 (arm_read_description): Likewise.
4555
45562015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4557
4558 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4559
45602015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4561
4562 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4563 (ppc_fill_vsxregset): Likewise.
4564 (ppc_store_vsxregset): Likewise.
4565 (ppc_fill_vrregset): Likewise.
4566 (ppc_store_vrregset): Likewise.
4567 (ppc_fill_evrregset): Likewise.
4568 (ppc_store_evrregset): Likewise.
4569
45702015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4571
4572 * linux-ppc-low.c (ppc_usrregs_info): Remove
4573 forward-declaration.
4574 (ppc_arch_setup): Move lower in file.
4575
45762015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4577
4578 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4579 (ps_pdwrite): Likewise.
4580
45812015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4582
4583 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4584 to after assert checks.
4585
45862015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4587
4588 * proc-service.c (ps_pdread): Add/adjust casts.
4589 (ps_pdwrite): Add/adjust casts.
4590
45912015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4592
4593 * server.c (handle_search_memory_1): Cast return value of
4594 memmem.
4595
45962015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4597
4598 * server.c (write_qxfer_response): Change type of data to
4599 gdb_byte *.
4600
46012015-10-29 Pedro Alves <palves@redhat.com>
4602
4603 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4604
46052015-10-29 Pedro Alves <palves@redhat.com>
4606
4607 * tracepoint.c (clear_installed_tracepoints): Add casts.
4608
46092015-10-29 Pedro Alves <palves@redhat.com>
4610
4611 * server.c (handle_v_cont, process_serial_event): Add enum
4612 gdb_signal casts to signal parsing code.
4613
46142015-10-29 Pedro Alves <palves@redhat.com>
4615
4616 * linux-low.h (NULL_REGSET): Define.
4617 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4618 * linux-arm-low.c (arm_regsets): Likewise.
4619 * linux-crisv32-low.c (cris_regsets): Likewise.
4620 * linux-m68k-low.c (m68k_regsets): Likewise.
4621 * linux-mips-low.c (mips_regsets): Likewise.
4622 * linux-nios2-low.c (nios2_regsets): Likewise.
4623 * linux-ppc-low.c (ppc_regsets): Likewise.
4624 * linux-s390-low.c (s390_regsets): Likewise.
4625 * linux-sh-low.c (sh_regsets): Likewise.
4626 * linux-sparc-low.c (sparc_regsets): Likewise.
4627 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4628 * linux-tile-low.c (tile_regsets): Likewise.
4629 * linux-x86-low.c (x86_regsets): Likewise.
4630 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4631
46322015-10-29 Pedro Alves <palves@redhat.com>
4633
4634 * linux-low.h (NULL_REGSET): Define.
4635 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4636 * linux-arm-low.c (arm_regsets): Likewise.
4637 * linux-crisv32-low.c (cris_regsets): Likewise.
4638 * linux-m68k-low.c (m68k_regsets): Likewise.
4639 * linux-mips-low.c (mips_regsets): Likewise.
4640 * linux-nios2-low.c (nios2_regsets): Likewise.
4641 * linux-ppc-low.c (ppc_regsets): Likewise.
4642 * linux-s390-low.c (s390_regsets): Likewise.
4643 * linux-sh-low.c (sh_regsets): Likewise.
4644 * linux-sparc-low.c (sparc_regsets): Likewise.
4645 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4646 * linux-tile-low.c (tile_regsets): Likewise.
4647 * linux-x86-low.c (x86_regsets): Likewise.
4648 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4649
46502015-10-26 Doug Evans <dje@google.com>
4651
4652 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4653
46542015-10-26 Doug Evans <dje@google.com>
4655
4656 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4657
46582015-10-26 Doug Evans <dje@google.com>
4659
4660 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4661 for debug_printf.
4662 (attach_thread, find_new_threads_callback): Ditto.
4663
46642015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4665
4666 * mem-break.h (set_breakpoint_data): Remove.
4667
46682015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4669
4670 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4671 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4672 (initialize_low): Remove set_breakpoint_data call.
4673 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4674 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4675 (initialize_low): Remove set_breakpoint_data call.
4676 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4677 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4678 (initialize_low): Remove set_breakpoint_data call.
4679
46802015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4681
4682 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4683 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4684 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4685 * target.h (target_breakpoint_kind_from_pc): New macro.
4686
46872015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4688
4689 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4690 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4691 the default breakpoint kind.
4692
46932015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4694
4695 * linux-arm-low.c (arm_supports_z_point_type): Add software
4696 breakpoint support.
4697
46982015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4699
4700 * linux-arm-low.c: Refactor breakpoint definitions.
4701 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4702 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4703
47042015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4705
4706 * Makefile.in: Add arm.c/o.
4707 * configure.srv: Likewise.
4708 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4709 (arm_breakpoint_kind_from_pc): New function.
4710 (arm_sw_breakpoint_from_kind): Return proper kind.
4711 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4712
47132015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4714
4715 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4716 removal.
4717 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4718 (struct raw_breakpoint) <size>: Remove.
4719 (struct raw_breakpoint) <kind>: Add.
4720 (bp_size): New function.
4721 (bp_opcode): Likewise.
4722 (find_raw_breakpoint_at): Adjust for kind.
4723 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4724 (remove_memory_breakpoint): Adjust for kind call bp_size.
4725 (set_raw_breakpoint_at): Adjust for kind.
4726 (set_breakpoint): Likewise.
4727 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4728 (delete_raw_breakpoint): Adjust for kind.
4729 (delete_breakpoint): Likewise.
4730 (find_gdb_breakpoint): Likewise.
4731 (set_gdb_breakpoint_1): Likewise.
4732 (set_gdb_breakpoint): Likewise.
4733 (delete_gdb_breakpoint_1): Likewise.
4734 (delete_gdb_breakpoint): Likewise.
4735 (uninsert_raw_breakpoint): Likewise.
4736 (reinsert_raw_breakpoint): Likewise.
4737 (set_breakpoint_data): Remove.
4738 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4739 (check_mem_read): Adjust for kind call bp_size.
4740 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4741 (clone_one_breakpoint): Adjust for kind.
4742 * mem-break.h (set_gdb_breakpoint): Likewise.
4743 (delete_gdb_breakpoint): Likewise.
4744 * server.c (process_serial_event): Likewise.
4745
47462015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4747
4748 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4749 (struct linux_target_ops) <breakpoint>: Remove.
4750 (struct linux_target_ops) <breakpoint_len>: Remove.
4751 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4752 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4753 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4754 (arm_sw_breakpoint_from_kind): New function.
4755 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4756 (struct linux_target_ops) <breakpoint>: Remove.
4757 (struct linux_target_ops) <breakpoint_len>: Remove.
4758 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4759 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4760 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4761 (struct linux_target_ops) <breakpoint>: Remove.
4762 (struct linux_target_ops) <breakpoint_len>: Remove.
4763 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4764 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4765 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4766 (struct linux_target_ops) <breakpoint>: Remove.
4767 (struct linux_target_ops) <breakpoint_len>: Remove.
4768 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4769 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4770 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4771 and sw_breakpoint_from_kind to increment the pc.
4772 (linux_breakpoint_kind_from_pc): New function.
4773 (linux_sw_breakpoint_from_kind): New function.
4774 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4775 (initialize_low): Call breakpoint_kind_from_pc and
4776 sw_breakpoint_from_kind to replace breakpoint_data/len.
4777 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4778 New field.
4779 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4780 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4781 (struct linux_target_ops) <breakpoint>: Remove.
4782 (struct linux_target_ops) <breakpoint_len>: Remove.
4783 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4784 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4785 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4786 (struct linux_target_ops) <breakpoint>: Remove.
4787 (struct linux_target_ops) <breakpoint_len>: Remove.
4788 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4789 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4790 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4791 (struct linux_target_ops) <breakpoint>: Remove.
4792 (struct linux_target_ops) <breakpoint_len>: Remove.
4793 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4794 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4795 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4796 (struct linux_target_ops) <breakpoint>: Remove.
4797 (struct linux_target_ops) <breakpoint_len>: Remove.
4798 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4799 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4800 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4801 (struct linux_target_ops) <breakpoint>: Remove.
4802 (struct linux_target_ops) <breakpoint_len>: Remove.
4803 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4804 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4805 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4806 (struct linux_target_ops) <breakpoint>: Remove.
4807 (struct linux_target_ops) <breakpoint_len>: Remove.
4808 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4809 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4810 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4811 (struct linux_target_ops) <breakpoint>: Remove.
4812 (struct linux_target_ops) <breakpoint_len>: Remove.
4813 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4814 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4815 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4816 (struct linux_target_ops) <breakpoint>: Remove.
4817 (struct linux_target_ops) <breakpoint_len>: Remove.
4818 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4819 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4820 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4821 (struct linux_target_ops) <breakpoint>: Remove.
4822 (struct linux_target_ops) <breakpoint_len>: Remove.
4823 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4824 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4825 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4826 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4827 (struct linux_target_ops) <breakpoint>: Remove.
4828 (struct linux_target_ops) <breakpoint_len>: Remove.
4829 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4830 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4831 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4832 (struct linux_target_ops) <breakpoint>: Remove.
4833 (struct linux_target_ops) <breakpoint_len>: Remove.
4834 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4835 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4836
48372015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4838
4839 * linux-cris-low.c (cris_get_pc): Remove void arg.
4840
48412015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4842
4843 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4844 variable name.
4845
48462015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4847
4848 * inferiors.c (thread_pid_matches_callback): New function.
4849 (find_thread_process): New function.
4850 (remove_thread): Reset current_thread.
4851 (remove_process): Assert threads have been removed first.
4852
48532015-10-15 Yao Qi <yao.qi@linaro.org>
4854
4855 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4856 if it is 3.
4857 (aarch64_remove_point): Likewise.
4858 * regcache.c (regcache_register_size): New function.
4859
48602015-10-12 Yao Qi <yao.qi@linaro.org>
4861
4862 * linux-aarch64-low.c: Update all callers as emit_load_store
4863 is renamed to aarch64_emit_load_store.
4864
48652015-10-12 Yao Qi <yao.qi@linaro.org>
4866
4867 * linux-aarch64-low.c: Update all callers of function renaming
4868 from emit_insn to aarch64_emit_insn.
4869
48702015-10-12 Yao Qi <yao.qi@linaro.org>
4871
4872 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4873 arch/aarch64-insn.h.
4874 (struct aarch64_memory_operand): Likewise.
4875 (ENCODE): Likewise.
4876 (emit_insn): Move to arch/aarch64-insn.c.
4877 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4878 (emit_load_store): Move to arch/aarch64-insn.c.
4879 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4880 (can_encode_int32): Remove.
4881
48822015-10-12 Yao Qi <yao.qi@linaro.org>
4883
4884 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4885 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4886 (aarch64_relocate_instruction): Likewise.
4887 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4888 (struct aarch64_insn_visitor): Likewise.
4889
48902015-10-12 Yao Qi <yao.qi@linaro.org>
4891
4892 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4893 (struct aarch64_insn_visitor): New.
4894 (struct aarch64_insn_relocation_data): New.
4895 (aarch64_ftrace_insn_reloc_b): New function.
4896 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4897 (aarch64_ftrace_insn_reloc_cb): Likewise.
4898 (aarch64_ftrace_insn_reloc_tb): Likewise.
4899 (aarch64_ftrace_insn_reloc_adr): Likewise.
4900 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4901 (aarch64_ftrace_insn_reloc_others): Likewise.
4902 (visitor): New.
4903 (aarch64_relocate_instruction): Use visitor.
4904
49052015-10-12 Yao Qi <yao.qi@linaro.org>
4906
4907 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4908 int. Add argument buf.
4909 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4910 aarch64_relocate_instruction.
4911
49122015-10-12 Yao Qi <yao.qi@linaro.org>
4913
4914 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4915 argument insn. Remove local variable insn. Don't call
4916 target_read_uint32.
4917 (aarch64_install_fast_tracepoint_jump_pad): Call
4918 target_read_uint32.
4919
49202015-09-30 Yao Qi <yao.qi@linaro.org>
4921
4922 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4923 (emit_load_store_pair): Likewise.
4924
49252015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4926
4927 * dll.c (match_dll): Add cast(s).
4928 (unloaded_dll): Likewise.
4929 * linux-low.c (second_thread_of_pid_p): Likewise.
4930 (delete_lwp_callback): Likewise.
4931 (count_events_callback): Likewise.
4932 (select_event_lwp_callback): Likewise.
4933 (linux_set_resume_request): Likewise.
4934 * server.c (accumulate_file_name_length): Likewise.
4935 (emit_dll_description): Likewise.
4936 (handle_qxfer_threads_worker): Likewise.
4937 (visit_actioned_threads): Likewise.
4938 * thread-db.c (any_thread_of): Likewise.
4939 * tracepoint.c (same_process_p): Likewise.
4940 (match_blocktype): Likewise.
4941 (build_traceframe_info_xml): Likewise.
4942
49432015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4944
4945 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4946 assignment.
4947 (gdb_unparse_agent_expr): Likewise.
4948 * hostio.c (require_data): Likewise.
4949 (handle_pread): Likewise.
4950 * linux-low.c (disable_regset): Likewise.
4951 (fetch_register): Likewise.
4952 (store_register): Likewise.
4953 (get_dynamic): Likewise.
4954 (linux_qxfer_libraries_svr4): Likewise.
4955 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4956 (set_fast_tracepoint_jump): Likewise.
4957 (uninsert_fast_tracepoint_jumps_at): Likewise.
4958 (reinsert_fast_tracepoint_jumps_at): Likewise.
4959 (validate_inserted_breakpoint): Likewise.
4960 (clone_agent_expr): Likewise.
4961 * regcache.c (init_register_cache): Likewise.
4962 * remote-utils.c (putpkt_binary_1): Likewise.
4963 (decode_M_packet): Likewise.
4964 (decode_X_packet): Likewise.
4965 (look_up_one_symbol): Likewise.
4966 (relocate_instruction): Likewise.
4967 (monitor_output): Likewise.
4968 * server.c (handle_search_memory): Likewise.
4969 (handle_qxfer_exec_file): Likewise.
4970 (handle_qxfer_libraries): Likewise.
4971 (handle_qxfer): Likewise.
4972 (handle_query): Likewise.
4973 (handle_v_cont): Likewise.
4974 (handle_v_run): Likewise.
4975 (captured_main): Likewise.
4976 * target.c (write_inferior_memory): Likewise.
4977 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4978 * tracepoint.c (init_trace_buffer): Likewise.
4979 (add_tracepoint_action): Likewise.
4980 (add_traceframe): Likewise.
4981 (add_traceframe_block): Likewise.
4982 (cmd_qtdpsrc): Likewise.
4983 (cmd_qtdv): Likewise.
4984 (cmd_qtstatus): Likewise.
4985 (response_source): Likewise.
4986 (response_tsv): Likewise.
4987 (cmd_qtnotes): Likewise.
4988 (gdb_collect): Likewise.
4989 (initialize_tracepoint): Likewise.
4990
49912015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4992
4993 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4994 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4995 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4996 <NOP>: New.
4997 (enum aarch64_condition_codes): New enum.
4998 (w0): New static global.
4999 (fp): Likewise.
5000 (lr): Likewise.
5001 (struct aarch64_memory_operand) <type>: New
5002 MEMORY_OPERAND_POSTINDEX type.
5003 (postindex_memory_operand): New helper function.
5004 (emit_ret): New function.
5005 (emit_load_store_pair): New function, factored out of emit_stp
5006 with support for MEMORY_OPERAND_POSTINDEX.
5007 (emit_stp): Rewrite using emit_load_store_pair.
5008 (emit_ldp): New function.
5009 (emit_load_store): Likewise.
5010 (emit_ldr): Mention post-index instruction in comment.
5011 (emit_ldrh): New function.
5012 (emit_ldrb): New function.
5013 (emit_ldrsw): Mention post-index instruction in comment.
5014 (emit_str): Likewise.
5015 (emit_subs): New function.
5016 (emit_cmp): Likewise.
5017 (emit_and): Likewise.
5018 (emit_orr): Likewise.
5019 (emit_orn): Likewise.
5020 (emit_eor): Likewise.
5021 (emit_mvn): Likewise.
5022 (emit_lslv): Likewise.
5023 (emit_lsrv): Likewise.
5024 (emit_asrv): Likewise.
5025 (emit_mul): Likewise.
5026 (emit_sbfm): Likewise.
5027 (emit_sbfx): Likewise.
5028 (emit_ubfm): Likewise.
5029 (emit_ubfx): Likewise.
5030 (emit_csinc): Likewise.
5031 (emit_cset): Likewise.
5032 (emit_nop): Likewise.
5033 (emit_ops_insns): New helper function.
5034 (emit_pop): Likewise.
5035 (emit_push): Likewise.
5036 (aarch64_emit_prologue): New function.
5037 (aarch64_emit_epilogue): Likewise.
5038 (aarch64_emit_add): Likewise.
5039 (aarch64_emit_sub): Likewise.
5040 (aarch64_emit_mul): Likewise.
5041 (aarch64_emit_lsh): Likewise.
5042 (aarch64_emit_rsh_signed): Likewise.
5043 (aarch64_emit_rsh_unsigned): Likewise.
5044 (aarch64_emit_ext): Likewise.
5045 (aarch64_emit_log_not): Likewise.
5046 (aarch64_emit_bit_and): Likewise.
5047 (aarch64_emit_bit_or): Likewise.
5048 (aarch64_emit_bit_xor): Likewise.
5049 (aarch64_emit_bit_not): Likewise.
5050 (aarch64_emit_equal): Likewise.
5051 (aarch64_emit_less_signed): Likewise.
5052 (aarch64_emit_less_unsigned): Likewise.
5053 (aarch64_emit_ref): Likewise.
5054 (aarch64_emit_if_goto): Likewise.
5055 (aarch64_emit_goto): Likewise.
5056 (aarch64_write_goto_address): Likewise.
5057 (aarch64_emit_const): Likewise.
5058 (aarch64_emit_call): Likewise.
5059 (aarch64_emit_reg): Likewise.
5060 (aarch64_emit_pop): Likewise.
5061 (aarch64_emit_stack_flush): Likewise.
5062 (aarch64_emit_zero_ext): Likewise.
5063 (aarch64_emit_swap): Likewise.
5064 (aarch64_emit_stack_adjust): Likewise.
5065 (aarch64_emit_int_call_1): Likewise.
5066 (aarch64_emit_void_call_2): Likewise.
5067 (aarch64_emit_eq_goto): Likewise.
5068 (aarch64_emit_ne_goto): Likewise.
5069 (aarch64_emit_lt_goto): Likewise.
5070 (aarch64_emit_le_goto): Likewise.
5071 (aarch64_emit_gt_goto): Likewise.
5072 (aarch64_emit_ge_got): Likewise.
5073 (aarch64_emit_ops_impl): New static global variable.
5074 (aarch64_emit_ops): New target function, return
5075 &aarch64_emit_ops_impl.
5076 (struct linux_target_ops): Install it.
5077
50782015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5079
5080 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5081 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5082 aarch64-ipa.o.
5083 * linux-aarch64-ipa.c: New file.
5084 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5085 and endian.h.
5086 (aarch64_get_thread_area): New target method.
5087 (extract_signed_bitfield): New helper function.
5088 (aarch64_decode_ldr_literal): New function.
5089 (enum aarch64_opcodes): New enum.
5090 (struct aarch64_register): New struct.
5091 (struct aarch64_operand): New struct.
5092 (x0): New static global.
5093 (x1): Likewise.
5094 (x2): Likewise.
5095 (x3): Likewise.
5096 (x4): Likewise.
5097 (w2): Likewise.
5098 (ip0): Likewise.
5099 (sp): Likewise.
5100 (xzr): Likewise.
5101 (aarch64_register): New helper function.
5102 (register_operand): Likewise.
5103 (immediate_operand): Likewise.
5104 (struct aarch64_memory_operand): New struct.
5105 (offset_memory_operand): New helper function.
5106 (preindex_memory_operand): Likewise.
5107 (enum aarch64_system_control_registers): New enum.
5108 (ENCODE): New macro.
5109 (emit_insn): New helper function.
5110 (emit_b): New function.
5111 (emit_bcond): Likewise.
5112 (emit_cb): Likewise.
5113 (emit_tb): Likewise.
5114 (emit_blr): Likewise.
5115 (emit_stp): Likewise.
5116 (emit_ldp_q_offset): Likewise.
5117 (emit_stp_q_offset): Likewise.
5118 (emit_load_store): Likewise.
5119 (emit_ldr): Likewise.
5120 (emit_ldrsw): Likewise.
5121 (emit_str): Likewise.
5122 (emit_ldaxr): Likewise.
5123 (emit_stxr): Likewise.
5124 (emit_stlr): Likewise.
5125 (emit_data_processing_reg): Likewise.
5126 (emit_data_processing): Likewise.
5127 (emit_add): Likewise.
5128 (emit_sub): Likewise.
5129 (emit_mov): Likewise.
5130 (emit_movk): Likewise.
5131 (emit_mov_addr): Likewise.
5132 (emit_mrs): Likewise.
5133 (emit_msr): Likewise.
5134 (emit_sevl): Likewise.
5135 (emit_wfe): Likewise.
5136 (append_insns): Likewise.
5137 (can_encode_int32_in): New helper function.
5138 (aarch64_relocate_instruction): New function.
5139 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5140 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5141 (struct linux_target_ops): Install aarch64_get_thread_area,
5142 aarch64_install_fast_tracepoint_jump_pad and
5143 aarch64_get_min_fast_tracepoint_insn_len.
5144
51452015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5146
5147 * Makefile.in (aarch64-insn.o): New rule.
5148 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5149
51502015-09-21 Yao Qi <yao.qi@linaro.org>
5151
5152 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5153
51542015-09-21 Yao Qi <yao.qi@linaro.org>
5155
5156 * tracepoint.c (max_jump_pad_size): Remove.
5157
51582015-09-18 Yao Qi <yao.qi@linaro.org>
5159
5160 * linux-aarch64-low.c: Don't include sys/uio.h.
5161 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5162
51632015-09-16 Wei-cheng Wang <cole945@gmail.com>
5164
5165 * tracepoint.c (eval_result_type): Change prototype.
5166 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5167
51682015-09-15 Pedro Alves <palves@redhat.com>
5169
5170 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5171 Check whether to report exec events instead of checking whether
5172 multiprocess is enabled.
5173
51742015-09-15 Pedro Alves <palves@redhat.com>
5175
5176 PR remote/18965
5177 * remote-utils.c (prepare_resume_reply): Merge
5178 TARGET_WAITKIND_VFORK_DONE switch case with the
5179 TARGET_WAITKIND_FORKED case.
5180
51812015-09-15 Yao Qi <yao.qi@linaro.org>
5182
5183 * server.c (handle_query): Check string comparison using
5184 "else if" instead of "if".
5185
51862015-09-15 Yao Qi <yao.qi@linaro.org>
5187
5188 * server.c (vCont_supported): New global variable.
5189 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5190 matches. Append ";vContSupported+" to own_buf.
5191 (handle_v_requests): Append ";s;S" to own_buf if target supports
5192 hardware single step or vCont_supported is false.
5193 (capture_main): Set vCont_supported to zero.
5194
51952015-09-15 Yao Qi <yao.qi@linaro.org>
5196
5197 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5198 it to ...
5199 (linux_supports_hardware_single_step): ... New function.
5200 (linux_target_ops): Update.
5201 * lynx-low.c (lynx_target_ops): Set field
5202 supports_hardware_single_step to target_can_do_hardware_single_step.
5203 * nto-low.c (nto_target_ops): Likewise.
5204 * spu-low.c (spu_target_ops): Likewise.
5205 * win32-low.c (win32_target_ops): Likewise.
5206 * target.c (target_can_do_hardware_single_step): New function.
5207 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5208 Remove. <supports_hardware_single_step>: New field.
5209 (target_supports_conditional_breakpoints): Remove.
5210 (target_supports_hardware_single_step): New macro.
5211 (target_can_do_hardware_single_step): Declare.
5212 * server.c (handle_query): Use target_supports_hardware_single_step
5213 instead of target_supports_conditional_breakpoints.
5214
52152015-09-15 Yao Qi <yao.qi@linaro.org>
5216
5217 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5218 function.
5219 (struct linux_target_ops the_low_target): Install
5220 aarch64_linux_siginfo_fixup.
5221
52222015-09-11 Don Breazeal <donb@codesourcery.com>
5223 Luis Machado <lgustavo@codesourcery.com>
5224
5225 * linux-low.c (linux_mourn): Static declaration.
5226 (linux_arch_setup): Move in front of
5227 handle_extended_wait.
5228 (linux_arch_setup_thread): New function.
5229 (handle_extended_wait): Handle exec events. Call
5230 linux_arch_setup_thread. Make event_lwp argument a
5231 pointer-to-a-pointer.
5232 (check_zombie_leaders): Do not check stopped threads.
5233 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5234 (linux_low_filter_event): Add lwp and thread for exec'ing
5235 non-leader thread if leader thread has been deleted.
5236 Refactor code into linux_arch_setup_thread and call it.
5237 Pass child lwp pointer by reference to handle_extended_wait.
5238 (linux_wait_for_event_filtered): Update comment.
5239 (linux_wait_1): Prevent clobbering exec event status.
5240 (linux_supports_exec_events): New function.
5241 (linux_target_ops) <supports_exec_events>: Initialize new member.
5242 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5243 new member.
5244 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5245 * server.c (report_exec_events): New global variable.
5246 (handle_query): Handle qSupported query for exec-events feature.
5247 (captured_main): Initialize report_exec_events.
5248 * server.h (report_exec_events): Declare new global variable.
5249 * target.h (struct target_ops) <supports_exec_events>: New
5250 member.
5251 (target_supports_exec_events): New macro.
5252 * win32-low.c (win32_target_ops) <supports_exec_events>:
5253 Initialize new member.
5254
52552015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5256
5257 * linux-low.c (linux_low_enable_btrace): Remove.
5258 (linux_target_ops): Replace linux_low_enable_btrace with
5259 linux_enable_btrace.
5260
52612015-09-03 Yao Qi <yao.qi@linaro.org>
5262
5263 * linux-aarch64-low.c (aarch64_insert_point): Call
5264 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5265 returns true.
5266
52672015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5268
5269 * linux-low.c (check_stopped_by_breakpoint): Use
5270 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5271
52722015-08-27 Pedro Alves <palves@redhat.com>
5273
5274 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5275
52762015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5277
5278 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5279 the XNEW-family equivalent.
5280 (compile_bytecodes): Likewise.
5281 * dll.c (loaded_dll): Likewise.
5282 * event-loop.c (append_callback_event): Likewise.
5283 (create_file_handler): Likewise.
5284 (create_file_event): Likewise.
5285 * hostio.c (handle_open): Likewise.
5286 * inferiors.c (add_thread): Likewise.
5287 (add_process): Likewise.
5288 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5289 * linux-arm-low.c (arm_new_process): Likewise.
5290 (arm_new_thread): Likewise.
5291 * linux-low.c (add_to_pid_list): Likewise.
5292 (linux_add_process): Likewise.
5293 (handle_extended_wait): Likewise.
5294 (add_lwp): Likewise.
5295 (enqueue_one_deferred_signal): Likewise.
5296 (enqueue_pending_signal): Likewise.
5297 (linux_resume_one_lwp_throw): Likewise.
5298 (linux_resume_one_thread): Likewise.
5299 (linux_read_memory): Likewise.
5300 (linux_write_memory): Likewise.
5301 * linux-mips-low.c (mips_linux_new_process): Likewise.
5302 (mips_linux_new_thread): Likewise.
5303 (mips_add_watchpoint): Likewise.
5304 * linux-x86-low.c (initialize_low_arch): Likewise.
5305 * lynx-low.c (lynx_add_process): Likewise.
5306 * mem-break.c (set_raw_breakpoint_at): Likewise.
5307 (set_breakpoint): Likewise.
5308 (add_condition_to_breakpoint): Likewise.
5309 (add_commands_to_breakpoint): Likewise.
5310 (clone_agent_expr): Likewise.
5311 (clone_one_breakpoint): Likewise.
5312 * regcache.c (new_register_cache): Likewise.
5313 * remote-utils.c (look_up_one_symbol): Likewise.
5314 * server.c (queue_stop_reply): Likewise.
5315 (start_inferior): Likewise.
5316 (queue_stop_reply_callback): Likewise.
5317 (handle_target_event): Likewise.
5318 * spu-low.c (fetch_ppc_memory): Likewise.
5319 (store_ppc_memory): Likewise.
5320 * target.c (set_target_ops): Likewise.
5321 * thread-db.c (thread_db_load_search): Likewise.
5322 (try_thread_db_load_1): Likewise.
5323 * tracepoint.c (add_tracepoint): Likewise.
5324 (add_tracepoint_action): Likewise.
5325 (create_trace_state_variable): Likewise.
5326 (cmd_qtdpsrc): Likewise.
5327 (cmd_qtro): Likewise.
5328 (add_while_stepping_state): Likewise.
5329 * win32-low.c (child_add_thread): Likewise.
5330 (get_image_name): Likewise.
5331
53322015-08-25 Yao Qi <yao.qi@linaro.org>
5333
5334 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5335
53362015-08-25 Yao Qi <yao.qi@linaro.org>
5337
5338 * Makefile.in (aarch64-linux.o): New rule.
5339 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5340 srv_tgtobj.
5341 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5342 (aarch64_init_debug_reg_state): Make it extern.
5343 (aarch64_linux_prepare_to_resume): Remove.
5344
53452015-08-25 Yao Qi <yao.qi@linaro.org>
5346
5347 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5348 lwp_arch_private_info and ptid_of_lwp.
5349
53502015-08-25 Yao Qi <yao.qi@linaro.org>
5351
5352 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5353 Find proc_info by find_process_pid. All callers updated.
5354
53552015-08-25 Yao Qi <yao.qi@linaro.org>
5356
5357 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5358 Remove.
5359 (debug_reg_change_callback): Remove.
5360 (aarch64_notify_debug_reg_change): Remove.
5361
53622015-08-25 Yao Qi <yao.qi@linaro.org>
5363
5364 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5365 Call current_lwp_ptid.
5366
53672015-08-25 Yao Qi <yao.qi@linaro.org>
5368
5369 * linux-aarch64-low.c (debug_reg_change_callback): Use
5370 debug_printf.
5371
53722015-08-25 Yao Qi <yao.qi@linaro.org>
5373
5374 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5375
53762015-08-25 Yao Qi <yao.qi@linaro.org>
5377
5378 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5379
53802015-08-25 Yao Qi <yao.qi@linaro.org>
5381
5382 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5383 the code.
5384
53852015-08-25 Yao Qi <yao.qi@linaro.org>
5386
5387 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5388 Remove.
5389 (debug_reg_change_callback): Remove argument entry and add argument
5390 lwp. Remove local variable thread. Don't print thread id in the
5391 debugging output. Don't check whether pid of thread equals to pid.
5392 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5393 iterate_over_lwps instead find_inferior.
5394
53952015-08-24 Pedro Alves <palves@redhat.com>
5396
5397 * inferiors.c (get_first_process): New function.
5398 * inferiors.h (get_first_process): New declaration.
5399 * remote-utils.c (read_ptid): Default to the first process in the
5400 list, instead of to the current thread's process.
5401
54022015-08-24 Pedro Alves <palves@redhat.com>
5403
5404 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5405 * event-loop.c: Likewise.
5406 * remote-utils.c: Likewise.
5407 * tracepoint.c: Likewise.
5408
54092015-08-24 Pedro Alves <palves@redhat.com>
5410
5411 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5412 ptid_get_lwp.
5413
54142015-08-21 Pedro Alves <palves@redhat.com>
5415
5416 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5417 instead of literal 1.
5418
54192015-08-21 Pedro Alves <palves@redhat.com>
5420
5421 * tdesc.c (default_description): Explicitly zero-initialize.
5422
54232015-08-21 Pedro Alves <palves@redhat.com>
5424
5425 PR gdb/18749
5426 * inferiors.c (remove_thread): Discard any pending stop reply for
5427 this thread.
5428 * server.c (remove_all_on_match_pid): Rename to ...
5429 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5430 instead of a pid.
5431 (discard_queued_stop_replies): Change parameter to a ptid. Now
5432 extern.
5433 (handle_v_kill, kill_inferior_callback, captured_main)
5434 (process_serial_event): Adjust.
5435 * server.h (discard_queued_stop_replies): Declare.
5436
54372015-08-21 Pedro Alves <palves@redhat.com>
5438
5439 * linux-low.c (wait_for_sigstop): Always switch to no thread
5440 selected if the previously current thread dies.
5441 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5442 process instead of the current thread's.
5443 * remote-utils.c (input_interrupt): Don't check if there's no
5444 current thread.
5445 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5446 current thread to the general thread fails, error out.
5447 (handle_qxfer_auxv, handle_qxfer_libraries)
5448 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5449 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5450 (handle_query): Check if there's a thread selected instead of
5451 checking whether there's any thread in the thread list.
5452 (handle_qxfer_threads, handle_qxfer_btrace)
5453 (handle_qxfer_btrace_conf): Don't error out early if there's no
5454 thread in the thread list.
5455 (handle_v_cont, myresume): Don't set the current thread to the
5456 continue thread.
5457 (process_serial_event) <Hg handling>: Also set thread_id if the
5458 previous general thread is still alive.
5459 (process_serial_event) <g/G handling>: If setting the current
5460 thread to the general thread fails, error out.
5461 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5462 thread's lwp instead of the current thread's.
5463 * target.c (set_desired_thread): If the desired thread was not
5464 found, leave the current thread pointing to NULL. Return an int
5465 (boolean) indicating success.
5466 * target.h (set_desired_thread): Change return type to int.
5467
54682015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5469
5470 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5471 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5472 #includes.
5473 (ps_get_thread_area): New function.
5474
54752015-08-19 Gary Benson <gbenson@redhat.com>
5476
5477 * hostio.c (handle_pread): Do not attempt to read more data
5478 than hostio_reply_with_data can fit in a packet.
5479
54802015-08-18 Joel Brobecker <brobecker@adacore.com>
5481
5482 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5483
54842015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5485
5486 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5487
54882015-08-06 Pedro Alves <palves@redhat.com>
5489
5490 * tracepoint.c (expr_eval_result): Now an int.
5491
54922015-08-06 Pedro Alves <palves@redhat.com>
5493
5494 * gdbthread.h (struct regcache): Forward declare.
5495 (struct thread_info) <regcache_data>: Now a struct regcache
5496 pointer.
5497 * inferiors.c (inferior_regcache_data)
5498 (set_inferior_regcache_data): Now work with struct regcache
5499 pointers.
5500 * inferiors.h (struct regcache): Forward declare.
5501 (inferior_regcache_data, set_inferior_regcache_data): Now work
5502 with struct regcache pointers.
5503 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5504 (free_register_cache_thread): Remove struct regcache pointer
5505 casts.
5506
55072015-08-06 Pedro Alves <palves@redhat.com>
5508
5509 * server.c (captured_main): On error, print the exception message
5510 to stderr, and if run_once is set, throw a quit.
5511
55122015-08-06 Pedro Alves <palves@redhat.com>
5513
5514 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5515 the current thread.
5516
55172015-08-06 Pedro Alves <palves@redhat.com>
5518
5519 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5520 reading beyond the passed in buffer length.
5521
55222015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5523
5524 * tracepoint.c (symbol_list) <required>: Remove.
5525
55262015-08-06 Pedro Alves <palves@redhat.com>
5527
5528 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5529 count if stopping and suspending threads.
5530 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5531 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5532 (linux_detach): Complete an ongoing step-over.
5533 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5534 throughout.
5535 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5536 (linux_wait_1): If passing a signal to the inferior after
5537 finishing a step-over, unsuspend and re-resume all lwps. If we
5538 see a single-step event but the thread should be continuing, don't
5539 pass the trap to gdb.
5540 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5541 internal_error instead of gdb_assert.
5542 (enqueue_pending_signal): New function.
5543 (check_ptrace_stopped_lwp_gone): Add debug output.
5544 (start_step_over): Use internal_error instead of gdb_assert.
5545 (complete_ongoing_step_over): New function.
5546 (linux_resume_one_thread): Don't resume a suspended thread.
5547 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5548 it stepping.
5549
55502015-08-06 Pedro Alves <palves@redhat.com>
5551
5552 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5553 (linux_thread_alive): Use lwp_is_marked_dead.
5554 (extended_event_reported): Delete.
5555 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5556 instead of extended_event_reported.
5557 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5558 as well.
5559 (lwp_is_marked_dead): New function.
5560 (lwp_running): Use lwp_is_marked_dead.
5561 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5562 comment.
5563
55642015-08-06 Pedro Alves <palves@redhat.com>
5565
5566 * linux-low.c (linux_wait_1): Move fork event output out of the
5567 !report_to_gdb check. Pass event_child->waitstatus to
5568 target_waitstatus_to_string instead of ourstatus.
5569
55702015-08-04 Yao Qi <yao.qi@linaro.org>
5571
5572 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5573 if current_thread is 32 bit.
5574
55752015-08-04 Yao Qi <yao.qi@linaro.org>
5576
5577 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5578 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5579 * server.c (extended_protocol): Remove "static".
5580 * server.h (extended_protocol): Declare it.
5581
55822015-08-04 Yao Qi <yao.qi@linaro.org>
5583
5584 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5585 both aarch64 and aarch32.
5586 (aarch64_set_pc): Likewise.
5587
55882015-08-04 Yao Qi <yao.qi@linaro.org>
5589
5590 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5591 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5592 arm-with-neon.xml to srv_xmlfiles.
5593 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5594 (is_64bit_tdesc): New function.
5595 (aarch64_linux_read_description): New function.
5596 (aarch64_arch_setup): Call aarch64_linux_read_description.
5597 (regs_info): Rename to regs_info_aarch64.
5598 (aarch64_regs_info): Return right regs_info.
5599 (initialize_low_arch): Call initialize_low_arch_aarch32.
5600
56012015-08-04 Yao Qi <yao.qi@linaro.org>
5602
5603 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5604 * linux-aarch32-low.c: New file.
5605 * linux-aarch32-low.h: New file.
5606 * linux-arm-low.c (arm_fill_gregset): Move it to
5607 linux-aarch32-low.c.
5608 (arm_store_gregset): Likewise.
5609 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5610 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5611 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5612 (regs_info): Rename to regs_info_arm.
5613 (arm_regs_info): Return regs_info_aarch32 if
5614 have_ptrace_getregset is 1 and target description is
5615 arm_with_neon or arm_with_vfpv3.
5616 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5617 Call initialize_low_arch_aarch32 instead.
5618
56192015-08-04 Yao Qi <yao.qi@linaro.org>
5620
5621 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5622 * linux-low.c: ... here.
5623 * linux-low.h (have_ptrace_getregset): Declare it.
5624
56252015-08-04 Pedro Alves <palves@redhat.com>
5626
5627 * thread-db.c (struct thread_db): Use new typedefs.
5628 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5629 CHK calls.
5630 (disable_thread_event_reporting): Cast result of dlsym to
5631 destination function pointer type.
5632 (thread_db_mourn): Use td_ta_delete_ftype.
5633
56342015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5635
5636 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5637 arch variant.
5638 (CDX_BREAKPOINT): Define for R2.
5639 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5640 (the_low_target): Add comments.
5641
56422015-07-30 Yao Qi <yao.qi@linaro.org>
5643
5644 * linux-arm-low.c (arm_hwcap): Remove it.
5645 (arm_read_description): New local variable arm_hwcap. Don't
5646 set arm_hwcap to zero.
5647
56482015-07-30 Yao Qi <yao.qi@linaro.org>
5649
5650 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5651 Use regcache->tdesc instead.
5652 (arm_store_wmmxregset): Likewise.
5653 (arm_fill_vfpregset): Likewise.
5654 (arm_store_vfpregset): Likewise.
5655
56562015-07-30 Yao Qi <yao.qi@linaro.org>
5657
5658 * linux-arm-low.c: Include arch/arm.h.
5659 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5660 (arm_store_gregset): Likewise.
5661
56622015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5663
5664 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5665 ptrace's 4th parameter.
5666
56672015-07-27 Yao Qi <yao.qi@linaro.org>
5668
5669 * configure.srv (case aarch64*-*-linux*): Don't set
5670 srv_linux_usrregs.
5671
56722015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5673
5674 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5675 sys/ptrace.h.
5676 * linux-arm-low.c: Likewise.
5677 * linux-cris-low.c: Likewise.
5678 * linux-crisv32-low.c: Likewise.
5679 * linux-low.c: Likewise.
5680 * linux-m68k-low.c: Likewise.
5681 * linux-mips-low.c: Likewise.
5682 * linux-nios2-low.c: Likewise.
5683 * linux-s390-low.c: Likewise.
5684 * linux-sparc-low.c: Likewise.
5685 * linux-tic6x-low.c: Likewise.
5686 * linux-tile-low.c: Likewise.
5687 * linux-x86-low.c: Likewise.
5688
56892015-07-24 Pedro Alves <palves@redhat.com>
5690
5691 * config.in: Regenerate.
5692 * configure: Regenerate.
5693
56942015-07-24 Pedro Alves <palves@redhat.com>
5695
5696 * acinclude.m4: Include ../ptrace.m4.
5697 * configure.ac: Call GDB_AC_PTRACE.
5698 * config.in, configure: Regenerate.
5699
57002015-07-24 Yao Qi <yao.qi@linaro.org>
5701
5702 * linux-low.c (linux_create_inferior): Remove setting to
5703 proc->priv->new_inferior.
5704 (linux_attach): Likewise.
5705 (linux_low_filter_event): Likewise.
5706 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5707
57082015-07-24 Yao Qi <yao.qi@linaro.org>
5709
5710 * linux-low.c (linux_arch_setup): New function.
5711 (linux_low_filter_event): If proc->tdesc is NULL and
5712 proc->attached is true, call the_low_target.arch_setup.
5713 Otherwise, keep status pending, and return.
5714 (linux_resume_one_lwp_throw): Don't call get_pc if
5715 thread->while_stepping isn't NULL. Don't call
5716 get_thread_regcache if proc->tdesc is NULL.
5717 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5718 (linux_target_ops): Install arch_setup.
5719 * server.c (start_inferior): Call the_target->arch_setup.
5720 * target.h (struct target_ops) <arch_setup>: New field.
5721 (target_arch_setup): New marco.
5722 * lynx-low.c (lynx_target_ops): Update.
5723 * nto-low.c (nto_target_ops): Update.
5724 * spu-low.c (spu_target_ops): Update.
5725 * win32-low.c (win32_target_ops): Update.
5726
57272015-07-24 Yao Qi <yao.qi@linaro.org>
5728
5729 * linux-low.c (linux_add_process): Don't set
5730 proc->priv->new_inferior.
5731 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5732 (linux_attach): Likewise.
5733
57342015-07-24 Yao Qi <yao.qi@linaro.org>
5735
5736 * server.c (start_inferior): Code refactor.
5737
57382015-07-24 Yao Qi <yao.qi@linaro.org>
5739
5740 * server.c (process_serial_event): Set general_thread.
5741
57422015-07-21 Yao Qi <yao.qi@linaro.org>
5743
5744 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5745 aarch64_linux_get_debug_reg_capacity.
5746
57472015-07-17 Yao Qi <yao.qi@linaro.org>
5748
5749 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5750 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5751 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5752 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5753 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5754 (AARCH64_HWP_ALIGNMENT): Likewise.
5755 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5756 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5757 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5758 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5759 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5760 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5761 (struct aarch64_debug_reg_state): Likewise.
5762 (struct arch_lwp_info): Likewise.
5763 (aarch64_align_watchpoint): Likewise.
5764 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5765 (aarch64_watchpoint_length): Likewise.
5766 (aarch64_point_encode_ctrl_reg): Likewise
5767 (aarch64_point_is_aligned): Likewise.
5768 (aarch64_align_watchpoint): Likewise.
5769 (aarch64_linux_set_debug_regs):
5770 (aarch64_dr_state_insert_one_point): Likewise.
5771 (aarch64_dr_state_remove_one_point): Likewise.
5772 (aarch64_handle_breakpoint): Likewise.
5773 (aarch64_handle_aligned_watchpoint): Likewise.
5774 (aarch64_handle_unaligned_watchpoint): Likewise.
5775 (aarch64_handle_watchpoint): Likewise.
5776
57772015-07-17 Yao Qi <yao.qi@linaro.org>
5778
5779 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5780 and don't aarch64_get_debug_reg_state. All callers update.
5781 (aarch64_handle_aligned_watchpoint): Likewise.
5782 (aarch64_handle_unaligned_watchpoint): Likewise.
5783 (aarch64_handle_watchpoint): Likewise.
5784 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5785 (aarch64_remove_point): Likewise.
5786
57872015-07-17 Yao Qi <yao.qi@linaro.org>
5788
5789 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5790 debug_printf.
5791 (aarch64_handle_unaligned_watchpoint): Likewise.
5792
57932015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5794
5795 Revert the previous 3 commits:
5796 Move gdb_regex* to common/
5797 Move linux_find_memory_regions_full & co.
5798 gdbserver build-id attribute generator
5799
58002015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5801 Jan Kratochvil <jan.kratochvil@redhat.com>
5802
5803 gdbserver build-id attribute generator.
5804 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5805 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5806 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5807 (find_phdr): New.
5808 (get_dynamic): Use find_pdhr to traverse program headers.
5809 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5810 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5811 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5812 (get_hex_build_id): New.
5813 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5814 to reply XML document.
5815
58162015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5817 Jan Kratochvil <jan.kratochvil@redhat.com>
5818
5819 * target.c: Include target/target-utils.h and fcntl.h.
5820 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5821 (target_fileio_read_stralloc): New functions.
5822
58232015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5824
5825 * Makefile.in (OBS): Add gdb_regex.o.
5826 (gdb_regex.o): New.
5827 * config.in: Rebuilt.
5828 * configure: Rebuilt.
5829
58302015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5831 Jan Kratochvil <jan.kratochvil@redhat.com>
5832
5833 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5834 * Makefile.in (OBS): Add target-utils.o.
5835 (linux-maps.o, target-utils.o): New.
5836 * configure.srv (srv_linux_obj): Add linux-maps.o.
5837
58382015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5839
5840 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5841 function, return 1.
5842 (the_low_target): Install it.
5843
58442015-07-14 Pedro Alves <palves@redhat.com>
5845
5846 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5847 Instead, ignore ECHILD, and throw an error for other errnos.
5848
58492015-07-10 Pedro Alves <palves@redhat.com>
5850
5851 * event-loop.c (struct callback_event) <data>: Change type to
5852 gdb_client_data instance instead of gdb_client_data pointer.
5853 (append_callback_event): Adjust.
5854
58552015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5856
5857 * linux-aarch64-low.c: Add comments for each linux_target_ops
5858 method. Remove comments already covered in target_ops and
5859 linux_target_ops definitions.
5860 (the_low_target): Add comments for each unimplemented method.
5861
58622015-07-09 Yao Qi <yao.qi@linaro.org>
5863
5864 * linux-aarch64-low.c (aarch64_regmap): Remove.
5865 (aarch64_usrregs_info): Remove.
5866 (regs_info): Set field usrregs to NULL.
5867
58682015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5869
5870 * linux-low.c: Include "rsp-low.h"
5871 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5872 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5873 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5874 (handle_btrace_enable_pt): New.
5875 (handle_btrace_general_set): Support "pt".
5876 (handle_btrace_conf_general_set): Support "pt:size".
5877
58782015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5879
5880 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5881 Z_PACKET_SW_BP.
5882
58832015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5884
5885 * linux-aarch64-low.c: Remove comment about endianness.
5886 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5887 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5888 memcmp.
5889
58902015-06-24 Gary Benson <gbenson@redhat.com>
5891
5892 * linux-i386-ipa.c (stdint.h): Do not include.
5893 * lynx-i386-low.c (stdint.h): Likewise.
5894 * lynx-ppc-low.c (stdint.h): Likewise.
5895 * mem-break.c (stdint.h): Likewise.
5896 * thread-db.c (stdint.h): Likewise.
5897 * tracepoint.c (stdint.h): Likewise.
5898 * win32-low.c (stdint.h): Likewise.
5899
59002015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5901
5902 * server.c (write_qxfer_response): Update call to
5903 remote_escape_output.
5904
59052015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5906 Jan Kratochvil <jan.kratochvil@redhat.com>
5907
5908 Merge multiple hex conversions.
5909 * gdbreplay.c (tohex): Rename to 'fromhex'.
5910 (logchar): Use fromhex.
5911
59122015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5913
5914 * server.c (handle_qxfer_libraries): Set `version' attribute for
5915 <library-list>.
5916
59172015-06-10 Gary Benson <gbenson@redhat.com>
5918
5919 * target.h (struct target_ops) <multifs_open>: New field.
5920 <multifs_unlink>: Likewise.
5921 <multifs_readlink>: Likewise.
5922 * linux-low.c (nat/linux-namespaces.h): New include.
5923 (linux_target_ops): Initialize the_target->multifs_open,
5924 the_target->multifs_unlink and the_target->multifs_readlink.
5925 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5926 * hostio.c (hostio_fs_pid): New static variable.
5927 (hostio_handle_new_gdb_connection): New function.
5928 (handle_setfs): Likewise.
5929 (handle_open): Use the_target->multifs_open as appropriate.
5930 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5931 (handle_readlink): Use the_target->multifs_readlink as
5932 appropriate.
5933 (handle_vFile): Handle vFile:setfs packets.
5934 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5935 after target_handle_new_gdb_connection.
5936
59372015-06-10 Gary Benson <gbenson@redhat.com>
5938
5939 * configure.ac (AC_CHECK_FUNCS): Add setns.
5940 * config.in: Regenerate.
5941 * configure: Likewise.
5942 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5943 (linux-namespaces.o): New rule.
5944 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5945
59462015-06-09 Gary Benson <gbenson@redhat.com>
5947
5948 * hostio.c (handle_open): Process mode argument with
5949 fileio_to_host_mode.
5950
59512015-06-01 Yao Qi <yao.qi@linaro.org>
5952
5953 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5954 * linux-x86-low.c: Likewise.
5955
59562015-05-28 Don Breazeal <donb@codesourcery.com>
5957
5958 * linux-low.c (handle_extended_wait): Initialize
5959 thread_info.last_resume_kind for new fork children.
5960
59612015-05-15 Pedro Alves <palves@redhat.com>
5962
5963 * target.h (target_handle_new_gdb_connection): Rewrite using if
5964 wrapped in do/while.
5965
59662015-05-14 Joel Brobecker <brobecker@adacore.com>
5967
5968 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5969 * configure, config.in: Regenerate.
5970 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5971 Declare typedef.
5972
59732015-05-12 Don Breazeal <donb@codesourcery.com>
5974
5975 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5976 PTRACE_EVENT_VFORK_DONE.
5977 (linux_low_ptrace_options, extended_event_reported): Add vfork
5978 events.
5979 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5980 and "vforkdone" for RSP 'T' Stop Reply Packet.
5981 * server.h (report_vfork_events): Declare
5982 global variable.
5983
59842015-05-12 Don Breazeal <donb@codesourcery.com>
5985
5986 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5987 (the_low_target) <new_fork>: Initialize new member.
5988 * linux-arm-low.c (arm_new_fork): New function.
5989 (the_low_target) <new_fork>: Initialize new member.
5990 * linux-low.c (handle_extended_wait): Call new target function
5991 new_fork.
5992 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5993 * linux-mips-low.c (mips_add_watchpoint): New function
5994 extracted from mips_insert_point.
5995 (the_low_target) <new_fork>: Initialize new member.
5996 (mips_linux_new_fork): New function.
5997 (mips_insert_point): Call mips_add_watchpoint.
5998 * linux-x86-low.c (x86_linux_new_fork): New function.
5999 (the_low_target) <new_fork>: Initialize new member.
6000
60012015-05-12 Don Breazeal <donb@codesourcery.com>
6002
6003 * linux-low.c (handle_extended_wait): Implement return value,
6004 rename argument 'event_child' to 'event_lwp', handle
6005 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
6006 (linux_low_ptrace_options): New function.
6007 (linux_low_filter_event): Call linux_low_ptrace_options,
6008 use different argument fo linux_enable_event_reporting,
6009 use return value from handle_extended_wait.
6010 (extended_event_reported): New function.
6011 (linux_wait_1): Call extended_event_reported and set
6012 status to report fork events.
6013 (linux_write_memory): Add pid to debug message.
6014 (reset_lwp_ptrace_options_callback): New function.
6015 (linux_handle_new_gdb_connection): New function.
6016 (linux_target_ops): Initialize new structure member.
6017 * linux-low.h (struct lwp_info) <waitstatus>: New member.
6018 * lynx-low.c: Initialize new structure member.
6019 * remote-utils.c (prepare_resume_reply): Implement stop reason
6020 "fork" for "T" stop message.
6021 * server.c (handle_query): Call handle_new_gdb_connection.
6022 * server.h (report_fork_events): Declare global flag.
6023 * target.h (struct target_ops) <handle_new_gdb_connection>:
6024 New member.
6025 (target_handle_new_gdb_connection): New macro.
6026 * win32-low.c: Initialize new structure member.
6027
60282015-05-12 Don Breazeal <donb@codesourcery.com>
6029
6030 * mem-break.c (APPEND_TO_LIST): Define macro.
6031 (clone_agent_expr): New function.
6032 (clone_one_breakpoint): New function.
6033 (clone_all_breakpoints): New function.
6034 * mem-break.h: Declare new functions.
6035
60362015-05-12 Don Breazeal <donb@codesourcery.com>
6037
6038 * linux-low.c (linux_supports_fork_events): New function.
6039 (linux_supports_vfork_events): New function.
6040 (linux_target_ops): Initialize new structure members.
6041 (initialize_low): Call linux_check_ptrace_features.
6042 * lynx-low.c (lynx_target_ops): Initialize new structure
6043 members.
6044 * server.c (report_fork_events, report_vfork_events):
6045 New global flags.
6046 (handle_query): Add new features to qSupported packet and
6047 response.
6048 (captured_main): Initialize new global variables.
6049 * target.h (struct target_ops) <supports_fork_events>:
6050 New member.
6051 <supports_vfork_events>: New member.
6052 (target_supports_fork_events): New macro.
6053 (target_supports_vfork_events): New macro.
6054 * win32-low.c (win32_target_ops): Initialize new structure
6055 members.
6056
60572015-05-12 Gary Benson <gbenson@redhat.com>
6058
6059 * server.c (handle_qxfer_exec_file): Use current process
6060 if annex is empty.
6061
60622015-05-08 Sandra Loosemore <sandra@codesourcery.com>
6063
6064 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6065 Remove HAVE_PTRACE_GETREGS conditionals.
6066 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6067 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6068
60692015-05-08 Yao Qi <yao.qi@linaro.org>
6070
6071 * linux-low.c (linux_supports_conditional_breakpoints): New
6072 function.
6073 (linux_target_ops): Install new target method.
6074 * lynx-low.c (lynx_target_ops): Install NULL hook for
6075 supports_conditional_breakpoints.
6076 * nto-low.c (nto_target_ops): Likewise.
6077 * spu-low.c (spu_target_ops): Likewise.
6078 * win32-low.c (win32_target_ops): Likewise.
6079 * server.c (handle_query): Check
6080 target_supports_conditional_breakpoints.
6081 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6082 New field.
6083 (target_supports_conditional_breakpoints): New macro.
6084
60852015-05-06 Pedro Alves <palves@redhat.com>
6086
6087 PR server/18081
6088 * server.c (start_inferior): If the process exits, mourn it.
6089
60902015-04-21 Gary Benson <gbenson@redhat.com>
6091
6092 * hostio.c (fileio_open_flags_to_host): Factored out to
6093 fileio_to_host_openflags in common/fileio.c. Single use
6094 updated.
6095
60962015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6097
6098 * linux-xtensa-low.c (xtensa_fill_gregset)
6099 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6100 XCHAL_HAVE_LOOP.
6101
61022015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6103
6104 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6105 (regs_info): Replace usrregs pointer with NULL.
6106
61072015-04-17 Gary Benson <gbenson@redhat.com>
6108
6109 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6110 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6111 * server.c (handle_qxfer_exec_file): New function.
6112 (qxfer_packets): Add exec-file entry.
6113 (handle_query): Report qXfer:exec-file:read as supported packet.
6114
61152015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6116
6117 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6118
61192015-04-09 Gary Benson <gbenson@redhat.com>
6120
6121 * hostio-errno.c (errno_to_fileio_error): Remove function.
6122 Update caller to use remote_fileio_to_fio_error.
6123
61242015-04-09 Yao Qi <yao.qi@linaro.org>
6125
6126 * linux-low.c (linux_insert_point): Call
6127 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6128 (linux_remove_point): Call remove_memory_breakpoint if type is
6129 raw_bkpt_type_sw.
6130 * linux-x86-low.c (x86_insert_point): Don't call
6131 insert_memory_breakpoint.
6132 (x86_remove_point): Don't call remove_memory_breakpoint.
6133
61342015-04-01 Pedro Alves <palves@redhat.com>
6135 Cleber Rosa <crosa@redhat.com>
6136
6137 * server.c (gdbserver_usage): Reorganize and extend the usage
6138 message.
6139
61402015-03-24 Pedro Alves <palves@redhat.com>
6141
6142 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6143 output. Also dump TRAP_TRACE.
6144 (linux_low_filter_event): In debug output, distinguish a
6145 resume_stop SIGSTOP from a delayed SIGSTOP.
6146
61472015-03-24 Gary Benson <gbenson@redhat.com>
6148
6149 * linux-x86-low.c (x86_linux_new_thread): Moved to
6150 nat/x86-linux.c.
6151 (x86_linux_prepare_to_resume): Likewise.
6152
61532015-03-24 Gary Benson <gbenson@redhat.com>
6154
6155 * Makefile.in (x86-linux-dregs.o): New rule.
6156 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6157 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6158 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6159 (x86_linux_dr_get): Likewise.
6160 (x86_linux_dr_set): Likewise.
6161 (update_debug_registers_callback): Likewise.
6162 (x86_linux_dr_set_addr): Likewise.
6163 (x86_linux_dr_get_addr): Likewise.
6164 (x86_linux_dr_set_control): Likewise.
6165 (x86_linux_dr_get_control): Likewise.
6166 (x86_linux_dr_get_status): Likewise.
6167 (x86_linux_update_debug_registers): Likewise.
6168
61692015-03-24 Gary Benson <gbenson@redhat.com>
6170
6171 * linux-x86-low.c (x86_linux_update_debug_registers):
6172 New function, factored out from...
6173 (x86_linux_prepare_to_resume): ...this.
6174
61752015-03-24 Gary Benson <gbenson@redhat.com>
6176
6177 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6178 (x86_linux_dr_set): Likewise.
6179 (update_debug_registers_callback): Likewise.
6180 (x86_linux_dr_set_addr): Likewise.
6181 (x86_linux_dr_get_addr): Likewise.
6182 (x86_linux_dr_set_control): Likewise.
6183 (x86_linux_dr_get_control): Likewise.
6184 (x86_linux_dr_get_status): Likewise.
6185 (x86_linux_prepare_to_resume): Likewise.
6186
61872015-03-24 Gary Benson <gbenson@redhat.com>
6188
6189 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6190 Use perror_with_name. Pass string through gettext.
6191 (x86_linux_dr_set): Likewise.
6192
61932015-03-24 Gary Benson <gbenson@redhat.com>
6194
6195 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6196 (x86_linux_dr_set_addr): ...this.
6197 (x86_dr_low_get_addr): Rename to...
6198 (x86_linux_dr_get_addr): ...this.
6199 (x86_dr_low_set_control): Rename to...
6200 (x86_linux_dr_set_control): ...this.
6201 (x86_dr_low_get_control): Rename to...
6202 (x86_linux_dr_get_control): ...this.
6203 (x86_dr_low_get_status): Rename to...
6204 (x86_linux_dr_get_status): ...this.
6205 (x86_dr_low): Update with new function names.
6206
62072015-03-24 Gary Benson <gbenson@redhat.com>
6208
6209 * Makefile.in (x86-linux.o): New rule.
6210 * configure.srv: Add x86-linux.o to relevant targets.
6211 * linux-low.c (lwp_set_arch_private_info): New function.
6212 (lwp_arch_private_info): Likewise.
6213 * linux-x86-low.c: Include nat/x86-linux.h.
6214 (arch_lwp_info): Removed structure.
6215 (update_debug_registers_callback):
6216 Use lwp_set_debug_registers_changed.
6217 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6218 and lwp_set_debug_registers_changed.
6219 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6220
62212015-03-24 Gary Benson <gbenson@redhat.com>
6222
6223 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6224 * linux-arm-low.c (arm_new_thread): Likewise.
6225 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6226 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6227 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6228 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6229
62302015-03-24 Gary Benson <gbenson@redhat.com>
6231
6232 * linux-low.c (ptid_of_lwp): New function.
6233 (lwp_is_stopped): Likewise.
6234 (lwp_stop_reason): Likewise.
6235 * linux-x86-low.c (update_debug_registers_callback):
6236 Use lwp_is_stopped.
6237 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6238 lwp_stop_reason.
6239
62402015-03-24 Gary Benson <gbenson@redhat.com>
6241
6242 * linux-low.h (linux_stop_lwp): Remove declaration.
6243
62442015-03-24 Gary Benson <gbenson@redhat.com>
6245
6246 * linux-low.h: Include nat/linux-nat.h.
6247 * linux-low.c (iterate_over_lwps_args): New structure.
6248 (iterate_over_lwps_filter): New function.
6249 (iterate_over_lwps): Likewise.
6250 * linux-x86-low.c (update_debug_registers_callback):
6251 Update signature to what iterate_over_lwps expects.
6252 Remove PID check that iterate_over_lwps now performs.
6253 (x86_dr_low_set_addr): Use iterate_over_lwps.
6254 (x86_dr_low_set_control): Likewise.
6255
62562015-03-24 Gary Benson <gbenson@redhat.com>
6257
6258 * linux-x86-low.c (x86_debug_reg_state): New function.
6259 (x86_linux_prepare_to_resume): Use the above.
6260
62612015-03-24 Gary Benson <gbenson@redhat.com>
6262
6263 * linux-low.c (current_lwp_ptid): New function.
6264 * linux-x86-low.c: Include nat/linux-nat.h.
6265 (x86_dr_low_get_addr): Use current_lwp_ptid.
6266 (x86_dr_low_get_control): Likewise.
6267 (x86_dr_low_get_status): Likewise.
6268
62692015-03-20 Pedro Alves <palves@redhat.com>
6270
6271 * tracepoint.c (cmd_qtstatus): Make "str" const.
6272
62732015-03-20 Pedro Alves <palves@redhat.com>
6274
6275 * server.c (handle_general_set): Make "req_str" const.
6276
62772015-03-19 Pedro Alves <palves@redhat.com>
6278
6279 * linux-low.c (linux_resume_one_lwp): Rename to ...
6280 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6281 instead call perror_with_name.
6282 (check_ptrace_stopped_lwp_gone): New function.
6283 (linux_resume_one_lwp): Reimplement as wrapper around
6284 linux_resume_one_lwp_throw that swallows errors if the LWP is
6285 gone.
6286
62872015-03-19 Pedro Alves <palves@redhat.com>
6288
6289 * linux-low.c (count_events_callback, select_event_lwp_callback):
6290 No longer check whether the thread has resume_stop as last resume
6291 kind.
6292
62932015-03-19 Pedro Alves <palves@redhat.com>
6294
6295 * linux-low.c (count_events_callback, select_event_lwp_callback):
6296 Use the lwp's status_pending_p field, not the thread's.
6297
62982015-03-19 Pedro Alves <palves@redhat.com>
6299
6300 * linux-low.c (select_event_lwp_callback): Update comments to
6301 no longer mention SIGTRAP.
6302
63032015-03-18 Gary Benson <gbenson@redhat.com>
6304
6305 * server.c (handle_query): Do not report vFile:fstat as supported.
6306
63072015-03-11 Gary Benson <gbenson@redhat.com>
6308
6309 * hostio.c (sys/types.h): New include.
6310 (sys/stat.h): Likewise.
6311 (common-remote-fileio.h): Likewise.
6312 (handle_fstat): New function.
6313 (handle_vFile): Handle vFile:fstat packets.
6314
63152015-03-11 Gary Benson <gbenson@redhat.com>
6316
6317 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6318 struct stat.st_blocks and struct stat.st_blksize.
6319 * configure: Regenerate.
6320 * config.in: Likewise.
6321 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6322 (OBS): Add common-remote-fileio.o.
6323 (common-remote-fileio.o): New rule.
6324
63252015-03-09 Pedro Alves <palves@redhat.com>
6326
6327 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6328 'struct sockaddr' pointer in 'accept' call.
6329
63302015-03-09 Pedro Alves <palves@redhat.com>
6331
6332 Revert:
6333 2015-03-07 Pedro Alves <palves@redhat.com>
6334 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6335 or <winsock2.h> here. Instead include "gdb_socket.h".
6336 (remote_open): Use union gdb_sockaddr_u.
6337 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6338 or <winsock2.h> here. Instead include "gdb_socket.h".
6339 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6340 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6341 or <sys/un.h>.
6342 (init_named_socket, gdb_agent_helper_thread): Use union
6343 gdb_sockaddr_u.
6344
63452015-03-07 Pedro Alves <palves@redhat.com>
6346
6347 * configure.ac (build_warnings): Move
6348 -Wdeclaration-after-statement to the C-specific set.
6349 * configure: Regenerate.
6350
63512015-03-07 Pedro Alves <palves@redhat.com>
6352
6353 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6354 or <winsock2.h> here. Instead include "gdb_socket.h".
6355 (remote_open): Use union gdb_sockaddr_u.
6356 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6357 or <winsock2.h> here. Instead include "gdb_socket.h".
6358 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6359 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6360 or <sys/un.h>.
6361 (init_named_socket, gdb_agent_helper_thread): Use union
6362 gdb_sockaddr_u.
6363
63642015-03-07 Pedro Alves <palves@redhat.com>
6365
6366 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6367 instead.
6368
63692015-03-06 Yao Qi <yao.qi@linaro.org>
6370
6371 * linux-aarch64-low.c (aarch64_insert_point): Use
6372 show_debug_regs as a boolean.
6373 (aarch64_remove_point): Likewise.
6374
63752015-03-05 Pedro Alves <palves@redhat.com>
6376
6377 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6378 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6379 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6380 * nto-low.c (nto_target_ops): Likewise.
6381 * spu-low.c (spu_target_ops): Likewise.
6382 * win32-low.c (win32_target_ops): Likewise.
6383
63842015-03-04 Pedro Alves <palves@redhat.com>
6385
6386 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6387 Decide whether a breakpoint triggered based on the SIGTRAP's
6388 siginfo.si_code.
6389 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6390 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6391 (linux_low_filter_event): Check for breakpoints before checking
6392 watchpoints.
6393 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6394 siginfo.si_code.
6395 (linux_stopped_by_sw_breakpoint)
6396 (linux_supports_stopped_by_sw_breakpoint)
6397 (linux_stopped_by_hw_breakpoint)
6398 (linux_supports_stopped_by_hw_breakpoint): New functions.
6399 (linux_target_ops): Install new target methods.
6400
64012015-03-04 Pedro Alves <palves@redhat.com>
6402
6403 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6404 * server.c (swbreak_feature, hwbreak_feature): New globals.
6405 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6406 (captured_main): Clear swbreak_feature and hwbreak_feature.
6407 * server.h (swbreak_feature, hwbreak_feature): Declare.
6408 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6409 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6410 supports_stopped_by_hw_breakpoint>: New fields.
6411 (target_supports_stopped_by_sw_breakpoint)
6412 (target_stopped_by_sw_breakpoint)
6413 (target_supports_stopped_by_hw_breakpoint)
6414 (target_stopped_by_hw_breakpoint): Declare.
6415
64162015-03-04 Pedro Alves <palves@redhat.com>
6417
6418 enum lwp_stop_reason -> enum target_stop_reason
6419 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6420 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6421 (linux_wait_1, stuck_in_jump_pad_callback)
6422 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6423 (linux_stopped_by_watchpoint):
6424 * linux-low.h (enum lwp_stop_reason): Delete.
6425 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6426 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6427
64282015-03-04 Yao Qi <yao.qi@linaro.org>
6429
6430 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6431
64322015-03-03 Gary Benson <gbenson@redhat.com>
6433
6434 * hostio.c (handle_vFile): Fix prefix lengths.
6435
64362015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6437
6438 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6439 ptr_bits.
6440
64412015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6442
6443 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6444 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6445 (clean): Add "rm -f" for above C files.
6446 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6447 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6448 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6449 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6450 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6451 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6452 (init_registers_s390x_vx_linux64)
6453 (init_registers_s390x_tevx_linux64)
6454 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6455 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6456 declarations.
6457 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6458 (s390_store_vxrs_high): New functions.
6459 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6460 NT_S390_VXRS_HIGH.
6461 (s390_arch_setup): Add logic for selecting one of the new target
6462 descriptions. Activate the new vector regsets if applicable.
6463 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6464 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6465 and init_registers_s390x_tevx_linux64.
6466
64672015-03-01 Pedro Alves <palves@redhat.com>
6468
6469 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6470 parameter.
6471
64722015-02-27 Pedro Alves <palves@redhat.com>
6473
6474 * linux-x86-low.c (u_debugreg_offset): New function.
6475 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6476
64772015-02-27 Pedro Alves <palves@redhat.com>
6478
6479 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6480 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6481 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6482 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6483 (ps_lsetfpregs, ps_getpid)
6484 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6485 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6486 (ps_lsetxregs, ps_plog): Declare.
6487
64882015-02-27 Pedro Alves <palves@redhat.com>
6489
6490 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6491 IP_AGENT_EXPORT_FUNC.
6492 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6493 IP_AGENT_EXPORT_FUNC.
6494 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6495 (IP_AGENT_EXPORT): Delete.
6496 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6497 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6498 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6499 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6500 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6501 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6502 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6503 (traceframe_read_count, traceframe_write_count)
6504 (traceframes_created, trace_state_variables, get_raw_reg)
6505 (get_trace_state_variable_value, set_trace_state_variable_value)
6506 (ust_loaded, helper_thread_id, cmd_buf): Use
6507 IPA_SYM_EXPORTED_NAME.
6508 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6509 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6510 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6511 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6512 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6513 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6514 EXTERN_C_PUSH/EXTERN_C_POP.
6515 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6516 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6517 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6518 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6519 (traceframe_write_count, traceframe_read_count)
6520 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6521 (about_to_request_buffer_space, get_trace_state_variable_value)
6522 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6523 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6524 EXTERN_C_PUSH/EXTERN_C_POP.
6525 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6526 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6527 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6528 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6529 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6530 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6531 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6532 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6533 Define.
6534 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6535 (IP_AGENT_EXPORT_VAR_DECL): Define.
6536 (tracing): Declare.
6537 (gdb_agent_get_raw_reg): Declare.
6538
65392015-02-27 Tom Tromey <tromey@redhat.com>
6540 Pedro Alves <palves@redhat.com>
6541
6542 Rename symbols whose names are reserved C++ keywords throughout.
6543
65442015-02-27 Pedro Alves <palves@redhat.com>
6545
6546 * Makefile.in (COMPILER): New, get it from autoconf.
6547 (CXX): Get from autoconf instead.
6548 (COMPILE.pre): Use COMPILER.
6549 (CC-LD): Rename to ...
6550 (CC_LD): ... this. Use COMPILER.
6551 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6552 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6553 * acinclude.m4: Include build-with-cxx.m4.
6554 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6555 Disable -Werror by default if building in C++ mode.
6556 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6557 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6558 the C++ compiler. Save/restore CXXFLAGS too.
6559 * configure: Regenerate.
6560
65612015-02-27 Pedro Alves <palves@redhat.com>
6562
6563 * acinclude.m4: Include libiberty.m4.
6564 * configure.ac: Call libiberty_INIT.
6565 * config.in, configure: Regenerate.
6566
65672015-02-26 Pedro Alves <palves@redhat.com>
6568
6569 * linux-low.c (linux_wait_1): When incrementing the PC past a
6570 program breakpoint always use the_low_target.breakpoint_len as
6571 increment, rather than the maximum between that and
6572 the_low_target.decr_pc_after_break.
6573
65742015-02-23 Pedro Alves <palves@redhat.com>
6575
6576 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6577 thread was doing a step-over; always adjust the PC if
6578 we stepped over a permanent breakpoint.
6579 (linux_wait_1): If we stepped over breakpoint that was on top of a
6580 permanent breakpoint, manually advance the PC past it.
6581
65822015-02-23 Pedro Alves <palves@redhat.com>
6583
6584 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6585 modes.
6586 (x86_fill_gregset, x86_store_gregset): Use it when handling
6587 $orig_eax.
6588
65892015-02-20 Pedro Alves <palves@redhat.com>
6590
6591 * thread-db.c: Include "nat/linux-procfs.h".
6592 (thread_db_init): Skip listing new threads if the kernel supports
6593 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6594
65952015-02-20 Pedro Alves <palves@redhat.com>
6596
6597 * linux-low.c (status_pending_p_callback): Use ptid_match.
6598
65992015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6600
6601 PR breakpoints/16812
6602 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6603 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6604 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6605
66062015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6607
6608 PR breakpoints/15956
6609 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6610
66112015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6612
6613 * linux-low.c (linux_low_btrace_conf): Print size.
6614 * server.c (handle_btrace_conf_general_set): New.
6615 (hanle_general_set): Call handle_btrace_conf_general_set.
6616 (handle_query): Report Qbtrace-conf:bts:size as supported.
6617
66182015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6619
6620 * linux-low.c (linux_low_enable_btrace): Update parameters.
6621 (linux_low_btrace_conf): New.
6622 (linux_target_ops)<to_btrace_conf>: Initialize.
6623 * server.c (current_btrace_conf): New.
6624 (handle_btrace_enable): Rename to ...
6625 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6626 to target_enable_btrace. Update comment. Update users.
6627 (handle_qxfer_btrace_conf): New.
6628 (qxfer_packets): Add btrace-conf entry.
6629 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6630 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6631 (target_ops)<read_btrace_conf>: New.
6632 (target_enable_btrace): Update parameters.
6633 (target_read_btrace_conf): New.
6634
66352015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6636
6637 * server.c (handle_btrace_general_set): Remove call to
6638 target_supports_btrace.
6639 (supported_btrace_packets): New.
6640 (handle_query): Call supported_btrace_packets.
6641 * target.h: include btrace-common.h.
6642 (btrace_target_info): Removed.
6643 (supports_btrace, target_supports_btrace): Update parameters.
6644
66452015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6646
6647 * Makefile.in (SFILES): Add common/btrace-common.c.
6648 (OBS): Add common/btrace-common.o.
6649 (btrace-common.o): Add build rules.
6650 * linux-low: Include btrace-common.h.
6651 (linux_low_read_btrace): Use struct btrace_data. Call
6652 btrace_data_init and btrace_data_fini.
6653
66542015-02-06 Pedro Alves <palves@redhat.com>
6655
6656 * thread-db.c (find_new_threads_callback): Add debug output.
6657
66582015-02-04 Pedro Alves <palves@redhat.com>
6659
6660 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6661 (resume_stopped_resumed_lwps): New function.
6662 (linux_wait_for_event_filtered): Use it.
6663
66642015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6665
6666 * Makefile.in (SFILES): Add linux-personality.c.
6667 (linux-personality.o): New rule.
6668 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6669 list of objects to be built.
6670 * linux-low.c: Include nat/linux-personality.h.
6671 (linux_create_inferior): Remove code to disable address space
6672 randomization (moved to ../nat/linux-personality.c). Create
6673 cleanup to disable address space randomization.
6674
66752015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6676
6677 * Makefile.in (posix-strerror.o): New rule.
6678 (mingw-strerror.o): Likewise.
6679 * configure: Regenerated.
6680 * configure.ac: Source file ../common/common.host. Initialize new
6681 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6682
66832015-01-14 Yao Qi <yao@codesourcery.com>
6684
6685 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6686 (ppc-linux.o): New rule.
6687 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6688 * configure.ac: AC_CHECK_FUNCS(getauxval).
6689 * config.in: Re-generated.
6690 * configure: Re-generated.
6691 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6692 ppc64_64bit_inferior_p
6693
66942015-01-14 Yao Qi <yao@codesourcery.com>
6695
6696 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6697 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6698 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6699 (PT_ORIG_R3, PT_TRAP): Likewise.
6700 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6701 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6702 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6703
67042015-01-10 Joel Brobecker <brobecker@adacore.com>
6705
6706 * i387-fp.c (i387_cache_to_xsave): In look over
6707 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6708 zmmh_low_space field by use of zmmh_high_space.
6709
67102015-01-09 Pedro Alves <palves@redhat.com>
6711
6712 * linux-low.c (step_over_bkpt): Move higher up in the file.
6713 (handle_extended_wait): Don't store the stop_pc here.
6714 (get_stop_pc): Adjust comments and rename to ...
6715 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6716 stopped for a software breakpoint or hardware breakpoint.
6717 (thread_still_has_status_pending_p): New function.
6718 (status_pending_p_callback): Use
6719 thread_still_has_status_pending_p. If the event is no longer
6720 interesting, resume the LWP.
6721 (handle_tracepoints): Add assert.
6722 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6723 (wstatus_maybe_breakpoint): New function.
6724 (cancel_breakpoint): Delete function.
6725 (check_stopped_by_watchpoint): New function, factored out from
6726 linux_low_filter_event.
6727 (lp_status_maybe_breakpoint): Delete function.
6728 (linux_low_filter_event): Remove filter_ptid argument.
6729 Leave thread group exits pending here. Store the LWP's stop PC.
6730 Always leave events pending.
6731 (linux_wait_for_event_filtered): Pull all events out of the
6732 kernel, and leave them all pending.
6733 (count_events_callback, select_event_lwp_callback): Consider all
6734 events.
6735 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6736 (select_event_lwp): Only give preference to the stepping LWP in
6737 all-stop mode. Adjust comments.
6738 (ignore_event): New function.
6739 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6740 references to cancel_breakpoints. Adjust to renames. Also give
6741 equal priority to all LWPs that have had events in non-stop mode.
6742 If reporting a software breakpoint event, unadjust the LWP's PC.
6743 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6744 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6745 Adjust.
6746 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6747 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6748 (linux_stopped_by_watchpoint): Adjust.
6749 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6750 * linux-low.h (enum lwp_stop_reason): New.
6751 (struct lwp_info) <stop_pc>: Adjust comment.
6752 <stopped_by_watchpoint>: Delete field.
6753 <stop_reason>: New field.
6754 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6755 * mem-break.c (software_breakpoint_inserted_here)
6756 (hardware_breakpoint_inserted_here): New function.
6757 * mem-break.h (software_breakpoint_inserted_here)
6758 (hardware_breakpoint_inserted_here): Declare.
6759 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6760 (cancel_breakpoints): Delete.
6761 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6762 (upload_fast_traceframes): Remove references to
6763 cancel_breakpoints.
6764
67652015-01-09 Pedro Alves <palves@redhat.com>
6766
6767 * thread-db.c (find_new_threads_callback): Ignore thread if the
6768 kernel thread ID is -1.
6769
67702015-01-09 Pedro Alves <palves@redhat.com>
6771
6772 * linux-low.c (linux_attach_fail_reason_string): Move to
6773 nat/linux-ptrace.c, and rename.
6774 (linux_attach_lwp): Update comment.
6775 (attach_proc_task_lwp_callback): New function.
6776 (linux_attach): Adjust to rename and use
6777 linux_proc_attach_tgid_threads.
6778 (linux_attach_fail_reason_string): Delete declaration.
6779
67802015-01-01 Joel Brobecker <brobecker@adacore.com>
6781
6782 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6783 * server.c (gdbserver_version): Likewise.
6784
67852014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6786
6787 * remote-utils.c: Include ctype.h.
6788 (input_interrupt): Explicitly handle the case when the char
6789 received is the NUL byte. Improve the printing of non-ASCII
6790 characters.
6791
67922014-12-16 Joel Brobecker <brobecker@adacore.com>
6793
6794 * linux-low.c (linux_low_filter_event): Update call to
6795 linux_enable_event_reporting following the addition of
6796 a new parameter to that function.
6797
67982014-12-16 Catalin Udma <catalin.udma@freescale.com>
6799
6800 PR server/17457
6801 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6802 (AARCH64_FPCR_REGNO): Likewise.
6803 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6804 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6805 (aarch64_store_fpregset): Likewise.
6806
68072014-12-15 Joel Brobecker <brobecker@adacore.com>
6808
6809 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6810 Remove FIXME comment about assumption about N.
6811
68122014-12-13 Joel Brobecker <brobecker@adacore.com>
6813
6814 * configure.ac: If large-file support is disabled in GDBserver,
6815 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6816 * configure: Regenerate.
6817
68182014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6819
6820 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6821 warning upon ENODATA from ptrace.
6822 * linux-s390-low.c (s390_store_tdb): New.
6823 (s390_regsets): Add regset for NT_S390_TDB.
6824
68252014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6826
6827 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6828 without a fill_function.
6829 * linux-s390-low.c (s390_fill_last_break): Remove.
6830 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6831 (s390_arch_setup): Use regset's size instead of fill_function for
6832 loop end condition.
6833
68342014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6835
6836 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6837 the regset's store function when ptrace returned an error.
6838 * regcache.c (get_thread_regcache): Invalidate register cache
6839 before fetching inferior's registers.
6840
68412014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6842
6843 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6844 while-loop as for-loop.
6845 (regsets_store_inferior_registers): Likewise.
6846
68472014-11-28 Yao Qi <yao@codesourcery.com>
6848
6849 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6850 * config.in, configure: Re-generate.
6851 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6852 is defined.
6853
68542014-11-21 Yao Qi <yao@codesourcery.com>
6855
6856 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6857 (AC_CHECK_HEADERS): Remove malloc.h.
6858 * configure: Re-generated.
6859 * config.in: Re-generated.
6860 * server.h: Don't include alloca.h and malloc.h.
6861 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6862 Don't include malloc.h.
6863
68642014-11-17 Joel Brobecker <brobecker@adacore.com>
6865
6866 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6867 corresponding ERRNO check in same block.
6868
68692014-11-12 Pedro Alves <palves@redhat.com>
6870
6871 * server.c (cont_thread): Update comment.
6872 (start_inferior, attach_inferior): No longer clear cont_thread.
6873 (handle_v_cont): No longer set cont_thread.
6874 (captured_main): Clear cont_thread each time a GDB connects.
6875
68762014-11-12 Pedro Alves <palves@redhat.com>
6877
6878 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6879 thread, and don't resume all threads if the Hc thread has exited.
6880
68812014-11-12 Pedro Alves <palves@redhat.com>
6882
6883 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6884 the process group instead of to a specific LWP.
6885
68862014-10-15 Pedro Alves <palves@redhat.com>
6887
6888 PR server/17487
6889 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6890 parameter.
6891 (arm_set_thread_context): Delete.
6892 (the_low_target): Adjust.
6893 * win32-i386-low.c (debug_registers_changed)
6894 (debug_registers_used): Delete.
6895 (update_debug_registers_callback): New function.
6896 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6897 needing to update their debug registers.
6898 (win32_get_current_dr): New function.
6899 (x86_dr_low_get_addr, x86_dr_low_get_control)
6900 (x86_dr_low_get_status): Fetch the debug register from the thread
6901 record's context.
6902 (i386_initial_stuff): Adjust.
6903 (i386_get_thread_context): Remove current_event parameter. Don't
6904 clear debug_registers_changed nor copy DR values to
6905 debug_reg_state.
6906 (i386_set_thread_context): Delete.
6907 (i386_prepare_to_resume): New function.
6908 (i386_thread_added): Mark the thread as needing to update irs
6909 debug registers.
6910 (the_low_target): Remove i386_set_thread_context and install
6911 i386_prepare_to_resume.
6912 * win32-low.c (win32_get_thread_context): Adjust.
6913 (win32_set_thread_context): Use SetThreadContext
6914 directly.
6915 (win32_prepare_to_resume): New function.
6916 (win32_require_context): New function, factored out from ...
6917 (thread_rec): ... this.
6918 (continue_one_thread): Call win32_prepare_to_resume on each thread
6919 we're about to continue.
6920 (win32_resume): Call win32_prepare_to_resume on the event thread.
6921 * win32-low.h (struct win32_thread_info)
6922 <debug_registers_changed>: New field.
6923 (struct win32_target_ops): Change prototype of set_thread_context,
6924 delete set_thread_context and add prepare_to_resume.
6925 (win32_require_context): New declaration.
6926
69272014-10-08 Gary Benson <gbenson@redhat.com>
6928
6929 * server.h: Do not include common-exceptions.h.
6930
69312014-10-08 Gary Benson <gbenson@redhat.com>
6932
6933 * server.h: Do not include cleanups.h.
6934
69352014-09-30 James Hogan <james.hogan@imgtec.com>
6936
6937 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6938 mips64-dsp-linux.c.
6939
69402014-09-23 Yao Qi <yao@codesourcery.com>
6941
6942 * linux-low.c (lp_status_maybe_breakpoint): New function.
6943 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6944 (count_events_callback): Likewise.
6945 (select_event_lwp_callback): Likewise.
6946 (cancel_breakpoints_callback): Likewise.
6947
69482014-09-19 Don Breazeal <donb@codesourcery.com>
6949
6950 * linux-low.c (handle_extended_wait): Call
6951 linux_ptrace_get_extended_event.
6952 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6953 linux_is_extended_waitstatus.
6954
69552014-09-16 Joel Brobecker <brobecker@adacore.com>
6956
6957 * Makefile.in (CPPFLAGS): Define.
6958 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6959 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6960
69612014-09-16 Gary Benson <gbenson@redhat.com>
6962
6963 * inferiors.h (current_inferior): Renamed as...
6964 (current_thread): New variable. All uses updated.
6965 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6966 (maybe_move_out_of_jump_pad): Likewise.
6967 (cancel_breakpoint): Likewise.
6968 (linux_low_filter_event): Likewise.
6969 (wait_for_sigstop): Likewise.
6970 (linux_resume_one_lwp): Likewise.
6971 (need_step_over_p): Likewise.
6972 (start_step_over): Likewise.
6973 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6974 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6975 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6976 and save_inferior as saved_thread.
6977 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6978 saved_thread.
6979 (regcache_invalidate_thread): Likewise.
6980 * remote-utils.c (prepare_resume_reply): Likewise.
6981 * thread-db.c (thread_db_get_tls_address): Likewise.
6982 (disable_thread_event_reporting): Likewise.
6983 (remove_thread_event_breakpoints): Likewise.
6984 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6985 as saved_thread.
6986 * target.h (set_desired_inferior): Renamed as...
6987 (set_desired_thread): New declaration. All uses updated.
6988 * server.c (myresume): Updated comment to reference thread instead
6989 of inferior.
6990 (handle_serial_event): Likewise.
6991 (handle_target_event): Likewise.
6992
69932014-09-12 Tom Tromey <tromey@redhat.com>
6994 Gary Benson <gbenson@redhat.com>
6995
6996 * regcache.h: Include common-regcache.h.
6997 (regcache_read_pc): Don't declare.
6998 * regcache.c (get_thread_regcache_for_ptid): New function.
6999
70002014-09-11 Tom Tromey <tromey@redhat.com>
7001 Gary Benson <gbenson@redhat.com>
7002
7003 * symbol.c: New file.
7004 * Makefile.in (SFILES): Add symbol.c.
7005 (OBS): Add symbol.o.
7006
70072014-09-11 Gary Benson <gbenson@redhat.com>
7008
7009 * target.c (target_stop_ptid, target_continue_ptid): New
7010 functions.
7011
70122014-09-11 Tom Tromey <tromey@redhat.com>
7013 Gary Benson <gbenson@redhat.com>
7014
7015 * target.h: Include target/target.h.
7016 * target.c (target_read_memory, target_read_uint32)
7017 (target_write_memory): New functions.
7018
70192014-09-11 Gary Benson <gbenson@redhat.com>
7020
7021 * server.h (debug_hw_points): Don't declare.
7022 * server.c (debug_hw_points): Don't define. Replace all uses
7023 with show_debug_regs.
7024 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
7025 all uses with show_debug_regs.
7026
70272014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
7028
7029 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
7030 endianness into account.
7031 (ppc_supply_ptrace_register): Likewise.
7032
70332014-09-03 James Hogan <james.hogan@imgtec.com>
7034
7035 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
7036 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
7037
70382014-09-03 Gary Benson <gbenson@redhat.com>
7039
7040 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
7041 ALL_DEBUG_ADDRESS_REGISTERS.
7042
70432014-09-02 Gary Benson <gbenson@redhat.com>
7044
7045 * i386-low.h: Renamed as...
7046 * x86-low.h: New file. All type, function and variable name
7047 prefixes changed from "i386_" to "x86_". All references updated.
7048 * i386-low.c: Renamed as...
7049 * x86-low.c: New file. All type, function and variable name
7050 prefixes changed from "i386_" to "x86_". All references updated.
7051
70522014-09-02 Gary Benson <gbenson@redhat.com>
7053
7054 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
7055 (x86_linux_new_thread): Likewise.
7056
70572014-08-29 Gary Benson <gbenson@redhat.com>
7058
7059 * server.h (setjmp.h): Do not include.
7060 (toplevel): Do not declare.
7061 (common-exceptions.h): Include.
7062 (cleanups.h): Likewise.
7063 * server.c (toplevel): Do not define.
7064 (exit_code): New static global.
7065 (detach_or_kill_for_exit_cleanup): New function.
7066 (main): New function. Original main renamed to...
7067 (captured_main): New function.
7068 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7069
70702014-08-29 Gary Benson <gbenson@redhat.com>
7071
7072 * Makefile.in (SFILES): Add common/common-exceptions.c.
7073 (OBS): Add common-exceptions.o.
7074 (common-exceptions.o): New rule.
7075 * utils.c (prepare_to_throw_exception): New function.
7076
70772014-08-29 Gary Benson <gbenson@redhat.com>
7078
7079 * config.in: Regenerate.
7080 * configure: Likewise.
7081
70822014-08-29 Gary Benson <gbenson@redhat.com>
7083
7084 * Makefile.in (SFILES): Add common/cleanups.c.
7085 (OBS): cleanups.o.
7086 (cleanups.o): New rule.
7087
70882014-08-29 Gary Benson <gbenson@redhat.com>
7089
7090 * utils.c (internal_vwarning): New function.
7091
70922014-08-28 Gary Benson <gbenson@redhat.com>
7093
7094 * utils.h (fatal): Remove declaration.
7095 * utils.c (fatal): Remove function.
7096
70972014-08-28 Gary Benson <gbenson@redhat.com>
7098
7099 * tracepoint.c (gdb_agent_init): Replace fatal with
7100 perror_with_name.
7101 (initialize_tracepoint): Likewise.
7102
71032014-08-28 Gary Benson <gbenson@redhat.com>
7104
7105 * remote-utils.c (remote_prepare): Replace fatal with error.
7106
71072014-08-28 Gary Benson <gbenson@redhat.com>
7108
7109 * linux-low.c (linux_async): Replace fatal with warning.
7110 Tidy up and return.
7111 (linux_start_non_stop): Return -1 if linux_async failed.
7112
71132014-08-28 Gary Benson <gbenson@redhat.com>
7114
7115 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7116 gdb_assert.
7117 (i386_dr_low_get_addr): Remove vague comment.
7118 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7119 gdb_assert.
7120
71212014-08-28 Gary Benson <gbenson@redhat.com>
7122
7123 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7124 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7125 internal_error.
7126 (linux_resume_one_lwp): Likewise.
7127 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7128 gdb_assert.
7129 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7130 with internal_error.
7131 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7132 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7133 (find_register_by_name): Replace fatal with internal_error.
7134 (find_regno): Likewise.
7135 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7136 * thread-db.c (thread_db_create_event): Likewise.
7137 (thread_db_load_search): Likewise.
7138 (try_thread_db_load_1): Likewise.
7139 * tracepoint.c (get_jump_space_head): Replace fatal with
7140 internal_error.
7141 (claim_trampoline_space): Likewise.
7142 (have_fast_tracepoint_trampoline_buffer): Likewise.
7143 (cmd_qtstart): Likewise.
7144 (stop_tracing): Likewise.
7145 (fast_tracepoint_collecting): Likewise.
7146 (target_malloc): Likewise.
7147 (download_tracepoint): Likewise.
7148 (download_trace_state_variables): Replace check with gdb_assert.
7149 (upload_fast_traceframes): Replace fatal with internal_error.
7150
71512014-08-19 Tom Tromey <tromey@redhat.com>
7152 Gary Benson <gbenson@redhat.com>
7153
7154 * Makefile.in (SFILES): Add common/common-debug.c.
7155 (OBS): Add common-debug.o.
7156 (common-debug.o): New rule.
7157 * debug.h (debug_printf): Don't declare.
7158 * debug.c (debug_printf): Renamed and rewritten as...
7159 (debug_vprintf): New function.
7160
71612014-08-19 Gary Benson <gbenson@redhat.com>
7162
7163 * utils.h: Do not include print-utils.h.
7164
71652014-08-19 Tom Tromey <tromey@redhat.com>
7166 Gary Benson <gbenson@redhat.com>
7167
7168 * server.h: Add static assertion.
7169 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7170
71712014-08-19 Tom Tromey <tromey@redhat.com>
7172 Gary Benson <gbenson@redhat.com>
7173
7174 * Makefile.in (SFILES): Add common/errors.c.
7175 (OBS): Add errors.o.
7176 (IPA_OBS): Add errors-ipa.o.
7177 (errors.o): New rule.
7178 (errors-ipa.o): Likewise.
7179 * utils.h (perror_with_name, error, warning): Don't declare.
7180 * utils.c (warning): Renamed and rewritten as...
7181 (vwarning): New function.
7182 (error): Renamed and rewritten as...
7183 (verror): New function.
7184 (internal_error): Renamed and rewritten as...
7185 (internal_verror): New function.
7186
71872014-08-07 Gary Benson <gbenson@redhat.com>
7188
7189 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7190 * configure: Regenerate.
7191 * config.in: Likewise.
7192 * server.h: Do not include errno.h.
7193 * event-loop.c: Likewise.
7194 * hostio-errno.c: Likewise.
7195 * linux-low.c: Likewise.
7196 * remote-utils.c: Likewise.
7197 * spu-low.c: Likewise.
7198 * utils.c: Likewise.
7199 * gdbreplay.c: Unconditionally include errno.h.
7200
72012014-08-07 Gary Benson <gbenson@redhat.com>
7202
7203 * server.h: Do not include string.h.
7204 * event-loop.c: Likewise.
7205 * linux-low.c: Likewise.
7206 * regcache.c: Likewise.
7207 * remote-utils.c: Likewise.
7208 * spu-low.c: Likewise.
7209 * utils.c: Likewise.
7210
72112014-08-07 Gary Benson <gbenson@redhat.com>
7212
7213 * server.h: Do not include gdb_assert.h.
7214
72152014-08-07 Gary Benson <gbenson@redhat.com>
7216
7217 * server.h: Do not include common-utils.h.
7218
72192014-08-07 Gary Benson <gbenson@redhat.com>
7220
7221 * server.h: Do not include ptid.h.
7222 * notif.h: Likewise.
7223
72242014-08-07 Gary Benson <gbenson@redhat.com>
7225
7226 * server.h: Do not include gdb_locale.h.
7227
72282014-08-07 Gary Benson <gbenson@redhat.com>
7229
7230 * server.h: Do not include gdb/signals.h.
7231 * win32-low.c: Likewise.
7232
72332014-08-07 Gary Benson <gbenson@redhat.com>
7234
7235 * server.h: Do not include pathmax.h.
7236
72372014-08-07 Gary Benson <gbenson@redhat.com>
7238
7239 * server.h: Do not include libiberty.h.
7240 * linux-bfin-low.c: Likewise.
7241
72422014-08-07 Gary Benson <gbenson@redhat.com>
7243
7244 * server.h: Do not include ansidecl.h.
7245
72462014-08-07 Gary Benson <gbenson@redhat.com>
7247
7248 * linux-x86-low.c: Do not include stddef.h.
7249 * lynx-ppc-low.c: Likewise.
7250 * tracepoint.c: Likewise.
7251
72522014-08-07 Gary Benson <gbenson@redhat.com>
7253
7254 * server.h: Do not include stdarg.h.
7255 * nto-low.c: Likewise.
7256
72572014-08-07 Gary Benson <gbenson@redhat.com>
7258
7259 * server.h: Do not include stdlib.h.
7260 * inferiors.c: Likewise.
7261 * linux-low.c: Likewise.
7262 * regcache.c: Likewise.
7263 * spu-low.c: Likewise.
7264 * tracepoint.c: Likewise.
7265 * utils.c: Likewise.
7266
72672014-08-07 Gary Benson <gbenson@redhat.com>
7268
7269 * server.h: Do not include stdio.h.
7270 * linux-low.c: Likewise.
7271 * remote-utils.c: Likewise.
7272 * spu-low.c: Likewise.
7273 * utils.c: Likewise.
7274 * wincecompat.c: Likewise.
7275
72762014-08-06 Gary Benson <gbenson@redhat.com>
7277
7278 * regcache.c (init_register_cache): Move conditionals inside if.
7279
72802014-08-06 Gary Benson <gbenson@redhat.com>
7281
7282 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7283
72842014-07-31 Gary Benson <gbenson@redhat.com>
7285
7286 * ax.h: Do not include server.h.
7287 * gdbthread.h: Likewise.
7288 * lynx-low.h: Likewise.
7289 * notif.h: Likewise.
7290
72912014-07-30 Gary Benson <gbenson@redhat.com>
7292
7293 * server.h: Include common-defs.h.
7294 Do not include config.h or build-gnulib-gdbserver/config.h.
7295
72962014-07-30 Gary Benson <gbenson@redhat.com>
7297
7298 * hostio-errno.c: Move server.h to top of includes list.
7299 * inferiors.c: Likewise.
7300 * linux-x86-low.c: Likewise.
7301 * notif.c: Include server.h.
7302
73032014-07-24 Tom Tromey <tromey@redhat.com>
7304 Gary Benson <gbenson@redhat.com>
7305
7306 * server.h (CORE_ADDR): Now unsigned.
7307
73082014-07-16 Pedro Alves <palves@redhat.com>
7309
7310 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7311
73122014-07-15 Pedro Alves <palves@redhat.com>
7313
7314 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7315 copy.
7316
73172014-07-11 Pedro Alves <palves@redhat.com>
7318
7319 * linux-low.c (kill_wait_lwp): New function, based on
7320 kill_one_lwp_callback, but use my_waitpid directly.
7321 (kill_one_lwp_callback, linux_kill): Use it.
7322
73232014-06-23 Pedro Alves <palves@redhat.com>
7324
7325 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7326 before setting DR0..DR3.
7327
73282014-06-20 Gary Benson <gbenson@redhat.com>
7329
7330 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7331 * configure: Regenerated.
7332 * config.in: Likewise.
7333
73342014-06-20 Gary Benson <gbenson@redhat.com>
7335
7336 * Makefile.in (SFILES): Update locations for files moved
7337 from common to nat.
7338 (object file files): Reordered.
7339
73402014-06-20 Gary Benson <gbenson@redhat.com>
7341
7342 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7343 (i386_dr_low_set_addr): Likewise.
7344 (i386_dr_low_get_addr): Likewise.
7345 (i386_dr_low_can_set_control): Likewise.
7346 (i386_dr_low_set_control): Likewise.
7347 (i386_dr_low_get_control): Likewise.
7348 (i386_dr_low_get_status): Likewise.
7349 (i386_get_debug_register_length): Likewise.
7350 * linux-x86-low.c (i386_dr_low_set_addr):
7351 Changed signature. Made static.
7352 (i386_dr_low_get_addr): Likewise.
7353 (i386_dr_low_set_control): Likewise.
7354 (i386_dr_low_get_control): Likewise.
7355 (i386_dr_low_get_status): Likewise.
7356 (i386_dr_low): New global variable.
7357 * win32-i386-low.c (i386_dr_low_set_addr):
7358 Changed signature. Made static.
7359 (i386_dr_low_get_addr): Likewise.
7360 (i386_dr_low_set_control): Likewise.
7361 (i386_dr_low_get_control): Likewise.
7362 (i386_dr_low_get_status): Likewise.
7363 (i386_dr_low): New global variable.
7364
73652014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7366
7367 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7368 * Makefile.in (AR, AR_FLAGS): Define.
7369 * configure: Regenerate.
7370
73712014-06-19 Gary Benson <gbenson@redhat.com>
7372
7373 * Makefile.in (i386-dregs.o): New rule.
7374 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7375 * i386-low.c (target.h): Remove include.
7376 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7377 (DR_CONTROL_SHIFT): Likewise.
7378 (DR_CONTROL_SIZE): Likewise.
7379 (DR_RW_EXECUTE): Likewise.
7380 (DR_RW_WRITE): Likewise.
7381 (DR_RW_READ): Likewise.
7382 (DR_RW_IORW): Likewise.
7383 (DR_LEN_1): Likewise.
7384 (DR_LEN_2): Likewise.
7385 (DR_LEN_4): Likewise.
7386 (DR_LEN_8): Likewise.
7387 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7388 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7389 (DR_ENABLE_SIZE): Likewise.
7390 (DR_LOCAL_SLOWDOWN): Likewise.
7391 (DR_GLOBAL_SLOWDOWN): Likewise.
7392 (DR_CONTROL_RESERVED): Likewise.
7393 (I386_DR_CONTROL_MASK): Likewise.
7394 (I386_DR_VACANT): Likewise.
7395 (I386_DR_LOCAL_ENABLE): Likewise.
7396 (I386_DR_GLOBAL_ENABLE): Likewise.
7397 (I386_DR_DISABLE): Likewise.
7398 (I386_DR_SET_RW_LEN): Likewise.
7399 (I386_DR_GET_RW_LEN): Likewise.
7400 (I386_DR_WATCH_HIT): Likewise.
7401 (i386_wp_op_t): Likewise.
7402 (i386_show_dr): Likewise.
7403 (i386_length_and_rw_bits): Likewise.
7404 (i386_insert_aligned_watchpoint): Likewise.
7405 (i386_remove_aligned_watchpoint): Likewise.
7406 (i386_handle_nonaligned_watchpoint): Likewise.
7407 i386_update_inferior_debug_regs(): Likewise.
7408 (i386_dr_insert_watchpoint): Likewise.
7409 (i386_dr_remove_watchpoint): Likewise.
7410 (i386_dr_region_ok_for_watchpoint): Likewise.
7411 (i386_dr_stopped_data_address): Likewise.
7412 (i386_dr_stopped_by_watchpoint): Likewise.
7413
74142014-06-19 Gary Benson <gbenson@redhat.com>
7415
7416 * i386-low.c (i386_dr_show): Renamed to
7417 i386_show_dr and made static. All uses updated.
7418 (i386_dr_length_and_rw_bits): Renamed to
7419 i386_length_and_rw_bits and made static.
7420 All uses updated.
7421 (i386_dr_insert_aligned_watchpoint): Renamed to
7422 i386_insert_aligned_watchpoint and made static.
7423 All uses updated.
7424 (i386_dr_remove_aligned_watchpoint): Renamed to
7425 i386_remove_aligned_watchpoint and made static.
7426 All uses updated.
7427 (i386_dr_update_inferior_debug_regs): Renamed to
7428 i386_update_inferior_debug_regs and made static.
7429 All uses updated.
7430
74312014-06-18 Gary Benson <gbenson@redhat.com>
7432
7433 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7434 (i386_dr_low_can_set_control): Likewise.
7435 (i386_get_debug_register_length): Likewise.
7436 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7437 (i386_dr_low_can_set_control): Likewise.
7438 (i386_get_debug_register_length): Likewise.
7439
74402014-06-17 Gary Benson <gbenson@redhat.com>
7441
7442 * i386-low.h (i386-dregs.h): New include.
7443 (DR_FIRSTADDR): Now in i386-dregs.h.
7444 (DR_LASTADDR): Likewise.
7445 (DR_NADDR): Likewise.
7446 (DR_STATUS): Likewise.
7447 (DR_CONTROL): Likewise.
7448 (i386_debug_reg_state): Likewise.
7449 (i386_dr_insert_watchpoint): Likewise.
7450 (i386_dr_remove_watchpoint): Likewise.
7451 (i386_dr_region_ok_for_watchpoint): Likewise.
7452 (i386_dr_stopped_data_address): Likewise.
7453 (i386_dr_stopped_by_watchpoint): Likewise.
7454 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7455
74562014-06-18 Gary Benson <gbenson@redhat.com>
7457
7458 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7459 i386_dr_insert_watchpoint.
7460 (i386_low_remove_watchpoint): Renamed to
7461 i386_dr_remove_watchpoint.
7462 (i386_low_region_ok_for_watchpoint): Renamed to
7463 i386_dr_region_ok_for_watchpoint.
7464 (i386_low_stopped_data_address): Renamed to
7465 i386_dr_stopped_data_address.
7466 (i386_low_stopped_by_watchpoint): Renamed to
7467 i386_dr_stopped_by_watchpoint.
7468 * i386-low.c (i386_show_dr): Renamed to
7469 i386_dr_show and made nonstatic. All uses updated.
7470 (i386_length_and_rw_bits): Renamed to
7471 i386_dr_length_and_rw_bits and made nonstatic.
7472 All uses updated.
7473 (i386_insert_aligned_watchpoint): Renamed to
7474 i386_dr_insert_aligned_watchpoint and made nonstatic.
7475 All uses updated.
7476 (i386_remove_aligned_watchpoint): Renamed to
7477 i386_dr_remove_aligned_watchpoint and made nonstatic.
7478 All uses updated.
7479 (i386_update_inferior_debug_regs): Renamed to
7480 i386_dr_update_inferior_debug_regs and made nonstatic.
7481 All uses updated.
7482 (i386_low_insert_watchpoint): Renamed to
7483 i386_dr_insert_watchpoint. All uses updated.
7484 (i386_low_remove_watchpoint): Renamed to
7485 i386_dr_remove_watchpoint. All uses updated.
7486 (i386_low_region_ok_for_watchpoint): Renamed to
7487 i386_dr_region_ok_for_watchpoint. All uses updated.
7488 (i386_low_stopped_data_address): Renamed to
7489 i386_dr_stopped_data_address. All uses updated.
7490 (i386_low_stopped_by_watchpoint): Renamed to
7491 i386_dr_stopped_by_watchpoint. All uses updated.
7492
74932014-06-18 Gary Benson <gbenson@redhat.com>
7494
7495 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7496 (i386_dr_low_can_set_control): Likewise.
7497 (i386_insert_aligned_watchpoint): New check.
7498
74992014-06-18 Gary Benson <gbenson@redhat.com>
7500
7501 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7502 Renamed to state.
7503
75042014-06-18 Gary Benson <gbenson@redhat.com>
7505
7506 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7507 instead of fatal and error.
7508 (i386_handle_nonaligned_watchpoint): Likewise.
7509
75102014-06-18 Gary Benson <gbenson@redhat.com>
7511
7512 * i386-low.c (i386_get_debug_register_length): New macro.
7513 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7514 (i386_show_dr): Use debug_printf instead of fprintf. Use
7515 phex to format values.
7516
75172014-06-18 Gary Benson <gbenson@redhat.com>
7518
7519 * i386-low.h: Comment changes.
7520 * i386-low.c: Likewise.
7521
75222014-06-18 Gary Benson <gbenson@redhat.com>
7523
7524 * i386-low.c: Whitespace changes.
7525
75262014-06-12 Tom Tromey <tromey@redhat.com>
7527
7528 * utils.c (freeargv): Remove.
7529
75302014-06-12 Tom Tromey <tromey@redhat.com>
7531
7532 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7533 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7534 (parse_debug_format_options): Likewise.
7535 (gdbserver_usage): Likewise.
7536 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7537 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7538 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7539 against libiberty.
7540 ($(LIBGNU)): Depend on libiberty.
7541 (all-lib): Recurse into all subdirs.
7542 (install-only): Invoke "install" target in subdirs.
7543 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7544 targets.
7545 * configure: Rebuild.
7546 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7547 for vasprintf, vsnprintf, or gettimeofday.
7548 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7549 srv_tgtobj.
7550
75512014-06-05 Joel Brobecker <brobecker@adacore.com>
7552
7553 * development.sh: Delete.
7554 * Makefile.in (config.status): Adjust dependency on development.sh.
7555 * configure.ac: Adjust development.sh source call.
7556 * configure: Regenerate.
7557
75582014-06-02 Pedro Alves <palves@redhat.com>
7559
7560 * ax.c (gdb_free_agent_expr): New function.
7561 * ax.h (gdb_free_agent_expr): New declaration.
7562 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7563 list.
7564 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7565 static.
7566 (clear_breakpoint_conditions_and_commands): New function.
7567 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7568 (clear_breakpoint_conditions_and_commands): New declaration.
7569
75702014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7571
7572 * linux-aarch64-low.c (asm/ptrace.h): Include.
7573
75742014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7575
7576 Fix TLS access for -static -pthread.
7577 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7578 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7579 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7580
75812014-05-20 Pedro Alves <palves@redhat.com>
7582
7583 * linux-aarch64-low.c (aarch64_insert_point)
7584 (aarch64_remove_point): No longer check whether the type is
7585 supported here. Adjust to new interface.
7586 (the_low_target): Install aarch64_supports_z_point_type as
7587 supports_z_point_type method.
7588 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7589 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7590 instead of a Z packet char. Adjust.
7591 (arm_supports_z_point_type): New function.
7592 (arm_insert_point, arm_remove_point): Adjust to new interface.
7593 (the_low_target): Install arm_supports_z_point_type.
7594 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7595 (cris_insert_point, cris_remove_point): Adjust to new interface.
7596 Don't check whether the type is supported here.
7597 (the_low_target): Install cris_supports_z_point_type.
7598 * linux-low.c (linux_supports_z_point_type): New function.
7599 (linux_insert_point, linux_remove_point): Adjust to new interface.
7600 * linux-low.h (struct linux_target_ops) <insert_point,
7601 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7602 raw_breakpoint pointer parameter.
7603 <supports_z_point_type>: New method.
7604 * linux-mips-low.c (mips_supports_z_point_type): New function.
7605 (mips_insert_point, mips_remove_point): Adjust to new interface.
7606 Use mips_supports_z_point_type.
7607 (the_low_target): Install mips_supports_z_point_type.
7608 * linux-ppc-low.c (the_low_target): Install NULL as
7609 supports_z_point_type method.
7610 * linux-s390-low.c (the_low_target): Install NULL as
7611 supports_z_point_type method.
7612 * linux-sparc-low.c (the_low_target): Install NULL as
7613 supports_z_point_type method.
7614 * linux-x86-low.c (x86_supports_z_point_type): New function.
7615 (x86_insert_point): Adjust to new insert_point interface. Use
7616 insert_memory_breakpoint. Adjust to new
7617 i386_low_insert_watchpoint interface.
7618 (x86_remove_point): Adjust to remove_point interface. Use
7619 remove_memory_breakpoint. Adjust to new
7620 i386_low_remove_watchpoint interface.
7621 (the_low_target): Install x86_supports_z_point_type.
7622 * lynx-low.c (lynx_target_ops): Install NULL as
7623 supports_z_point_type callback.
7624 * nto-low.c (nto_supports_z_point_type): New.
7625 (nto_insert_point, nto_remove_point): Adjust to new interface.
7626 (nto_target_ops): Install nto_supports_z_point_type.
7627 * mem-break.c: Adjust intro comment.
7628 (struct raw_breakpoint) <raw_type, size>: New fields.
7629 <inserted>: Update comment.
7630 <shlib_disabled>: Delete field.
7631 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7632 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7633 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7634 (raw_bkpt_type_to_target_hw_bp_type): New function.
7635 (find_enabled_raw_code_breakpoint_at): New function.
7636 (find_raw_breakpoint_at): New type and size parameters. Use them.
7637 (insert_memory_breakpoint): New function, based off
7638 set_raw_breakpoint_at.
7639 (remove_memory_breakpoint): New function.
7640 (set_raw_breakpoint_at): Reimplement.
7641 (set_breakpoint): New, based on set_breakpoint_at.
7642 (set_breakpoint_at): Reimplement.
7643 (delete_raw_breakpoint): Go through the_target->remove_point
7644 instead of assuming memory breakpoints.
7645 (find_gdb_breakpoint_at): Delete.
7646 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7647 (find_gdb_breakpoint): New function.
7648 (set_gdb_breakpoint_at): Delete.
7649 (z_type_supported): New function.
7650 (set_gdb_breakpoint_1): New function, loosely based off
7651 set_gdb_breakpoint_at.
7652 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7653 (delete_gdb_breakpoint_at): Delete.
7654 (delete_gdb_breakpoint_1): New function, loosely based off
7655 delete_gdb_breakpoint_at.
7656 (delete_gdb_breakpoint): New function.
7657 (clear_gdb_breakpoint_conditions): Rename to ...
7658 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7659 breakpoint.
7660 (add_condition_to_breakpoint): Make static.
7661 (add_breakpoint_condition): Take a struct breakpoint pointer
7662 instead of an address. Adjust.
7663 (gdb_condition_true_at_breakpoint): Rename to ...
7664 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7665 z_type parameter.
7666 (gdb_condition_true_at_breakpoint): Reimplement.
7667 (add_breakpoint_commands): Take a struct breakpoint pointer
7668 instead of an address. Adjust.
7669 (gdb_no_commands_at_breakpoint): Rename to ...
7670 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7671 parameter. Return true if no breakpoint was found. Change debug
7672 output.
7673 (gdb_no_commands_at_breakpoint): Reimplement.
7674 (run_breakpoint_commands): Rename to ...
7675 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7676 and change return type to boolean.
7677 (run_breakpoint_commands): New function.
7678 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7679 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7680 breakpoint. Go through the_target->remove_point instead of
7681 assuming memory breakpoint.
7682 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7683 software and hardware breakpoints.
7684 (reinsert_raw_breakpoint): Go through the_target->insert_point
7685 instead of assuming memory breakpoint.
7686 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7687 software and hardware breakpoints.
7688 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7689 Check both software and hardware breakpoints.
7690 (validate_inserted_breakpoint): Assert the breakpoint is a
7691 software breakpoint. Set the inserted flag to -1 instead of
7692 setting shlib_disabled.
7693 (delete_disabled_breakpoints): Adjust.
7694 (validate_breakpoints): Only validate software breakpoints.
7695 Adjust to inserted flag change.
7696 (check_mem_read, check_mem_write): Skip breakpoint types other
7697 than software breakpoints. Adjust to inserted flag change.
7698 * mem-break.h (enum raw_bkpt_type): New enum.
7699 (raw_breakpoint, struct process_info): Forward declare.
7700 (Z_packet_to_target_hw_bp_type): Delete declaration.
7701 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7702 (set_gdb_breakpoint, delete_gdb_breakpoint)
7703 (clear_breakpoint_conditions): New declarations.
7704 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7705 (breakpoint_inserted_here): Update comment.
7706 (add_breakpoint_condition, add_breakpoint_commands): Replace
7707 address parameter with a breakpoint pointer parameter.
7708 (gdb_breakpoint_here): Update comment.
7709 (delete_gdb_breakpoint_at): Delete.
7710 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7711 * server.c (process_point_options): Take a struct breakpoint
7712 pointer instead of an address. Adjust.
7713 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7714 delete_gdb_breakpoint.
7715 * spu-low.c (spu_target_ops): Install NULL as
7716 supports_z_point_type method.
7717 * target.h: Include mem-break.h.
7718 (struct target_ops) <prepare_to_access_memory>: Update comment.
7719 <supports_z_point_type>: New field.
7720 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7721 instead of a char. Also take a raw breakpoint pointer.
7722 * win32-arm-low.c (the_low_target): Install NULL as
7723 supports_z_point_type.
7724 * win32-i386-low.c (i386_supports_z_point_type): New function.
7725 (i386_insert_point, i386_remove_point): Adjust to new interface.
7726 (the_low_target): Install i386_supports_z_point_type.
7727 * win32-low.c (win32_supports_z_point_type): New function.
7728 (win32_insert_point, win32_remove_point): Adjust to new interface.
7729 (win32_target_ops): Install win32_supports_z_point_type.
7730 * win32-low.h (struct win32_target_ops):
7731 <supports_z_point_type>: New method.
7732 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7733 instead of a char. Also take a raw breakpoint pointer.
7734
77352014-05-20 Pedro Alves <palves@redhat.com>
7736
7737 * mem-break.h: Include break-common.h.
7738 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7739 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7740 (Z_packet_to_target_hw_bp_type): New declaration.
7741 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7742 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7743 (Z_PACKET_ACCESS_WP): Delete macros.
7744 (Z_packet_to_hw_type): Delete function.
7745 * i386-low.h: Don't include break-common.h here.
7746 (Z_packet_to_hw_type): Delete declaration.
7747 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7748 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7749 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7750 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7751 * linux-aarch64-low.c: Don't include break-common.h here.
7752 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7753 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7754 (Z_packet_to_target_hw_bp_type): Delete function.
7755 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7756 function.
7757 (mips_insert_point, mips_remove_point): Use
7758 Z_packet_to_target_hw_bp_type.
7759
77602014-05-20 Pedro Alves <palves@redhat.com>
7761
7762 * linux-aarch64-low.c: Include break-common.h.
7763 (enum target_point_type): Delete.
7764 (Z_packet_to_point_type): Rename to ...
7765 (Z_packet_to_target_hw_bp_type): ... this, and return a
7766 target_hw_bp_type instead.
7767 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7768 instead of an enum target_point_type.
7769 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7770 breakpoint type.
7771 (aarch64_dr_state_insert_one_point)
7772 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7773 (aarch64_handle_aligned_watchpoint)
7774 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7775 Take an enum target_hw_bp_type instead of an enum
7776 target_point_type.
7777 (aarch64_supports_z_point_type): New function.
7778 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7779 use Z_packet_to_target_hw_bp_type.
7780
77812014-05-20 Joel Brobecker <brobecker@adacore.com>
7782
7783 * configure.ac: Only use -Werror by default when DEVELOPMENT
7784 is true.
7785 * configure: Regenerate.
7786
77872014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7788
7789 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7790 * linux-x86-low.c (X86_64_USER_REGS): New.
7791 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7792
77932014-04-28 Yao Qi <yao@codesourcery.com>
7794
7795 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7796 name.
7797
77982014-04-25 Pedro Alves <palves@redhat.com>
7799
7800 PR server/16255
7801 * linux-low.c (linux_attach_fail_reason_string): New function.
7802 (linux_attach_lwp): Delete.
7803 (linux_attach_lwp_1): Rename to ...
7804 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7805 argument. Remove "initial" parameter. Return int instead of
7806 void. Don't error or warn here.
7807 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7808 failure to attach to the tgid. Call warning when failing to
7809 attach to an lwp.
7810 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7811 argument. Remove "initial" parameter. Return int instead of
7812 void. Don't error or warn here.
7813 (linux_attach_fail_reason_string): New declaration.
7814 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7815 interface change. Use linux_attach_fail_reason_string.
7816
78172014-04-24 Michael Sturm <michael.sturm@mintel.com>
7818 Walfred Tedeschi <walfred.tedeschi@intel.com>
7819
7820 * Makefile.in: Added rules to handle new files
7821 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7822 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7823 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7824 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7825 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7826 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7827 x32-avx512-linux.o.
7828 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7829 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7830 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7831 i386/x32-avx512.xml.
7832 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7833 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7834 i386/x32-avx512-linux.xml.
7835 * i387-fp.c (num_avx512_k_registers): New constant for number
7836 of K registers.
7837 (num_avx512_zmmh_low_registers): New constant for number of
7838 lower ZMM registers (0-15).
7839 (num_avx512_zmmh_high_registers): New constant for number of
7840 higher ZMM registers (16-31).
7841 (num_avx512_ymmh_registers): New contant for number of higher
7842 YMM registers (ymm16-31 added by avx521 on x86_64).
7843 (num_avx512_xmm_registers): New constant for number of higher
7844 XMM registers (xmm16-31 added by AVX512 on x86_64).
7845 (struct i387_xsave): Add space for AVX512 registers.
7846 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7847 Add code to handle AVX512 registers.
7848 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7849 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7850 prototypei from generated file.
7851 (tdesc_amd64_avx512_linux): Likewise.
7852 (init_registers_x32_avx512_linux): Likewise.
7853 (tdesc_x32_avx512_linux): Likewise.
7854 (init_registers_i386_avx512_linux): Likewise.
7855 (tdesc_i386_avx512_linux): Likewise.
7856 (x86_64_regmap): Add AVX512 registers.
7857 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7858 mask.
7859 (initialize_low_arch): Add code to initialize AVX512 registers.
7860
78612014-04-23 Pedro Alves <palves@redhat.com>
7862
7863 * mem-break.c (find_gdb_breakpoint_at): Make static.
7864 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7865
78662014-04-23 Pedro Alves <palves@redhat.com>
7867
7868 * i386-low.c: Don't include break-common.h here.
7869 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7870 prototype to take target_hw_bp_type as argument instead of a Z
7871 packet char.
7872 * i386-low.h: Include break-common.h here.
7873 (Z_packet_to_hw_type): Declare.
7874 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7875 prototypes.
7876 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7877 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7878 (x86_remove_point): Convert the packet number to a
7879 target_hw_bp_type before calling i386_low_remove_watchpoint.
7880 * win32-i386-low.c (i386_insert_point): Convert the packet number
7881 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7882 (i386_remove_point): Convert the packet number to a
7883 target_hw_bp_type before calling i386_low_remove_watchpoint.
7884
78852014-04-23 Pedro Alves <palves@redhat.com>
7886
7887 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7888
78892014-04-10 Pedro Alves <palves@redhat.com>
7890
7891 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7892 Check if the condition or command is NULL before checking if the
7893 breakpoint is known. On success, return true.
7894 * mem-break.h (add_breakpoint_condition): Document return.
7895 (add_breakpoint_commands): Add describing comment.
7896 * server.c (skip_to_semicolon): New function.
7897 (process_point_options): Use it.
7898
78992014-04-09 Pedro Alves <palves@redhat.com>
7900
7901 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7902 to lwpid_of.
7903
79042014-02-27 Pedro Alves <palves@redhat.com>
7905
7906 PR 12702
7907 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7908 macros.
7909 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7910 output.
7911 (last_thread_of_process_p): Take a PID argument instead of a
7912 thread pointer.
7913 (linux_wait_for_lwp): Delete.
7914 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7915 functions.
7916 (linux_low_filter_event): New function, party factored out from
7917 linux_wait_for_event.
7918 (linux_wait_for_event): Rename to ...
7919 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7920 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7921 sigsuspend. Check for zombie leaders.
7922 (linux_wait_for_event): Reimplement as wrapper around
7923 linux_wait_for_event_filtered.
7924 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7925 a normal or signal exit is seen, it's the whole process exiting.
7926 (wait_for_sigstop): No longer a for_each_inferior callback.
7927 Rewrite on top of linux_wait_for_event_filtered.
7928 (stop_all_lwps): Call wait_for_sigstop directly.
7929 * server.c (resume, handle_target_event): Handle
7930 TARGET_WAITKIND_NO_RESUMED.
7931
79322014-02-26 Joel Brobecker <brobecker@adacore.com>
7933
7934 * win32-low.c (psapi_get_dll_name,
7935 * win32_CreateToolhelp32Snapshot): Delete.
7936 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7937 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7938 Delete.
7939 (handle_load_dll): Add function description.
7940 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7941
79422014-02-26 Joel Brobecker <brobecker@adacore.com>
7943
7944 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7945 Add comment.
7946 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7947 base address when calling win32_add_one_solib.
7948 (handle_load_dll): Delete local variable load_addr.
7949 Remove 0x1000 offset applied to DLL base address when calling
7950 win32_add_one_solib.
7951 (handle_unload_dll): Add comment.
7952
79532014-02-26 Joel Brobecker <brobecker@adacore.com>
7954
7955 * win32-low.c (win32_add_all_dlls): Renames
7956 win32_ensure_ntdll_loaded. Rewrite function documentation.
7957 Adjust implementation to always load all DLLs.
7958 Add 0x1000 offset to DLL base address when calling
7959 win32_add_one_solib.
7960 (child_initialization_done): New static global.
7961 (do_initial_child_stuff): Set child_initialization_done to
7962 zero during child initialization, and 1 after. Replace call
7963 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7964 Add comment.
7965 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7966 (handle_unload_dll): Add function documentation.
7967 (get_child_debug_event): Ignore load and unload DLL events
7968 during child initialization.
7969
79702014-02-20 Doug Evans <dje@google.com>
7971
7972 Remove global all_lwps.
7973 * inferiors.h (ptid_of): Move here from linux-low.h.
7974 (pid_of, lwpid_of): Ditto.
7975 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7976 parameter is a struct thread_info * now.
7977 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7978 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7979 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7980 directly.
7981 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7982 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7983 * linux-arm-low.c (update_registers_callback): Update, "entry"
7984 parameter is a struct thread_info * now.
7985 Fetch lwpid from current_inferior directly.
7986 (arm_insert_point): Pass &all_threads to find_inferior instead of
7987 &all_lwps.
7988 (arm_remove_point): Ditto.
7989 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7990 (arm_prepare_to_resume): Fetch pid from thread.
7991 (arm_read_description): Fetch lwpid from current_inferior directly.
7992 * linux-low.c (all_lwps): Delete.
7993 (delete_lwp): Delete call to remove_inferior.
7994 (handle_extended_wait): Fetch lwpid from thread.
7995 (add_lwp): Don't set lwp->entry.id. Remove call to
7996 add_inferior_to_list.
7997 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7998 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7999 (kill_one_lwp_callback): Ditto.
8000 (linux_kill): Don't dereference NULL pointer.
8001 Fetch ptid,lwpid from thread.
8002 (get_detach_signal): Fetch ptid from thread.
8003 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
8004 Simplify call to regcache_invalidate_thread.
8005 (delete_lwp_callback): Update, "entry" parameter is a
8006 struct thread_info * now. Fetch pid from thread.
8007 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
8008 (status_pending_p_callback): Update, "entry" parameter is a
8009 struct thread_info * now. Fetch ptid from thread.
8010 (find_lwp_pid): Update, "entry" parameter is a
8011 struct thread_info * now.
8012 (linux_wait_for_lwp): Fetch pid from thread.
8013 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
8014 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
8015 (enqueue_one_deferred_signal): Fetch lwpid from thread.
8016 (dequeue_one_deferred_signal): Ditto.
8017 (cancel_breakpoint): Fetch ptid from current_inferior.
8018 (linux_wait_for_event): Pass &all_threads to find_inferior,
8019 not &all_lwps. Fetch ptid, lwpid from thread.
8020 (count_events_callback): Update, "entry" parameter is a
8021 struct thread_info * now.
8022 (select_singlestep_lwp_callback): Ditto.
8023 (select_event_lwp_callback): Ditto.
8024 (cancel_breakpoints_callback): Ditto.
8025 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
8026 not &all_lwps.
8027 (select_event_lwp): Ditto. Fetch ptid from event_thread.
8028 (unsuspend_one_lwp): Update, "entry" parameter is a
8029 struct thread_info * now.
8030 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
8031 not &all_lwps.
8032 (linux_stabilize_threads): Ditto. And for for_each_inferior.
8033 Fetch lwpid from thread, not lwp.
8034 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
8035 Pass &all_threads to find_inferior, not &all_lwps.
8036 (send_sigstop): Fetch lwpid from thread, not lwp.
8037 (send_sigstop_callback): Update, "entry" parameter is a
8038 struct thread_info * now.
8039 (suspend_and_send_sigstop_callback): Ditto.
8040 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
8041 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
8042 struct thread_info * now.
8043 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
8044 from thread, lwp.
8045 (lwp_running): Update, "entry" parameter is a
8046 struct thread_info * now.
8047 (stop_all_lwps): Fetch ptid from thread.
8048 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
8049 (linux_resume_one_lwp): Fetch lwpid from thread.
8050 (linux_set_resume_request): Update, "entry" parameter is a
8051 struct thread_info * now. Fetch pid, lwpid from thread.
8052 (resume_status_pending_p): Update, "entry" parameter is a
8053 struct thread_info * now.
8054 (need_step_over_p): Ditto. Fetch lwpid from thread.
8055 (start_step_over): Fetch lwpid from thread.
8056 (linux_resume_one_thread): Update, "entry" parameter is a
8057 struct thread_info * now. Fetch lwpid from thread.
8058 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
8059 (proceed_one_lwp): Update, "entry" parameter is a
8060 struct thread_info * now. Fetch lwpid from thread.
8061 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
8062 struct thread_info * now.
8063 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
8064 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8065 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8066 directly.
8067 (regsets_store_inferior_registers): Ditto.
8068 (fetch_register, store_register): Ditto.
8069 (linux_read_memory, linux_write_memory): Ditto.
8070 (linux_request_interrupt): Ditto.
8071 (linux_read_auxv): Ditto.
8072 (linux_xfer_siginfo): Ditto.
8073 (linux_qxfer_spu): Ditto.
8074 (linux_qxfer_libraries_svr4): Ditto.
8075 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8076 moved to inferiors.h.
8077 (get_lwp): Delete.
8078 (get_thread_lwp): Update.
8079 (struct lwp_info): Delete member "entry". Simplify comment for
8080 member "thread".
8081 (all_lwps): Delete.
8082 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8083 current_inferior directly.
8084 (update_watch_registers_callback): Update, "entry" parameter is a
8085 struct thread_info * now. Fetch pid from thread.
8086 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8087 (mips_insert_point): Fetch lwpid from current_inferior.
8088 Pass &all_threads to find_inferior, not &all_lwps.
8089 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8090 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8091 directly.
8092 (mips_stopped_data_address): Ditto.
8093 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8094 directly.
8095 * linux-tile-low.c (tile_arch_setup): Ditto.
8096 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8097 (update_debug_registers_callback): Update, "entry" parameter is a
8098 struct thread_info * now. Fetch pid from thread.
8099 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8100 Pass &all_threads to find_inferior, not &all_lwps.
8101 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8102 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8103 Pass &all_threads to find_inferior, not &all_lwps.
8104 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8105 (i386_dr_low_get_status): Ditto.
8106 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8107 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8108 (x86_linux_read_description): Ditto.
8109 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8110
81112014-02-20 Doug Evans <dje@google.com>
8112
8113 * inferiors.c (get_first_inferior): Fix buglet.
8114
81152014-02-19 Doug Evans <dje@google.com>
8116
8117 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8118 * inferiors.c (add_thread): Change result type to struct thread_info *.
8119 All callers updated.
8120 (add_lwp): Call add_thread here instead of in callers.
8121 All callers updated.
8122 * linux-low.h (get_lwp_thread): Rewrite.
8123 (struct lwp_info): New member "thread".
8124
81252014-02-19 Doug Evans <dje@google.com>
8126
8127 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8128 All callers updated.
8129
81302014-02-19 Doug Evans <dje@google.com>
8131
8132 * inferiors.c (add_thread): Fix whitespace.
8133
81342014-02-19 Doug Evans <dje@google.com>
8135
8136 * dll.c (clear_dlls): Replace accessing list implemention details
8137 with API function.
8138 * gdbthread.h (get_first_thread): Declare.
8139 * inferiors.c (for_each_inferior_with_data): New function.
8140 (get_first_thread): New function.
8141 (find_thread_ptid): Simplify.
8142 (get_first_inferior): New function.
8143 (clear_list): Delete.
8144 (one_inferior_p): New function.
8145 (clear_inferior_list): New function.
8146 (clear_inferiors): Update.
8147 * inferiors.h (for_each_inferior_with_data): Declare.
8148 (clear_inferior_list): Declare.
8149 (one_inferior_p): Declare.
8150 (get_first_inferior): Declare.
8151 * linux-low.c (linux_wait_for_event): Replace accessing list
8152 implemention details with API function.
8153 * server.c (target_running): Ditto.
8154 (accumulate_file_name_length): New function.
8155 (emit_dll_description): New function.
8156 (handle_qxfer_libraries): Replace accessing list implemention
8157 details with API function.
8158 (handle_qxfer_threads_worker): New function.
8159 (handle_qxfer_threads_proper): Replace accessing list implemention
8160 details with API function.
8161 (handle_query): Ditto.
8162 (visit_actioned_threads_callback_ftype): New typedef.
8163 (visit_actioned_threads_data): New struct.
8164 (visit_actioned_threads): Rewrite to be find_inferior callback.
8165 (resume): Call find_inferior.
8166 (handle_status): Replace accessing list implemention
8167 details with API function.
8168 (process_serial_event): Replace accessing list implemention details
8169 with API function.
8170 * target.c (set_desired_inferior): Replace accessing list implemention
8171 details with API function.
8172 * tracepoint.c (same_process_p): New function.
8173 (gdb_agent_about_to_close): Replace accessing list implemention
8174 details with API function.
8175 * win32-low.c (child_delete_thread): Replace accessing list
8176 implemention details with API function.
8177 (match_dll_by_basename): New function.
8178 (dll_is_loaded_by_basename): New function.
8179 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8180 details call to dll_is_loaded_by_basename.
8181
81822014-02-19 Doug Evans <dje@google.com>
8183
8184 * dll.h (struct dll_info): Add comment.
8185 * gdbthread.h (struct thread_info): Add comment.
8186 (current_ptid): Simplify.
8187 * inferiors.c (add_process): Update.
8188 (remove_process): Update.
8189 * inferiors.h (struct process_info): Rename member "head" to "entry".
8190 * linux-low.c (delete_lwp): Update.
8191 (add_lwp): Update.
8192 (last_thread_of_process_p): Update.
8193 (kill_one_lwp_callback, linux_kill): Update.
8194 (status_pending_p_callback): Update.
8195 (wait_for_sigstop): Update. Simplify read of ptid.
8196 (start_step_over): Update.
8197 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8198 (get_lwp_thread): Update.
8199 (struct lwp_info): Rename member "head" to "entry".
8200 * regcache.h (inferior_list_entry): Delete.
8201 * server.c (kill_inferior_callback): Update.
8202 (detach_or_kill_inferior_callback): Update.
8203 (print_started_pid): Update.
8204 (print_attached_pid): Update.
8205 (process_serial_event): Simplify read of ptid.
8206 * thread-db.c (thread_db_create_event): Update.
8207 (thread_db_get_tls_address): Update.
8208 * win32-low.c (current_inferior_ptid): Simplify.
8209
82102014-02-19 Tom Tromey <tromey@redhat.com>
8211
8212 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8213 argument.
8214 (target_supports_btrace): Update.
8215
82162014-02-14 Yao Qi <yao@codesourcery.com>
8217
8218 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8219 (rsp-low-ipa.o): New target.
8220
82212014-02-12 Tom Tromey <tromey@redhat.com>
8222
8223 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8224 convert_ascii_to_int.
8225 * regcache.c (registers_to_string): Likewise.
8226 * remote-utils.c (decode_M_packet): Likewise.
8227 * server.c (process_serial_event): Likewise.
8228
82292014-02-12 Tom Tromey <tromey@redhat.com>
8230
8231 * server.c (handle_query, handle_v_run): Use hex2bin, not
8232 unhexify.
8233 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8234
82352014-02-12 Tom Tromey <tromey@redhat.com>
8236
8237 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8238 convert_int_to_ascii.
8239 * regcache.c (registers_to_string, collect_register_as_string):
8240 Likewise.
8241 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8242 Likewise.
8243 * server.c (process_serial_event): Likewise.
8244 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8245 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8246
82472014-02-12 Tom Tromey <tromey@redhat.com>
8248
8249 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8250 bin2hex, not hexify.
8251 * tracepoint.c (cmd_qtstatus): Likewise.
8252
82532014-02-12 Tom Tromey <tromey@redhat.com>
8254
8255 * remote-utils.c (monitor_output): Pass explicit length to
8256 hexify.
8257
82582014-02-12 Tom Tromey <tromey@redhat.com>
8259
8260 * tracepoint.c: Include rsp-low.h.
8261 * server.c: Include rsp-low.h.
8262 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8263 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8264 declare.
8265 * remote-utils.c: Include rsp-low.h.
8266 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8267 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8268 (convert_int_to_ascii, convert_ascii_to_int): Move to
8269 common/rsp-low.c.
8270 * regcache.c: Include rsp-low.h.
8271 * ax.c: Include rsp-low.h.
8272 * Makefile.in (SFILES): Add common/rsp-low.c.
8273 (OBS): Add rsp-low.o.
8274 (rsp-low.o): New target.
8275
82762014-02-12 Tom Tromey <tromey@redhat.com>
8277
8278 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8279 Include print-utils.h.
8280 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8281 (plongest, thirty_two, phex_nz): Remove.
8282 * Makefile.in (SFILES): Add common/print-utils.c.
8283 (OBS): Add print-utils.o.
8284 (print-utils-ipa.o): New target.
8285 (print-utils.o): New target.
8286 (IPA_OBJS): Add print-utils-ipa.o.
8287
82882014-02-06 Tom Tromey <tromey@redhat.com>
8289
8290 * Makefile.in (SFILES): Fix indentation.
8291
82922014-02-05 Doug Evans <dje@google.com>
8293
8294 * linux-low.c (linux_wait_for_event): Improve comment.
8295 (linux_wait_1): Keep current_inferior in sync with event_child.
8296
82972014-01-22 Doug Evans <dje@google.com>
8298
8299 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8300
83012014-01-22 Doug Evans <dje@google.com>
8302
8303 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8304 * configure: Regenerate.
8305 * config.in: Regenerate.
8306 * Makefile.in (SFILES): Add debug.c.
8307 (OBS): Add debug.o.
8308 * debug.c: New file.
8309 * debug.h: New file.
8310 * linux-aarch64-low.c (*): Update all debugging printfs to use
8311 debug_printf instead of fprintf.
8312 * linux-arm-low.c (*): Ditto.
8313 * linux-cris-low.c (*): Ditto.
8314 * linux-crisv32-low.c (*): Ditto.
8315 * linux-m32r-low.c (*): Ditto.
8316 * linux-sparc-low.c (*): Ditto.
8317 * linux-x86.c (*): Ditto.
8318 * linux-low.c (*): Ditto.
8319 (linux_wait_1): Add calls to debug_enter, debug_exit.
8320 (linux_wait): Remove redundant debugging printf.
8321 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8322 (linux_resume, unstop_all_lwps): Ditto.
8323 * mem-break.c (*): Update all debugging printfs to use
8324 debug_printf instead of fprintf.
8325 * remote-utils.c (*): Ditto.
8326 * thread-db.c (*): Ditto.
8327 * server.c #include <ctype.h>, "gdb_vecs.h".
8328 (debug_threads): Moved to debug.c.
8329 (*): Update all debugging printfs to use debug_printf instead of
8330 fprintf.
8331 (start_inferior): Replace call to fflush with call to debug_flush.
8332 (monitor_show_help): Mention set debug-format.
8333 (parse_debug_format_options): New function.
8334 (handle_monitor_command): Handle "monitor set debug-format".
8335 (gdbserver_usage): Mention --debug-format.
8336 (main): Parse --debug-format.
8337 * server.h (debug_threads): Declaration moved to debug.h.
8338 #include "debug.h".
8339 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8340 trace_debug_1 that uses debug_printf.
8341 (tracepoint_look_up_symbols): Update all debugging printfs to use
8342 debug_printf instead of fprintf.
8343
83442014-01-20 Baruch Siach <baruch@tkos.co.il>
8345
8346 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8347 sys/ptrace.h.
8348
83492014-01-17 Pedro Alves <palves@redhat.com>
8350
8351 PR build/16445
8352 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8353 defined after including gdb_proc_service.h.
8354
83552014-01-16 Doug Evans <dje@google.com>
8356
8357 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8358 (match_dll): Use it.
8359
83602014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8361
8362 * target.h (target_ops) <read_btrace>: Change parameters and
8363 return type to allow error reporting.
8364 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8365 trace reading errors on.
8366 * linux-low.c (linux_low_read_btrace): Pass trace reading
8367 errors on.
8368 (linux_low_disable_btrace): New.
8369
83702014-01-15 Doug Evans <dje@google.com>
8371
8372 * inferiors.c (thread_id_to_gdb_id): Delete.
8373 * inferiors.h (thread_id_to_gdb_id): Delete.
8374
83752014-01-13 Eli Zaretskii <eliz@gnu.org>
8376
8377 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8378 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8379 versions.
8380
83812014-01-08 Pedro Alves <palves@redhat.com>
8382
8383 * server.c (handle_status): Don't discard previous queued stop
8384 replies or thread's pending status here.
8385 (main) <disconnection>: Do it here instead.
8386
83872014-01-08 Pedro Alves <palves@redhat.com>
8388
8389 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8390 * server.c (visit_actioned_threads, handle_pending_status): New
8391 function.
8392 (handle_v_cont): Factor out parts to ...
8393 (resume): ... this new function. If in all-stop, and a thread
8394 being resumed has a pending status, report it without actually
8395 resuming.
8396 (myresume): Adjust to use the new 'resume' function.
8397 (clear_pending_status_callback, set_pending_status_callback)
8398 (find_status_pending_thread_callback): New functions.
8399 (handle_status): Handle the case of multiple threads having
8400 interesting statuses to report. Report threads' real last signal
8401 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8402 with an interesting thread to report the status for, instead of
8403 always reporting the status of the first thread.
8404
84052014-01-01 Joel Brobecker <brobecker@adacore.com>
8406
8407 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8408 * gdbreplay.c (gdbreplay_version): Likewise.
8409
84102013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8411
8412 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8413 iov.iov_len with the real length in use.
8414
84152013-12-13 Joel Brobecker <brobecker@adacore.com>
8416
8417 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8418 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8419 for all targets that use win32-low.c.
8420 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8421 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8422
84232013-12-13 Pedro Alves <palves@redhat.com>
8424
8425 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8426 if equal to TARGET_WAITKIND_LOADED.
8427 * win32-low.c (cached_status): New static global.
8428 (win32_wait): Add declaration.
8429 (do_initial_child_stuff): Flush all initial pending debug events
8430 up to the initial breakpoint.
8431 (win32_wait): If CACHED_STATUS was set, return that instead
8432 of doing a real wait. Remove the code resuming the execution
8433 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8434 during the initial phase. Also remove the code changing
8435 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8436 TARGET_WAITKIND_STOPPED.
8437
84382013-12-11 Yao Qi <yao@codesourcery.com>
8439
8440 * notif.c (handle_notif_ack): Return 0 if no notification
8441 matches.
8442
84432013-11-20 Doug Evans <dje@google.com>
8444
8445 * linux-low.c (linux_set_resume_request): Fix comment.
8446
84472013-11-20 Doug Evans <dje@google.com>
8448
8449 * linux-low.c (resume_status_pending_p): Tweak comment.
8450
84512013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8452
8453 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8454 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8455 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8456 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8457 (srv_amd64_regobj): Add amd64-mpx.o.
8458 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8459 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8460 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8461 * i387-fp.c (num_pl_bnd_register) Added constant.
8462 (num_pl_bnd_cfg_registers) Added constant.
8463 (struct i387_xsave) Added reserved area and MPX fields.
8464 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8465 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8466 function.
8467 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8468 (init_registers_amd64_mpx_linux): Declare new function.
8469 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8470 (x86_64_regmap): Add MPX registers.
8471 (x86_linux_read_description): Add MPX case.
8472 (initialize_low_arch): Initialize MPX targets.
8473
84742013-11-18 Tom Tromey <tromey@redhat.com>
8475
8476 * configure: Rebuild.
8477 * configure.ac: Don't check for stdlib.h.
8478 * gdbreplay.c: Unconditionally include stdlib.h.
8479
84802013-11-18 Tom Tromey <tromey@redhat.com>
8481
8482 * config.in: Rebuild.
8483 * configure: Rebuild.
8484 * configure.ac: Don't use AC_HEADER_DIRENT.
8485
84862013-11-18 Tom Tromey <tromey@redhat.com>
8487
8488 * server.h: Don't check HAVE_STRING_H.
8489 * gdbreplay.c: Don't check HAVE_STRING_H.
8490 * configure: Rebuild.
8491
84922013-11-18 Tom Tromey <tromey@redhat.com>
8493
8494 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8495 LIBGNU.
8496
84972013-11-08 Tom Tromey <tromey@redhat.com>
8498
8499 * configure, config.in: Rebuild.
8500 * configure.ac: Remove unused configury.
8501
85022013-11-08 Tom Tromey <tromey@redhat.com>
8503
8504 * acinclude.m4: Include common.m4, codeset.m4.
8505 * configure, config.in: Rebuild.
8506 * configure.ac: Use GDB_AC_COMMON.
8507
85082013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8509
8510 * linux-s390-low.c (HWCAP_S390_TE): New define.
8511 (s390_arch_setup): Consider the TE field in the HWCAP for
8512 determining 'have_regset_tdb'.
8513
85142013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8515
8516 PR gdb/16014
8517 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8518 call to sizeof.
8519
85202013-10-02 Pedro Alves <palves@redhat.com>
8521
8522 * server.c (process_serial_event): Don't output "GDBserver
8523 exiting" if GDB is connected through stdio.
8524 * target.c (mywait): Likewise, be silent if GDB is connected
8525 through stdio.
8526
85272013-10-01 Joel Brobecker <brobecker@adacore.com>
8528
8529 * lynx-low.c (lynx_add_threads_after_attach): New function.
8530 (lynx_attach): Remove call to add_thread. Add call to
8531 lynx_add_threads_after_attach instead.
8532
85332013-09-28 Mike Frysinger <vapier@gentoo.org>
8534
8535 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8536 * config.in, configure: Regenerated.
8537
85382013-09-18 Yao Qi <yao@codesourcery.com>
8539
8540 PR server/15959
8541 * server.c (start_inferior): Clear 'resume_info'.
8542
85432013-09-16 Jiong Wang <jiwang@tilera.com>
8544
8545 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8546 for each register.
8547
85482013-09-16 Jiong Wang <jiwang@tilera.com>
8549
8550 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8551 linux-tile-low.o to srv_tgtobj.
8552
85532013-09-16 Will Newton <will.newton@linaro.org>
8554
8555 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8556 out regs.
8557
85582013-09-06 Pedro Alves <palves@redhat.com>
8559
8560 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8561 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8562 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8563 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8564 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8565 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8566
85672013-09-06 Pedro Alves <palves@redhat.com>
8568
8569 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8570 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8571
85722013-09-06 Pedro Alves <palves@redhat.com>
8573
8574 * linux-amd64-ipa.c: Include tracepoint.h.
8575 * linux-i386-ipa.c: Include tracepoint.h.
8576
85772013-09-06 Ricard Wanderlof <ricardw@axis.com>
8578
8579 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8580 (ps_get_thread_area): New function.
8581
85822013-09-06 Ricard Wanderlof <ricardw@axis.com>
8583
8584 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8585 (initialize_low_arch): Call init_registers_crisv32 rather than
8586 init_register_crisv32.
8587
85882013-09-05 Pedro Alves <palves@redhat.com>
8589
8590 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8591 to ...
8592 * hostio.h: ... this new file.
8593 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8594 win32-low.c: Include hostio.h.
8595
85962013-09-05 Pedro Alves <palves@redhat.com>
8597
8598 * server.h (gdb_client_data, handler_func, callback_handler_func)
8599 (delete_file_handler, add_file_handler, append_callback_event)
8600 (delete_callback_event, start_event_loop, initialize_event_loop):
8601 Move to event-loop.h and include it.
8602 * event-loop.h: New file.
8603
86042013-09-05 Pedro Alves <palves@redhat.com>
8605
8606 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8607 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8608 (loaded_dll, unloaded_dll): Move to ...
8609 * dll.h: ... this new file.
8610 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8611
86122013-09-05 Pedro Alves <palves@redhat.com>
8613
8614 * server.h (current_process, get_thread_process, all_processes)
8615 (add_inferior_to_list, for_each_inferior, current_inferior)
8616 (remove_inferior, add_process, remove_process, find_process_pid)
8617 (have_started_inferiors_p, have_attached_inferiors_p)
8618 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8619 (clear_inferiors, find_inferior, find_inferior_id)
8620 (inferior_target_data, set_inferior_target_data)
8621 (inferior_regcache_data, set_inferior_regcache_data): Move to
8622 inferiors.h, and include it.
8623 * inferiors.h: New file.
8624
86252013-09-05 Pedro Alves <palves@redhat.com>
8626
8627 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8628 Move ...
8629 * ax.h: ... here.
8630
86312013-09-05 Pedro Alves <palves@redhat.com>
8632
8633 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8634 tracepoint.h.
8635 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8636 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8637 (handle_tracepoint_general_set, handle_tracepoint_query)
8638 (tracepoint_finished_step, tracepoint_was_hit)
8639 (release_while_stepping_state_list, current_traceframe)
8640 (in_readonly_region, traceframe_read_mem)
8641 (fetch_traceframe_registers, traceframe_read_sdata)
8642 (traceframe_read_info, struct fast_tpoint_collect_status)
8643 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8644 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8645 (supply_fast_tracepoint_registers)
8646 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8647 (ipa_tdesc, claim_trampoline_space)
8648 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8649 (agent_mem_read, agent_get_trace_state_variable_value)
8650 (agent_set_trace_state_variable_value, agent_tsv_read)
8651 (agent_mem_read_string, get_raw_reg_func_addr)
8652 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8653 * tracepoint.h: ... this new file.
8654
86552013-09-05 Pedro Alves <palves@redhat.com>
8656
8657 * server.h (perror_with_name, error, fatal, warning, paddress)
8658 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8659 include it.
8660 * utils.h: New file.
8661
86622013-09-05 Pedro Alves <palves@redhat.com>
8663
8664 * server.h (remote_debug, noack_mode, transport_is_reliable)
8665 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8666 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8667 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8668 (write_enn, initialize_async_io, enable_async_io)
8669 (disable_async_io, check_remote_input_interrupt_request)
8670 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8671 (dead_thread_notify, prepare_resume_reply)
8672 (decode_address_to_semicolon, decode_address, decode_m_packet)
8673 (decode_M_packet, decode_X_packet, decode_xfer_write)
8674 (decode_search_memory_packet, unhexify, hexify)
8675 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8676 (look_up_one_symbol, relocate_instruction)
8677 (monitor_output): Move to remote-utils.h, and include it.
8678 * remote-utils.h: New file.
8679
86802013-09-05 Pedro Alves <palves@redhat.com>
8681
8682 * server.h (_): Delete.
8683
86842013-09-02 Pedro Alves <palves@redhat.com>
8685
8686 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8687 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8688 allocated.
8689 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8690
86912013-09-02 Pierre Muller <muller@sourceware.org>
8692
8693 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8694 or WriteProcessMemory complete successfully and handle
8695 ERROR_PARTIAL_COPY error.
8696
86972013-09-02 Pedro Alves <palves@redhat.com>
8698
8699 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8700 error instead of EIO.
8701
87022013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8703
8704 PR server/15604
8705 * linux-low.c: Include filestuff.h.
8706 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8707 * lynx-low.c: Include filestuff.h.
8708 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8709 * server.c: Include filestuff.h.
8710 (main): Call notice_open_fds.
8711 * spu-low.c: Include filestuff.h.
8712 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8713
87142013-08-22 Luis Machado <lgustavo@codesourcery.com>
8715
8716 * Makefile.in: Explain why ../target and ../nat are not
8717 listed as include file search paths.
8718 (linux-waitpid.o): New object file rule.
8719 * configure.srv (srv_native_linux_obj): New variable.
8720 Replace all occurrences of linux native object files with
8721 $srv_native_linux_obj.
8722 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8723 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8724 (linux_enable_event_reporting): Remove declaration.
8725 (my_waitpid): Moved to common/linux-waitpid.c.
8726 (linux_wait_for_event): Pass ptid when calling
8727 linux_enable_event_reporting.
8728 (linux_supports_tracefork_flag): Remove.
8729 (linux_enable_event_reporting): Likewise.
8730 (linux_tracefork_grandchild): Remove.
8731 (STACK_SIZE): Moved to common/linux-ptrace.c.
8732 (linux_tracefork_child): Remove.
8733 (linux_test_for_tracefork): Remove.
8734 (linux_look_up_symbols): Call linux_supports_traceclone.
8735 (initialize_low): Remove call to linux_test_for_tracefork.
8736 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8737 common/linux-ptrace.h.
8738 (PTRACE_TYPE_ARG4): Likewise.
8739 Include linux-ptrace.h.
8740
87412013-08-21 Pedro Alves <palves@redhat.com>
8742
8743 * config.in: Renegerate.
8744
87452013-08-19 Luis Machado <lgustavo@codesourcery.com>
8746
8747 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8748 (SFILES): Remove $(srcdir)/common/target-common.c and
8749 add $(srcdir)/target/waitstatus.c.
8750 (OBS): Remove target-common.o and add waitstatus.o.
8751 (server_h): Remove $(srcdir)/../common/target-common.h and
8752 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8753 and $(srcdir)/../target/waitstatus.h.
8754 (target-common.o): Remove.
8755 (waitstatus.o): New target object file.
8756 * target.h: Do not include target-common.h and
8757 include target/resume.h, target/wait.h and
8758 target/waitstatus.h.
8759
87602013-08-13 Luis Machado <lgustavo@codesourcery.com>
8761
8762 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8763 to PTRACE_TYPE_ARG3.
8764 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8765 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8766 PTRACE_TYPE_ARG4.
8767 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8768 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8769
87702013-07-27 Jie Zhang <jie@codesourcery.com>
8771 Daniel Jacobowitz <dan@codesourcery.com>
8772 Yao Qi <yao@codesourcery.com>
8773
8774 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8775 (mips-linux-watch.o): New rule.
8776 (mips_linux_watch_h): New variable.
8777 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8778 srv_tgtobj.
8779 * linux-mips-low.c: Include mips-linux-watch.h.
8780 (struct arch_process_info, struct arch_lwp_info): New.
8781 (update_watch_registers_callback): New function.
8782 (mips_linux_new_process, mips_linux_new_thread) New functions.
8783 (mips_linux_prepare_to_resume, mips_insert_point): New
8784 functions.
8785 (mips_remove_point, mips_stopped_by_watchpoint): New
8786 functions.
8787 (rsp_bp_type_to_target_hw_bp_type): New function.
8788 (mips_stopped_data_address): New function.
8789 (the_low_target): Add watchpoint support functions.
8790
87912013-07-27 Yao Qi <yao@codesourcery.com>
8792
8793 * i386-low.c: Include break-common.h.
8794 (enum target_hw_bp_type): Remove.
8795
87962013-07-24 Luis Machado <lgustavo@codesourcery.com>
8797
8798 * Makefile.in (SFILES): /common/target-common.c.
8799 (OBS): Add target-common.o.
8800 (server_h): Add $(srcdir)/../common/target-common.h.
8801 (target-common.o): New target.
8802 * server.c (queue_stop_reply_callback): Free
8803 status string after use.
8804 * target.c (target_waitstatus_to_string): Remove.
8805 * target.h: Include target-common.h.
8806 (resume_kind): Likewise.
8807 (target_waitkind): Likewise.
8808 (target_waitstatus): Likewise.
8809 (TARGET_WNOHANG): Likewise.
8810
88112013-07-04 Yao Qi <yao@codesourcery.com>
8812
8813 * Makefile.in (host_alias): Use @host_noncanonical@.
8814 (target_alias): Use @target_noncanonical@.
8815 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8816 ACX_NONCANONICAL_HOST.
8817 * configure: Regenerated.
8818
8819 Revert:
8820 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8821
8822 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8823 * configure: Rebuild.
8824 * Makefile.in (version_host, version_target): Get from configure.
8825 (version.c): Use $(version_host) and $(version_target).
8826
88272013-07-03 Pedro Alves <palves@redhat.com>
8828
8829 * Makefile.in (config.status): Depend on development.sh.
8830 * acinclude.m4: Include libmcheck.m4.
8831 * configure: Regenerate.
8832
88332013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8834
8835 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8836 attribute inside the parentheses.
8837 (winapi_DebugSetProcessKillOnExit): Ditto.
8838 (winapi_DebugBreakProcess): Ditto.
8839 (winapi_GenerateConsoleCtrlEvent): Ditto.
8840
88412013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8842
8843 * notif.h (notif_event): Add a dummy member to avoid compiler
8844 errors.
8845
88462013-07-01 Pedro Alves <palves@redhat.com>
8847
8848 * hostio.c (HOSTIO_PATH_MAX): Define.
8849 (require_filename, handle_open, handle_unlink, handle_readlink):
8850 Use it.
8851
88522013-07-01 Pedro Alves <palves@redhat.com>
8853
8854 * server.h: Include "pathmax.h".
8855 * linux-low.c: Don't include sys/param.h.
8856 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8857 MAXPATHLEN.
8858 * win32-low.c: Don't include sys/param.h.
8859 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8860
88612013-07-01 Pedro Alves <palves@redhat.com>
8862
8863 * event-loop.c: Don't check HAVE_UNISTD_H before including
8864 <unistd.h>.
8865 * gdbreplay.c: Likewise.
8866 * remote-utils.c: Likewise.
8867 * server.c: Likewise.
8868 * configure.ac: Don't check for unistd.h.
8869 * configure: Regenerate.
8870
88712013-06-28 Tom Tromey <tromey@redhat.com>
8872
8873 * Makefile.in (version.c): Use version.in, not
8874 common/version.in.
8875
88762013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8877
8878 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8879 * configure: Rebuild.
8880 * Makefile.in (version_host, version_target): Get from configure.
8881 (version.c): Use $(version_host) and $(version_target).
8882
88832013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8884
8885 Fix trace-status to output user name without trailing colon.
8886 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8887
88882013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8889
8890 Fix trace-status to output proper start-time and stop-time.
8891 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8892 output start time and stop time in hex as gdb expects.
8893
88942013-06-26 Pedro Alves <pedro@codesourcery.com>
8895
8896 * tracepoint.c (build_traceframe_info_xml): Output trace state
8897 variables present in the trace buffer.
8898
88992013-06-24 Tom Tromey <tromey@redhat.com>
8900
8901 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8902 create-version.sh.
8903 (version.o): Remove.
8904 * gdbreplay.c: Include version.h.
8905 (version, host_name): Don't declare.
8906 * server.h: Include version.h.
8907 (version, host_name): Don't declare.
8908
89092013-06-12 Pedro Alves <palves@redhat.com>
8910
8911 * linux-x86-low.c (linux_is_elf64): Delete global.
8912 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8913 with local linux_pid_exe_is_elf_64_file use.
8914
89152013-06-11 Pedro Alves <palves@redhat.com>
8916
8917 * linux-low.c (regset_disabled, disable_regset): New functions.
8918 (regsets_fetch_inferior_registers)
8919 (regsets_store_inferior_registers): Use them.
8920 (initialize_regsets_info); Don't allocate the disabled_regsets
8921 array here.
8922 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8923 comment.
8924
89252013-06-11 Pedro Alves <palves@redhat.com>
8926
8927 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8928 xmalloc.
8929
89302013-06-11 Pedro Alves <palves@redhat.com>
8931
8932 * linux-x86-low.c (initialize_low_arch): Call
8933 init_registers_x32_avx_linux.
8934
89352013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8936
8937 Fix compatibility with Android Bionic.
8938 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8939 it is not empty.
8940
89412013-06-07 Pedro Alves <palves@redhat.com>
8942
8943 PR server/14823
8944 * Makefile.in (OBS): Add tdesc.o.
8945 (IPA_OBJS): Add tdesc-ipa.o.
8946 (tdesc-ipa.o): New rule.
8947 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8948 interface.
8949 * linux-low.c (new_inferior): Delete.
8950 (disabled_regsets, num_regsets): Delete.
8951 (linux_add_process): Adjust to set the new per-process
8952 new_inferior flag.
8953 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8954 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8955 was a stop. When calling arch_setup, switch the current inferior
8956 to the thread that got an event.
8957 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8958 (regsets_fetch_inferior_registers)
8959 (regsets_store_inferior_registers): New regsets_info parameter.
8960 Adjust to use it.
8961 (linux_register_in_regsets): New regs_info parameter. Adjust to
8962 use it.
8963 (register_addr, fetch_register, store_register): New usrregs_info
8964 parameter. Adjust to use it.
8965 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8966 parameter regs_info. Adjust to use it.
8967 (linux_fetch_registers): Get the current inferior's regs_info, and
8968 adjust to use it.
8969 (linux_store_registers): Ditto.
8970 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8971 (initialize_low): Don't initialize the target_regsets here. Call
8972 initialize_low_arch.
8973 * linux-low.h (target_regsets): Delete declaration.
8974 (struct regsets_info): New.
8975 (struct usrregs_info): New.
8976 (struct regs_info): New.
8977 (struct process_info_private) <new_inferior>: New field.
8978 (struct linux_target_ops): Delete the num_regs, regmap, and
8979 regset_bitmap fields. New field regs_info.
8980 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8981 * i387-fp.c (num_xmm_registers): Delete.
8982 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8983 calls to new interface.
8984 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8985 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8986 Infer the number of xmm registers from the regcache's target
8987 description.
8988 * i387-fp.h (num_xmm_registers): Delete.
8989 * inferiors.c (add_thread): Don't install the thread's regcache
8990 here.
8991 * proc-service.c (gregset_info): Fetch the current inferior's
8992 regs_info. Adjust to use it.
8993 * regcache.c: Include tdesc.h.
8994 (register_bytes, reg_defs, num_registers)
8995 (gdbserver_expedite_regs): Delete.
8996 (get_thread_regcache): If the thread doesn't have a regcache yet,
8997 create one, instead of aborting gdbserver.
8998 (regcache_invalidate_one): Rename to ...
8999 (regcache_invalidate_thread): ... this.
9000 (regcache_invalidate_one): New.
9001 (regcache_invalidate): Only invalidate registers of the current
9002 process.
9003 (init_register_cache): Add target_desc parameter, and use it.
9004 (new_register_cache): Ditto. Assert the target description has a
9005 non zero registers_size.
9006 (regcache_cpy): Add assertions. Adjust.
9007 (realloc_register_cache, set_register_cache): Delete.
9008 (registers_to_string, registers_from_string): Adjust.
9009 (find_register_by_name, find_regno, find_register_by_number)
9010 (register_cache_size): Add target_desc parameter, and use it.
9011 (free_register_cache_thread, free_register_cache_thread_one)
9012 (regcache_release, register_cache_size): New.
9013 (register_size): Add target_desc parameter, and use it.
9014 (register_data, supply_register, supply_register_zeroed)
9015 (supply_regblock, supply_register_by_name, collect_register)
9016 (collect_register_as_string, collect_register_by_name): Adjust.
9017 * regcache.h (struct target_desc): Forward declare.
9018 (struct regcache) <tdesc>: New field.
9019 (init_register_cache, new_register_cache): Add target_desc
9020 parameter.
9021 (regcache_invalidate_thread): Declare.
9022 (regcache_invalidate_one): Delete declaration.
9023 (regcache_release): Declare.
9024 (find_register_by_number, register_cache_size, register_size)
9025 (find_regno): Add target_desc parameter.
9026 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
9027 declarations.
9028 * remote-utils.c: Include tdesc.h.
9029 (outreg, prepare_resume_reply): Adjust.
9030 * server.c: Include tdesc.h.
9031 (gdbserver_xmltarget): Delete declaration.
9032 (get_features_xml, process_serial_event): Adjust.
9033 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
9034 declare.
9035 (struct process_info) <tdesc>: New field.
9036 (ipa_tdesc): Declare.
9037 * tdesc.c: New file.
9038 * tdesc.h: New file.
9039 * tracepoint.c: Include tdesc.h.
9040 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
9041 (get_context_regcache): Adjust to pass ipa_tdesc down.
9042 (do_action_at_tracepoint): Adjust to get the register cache size
9043 from the context regcache's description.
9044 (traceframe_walk_blocks): Adjust to get the register cache size
9045 from the current trace frame's description.
9046 (traceframe_get_pc): Adjust to get current trace frame's
9047 description and pass it down.
9048 (gdb_collect): Adjust to get the register cache size from the
9049 IPA's description.
9050 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
9051 (gdbserver_xmltarget): Delete.
9052 (initialize_low_tracepoint): Set the ipa's target description.
9053 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
9054 (initialize_low_tracepoint): Set the ipa's target description.
9055 * linux-x86-low.c: Include tdesc.h.
9056 [__x86_64__] (is_64bit_tdesc): New.
9057 (ps_get_thread_area, x86_get_thread_area): Use it.
9058 (i386_cannot_store_register): Rename to ...
9059 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
9060 (i386_cannot_fetch_register): Rename to ...
9061 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
9062 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
9063 to new interface.
9064 (target_regsets): Rename to ...
9065 (x86_regsets): ... this.
9066 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9067 interface.
9068 (x86_siginfo_fixup): Use is_64bit_tdesc.
9069 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9070 (tdesc_x32_avx_linux, tdesc_x32_linux)
9071 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9072 Declare.
9073 (x86_linux_update_xmltarget): Delete.
9074 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9075 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9076 (AMD64_LINUX_USER64_CS): New.
9077 (x86_linux_read_description): New, based on
9078 x86_linux_update_xmltarget.
9079 (same_process_callback): New.
9080 (x86_arch_setup_process_callback): New.
9081 (x86_linux_update_xmltarget): New.
9082 (x86_regsets_info): New.
9083 (amd64_linux_regs_info): New.
9084 (i386_linux_usrregs_info): New.
9085 (i386_linux_regs_info): New.
9086 (x86_linux_regs_info): New.
9087 (x86_arch_setup): Reimplement.
9088 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9089 (x86_emit_ops): Ditto.
9090 (the_low_target): Adjust. Install x86_linux_regs_info,
9091 x86_cannot_fetch_register, and x86_cannot_store_register.
9092 (initialize_low_arch): New.
9093 * linux-ia64-low.c (tdesc_ia64): Declare.
9094 (ia64_fetch_register): Adjust.
9095 (ia64_usrregs_info, regs_info): New globals.
9096 (ia64_regs_info): New function.
9097 (the_low_target): Adjust.
9098 (initialize_low_arch): New function.
9099 * linux-sparc-low.c (tdesc_sparc64): Declare.
9100 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9101 Adjust.
9102 (sparc_arch_setup): New function.
9103 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9104 (the_low_target): Adjust.
9105 (initialize_low_arch): New function.
9106 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9107 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9108 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9109 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9110 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9111 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9112 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9113 (tdesc_powerpc_isa205_vsx64l): Declare.
9114 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9115 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9116 (ppc_set_pc, ppc_get_hwcap): Adjust.
9117 (ppc_usrregs_info): Forward declare.
9118 (!__powerpc64__) ppc_regmap_adjusted: New global.
9119 (ppc_arch_setup): Adjust to the current process'es target
9120 description.
9121 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9122 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9123 (ppc_store_evrregset): Adjust.
9124 (target_regsets): Rename to ...
9125 (ppc_regsets): ... this, and make static.
9126 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9127 (ppc_regs_info): New function.
9128 (the_low_target): Adjust.
9129 (initialize_low_arch): New function.
9130 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9131 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9132 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9133 (tdesc_s390x_linux64v2): Declare.
9134 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9135 (s390_fill_gregset, s390_store_last_break): Adjust.
9136 (target_regsets): Rename to ...
9137 (s390_regsets): ... this, and make static.
9138 (s390_get_pc, s390_set_pc): Adjust.
9139 (s390_get_hwcap): New target_desc parameter, and use it.
9140 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9141 (s390_arch_setup): Adjust to set the current process'es target
9142 description. Don't adjust the regmap.
9143 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9144 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9145 (regs_info_3264): New globals.
9146 (s390_regs_info): New function.
9147 (the_low_target): Adjust.
9148 (initialize_low_arch): New function.
9149 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9150 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9151 [__mips64] (init_registers_mips_linux)
9152 (init_registers_mips_dsp_linux): Delete defines.
9153 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9154 (have_dsp): New global.
9155 (mips_read_description): New, based on mips_arch_setup.
9156 (mips_arch_setup): Reimplement.
9157 (get_usrregs_info): New function.
9158 (mips_cannot_fetch_register, mips_cannot_store_register)
9159 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9160 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9161 (target_regsets): Rename to ...
9162 (mips_regsets): ... this, and make static.
9163 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9164 (dsp_regs_info, regs_info): New globals.
9165 (mips_regs_info): New function.
9166 (the_low_target): Adjust.
9167 (initialize_low_arch): New function.
9168 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9169 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9170 Declare.
9171 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9172 (arm_read_description): New, with bits factored from
9173 arm_arch_setup.
9174 (arm_arch_setup): Reimplement.
9175 (target_regsets): Rename to ...
9176 (arm_regsets): ... this, and make static.
9177 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9178 (arm_regs_info): New function.
9179 (the_low_target): Adjust.
9180 (initialize_low_arch): New function.
9181 * linux-m68k-low.c (tdesc_m68k): Declare.
9182 (target_regsets): Rename to ...
9183 (m68k_regsets): ... this, and make static.
9184 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9185 (m68k_regs_info): New function.
9186 (m68k_arch_setup): New function.
9187 (the_low_target): Adjust.
9188 (initialize_low_arch): New function.
9189 * linux-sh-low.c (tdesc_sharch): Declare.
9190 (target_regsets): Rename to ...
9191 (sh_regsets): ... this, and make static.
9192 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9193 (sh_regs_info, sh_arch_setup): New functions.
9194 (the_low_target): Adjust.
9195 (initialize_low_arch): New function.
9196 * linux-bfin-low.c (tdesc_bfin): Declare.
9197 (bfin_arch_setup): New function.
9198 (bfin_usrregs_info, regs_info): New globals.
9199 (bfin_regs_info): New function.
9200 (the_low_target): Adjust.
9201 (initialize_low_arch): New function.
9202 * linux-cris-low.c (tdesc_cris): Declare.
9203 (cris_arch_setup): New function.
9204 (cris_usrregs_info, regs_info): New globals.
9205 (cris_regs_info): New function.
9206 (the_low_target): Adjust.
9207 (initialize_low_arch): New function.
9208 * linux-cris-low.c (tdesc_crisv32): Declare.
9209 (cris_arch_setup): New function.
9210 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9211 (cris_regs_info): New function.
9212 (the_low_target): Adjust.
9213 (initialize_low_arch): New function.
9214 * linux-m32r-low.c (tdesc_m32r): Declare.
9215 (m32r_arch_setup): New function.
9216 (m32r_usrregs_info, regs_info): New globals.
9217 (m32r_regs_info): Adjust.
9218 (initialize_low_arch): New function.
9219 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9220 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9221 (tic6x_usrregs_info): Forward declare.
9222 (tic6x_read_description): New function, based on ...
9223 (tic6x_arch_setup): ... this. Reimplement.
9224 (target_regsets): Rename to ...
9225 (tic6x_regsets): ... this, and make static.
9226 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9227 (tic6x_regs_info): New function.
9228 (the_low_target): Adjust.
9229 (initialize_low_arch): New function.
9230 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9231 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9232 (target_regsets): Rename to ...
9233 (xtensa_regsets): ... this, and make static.
9234 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9235 globals.
9236 (xtensa_arch_setup, xtensa_regs_info): New functions.
9237 (the_low_target): Adjust.
9238 (initialize_low_arch): New function.
9239 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9240 (nios2_arch_setup): Set the current process'es tdesc.
9241 (target_regsets): Rename to ...
9242 (nios2_regsets): ... this.
9243 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9244 (nios2_regs_info): New function.
9245 (the_low_target): Adjust.
9246 (initialize_low_arch): New function.
9247 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9248 (aarch64_arch_setup): Set the current process'es tdesc.
9249 (target_regsets): Rename to ...
9250 (aarch64_regsets): ... this.
9251 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9252 (aarch64_regs_info): New function.
9253 (the_low_target): Adjust.
9254 (initialize_low_arch): New function.
9255 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9256 globals.
9257 (target_regsets): Rename to ...
9258 (tile_regsets): ... this.
9259 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9260 (tile_regs_info): New function.
9261 (tile_arch_setup): Set the current process'es tdesc.
9262 (the_low_target): Adjust.
9263 (initialize_low_arch): New function.
9264 * spu-low.c (tdesc_spu): Declare.
9265 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9266 * win32-arm-low.c (tdesc_arm): Declare.
9267 (arm_arch_setup): New function.
9268 (the_low_target): Install arm_arch_setup instead of
9269 init_registers_arm.
9270 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9271 (init_windows_x86): Rename to ...
9272 (i386_arch_setup): ... this. Set `win32_tdesc'.
9273 (the_low_target): Adjust.
9274 * win32-low.c (win32_tdesc): New global.
9275 (child_add_thread): Don't create the thread cache here.
9276 (do_initial_child_stuff): Set the new process'es tdesc.
9277 * win32-low.h (struct target_desc): Forward declare.
9278 (win32_tdesc): Declare.
9279 * lynx-i386-low.c (tdesc_i386): Declare global.
9280 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9281 * lynx-low.c (lynx_tdesc): New global.
9282 (lynx_add_process): Set the new process'es tdesc.
9283 * lynx-low.h (struct target_desc): Forward declare.
9284 (lynx_tdesc): Declare global.
9285 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9286 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9287 * nto-low.c (nto_tdesc): New global.
9288 (do_attach): Set the new process'es tdesc.
9289 * nto-low.h (struct target_desc): Forward declare.
9290 (nto_tdesc): Declare.
9291 * nto-x86-low.c (tdesc_i386): Declare.
9292 (nto_x86_arch_setup): Set `nto_tdesc'.
9293
92942013-06-04 Gary Benson <gbenson@redhat.com>
9295
9296 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9297 to qSupported response when appropriate.
9298 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9299 with nonzero-length annex.
9300 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9301 arguments supplied in annex.
9302
93032013-05-31 Doug Evans <dje@google.com>
9304
9305 PR server/15594
9306 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9307 64 bits in 64-cross-32 environment.
9308
93092013-05-28 Pedro Alves <palves@redhat.com>
9310
9311 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9312 (aarch64-without-fpu.c): Delete rule.
9313 * configure.srv (aarch64*-*-linux*): Remove references to
9314 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9315 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9316 declaration.
9317
93182013-05-24 Pedro Alves <palves@redhat.com>
9319
9320 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9321 instead of strchr/decode_address. Error if the range isn't split
9322 with a ','. Don't assume there's be a ':' in the action.
9323
93242013-05-23 Yao Qi <yao@codesourcery.com>
9325 Pedro Alves <palves@redhat.com>
9326
9327 * linux-low.c (lwp_in_step_range): New function.
9328 (linux_wait_1): If the thread was range stepping and stopped
9329 outside the stepping range, report the stop to GDB. Otherwise,
9330 continue stepping. Add range stepping debug output.
9331 (linux_set_resume_request): Copy the step range from the resume
9332 request to the lwp.
9333 (linux_supports_range_stepping): New.
9334 (linux_target_ops) <supports_range_stepping>: Set to
9335 linux_supports_range_stepping.
9336 * linux-low.h (struct linux_target_ops)
9337 <supports_range_stepping>: New field.
9338 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9339 * linux-x86-low.c (x86_supports_range_stepping): New.
9340 (the_low_target) <supports_range_stepping>: Set to
9341 x86_supports_range_stepping.
9342 * server.c (handle_v_cont): Handle 'r' action.
9343 (handle_v_requests): Append ";r" if the target supports range
9344 stepping.
9345 * target.h (struct thread_resume) <step_range_start,
9346 step_range_end>: New fields.
9347 (struct target_ops) <supports_range_stepping>:
9348 New field.
9349 (target_supports_range_stepping): New macro.
9350
93512013-05-17 Joel Brobecker <brobecker@adacore.com>
9352
9353 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9354 confusion in comment.
9355
93562013-05-17 Joel Brobecker <brobecker@adacore.com>
9357
9358 * lynx-low.c (struct process_info_private): New type.
9359 (lynx_add_process): New function.
9360 (lynx_create_inferior, lynx_attach): Replace calls to
9361 add_process by calls to lynx_add_process.
9362 (lynx_resume): If PTID is null, then try using
9363 current_process()->private->last_wait_event_ptid.
9364 Add comments.
9365 (lynx_clear_inferiors): Delete. The contents of that function
9366 has been inlined in lynx_mourn;
9367 (lynx_wait_1): Save the ptid in the process's private data.
9368 (lynx_mourn): Free the process' private data. Replace call
9369 to lynx_clear_inferiors by call to clear_inferiors.
9370
93712013-05-17 Yao Qi <yao@codesourcery.com>
9372
9373 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9374 the right place.
9375
93762013-05-16 Luis Machado <lgustavo@codesourcery.com>
9377
9378 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9379 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9380 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9381 PT_TEXT_END_ADDR guards. Update comments.
9382 (linux_target_op) <read_offsets>: Conditionally define to
9383 linux_read_offsets if the target is UCLIBC and if it defines
9384 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9385
93862013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9387 Andrew Jenner <andrew@codesourcery.com>
9388
9389 * Makefile.in (SFILES): Add linux-nios2-low.c.
9390 (clean): Add action to delete nios2-linux.c.
9391 (nios2-linux.c): New rule.
9392 * configure.srv: Add nios2*-*-linux*.
9393 * linux-nios2-low.c: New.
9394
93952013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9396
9397 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9398
93992013-04-25 Hui Zhu <hui@codesourcery.com>
9400
9401 PR gdb/15186
9402 * ax.c (ax_printf): Add fflush.
9403
94042013-04-22 Tom Tromey <tromey@redhat.com>
9405
9406 * Makefile.in (SFILES): Add filestuff.c.
9407 (OBS): Add filestuff.o.
9408 (filestuff.o): New target.
9409 * config.in, configure: Rebuild.
9410 * configure.ac: Check for fdwalk, pipe2.
9411
94122013-04-17 Pedro Alves <palves@redhat.com>
9413
9414 * configure.ac (USE_THREAD_DB): Delete variable.
9415 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9416 Don't AC_SUBST USE_THREAD_DB.
9417 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9418 * config.in, configure: Regenerate.
9419
94202013-04-16 Pedro Alves <palves@redhat.com>
9421
9422 * linux-low.h (struct lwp_info) <thread_known>: Move under
9423 the USE_THREAD_DB #ifdef.
9424
94252013-04-16 Pedro Alves <palves@redhat.com>
9426
9427 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9428 (linux-low.o): Delete rule.
9429 * linux-low.h: Always include "gdb_thread_db.h" instead of
9430 conditionally including thread_db.h.
9431 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9432 HAVE_THREAD_DB_H.
9433
94342013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9435
9436 * Makefile.in (install-only): Fix make install regression.
9437
94382013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9439
9440 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9441 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9442 installation.
9443 * gdbserver.1: Remove.
9444
94452013-03-22 Pedro Alves <palves@redhat.com>
9446
9447 * linux-low.c (handle_extended_wait): Don't call
9448 linux_enable_event_reporting.
9449
94502013-03-15 Tony Theodore <tonyt@logyst.com>
9451
9452 PR build/9098:
9453 * Makefile.in (SHELL): Use @SHELL@.
9454
94552013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9456
9457 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9458 compiler warning.
9459
94602013-03-13 Joel Brobecker <brobecker@adacore.com>
9461
9462 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9463 Remove extraneous NULL element.
9464
94652013-03-13 Yao Qi <yao@codesourcery.com>
9466
9467 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9468 'V' block in trace frame.
9469
94702013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9471
9472 * target.h (struct target_ops): Add btrace ops.
9473 (target_supports_btrace): New macro.
9474 (target_enable_btrace): New macro.
9475 (target_disable_btrace): New macro.
9476 (target_read_btrace): New macro.
9477 * gdbthread.h (struct thread_info): Add btrace field.
9478 * server.c: Include btrace-common.h.
9479 (handle_btrace_general_set): New function.
9480 (handle_btrace_enable): New function.
9481 (handle_btrace_disable): New function.
9482 (handle_general_set): Call handle_btrace_general_set.
9483 (handle_qxfer_btrace): New function.
9484 (struct qxfer qxfer_packets[]): Add btrace entry.
9485 * inferiors.c (remove_thread): Disable btrace.
9486 * linux-low: Include linux-btrace.h.
9487 (linux_low_enable_btrace): New function.
9488 (linux_low_read_btrace): New function.
9489 (linux_target_ops): Add btrace ops.
9490 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9491 Add srv_linux_btrace=yes.
9492 (x86_64-*-linux*): Add linux-btrace.o.
9493 Add srv_linux_btrace=yes.
9494 * configure.ac: Define HAVE_LINUX_BTRACE.
9495 * config.in: Regenerated.
9496 * configure: Regenerated.
9497
94982013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9499
9500 * server.c (handle_qxfer): Preserve error message if -3 is
9501 returned.
9502 (qxfer): Document the -3 return value.
9503
95042013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9505
9506 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9507 (linux_btrace_h): New variable.
9508 (linux-btrace.o): New rule.
9509
95102013-03-08 Stan Shebs <stan@codesourcery.com>
9511 Hafiz Abid Qadeer <abidh@codesourcery.com>
9512
9513 * tracepoint.c (trace_buffer_size): New global.
9514 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9515 (init_trace_buffer): Change to one-argument function. Allocate
9516 trace buffer memory.
9517 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9518 handle QTBuffer:size packet.
9519 (cmd_bigqtbuffer_size): New function.
9520 (initialize_tracepoint): Call init_trace_buffer with
9521 DEFAULT_TRACE_BUFFER_SIZE.
9522 * server.c (handle_query): Add QTBuffer:size in the
9523 supported packets.
9524
95252013-03-07 Yao Qi <yao@codesourcery.com>
9526
9527 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9528 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9529 of -1.
9530 (cmd_qtsp): Adjust condition. Do post increment.
9531 Set cur_action and cur_step_action back to 0.
9532
95332013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9534
9535 PR server/15236
9536 * linux-low.c (linux_write_memory): Return early success if LEN is
9537 zero.
9538
95392013-03-05 Corinna Vinschen <vinschen@redhat.de>
9540
9541 * configure.srv: Add x86_64-*-cygwin* as target.
9542
95432013-02-28 Tom Tromey <tromey@redhat.com>
9544
9545 * configure.ac: Invoke AC_SYS_LARGEFILE.
9546 * configure, config.in: Rebuild.
9547
95482013-02-28 Corinna Vinschen <vinschen@redhat.com>
9549
9550 * win32-low.c: Throughout, fix format strings and casts of
9551 printf-like functions to avoid type related warnings on all
9552 platforms.
9553 (get_child_debug_event): Print dwDebugEventCode as hex since
9554 that's how it's usually documented.
9555
95562013-02-28 Yao Qi <yao@codesourcery.com>
9557
9558 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9559 pulongest.
9560
95612013-02-27 Jiong Wang <jiwang@tilera.com>
9562
9563 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9564 (reg-tilegx32.c): New rule.
9565 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9566 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9567 different register info initializer according to elf class.
9568 (init_registers_tilgx32): New function. The tilegx32 register info
9569 initializer.
9570 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9571 (tile_store_gregset): Likewise.
9572
95732013-02-27 Yao Qi <yao@codesourcery.com>
9574
9575 * server.c (process_point_options): Print debug message when
9576 debug_threads is true.
9577
95782013-02-26 Yao Qi <yao@codesourcery.com>
9579
9580 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9581
95822013-02-19 Pedro Alves <palves@redhat.com>
9583 Kai Tietz <ktietz@redhat.com>
9584
9585 PR gdb/15161
9586
9587 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9588 instead of strtoul to extract address from packet.
9589 (process_serial_event) <'z'>: Likewise.
9590
95912013-02-18 Yao Qi <yao@codesourcery.com>
9592
9593 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9594
95952013-02-14 Pedro Alves <palves@redhat.com>
9596
9597 Plug memory leak.
9598
9599 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9600 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9601
96022013-02-14 Pedro Alves <palves@redhat.com>
9603
9604 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9605
96062013-02-14 Pedro Alves <palves@redhat.com>
9607
9608 * tracepoint.c (save_string): Delete.
9609 (add_tracepoint_action): Use savestring instead of save_string.
9610
96112013-02-12 Pedro Alves <palves@redhat.com>
9612
9613 * linux-xtensa-low.c: Ditto.
9614 * xtensa-xtregs.c: Ditto.
9615
96162013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9617
9618 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9619 thread_db.
9620
96212013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9622
9623 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9624 aarch64_num_wp_regs and aarch64_num_bp_regs to
9625 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9626
96272013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9628
9629 * linux-aarch64-low.c (ps_get_thread_area): Replace
9630 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9631
96322013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9633 Marcus Shawcroft <marcus.shawcroft@arm.com>
9634 Nigel Stephens <nigel.stephens@arm.com>
9635 Yufeng Zhang <yufeng.zhang@arm.com>
9636
9637 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9638 (aarch64.c, aarch64-without-fpu.c): New targets.
9639 * configure.srv (aarch64*-*-linux*): New.
9640 * linux-aarch64-low.c: New file.
9641
96422013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9643
9644 * linux-low.c (handle_extended_wait, linux_create_inferior)
9645 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9646 (dequeue_one_deferred_signal, linux_resume_one_thread)
9647 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9648 (linux_tracefork_grandchild, linux_test_for_tracefork)
9649 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9650 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9651 where the argument is 0.
9652
96532013-01-25 Yao Qi <yao@codesourcery.com>
9654
9655 * event-loop.c: Include "queue.h".
9656 (gdb_event_p): New typedef.
9657 (struct gdb_event) <next_event>: Remove.
9658 (event_queue): Change to QUEUE(gdb_event_p).
9659 (async_queue_event): Remove.
9660 (gdb_event_xfree): New.
9661 (initialize_event_loop): New.
9662 (process_event): Use API from QUEUE.
9663 (wait_for_event): Likewise.
9664 * server.c (main): Call initialize_event_loop.
9665 * server.h (initialize_event_loop): Declare.
9666
96672013-01-18 Yao Qi <yao@codesourcery.com>
9668
9669 * ax.h (struct eval_agent_expr_context): New.
9670 (gdb_eval_agent_expr): Update declaration.
9671 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9672 TFRAME. Add new argument CTX.
9673 * server.h (struct eval_agent_expr_context): Declare.
9674 (agent_mem_read, agent_tsv_read): Update declaration.
9675 (agent_mem_read_string): Likewise.
9676 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9677 (add_traceframe_block): Add new argument TPOINT.
9678 Increase TPOINT->traceframe_usage.
9679 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9680 eval_tracepoint_agent_expr.
9681 (condition_true_at_tracepoint): Likewise.
9682 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9683 (agent_mem_read_string, agent_tsv_read): Likewise.
9684
96852013-01-16 Yao Qi <yao@codesourcery.com>
9686
9687 * linux-low.c (linux_resume_one_lwp): Don't check
9688 'lwp->bp_reinsert != 0'.
9689
96902013-01-07 Joel Brobecker <brobecker@adacore.com>
9691 Pedro Alves <palves@redhat.com>
9692
9693 * lynx-low.c (ptrace_request_to_str): Define a temporary
9694 macro and use it to simplify this function's implementation.
9695
96962013-01-07 Joel Brobecker <brobecker@adacore.com>
9697
9698 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9699 sets errno.
9700
97012013-01-07 Joel Brobecker <brobecker@adacore.com>
9702
9703 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9704
97052013-01-07 Joel Brobecker <brobecker@adacore.com>
9706
9707 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9708
97092013-01-07 Joel Brobecker <brobecker@adacore.com>
9710
9711 * lynx-low.c (lynx_resume): Use the resume_info parameter
9712 to determine the ptid for the lynx_ptrace call, unless
9713 it is equal to minus_one_ptid, in which case we use the
9714 ptid of the current_inferior.
9715 (lynx_wait_1): After having received a thread create/exit
9716 event, resume the inferior's execution using the signaling
9717 thread's ptid, rather than the old ptid.
9718
97192013-01-07 Joel Brobecker <brobecker@adacore.com>
9720
9721 * lynx-low.c (lynx_resume): Delete variable ret.
9722
97232013-01-01 Joel Brobecker <brobecker@adacore.com>
9724
9725 * gdbreplay.c (gdbreplay_version): Update copyright year.
9726 * server.c (gdbserver_version): Likewise.
9727
97282012-12-17 Joel Brobecker <brobecker@adacore.com>
9729
9730 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9731 new thread.
9732
97332012-12-17 Joel Brobecker <brobecker@adacore.com>
9734
9735 * lynx-low.c (ptrace_request_to_str): Add handling for
9736 PTRACE_GETTRACESIG.
9737
97382012-12-17 Joel Brobecker <brobecker@adacore.com>
9739
9740 * lynx-low.c (lynx_attach): Delete variable new_process.
9741
97422012-12-17 Joel Brobecker <brobecker@adacore.com>
9743
9744 * lynx-low.c (lynx_create_inferior): Delete variable
9745 new_process.
9746
97472012-12-17 Joel Brobecker <brobecker@adacore.com>
9748
9749 * lynx-low.c (ptrace_request_to_str): Do not handle
9750 PTRACE_GETTHREADLIST if this macro does not exist.
9751
97522012-12-15 Yao Qi <yao@codesourcery.com>
9753
9754 * Makefile.in (OBS): Add notif.o.
9755 * notif.c, notif.h: New.
9756 * server.c: Include "notif.h".
9757 (struct vstop_notif) <next>: Remove.
9758 <base>: New field.
9759 (queue_stop_reply): Update.
9760 (push_event, send_next_stop_reply): Remove.
9761 (discard_queued_stop_replies): Update.
9762 (notif_stop): New variable.
9763 (handle_v_stopped): Remove.
9764 (handle_v_requests): Don't call handle_v_stopped. Call
9765 handle_ack_notif instead.
9766 (queue_stop_reply_callback): Call notif_event_enque instead
9767 of queue_stop_reply.
9768 (handle_status): Don't call send_next_stop_reply, call
9769 notif_write_event instead.
9770 (kill_inferior_callback): Likewise.
9771 (detach_or_kill_inferior_callback): Likewise.
9772 (main): Call initialize_notif.
9773 (process_serial_event): Call QUEUE_is_empty.
9774 (handle_target_event): Call notif_push instead of push event.
9775 * server.h (push_event): Remove declaration.
9776
97772012-12-10 Tom Tromey <tromey@redhat.com>
9778
9779 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9780 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9781 macros.
9782 (.c.o): Rewrite.
9783 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9784 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9785 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9786 (amd64-linux-ipa.o, ax.o): Rewrite.
9787 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9788 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9789 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9790 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9791 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9792 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9793 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9794 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9795 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9796 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9797 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9798 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9799 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9800 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9801 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9802 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9803 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9804 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9805 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9806 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9807 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9808 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9809 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9810 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9811 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9812 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9813 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9814 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9815 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9816 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9817 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9818 (reg-tilegx.o): Remove.
9819 (all_object_files): New macro.
9820 Include .deps files.
9821 * aclocal.m4, configure: Rebuild.
9822 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9823 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9824 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9825
98262012-12-05 Tom Tromey <tromey@redhat.com>
9827
9828 PR gdb/14917:
9829 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9830
98312012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9832
9833 * configure.ac: Check for linux/perf_event.h.
9834 * config.in: Regenerated.
9835 * configure: Regenerated.
9836
98372012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9838
9839 * hostio.c (handle_readlink): Decrease buffer size
9840 parameter passed to readlink by one byte.
9841
98422012-11-26 Yao Qi <yao@codesourcery.com>
9843
9844 * configure.ac (build_warnings): Append '-Wempty-body'.
9845 * configure: Regenerated.
9846 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9847 body.
9848
98492012-11-15 Pierre Muller <muller@sourceware.org>
9850
9851 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9852 * config.in: Regenerate.
9853 * configure: Regenerate.
9854 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9855 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9856 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9857 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9858 header.
9859 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9860 instead of <sys/wait.h> header.
9861 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9862
98632012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9864
9865 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9866 (various make rules): Remove -DGDBSERVER
9867
98682012-11-09 Yao Qi <yao@codesourcery.com>
9869
9870 * spu-low.c (current_ptid): Move it to ..
9871 * gdbthread.h: ... here. New.
9872 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9873 * server.c (myresume, process_serial_event): Likewise.
9874 * thread-db.c (thread_db_find_new_threads): Likewise.
9875 * tracepoint.c (run_inferior_command): Likewise.
9876
98772012-10-01 Andrew Burgess <aburgess@broadcom.com>
9878
9879 * server.c (handle_search_memory_1): Include access length in
9880 warning message.
9881
98822012-09-05 Michael Brandt <michael.brandt@axis.com>
9883
9884 * linux-crisv32-low.c: Fix compile errors.
9885
98862012-09-04 Yao Qi <yao@codesourcery.com>
9887
9888 * tracepoint.c (cmd_qtsv): Adjust debug message.
9889 Don't check CUR_TPOINT.
9890
98912012-08-28 Yao Qi <yao@codesourcery.com>
9892
9893 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9894 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9895 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9896 Remove declarations of xmalloc, xreallloc, xstrdup and
9897 freeargv.
9898 * Makefile.in (libiberty_h): New.
9899 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9900 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9901
99022012-08-23 Yao Qi <yao@codesourcery.com>
9903
9904 * server.h: Remove declaration of 'xsnprintf'.
9905
99062012-08-22 Keith Seitz <keiths@redhat.com>
9907
9908 * server.h: Include build-gnulib-gbserver/config.h.
9909 * gdbreplay.c: Likewise.
9910
99112012-08-08 Doug Evans <dje@google.com>
9912
9913 * Makefile.in (SFILES): Add gdb_vecs.c.
9914 (OBS): Add gdb_vecs.o.
9915 (gdb_vecs_h, host_defs_h): New variables.
9916 (thread-db.o): Add $(gdb_vecs_h) dependency.
9917 (gdb_vecs.o): New rule.
9918 * thread-db.c: #include "gdb_vecs.h".
9919 (thread_db_load_search): Use a vector to iterate over path elements.
9920 Handle text appearing after "$pdir".
9921
9922 * configure.ac: Add check for strstr.
9923 * config.in: Regenerate.
9924 * configure: Regenerate.
9925
99262012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9927
9928 * hostio.c (handle_pread): If pread fails, fall back to attempting
9929 lseek/read.
9930 (handle_pwrite): Likewise for pwrite.
9931
99322012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9933
9934 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9935 between unsupported TYPE and unimplementable ADDR/LEN combination.
9936 (arm_insert_point): Act on new return value.
9937
99382012-07-31 Pedro Alves <palves@redhat.com>
9939
9940 * server.c (process_point_options): Only skip tokens if we find
9941 one that is unrecognized. Don't treat 'X' specially while
9942 skipping unrecognized tokens.
9943
99442012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9945
9946 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9947 to 4-byte-align HW breakpoint addresses for Thumb.
9948
99492012-07-27 Yao Qi <yao@codesourcery.com>
9950
9951 PR remote/14161.
9952
9953 * server.h: Declare gdb_agent_about_to_close.
9954 * target.c (kill_inferior): Include "agent.h".
9955 New. Send command 'kill'.
9956 * target.h (kill_inferior): Removed macro.
9957 * tracepoint.c (gdb_agent_about_to_close): New.
9958 (gdb_agent_helper_thread): Handle command 'close'.
9959 Wait endlessly until the inferior stops.
9960 Install gdb_agent_remove_socket to atexit hook.
9961 (agent_socket_name): New static variable.
9962 (gdb_agent_socket_init): Replace local variable 'name' with
9963 'agent_socket_name'.
9964 (gdb_agent_remove_socket): New.
9965
99662012-07-27 Yao Qi <yao@codesourcery.com>
9967
9968 * server.c (process_point_options): Stop at 'X' when parsing.
9969
99702012-07-19 Michael Eager <eager@eagercon.com>
9971
9972 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9973 to hw_execute.
9974 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9975 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9976 hardware breakpoint.
9977
99782012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9979
9980 * gdbserver/linux-low.c (initialize_low): Call
9981 linux_ptrace_init_warnings.
9982
99832012-07-02 Doug Evans <dje@google.com>
9984
9985 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9986 pointer to int.
9987
99882012-07-02 Stan Shebs <stan@codesourcery.com>
9989
9990 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9991 (ax.o): Add it to build rule.
9992 (ax-ipa.o): Ditto.
9993 (OBS): Add format.o.
9994 (IPA_OBS): Add format.o.
9995 * server.c (handle_query): Claim support for breakpoint commands.
9996 (process_point_options): Add command case.
9997 (process_serial_event): Leave running if there are printfs in
9998 effect.
9999 * mem-break.h (any_persistent_commands): Declare.
10000 (add_breakpoint_commands): Declare.
10001 (gdb_no_commands_at_breakpoint): Declare.
10002 (run_breakpoint_commands): Declare.
10003 * mem-break.c (struct point_command_list): New struct.
10004 (struct breakpoint): New field command_list.
10005 (any_persistent_commands): New function.
10006 (add_commands_to_breakpoint): New function.
10007 (add_breakpoint_commands): New function.
10008 (gdb_no_commands_at_breakpoint): New function.
10009 (run_breakpoint_commands): New function.
10010 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
10011 locally.
10012 * ax.c: Include format.h.
10013 (ax_printf): New function.
10014 (gdb_eval_agent_expr): Add printf opcode.
10015
100162012-06-13 Yao Qi <yao@codesourcery.com>
10017
10018 * server.c (start_inferior): Remove duplicated writes to fields
10019 'last_resume_kind' and 'last_status' of 'current_inferior'.
10020
100212012-06-12 Yao Qi <yao@codesourcery.com>
10022 Pedro Alves <palves@redhat.com>
10023
10024 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
10025 comment.
10026 * server.c (handle_v_cont): Extend comment.
10027
100282012-06-11 Yao Qi <yao@codesourcery.com>
10029
10030 * linux-low.c (linux_attach): Add 'static'.
10031
100322012-06-06 Yao Qi <yao@codesourcery.com>
10033
10034 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
10035
100362012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
10037
10038 Fix gcc -flto compilation warning.
10039 * server.c (main): Make variable multi_mode and attach volatile.
10040
100412012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10042
10043 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
10044 if the platform doesn't know about it.
10045
100462012-05-30 Jeff Kenton <jkenton@tilera.com>
10047
10048 * Makefile.in (SFILES): Add linux-tile-low.c.
10049 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
10050 * configure.srv: Handle tilegx-*-linux*.
10051 * linux-tile-low.c: New file.
10052
100532012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
10054
10055 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
10056
100572012-05-24 Pedro Alves <palves@redhat.com>
10058
10059 PR gdb/7205
10060
10061 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
10062
100632012-05-24 Pedro Alves <palves@redhat.com>
10064
10065 PR gdb/7205
10066
10067 Replace target_signal with gdb_signal throughout.
10068
100692012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10070
10071 * linux-low.c (linux_store_registers): Avoid the copying sequence
10072 when no data has been retrieved by ptrace.
10073
100742012-05-22 Will Deacon <will.deacon@arm.com>
10075
10076 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10077 Include asm/ptrace.h.
10078 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10079 already defined.
10080
100812012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10082
10083 * linux-low.c (linux_store_registers): Don't re-retrieve data
10084 with ptrace that has already been obtained from /proc. Always
10085 copy any data retrieved with ptrace to the buffer supplied.
10086
100872012-05-11 Yao Qi <yao@codesourcery.com>
10088 Pedro Alves <palves@redhat.com>
10089
10090 * linux-low.c (enum stopping_threads_kind): New.
10091 (stopping_threads): Change type to `enum stopping_threads_kind'.
10092 (handle_extended_wait): If stopping and suspending threads, leave
10093 the new_lwp suspended too.
10094 (linux_wait_for_event): Adjust.
10095 (stop_all_lwps): Set `stopping_threads' to
10096 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10097 whether we're suspending threads or just stopping them. Assert no
10098 recursion happens.
10099
101002012-04-29 Yao Qi <yao@codesourcery.com>
10101
10102 * server.h: Move some code to ...
10103 * gdbthread.h: ... here. New.
10104 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10105 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10106 (nto-low.o, win32-low.o): Likewise.
10107 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10108 * regcache.c, remote-utils.c, server.c: Likewise.
10109 * target.c, tracepoint.c, win32-low.c: Likewise.
10110
101112012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10112
10113 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10114 (PTRACE_ARG4_TYPE): Likewise.
10115 (PTRACE_XFER_TYPE): Likewise.
10116 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10117 ptrace to PTRACE_ARG3_TYPE.
10118 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10119 (PTRACE_ARG4_TYPE): Likewise.
10120 (PTRACE_XFER_TYPE): Likewise.
10121 (linux_detach_one_lwp): Cast fourth argument of
10122 ptrace to long then PTRACE_ARG4_TYPE.
10123 (regsets_fetch_inferior_registers): Cast third argument of
10124 ptrace to long then PTRACE_ARG3_TYPE.
10125 (regsets_store_inferior_registers): Likewise.
10126
101272012-04-20 Pedro Alves <palves@redhat.com>
10128
10129 * configure: Regenerate.
10130
101312012-04-19 Pedro Alves <palves@redhat.com>
10132
10133 * Makefile.in (GNULIB_BUILDDIR): New.
10134 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10135 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10136 (all, install-only, uninstall, clean-info, all-lib, clean): No
10137 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10138 (maintainer-clean realclean distclean): Use subdir_do.
10139 (subdir_do): New.
10140 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10141 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10142 * acinclude.m4: Include acx_configure_dir.m4.
10143 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10144 calls. Call AC_PROG_RANLIB. Configure gnulib using
10145 ACX_CONFIGURE_DIR.
10146 (GNULIB): New.
10147 (GNULIB_STDINT_H): Adjust.
10148 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10149 * gdbreplay.c: Include build-gnulib/config.h.
10150 * server.h: Likewise.
10151 * aclocal.m4: Regenerate.
10152 * config.in: Regenerate.
10153 * configure: Regenerate.
10154
101552012-04-19 Pedro Alves <palves@redhat.com>
10156
10157 * Makefile.in (LIBGNU, INCGNU): Adjust.
10158 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10159 (all, install-only, uninstall, clean-info, all-lib, clean)
10160 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10161 * configure.ac: Adjust AC_OUTPUT output.
10162 * aclocal.m4: Regenerate.
10163 * configure: Regenerate.
10164
101652012-04-19 Pedro Alves <palves@redhat.com>
10166
10167 * Makefile.in (generated_files): New.
10168 (server_h): Remove the explicit dependency on config.h, and depend
10169 on $generated_files.
10170
101712012-04-19 Pedro Alves <palves@redhat.com>
10172
10173 * Makefile.in (INCGNU): Add -Ignulib.
10174
101752012-04-19 Pedro Alves <palves@redhat.com>
10176
10177 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10178 (INCGNU): ... this, and spell out -I here.
10179 (GNULIB_LIB): Rename to ...
10180 (LIBGNU): ... this.
10181 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10182
101832012-04-19 Pedro Alves <palves@redhat.com>
10184
10185 * config.in: Regenerate.
10186
101872012-04-19 Pedro Alves <palves@redhat.com>
10188
10189 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10190 * server.h (memmem): Remove declaration.
10191 * config.in: Regenerate.
10192 * configure: Regenerate.
10193
101942012-04-19 Yao Qi <yao@codesourcery.com>
10195
10196 * Makefile.in (SFILES): Add common/vec.c.
10197 (OBS): Add vec.o.
10198 (vec.o): New rule.
10199
102002012-04-19 Yao Qi <yao@codesourcery.com>
10201
10202 * remote-utils.c (prepare_resume_reply): Replace with macro
10203 target_core_of_thread.
10204 * server.c (handle_qxfer_threads_proper): Likewise.
10205 * target.h (traget_core_of_thread): New macro.
10206
102072012-04-18 Pedro Alves <palves@redhat.com>
10208
10209 * aclocal.m4: Regenerate.
10210 * configure: Regenerate.
10211
102122012-04-16 Yao Qi <yao@codesourcery.com>
10213
10214 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10215 duplicated on address.
10216
102172012-04-16 Yao Qi <yao@codesourcery.com>
10218
10219 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10220 (struct tracepoint_action_ops) <send>: New field.
10221 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10222 (agent_expr_send, x_tracepoint_action_send): New.
10223 (l_tracepoint_action_send): New.
10224 (cmd_qtdp): Download and install tracepoint
10225 according to `use_agent'.
10226 (run_inferior_command): Add one more parameter `len'.
10227 Update callers.
10228 (tracepoint_send_agent): New.
10229 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10230
102312012-04-16 Yao Qi <yao@codesourcery.com>
10232
10233 * tracepoint.c (download_tracepoints): Moved to ...
10234 (cmd_qtstart): ... here.
10235
102362012-04-14 Yao Qi <yao@codesourcery.com>
10237
10238 * tracepoint.c: Include inttypes.h.
10239 (struct collect_memory_action): Use sized types.
10240 (struct tracepoint): Likewise.
10241 (cmd_qtdp, stop_tracing): Update print specifiers.
10242 (cmd_qtp, response_tracepoint): Likewise.
10243 (collect_data_at_tracepoint): Likewise.
10244 (collect_data_at_step): Likewise.
10245
102462012-04-14 Yao Qi <yao@codesourcery.com>
10247
10248 Import gnulib module inttypes.
10249 * aclocal.m4, config.in, configure: Regenerated.
10250
102512012-04-14 Yao Qi <yao@codesourcery.com>
10252
10253 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10254 Makefile and config.status at last.
10255
102562012-04-13 Yao Qi <yao@codesourcery.com>
10257
10258 * tracepoint.c: Include stdint.h unconditionally.
10259
102602012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10261
10262 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10263 on BFD_HAVE_SYS_PROCFS_TYPE.
10264 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10265 * configure: Regenerate.
10266 * config.in: Likewise.
10267
102682012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10269
10270 * Makefile.in (clean): Also remove x32.c x32-linux.c
10271 x32-avx.c x32-avx-linux.c.
10272 (x32.o): New target.
10273 (x32.c): Likewise.
10274 (x32-linux.o): Likewise.
10275 (x32-linux.c): Likewise.
10276 (x32-avx.o): Likewise.
10277 (x32-avx.c): Likewise.
10278 (x32-avx-linux.o): Likewise.
10279 (x32-avx-linux.c): Likewise.
10280
10281 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10282 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10283 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10284 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10285 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10286 i386/x32-avx-linux.xml.
10287
10288 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10289 (init_registers_x32_avx_linux): Likwise.
10290 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10291 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10292
102932012-04-13 Pedro Alves <palves@redhat.com>
10294
10295 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10296 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10297 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10298 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10299 the sub-make.
10300
103012012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10302
10303 * linux-x86-low.c (compat_x32_clock_t): New.
10304 (compat_x32_siginfo_t): Likewise.
10305 (compat_x32_siginfo_from_siginfo): Likewise.
10306 (siginfo_from_compat_x32_siginfo): Likewise.
10307 (linux_is_elf64): Likewise.
10308 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10309 and siginfo_from_compat_x32_siginfo for x32.
10310 (x86_arch_setup): Set linux_is_elf64.
10311
103122012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10313
10314 PR gdb/13969
10315 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10316 e_machine field.
10317 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10318 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10319 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10320 compatible with process.
10321
103222012-04-12 Yao Qi <yao@codesourcery.com>
10323
10324 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10325 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10326 (install-only, install-info, clean): Handle sub dir gnulib.
10327 (all-lib, am--refresh): New targets.
10328 (memmem.o): Remove target.
10329 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10330 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10331 (AC_REPLACE_FUNCS): Remove memmem.
10332 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10333 (AC_OUTPUT): Generate Makefile in gnulib/.
10334 * aclocal.m4, config.in, configure: Regenerated.
10335
103362012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10337
10338 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10339
103402012-04-05 Pedro Alves <palves@redhat.com>
10341
10342 -Werror=strict-aliasing
10343
10344 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10345 pointer.
10346
103472012-04-04 Pedro Alves <palves@redhat.com>
10348
10349 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10350 (sparc_store_gregset_from_stack, sparc_store_gregset)
10351 (sparc_breakpoint_at): Fix formatting.
10352
103532012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10354
10355 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10356 are available.
10357 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10358 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10359 * config.in: Regenerate.
10360 * configure: Likewise.
10361
103622012-03-29 Pedro Alves <palves@redhat.com>
10363
10364 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10365 Correct ptrace arguments.
10366
103672012-03-28 Pedro Alves <palves@redhat.com>
10368
10369 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10370 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10371 (IA64_FR1_REGNUM): New defines.
10372 (ia64_fetch_register): New.
10373 (the_low_target): Install it.
10374 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10375 field.
10376 * linux-low.c (linux_fetch_registers): Try the
10377 the_low_target.fetch_register hook first.
10378
10379 * linux-arm-low.c (the_low_target): Adjust.
10380 * linux-bfin-low.c (the_low_target): Adjust.
10381 * linux-cris-low.c (the_low_target): Adjust.
10382 * linux-crisv32-low.c (the_low_target): Adjust.
10383 * linux-m32r-low.c (the_low_target): Adjust.
10384 * linux-m68k-low.c (the_low_target): Adjust.
10385 * linux-mips-low.c (the_low_target): Adjust.
10386 * linux-ppc-low.c (the_low_target): Adjust.
10387 * linux-s390-low.c (the_low_target): Adjust.
10388 * linux-sh-low.c (the_low_target): Adjust.
10389 * linux-sparc-low.c (the_low_target): Adjust.
10390 * linux-tic6x-low.c (the_low_target): Adjust.
10391 * linux-x86-low.c (the_low_target): Adjust.
10392 * linux-xtensa-low.c (the_low_target): Adjust.
10393
103942012-03-26 Pedro Alves <palves@redhat.com>
10395
10396 * server.c (handle_qxfer_libraries): Don't bail early if
10397 the_target->qxfer_libraries_svr4 is not NULL.
10398
103992012-03-26 Pedro Alves <palves@redhat.com>
10400
10401 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10402
104032012-03-23 Pedro Alves <palves@redhat.com>
10404
10405 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10406 "library-list-svr4" element's start tag when the the DSO list is
10407 empty.
10408
104092012-03-23 Pedro Alves <palves@redhat.com>
10410
10411 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10412 a variable whose type size is the same as the inferior's pointer
10413 size.
10414
104152012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10416
10417 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10418 struct siginfo.
10419 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10420 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10421 * linux-low.h: Include <signal.h>.
10422 (struct siginfo): Remove forward declaration.
10423 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10424 struct siginfo.
10425
104262012-03-21 Mike Frysinger <vapier@gentoo.org>
10427
10428 * .gitignore: Ignore more files.
10429
104302012-03-19 Pedro Alves <palves@redhat.com>
10431 Jan Kratochvil <jan.kratochvil@redhat.com>
10432
10433 * server.c (cont_thread, general_thread): Add describing comments.
10434 (start_inferior): Clear `cont_thread'.
10435 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10436 of a process.
10437
104382012-03-15 Yao Qi <yao@codesourcery.com>
10439
10440 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10441 handling to ...
10442 (cmd_qtdp): ... here.
10443
104442012-03-15 Yao Qi <yao@codesourcery.com>
10445
10446 * tracepoint.c (struct tracepoint_action_ops): New.
10447 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10448 (m_tracepoint_action_download): New.
10449 (r_tracepoint_action_download): New.
10450 (x_tracepoint_action_download): New.
10451 (l_tracepoint_action_download): New.
10452 (add_tracepoint_action): Install `action->ops' according type.
10453 (download_tracepoint_1): Move code `download' function pointer
10454 of various tracepoint_action_ops.
10455
104562012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10457
10458 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10459 linux_ptrace_attach_warnings.
10460
104612012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10462
10463 * Makefile.in (linux-ptrace.o): New.
10464 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10465 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10466 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10467 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10468 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10469 of these targets.
10470 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10471
104722012-03-08 Yao Qi <yao@codesourcery.com>
10473 Pedro Alves <palves@redhat.com>
10474
10475 Fix PR server/13392.
10476 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10477 offset of JMP insn.
10478 * tracepoint.c (remove_tracepoint): New.
10479 (cmd_qtdp): Call remove_tracepoint when failed to install.
10480
104812012-03-07 Pedro Alves <palves@redhat.com>
10482
10483 * linux-low.c (get_detach_signal): New.
10484 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10485 Pass on pending signals to PTRACE_DETACH. Check the result of the
10486 ptrace call.
10487 * server.c (program_signals, program_signals_p): New.
10488 (handle_general_set): Handle QProgramSignals.
10489 * server.h (program_signals, program_signals_p): Declare.
10490
104912012-03-05 Pedro Alves <palves@redhat.com>
10492 Jan Kratochvil <jan.kratochvil@redhat.com>
10493
10494 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10495 New comment why.
10496
104972012-03-03 Yao Qi <yao@codesourcery.com>
10498
10499 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10500 agent_look_up_symbols.
10501
105022012-03-03 Yao Qi <yao@codesourcery.com>
10503
10504 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10505 (linux-x86-low.o): Likewise.
10506 * server.h: Remove in_process_agent_loaded.
10507 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10508 common/agent.c.
10509 Update callers.
10510
105112012-03-03 Yao Qi <yao@codesourcery.com>
10512
10513 * tracepoint.c (gdb_agent_capability): New global.
10514 (in_process_agent_loaded_ust): Renamed to
10515 `in_process_agent_supports_ust'.
10516 Update callers.
10517 (in_process_agent_supports_ust): Call agent_capability_check.
10518 (clear_installed_tracepoints): Assert that agent supports
10519 agent.
10520
105212012-03-03 Yao Qi <yao@codesourcery.com>
10522
10523 * linux-low.c (linux_supports_agent): New.
10524 (linux_target_ops): Initialize field `supports_agent' with
10525 linux_supports_agent.
10526 * target.h (struct target_ops) <supports_agent>: New.
10527 (target_supports_agent): New macro.
10528 * server.c (handle_general_set): Handle packet 'QAgent'.
10529 (handle_query): Send `QAgent+'.
10530 * Makefile.in (server.o): Depends on agent.h.
10531
105322012-03-03 Yao Qi <yao@codesourcery.com>
10533
10534 * Makefile.in (OBS): Add agent.o.
10535 Add new rule for agent.o.
10536 Track dependence of tracepoint.c on agent.h.
10537 * tracepoint.c (run_inferior_command_1):
10538 (run_inferior_command): Call agent_run_command.
10539 (gdb_ust_connect_sync_socket): Deleted. Move it to
10540 common/agent.c.
10541 (resume_thread, stop_thread): Likewise.
10542 (gdb_ust_socket_init): Renamed to ...
10543 (gdb_agent_socket_init): ... New.
10544 (gdb_ust_thread): Renamed to ...
10545 (gdb_agent_helper_thread): ... New.
10546 (gdb_ust_init): Move some code to ...
10547 (gdb_agent_init): ... here. New.
10548 [HAVE_UST]: Call gdb_ust_init.
10549 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10550 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10551 * config.in, configure: Regenerated.
10552
105532012-03-02 Pedro Alves <palves@redhat.com>
10554
10555 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10556 * linux-low.c (struct simple_pid_list): New.
10557 (stopped_pids): New a struct simple_pid_list pointer.
10558 (add_to_pid_list, pull_pid_from_list): New.
10559 (handle_extended_wait): Don't assume the first signal new children
10560 report is SIGSTOP. Adjust call to pull_pid_from_list.
10561 (linux_wait_for_lwp): Adjust.
10562
105632012-03-02 Yao Qi <yao@codesourcery.com>
10564
10565 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10566 debug log.
10567
105682012-03-02 Yao Qi <yao@codesourcery.com>
10569
10570 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10571 `stop_pc' and `tpoint'. Update caller.
10572
105732012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10574
10575 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10576 * linux-low.c (use_linux_regsets): New macro.
10577 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10578 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10579 (linux_register_in_regsets): New function.
10580 (usr_fetch_inferior_registers): Skip registers covered by
10581 regsets.
10582 (usr_store_inferior_registers): Likewise.
10583 (usr_fetch_inferior_registers): New macro.
10584 (usr_store_inferior_registers): Likewise.
10585 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10586 (linux_store_registers): Likewise.
10587 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10588 prototype.
10589 (init_registers_mips64_dsp_linux): Likewise.
10590 (init_registers_mips_linux): New macro.
10591 (init_registers_mips_dsp_linux): Likewise.
10592 (mips_dsp_num_regs): Likewise.
10593 (DSP_BASE, DSP_CONTROL): New fallback macros.
10594 (mips_base_regs): New macro.
10595 (mips_regmap): Use it. Fix the size.
10596 (mips_dsp_regmap): New variable.
10597 (mips_dsp_regset_bitmap): Likewise.
10598 (mips_arch_setup): New function.
10599 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10600 than mips_regmap.
10601 (mips_cannot_store_register): Likewise.
10602 (the_low_target): Update .arch_setup, .num_regs and .regmap
10603 initializers. Add .regset_bitmap initializer.
10604 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10605 initializer.
10606 * linux-bfin-low.c (the_low_target): Likewise.
10607 * linux-cris-low.c (the_low_target): Likewise.
10608 * linux-crisv32-low.c (the_low_target): Likewise.
10609 * linux-ia64-low.c (the_low_target): Likewise.
10610 * linux-m32r-low.c (the_low_target): Likewise.
10611 * linux-m68k-low.c (the_low_target): Likewise.
10612 * linux-ppc-low.c (the_low_target): Likewise.
10613 * linux-s390-low.c (the_low_target): Likewise.
10614 * linux-sh-low.c (the_low_target): Likewise.
10615 * linux-sparc-low.c (the_low_target): Likewise.
10616 * linux-tic6x-low.c (the_low_target): Likewise.
10617 * linux-x86-low.c (the_low_target): Likewise.
10618 * linux-xtensa-low.c (the_low_target): Likewise.
10619 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10620 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10621 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10622 srv_xmlfiles.
10623 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10624 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10625
106262012-02-29 Yao Qi <yao@codesourcery.com>
10627 Pedro Alves <palves@redhat.com>
10628
10629 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10630 `step_over_finished' is true.
10631
106322012-02-27 Pedro Alves <palves@redhat.com>
10633
10634 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10635 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10636
106372012-02-27 Pedro Alves <palves@redhat.com>
10638
10639 PR server/9684
10640 * linux-low.c (pid_is_stopped): New.
10641 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10642
106432012-02-25 Luis Machado <lgustavo@codesourcery.com>
10644
10645 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10646 of conditions.
10647
106482012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10649
10650 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10651
106522012-02-24 Luis Machado <lgustavo@codesourcery>
10653
10654 * server.c (handle_query): Advertise support for target-side
10655 breakpoint condition evaluation.
10656 (process_point_options): New function.
10657 (process_serial_event): When inserting a breakpoint, check for
10658 a target-side condition that should be evaluated.
10659
10660 * mem-break.c: Include regcache.h and ax.h.
10661 (point_cond_list_t): New data structure.
10662 (breakpoint) <cond_list>: New field.
10663 (find_gdb_breakpoint_at): Make non-static.
10664 (delete_gdb_breakpoint_at): Clear any target-side
10665 conditions.
10666 (clear_gdb_breakpoint_conditions): New function.
10667 (add_condition_to_breakpoint): Likewise.
10668 (add_breakpoint_condition): Likewise.
10669 (gdb_condition_true_at_breakpoint): Likewise.
10670 (gdb_breakpoint_here): Return result directly instead
10671 of going through a local variable.
10672
10673 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10674 (clear_gdb_breakpoint_conditions): Likewise.
10675 (add_breakpoint_condition): Likewise.
10676 (gdb_condition_true_at_breakpoint): Likewise.
10677
10678 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10679 (need_step_over_p): Take target-side breakpoint condition into
10680 consideration.
10681
106822012-02-24 Luis Machado <lgustavo@codesourcery>
10683
10684 * server.h: Include tracepoint.h.
10685 (agent_mem_read, agent_get_trace_state_variable_value,
10686 agent_set_trace_state_variable_value,
10687 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10688 get_set_tsv_func_addr): New prototypes.
10689
10690 * ax.h: New include file.
10691 * ax.c: New source file.
10692
10693 * tracepoint.c: Include ax.h.
10694 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10695 agent_expr, eval_result_type): Move to ax.h.
10696 (parse_agent_expr): Rename to ...
10697 (gdb_parse_agent_expr): ... this, make it non-static and move
10698 to ax.h.
10699 (unparse_agent_expr) Rename to ...
10700 (gdb_unparse_agent_expr): ... this, make it non-static and move
10701 to ax.h.
10702 (eval_agent_expr): Rename to ...
10703 (eval_tracepoint_agent_expr): ... this.
10704 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10705 forward declarations.
10706 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10707 (agent_get_trace_state_variable_value): New function.
10708 (agent_set_trace_state_variable_value): New function.
10709 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10710 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10711 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10712 (condition_true_at_tracepoint): Likewise.
10713 (parse_agent_expr): Rename to ...
10714 (gdb_parse_agent_expr): ... this and move to ax.c.
10715 (unparse_agent_expr): Rename to ...
10716 (gdb_unparse_agent_expr): ... this and move to ax.c.
10717 (gdb_agent_op_name): Move to ax.c.
10718 (eval_agent_expr): Rename to ...
10719 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10720 and move to ax.c.
10721 (eval_tracepoint_agent_expr): New function.
10722 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10723 non-static.
10724 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10725 ax.c.
10726 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10727 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10728 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10729 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10730 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10731 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10732 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10733 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10734 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10735 (compile_bytecodes): Remove forward declaration.
10736 (is_goto_target): Move to ax.c.
10737 (compile_bytecodes): Move to ax.c and call
10738 agent_get_trace_state_variable_value (...) and
10739 agent_set_trace_state_variable_value (...).
10740
10741 * Makefile.in: Update ax.c and IPA dependencies.
10742
107432012-02-24 Pedro Alves <palves@redhat.com>
10744
10745 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10746 (cmd_bigqtbuffer_circular): ... this. Only handle
10747 'QTBuffer:circular:'.
10748 (handle_tracepoint_general_set): Adjust.
10749
107502012-02-16 Yao Qi <yao@codesourcery.com>
10751
10752 * inferiors.c: Move code to ...
10753 * dll.c: .... here. New.
10754 * server.h: Declare clear_dlls.
10755 * Makefile.in (SFILES): Add dll.c.
10756 (OBS): Add dll.o
10757 (dll.o): New rule.
10758
107592012-02-11 Yao Qi <yao@codesourcery.com>
10760
10761 * server.c: (handle_monitor_command): Add a new parameter
10762 `own_buf'.
10763 (handle_query): Update caller.
10764
107652012-02-09 Joel Brobecker <brobecker@adacore.com>
10766
10767 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10768 * configure, config.in: Regenerate.
10769 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10770 is not defined.
10771
107722012-02-02 Pedro Alves <palves@redhat.com>
10773
10774 Try SIGKILL first, then PTRACE_KILL.
10775 * linux-low.c (linux_kill_one_lwp): New.
10776 (linux_kill_one_lwp): Rename to ...
10777 (kill_one_lwp_callback): ... this. Use the new
10778 linux_kill_one_lwp.
10779
107802012-02-02 Pedro Alves <palves@redhat.com>
10781
10782 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10783 inferior.
10784
107852012-01-27 Pedro Alves <palves@redhat.com>
10786
10787 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10788 (elf_64_file_p): Make static.
10789 (linux_pid_exe_is_elf_64_file): New.
10790 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10791 Delete declarations.
10792 (linux_pid_exe_is_elf_64_file): Declare.
10793 * linux-x86-low.c (x86_arch_setup): Use
10794 linux_pid_exe_is_elf_64_file.
10795
107962012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10797
10798 * linux-low.c (linux_wait_for_event_1): Rename to ...
10799 (linux_wait_for_event): ... here and merge it with former
10800 linux_wait_for_event - new variable wait_ptid, use it.
10801 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10802
108032012-01-23 Pedro Alves <palves@redhat.com>
10804
10805 * server.c (main): Avoid yet another case of infinite loop while
10806 detaching/killing after a longjmp.
10807
108082012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10809
10810 Code cleanup.
10811 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10812
108132012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10814
10815 * hostio.c (handle_readlink): New function.
10816 (handle_vFile): Call it to handle "vFile:readlink" packets.
10817
108182012-01-20 Pedro Alves <palves@redhat.com>
10819 Ulrich Weigand <ulrich.weigand@linaro.org>
10820
10821 * server.c (handle_v_requests): Only support vAttach and vRun to
10822 start multiple processes when in extended protocol mode.
10823
108242012-01-17 Pedro Alves <palves@redhat.com>
10825
10826 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10827 memalign plus mprotect to allocate the scratch buffer.
10828
108292012-01-13 Pedro Alves <palves@redhat.com>
10830
10831 * server.c (attach_inferior): Clear `cont_thread'.
10832
108332012-01-13 Pedro Alves <palves@redhat.com>
10834
10835 * server.c (main): Avoid infinite loop while detaching/killing
10836 after a longjmp.
10837
108382012-01-09 Doug Evans <dje@google.com>
10839
10840 * server.c (start_inferior): Set last_ptid in --wrapper case.
10841
108422012-01-06 Yao Qi <yao@codesourcery.com>
10843
10844 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10845 defined.
10846 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10847
108482012-01-04 Yao Qi <yao@codesourcery.com>
10849
10850 * tracepoint.c (cmd_qtdp): Print debug message
10851 for static tracepoint.
10852
108532012-01-04 Yao Qi <yao@codesourcery.com>
10854
10855 * tracepoint.c (trace_vdebug): Differentiate debug message
10856 between gdbserver and IPA.
10857
108582012-01-03 Yao Qi <yao@codesourcery.com>
10859
10860 * tracepoint.c (tracepoint_was_hit): Don't collect for
10861 static tracepoint.
10862
108632012-01-02 Joel Brobecker <brobecker@adacore.com>
10864
10865 * terminal.h: Reformat copyright header.
10866
108672012-01-02 Joel Brobecker <brobecker@adacore.com>
10868
10869 * server.c (gdbserver_version): Update copyright year.
10870 * gdbreplay.c (gdbreplay_version): Likewise.
10871
108722011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10873
10874 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10875
10876 Revert:
10877 2011-12-18 Hui Zhu <teawater@gmail.com>
10878 * linux-low.c (linux_create_inferior): Save return value to ret.
10879
108802011-12-18 Hui Zhu <teawater@gmail.com>
10881
10882 * linux-low.c (linux_create_inferior): Save return value to ret.
10883
108842011-12-16 Doug Evans <dje@google.com>
10885
10886 * linux-low.c (linux_create_inferior): If stdio connection,
10887 redirect stdin from /dev/null, stdout to stderr.
10888 * remote-utils.c (remote_is_stdio): New static global.
10889 (remote_connection_is_stdio): New function.
10890 (remote_prepare): Handle stdio connection.
10891 (remote_open): Ditto.
10892 (remote_close): Don't close stdin for stdio connections.
10893 (read_prim,write_prim): New functions. Replace all calls to
10894 read/write to these.
10895 * server.c (main): Watch for "-" argument. Move call to
10896 remote_prepare before start_inferior.
10897 * server.h (STDIO_CONNECTION_NAME): New macro.
10898 (remote_connection_is_stdio): Declare.
10899
10900 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10901 in debugging output.
10902
109032011-12-15 Yao Qi <yao@codesourcery.com>
10904
10905 * tracepoint.c: Include sys/syscall.h.
10906 (gdb_ust_thread): Remove preprocessor conditional.
10907
109082011-12-14 Pedro Alves <pedro@codesourcery.com>
10909
10910 * linux-low.c (linux_detach_one_lwp): Call
10911 the_low_target.prepare_to_resume before detaching.
10912
109132011-12-14 Yao Qi <yao@codesourcery.com>
10914
10915 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10916 of write.
10917
109182011-12-14 Yao Qi <yao@codesourcery.com>
10919
10920 * i386-low.c (i386_low_stopped_data_address): Initialize local
10921 variable `control'.
10922
109232011-12-13 Pedro Alves <pedro@codesourcery.com>
10924
10925 PR remote/13492
10926
10927 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10928 DR_CONTROL unless necessary. Extend comments.
10929 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10930 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10931
109322011-12-13 Yao Qi <yao@codesourcery.com>
10933
10934 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10935 macros.
10936 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10937
109382011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10939
10940 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10941 Print new debug message for such case.
10942
109432011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10944
10945 Fix overlapping memcpy.
10946 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10947 the read_inferior_memory transfer.
10948 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10949 write_inferior_memory transfer.
10950 (set_fast_tracepoint_jump): New variable buf. Use it for the
10951 read_inferior_memory and write_inferior_memory transfers.
10952 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10953 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10954 Use it for the write_inferior_memory transfer.
10955 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10956 buffers.
10957
109582011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10959
10960 * linux-low.c (fetch_register, store_register): Make code
10961 consistent, fix formatting.
10962
109632011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10964
10965 * linux-low.c (usr_store_inferior_registers): Factor out code
10966 to handle individual registers into...
10967 (store_register): ... this new function.
10968
109692011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10970
10971 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10972 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10973 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10974 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10975 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10976 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10977 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10978 (srv_xmlfiles): Add new XML files.
10979
10980 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10981 and <sys/uio.h>.
10982 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10983 (init_registers_s390_linux32v1): Add prototype.
10984 (init_registers_s390_linux32v2): Likewise.
10985 (init_registers_s390_linux64v1): Likewise.
10986 (init_registers_s390_linux64v2): Likewise.
10987 (init_registers_s390x_linux64v1): Likewise.
10988 (init_registers_s390x_linux64v2): Likewise.
10989 (s390_num_regs): Increment to 52.
10990 (s390_regmap): Add orig_r2 register.
10991 (s390_num_regs_3264): Increment to 68.
10992 (s390_regmap_3264): Add orig_r2 register.
10993 (s390_collect_ptrace_register): Handle orig_r2 register.
10994 (s390_supply_ptrace_register): Likewise.
10995 (s390_fill_last_break): New function.
10996 (s390_store_last_break): Likewise.
10997 (s390_fill_system_call): New function.
10998 (s390_store_system_call): Likewise.
10999 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
11000 register sets.
11001 (s390_check_regset): New function.
11002 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
11003 NT_S390_SYSTEM_CALL regsets and use appropriate description.
11004 Update target_regsets for available register sets.
11005
110062011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
11007 Jan Kratochvil <jan.kratochvil@redhat.com>
11008
11009 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
11010 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
11011 New.
11012 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
11013 * linux-low.h (struct process_info_private): New member r_debug.
11014 * server.c (handle_qxfer_libraries): Call
11015 the_target->qxfer_libraries_svr4.
11016 (handle_qxfer_libraries_svr4): New function.
11017 (qxfer_packets): New entry "libraries-svr4".
11018 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
11019 * target.h (struct target_ops): New member qxfer_libraries_svr4.
11020 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
11021 PACKET_qXfer_libraries_svr4.
11022
110232011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
11024
11025 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
11026 PSW address/mask between 8-byte and 16-byte formats.
11027 (s390_supply_ptrace_register): Likewise.
11028 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
11029 basic addressing mode bit.
11030
110312011-11-24 Stan Shebs <stan@codesourcery.com>
11032
11033 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
11034
110352011-11-17 Stan Shebs <stan@codesourcery.com>
11036
11037 * tracepoint.c (struct tracepoint): New field traceframe_usage.
11038 (tracing_start_time): New global.
11039 (tracing_stop_time): New global.
11040 (tracing_user_name): New global.
11041 (tracing_notes): New global.
11042 (tracing_stop_note): New global.
11043 (cmd_qtstart): Set traceframe_usage, start_time.
11044 (stop_tracing): Set stop_time.
11045 (cmd_qtstatus): Report additional status.
11046 (cmd_qtp): New function.
11047 (handle_tracepoint_query): Call it.
11048 (cmd_qtnotes): New function.
11049 (handle_tracepoint_general_set): Call it.
11050 (get_timestamp): Rename from tsv_get_timestamp.
11051
110522011-11-14 Stan Shebs <stan@codesourcery.com>
11053 Kwok Cheung Yeung <kcy@codesourcery.com>
11054
11055 * linux-x86-low.c (small_jump_insn): New.
11056 (i386_install_fast_tracepoint_jump_pad): Add arguments for
11057 trampoline and error message, build a trampoline and issue a small
11058 jump instruction to it.
11059 (x86_install_fast_tracepoint_jump_pad): Add arguments for
11060 trampoline and error message.
11061 (x86_get_min_fast_tracepoint_insn_len): New.
11062 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
11063 * linux-low.h (struct linux_target_ops): Add arguments to
11064 install_fast_tracepoint_jump_pad operation, add new operation.
11065 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11066 arguments.
11067 (linux_get_min_fast_tracepoint_insn_len): New function.
11068 (linux_target_op): Add new operation.
11069 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11070 (gdb_trampoline_buffer_end): Ditto.
11071 (gdb_trampoline_buffer_error): Ditto.
11072 (struct ipa_sym_addresses): Add fields for new IPA variables.
11073 (symbol_list): Add entries for new IPA variables.
11074 (struct tracepoint): Add fields to hold the address range of the
11075 trampoline used by the tracepoint.
11076 (trampoline_buffer_head): New static variable.
11077 (trampoline_buffer_tail): Ditto.
11078 (claim_trampoline_space): New function.
11079 (have_fast_tracepoint_trampoline_buffer): New function.
11080 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11081 structure.
11082 (install_fast_tracepoint): Ditto, also add error buffer argument.
11083 (cmd_qtminftpilen): New function.
11084 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11085 (fast_tracepoint_from_trampoline_address): New function.
11086 (fast_tracepoint_collecting): Handle trampoline as part of jump
11087 pad space.
11088 (set_trampoline_buffer_space): New function.
11089 (initialize_tracepoint): Initialize new IPA variables.
11090 * target.h (struct target_ops): Add arguments to
11091 install_fast_tracepoint_jump_pad operation, add new
11092 get_min_fast_tracepoint_insn_len operation.
11093 (target_get_min_fast_tracepoint_insn_len): New.
11094 (install_fast_tracepoint_jump_pad): Add arguments.
11095 * server.h (IPA_BUFSIZ): Define.
11096 * linux-i386-ipa.c: Include extra header files.
11097 (initialize_fast_tracepoint_trampoline_buffer): New function.
11098 (initialize_low_tracepoint): Call it.
11099 * server.h (set_trampoline_buffer_space): Declare.
11100 (claim_trampoline_space): Ditto.
11101 (have_fast_tracepoint_trampoline_buffer): Ditto.
11102
111032011-11-14 Yao Qi <yao@codesourcery.com>
11104
11105 * server.c (handle_query): Handle InstallInTrace for qSupported.
11106 * tracepoint.c (add_tracepoint): Sort list.
11107 (install_tracepoint, download_tracepoint): New.
11108 (cmd_qtdp): Call them to install and download tracepoints.
11109 (sort_tracepoints): Removed.
11110 (cmd_qtstart): Update.
11111
111122011-11-14 Yao Qi <yao@codesourcery.com>
11113
11114 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11115 * mem-break.h: Declare.
11116 * tracepoint.c (cmd_qtstart): Move some code to ...
11117 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11118 New.
11119 (download_tracepoints): Move some code to ...
11120 (download_tracepoint_1): ... here. New.
11121
111222011-11-08 Yao Qi <yao@codesourcery.com>
11123
11124 * remote-utils.c (relocate_instruction): A comment fix.
11125
111262011-11-07 Joel Brobecker <brobecker@adacore.com>
11127
11128 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11129 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11130 dr_status_mirror and dr_control_mirror from debug_reg_state.
11131 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11132 (i386_initial_stuff): Remove use of deleted globals.
11133 (i386_get_thread_context, i386_set_thread_context,
11134 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11135 from debug_reg_state.
11136
111372011-11-05 Yao Qi <yao@codesourcery.com>
11138
11139 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11140 address as TPOINT's.
11141
111422011-11-02 Stan Shebs <stan@codesourcery.com>
11143
11144 * tracepoint.c (agent_mem_read_string): New function.
11145 (eval_agent_expr): Call it for tracenz.
11146 * server.c (handle_query): Report support for tracenz.
11147
111482011-11-02 Yao Qi <yao@codesourcery.com>
11149
11150 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11151
111522011-11-02 Yao Qi <yao@codesourcery.com>
11153
11154 * target.h: Fix a typo in comment.
11155
111562011-10-31 Pedro Alves <pedro@codesourcery.com>
11157
11158 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11159 clobber the breakpoints' shadows with fast tracepoint jumps.
11160 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11161 * target.c (write_inferior_memory): Also pass MYADDR down to
11162 check_mem_write.
11163
111642011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11165
11166 * configure.ac: Check support for personality routine.
11167 * configure: Regenerate.
11168 * config.in: Likewise.
11169 * linux-low.c: Include <sys/personality.h>.
11170 Define ADDR_NO_RANDOMIZE if necessary.
11171 (linux_create_inferior): Disable address space randomization when
11172 forking inferior, if requested.
11173 (linux_supports_disable_randomization): New function.
11174 (linux_target_ops): Install it.
11175 * server.h (disable_randomization): Declare.
11176 * server.c (disable_randomization): New global variable.
11177 (handle_general_set): Handle QDisableRandomization.
11178 (handle_query): Likewise for qSupported.
11179 (main): Support --disable-randomization and --no-disable-randomization
11180 command line arguments.
11181 * target.h (struct target_ops): Add supports_disable_randomization.
11182 (target_supports_disable_randomization): New macro.
11183
111842011-09-29 Mike Frysinger <vapier@gentoo.org>
11185
11186 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11187 ifdef check.
11188 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11189 [!PT_GETDSBT] (target_loadmap): New definition.
11190 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11191 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11192 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11193 and PT_GETDSBT to LINUX_LOADMAP.
11194 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11195 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11196
111972011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11198
11199 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11200 (arm_linux_hwbp_cap): New static variable.
11201 (arm_linux_get_hwbp_cap): Replace by ...
11202 (arm_linux_init_hwbp_cap): ... this new function.
11203 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11204 (arm_linux_get_hw_watchpoint_count): Likewise.
11205 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11206 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11207 (arm_prepare_to_resume): Use perror_with_name instead of error.
11208
112092011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11210
11211 * linux-arm-low.c: Include <signal.h>.
11212 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11213 (struct arm_linux_hwbp_cap): New data type.
11214 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11215 (struct arm_linux_hw_breakpoint): New data type.
11216 (MAX_BPTS, MAX_WPTS): Define.
11217 (struct arch_process_info, struct arch_lwp_info): New data types.
11218 (arm_linux_get_hwbp_cap): New function.
11219 (arm_linux_get_hw_breakpoint_count): Likewise.
11220 (arm_linux_get_hw_watchpoint_count): Likewise.
11221 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11222 (arm_hwbp_control_initialize): Likewise.
11223 (arm_hwbp_control_is_enabled): Likewise.
11224 (arm_hwbp_control_is_initialized): Likewise.
11225 (arm_hwbp_control_disable): Likewise.
11226 (arm_linux_hw_breakpoint_equal): Likewise.
11227 (arm_linux_hw_point_initialize): Likewise.
11228 (struct update_registers_data): New data structure.
11229 (update_registers_callback: New function.
11230 (arm_insert_point): Likewise.
11231 (arm_remove_point): Likewise.
11232 (arm_stopped_by_watchpoint): Likewise.
11233 (arm_stopped_data_address): Likewise.
11234 (arm_new_process): Likewise.
11235 (arm_new_thread): Likewise.
11236 (arm_prepare_to_resume): Likewise.
11237 (the_low_target): Register arm_insert_point, arm_remove_point,
11238 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11239 arm_new_thread, and arm_prepare_to_resume.
11240
112412011-09-15 Stan Shebs <stan@codesourcery.com>
11242
11243 * server.h (struct emit_ops): Add compare-goto fields.
11244 * tracepoint.c (gdb_agent_op_sizes): New table.
11245 (emit_eq_goto): New function.
11246 (emit_ne_goto): New function.
11247 (emit_lt_goto): New function.
11248 (emit_le_goto): New function.
11249 (emit_gt_goto): New function.
11250 (emit_ge_goto): New function.
11251 (is_goto_target): New function.
11252 (compile_bytecodes): Recognize special cases of compare-goto
11253 combinations and call specialized emitters for them.
11254 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11255 (amd64_emit_ne_goto): New function.
11256 (amd64_emit_lt_goto): New function.
11257 (amd64_emit_le_goto): New function.
11258 (amd64_emit_gt_goto): New function.
11259 (amd64_emit_ge_goto): New function.
11260 (amd64_emit_ops): Add the new functions.
11261 (i386_emit_eq_goto): New function.
11262 (i386_emit_ne_goto): New function.
11263 (i386_emit_lt_goto): New function.
11264 (i386_emit_le_goto): New function.
11265 (i386_emit_gt_goto): New function.
11266 (i386_emit_ge_goto): New function.
11267 (i386_emit_ops): Add the new functions.
11268
112692011-09-08 Stan Shebs <stan@codesourcery.com>
11270
11271 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11272 (i386_emit_epilogue): Restore %ebx.
11273
112742011-08-31 Jie Zhang <jzhang918@gmail.com>
11275
11276 * server.c (step_thread): Remove definition.
11277 (process_serial_event): Don't handle Hs.
11278 * server.h (step_thread): Remove declaration.
11279 * target.c (set_desired_inferior): Remove use of step_thread.
11280
112812011-08-24 Luis Machado <lgustavo@codesourcery.com>
11282
11283 * linux-low.c: Include linux-procfs.h.
11284 (linux_attach_lwp_1): Update comments.
11285 (linux_attach): Scan for existing threads when attaching to a
11286 process that is the tgid.
11287 * Makefile.in: Update dependencies.
11288
112892011-08-24 Luis Machado <lgustavo@codesourcery.com>
11290
11291 * configure.srv: Add linux-procfs.o dependencies.
11292
112932011-08-14 Yao Qi <yao@codesourcery.com>
11294
11295 * target.h (struct target_ops): Fix indent.
11296 * win32-low.c (win32_target_ops): Fix comment.
11297
112982011-08-14 Andrew Jenner <andrew@codesourcery.com>
11299 Yao Qi <yao@codesourcery.com>
11300
11301 * Makefile.in (clean): Remove tic6x-*.c files.
11302 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11303 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11304 (tic6x-c64xp-linux.c): Likewise.
11305 * configure.srv: Add support for tic6x-*-uclinux.
11306 * linux-tic6x-low.c: New.
11307 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11308
113092011-08-14 Andrew Stubbs <ams@codesourcery.com>
11310 Yao Qi <yao@codesourcery.com>
11311
11312 * target.h (struct target_ops): Add read_loadmap.
11313 * linux-low.c (struct target_loadseg): New type.
11314 (struct target_loadmap): New type.
11315 (linux_read_loadmap): New function.
11316 (linux_target_ops): Add linux_read_loadmap.
11317 * server.c (handle_query): Support qXfer:fdpic:read packet.
11318 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11319 to NULL.
11320
113212011-08-05 Eli Zaretskii <eliz@gnu.org>
11322
11323 * win32-low.c: Include <stdint.h>.
11324
113252011-07-22 Pedro Alves <pedro@codesourcery.com>
11326
11327 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11328 to the inferior here.
11329 (i386_remove_aligned_watchpoint): Ditto.
11330 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11331 fit part of the watchpoint in the debug registers.
11332 (i386_update_inferior_debug_regs): New.
11333 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11334 registers, and only update the inferior on success.
11335 (i386_low_remove_watchpoint): Ditto.
11336
113372011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11338
11339 * linux-low.c (compare_ints, unique, list_threads, show_process,
11340 linux_core_of_thread): Delete.
11341 (linux_target_ops): Change linux_core_of_thread to
11342 linux_common_core_of_thread.
11343 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11344 * utils.c (malloc_failure): Change type of argument.
11345 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11346 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11347 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11348 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11349 (IPA_OBJS): Add common-utils-ipa.o.
11350 (ptid_h, linux_osdata_h): New macros.
11351 (server_h): Add common/common-utils.h, common/xml-utils.h,
11352 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11353 common/ptid.h.
11354 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11355 ptid.o, buffer.o): New rules.
11356 (linux-low.o): Add common/linux-osdata.h as a dependency.
11357 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11358 * configure.ac: Add AC_HEADER_DIRENT check.
11359 * config.in: Regenerate.
11360 * configure: Regenerate.
11361 * remote-utils.c (xml_escape_text): Delete.
11362 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11363 buffer_xml_printf): Move to common/buffer.c.
11364 * server.c (main): Remove call to initialize_inferiors.
11365 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11366 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11367 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11368 internal_error, gdb_assert, gdb_assert_fail): Delete.
11369 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11370 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11371 common/buffer.h.
11372 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11373 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11374 initialize_inferiors): Delete.
11375
113762011-07-20 Pedro Alves <pedro@codesourcery.com>
11377
11378 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11379 symbol error.
11380
113812011-05-31 Pedro Alves <pedro@codesourcery.com>
11382
11383 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11384 assertion.
11385 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11386
113872011-05-26 Yao Qi <yao@codesourcery.com>
11388
11389 * Makefile.in (thread-db.o): Track dependence to
11390 common/gdb_thread_db.h.
11391 * thread-db.c: include gdb_thread_db.h from right place.
11392
113932011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11394
11395 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11396 __FILE__ and __LINE__ to internal_error.
11397
113982011-05-13 Doug Evans <dje@google.com>
11399
11400 * thread-db.c (try_thread_db_load_from_sdir): New function.
11401 (try_thread_db_load_from_dir): New function.
11402 (thread_db_load_search): Handle $sdir, ignore $pdir.
11403 Remove trying of system directories if search of
11404 libthread-db-search-path fails, that is now done via $sdir.
11405
114062011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11407
11408 * server.c (handle_query): Add EnableDisableTracepoints to the list
11409 of supported features.
11410 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11411 tracepoints.
11412 (cmd_qtenable_disable): New.
11413 (cmd_qtstart): Install tracepoints even if disabled.
11414 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11415 receiving a QTEnable or QTDisable packet.
11416 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11417 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11418 tracepoints.
11419 (gdb_probe): Skip data collection if static tracepoint is disabled.
11420
114212011-05-10 Doug Evans <dje@google.com>
11422
11423 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11424
114252011-05-04 Doug Evans <dje@google.com>
11426
11427 * linux-low.c (linux_join): Skip process lookup.
11428 * spu-low.c (spu_join): Ditto.
11429 * server.c (join_inferiors_callback): Delete.
11430 (process_serial_event): For 'D' packet (detach) call join_inferior
11431 directly.
11432
114332011-05-04 Joseph Myers <joseph@codesourcery.com>
11434
11435 * README: Don't mention xscale*-*-linux*.
11436 * configure.srv (xscale*-*-linux*): Don't handle target.
11437
114382011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11439
11440 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11441 casting pointers.
11442 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11443 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11444 (i386_emit_void_call_2): Likewise.
11445
114462011-04-26 Yao Qi <yao@codesourcery.com>
11447
11448 * linux-low.c: Move common macros to linux-ptrace.h.
11449 Include linux-ptrace.h.
11450 * Makefile.in (linux_ptrace_h): New.
11451 (linux-low.o): Depends on linux-ptrace.h.
11452
114532011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11454
11455 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11456 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11457 (remote_prepare): New function with most of the TCP code from ...
11458 (remote_open): ... here. Detect PORT here unconditionally. Move also
11459 setting transport_is_reliable.
11460 * server.c (run_once): New variable.
11461 (gdbserver_usage): Document it.
11462 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11463 the first run if RUN_ONCE.
11464 * server.h (run_once, remote_prepare): New declarations.
11465
114662011-04-19 Tom Tromey <tromey@redhat.com>
11467
11468 * win32-low.c (handle_load_dll): Remove duplicate "the".
11469
114702011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11471
11472 Remove support for old Cygwin 1.5 versions.
11473 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11474 function to avoid warning.
11475 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11476 warning.
11477
114782011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11479
11480 * gdbserver/server.h (Macro _): Define it if not available.
11481
114822011-03-14 Michael Snyder <msnyder@vmware.com>
11483
11484 * hostio.c (handle_close): Remove unnecessary null test.
11485
114862011-03-10 Joel Brobecker <brobecker@adacore.com>
11487
11488 * Makefile.in (maintainer-clean realclean distclean): Remove
11489 "make ... subdir_do" command.
11490
114912011-03-10 Michael Snyder <msnyder@vmware.com>
11492
11493 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11494
11495 * server.c (handle_v_run): Free alloced buffer on early return.
11496
114972011-03-09 Yao Qi <yao@codesourcery.com>
11498
11499 Revert:
11500 2011-03-04 Yao Qi <yao@codesourcery.com>
11501
11502 * Makefile.in: Remove GNU make feature --directory.
11503
11504 2011-03-05 Yao Qi <yao@codesourcery.com>
11505
11506 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11507 (subdir_do): New make target. Copied from gdb/Makefile.
11508 (maintainer-clean, realclean, distclean, clean): Call corresponding
11509 make targets in common/Makefile.
11510
11511 2011-02-11 Yao Qi <yao@codesourcery.com>
11512
11513 * configure.ac: Call AC_PROG_RANLIB.
11514 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11515 * configure: Regenerate.
11516
115172011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11518
11519 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11520
115212011-03-06 Yao Qi <yao@codesourcery.com>
11522
11523 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11524
115252011-03-05 Yao Qi <yao@codesourcery.com>
11526
11527 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11528 (subdir_do): New make target. Copied from gdb/Makefile.
11529 (maintainer-clean, realclean, distclean, clean): Call corresponding
11530 make targets in common/Makefile.
11531
115322011-03-04 Yao Qi <yao@codesourcery.com>
11533
11534 * Makefile.in: Remove GNU make feature --directory.
11535
115362011-03-04 Michael Snyder <msnyder@vmware.com>
11537
11538 * server.c (queue_stop_reply): Call xmalloc not malloc.
11539
115402011-03-02 Michael Snyder <msnyder@vmware.com>
11541
11542 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11543
115442011-02-28 Michael Snyder <msnyder@vmware.com>
11545
11546 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11547 (cmd_qtframe): Ditto.
11548 (cmd_qtbuffer): Ditto.
11549 (cmd_bigqtbuffer): Ditto.
11550
11551 * utils.c (decimal2str): Initialize 'width' to nine, then
11552 don't mess with it.
11553
115542011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11555
11556 * hostio.c (require_data): Free *data, not data.
11557
115582011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11559
11560 * hostio.c (require_data): Use free, not xfree.
11561
115622011-02-27 Michael Snyder <msnyder@vmware.com>
11563
11564 * server.c (handle_query): Discard unused value.
11565
11566 * hostio.c (require_data): Free malloc memory before returning
11567 error.
11568
115692011-02-26 Michael Snyder <msnyder@vmware.com>
11570
11571 * linux-low.c (list_threads): Call closedir for dirent.
11572
115732011-02-27 Michael Snyder <msnyder@vmware.com>
11574
11575 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11576 a case statement falls through.
11577
11578 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11579
11580 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11581 in comparison.
11582
115832011-02-26 Michael Snyder <msnyder@vmware.com>
11584
11585 * utils.c (decimal2str): Eliminate dead code and dead param.
11586 (pulongest): Drop dead param from call to decimal2str.
11587 (plongest): Ditto.
11588
115892011-02-24 Joel Brobecker <brobecker@adacore.com>
11590
11591 Revert the following patch (not approved yet):
11592 2011-02-21 Hui Zhu <teawater@gmail.com>
11593 * tracepoint.c (tp_printf): New function.
11594 (eval_agent_expr): Handle gdb_agent_op_printf.
11595
115962011-02-21 Hui Zhu <teawater@gmail.com>
11597
11598 * tracepoint.c (tp_printf): New function.
11599 (eval_agent_expr): Handle gdb_agent_op_printf.
11600
116012011-02-18 Tom Tromey <tromey@redhat.com>
11602
11603 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11604 (tracepoint.o): Likewise.
11605 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11606 (gdb_agent_op_names): Likewise.
11607
116082011-02-18 Tom Tromey <tromey@redhat.com>
11609
11610 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11611 gdb_agent_op_rot>: New constants.
11612 (gdb_agent_op_names): Add pick and roll.
11613 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11614 cases.
11615
116162011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11617
11618 * aclocal.m4: Regenerated with aclocal-1.11.1.
11619
116202011-02-14 Pedro Alves <pedro@codesourcery.com>
11621
11622 * server.c (handle_qxfer_traceframe_info): New.
11623 (qxfer_packets): Register "traceframe-info".
11624 (handle_query): Report support for qXfer:traceframe-info:read+.
11625 * tracepoint.c (match_blocktype): New.
11626 (traceframe_find_block_type): Rename to ...
11627 (traceframe_walk_blocks): ... this. Add callback filter argument,
11628 and use it.
11629 (traceframe_find_block_type): New, reimplemented on top of
11630 traceframe_walk_blocks.
11631 (build_traceframe_info_xml): New.
11632 (traceframe_read_info): New.
11633 * server.h (traceframe_read_info): Declare.
11634
116352011-02-11 Yao Qi <yao@codesourcery.com>
11636
11637 * configure.ac: Call AC_PROG_RANLIB.
11638 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11639 * configure: Regenerate.
11640
116412011-02-07 Pedro Alves <pedro@codesourcery.com>
11642
11643 * server.c (gdb_read_memory): Change return semantics to allow
11644 partial transfers.
11645 (handle_search_memory_1): Adjust.
11646 (process_serial_event) <'m' packet>: Handle partial transfers.
11647 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11648
116492011-01-28 Pedro Alves <pedro@codesourcery.com>
11650
11651 * regcache.c (init_register_cache): Initialize
11652 regcache->register_status.
11653 (free_register_cache): Release regcache->register_status.
11654 (regcache_cpy): Copy register_status.
11655 (registers_to_string): Print 'x's for unavailable registers.
11656 (supply_register): Mark the register's status valid or
11657 unavailable, depending on whether a buffer was passed in or not.
11658 (supply_register_zeroed): New.
11659 (supply_regblock): Mark the registers' status valid or
11660 unavailable, depending on whether a buffer was passed in or not.
11661 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11662 (struct regcache): New `register_status' field.
11663 (supply_register_zeroed): Declare.
11664 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11665 supply_register_zeroed, rather than passing a NULL buffer to
11666 supply_register.
11667 * tracepoint.c (fetch_traceframe_registers): Update comment.
11668
116692011-01-28 Pedro Alves <pedro@codesourcery.com>
11670
11671 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11672 buffer explicit.
11673
116742011-01-25 Pedro Alves <pedro@codesourcery.com>
11675
11676 * server.h (decode_xfer_write): Change prototype.
11677 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11678 and don't extract the annex here.
11679 * server.c (decode_xfer_read): Remove `annex' parameter,
11680 and don't extract the annex here.
11681 (decode_xfer): New.
11682 (struct qxfer): New.
11683 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11684 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11685 (handle_qxfer_statictrace): New functions, abstracted out from
11686 handle_query, and made to use the struct qxfer interface.
11687 (handle_threads_qxfer_proper): Rename to ...
11688 (handle_qxfer_threads_proper): ... this.
11689 (handle_threads_qxfer): Rename to ...
11690 (handle_qxfer_threads): ... this. Adjust.
11691 (qxfer_packets): New array.
11692 (handle_qxfer): New function.
11693 (handle_query): Use handle_qxfer.
11694
116952011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11696
11697 * gdbreplay.c: Shorten lines of >= 80 columns.
11698 * linux-low.c: Ditto.
11699 * linux-ppc-low.c: Ditto.
11700 * linux-s390-low.c: Ditto.
11701 * linux-sparc-low.c: Ditto.
11702 * linux-x86-low.c: Ditto.
11703 * linux-xtensa-low.c: Ditto.
11704 * mem-break.c: Ditto.
11705 * nto-low.c: Ditto.
11706 * regcache.h: Ditto.
11707 * remote-utils.c: Ditto.
11708 * server.c: Ditto.
11709 * server.h: Ditto.
11710 * thread-db.c: Ditto.
11711 * tracepoint.c: Ditto.
11712 * utils.c: Ditto.
11713 * win32-low.h: Ditto.
11714
117152011-01-05 Joel Brobecker <brobecker@adacore.com>
11716
11717 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11718 update.
11719
117202011-01-01 Joel Brobecker <brobecker@adacore.com>
11721
11722 * server.c (gdbserver_version): Update copyright year in version
11723 output.
11724 * gdbreplay.c (gdbreplay_version): Ditto.
11725
117262010-12-29 Jie Zhang <jie.zhang@analog.com>
11727
11728 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11729 * linux-bfin-low.c: New file.
11730 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11731 PT_DATA_ADDR for BFIN targets.
11732 * Makefile.in (SFILES): Add linux-bfin-low.c.
11733 (clean): Remove reg-bfin.c.
11734 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11735 * README: Mention supported Blackfin targets.
11736
117372010-12-23 Mike Frysinger <vapier@gentoo.org>
11738
11739 * .gitignore: New file.
11740
117412010-11-16 Mike Frysinger <vapier@gentoo.org>
11742
11743 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11744
117452010-10-22 Jie Zhang <jie@codesourcery.com>
11746
11747 * Makefile.in: Add FLAGS_TO_PASS variable.
11748 (install): Remove dependency of install-only and recursively
11749 invoke make for install-only.
11750
117512010-10-04 Doug Evans <dje@google.com>
11752
11753 * Makefile.in (uninstall): Use $(DESTDIR).
11754
117552010-09-24 Pedro Alves <pedro@codesourcery.com>
11756
11757 PR gdb/11842
11758
11759 * linux-x86-low.c (compat_siginfo_from_siginfo)
11760 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11761 si_code is < 0. Check for si_code == SI_TIMER before checking for
11762 si_code < 0.
11763
117642010-09-13 Joel Brobecker <brobecker@adacore.com>
11765
11766 * lynx-i386-low.c: New file.
11767 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11768
117692010-09-13 Joel Brobecker <brobecker@adacore.com>
11770
11771 * lynx-low.c (ptrace_request_to_str): Remove handling for
11772 request values that have been removed in LynxOS 5.x.
11773
117742010-09-13 Joel Brobecker <brobecker@adacore.com>
11775
11776 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11777 <ptrace.h>
11778
117792010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11780
11781 * configure.ac: Add --enable-inprocess-agent option.
11782 * configure: Rebuilt.
11783
117842010-09-06 Yao Qi <yao@codesourcery.com>
11785
11786 * linux-low.c (linux_kill): Remove unused variable.
11787 (linux_stabilize_threads): Likewise.
11788 * server.c (start_inferior): Likewise.
11789 (queue_stop_reply_callback): Likewise.
11790 * tracepoint.c (do_action_at_tracepoint): Likewise.
11791
117922010-09-06 Yao Qi <yao@codesourcery.com>
11793
11794 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11795 on return.
11796
117972010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11798
11799 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11800
118012010-09-06 Pedro Alves <pedro@codesourcery.com>
11802
11803 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11804 "$(IPA_DEPFILES)".
11805
118062010-09-01 Joel Brobecker <brobecker@adacore.com>
11807
11808 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11809 gdbserver/lynx-ppc-low.c: New files.
11810 * Makefile.in (lynx_low_h): New variable.
11811 (lynx-low.o, lynx-ppc-low.o): New rules.
11812 * configure.ac: On LynxOS, link with -lnetinet.
11813 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11814 * configure: regenerate.
11815
118162010-09-01 Joel Brobecker <brobecker@adacore.com>
11817
11818 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11819 * configure.ac: Add check for vasprintf and vsnprintf.
11820 * configure, config.in: Regenerate.
11821 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11822
118232010-09-01 Joel Brobecker <brobecker@adacore.com>
11824
11825 * gdbreplay.c: Move include of alloca.h up, next to include of
11826 malloc.h.
11827 * server.h: Add include of malloc.h.
11828 * mem-break.c: Remove include of malloc.h.
11829 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11830
118312010-09-01 Joel Brobecker <brobecker@adacore.com>
11832
11833 * Makefile.in (memmem.o): Build with -Wno-error.
11834
118352010-09-01 Joel Brobecker <brobecker@adacore.com>
11836
11837 * utils.c (xsnprintf): Make non-static.
11838 * server.h: Add xsnprintf declaration.
11839 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11840 replace calls to snprintf by calls to xsnprintf throughout.
11841
118422010-09-01 Joel Brobecker <brobecker@adacore.com>
11843
11844 * configure.ac: Add configure check for alloca.
11845 * configure, config.in: Regenerate.
11846 * server.h: Include alloca.h if it exists.
11847 * gdbreplay.c: Include alloca.h if it exists.
11848
118492010-08-28 Pedro Alves <pedro@codesourcery.com>
11850
11851 * linux-low.c (__SIGRTMIN): Define if not already defined.
11852 (linux_create_inferior): Check for __ANDROID__ rather than
11853 __SIGRTMIN.
11854 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11855 are already deferred.
11856 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11857 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11858 stopped and already has a pending signal to report.
11859 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11860 a pending signal to report or is moving out of a jump pad.
11861 (linux_init_signals): Check for __ANDROID__ rather than
11862 __SIGRTMIN.
11863
118642010-08-28 Pedro Alves <pedro@codesourcery.com>
11865
11866 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11867 debug_threads check. Avoid a linear search when not doing debug
11868 output.
11869
118702010-08-27 Pedro Alves <pedro@codesourcery.com>
11871
11872 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11873 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11874 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11875 (process_event): Change local fd's type to gdb_fildes_t.
11876 (create_file_handler): Adjust prototype.
11877 (delete_file_handler): Adjust prototype.
11878 (handle_file_event): Adjust prototype. Use pfildes.
11879 (create_file_event): Adjsut prototype.
11880 * remote-utils.c (remote_desc, listen_desc): Change type to
11881 gdb_fildes_t.
11882 * server.h: New gdb_fildes_t typedef.
11883 [USE_WIN32API]: Include winsock2.h.
11884 (delete_file_handler, add_file_handler): Adjust prototypes.
11885 (pfildes): Declare.
11886 * utils.c (pfildes): New.
11887
118882010-08-27 Pedro Alves <pedro@codesourcery.com>
11889
11890 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11891 * configure: Regenerate.
11892
118932010-08-27 Pedro Alves <pedro@codesourcery.com>
11894
11895 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11896 (linux_done_accessing_memory): ... this.
11897 (linux_target_ops): Adjust.
11898 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11899 * nto-low.c (nto_target_ops): Adjust comment.
11900 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11901 * spu-low.c (spu_target_ops): Adjust comment.
11902 * target.h (target_ops): Rename unprepare_to_access_memory field
11903 to done_accessing_memory.
11904 (unprepare_to_access_memory): Rename to ...
11905 (done_accessing_memory): ... this.
11906
119072010-08-26 Pedro Alves <pedro@codesourcery.com>
11908
11909 * linux-low.c (linux_prepare_to_access_memory): New.
11910 (linux_unprepare_to_access_memory): New.
11911 (linux_target_ops): Install them.
11912 * server.c (read_memory): Rename to ...
11913 (gdb_read_memory): ... this. Use
11914 prepare_to_access_memory/prepare_to_access_memory.
11915 (write_memory): Rename to ...
11916 (gdb_write_memory): ... this. Use
11917 prepare_to_access_memory/prepare_to_access_memory.
11918 (handle_search_memory_1): Adjust.
11919 (process_serial_event): Adjust.
11920 * target.h (struct target_ops): New fields
11921 prepare_to_access_memory and unprepare_to_access_memory.
11922 (prepare_to_access_memory, unprepare_to_access_memory): New.
11923 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11924 prepare_to_access_memory/prepare_to_access_memory.
11925 * nto-low.c (nto_target_ops): Adjust.
11926 * spu-low.c (spu_target_ops): Adjust.
11927 * win32-low.c (win32_target_ops): Adjust.
11928
119292010-08-26 Pedro Alves <pedro@codesourcery.com>
11930
11931 * Makefile.in (WARN_CFLAGS): Get it from configure.
11932 (WERROR_CFLAGS): New.
11933 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11934 * configure.ac: Introduce --enable-werror, which adds -Werror to
11935 the compiler command line. Enabled by default. Disable with
11936 --disable-werror. Add -Wdeclaration-after-statement
11937 Wpointer-arith and -Wformat-nonliteral to warning flags.
11938 * configure: Regenerate.
11939
119402010-08-26 Pedro Alves <pedro@codesourcery.com>
11941
11942 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11943
119442010-08-26 Pedro Alves <pedro@codesourcery.com>
11945
11946 * gdbreplay.c (remote_error): New.
11947 (gdbchar): New.
11948 (expect): Use gdbchar. Check for error reading from GDB.
11949 Clarify sync error output.
11950 (play): Check for errors writing to GDB.
11951 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11952 * remote-utils.c (getpkt): Check for errors writing to the remote
11953 descriptor.
11954
119552010-08-25 Pedro Alves <pedro@codesourcery.com>
11956
11957 * linux-low.c (linux_wait_1): Move non-debugging code out of
11958 `debug_threads' control.
11959
119602010-08-25 Pedro Alves <pedro@codesourcery.com>
11961
11962 * linux-low.c (linux_wait_1): Don't set last_status here.
11963 * server.c (push_event, queue_stop_reply_callback): Assert we're
11964 not pushing a TARGET_WAITKIND_IGNORE event.
11965 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11966 (myresume, handle_target_event): Set the thread's last_resume_kind
11967 and last_status from the target returned status.
11968
119692010-08-25 Pedro Alves <pedro@codesourcery.com>
11970
11971 PR threads/10729
11972
11973 * linux-x86-low.c (update_debug_registers_callback): New.
11974 (i386_dr_low_set_addr): Use it.
11975 (i386_dr_low_get_addr): New.
11976 (i386_dr_low_set_control): Use update_debug_registers_callback.
11977 (i386_dr_low_get_control): New.
11978 (i386_dr_low_get_status): Adjust.
11979 * linux-low.c (linux_stop_lwp): New.
11980 * linux-low.h (linux_stop_lwp): Declare.
11981
11982 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11983 argument instead of a i386_debug_reg_state.
11984 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11985 a i386_debug_reg_state.
11986 (i386_insert_aligned_watchpoint): Adjust.
11987 (i386_remove_aligned_watchpoint): Adjust.
11988 (i386_low_stopped_data_address): Read the debug registers from the
11989 inferior instead of from the mirrors.
11990 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11991 (i386_dr_low_get_addr): Declare.
11992 (i386_dr_low_get_control): Declare.
11993 (i386_dr_low_get_status): Change prototype.
11994
11995 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11996 (i386_dr_low_get_addr): New.
11997 (i386_dr_low_get_control): New.
11998 (i386_dr_low_get_status): Adjust prototype. Return
11999 dr_status_mirror.
12000 (i386_initial_stuff): Clear dr_status_mirror and
12001 dr_control_mirror.
12002 (i386_get_thread_context): Adjust.
12003 (i386_set_thread_context): Adjust.
12004 (i386_thread_added): Adjust.
12005
120062010-08-24 Pedro Alves <pedro@codesourcery.com>
12007
12008 * linux-low.h (linux_thread_area): Delete declaration.
12009
120102010-08-11 Thomas Schwinge <thomas@codesourcery.com>
12011
12012 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
12013 after its termination.
12014
120152010-08-09 Pedro Alves <pedro@codesourcery.com>
12016
12017 * linux-low.c (gdb_wants_lwp_stopped): Delete.
12018 (gdb_wants_all_stopped): Delete.
12019 (linux_wait_1): Don't call them.
12020 * server.c (handle_v_cont): Tag all threads as want-stopped.
12021 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
12022 stopped as "client-wants-stopped".
12023
120242010-07-31 Pedro Alves <pedro@codesourcery.com>
12025
12026 * Makefile.in (signals_h): New.
12027 (server_h): Depend on it.
12028 (server.o): Don't depend on $(signals_def).
12029 (signals.o): Depend on $(signals_def).
12030
120312010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
12032
12033 * Makefile.in (signals_def): New.
12034 (server_h): Append include/gdb/signals.h and signals_def.
12035 (server.o): Append signals_def.
12036
120372010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
12038
12039 * server.c (handle_target_event): Use target_signal_to_host for
12040 resume_info.sig initialization.
12041 * target.h (struct thread_resume) <sig>: New comment.
12042
120432010-07-20 Ozkan Sezer <sezeroz@gmail.com>
12044
12045 * server.c (handle_query): strcpy() the returned string from paddress()
12046 instead of sprintf().
12047 * utils.c (paddress): Return phex_nz().
12048
120492010-07-07 Joel Brobecker <brobecker@adacore.com>
12050
12051 * server.c (handle_v_cont): Call mourn_inferior if process
12052 just exited.
12053 (myresume): Likewise.
12054
120552010-07-01 Pedro Alves <pedro@codesourcery.com>
12056
12057 Static tracepoints, and integration with UST.
12058
12059 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
12060 * mem-break.c (uninsert_all_breakpoints)
12061 (reinsert_all_breakpoints): New.
12062 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
12063 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
12064 (gdb_agent_ust_loaded, helper_thread_id)
12065 (gdb_agent_helper_thread_id): New macros.
12066 (struct ipa_sym_addresses): Add addr_ust_loaded,
12067 addr_helper_thread_id, addr_cmd_buf.
12068 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12069 (in_process_agent_loaded_ust): New.
12070 (write_e_ust_not_loaded): New.
12071 (maybe_write_ipa_ust_not_loaded): New.
12072 (struct collect_static_trace_data_action): New.
12073 (enum tracepoint_type) <static_tracepoint>: New.
12074 (struct tracepoint) <handle>: Mention static tracepoints.
12075 (struct static_tracepoint_ctx): New.
12076 (CMD_BUF_SIZE): New.
12077 (add_tracepoint_action): Handle static tracepoint actions.
12078 (unprobe_marker_at): New.
12079 (clear_installed_tracepoints): Handle static tracepoints.
12080 (cmd_qtdp): Handle static tracepoints.
12081 (probe_marker_at): New.
12082 (cmd_qtstart): Handle static tracepoints.
12083 (response_tracepoint): Handle static tracepoints.
12084 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12085 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12086 (get_context_regcache): Handle static tracepoints.
12087 (do_action_at_tracepoint): Handle static tracepoint actions.
12088 (traceframe_find_block_type): Handle static trace data blocks.
12089 (traceframe_read_sdata): New.
12090 (download_tracepoints): Download static tracepoint actions.
12091 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12092 (GDB_PROBE_NAME): New.
12093 (ust_ops): New.
12094 (GET_UST_SYM): New.
12095 (USTF): New.
12096 (dlsym_ust): New.
12097 (ust_marker_to_static_tracepoint): New.
12098 (gdb_probe): New.
12099 (collect_ust_data_at_tracepoint): New.
12100 (gdb_ust_probe): New.
12101 (UNIX_PATH_MAX, SOCK_DIR): New.
12102 (gdb_ust_connect_sync_socket): New.
12103 (resume_thread, stop_thread): New.
12104 (run_inferior_command): New.
12105 (init_named_socket): New.
12106 (gdb_ust_socket_init): New.
12107 (cstr_to_hexstr): New.
12108 (next_st): New.
12109 (first_marker, next_marker): New.
12110 (response_ust_marker): New.
12111 (cmd_qtfstm, cmd_qtsstm): New.
12112 (unprobe_marker_at, probe_marker_at): New.
12113 (cmd_qtstmat, gdb_ust_thread): New.
12114 (gdb_ust_init): New.
12115 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12116 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12117 (ST_REGENTRY): New.
12118 (x86_64_st_collect_regmap): New.
12119 (X86_64_NUM_ST_COLLECT_GREGS): New.
12120 (AMD64_RIP_REGNUM): New.
12121 (supply_static_tracepoint_registers): New.
12122 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12123 (ST_REGENTRY): New.
12124 (i386_st_collect_regmap): New.
12125 (i386_NUM_ST_COLLECT_GREGS): New.
12126 (supply_static_tracepoint_registers): New.
12127 * server.c (handle_query): Handle qXfer:statictrace:read.
12128 <qSupported>: Report support for StaticTracepoints, and
12129 qXfer:statictrace:read features.
12130 * server.h (traceframe_read_sdata)
12131 (supply_static_tracepoint_registers): Declare.
12132 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12133 (unpack_varlen_hex): Include in IPA build.
12134 * Makefile.in (ustlibs, ustinc): New.
12135 (IPA_OBJS): Add remote-utils-ipa.o.
12136 ($(IPA_LIB)): Link -ldl and -lpthread.
12137 (UST_CFLAGS): New.
12138 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12139 * config.in, configure: Regenerate.
12140
121412010-06-20 Ian Lance Taylor <iant@google.com>
12142 Pedro Alves <pedro@codesourcery.com>
12143
12144 * linux-x86-low.c (always_true): Delete.
12145 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12146 trying to fool the compiler with always_true.
12147
121482010-06-20 Pedro Alves <pedro@codesourcery.com>
12149
12150 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12151 conditions in gdbserver.
12152
121532010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12154
12155 * spu-low.c (spu_read_memory): Wrap around local store limit.
12156 (spu_write_memory): Likewise.
12157
121582010-06-15 Pedro Alves <pedro@codesourcery.com>
12159
12160 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12161 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12162 LONGEST uses.
12163 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12164 uses.
12165 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12166 uses with LONGEST uses.
12167
121682010-06-14 Stan Shebs <stan@codesourcery.com>
12169 Pedro Alves <pedro@codesourcery.com>
12170
12171 Bytecode compiler.
12172
12173 * linux-x86-low.c: Include limits.h.
12174 (add_insns): New.
12175 (always_true): New.
12176 (EMIT_ASM): New.
12177 (EMIT_ASM32): New.
12178 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12179 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12180 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12181 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12182 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12183 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12184 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12185 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12186 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12187 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12188 (amd64_emit_void_call_2): New.
12189 (amd64_emit_ops): New.
12190 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12191 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12192 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12193 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12194 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12195 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12196 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12197 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12198 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12199 (i386_emit_stack_adjust, i386_emit_int_call_1)
12200 (i386_emit_void_call_2): New.
12201 (i386_emit_ops): New.
12202 (x86_emit_ops): New.
12203 (the_low_target): Install x86_emit_ops.
12204 * server.h (struct emit_ops): New.
12205 (get_raw_reg_func_addr): Declare.
12206 (current_insn_ptr, emit_error): Declare.
12207 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12208 (set_trace_state_variable_value): New defines.
12209 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12210 addr_get_trace_state_variable_value and
12211 addr_set_trace_state_variable_value.
12212 (symbol_list): New fields for get_raw_reg,
12213 get_trace_state_variable_value and set_trace_state_variable_value.
12214 (condfn): New typedef.
12215 (struct tracepoint): New field `compiled_cond'.
12216 (do_action_at_tracepoint): Clear compiled_cond.
12217 (get_trace_state_variable_value, set_trace_state_variable_value):
12218 Export in the IPA.
12219 (condition_true_at_tracepoint): If there's a compiled condition,
12220 run that.
12221 (current_insn_ptr, emit_error): New globals.
12222 (struct bytecode_address): New.
12223 (get_raw_reg_func_addr): New.
12224 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12225 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12226 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12227 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12228 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12229 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12230 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12231 (compile_tracepoint_condition, compile_bytecodes): New.
12232 * target.h (emit_ops): Forward declare.
12233 (struct target_ops): New field emit_ops.
12234 (target_emit_ops): New.
12235 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12236 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12237 * linux-low.c (linux_emit_ops): New.
12238 (linux_target_ops): Install it.
12239 * linux-low.h (struct linux_target_ops): New field emit_ops.
12240
122412010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12242
12243 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12244 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12245
122462010-06-01 Pedro Alves <pedro@codesourcery.com>
12247 Stan Shebs <stan@codesourcery.com>
12248
12249 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12250 (all): Depend on $(extra_libraries).
12251 (install-only): Install the IPA.
12252 (IPA_OBJS, IPA_LIB): New.
12253 (clean): Remove the IPA lib.
12254 (IPAGENT_CFLAGS): New.
12255 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12256 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12257 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12258 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12259 * configure.ac: Check for atomic builtins support in the compiler.
12260 (IPA_DEPFILES, extra_libraries): Define.
12261 * configure.srv (ipa_obj): Add description.
12262 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12263 (i[34567]86-*-linux*): Set ipa_obj.
12264 (x86_64-*-linux*): Set ipa_obj.
12265 * linux-low.c (stabilizing_threads): New.
12266 (supports_fast_tracepoints): New.
12267 (linux_detach): Stabilize threads before detaching.
12268 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12269 the lwp is either not stabilizing, or is moving out of a jump pad.
12270 (linux_fast_tracepoint_collecting): New.
12271 (maybe_move_out_of_jump_pad): New.
12272 (enqueue_one_deferred_signal): New.
12273 (dequeue_one_deferred_signal): New.
12274 (linux_wait_for_event_1): If moving out of a jump pad, defer
12275 pending signals to later.
12276 (linux_stabilize_threads): New.
12277 (linux_wait_1): Check if threads need moving out of jump pads, and
12278 do it if so.
12279 (stuck_in_jump_pad_callback): New.
12280 (move_out_of_jump_pad_callback): New.
12281 (lwp_running): New.
12282 (linux_resume_one_lwp): Handle moving out of jump pads.
12283 (linux_set_resume_request): Dequeue deferred signals.
12284 (need_step_over_p): Also step over fast tracepoint jumps.
12285 (start_step_over): Also uninsert fast tracepoint jumps.
12286 (finish_step_over): Also reinsert fast tracepoint jumps.
12287 (linux_install_fast_tracepoint_jump): New.
12288 (linux_target_ops): Install linux_stabilize_threads and
12289 linux_install_fast_tracepoint_jump_pad.
12290 * linux-low.h (linux_target_ops) <get_thread_area,
12291 install_fast_tracepoint_jump_pad>: New fields.
12292 (struct lwp_info) <collecting_fast_tracepoint,
12293 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12294 (linux_get_thread_area): Declare.
12295 * linux-x86-low.c (jump_insn): New.
12296 (x86_get_thread_area): New.
12297 (append_insns): New.
12298 (push_opcode): New.
12299 (amd64_install_fast_tracepoint_jump_pad): New.
12300 (i386_install_fast_tracepoint_jump_pad): New.
12301 (x86_install_fast_tracepoint_jump_pad): New.
12302 (the_low_target): Install x86_get_thread_area and
12303 x86_install_fast_tracepoint_jump_pad.
12304 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12305 (struct fast_tracepoint_jump): New.
12306 (fast_tracepoint_jump_insn): New.
12307 (fast_tracepoint_jump_shadow): New.
12308 (find_fast_tracepoint_jump_at): New.
12309 (fast_tracepoint_jump_here): New.
12310 (delete_fast_tracepoint_jump): New.
12311 (set_fast_tracepoint_jump): New.
12312 (uninsert_fast_tracepoint_jumps_at): New.
12313 (reinsert_fast_tracepoint_jumps_at): New.
12314 (set_breakpoint_at): Use write_inferior_memory.
12315 (uninsert_raw_breakpoint): Use write_inferior_memory.
12316 (check_mem_read): Mask out fast tracepoint jumps.
12317 (check_mem_write): Mask out fast tracepoint jumps.
12318 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12319 (set_fast_tracepoint_jump): Declare.
12320 (delete_fast_tracepoint_jump)
12321 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12322 (reinsert_fast_tracepoint_jumps_at): Declare.
12323 * regcache.c: Don't compile many functions when building the
12324 in-process agent library.
12325 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12326 the register buffer in the heap.
12327 (free_register_cache): If the register buffer isn't owned by the
12328 regcache, don't free it.
12329 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12330 pre-existing register caches.
12331 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12332 type.
12333 (convert_ascii_to_int): : Constify `from' parameter type.
12334 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12335 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12336 the needed buffer in-place.
12337 (relocate_instruction): New.
12338 * server.c (handle_query) <qSymbols>: If the target supports
12339 tracepoints, give it a chance of looking up symbols. Report
12340 support for fast tracepoints.
12341 (handle_status): Stabilize threads.
12342 (process_serial_event): Adjust.
12343 * server.h (struct fast_tracepoint_jump): Forward declare.
12344 (struct process_info) <fast_tracepoint_jumps>: New field.
12345 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12346 (decode_X_packet, decode_M_packet): Adjust.
12347 (relocate_instruction): Declare.
12348 (in_process_agent_loaded): Declare.
12349 (tracepoint_look_up_symbols): Declare.
12350 (struct fast_tpoint_collect_status): Declare.
12351 (fast_tracepoint_collecting): Declare.
12352 (force_unlock_trace_buffer): Declare.
12353 (handle_tracepoint_bkpts): Declare.
12354 (initialize_low_tracepoint)
12355 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12356 * target.h (struct target_ops) <stabilize_threads,
12357 install_fast_tracepoint_jump_pad>: New fields.
12358 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12359 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12360 [HAVE_STDINT_H]: Include stdint.h.
12361 (trace_debug_1): Rename to ...
12362 (trace_vdebug): ... this.
12363 (trace_debug): Rename to ...
12364 (trace_debug_1): ... this. Add `level' parameter.
12365 (trace_debug): New.
12366 (ATTR_USED, ATTR_NOINLINE): New.
12367 (IP_AGENT_EXPORT): New.
12368 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12369 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12370 (about_to_request_buffer_space, trace_buffer_is_full)
12371 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12372 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12373 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12374 (traceframe_write_count, traceframes_created)
12375 (trace_state_variables)
12376 New renaming defines.
12377 (struct ipa_sym_addresses): New.
12378 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12379 (symbol_list): New.
12380 (ipa_sym_addrs): New.
12381 (all_tracepoint_symbols_looked_up): New.
12382 (in_process_agent_loaded): New.
12383 (write_e_ipa_not_loaded): New.
12384 (maybe_write_ipa_not_loaded): New.
12385 (tracepoint_look_up_symbols): New.
12386 (debug_threads) [IN_PROCESS_AGENT]: New.
12387 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12388 (UNKNOWN_SIDE_EFFECTS): New.
12389 (stop_tracing): New.
12390 (flush_trace_buffer): New.
12391 (stop_tracing_bkpt): New.
12392 (flush_trace_buffer_bkpt): New.
12393 (read_inferior_integer): New.
12394 (read_inferior_uinteger): New.
12395 (read_inferior_data_pointer): New.
12396 (write_inferior_data_pointer): New.
12397 (write_inferior_integer): New.
12398 (write_inferior_uinteger): New.
12399 (struct collect_static_trace_data_action): Delete.
12400 (enum tracepoint_type): New.
12401 (struct tracepoint) <type>: New field `type'.
12402 <actions_str, step_actions, step_actions_str>: Only include in
12403 GDBserver.
12404 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12405 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12406 (tracepoints): Use IP_AGENT_EXPORT.
12407 (last_tracepoint): Don't include in the IPA.
12408 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12409 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12410 (alloced_trace_state_variables): New.
12411 (trace_state_variables): Use IP_AGENT_EXPORT.
12412 (traceframe_t): Delete unused variable.
12413 (circular_trace_buffer): Don't include in the IPA.
12414 (trace_buffer_start): Delete.
12415 (struct trace_buffer_control): New.
12416 (trace_buffer_free): Delete.
12417 (struct ipa_trace_buffer_control): New.
12418 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12419 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12420 New.
12421 (trace_buffer_ctrl): New.
12422 (TRACE_BUFFER_CTRL_CURR): New.
12423 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12424 Reimplement as macros.
12425 (trace_buffer_wrap): Delete.
12426 (traceframe_write_count, traceframe_read_count)
12427 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12428 (struct tracepoint_hit_ctx) <type>: New field.
12429 (struct fast_tracepoint_ctx): New.
12430 (memory_barrier): New.
12431 (cmpxchg): New.
12432 (record_tracepoint_error): Update atomically in the IPA.
12433 (clear_inferior_trace_buffer): New.
12434 (about_to_request_buffer_space): New.
12435 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12436 updating the same buffer.
12437 (add_tracepoint): Default the tracepoint's type to trap
12438 tracepoint, and orig_size to -1.
12439 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12440 internal variables.
12441 (create_trace_state_variable): New parameter `gdb'. Handle it.
12442 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12443 (cmd_qtdp): Handle fast tracepoints.
12444 (cmd_qtdv): Adjust.
12445 (max_jump_pad_size): New.
12446 (gdb_jump_pad_head): New.
12447 (get_jump_space_head): New.
12448 (claim_jump_space): New.
12449 (sort_tracepoints): New.
12450 (MAX_JUMP_SIZE): New.
12451 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12452 IPA.
12453 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12454 support. Upload fast traceframes, and delete internal IPA
12455 breakpoints.
12456 (stop_tracing_handler): New.
12457 (flush_trace_buffer_handler): New.
12458 (cmd_qtstop): Upload fast tracepoints.
12459 (response_tracepoint): Handle fast tracepoints.
12460 (tracepoint_finished_step): Upload fast traceframes. Set the
12461 tracepoint hit context's tracepoint type.
12462 (handle_tracepoint_bkpts): New.
12463 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12464 type. Add comment about fast tracepoints.
12465 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12466 non-existing action_str field.
12467 (get_context_regcache): Handle fast tracepoints.
12468 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12469 to the regcache.
12470 (fast_tracepoint_from_jump_pad_address): New.
12471 (fast_tracepoint_from_ipa_tpoint_address): New.
12472 (collecting_t): New.
12473 (force_unlock_trace_buffer): New.
12474 (fast_tracepoint_collecting): New.
12475 (collecting): New.
12476 (gdb_collect): New.
12477 (write_inferior_data_ptr): New.
12478 (target_tp_heap): New.
12479 (target_malloc): New.
12480 (download_agent_expr): New.
12481 (UALIGN): New.
12482 (download_tracepoints): New.
12483 (download_trace_state_variables): New.
12484 (upload_fast_traceframes): New.
12485 (IPA_FIRST_TRACEFRAME): New.
12486 (IPA_NEXT_TRACEFRAME_1): New.
12487 (IPA_NEXT_TRACEFRAME): New.
12488 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12489 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12490 (gdb_jump_pad_buffer_end): New.
12491 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12492 (initialize_tracepoint): Adjust.
12493 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12494 buffer. Initialize the low module.
12495 * utils.c (PREFIX, TOOLNAME): New.
12496 (malloc_failure): Use PREFIX.
12497 (error): In the IPA, an error causes an exit.
12498 (fatal, warning): Use PREFIX.
12499 (internal_error): Use TOOLNAME.
12500 (NUMCELLS): Increase to 10.
12501 * configure, config.in: Regenerate.
12502
125032010-06-01 Pedro Alves <pedro@codesourcery.com>
12504
12505 * server.c (handle_query) <qSupported>: Do two passes over the
12506 qSupported string to avoid nesting strtok.
12507
125082010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12509
12510 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12511 (CDEPS): New.
12512 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12513 -Wl,--dynamic-list.
12514 * configure: Regenerate.
12515 * proc-service.list: New.
12516
125172010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12518
12519 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12520 New comment.
12521
125222010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12523
12524 * gdbreplay.c (remote_open): Check error return from socket() call by
12525 its equality to -1 not by it being negative.
12526 * remote-utils.c (remote_open): Likewise.
12527
125282010-05-23 Pedro Alves <pedro@codesourcery.com>
12529
12530 * config.h: Regenerate.
12531
125322010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12533
12534 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12535 doesn't provide PTRACE_GET_THREAD_AREA.
12536
125372010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12538
12539 * linux-m68k-low.c: Include <asm/ptrace.h>
12540 (ps_get_thread_area): Implement.
12541
125422010-05-03 Doug Evans <dje@google.com>
12543
12544 * event-loop.c (struct callback_event): New struct.
12545 (callback_list): New global.
12546 (append_callback_event, delete_callback_event): New functions.
12547 (process_callback): New function.
12548 (start_event_loop): Call it.
12549 * remote-utils.c (NOT_SCHEDULED): Define.
12550 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12551 moved out of readchar.
12552 (readchar): Rewrite. Call reschedule before returning.
12553 (reset_readchar): New function.
12554 (remote_close): Call it.
12555 (process_remaining, reschedule): New functions.
12556 * server.h (callback_handler_func): New typedef.
12557 (append_callback_event, delete_callback_event): Declare.
12558
125592010-05-03 Pedro Alves <pedro@codesourcery.com>
12560
12561 * proc-service.c (ps_pglobal_lookup): Use
12562 thread_db_look_up_one_symbol.
12563 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12564 parameter. Use it instead of all_symbols_looked_up.
12565 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12566 field.
12567 (all_symbols_looked_up): Don't declare.
12568 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12569 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12570 field.
12571 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12572 Set all_symbols_looked_up here.
12573 (thread_db_look_up_one_symbol): New.
12574 (thread_db_get_tls_address): Adjust.
12575 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12576 thread_db object on the heap, and tentatively set it in the
12577 process structure.
12578 (thread_db_init): Don't set all_symbols_looked_up here.
12579 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12580
125812010-05-03 Pedro Alves <pedro@codesourcery.com>
12582
12583 * linux-low.c (linux_kill, linux_detach): Adjust.
12584 (status_pending_p_callback): Remove redundant statement. Check
12585 for !TARGET_WAITIKIND_IGNORE, instead of
12586 TARGET_WAITKIND_STOPPED.
12587 (handle_tracepoints): Make sure LWP is locked. Adjust.
12588 (linux_wait_for_event_1): Adjust.
12589 (linux_cancel_breakpoints): New.
12590 (unsuspend_one_lwp): New.
12591 (unsuspend_all_lwps): New.
12592 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12593 (send_sigstop_callback): Change return type to int, add new
12594 `except' parameter and handle it.
12595 (suspend_and_send_sigstop_callback): New.
12596 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12597 pass them down. If SUSPEND, also increment the lwp's suspend
12598 count.
12599 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12600 (need_step_over_p): Don't consider suspended LWPs.
12601 (start_step_over): Adjust.
12602 (proceed_one_lwp): Change return type to int, add new `except'
12603 parameter and handle it.
12604 (unsuspend_and_proceed_one_lwp): New.
12605 (proceed_all_lwps): Use find_inferior instead of
12606 for_each_inferior.
12607 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12608 also decrement the suspend count of LWPs. Pass `except' down,
12609 instead of hacking its suspend count.
12610 (linux_pause_all): Add `freeze' parameter. Adjust.
12611 (linux_unpause_all): New.
12612 (linux_target_ops): Install linux_unpause_all.
12613 * server.c (handle_status): Adjust.
12614 * target.h (struct target_ops): New fields `unpause_all' and
12615 `cancel_breakpoints'. Add new parameter to `pause_all'.
12616 (pause_all): Add new `freeze' parameter.
12617 (unpause_all): New.
12618 (cancel_breakpoints): New.
12619 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12620 cancel breakpoints.
12621 (cmd_qtstart): Pause threads.
12622 (stop_tracing): Pause threads, and cancel breakpoints.
12623 * win32-low.c (win32_target_ops): Adjust.
12624
126252010-05-03 Pedro Alves <pedro@codesourcery.com>
12626
12627 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12628 the inferior right away from here...
12629 (linux_wait_1): ... to here, and adjust to check the thread's
12630 last_resume_kind instead of the lwp's step or stop_expected flags.
12631
126322010-05-02 Pedro Alves <pedro@codesourcery.com>
12633
12634 * README: Use consistent `GDB' and `GDBserver' spellings.
12635
126362010-05-02 Pedro Alves <pedro@codesourcery.com>
12637
12638 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12639 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12640 (linux_detach_one_lwp): Assume the lwp is stopped.
12641 (any_thread_of): Delete.
12642 (linux_detach): Stop all lwps here. Don't blindly delete all
12643 breakpoints.
12644 (delete_lwp_callback): New.
12645 (linux_mourn): Delete all lwps of the process that is gone.
12646 (linux_wait_1): Don't delete the last lwp of the process here.
12647 * mem-break.h (mark_breakpoints_out): Declare.
12648 * mem-break.c (mark_breakpoints_out): New.
12649 (free_all_breakpoints): Use it.
12650 * server.c (handle_target_event): If the process is gone, mark
12651 breakpoints out.
12652 * thread-db.c (struct thread_db) <create_bp>: New field.
12653 (thread_db_enable_reporting): Fix prototype. Store a thread event
12654 breakpoint reference in the thread_db struct.
12655 (thread_db_load_search): Clear the thread_db object.
12656 (try_thread_db_load_1): Ditto.
12657 (switch_to_process): New.
12658 (disable_thread_event_reporting): Use it.
12659 (remove_thread_event_breakpoints): New.
12660 (thread_db_detach, thread_db_mourn): Use it.
12661
126622010-05-01 Pedro Alves <pedro@codesourcery.com>
12663
12664 * linux-low.c (linux_enable_event_reporting): New.
12665 (linux_wait_for_event_1, handle_extended_wait): Use it.
12666
126672010-04-30 Pedro Alves <pedro@codesourcery.com>
12668
12669 * linux-low.c (linux_kill_one_lwp, linux_kill)
12670 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12671 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12672 SIGSTOP even if the LWP is stopped.
12673 (send_sigstop_callback): New.
12674 (stop_all_lwps): Use send_sigstop_callback instead.
12675 (linux_resume_one_thread): Adjust.
12676 (proceed_one_lwp): Still proceed an LWP that the client has
12677 requested to stop, if we haven't reported it as stopped yet. Make
12678 sure that LWPs the client want stopped, have a pending SIGSTOP.
12679
126802010-04-26 Doug Evans <dje@google.com>
12681
12682 * server.c (handle_general_set): Make static.
12683
12684 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12685 Print received char after testing for error/eof instead of before.
12686 (input_interrupt): Tweak comment.
12687
126882010-04-23 Doug Evans <dje@google.com>
12689
12690 * server.c (start_inferior): Print inferior argv if --debug.
12691
126922010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12693
12694 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12695 * nto-x86-low.c: Include server.h
12696
126972010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12698
12699 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12700 be consistent with other sources of this directory.
12701 (init_registers_amd64): Correct name of source file of this function
12702 in the comment.
12703
127042010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12705
12706 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12707 64-bit executables.
12708
127092010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12710
12711 * win32-i386-low.c: Add 64-bit support.
12712 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12713 (init_registers_amd64): Declare.
12714 (mappings): Add 64-bit version of array.
12715 (init_windows_x86): New function.
12716 (the_low_target): Change init_arch field to init_windows_x86.
12717
127182010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12719
12720 * win32-low.c: Adapt to support also 64-bit architecture.
12721 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12722 (get_image_name): Use SIZE_T type for local variable `done'.
12723 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12724 (toolhelp_get_dll_name): Idem.
12725 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12726 Use uintptr_t typecast to avoid warning.
12727 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12728 (handle_exception): Use phex_nz to avoid warning.
12729 (win32_wait): Remove unused local variable `process'.
12730
127312010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12732
12733 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12734 `amd64-avx.o'.
12735
127362010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12737
12738 * configure.ac: Use `ws2_32' library for srv_mingw.
12739 * configure: Regenerate.
12740 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12741 * remote-utils.c: Likewise.
12742
127432010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12744
12745 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12746 if __x86_64__ is defined.
12747
127482010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12749
12750 * configure: Regenerate.
12751
127522010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12753
12754 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12755 * target.h (target_ops): New get_tib_address field.
12756 * win32-low.h (win32_thread_info): Add thread_local_base field.
12757 * win32-low.c (child_add_thread): Add tlb argument.
12758 Set thread_local_base field to TLB.
12759 (get_child_debug_event): Adapt to child_add_thread change.
12760 (win32_get_tib_address): New function.
12761 (win32_target_ops): Set get_tib_address field to
12762 win32_get_tib_address.
12763 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12764
127652010-04-12 Pedro Alves <pedro@codesourcery.com>
12766
12767 * linux-low.c (linux_mourn): Also remove the process.
12768 * server.c (handle_target_event): Don't remove the process here.
12769 * nto-low.c (nto_mourn): New.
12770 (nto_target_ops): Install it.
12771 * spu-low.c (spu_mourn): New.
12772 (spu_target_ops): Install it.
12773 * win32-low.c (win32_mourn): New.
12774 (win32_target_ops): Install it.
12775
127762010-04-12 Pedro Alves <pedro@codesourcery.com>
12777
12778 * server.h (buffer_xml_printf): Remove redundant `;'.
12779
127802010-04-12 Pedro Alves <pedro@codesourcery.com>
12781
12782 * regcache.c (set_register_cache): Invalidate regcaches before
12783 changing the register cache layout.
12784 (regcache_invalidate_one): Allow a NULL regcache.
12785 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12786 regcaches before changing the register cache layout or the target
12787 regsets.
12788
127892010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12790
12791 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12792 variable warning on Linux/x86-64.
12793
127942010-04-11 Pedro Alves <pedro@codesourcery.com>
12795
12796 GDBserver disconnected tracing support.
12797
12798 * linux-low.c (linux_remove_process): Delete.
12799 (add_lwp): Don't set last_resume_kind here.
12800 (linux_kill): Use `mourn'.
12801 (linux_detach): Use `thread_db_detach', and `mourn'.
12802 (linux_mourn): New.
12803 (linux_attach_lwp_1): Adjust comment.
12804 (linux_attach): last_resume_kind moved the thread_info; adjust.
12805 (status_pending_p_callback): Adjust.
12806 (linux_wait_for_event_1): Adjust.
12807 (count_events_callback, select_singlestep_lwp_callback)
12808 (select_event_lwp_callback, cancel_breakpoints_callback)
12809 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12810 (proceed_one_lwp): Adjust.
12811 (linux_async): Add debug output.
12812 (linux_thread_stopped): New.
12813 (linux_pause_all): New.
12814 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12815 linux_pause_all.
12816 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12817 (thread_db_free): Delete declaration.
12818 (thread_db_detach, thread_db_mourn): Declare.
12819 * thread-db.c (thread_db_init): Use thread_db_mourn.
12820 (thread_db_free): Delete, split in two.
12821 (disable_thread_event_reporting): New.
12822 (thread_db_detach): New.
12823 (thread_db_mourn): New.
12824
12825 * server.h (struct thread_info) <last_resume_kind>: New field.
12826 <attached>: Add comment.
12827 <gdb_detached>: New field.
12828 (handler_func): Change return type to int.
12829 (handle_serial_event, handle_target_event): Ditto.
12830 (gdb_connected): Declare.
12831 (tracing): Delete.
12832 (disconnected_tracing): Declare.
12833 (stop_tracing): Declare.
12834
12835 * server.c (handle_query) <qSupported>: Report support for
12836 disconnected tracing.
12837 (queue_stop_reply_callback): Account for running threads.
12838 (gdb_wants_thread_stopped): New.
12839 (gdb_wants_all_threads_stopped): New.
12840 (gdb_reattached_process): New.
12841 (handle_status): Clear the `gdb_detached' flag of all processes.
12842 In all-stop, stop all threads.
12843 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12844 (process_serial_event): If the remote connection breaks, or if an
12845 exit was forced with "monitor exit", force an event loop exit.
12846 Handle disconnected tracing on detach.
12847 (handle_serial_event): Adjust.
12848 (handle_target_event): If GDB isn't connected, forward events back
12849 to the inferior, unless the last process exited, in which case,
12850 exit gdbserver. Adjust interface.
12851
12852 * remote-utils.c (remote_open): Don't block in accept. Instead
12853 register an event loop source on the listen socket file
12854 descriptor. Refactor bits into ...
12855 (listen_desc): ... this new global.
12856 (gdb_connected): ... this new function.
12857 (enable_async_notification): ... this new function.
12858 (handle_accept_event): ... this new function.
12859 (remote_close): Clear remote_desc.
12860
12861 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12862
12863 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12864 New fields.
12865 (mourn_inferior): Define.
12866 (target_process_qsupported): Avoid the dangling else problem.
12867 (thread_stopped): Define.
12868 (pause_all): Define.
12869 (target_waitstatus_to_string): Declare.
12870 * target.c (target_waitstatus_to_string): New.
12871
12872 * tracepoint.c (tracing): Make extern.
12873 (disconnected_tracing): New.
12874 (stop_tracing): Make extern. Handle tracing stops due to GDB
12875 disconnecting.
12876 (cmd_qtdisconnected): New.
12877 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12878 (handle_tracepoint_general_set): Handle QTDisconnected.
12879
12880 * event-loop.c (event_handler_func): Change return type to int.
12881 (process_event): Bail out if the event handler wants the event
12882 loop to stop.
12883 (handle_file_event): Ditto.
12884 (start_event_loop): Bail out if the event handler wants the event
12885 loop to stop.
12886
12887 * nto-low.c (nto_target_ops): Adjust.
12888 * spu-low.c (spu_wait): Don't remove the process here.
12889 (spu_target_ops): Adjust.
12890 * win32-low.c (win32_wait): Don't remove the process here.
12891 (win32_target_ops): Adjust.
12892
128932010-04-11 Pedro Alves <pedro@codesourcery.com>
12894
12895 * regcache.c (realloc_register_cache): Invalidate inferior's
12896 regcache before recreating it.
12897
128982010-04-09 Pedro Alves <pedro@codesourcery.com>
12899
12900 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12901
129022010-04-09 Stan Shebs <stan@codesourcery.com>
12903 Pedro Alves <pedro@codesourcery.com>
12904
12905 * server.h (LONGEST): New.
12906 (struct thread_info) <while_stepping>: New field.
12907 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12908 Declare.
12909 (initialize_tracepoint, handle_tracepoint_general_set)
12910 (handle_tracepoint_query, tracepoint_finished_step)
12911 (tracepoint_was_hit, release_while_stepping_state_list):
12912 (current_traceframe): Declare.
12913 * server.c (handle_general_set): Handle tracepoint packets.
12914 (read_memory): New.
12915 (write_memory): New.
12916 (handle_search_memory_1): Use read_memory.
12917 (handle_query): Report support for conditional tracepoints, trace
12918 state variables, and tracepoint sources. Handle tracepoint
12919 queries.
12920 (main): Initialize the tracepoints module.
12921 (process_serial_event): Handle traceframe reads/writes.
12922
12923 * linux-low.c (handle_tracepoints): New.
12924 (linux_wait_1): Call it.
12925 (linux_resume_one_lwp): Handle while-stepping.
12926 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12927 (linux_target_ops): Install them.
12928 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12929 New field.
12930 * linux-x86-low.c (x86_supports_tracepoints): New.
12931 (the_low_target). Install it.
12932
12933 * mem-break.h (delete_breakpoint): Declare.
12934 * mem-break.c (delete_breakpoint): Make external.
12935
12936 * target.h (struct target_ops): Add `supports_tracepoints',
12937 `read_pc', and `write_pc' fields.
12938 (target_supports_tracepoints): Define.
12939 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12940 (phex_nz): New.
12941
12942 * regcache.h (struct regcache) <registers_owned>: New field.
12943 (init_register_cache, regcache_cpy): Declare.
12944 (regcache_read_pc, regcache_write_pc): Declare.
12945 (register_cache_size): Declare.
12946 (supply_regblock): Declare.
12947 * regcache.c (init_register_cache): New.
12948 (new_register_cache): Use it.
12949 (regcache_cpy): New.
12950 (register_cache_size): New.
12951 (supply_regblock): New.
12952 (regcache_read_pc, regcache_write_pc): New.
12953
12954 * tracepoint.c: New.
12955
12956 * Makefile.in (OBS): Add tracepoint.o.
12957 (tracepoint.o): New rule.
12958
129592010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12960
12961 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12962 (i386-mmx.o): New.
12963 (i386-mmx.c): Likewise.
12964 (i386-mmx-linux.o): Likewise.
12965 (i386-mmx-linux.c): Likewise.
12966
12967 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12968 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12969 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12970 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12971
12972 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12973 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12974 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12975
129762010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12977
12978 * Makefile.in (clean): Updated.
12979 (i386-avx.o): New.
12980 (i386-avx.c): Likewise.
12981 (i386-avx-linux.o): Likewise.
12982 (i386-avx-linux.c): Likewise.
12983 (amd64-avx.o): Likewise.
12984 (amd64-avx.c): Likewise.
12985 (amd64-avx-linux.o): Likewise.
12986 (amd64-avx-linux.c): Likewise.
12987
12988 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12989 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12990 (srv_amd64_regobj): Add amd64-avx.o.
12991 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12992 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12993 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12994 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12995 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12996 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12997 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12998
12999 * i387-fp.c: Include "i386-xstate.h".
13000 (i387_xsave): New.
13001 (i387_cache_to_xsave): Likewise.
13002 (i387_xsave_to_cache): Likewise.
13003 (x86_xcr0): Likewise.
13004
13005 * i387-fp.h (i387_cache_to_xsave): Likewise.
13006 (i387_xsave_to_cache): Likewise.
13007 (x86_xcr0): Likewise.
13008
13009 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
13010 * linux-crisv32-low.c (target_regsets): Likewise.
13011 * linux-m68k-low.c (target_regsets): Likewise.
13012 * linux-mips-low.c (target_regsets): Likewise.
13013 * linux-ppc-low.c (target_regsets): Likewise.
13014 * linux-s390-low.c (target_regsets): Likewise.
13015 * linux-sh-low.c (target_regsets): Likewise.
13016 * linux-sparc-low.c (target_regsets): Likewise.
13017 * linux-xtensa-low.c (target_regsets): Likewise.
13018
13019 * linux-low.c: Include <sys/uio.h>.
13020 (regsets_fetch_inferior_registers): Support nt_type.
13021 (regsets_store_inferior_registers): Likewise.
13022 (linux_process_qsupported): New.
13023 (linux_target_ops): Add linux_process_qsupported.
13024
13025 * linux-low.h (regset_info): Add nt_type.
13026 (linux_target_ops): Add process_qsupported.
13027
13028 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
13029 and <sys/uio.h>.
13030 (init_registers_i386_avx_linux): New.
13031 (init_registers_amd64_avx_linux): Likewise.
13032 (xmltarget_i386_linux_no_xml): Likewise.
13033 (xmltarget_amd64_linux_no_xml): Likewise.
13034 (PTRACE_GETREGSET): Likewise.
13035 (PTRACE_SETREGSET): Likewise.
13036 (x86_fill_xstateregset): Likewise.
13037 (x86_store_xstateregset): Likewise.
13038 (use_xml): Likewise.
13039 (x86_linux_update_xmltarget): Likewise.
13040 (x86_linux_process_qsupported): Likewise.
13041 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
13042 (x86_arch_setup): Don't call init_registers_amd64_linux nor
13043 init_registers_i386_linux here. Call
13044 x86_linux_update_xmltarget.
13045 (the_low_target): Add x86_linux_process_qsupported.
13046
13047 * server.c (handle_query): Call target_process_qsupported.
13048
13049 * target.h (target_ops): Add process_qsupported.
13050 (target_process_qsupported): New.
13051
130522010-04-03 Pedro Alves <pedro@codesourcery.com>
13053
13054 * inferiors.c (add_thread): Set last_status kind to
13055 TARGET_WAITKIND_IGNORE.
13056 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
13057 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
13058 (linux_wait_1): Move `thread' local definition to block that uses
13059 it. Don't NULL initialize `event_child'.
13060 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
13061 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
13062 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
13063
130642010-04-01 Pedro Alves <pedro@codesourcery.com>
13065
13066 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13067 an extended waitstatus, or by a watchpoint.
13068 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13069 thread was stepping or has been stopped by a watchpoint.
13070
130712010-04-01 Pedro Alves <pedro@codesourcery.com>
13072
13073 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13074 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13075 of another, then delete the previous, and validate all
13076 breakpoints.
13077 (validate_inserted_breakpoint): New.
13078 (delete_disabled_breakpoints): New.
13079 (validate_breakpoints): New.
13080 (check_mem_read): Validate breakpoints before trusting their
13081 shadow. Delete disabled breakpoints.
13082 (check_mem_write): Validate breakpoints before trusting they
13083 should be inserted. Delete disabled breakpoints.
13084 * mem-break.h (validate_breakpoints):
13085 * server.c (handle_query): Validate breakpoints when we see a
13086 qSymbol query.
13087
130882010-04-01 Pedro Alves <pedro@codesourcery.com>
13089
13090 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13091 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13092 if we could tell there's a GDB breakpoint at stop_pc.
13093 (need_step_over_p): Don't do a step over if we find a GDB
13094 breakpoint at the resume PC.
13095
13096 * mem-break.c (struct raw_breakpoint): New.
13097 (enum bkpt_type): New type `gdb_breakpoint'.
13098 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13099 fields. New field `raw'.
13100 (find_raw_breakpoint_at): New.
13101 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13102 breakpoint instead.
13103 (set_breakpoint_at): Adjust.
13104 (delete_raw_breakpoint): New.
13105 (release_breakpoint): New.
13106 (delete_breakpoint): Rename to...
13107 (delete_breakpoint_1): ... this. Add proc parameter. Use
13108 release_breakpoint. Return ENOENT.
13109 (delete_breakpoint): Reimplement.
13110 (find_breakpoint_at): Delete.
13111 (find_gdb_breakpoint_at): New.
13112 (delete_breakpoint_at): Delete.
13113 (set_gdb_breakpoint_at): New.
13114 (delete_gdb_breakpoint_at): New.
13115 (gdb_breakpoint_here): New.
13116 (set_reinsert_breakpoint): Use release_breakpoint.
13117 (uninsert_breakpoint): Rename to ...
13118 (uninsert_raw_breakpoint): ... this.
13119 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13120 (reinsert_raw_breakpoint): Change parameter type to
13121 raw_breakpoint.
13122 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13123 instead.
13124 (check_breakpoints): Adjust. Use release_breakpoint.
13125 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13126 (breakpoint_inserted_here): Ditto.
13127 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13128 Don't trust the breakpoint's shadow if it is not inserted.
13129 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13130 (delete_all_breakpoints): Adjust.
13131 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13132 use delete_breakpoint_1.
13133
13134 * mem-break.h (breakpoints_supported): Delete declaration.
13135 (set_gdb_breakpoint_at): Declare.
13136 (gdb_breakpoint_here): Declare.
13137 (delete_breakpoint_at): Delete.
13138 (delete_gdb_breakpoint_at): Declare.
13139
13140 * server.h (struct raw_breakpoint): Forward declare.
13141 (struct process_info): New field `raw_breakpoints'.
13142
13143 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13144 breakpoints.
13145
131462010-03-24 Pedro Alves <pedro@codesourcery.com>
13147
13148 * linux-low.c (status_pending_p_callback): Fix comment.
13149 (linux_wait_for_event_1): Move most of the internal breakpoint
13150 handling from here...
13151 (linux_wait_1): ... to here.
13152 (count_events_callback): New.
13153 (select_singlestep_lwp_callback): New.
13154 (select_event_lwp_callback): New.
13155 (cancel_breakpoints_callback): New.
13156 (select_event_lwp): New.
13157 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13158 priority to all LWPs that have had events that should be reported
13159 to the client. Cancel breakpoints when about to reporting the
13160 event to the client, not while stopping lwps. No longer cancel
13161 finished single-steps here.
13162 (cancel_finished_single_step): Delete.
13163 (cancel_finished_single_steps): Delete.
13164
131652010-03-24 Pedro Alves <pedro@codesourcery.com>
13166
13167 * mem-break.c (enum bkpt_type): New.
13168 (struct breakpoint): New field `type'.
13169 (set_breakpoint_at): Change return type to struct breakpoint
13170 pointer. Set type to `other_breakpoint' by default.
13171 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13172 in the breakpoint list.
13173 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13174 (reinsert_breakpoint): Rename to ...
13175 (reinsert_raw_breakpoint): ... this.
13176 (reinsert_breakpoints_at): Adjust.
13177 * mem-break.h (struct breakpoint): Declare.
13178 (set_breakpoint_at): Change return type to struct breakpoint
13179 pointer.
13180
131812010-03-24 Pedro Alves <pedro@codesourcery.com>
13182
13183 * server.c (handle_query): Assign, not compare.
13184
131852010-03-24 Pedro Alves <pedro@codesourcery.com>
13186
13187 Teach linux gdbserver to step-over-breakpoints.
13188
13189 * linux-low.c (can_hardware_single_step): New.
13190 (supports_breakpoints): New.
13191 (handle_extended_wait): If stopping threads, read the stop pc of
13192 the new cloned LWP.
13193 (get_pc): New.
13194 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13195 low target doesn't support retrieving the PC.
13196 (add_lwp): Set last_resume_kind to resume_continue.
13197 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13198 (linux_attach): Don't clear stop_expected. Set the lwp's
13199 last_resume_kind to resume_stop.
13200 (linux_detach_one_lwp): Don't check for removed breakpoints.
13201 (check_removed_breakpoint): Delete.
13202 (status_pending_p): Rename to ...
13203 (status_pending_p_callback): ... this. Don't check for removed
13204 breakpoints. Don't consider threads that are stopped from GDB's
13205 perspective.
13206 (linux_wait_for_lwp): Always read the stop_pc here.
13207 (cancel_breakpoint): New.
13208 (step_over_bkpt): New global.
13209 (linux_wait_for_event_1): Implement stepping over breakpoints.
13210 (gdb_wants_lwp_stopped): New.
13211 (gdb_wants_all_stopped): New.
13212 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13213 single-step traps here. Store the thread's last reported target
13214 wait status.
13215 (send_sigstop): Don't clear stop_expected. Always set it,
13216 instead.
13217 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13218 (cancel_finished_single_step): New.
13219 (cancel_finished_single_steps): New.
13220 (wait_for_sigstop): Don't cancel finished single-step traps here.
13221 (linux_resume_one_lwp): Don't check for removed breakpoints.
13222 Don't set `step' on non-hardware step archs.
13223 (linux_set_resume_request): Ignore resume_stop requests if already
13224 stopping or stopped. Set the lwp's last_resume_kind.
13225 (resume_status_pending_p): Don't check for removed breakpoints.
13226 (need_step_over_p): New.
13227 (start_step_over): New.
13228 (finish_step_over): New.
13229 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13230 requests. Clear the thread's last reported target waitstatus.
13231 Don't use the `suspended' flag. Don't consider pending breakpoints.
13232 (linux_resume): Start a step-over if necessary.
13233 (proceed_one_lwp): New.
13234 (proceed_all_lwps): New.
13235 (unstop_all_lwps): New.
13236 * linux-low.h (struct lwp_info): Rewrite comment for the
13237 `suspended' flag. Add the `stop_pc' field. Delete the
13238 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13239 Add `'last_resume_kind' and `need_step_over' fields.
13240 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13241 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13242 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13243 (set_raw_breakpoint_at): New.
13244 (set_breakpoint_at): Rewrite to use it.
13245 (reinsert_breakpoint_handler): Delete.
13246 (set_reinsert_breakpoint): New.
13247 (reinsert_breakpoint_by_bp): Delete.
13248 (delete_reinsert_breakpoints): New.
13249 (uninsert_breakpoint): Rewrite.
13250 (uninsert_breakpoints_at): New.
13251 (reinsert_breakpoint): Rewrite.
13252 (reinsert_breakpoints_at): New.
13253 (check_breakpoints): Rewrite.
13254 (breakpoint_here): New.
13255 (breakpoint_inserted_here): New.
13256 (check_mem_read): Adjust.
13257 * mem-break.h (breakpoints_supported, breakpoint_here)
13258 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13259 (reinsert_breakpoint_by_bp): Delete declaration.
13260 (delete_reinsert_breakpoints): Declare.
13261 (reinsert_breakpoint): Delete declaration.
13262 (reinsert_breakpoints_at): Declare.
13263 (uninsert_breakpoint): Delete declaration.
13264 (uninsert_breakpoints_at): Declare.
13265 (check_breakpoints): Adjust prototype.
13266 * server.h: Adjust include order.
13267 (struct thread_info): Declare here. Add a `last_status' field.
13268
132692010-03-23 Michael Snyder <msnyder@vmware.com>
13270
13271 * server.c (crc32): New function.
13272 (handle_query): Add handling for 'qCRC:' request.
13273
132742010-03-23 Pedro Alves <pedro@codesourcery.com>
13275
13276 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13277 lwp had been stopped by a watchpoint.
13278
132792010-03-16 Pedro Alves <pedro@codesourcery.com>
13280
13281 * server.h (internal_error): Declare.
13282 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13283 * utils.c (internal_error): New function.
13284
132852010-03-15 Andreas Schwab <schwab@redhat.com>
13286
13287 * configure.srv: Fix typo setting srv_regobj.
13288
132892010-03-15 Pedro Alves <pedro@codesourcery.com>
13290
13291 * linux-low.c (fetch_register): Avoid passing a non string literal
13292 format to `error'.
13293 (usr_store_inferior_registers): Ditto.
13294
132952010-03-14 Pedro Alves <pedro@codesourcery.com>
13296
13297 * linux-low.c (linux_write_memory): Bail out early if peeking
13298 memory failed.
13299
133002010-03-14 Pedro Alves <pedro@codesourcery.com>
13301
13302 * linux-low.h (struct lwp_info): New fields
13303 `stopped_by_watchpoint' and `stopped_data_address'.
13304 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13305 here, and cache them in the lwp object.
13306 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13307 directly.
13308 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13309 field.
13310 (linux_stopped_by_watchpoint): Rewrite.
13311 (linux_stopped_data_address): Rewrite.
13312
133132010-03-06 Simo Melenius <simo.melenius@iki.fi>
13314
13315 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13316 switching the current inferior, not before.
13317
133182010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13319
13320 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13321 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13322 i386-linux.c and amd64-linux.c.
13323 (reg-i386.o): Removed.
13324 (reg-i386.c): Likewise.
13325 (reg-i386-linux.o): Likewise.
13326 (reg-i386-linux.c): Likewise.
13327 (reg-x86-64.o): Likewise.
13328 (reg-x86-64.c): Likewise.
13329 (reg-x86-64-linux.o): Likewise.
13330 (reg-x86-64-linux.c): Likewise.
13331 (i386.o): New.
13332 (i386.c): Likewise.
13333 (i386-linux.o): Likewise.
13334 (i386-linux.c): Likewise.
13335 (amd64.o): Likewise.
13336 (amd64.c): Likewise.
13337 (amd64-linux.o): Likewise.
13338 (amd64-linux.c): Likewise.
13339
13340 * configure.srv (srv_i386_regobj): New.
13341 (srv_i386_linux_regobj): Likewise.
13342 (srv_amd64_regobj): Likewise.
13343 (srv_amd64_linux_regobj): Likewise.
13344 (srv_i386_32bit_xmlfiles): Likewise.
13345 (srv_i386_64bit_xmlfiles): Likewise.
13346 (srv_i386_xmlfiles): Likewise.
13347 (srv_amd64_xmlfiles): Likewise.
13348 (srv_i386_linux_xmlfiles): Likewise.
13349 (srv_amd64_linux_xmlfiles): Likewise.
13350 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13351 srv_xmlfiles to $srv_i386_xmlfiles.
13352 (i[34567]86-*-mingw32ce*): Likewise.
13353 (i[34567]86-*-mingw*): Likewise.
13354 (i[34567]86-*-nto*): Likewise.
13355 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13356 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13357 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13358 (x86_64-*-linux*): Likewise.
13359
13360 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13361 (init_registers_amd64_linux): New.
13362 (x86_arch_setup): Replace init_registers_x86_64_linux with
13363 init_registers_amd64_linux.
13364
133652010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13366
13367 * configure.ac: Check for libdl. If it is not available link against
13368 static libthread_db.
13369 * configure: Regenerate.
13370
133712010-02-22 Pedro Alves <pedro@codesourcery.com>
13372
13373 PR9605
13374
13375 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13376 handing a read watchpoint.
13377 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13378
133792010-02-12 Doug Evans <dje@google.com>
13380
13381 * linux-low.c (linux_supports_tracefork_flag): Document.
13382 (linux_look_up_symbols): Add comment.
13383
133842010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13385
13386 * regcache.c (supply_register): Clear regcache if buf is NULL.
13387
133882010-02-02 Nicolas Roche <roche@sourceware.org>
13389 Joel Brobecker <brobecker@adacore.com>
13390
13391 * inferiors.c (find_inferior): Add function documentation.
13392 (unloaded_dll): Handle the case where the unloaded dll has not
13393 been previously registered in the dll list.
13394
133952010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13396
13397 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13398 (thumb2_breakpoint): New.
13399 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13400
134012010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13402
13403 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13404 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13405 breakpoints.
13406
134072010-01-21 Pedro Alves <pedro@codesourcery.com>
13408
13409 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13410
134112010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13412
13413 * linux-s390-low.c (s390_collect_ptrace_register)
13414 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13415
134162010-01-21 Doug Evans <dje@google.com>
13417
13418 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13419 (PTRACE_ARG4_TYPE): New macro.
13420 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13421 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13422 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13423 (usr_store_inferior_registers): Ditto.
13424 (linux_read_memory, linux_write_memory): Ditto.
13425 (linux_test_for_tracefork): Ditto.
13426
13427 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13428 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13429
134302010-01-21 Pedro Alves <pedro@codesourcery.com>
13431
13432 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13433 target.
13434
134352010-01-21 Pedro Alves <pedro@codesourcery.com>
13436
13437 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13438 prototype to take a regcache. Adjust.
13439
134402010-01-20 Pedro Alves <pedro@codesourcery.com>
13441
13442 * regcache.h (struct thread_info): Forward declare.
13443 (struct regcache): New.
13444 (new_register_cache): Adjust prototype.
13445 (get_thread_regcache): Declare.
13446 (free_register_cache): Adjust prototype.
13447 (registers_to_string, registers_from_string): Ditto.
13448 (supply_register, supply_register_by_name, collect_register)
13449 (collect_register_as_string, collect_register_by_name): Ditto.
13450 * regcache.c (struct inferior_regcache_data): Delete.
13451 (get_regcache): Rename to ...
13452 (get_thread_regcache): ... this. Adjust. Switch inferior before
13453 fetching registers.
13454 (regcache_invalidate_one): Adjust.
13455 (regcache_invalidate): Fix prototype.
13456 (new_register_cache): Return the new register cache.
13457 (free_register_cache): Change prototype.
13458 (realloc_register_cache): Adjust.
13459 (registers_to_string): Change prototype to take a regcache. Adjust.
13460 (registers_from_string): Ditto.
13461 (register_data): Ditto.
13462 (supply_register): Ditto.
13463 (supply_register_by_name): Ditto.
13464 (collect_register): Ditto.
13465 (collect_register_as_string): Ditto.
13466 (collect_register_by_name): Ditto.
13467 * server.c (process_serial_event): Adjust.
13468 * linux-low.h (regset_fill_func, regset_store_func): Change
13469 prototype.
13470 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13471 Change prototype.
13472 * linux-low.c (get_stop_pc): Adjust.
13473 (check_removed_breakpoint): Adjust.
13474 (linux_wait_for_event): Adjust.
13475 (linux_resume_one_lwp): Adjust.
13476 (fetch_register): Add regcache parameter. Adjust.
13477 (usr_store_inferior_registers): Ditto.
13478 (regsets_fetch_inferior_registers): Ditto.
13479 (regsets_store_inferior_registers): Ditto.
13480 (linux_fetch_registers, linux_store_registers): Ditto.
13481 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13482 regcache. Adjust.
13483 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13484 Ditto.
13485 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13486 prototype to take a regcache.
13487 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13488 * remote-utils.c (convert_ascii_to_int, outreg)
13489 (prepare_resume_reply): Change prototype to take a regcache.
13490 Adjust.
13491 * target.h (struct target_ops) <fetch_registers, store_registers>:
13492 Change prototype to take a regcache.
13493 (fetch_inferior_registers, store_inferior_registers): Change
13494 prototype to take a regcache. Adjust.
13495 * proc-service.c (ps_lgetregs): Adjust.
13496 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13497 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13498 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13499 take a regcache. Adjust.
13500 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13501 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13502 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13503 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13504 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13505 (cris_cannot_fetch_register):
13506 (cris_breakpoint_at): Change prototype to take a regcache.
13507 Adjust.
13508 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13509 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13510 to take a regcache. Adjust.
13511 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13512 Adjust.
13513 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13514 take a regcache. Adjust.
13515 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13516 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13517 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13518 * linux-mips-low.c (mips_get_pc):
13519 (mips_set_pc): Change prototype to take a regcache. Adjust.
13520 (mips_reinsert_addr): Adjust.
13521 (mips_collect_register): Change prototype to take a regcache.
13522 Adjust.
13523 (mips_supply_register):
13524 (mips_collect_register_32bit, mips_supply_register_32bit)
13525 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13526 (mips_store_fpregset): Ditto.
13527 * linux-ppc-low.c (ppc_supply_ptrace_register)
13528 (ppc_supply_ptrace_register): Ditto.
13529 (parse_spufs_run): Adjust.
13530 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13531 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13532 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13533 take a regcache. Adjust.
13534 * linux-s390-low.c (s390_collect_ptrace_register)
13535 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13536 (s390_set_pc): Change prototype to take a regcache. Adjust.
13537 (s390_arch_setup): Adjust.
13538 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13539 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13540 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13541 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13542 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13543 regcache. Adjust.
13544 (sparc_breakpoint_at): Adjust.
13545 * linux-xtensa-low.c (xtensa_fill_gregset):
13546 (xtensa_store_gregset):
13547 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13548 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13549 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13550 prototype to take a regcache. Adjust.
13551 * win32-arm-low.c (arm_fetch_inferior_register)
13552 (arm_store_inferior_register): Change prototype to take a
13553 regcache. Adjust.
13554 * win32-i386-low.c (i386_fetch_inferior_register)
13555 (i386_store_inferior_register): Change prototype to take a
13556 regcache. Adjust.
13557 * win32-low.c (child_fetch_inferior_registers)
13558 (child_store_inferior_registers): Change prototype to take a
13559 regcache. Adjust.
13560 (win32_wait): Adjust.
13561 (win32_fetch_inferior_registers): Change prototype to take a
13562 regcache. Adjust.
13563 (win32_store_inferior_registers): Adjust.
13564 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13565 store_inferior_register>: Change prototype to take a regcache.
13566
135672010-01-20 Doug Evans <dje@google.com>
13568
13569 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13570 #ifdef.
13571 (linux_wait_for_event1, linux_init_signals): Ditto.
13572 (W_STOPCODE): Provide definition if missing.
13573
135742010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13575
13576 * linux-low.c (linux_core_of_thread): New.
13577 (compare_ints, show_process, list_threads): New.
13578 (linux_qxfer_osdata): Report threads and cores.
13579 (linux_target_op): Register linux_core_of_thread.
13580 * remote-utils.c (prepare_resume_reply): Report the core.
13581 (buffer_xml_printf): Support %d specifier.
13582 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13583 New.
13584 (handle_query): Handle qXfer:threads. Announce availability
13585 thereof.
13586 * target.h (struct target_ops): New field core_of_thread.
13587
135882010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13589
13590 * Makefile.in (clean): Remove new generated files.
13591 (reg-s390.o, reg-s390.c): Remove rules.
13592 (reg-s390x.o, reg-s390x.c): Likewise.
13593 (s390-linux32.o, s390-linux32.c): Add rules.
13594 (s390-linux64.o, s390-linux64.c): Likewise.
13595 (s390x-linux64.o, s390x-linux64.c): Likewise.
13596 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13597 * linux-s390-low.c: Include <elf.h>.
13598 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13599 (init_registers_s390): Remove prototype.
13600 (init_registers_s390x): Likewise.
13601 (init_registers_s390_linux32): Add prototype.
13602 (init_registers_s390_linux64): Likewise.
13603 (init_registers_s390x_linux64): Likewise.
13604 (s390_num_regs_3264): New define.
13605 (s390_regmap_3264): New global variable.
13606 (s390_cannot_fetch_register): Remove obsolete check.
13607 (s390_cannot_store_register): Likewise.
13608 (s390_collect_ptrace_register): Handle upper/lower register halves.
13609 (s390_supply_ptrace_register): Likewise.
13610 (s390_fill_gregset): Update to register number changes.
13611 (s390_get_hwcap): New routine.
13612 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13613 Install appropriate regmap and register set.
13614
136152010-01-01 Joel Brobecker <brobecker@adacore.com>
13616
13617 * server.c (gdbserver_version): Update copyright year to 2010.
13618 * gdbreplay.c (gdbreplay_version): Likewise.
13619
136202009-12-28 Doug Evans <dje@google.com>
13621
13622 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13623 elf/external.h. Include <elf.h> instead but only if necessary.
13624
136252009-12-28 Pedro Alves <pedro@codesourcery.com>
13626
13627 * linux-low.c (linux_remove_process): Remove `detaching'
13628 parameter. Don't release/detach from thread_db here.
13629 (linux_kill): Release/detach from thread_db here, ...
13630 (linux_detach): ... and here, before actually detaching.
13631 (linux_wait_1): ... and here, when a process exits.
13632 * thread-db.c (any_thread_of): New.
13633 (thread_db_free): Switch the current inferior to a thread of the
13634 passed in process.
13635
136362009-12-21 Doug Evans <dje@google.com>
13637
13638 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13639
13640 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13641 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13642 warning ifndef __NR_tkill. Move setting of errno there too.
13643 Delete unnecessary resetting of errno after syscall.
13644 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13645
13646 * configure.ac: Check for dladdr.
13647 * config.in: Regenerate.
13648 * configure: Regenerate.
13649 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13650 (try_thread_db_load): Update.
13651
13652 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13653
136542009-12-18 Doug Evans <dje@google.com>
13655
13656 * event-loop.c: Include unistd.h if it exists.
13657
13658 * linux-low.c (my_waitpid): Move definition away from being in
13659 between linux_tracefork_child/linux_test_for_tracefork.
13660
13661 * gdb_proc_service.h (psaddr_t): Fix type.
13662 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13663 signature to match glibc.
13664
136652009-12-16 Doug Evans <dje@google.com>
13666
13667 * linux-low.c (linux_read_memory): Fix argument to read.
13668
136692009-11-26 Pedro Alves <pedro@codesourcery.com>
13670
13671 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13672 events, don't leave current_inferior pointing at null.
13673
136742009-11-26 Pedro Alves <pedro@codesourcery.com>
13675
13676 * win32-low.c (LOG): Delete.
13677 (OUTMSG): Output to stderr.
13678 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13679 on compile time LOG macro.
13680 (win32_wait): Fix debug output.
13681
136822009-11-26 Pedro Alves <pedro@codesourcery.com>
13683
13684 * win32-low.c (win32_add_one_solib): If the dll name is
13685 "ntdll.dll", prepend the system directory to the dll path.
13686
136872009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13688
13689 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13690
136912009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13692 Vladimir Prus <vladimir@codesourcery.com>
13693
13694 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13695 * configure.ac: Check for __mcoldfire__ and set
13696 gdb_cv_m68k_is_coldfire.
13697 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13698 reg-cf.o and reg-m68k.o.
13699 * configure: Regenerated.
13700
137012009-11-16 Pedro Alves <pedro@codesourcery.com>
13702
13703 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13704 Pass it to thread_db_free.
13705 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13706 proper `detaching' argument to linux_remove_process.
13707 * linux-low.h (thread_db_free): Add `detaching' parameter.
13708 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13709 to thread_db_free.
13710 (thread_db_free): Add `detaching' parameter. Only
13711 call td_ta_clear_event if detaching from process.
13712
137132009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13714
13715 * thread-db.c (thread_db_free): Fix typo.
13716
137172009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13718
13719 PR gdb/10838
13720 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13721
137222009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13723
13724 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13725 with an i686 compiler.
13726 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13727 needed.
13728 * configure: Rebuilt.
13729
137302009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13731
13732 PR gdb/10783
13733
13734 * server.c (handle_search_memory_1): Correct read_addr initialization
13735 in loop for searching subsequent chunks.
13736
137372009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13738
13739 * configure.ac: New --with-libthread-db option.
13740 * thread-db.c: Allow direct dependence on libthread_db.
13741 (thread_db_free): Adjust.
13742 * config.in: Regenerate.
13743 * configure: Likewise.
13744
137452009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13746
13747 PR gdb/10757
13748 * thread-db.c (attach_thread): New function.
13749 (maybe_attach_thread): Return success/failure.
13750 (find_new_threads_callback): Adjust.
13751 (thread_db_find_new_threads): Loop until no new threads.
13752
137532009-10-13 Pedro Alves <pedro@codesourcery.com>
13754
13755 * proc-service.c (ps_lgetregs): Formatting.
13756
137572009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13758
13759 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13760 * configure.ac: Adjust.
13761 * linux-low.h (struct process_info_private): Move members to struct
13762 thread_db.
13763 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13764 * linux-low.c (linux_remove_process): Adjust.
13765 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13766 * server.c (handle_query): Move code ...
13767 (handle_monitor_command): ... here. New function.
13768 * target.h (struct target_ops): New member.
13769 * thread-db.c (struct thread_db): New.
13770 (libthread_db_search_path): New variable.
13771 (thread_db_create_event, thread_db_enable_reporting)
13772 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13773 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13774 (try_thread_db_load_1, dladdr_to_soname): New functions.
13775 (try_thread_db_load, thread_db_load_search): New functions.
13776 (thread_db_init): Search for libthread_db.
13777 (thread_db_free): New function.
13778 (thread_db_handle_monitor_command): Likewise.
13779 * config.in: Regenerate.
13780 * configure: Regenerate.
13781
137822009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13783
13784 * spu-low.c (spu_kill): Wait for inferior to terminate.
13785 Call clear_inferiors.
13786 (spu_detach): Call clear_inferiors.
13787
137882009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13789
13790 * aclocal.m4: Regenerate.
13791 * config.in: Likewise.
13792 * configure: Likewise.
13793
137942009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13795
13796 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13797 (parse_spufs_run): New function.
13798 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13799 (ppc_breakpoint_at): Handle SPU breakpoints.
13800
138012009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13802
13803 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13804 (SPUFS_MAGIC): Define.
13805 (spu_enumerate_spu_ids): New function.
13806 (linux_qxfer_spu): New function.
13807 (linux_target_ops): Install linux_qxfer_spu.
13808
138092009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13810
13811 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13812 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13813 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13814 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13815 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13816 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13817 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13818 (init_registers_powerpc_cell32l): Add prototype.
13819 (init_registers_powerpc_cell64l): Likewise.
13820 (ppc_arch_setup): Detect Cell/B.E. architecture.
13821
138222009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13823
13824 * Makefile.in (datarootdir): New variable.
13825
138262009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13827
13828 * linux-low.c (linux_write_memory): Update debugging output.
13829 * Makefile.in (clean): Add new descriptions.
13830 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13831 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13832 * configure.srv: Add new files for arm*-*-linux*.
13833 * linux-arm-low.c: Add new declarations.
13834 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13835 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13836 (HWCAP_VFPv3D16): New.
13837 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13838 instead of __IWMMXT__.
13839 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13840 (arm_arch_setup): New.
13841 (target_regsets): Remove #ifdef. Add VFP regset.
13842 (the_low_target): Use arm_arch_setup.
13843
138442009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13845
13846 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13847 the main thread again.
13848
138492009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13850
13851 Adding Neutrino gdbserver.
13852 * configure: Regenerated.
13853 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13854 * configure.srv (i[34567]86-*-nto*): New target.
13855 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13856 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13857 (nto_comctrl) [__QNX__]: New function.
13858 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13859
138602009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13861
13862 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13863 srv_tgtobj.
13864
138652009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13866 Pedro Alves <pedro@codesourcery.com>
13867
13868 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13869 don't support CONTEXT_EXTENDED_REGISTERS.
13870 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13871 (the_low_target): Install them.
13872 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13873 failing with ERROR_PIPE_NOT_CONNECTED.
13874
138752009-06-30 Doug Evans <dje@google.com>
13876 Pierre Muller <muller@ics.u-strasbg.fr>
13877
13878 Add h/w watchpoint support to x86-linux, win32-i386.
13879 * Makefile.in (SFILES): Add i386-low.c
13880 (i386_low_h): Define.
13881 (i386-low.o): Add dependencies.
13882 (linux-x86-low.o): Add i386-low.h dependency.
13883 (win32-i386-low.o): Ditto.
13884 * i386-low.c: New file.
13885 * i386-low.h: New file.
13886 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13887 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13888 * linux-low.c (linux_add_process): Initialize arch_private.
13889 (linux_remove_process): Free arch_private.
13890 (add_lwp): Initialize arch_private.
13891 (delete_lwp): Free arch_private.
13892 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13893 provided.
13894 * linux-low.h (process_info_private): New member arch_private.
13895 (lwp_info): New member arch_private.
13896 (linux_target_ops): New members new_process, new_thread,
13897 prepare_to_resume.
13898 (ptid_of): New macro.
13899 * linux-x86-low.c: Include stddef.h, i386-low.h.
13900 (arch_process_info): New struct.
13901 (arch_lwp_info): New struct.
13902 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13903 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13904 (i386_dr_low_get_status): New function.
13905 (x86_insert_point, x86_remove_point): New functions.
13906 (x86_stopped_by_watchpoint): New function.
13907 (x86_stopped_data_address): New function.
13908 (x86_linux_new_process, x86_linux_new_thread): New functions.
13909 (x86_linux_prepare_to_resume): New function.
13910 (the_low_target): Add entries for insert_point, remove_point,
13911 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13912 prepare_to_resume.
13913 * server.c (debug_hw_points): New global.
13914 (monitor_show_help): Document set debug-hw-points.
13915 (handle_query): Process "set debug-hw-points".
13916 * server.h (debug_hw_points): Declare.
13917 (paddress): Declare.
13918 * utils.c (NUMCELLS, CELLSIZE): New macros.
13919 (get_sell, xsnprintf, paddress): New functions.
13920 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13921 remove_point, stopped_by_watchpoint, stopped_data_address.
13922 * win32-i386-low.c: Include i386-low.h.
13923 (debug_reg_state): Replaces dr.
13924 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13925 (i386_dr_low_get_status): New function.
13926 (i386_insert_point, i386_remove_point): New functions.
13927 (i386_stopped_by_watchpoint): New function.
13928 (i386_stopped_data_address): New function.
13929 (i386_initial_stuff): Update.
13930 (get_thread_context,set_thread_context,i386_thread_added): Update.
13931 (the_low_target): Add entries for insert_point,
13932 remove_point, stopped_by_watchpoint, stopped_data_address.
13933 * win32-low.c (win32_insert_watchpoint): New function.
13934 (win32_remove_watchpoint): New function.
13935 (win32_stopped_by_watchpoint): New function.
13936 (win32_stopped_data_address): New function.
13937 (win32_target_ops): Add entries for insert_watchpoint,
13938 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13939 * win32-low.h (win32_target_ops): New members insert_point,
13940 remove_point, stopped_by_watchpoint, stopped_data_address.
13941
139422009-06-25 Pedro Alves <pedro@codesourcery.com>
13943
13944 * server.c (process_serial_event): Re-return unsupported, not
13945 error, if the type isn't recognized. Re-allow supporting only
13946 insert or remove packets. Also call require_running for
13947 breakpoints. Add missing break statement to default case. Tidy.
13948 * target.h (struct target_ops): Rename insert_watchpoint to
13949 insert_point, and remove_watchpoint to remove_point.
13950
13951 * linux-low.h (struct linux_target_ops): Likewise.
13952 * linux-low.c (linux_insert_watchpoint): Rename to ...
13953 (linux_insert_point): ... this. Adjust.
13954 (linux_remove_watchpoint): Rename to ...
13955 (linux_remove_point): ... this. Adjust.
13956 (linux_target_ops): Adjust.
13957 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13958 (cris_insert_point): ... this.
13959 (cris_remove_watchpoint): Rename to ...
13960 (cris_remove_point): ... this.
13961 (the_low_target): Adjust.
13962
139632009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13964
13965 * server.c (handle_v_kill): Pass signal_pid to
13966 kill_inferior if multi_process is zero.
13967
139682009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13969
13970 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13971 * target.h (target_ops): Comment for *_watchpoint to make it clear
13972 the functions can get types '0' and '1'.
13973
139742009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13975
13976 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13977 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13978 * regcache.c (get_regcache): Likewise.
13979 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13980 * win32-low.c (child_fetch_inferior_registers): Remove check for
13981 regno 0.
13982
139832009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13984 Pedro Alves <pedro@codesourcery.com>
13985
13986 * target.h (struct target_ops) <supports_multi_process>: New
13987 callback.
13988 (target_supports_multi_process): New.
13989 * server.c (handle_query): Even if GDB reports support, only
13990 enable multi-process if the target also supports it. Report
13991 multi-process support only if the target backend supports it.
13992 * linux-low.c (linux_supports_multi_process): New function.
13993 (linux_target_ops): Install it as target_supports_multi_process
13994 callback.
13995
139962009-05-24 Doug Evans <dje@google.com>
13997
13998 Global renaming of find_thread_pid to find_thread_ptid.
13999 * server.h (find_thread_ptid): Renamed from find_thread_pid.
14000 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
14001 All callers updated.
14002
14003 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
14004 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
14005 directly.
14006
14007 * linux-low.c (get_stop_pc): Print pc if debug_threads.
14008 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
14009 (linux_resume_one_lwp): Ditto.
14010
140112009-05-23 Doug Evans <dje@google.com>
14012
14013 * linux-low.c (linux_resume_one_lwp): Change type of first arg
14014 from struct inferior_list_entry * to struct lwp_info *.
14015 All callers updated.
14016
140172009-05-13 Doug Evans <dje@google.com>
14018
14019 * linux-x86-low.c: Don't include assert.h.
14020 (x86_siginfo_fixup): Use fatal, not assert.
14021 (x86_arch_setup): Fix comment.
14022
140232009-05-12 Doug Evans <dje@google.com>
14024
14025 Biarch support for i386/amd64 gdbserver.
14026 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
14027 Add linux-x86-low.c.
14028 (linux-i386-low.o, linux-x86-64-low.o): Delete.
14029 (linux-x86-low.o): Add.
14030 * linux-x86-64-low.c: Delete.
14031 * linux-i386-low.c: Delete.
14032 * linux-x86-low.c: New file.
14033 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
14034 linux-x86-low.o.
14035 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
14036 linux-x86-low.o.
14037 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
14038 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
14039 (linux_child_pid_to_exec_file): New function.
14040 (elf_64_header_p, elf_64_file_p): New functions.
14041 (siginfo_fixup): New function.
14042 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
14043 give target a chance to convert layout.
14044 * linux-low.h (linux_target_ops): New member siginfo_fixup.
14045 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
14046
140472009-05-07 Doug Evans <dje@google.com>
14048
14049 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
14050 (regsets_store_inferior_registers): Ditto.
14051
140522009-05-06 Pedro Alves <pedro@codesourcery.com>
14053
14054 PR server/10048
14055
14056 * linux-low.c (must_set_ptrace_flags): Delete.
14057 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
14058 of the global.
14059 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
14060 `lwp->must_set_ptrace_flags' instead.
14061 (linux_wait_for_event_1): Set ptrace options here.
14062 (linux_wait_1): ... not here.
14063
140642009-04-30 Doug Evans <dje@google.com>
14065
14066 * inferiors.c (started_inferior_callback): New function.
14067 (attached_inferior_callback): New function.
14068 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14069 * server.c (print_started_pid, print_attached_pid): New functions.
14070 (detach_or_kill_for_exit): New function.
14071 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14072 * server.h (have_started_inferiors_p): Declare.
14073 (have_attached_inferiors_p): Declare.
14074
14075 * inferiors.c (remove_process): Fix memory leak, free process.
14076 * linux-low.c (linux_remove_process): New function.
14077 (linux_kill): Call it instead of remove_process.
14078 (linux_detach, linux_wait_1): Ditto.
14079
140802009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14081
14082 * configure.srv: Add x86 Windows CE target.
14083
140842009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14085
14086 * inferiors.c (get_thread_process): Make global.
14087 * server.h (get_thread_process): Add prototype.
14088 * thread-db.c (find_one_thread): Use get_thread_process
14089 instead of current_process.
14090 (thread_db_get_tls_address): Do not crash if called when
14091 thread layer is not yet initialized.
14092
140932009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14094
14095 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14096 * spu-low.c (current_tid): Rename to ...
14097 (current_ptid): ... this.
14098 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14099 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14100 ptid_get_lwp (current_ptid) instead of current_tid.
14101 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14102 instead of current_tid. Use find_process_pid to verify pid
14103 argument is valid. Pass proper argument to remove_process.
14104 (spu_thread_alive): Compare current_ptid instead of current_tid.
14105 (spu_resume): Likewise.
14106
141072009-04-02 Pedro Alves <pedro@codesourcery.com>
14108
14109 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14110 variable.
14111
141122009-04-01 Pedro Alves <pedro@codesourcery.com>
14113
14114 Implement the multiprocess extensions, and add linux multiprocess
14115 support.
14116
14117 * server.h (ULONGEST): Declare.
14118 (struct ptid, ptid_t): New.
14119 (minus_one_ptid, null_ptid): Declare.
14120 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14121 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14122 (struct inferior_list_entry): Change `id' type from unsigned from
14123 to ptid_t.
14124 (struct sym_cache, struct breakpoint, struct
14125 process_info_private): Forward declare.
14126 (struct process_info): Declare.
14127 (current_process): Declare.
14128 (all_processes): Declare.
14129 (initialize_inferiors): Declare.
14130 (add_thread): Adjust to use ptid_t.
14131 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14132 (add_process, remove_process, find_thread_pid): Declare.
14133 (find_inferior_id): Adjust to use ptid_t.
14134 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14135 (multi_process): Declare.
14136 (push_event): Adjust to use ptid_t.
14137 (read_ptid, write_ptid): Declare.
14138 (prepare_resume_reply): Adjust to use ptid_t.
14139 (clear_symbol_cache): Declare.
14140 * inferiors.c (all_processes): New.
14141 (null_ptid, minus_one_ptid): New.
14142 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14143 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14144 (add_thread): Change unsigned long to ptid. Remove gdb_id
14145 parameter. Adjust.
14146 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14147 (gdb_id_to_thread): Rename to ...
14148 (find_thread_pid): ... this. Change unsigned long to ptid.
14149 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14150 (loaded_dll, pull_pid_from_list): Adjust.
14151 (add_process, remove_process, find_process_pid)
14152 (get_thread_process, current_process, initialize_inferiors): New.
14153 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14154 (struct target_waitstatus) <related_pid>: Ditto.
14155 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14156 return type to int.
14157 (struct target_ops) <join>: Add `pid' argument.
14158 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14159 (struct target_ops) <wait>: Add `ptid' field. Change return type
14160 to ptid.
14161 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14162 (mywait): Add `ptid' argument. Change return type to ptid_t.
14163 (target_pid_to_str): Declare.
14164 * target.c (set_desired_inferior): Adjust to use ptids.
14165 (mywait): Add new `ptid' argument. Adjust.
14166 (target_pid_to_str): New.
14167 * mem-break.h (free_all_breakpoints): Declare.
14168 * mem-break.c (breakpoints): Delelete.
14169 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14170 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14171 to use per-process breakpoint list.
14172 (free_all_breakpoints): New.
14173 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14174 (symbol_cache, all_symbols_looked_up): Delete.
14175 (hexchars): New.
14176 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14177 read_ptid): New.
14178 (prepare_resume_reply): Change ptid argument's type from unsigned
14179 long to ptid_t. Adjust. Implement W;process and X;process.
14180 (free_sym_cache, clear_symbol_cache): New.
14181 (look_up_one_symbol): Adjust to per-process symbol cache. *
14182 * server.c (cont_thread, general_thread, step_thread): Change type
14183 to ptid_t.
14184 (attached): Delete.
14185 (multi_process): New.
14186 (last_ptid): Change type to ptid_t.
14187 (struct vstop_notif) <ptid>: Change type to ptid_t.
14188 (queue_stop_reply, push_event): Change `ptid' argument's type to
14189 ptid_t.
14190 (discard_queued_stop_replies): Add `pid' argument.
14191 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14192 changes. Don't reference the `attached' global.
14193 (attach_inferior): Adjust to mywait interface changes.
14194 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14195 features. Handle and report "multiprocess+". Handle
14196 "qAttached:PID".
14197 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14198 changes.
14199 (handle_v_kill): New.
14200 (handle_v_stopped): Adjust to use target_pid_to_str.
14201 (handle_v_requests): Allow multiple attaches and runs when
14202 multiprocess extensions are in effect. Handle "vKill".
14203 (myresume): Adjust to use ptids.
14204 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14205 (handle_status): Adjust to discard_queued_stop_replies interface
14206 change.
14207 (first_thread_of, kill_inferior_callback)
14208 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14209 (main): Call initialize_inferiors. Adjust to use ptids, killing
14210 and detaching from all inferiors. Handle multiprocess packet
14211 variants.
14212 * linux-low.h: Include gdb_proc_service.h.
14213 (struct process_info_private): New.
14214 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14215 <lwpid_of>: Use ptid_get_lwp.
14216 (get_lwp_thread): Adjust.
14217 (struct lwp_info): Add `dead' member.
14218 (find_lwp_pid): Declare.
14219 * linux-low.c (thread_db_active): Delete.
14220 (new_inferior): Adjust comment.
14221 (inferior_pid): Delete.
14222 (linux_add_process): New.
14223 (handle_extended_wait): Adjust.
14224 (add_lwp): Change unsigned long to ptid.
14225 (linux_create_inferior): Add process to processes table. Adjust
14226 to use ptids. Don't set new_inferior here.
14227 (linux_attach_lwp): Rename to ...
14228 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14229 it. Adjust to use ptids.
14230 (linux_attach_lwp): New.
14231 (linux_attach): Add process to processes table. Don't set
14232 new_inferior here.
14233 (struct counter): New.
14234 (second_thread_of_pid_p, last_thread_of_process_p): New.
14235 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14236 multiple processes.
14237 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14238 processes. Remove process from process table.
14239 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14240 to multiple processes.
14241 (any_thread_of): New.
14242 (linux_detach): Add `pid' argument, and handle it. Remove process
14243 from processes table.
14244 (linux_join): Add `pid' argument. Handle it.
14245 (linux_thread_alive): Change unsighed long argument to ptid_t.
14246 Consider dead lwps as not being alive.
14247 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14248 threads we're not interested in.
14249 (same_lwp, find_lwp_pid): New.
14250 (linux_wait_for_lwp): Change `pid' argument's type from int to
14251 ptid_t. Adjust.
14252 (linux_wait_for_event): Rename to ...
14253 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14254 from int to ptid_t. Adjust.
14255 (linux_wait_for_event): New.
14256 (linux_wait_1): Add `ptid' argument. Change return type to
14257 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14258 that exit from the process table.
14259 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14260 Adjust.
14261 (mark_lwp_dead): New.
14262 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14263 stopping all threads, mark its main lwp as dead.
14264 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14265 ptids.
14266 (fetch_register, usr_store_inferior_registers)
14267 (regsets_fetch_inferior_registers)
14268 (regsets_store_inferior_registers, linux_read_memory)
14269 (linux_write_memory): Inline `inferior_pid'.
14270 (linux_look_up_symbols): Adjust to use per-process
14271 `thread_db_active'.
14272 (linux_request_interrupt): Adjust to use ptids.
14273 (linux_read_auxv): Inline `inferior_pid'.
14274 (initialize_low): Don't reference thread_db_active.
14275 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14276 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14277 (ps_getpid): Return the pid of the current inferior.
14278 * thread-db.c (proc_handle, thread_agent): Delete.
14279 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14280 per-process data.
14281 (find_one_thread): Change argument type to ptid_t. Adjust to
14282 per-process data.
14283 (maybe_attach_thread): Adjust to per-process data and ptids.
14284 (thread_db_find_new_threads): Ditto.
14285 (thread_db_init): Ditto.
14286 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14287 processes table. Adjust to use ptids.
14288 (spu_kill, spu_detach): Adjust interface. Remove process from
14289 processes table.
14290 (spu_join, spu_thread_alive): Adjust interface.
14291 (spu_wait): Adjust interface. Remove process from processes
14292 table. Adjust to use ptids.
14293 * win32-low.c (current_inferior_tid): Delete.
14294 (current_inferior_ptid): New.
14295 (debug_event_ptid): New.
14296 (thread_rec): Take a ptid. Adjust.
14297 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14298 (child_delete_thread): Ditto.
14299 (do_initial_child_stuff): Add `attached' argument. Add process to
14300 processes table.
14301 (child_fetch_inferior_registers, child_store_inferior_registers):
14302 Adjust.
14303 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14304 (win32_attach): Pass 1 to do_initial_child_stuff.
14305 (win32_kill): Adjust interface. Remove process from processes
14306 table.
14307 (win32_detach): Ditto.
14308 (win32_join): Adjust interface.
14309 (win32_thread_alive): Take a ptid.
14310 (win32_resume): Adjust to use ptids.
14311 (get_child_debug_event): Ditto.
14312 (win32_wait): Adjust interface. Remove exiting process from
14313 processes table.
14314
143152009-04-01 Pedro Alves <pedro@codesourcery.com>
14316
14317 Non-stop mode support.
14318
14319 * server.h (non_stop): Declare.
14320 (gdb_client_data, handler_func): Declare.
14321 (delete_file_handler, add_file_handler, start_event_loop):
14322 Declare.
14323 (handle_serial_event, handle_target_event, push_event)
14324 (putpkt_notif): Declare.
14325 * target.h (enum resume_kind): New.
14326 (struct thread_resume): Replace `step' field by `kind' field.
14327 (TARGET_WNOHANG): Define.
14328 (struct target_ops) <wait>: Add `options' argument.
14329 <supports_non_stop, async, start_non_stop>: New fields.
14330 (target_supports_non_stop, target_async): New.
14331 (start_non_stop): Declare.
14332 (mywait): Add `options' argument.
14333 * target.c (mywait): Add `options' argument. Print child exit
14334 notifications here.
14335 (start_non_stop): New.
14336 * server.c (non_stop, own_buf, mem_buf): New globals.
14337 (struct vstop_notif): New.
14338 (notif_queue): New global.
14339 (queue_stop_reply, push_event, discard_queued_stop_replies)
14340 (send_next_stop_reply): New.
14341 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14342 interface changes.
14343 (attach_inferior): In non-stop mode, don't wait for the target
14344 here.
14345 (handle_general_set): Handle QNonStop.
14346 (handle_query): When handling qC, return the current general
14347 thread, instead of the first thread of the list.
14348 (handle_query): If the backend supports non-stop mode, include
14349 QNonStop+ in the qSupported query response.
14350 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14351 and non-stop mode.
14352 (handle_v_attach, handle_v_run): Handle non-stop mode.
14353 (handle_v_stopped): New.
14354 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14355 (myresume): Adjust to use resume_kind. Handle non-stop.
14356 (queue_stop_reply_callback): New.
14357 (handle_status): Handle non-stop mode.
14358 (main): Clear non_stop flag on reconnection. Use the event-loop.
14359 Refactor serial protocol handling from here ...
14360 (process_serial_event): ... to this new function. When GDB
14361 selects any thread, select one here. In non-stop mode, wait until
14362 GDB acks all pending events before exiting.
14363 (handle_serial_event, handle_target_event): New.
14364 * remote-utils.c (remote_open): Install remote_desc in the event
14365 loop.
14366 (remote_close): Remove remote_desc from the event loop.
14367 (putpkt_binary): Rename to...
14368 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14369 (putpkt_binary): New as wrapper around putpkt_binary_1.
14370 (putpkt_notif): New.
14371 (prepare_resume_reply): In non-stop mode, don't change the
14372 general_thread.
14373 * event-loop.c: New.
14374 * Makefile.in (OBJ): Add event-loop.o.
14375 (event-loop.o): New rule.
14376
14377 * linux-low.h (pid_of): Moved here.
14378 (lwpid_of): New.
14379 (get_lwp_thread): Use lwpid_of.
14380 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14381 * linux-low.c (pid_of): Delete.
14382 (inferior_pid): Use lwpid_of.
14383 (linux_event_pipe): New.
14384 (target_is_async_p): New.
14385 (delete_lwp): New.
14386 (handle_extended_wait): Use lwpid_of.
14387 (add_lwp): Don't set lwpid field.
14388 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14389 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14390 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14391 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14392 first. Adjust to linux_wait_for_event interface changes. Use
14393 lwpid_of.
14394 (linux_detach): Don't delete the main lwp here.
14395 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14396 (status_pending_p): Don't consider explicitly suspended lwps.
14397 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14398 pointer. Add OPTIONS argument. Change return type to int. Use
14399 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14400 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14401 pointer. Add status pointer argument. Return a pid instead of a
14402 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14403 changes. In non-stop mode, don't switch to a random thread.
14404 (linux_wait): Rename to...
14405 (linux_wait_1): ... this. Add target_options argument, and handle
14406 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14407 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14408 clean exit and signal exit code. Don't stop all threads in
14409 non-stop mode. In all-stop mode, only stop all threads when
14410 reporting a stop to GDB. Handle explicit thread stop requests.
14411 (async_file_flush, async_file_mark): New.
14412 (linux_wait): New.
14413 (send_sigstop): Use lwpid_of.
14414 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14415 interface changes. In non-stop mode, don't switch to a random
14416 thread.
14417 (linux_resume_one_lwp): Use lwpid_of.
14418 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14419 (linux_resume_one_thread): ... this. Handle resume_stop. In
14420 non-stop mode, don't look for pending flag in all threads.
14421 (resume_status_pending_p): Don't consider explicitly suspended
14422 threads.
14423 (my_waitpid): Reimplement. Emulate __WALL.
14424 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14425 Use lwpid_of.
14426 (sigchld_handler, linux_supports_non_stop, linux_async)
14427 (linux_start_non_stop): New.
14428 (linux_target_ops): Register linux_supports_non_stop, linux_async
14429 and linux_start_non_stop.
14430 (initialize_low): Install SIGCHLD handler.
14431 * thread-db.c (thread_db_create_event, find_one_thread)
14432 (thread_db_get_tls_address): Use lwpid_of.
14433 * win32-low.c (win32_detach): Adjust to use resume_kind.
14434 (win32_wait): Add `options' argument.
14435 * spu-low.c (spu_resume): Adjust to use resume_kind.
14436 (spu_wait): Add `options' argument.
14437
144382009-04-01 Pedro Alves <pedro@codesourcery.com>
14439
14440 Decouple target code from remote protocol.
14441
14442 * target.h (enum target_waitkind): New.
14443 (struct target_waitstatus): New.
14444 (struct target_ops) <wait>: Return an unsigned long. Take a
14445 target_waitstatus pointer instead of a char pointer.
14446 (mywait): Likewise.
14447 * target.c (mywait): Change prototype to return an unsigned long.
14448 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14449 * server.h (thread_from_wait, old_thread_from_wait): Delete
14450 declarations.
14451 (prepare_resume_reply): Change prototype to take a
14452 target_waitstatus.
14453 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14454 (last_status, last_ptid): New.
14455 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14456 pid instead of a signal.
14457 (attach_inferior): Remove "status" and "signal" parameters.
14458 Adjust.
14459 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14460 not as an address.
14461 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14462 (handle_v_requests, myresume): Remove "status" and "signal"
14463 parameters. Adjust.
14464 (handle_status): New.
14465 (main): Delete local `status'. Adjust.
14466 * remote-utils.c: Include target.h.
14467 (prepare_resume_reply): Change prototype to take a
14468 target_waitstatus. Adjust.
14469
14470 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14471 interface.
14472 * spu-low.c (spu_wait): Adjust.
14473 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14474 Delete.
14475 (win32_wait): Adjust.
14476
144772009-04-01 Pedro Alves <pedro@codesourcery.com>
14478
14479 * target.h (struct thread_resume): Delete leave_stopped member.
14480 (struct target_ops): Add a `n' argument to the `resume' callback.
14481 * server.c (start_inferior): Adjust.
14482 (handle_v_cont, myresume): Adjust.
14483 * linux-low.c (check_removed_breakpoint): Adjust to resume
14484 interface change, and to removed leave_stopped field.
14485 (resume_ptr): Delete.
14486 (struct thread_resume_array): New.
14487 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14488 resume interface change.
14489 (linux_continue_one_thread, linux_queue_one_thread)
14490 (resume_status_pending_p): Check if the resume field is NULL
14491 instead of checking the leave_stopped member.
14492 (linux_resume): Adjust to the target resume interface change.
14493 * spu-low.c (spu_resume): Adjust to the target resume interface
14494 change.
14495 * win32-low.c (win32_detach, win32_resume): Ditto.
14496
144972009-04-01 Pedro Alves <pedro@codesourcery.com>
14498
14499 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14500 flag.
14501 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14502 pending.
14503 (linux_continue_one_thread): Only preserve the stepping flag if
14504 there's a pending breakpoint.
14505
145062009-03-31 Pedro Alves <pedro@codesourcery.com>
14507
14508 * server.c (main): After the inferior having exited, call
14509 remote_close before exiting gdbserver.
14510
145112009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14512
14513 Fix size of FPSCR in Power 7 processors.
14514 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14515 (PPC_FEATURE_HAS_DFP): New #define.
14516 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14517 size of the FPSCR.
14518
145192009-03-23 Pedro Alves <pedro@codesourcery.com>
14520
14521 * server.c (handle_query) Whitespace and formatting.
14522
145232009-03-22 Pedro Alves <pedro@codesourcery.com>
14524
14525 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14526 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14527 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14528 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14529 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14530 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14531 Makefile.in, configure.ac: Fix whitespace throughout.
14532 * configure: Regenerate.
14533
145342009-03-22 Pedro Alves <pedro@codesourcery.com>
14535
14536 * inferiors.c (find_inferior): Make it safe for the callback
14537 function to delete the currently iterated inferior.
14538
145392009-03-22 Pedro Alves <pedro@codesourcery.com>
14540
14541 * Makefile.in (linuw_low_h): Move higher.
14542 (thread-db.o): Depend on $(linux_low_h).
14543
145442009-03-17 Pedro Alves <pedro@codesourcery.com>
14545
14546 Rename "process" to "lwp" throughout.
14547
14548 * linux-low.c (all_processes): Rename to...
14549 (all_lwps): ... this.
14550 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14551 (add_process): Rename to ...
14552 (add_lwp): ... this. Adjust.
14553 (linux_create_inferior): Adjust.
14554 (linux_attach_lwp): Adjust.
14555 (linux_attach): Adjust.
14556 (linux_kill_one_process): Rename to ...
14557 (linux_kill_one_lwp): ... this. Adjust.
14558 (linux_kill): Adjust.
14559 (linux_detach_one_process): Rename to ...
14560 (linux_detach_one_lwp): ... this. Adjust.
14561 (linux_detach): Adjust.
14562 (check_removed_breakpoint): Adjust.
14563 (status_pending_p): Adjust.
14564 (linux_wait_for_process): Rename to ...
14565 (linux_wait_for_lwp): ... this. Adjust.
14566 (linux_wait_for_event): Adjust.
14567 (send_sigstop): Adjust.
14568 (wait_for_sigstop): Adjust.
14569 (stop_all_processes): Rename to ...
14570 (stop_all_lwps): ... this.
14571 (linux_resume_one_process): Rename to ...
14572 (linux_resume_one_lwp): ... this. Adjust.
14573 (linux_set_resume_request, linux_continue_one_thread)
14574 (linux_queue_one_thread, resume_status_pending_p)
14575 (usr_store_inferior_registers, regsets_store_inferior_registers)
14576 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14577 Adjust.
14578 * linux-low.h (get_process): Rename to ...
14579 (get_lwp): ... this. Adjust.
14580 (get_thread_process): Rename to ...
14581 (get_thread_lwp): ... this. Adjust.
14582 (get_process_thread): Rename to ...
14583 (get_lwp_thread): ... this. Adjust.
14584 (struct process_info): Rename to ...
14585 (struct lwp_info): ... this.
14586 (all_processes): Rename to ...
14587 (all_lwps): ... this.
14588 * proc-service.c (ps_lgetregs): Adjust.
14589 * thread-db.c (thread_db_create_event, find_one_thread)
14590 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14591
145922009-03-14 Pedro Alves <pedro@codesourcery.com>
14593
14594 * server.c (handle_query): Handle "qAttached".
14595
145962009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14597
14598 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14599 GPLv3, update license URL.
14600
146012009-03-01 Doug Evans <dje@google.com>
14602
14603 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14604 (server_h): Add gdb_signals.h.
14605 (signals.o): Update.
14606 * server.h (target_signal_from_host,target_signal_to_host_p)
14607 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14608
146092009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14610
14611 * remote-utils.c (getpkt): Also generate remote-debug
14612 information if noack_mode is set.
14613
146142009-02-06 Pedro Alves <pedro@codesourcery.com>
14615
14616 * server.c (handle_query): Report qXfer:siginfo:read and
14617 qXfer:siginfo:write as supported and handle them.
14618 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14619 * linux-low.c (linux_xfer_siginfo): New.
14620 (linux_target_ops): Set it.
14621
146222009-01-26 Pedro Alves <pedro@codesourcery.com>
14623
14624 * server.c (gdbserver_usage): Mention --remote-debug.
14625 (main): Accept '--remote-debug' switch.
14626
146272009-01-18 Doug Evans <dje@google.com>
14628
14629 * regcache.c (new_register_cache): No need to check result of xcalloc.
14630 * server.c (handle_search_memory): Back out calls to xmalloc,
14631 result is checked and error is returned to user upon failure.
14632 (handle_query): Ditto. Add more checks for result of malloc.
14633 (handle_v_cont): Check result of malloc, report error back to
14634 user upon failure.
14635 (handle_v_run): Ditto. Call freeargv.
14636 * server.h (freeargv): Declare.
14637 * utils.c (freeargv): New fn.
14638
146392009-01-15 Doug Evans <dje@google.com>
14640
14641 * gdbreplay.c (perror_with_name): Make arg const char *.
14642 * server.h (target_signal_to_name): Make return type const char *.
14643 * thread-db.c (thread_db_err_str): Make return type const char *.
14644 * utils.c (perror_with_name): Make arg const char *.
14645
146462009-01-14 Pedro Alves <pedro@codesourcery.com>
14647
14648 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14649 when handling a EXIT_PROCESS_DEBUG_EVENT.
14650
146512009-01-06 Joel Brobecker <brobecker@adacore.com>
14652
14653 * gdbreplay.c (gdbreplay_version): Update copyright year.
14654 * server.c (gdbserver_version): Likewise.
14655
146562009-01-05 Doug Evans <dje@google.com>
14657
14658 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14659 (handle_extended_wait): Improve comment.
14660
146612008-12-13 Doug Evans <dje@google.com>
14662
14663 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14664 * server.h (ATTR_MALLOC): New macro.
14665 (xmalloc,xcalloc,xstrdup): Declare.
14666 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14667 * inferiors.c: Ditto.
14668 * linux-low.c: Ditto.
14669 * mem-break.c: Ditto.
14670 * regcache.c: Ditto.
14671 * remote-utils.c: Ditto.
14672 * server.c: Ditto.
14673 * target.c: Ditto.
14674 * win32-low.c: Ditto.
14675
146762008-12-12 Doug Evans <dje@google.com>
14677
14678 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14679 in debugging printf.
14680
14681 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14682
146832008-12-09 Doug Evans <dje@google.com>
14684
14685 * linux-low.h (struct process_info): Delete member tid, unused.
14686 * thread-db.c (find_one_thread): Update.
14687 (maybe_attach_thread): Update.
14688
146892008-12-02 Pedro Alves <pedro@codesourcery.com>
14690
14691 * target.h (struct target_ops): Add qxfer_osdata member.
14692 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14693 and dirent.h.
14694 (linux_qxfer_osdata): New functions.
14695 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14696 callback.
14697 * server.c (handle_query): Handle "qXfer:osdata:read:".
14698 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14699 (buffer_xml_printf): New functions.
14700 * server.h (struct buffer): New.
14701 (buffer_grow_str, buffer_grow_str0): New macros.
14702 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14703 (buffer_xml_printf): Declare.
14704
147052008-11-24 Doug Evans <dje@google.com>
14706
14707 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14708
147092008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14710
14711 * server.c (handle_v_run): Always use the supplied argument list.
14712
147132008-11-19 Bob Wilson <bob.wilson@acm.org>
14714
14715 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14716 (xtensa_regmap_table): Add entry for scompare1.
14717
147182008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14719
14720 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14721 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14722 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14723 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14724 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14725 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14726 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14727 XML target descriptions.
14728 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14729 when inferior is running on an ISA 2.05 or later processor. Add
14730 special case to return offset for full 64-bit slot of FPSCR when
14731 in 32-bits.
14732
147332008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14734
14735 * Makefile.in (SFILES, clean): Added sparc64 files.
14736 (reg-sparc64.o, reg-sparc64.c): New.
14737 * configure.srv (sparc*-*-linux*): New configuration.
14738 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14739 syscall arguments for SPARC.
14740 (regsets_store_inferior_registers): Likewise.
14741 * linux-sparc-low.c: New file.
14742
147432008-10-21 Doug Evans <dje@google.com>
14744
14745 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14746 (READLINE_DIR,READLINE_DEP): Delete.
14747 (INTERNAL_CFLAGS): Update.
14748 (LINTFLAGS): Update.
14749
147502008-10-10 Pedro Alves <pedro@codesourcery.com>
14751
14752 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14753 whole argv from the last run, not just argv[0].
14754
147552008-09-08 Pedro Alves <pedro@codesourcery.com>
14756
14757 * regcache.c (new_register_cache): Return NULL if the register
14758 cache size isn't known yet.
14759 (free_register_cache): Avoid dereferencing a NULL regcache.
14760
147612008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14762
14763 * configure.srv: Merge MIPS and MIPS64.
14764
147652008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14766
14767 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14768
147692008-08-18 Luis Machado <luisgpm@br.ibm.com>
14770
14771 * Makefile.in: Add required vsx dependencies.
14772
14773 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14774 Declare init_registers_powerpc_vsx32l.
14775 Declare init_registers_powerpc_vsx64l.
14776 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14777 (ppc_arch_setup): Check for VSX in hwcap.
14778 (ppc_fill_vsxregset): New function.
14779 (ppc_store_vsxregset): New function.
14780 Add new VSX entry in regset_info target_regsets.
14781
14782 * configure.srv: Add new VSX dependencies.
14783
147842008-08-12 Pedro Alves <pedro@codesourcery.com>
14785
14786 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14787 (remote_open): Set or clear transport_is_reliable.
14788 (putpkt_binary): Don't expect acks in noack mode.
14789 (getpkt): Don't send ack/nac in noack mode.
14790 * server.c (handle_general_set): Handle QStartNoAckMode.
14791 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14792 qSupported.
14793 (main): Reset noack_mode on every connection.
14794 * server.h (noack_mode): Declare.
14795
147962008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14797
14798 * Makefile.in (GDBREPLAY_OBS): New variable.
14799 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14800
148012008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14802 Daniel Jacobowitz <dan@codesourcery.com>
14803
14804 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14805 (usr_store_inferior_registers): Likewise.
14806 (regsets_store_inferior_registers): Likewise.
14807
148082008-07-31 Rolf Jansen <rj@surtec.com>
14809 Pedro Alves <pedro@codesourcery.com>
14810
14811 * configure.ac: Check for memmem declaration.
14812 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14813 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14814 (disable_packet_qfThreadInfo): Unconditionally compile.
14815 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14816 * configure, config.in: Regenerate.
14817
148182008-07-28 Doug Kwan <dougkwan@google.com>
14819
14820 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14821 (linux_write_memory): Remove declaration of errno.
14822
148232008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14824
14825 * linux-low.c (handle_extended_wait): Do not use "status"
14826 variable uninitialized.
14827
148282008-07-07 Pedro Alves <pedro@codesourcery.com>
14829
14830 * server.c (handle_v_attach): Inhibit reporting dll changes.
14831
148322008-06-27 Pedro Alves <pedro@codesourcery.com>
14833
14834 * remote-utils.c (prepare_resume_reply): If requested, don't
14835 output "thread:TID" in the T stop reply.
14836
14837 * server.c (disable_packet_vCont, disable_packet_Tthread)
14838 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14839 (handle_query): If requested, disable support for qC, qfThreadInfo
14840 and qsThreadInfo.
14841 (handle_v_requests): If requested, disable support for vCont.
14842 (gdbserver_show_disableable): New.
14843 (main): Handle --disable-packet and --disable-packet=LIST.
14844
14845 * server.h (disable_packet_vCont, disable_packet_Tthread)
14846 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14847
148482008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14849
14850 * server.c (gdbserver_usage): Mention --version.
14851
148522008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14853
14854 * Makefile.in (gdbreplay.o): New rule.
14855
148562008-06-06 Joseph Myers <joseph@codesourcery.com>
14857
14858 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14859 message, not gdbserver.
14860
148612008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14862 Nathan Sidwell <nathan@codesourcery.com>
14863 Joseph Myers <joseph@codesourcery.com>
14864
14865 * acinclude.m4: Include ../../config/acx.m4.
14866 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14867 * configure, config.in: Regenerate.
14868 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14869 * server.c (gdbserver_version): Print PKGVERSION.
14870 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14871 (main): Adjust gdbserver_usage calls.
14872 * gdbreplay.c (version, host_name): Add declarations.
14873 (gdbreplay_version, gdbreplay_usage): New.
14874 (main): Accept --version and --help options.
14875
148762008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14877
14878 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14879 (arm_breakpoint_at): Handle Thumb.
14880 (the_low_target): Add comment.
14881
148822008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14883
14884 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14885
148862008-05-09 Doug Evans <dje@google.com>
14887
14888 * server.h (decode_search_memory_packet): Declare.
14889 * remote-utils.c (decode_search_memory_packet): New fn.
14890 * server.c (handle_search_memory_1): New fn.
14891 (handle_search_memory): New fn.
14892 (handle_query): Process qSearch:memory packets.
14893
148942008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14895
14896 * regcache.c (registers_length): Remove.
14897 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14898 full register packet.
14899 * regcache.h (registers_length): Remove prototype.
14900 * server.h (PBUFSIZ): Define to 16384.
14901
149022008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14903
14904 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14905 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14906 powerpc-64l.o, and powerpc-altivec64l.o.
14907 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14908 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14909 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14910 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14911 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14912 to srv_xmlfiles.
14913
14914 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14915 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14916 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14917 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14918 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14919 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14920 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14921 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14922 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14923 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14924 (clean): Update.
14925
14926 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14927 (init_registers_powerpc_32l): ... this new prototype.
14928 (init_registers_powerpc_32): Remove, replace by ...
14929 (init_registers_powerpc_altivec32l): ... this new prototype.
14930 (init_registers_powerpc_e500): Remove, replace by ...
14931 (init_registers_powerpc_e500l): ... this new prototype.
14932 (init_registers_ppc64): Remove, replace by ...
14933 (init_registers_powerpc_64l): ... this new prototype.
14934 (init_registers_powerpc_64): Remove, replace by ...
14935 (init_registers_powerpc_altivec64l): ... this new prototype.
14936 (ppc_num_regs): Set to 73.
14937 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14938 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14939 (ppc_cannot_store_register): Handle orig_r3 and trap.
14940 (ppc_arch_setup): Update init_registers_... calls.
14941 (ppc_fill_gregset): Handle orig_r3 and trap.
14942
14943 * inferiors.c (clear_inferiors): Reset current_inferior.
14944
149452008-04-23 Paolo Bonzini <bonzini@gnu.org>
14946
14947 * acinclude.m4: Add override.m4.
14948 * configure: Regenerate.
14949
149502008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14951
14952 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14953 initial call to init_register_ppc64.
14954
149552008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14956
14957 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14958 single powerpc*-*-linux* case.
14959 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14960
149612008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14962
14963 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14964 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14965 from reg_xmlfiles.
14966 * linux-ppc-low.c: Include <elf.h>.
14967 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14968 (ppc_hwcap): New global variable.
14969 (ppc_regmap): Remove __SPE__ #ifdef sections.
14970 (ppc_regmap_e500): New global variable.
14971 (ppc_cannot_store_register): Update __SPE__ special case.
14972 (ppc_get_hwcap): New function.
14973 (ppc_arch_setup): Use it to determine whether inferior supports
14974 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14975 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14976 Do not access registers if target does not support AltiVec.
14977 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14978 Do not access registers if target does not support SPE.
14979 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14980
149812008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14982
14983 * linux-low.c (disabled_regsets, num_regsets): New.
14984 (use_regsets_p): Delete.
14985 (linux_wait_for_process): Clear disabled_regsets.
14986 (regsets_fetch_inferior_registers): Check and set it.
14987 (regsets_store_inferior_registers): Likewise.
14988 (linux_fetch_registers, linux_store_registers): Do not use
14989 use_regsets_p.
14990 (initialize_low): Allocate disabled_regsets.
14991
149922008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14993
14994 * Makefile.in (LIBOBJS): New.
14995 (OBS): Use LIBOBJS.
14996 (memmem.o): New rule.
14997 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14998 * configure: Regenerated.
14999
150002008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
15001
15002 * server.c (handle_query): Never return "unsupported" for
15003 qXfer:features:read queries.
15004
150052008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
15006
15007 * server.c (get_features_xml): Fix inverted condition.
15008 (handle_query): Always support qXfer:feature:read.
15009
150102008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
15011
15012 * server.c (wrapper_argv): New.
15013 (start_inferior): Handle wrapper_argv. If set, expect an extra
15014 trap.
15015 (gdbserver_usage): Document --wrapper.
15016 (main): Parse --wrapper.
15017
150182008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15019
15020 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
15021 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
15022 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
15023 (ppc_set_pc): Likewise.
15024 (ppc_arch_setup): New function.
15025 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
15026 of collect_register.
15027 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
15028
150292008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15030
15031 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
15032 instead of linux-ppc64-low.o.
15033 * linux-ppc64-low.c: Remove file.
15034 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
15035 (linux-ppc64-low.o): Remove rule.
15036
15037 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
15038 (init_registers_powerpc_64): Likewise.
15039 (ppc_regmap): Conditionally define depending on __powerpc64__.
15040 (ppc_cannot_store_register): Do not special-case "fpscr" when
15041 compiled on __powerpc64__.
15042 (ppc_collect_ptrace_register): New function.
15043 (ppc_supply_ptrace_register): New function.
15044 (ppc_breakpoint): Change type to "unsigned int".
15045 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
15046 (the_low_target): Conditionally provide initializers for the
15047 arch_setup member depending on __powerpc64__. Install
15048 collect_ptrace_register and supply_ptrace_register members.
15049
150502008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
15051
15052 * regcache.h (gdbserver_xmltarget): Add extern declaration.
15053 * server.c (gdbserver_xmltarget): Define.
15054 (get_features_xml): Use it to replace "target.xml" and arch_string.
15055
15056 * configure.srv: Remove srv_xmltarget. Add XML files that were
15057 mentioned there to srv_xmlfiles instead. Remove conditional tests
15058 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
15059 srv_xmlfiles and srv_regobj to include all possible choices.
15060 * configure.ac (srv_xmltarget): Remove.
15061 (srv_xmlfiles): Do not add "target.xml".
15062 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
15063 checks for supplementary target information.
15064 * configure: Regenerate.
15065 * Makefile.in (XML_TARGET): Remove.
15066 (target.xml): Remove rule.
15067 (clean): Do not clean up target.xml.
15068 (.PRECIOUS): Do not mention target.xml.
15069
15070 * target.h (struct target_ops): Remove arch_string member.
15071 * linux-low.c (linux_arch_string): Remove.
15072 (linux_target_ops): Remove arch_string initializer.
15073 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15074 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15075 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15076 * spu-low.c (spu_arch_string): Remove.
15077 (spu_target_ops): Remove arch_string initializer.
15078 * win32-low.c (win32_arch_string): Remove.
15079 (win32_target_ops): Remove arch_string initializer.
15080 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15081 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15082 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15083
150842008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15085
15086 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15087 by collect_ptrace_register and supply_ptrace_register hooks.
15088 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15089 instead of checking for the_low_target.left_pad_xfer.
15090 (usr_store_inferior_registers): Use collect_ptrace_register callback
15091 instead of checking for the_low_target.left_pad_xfer.
15092
15093 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15094 (s390_supply_ptrace_register): Likewise.
15095 (s390_fill_gregset): Call s390_collect_ptrace_register.
15096 (the_low_target): Update.
15097
15098 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15099 (ppc_supply_ptrace_register): Likewise.
15100 (the_low_target): Update.
15101
15102 * linux-i386-low.c (the_low_target): Update.
15103 * linux-x86-64-low.c (the_low_target): Update.
15104
151052008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15106
15107 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15108 reg-s390.o and reg-s390x.o.
15109
15110 * linux-low.c (new_inferior): New global variable.
15111 (linux_create_inferior, linux_attach): Set it.
15112 (linux_wait_for_process): Call the_low_target.arch_setup after the
15113 target has stopped for the first time.
15114 (initialize_low): Do not call the_low_target.arch_setup.
15115
15116 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15117 (s390_set_pc): Likewise.
15118 (s390_arch_setup): New function.
15119 (the_low_target): Use s390_arch_setup as arch_setup routine.
15120
15121 * regcache.c (realloc_register_cache): New function.
15122 (set_register_cache): Call it for each existing regcache.
15123
151242008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15125
15126 * server.h (init_registers): Remove prototype.
15127
15128 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15129 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15130 instead of init_registers ().
15131 * linux-arm-low.c (init_registers_arm): Add prototype.
15132 (init_registers_arm_with_iwmmxt): Likewise.
15133 (the_low_target): Add initializer for arch_setup field.
15134 * linux-cris-low.c (init_registers_cris): Add prototype.
15135 (the_low_target): Add initializer for arch_setup field.
15136 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15137 (the_low_target): Add initializer for arch_setup field.
15138 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15139 (the_low_target): Add initializer for arch_setup field.
15140 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15141 (the_low_target): Add initializer for arch_setup field.
15142 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15143 (the_low_target): Add initializer for arch_setup field.
15144 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15145 (the_low_target): Add initializer for arch_setup field.
15146 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15147 (init_registers_mips64_linux): Likewise.
15148 (the_low_target): Add initializer for arch_setup field.
15149 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15150 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15151 (the_low_target): Add initializer for arch_setup field.
15152 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15153 (init_registers_powerpc_64): Likewise.
15154 (the_low_target): Add initializer for arch_setup field.
15155 * linux-s390-low.c (init_registers_s390): Add prototype.
15156 (init_registers_s390x): Likewise.
15157 (the_low_target): Add initializer for arch_setup field.
15158 * linux-sh-low.c (init_registers_sh): Add prototype.
15159 (the_low_target): Add initializer for arch_setup field.
15160 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15161 (the_low_target): Add initializer for arch_setup field.
15162 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15163 (the_low_target): Add initializer for arch_setup field.
15164
15165 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15166 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15167 instead of init_registers ().
15168 * win32-arm-low.c (init_registers_arm): Add prototype.
15169 (the_low_target): Add initializer for arch_setup field.
15170 * win32-i386-low.c (init_registers_i386): Add prototype.
15171 (the_low_target): Add initializer for arch_setup field.
15172
15173 * spu-low.c (init_registers_spu): Add prototype.
15174 (initialize_low): Call initialie_registers_spu () instead of
15175 initialize_registers ().
15176
151772008-02-19 Pedro Alves <pedro@codesourcery.com>
15178
15179 * server.c (handle_v_requests): When handling the vRun and vAttach
15180 packets, if already debugging a process, don't kill it. Return an
15181 error instead.
15182
151832008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15184
15185 * server.c (handle_query): Correct length check.
15186
151872008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15188
15189 * win32-low.c (do_initial_child_stuff): Add process handle
15190 parameter. Set current_process_handle and current_process_id from the
15191 parameters. Clear globals.
15192 (win32_create_inferior): Don't set current_process_handle and
15193 current_process_id here. Instead pass them on the call to
15194 do_initial_child_stuff.
15195 (win32_attach): Likewise.
15196 (win32_clear_inferiors): New.
15197 (win32_kill): Don't close the current process handle or the
15198 current thread handle here. Instead call win32_clear_inferiors.
15199 (win32_detach): Don't open a new handle to the process. Call
15200 win32_clear_inferiors.
15201 (win32_join): Don't rely on current_process_handle; open a new
15202 handle using the process id.
15203 (win32_wait): Call win32_clear_inferiors when the inferior process
15204 has exited.
15205
152062008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15207
15208 * server.c (monitor_show_help): Add "exit".
15209
152102008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15211
15212 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15213 (clean): Add reg-xtensa.c.
15214 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15215 * configure.srv (xtensa*-*-linux*) New target.
15216 * linux-xtensa-low.c: New.
15217 * xtensa-xtregs.c: New.
15218
152192008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15220
15221 * hostio.c: Don't include errno.h.
15222 (errno_to_fileio_errno): Move to hostio-errno.
15223 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15224 error number outputting to the target->hostio_last_error callback.
15225 (hostio_packet_error): Use FILEIO_EINVAL directly.
15226 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15227 calls to hostio_error.
15228 * hostio-errno.c: New.
15229 * server.h (hostio_last_error_from_errno): Declare.
15230 * target.h (target_ops): Add hostio_last_error member.
15231 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15232 as hostio_last_error handler.
15233 * spu-low.c (spu_target_ops): Likewise.
15234 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15235 (wince_hostio_last_error): New functions.
15236 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15237 as hostio_last_error handler.
15238 (win32_target_ops) [!_WIN32_WCE]: Register
15239 hostio_last_error_from_errno as hostio_last_error handler.
15240 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15241 (hostio-errno.o): New rule.
15242 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15243 * configure.srv (srv_hostio_err_objs): New variable. Default to
15244 hostio-errno.o.
15245 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15246 * configure: Regenerate.
15247
152482008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15249
15250 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15251 (linux_kill, linux_detach): Clean up the process list.
15252 * remote-utils.c (remote_open): Improve port number parsing.
15253 (putpkt_binary, input_interrupt): Only send interrupts if the target
15254 is running.
15255 * server.c (extended_protocol): Make static.
15256 (attached): Define earlier.
15257 (exit_requested, response_needed, program_argv): New variables.
15258 (target_running): New.
15259 (start_inferior): Clear attached here.
15260 (attach_inferior): Set attached here.
15261 (require_running): Define.
15262 (handle_query): Use require_running and target_running. Implement
15263 "monitor exit".
15264 (handle_v_attach, handle_v_run): New.
15265 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15266 (gdbserver_usage): Update.
15267 (main): Redo argument parsing. Handle --debug and --multi. Handle
15268 --attach along with other options or after the port. Save
15269 program_argv. Support no initial program. Resynchronize
15270 communication with GDB after an error. Handle "monitor exit".
15271 Use require_running and target_running. Always allow the extended
15272 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15273 restart in extended mode.
15274 * README: Refer to the GDB manual. Update --attach usage.
15275
152762007-12-20 Andreas Schwab <schwab@suse.de>
15277
15278 * linux-low.c (STACK_SIZE): Define.
15279 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15280 (linux_test_for_tracefork): Likewise.
15281
152822007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15283
15284 * linux-low.c (linux_wait_for_event): Update messages. Do not
15285 reinsert auto-delete breakpoints.
15286 * mem-break.c (struct breakpoint): Change return type of handler to
15287 int.
15288 (set_breakpoint_at): Update handler type.
15289 (reinsert_breakpoint_handler): Return 1 instead of calling
15290 delete_breakpoint.
15291 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15292 setting a new one.
15293 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15294 * mem-break.h (set_breakpoint_at): Update handler type.
15295 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15296 * win32-low.c (auto_delete_breakpoint): New.
15297 (get_child_debug_event): Use it.
15298
152992007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15300
15301 * configure.ac: Check for pread and pwrite.
15302 * hostio.c (handle_pread): Fall back to lseek and read.
15303 (handle_pwrite): Fall back to lseek and write.
15304 * config.in, configure: Regenerated.
15305
153062007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15307
15308 * server.c (myresume): Add own_buf argument.
15309 (main): Update calls.
15310
153112007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15312
15313 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15314 * remote-utils.c (remote_open): Do not call disable_async_io.
15315 (block_async_io): Delete.
15316 (unblock_async_io): Make static.
15317 (initialize_async_io): New.
15318 * server.c (handle_v_cont): Handle async I/O here.
15319 (myresume): Likewise. Move other common resume tasks here...
15320 (main): ... from here. Call initialize_async_io. Disable async
15321 I/O before the main loop.
15322 * server.h (initialize_async_io): Declare.
15323 (block_async_io, unblock_async_io): Delete prototypes.
15324 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15325
153262007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15327
15328 * remote-utils.c (readchar): Allow binary data in received messages.
15329
153302007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15331
15332 * win32-low.c (attaching): New global.
15333 (win32_create_inferior): Clear the `attaching' global.
15334 (win32_attach): Set the `attaching' global.
15335 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15336 attaching. Only set a breakpoint at the entry point if not
15337 attaching.
15338
153392007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15340
15341 * server.c (main): Don't report dll events on the initial
15342 connection on attaches.
15343
153442007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15345
15346 * server.c (main): Relax numerical bases supported for the pid of
15347 the --attach command line argument.
15348
153492007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15350
15351 * win32-low.c (win32_attach): Call OpenProcess before
15352 DebugActiveProcess, not after. Add last error output to error
15353 call.
15354
153552007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15356
15357 * win32-low.c (win32_get_thread_context)
15358 (win32_set_thread_context): New functions.
15359 (thread_rec): Use win32_get_thread_context.
15360 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15361 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15362 field.
15363
153642007-12-03 Leo Zayas
15365 Pedro Alves <pedro_alves@portugalmail.pt>
15366
15367 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15368 global variables.
15369 (child_add_thread): Minor cleanup.
15370 (child_continue): Resume artificially suspended threads before
15371 calling ContinueDebugEvent.
15372 (suspend_one_thread): New.
15373 (fake_breakpoint_event): New.
15374 (get_child_debug_event): Change return type to int. Check here if
15375 gdb sent an interrupt request. If a soft interrupt was requested,
15376 fake a breakpoint event. Return 0 if there is no event to handle,
15377 and 1 otherwise.
15378 (win32_wait): Don't check here if gdb sent an interrupt request.
15379 Ensure there is a valid event to handle.
15380 (win32_request_interrupt): Add soft interruption method as last
15381 resort.
15382
153832007-12-03 Leo Zayas
15384 Pedro Alves <pedro_alves@portugalmail.pt>
15385
15386 * win32-low.h (win32_thread_info): Add descriptions to the
15387 structure members. Replace `suspend_count' counter by a
15388 `suspended' flag.
15389 * win32-low.c (thread_rec): Update condition of when to get the
15390 context from the inferior. Rely on ContextFlags being set if it
15391 has already been retrieved. Only suspend the inferior thread if
15392 we haven't already. Warn if that fails.
15393 (continue_one_thread): s/suspend_count/suspended/. Only call
15394 ResumeThread once. Warn if that fails.
15395
153962007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15397
15398 * win32-low.c (win32_wait): Don't read from the inferior when it
15399 has already exited.
15400
154012007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15402
15403 * Makefile.in (win32_low_h): New variable.
15404 (win32-low.o): Add dependency on $(win32_low_h).
15405 (win32-arm-low.o, win32-i386-low.o): New rules.
15406
154072007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15408
15409 * hostio.c: Correct copyright year.
15410
154112007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15412
15413 * Makefile.in (OBS): Add hostio.o.
15414 (hostio.o): New rule.
15415 * server.h (handle_vFile): Declare.
15416 * hostio.c: New file.
15417 * server.c (handle_v_requests): Take packet_len and new_packet_len
15418 for binary packets. Call handle_vFile.
15419 (main): Update call to handle_v_requests.
15420
154212007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15422
15423 * linux-low.c: Include <sched.h>.
15424
154252007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15426
15427 * linux-low.c (linux_tracefork_grandchild): New.
15428 (linux_tracefork_child): Use clone.
15429 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15430
154312007-10-31 Joel Brobecker <brobecker@adacore.com>
15432
15433 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15434
154352007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15436
15437 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15438
154392007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15440
15441 * inferiors.c (change_inferior_id): Delete.
15442 (add_pid_to_list, pull_pid_from_list): New.
15443 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15444 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15445 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15446 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15447 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15448 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15449 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15450 (using_threads): Always set to 1.
15451 (handle_extended_wait): New.
15452 (add_process): Do not set TID.
15453 (linux_create_inferior): Set must_set_ptrace_flags.
15454 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15455 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15456 (linux_thread_alive): Rename TID argument to LWPID.
15457 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15458 (linux_wait_for_event): Do not use TID or check using_threads. Update
15459 call to dead_thread_notify. Call handle_extended_wait.
15460 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15461 (send_sigstop): Delete sigstop_sent.
15462 (wait_for_sigstop): Avoid TID.
15463 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15464 (linux_test_for_tracefork): New.
15465 (linux_lookup_signals): Use thread_db_active and
15466 linux_supports_tracefork_flag.
15467 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15468 * linux-low.h (get_process_thread): Avoid TID.
15469 (struct process_ifo): Move thread_known and tid to the end. Remove
15470 sigstop_sent.
15471 (linux_attach_lwp, thread_db_init): Update prototypes.
15472 * server.h (change_inferior_id): Delete prototype.
15473 (add_pid_to_list, pull_pid_from_list): New prototypes.
15474 * thread-db.c (thread_db_use_events): New.
15475 (find_first_thread): Rename to...
15476 (find_one_thread): ...this. Update callers and messages. Do not
15477 call fatal. Check thread_db_use_events. Do not call
15478 change_inferior_id or new_thread_notify.
15479 (maybe_attach_thread): Update. Do not call new_thread_notify.
15480 (thread_db_init): Set thread_db_use_events. Check use_events.
15481 * utils.c (fatal, warning): Correct message prefix.
15482
154832007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15484
15485 * Makefile.in (clean): Remove new files.
15486 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15487 (powerpc-64.o, powerpc-64.c): New rules.
15488 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15489 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15490 with SPE.
15491 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15492 SPE targets.
15493 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15494 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15495 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15496 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15497 (target_regsets): Add AltiVec and SPE register sets.
15498 * configure.ac: Check for AltiVec and SPE.
15499 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15500 (ppc_fill_vrregset, ppc_store_vrregset): New.
15501 (target_regsets): Add AltiVec register set.
15502 * configure: Regenerated.
15503
155042007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15505
15506 * linux-low.c (O_LARGEFILE): Define.
15507 (linux_read_memory): Use /proc/PID/mem.
15508 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15509 * configure, config.in: Regenerated.
15510
155112007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15512
15513 * linux-low.c (linux_wait_for_event): Do not pass signals while
15514 single-stepping.
15515
155162007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15517
15518 * win32-low.c (create_process): New.
15519 (win32_create_inferior): Use create_process instead of
15520 CreateProcess. If create_process failed retry appending an ".exe"
15521 suffix. Store the GetLastError result immediatelly after
15522 create_process calls and use it on the call to error.
15523
155242007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15525
15526 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15527
155282007-08-23 Joel Brobecker <brobecker@adacore.com>
15529
15530 * configure.ac: Switch license to GPLv3.
15531
155322007-08-01 Michael Snyder <msnyder@access-company.com>
15533
15534 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15535
155362007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15537
15538 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15539 typedef.
15540 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15541 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15542 CloseToolhelp32Snapshot.
15543 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15544 CloseToolhelp32Snapshot.
15545
155462007-07-27 Michael Snyder <michael.snyder@access-company.com>
15547
15548 * server.c (main): Check for inferior exit before main loop.
15549
155502007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15551
15552 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15553 instead of on tmp_desc.
15554
155552007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15556 Daniel Jacobowitz <dan@codesourcery.com>
15557
15558 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15559 (add_thread): Minor cleanups.
15560 (clear_inferiors): Move lower in the file. Clear the DLL
15561 list.
15562 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15563 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15564 (xml_escape_text): New.
15565 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15566 for qSupported.
15567 (handle_v_cont): Report errors.
15568 (gdbserver_version): Update.
15569 (main): Correct size of own_buf. Do not report initial DLL events.
15570 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15571 (unloaded_dll, xml_escape_text): New.
15572 * win32-low.c (enum target_waitkind): Update comments.
15573 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15574 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15575 (win32_EnumProcessModules, win32_GetModuleInformation)
15576 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15577 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15578 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15579 (win32_Module32First, win32_Module32Next, load_toolhelp)
15580 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15581 (get_child_debug_event): Handle DLL events.
15582 (win32_wait): Likewise.
15583
155842007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15585
15586 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15587 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15588
155892007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15590
15591 * win32-low.c (handle_output_debug_string): Ignore event if not
15592 waiting.
15593
155942007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15595
15596 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15597
155982007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15599
15600 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15601
156022007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15603
15604 * inferiors.c (change_inferior_id): Add comment.
15605 * linux-low.c (check_removed_breakpoint): Add an early
15606 prototype. Improve debug output.
15607 (linux_attach): Doc update.
15608 (linux_detach_one_process, linux_detach): Clean up before releasing
15609 each process.
15610 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15611 * linux-low.h (struct process_info): Doc improvement.
15612 * mem-break.c (delete_all_breakpoints): New.
15613 * mem-break.h (delete_all_breakpoints): New prototype.
15614 * thread-db.c (find_first_thread): New.
15615 (thread_db_create_event): Call it instead of
15616 thread_db_find_new_threads. Clean up unused variables.
15617 (maybe_attach_thread): Remove first thread handling.
15618 (thread_db_find_new_threads): Use find_first_thread.
15619 (thread_db_get_tls_address): Likewise.
15620
156212007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15622
15623 * thread-db.c (thread_db_find_new_threads): Add prototype.
15624 (thread_db_create_event): Check for the main thread before adding
15625 a new thread.
15626 (maybe_attach_thread): Only enable event reporting if TID == 0.
15627 (thread_db_get_tls_address): Check for new threads.
15628
156292007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15630
15631 * linux-low.c (linux_create_inferior): Try execv before execvp.
15632 * spu-low.c (spu_create_inferior): Likewise.
15633
156342007-06-13 Mike Frysinger <vapier@gentoo.org>
15635
15636 * linux-low.c (linux_create_inferior): Change execv to execvp.
15637 * spu-low.c (spu_create_inferior): Likewies.
15638
156392007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15640
15641 * Makefile.in (clean): Clean new files instead of deleted ones.
15642 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15643 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15644 rules.
15645 * configure.srv: Specify XML files and new regformats for MIPS and
15646 MIPS64 GNU/Linux.
15647 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15648 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15649 an entry for the restart register.
15650 (mips_cannot_fetch_register, mips_cannot_store_register)
15651 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15652 register names to match the XML descriptions.
15653 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15654 restart register instead of $0.
15655
156562007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15657 Markus Deuling <deuling@de.ibm.com>
15658
15659 * remote-utils.c (decode_xfer_write): New function.
15660 * server.h (decode_xfer_write): Add prototype.
15661 * server.c (handle_query): Add PACKET_LEN argument. Support
15662 qXfer:spu:read and qXfer:spu:write packets.
15663 (main): Pass packet_len to handle_query.
15664 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15665 * target.h (target_ops): Add qxfer_spu.
15666
156672007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15668
15669 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15670 accessing non-seekable spufs files.
15671
156722007-05-16 Markus Deuling <deuling@de.ibm.com>
15673
15674 * server.c (handle_query): Add reply for qC packet.
15675
156762007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15677 Leo Zayas <lerele@champenstudios@com>
15678
15679 * server.h (check_remote_input_interrupt_request): New function.
15680 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15681 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15682 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15683 (check_remote_input_interrupt_request): New function.
15684 * server.h (check_remote_input_interrupt_request): Declare.
15685 * win32-low.c (winapi_DebugBreakProcess,
15686 winapi_GenerateConsoleCtrlEvent): New typedefs.
15687 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15688 to 250 ms.
15689 (win32_wait): Check for remote interrupt request
15690 with check_remote_input_interrupt_request.
15691 (win32_request_interrupt): New function.
15692 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15693
156942007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15695
15696 * win32-low.c (debug_registers_changed,
15697 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15698 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15699 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15700 (thread_rec): Get context using the low target.
15701 (child_add_thread): Call thread_added on the low target,
15702 which does the same thing.
15703 (regptr): Delete.
15704 (do_initial_child_stuff): Remove debug registers references.
15705 Set context using the low target. Resume threads after
15706 setting the contexts.
15707 (child_continue): Remove dead variable. Remove debug
15708 registers references.
15709 (child_fetch_inferior_registers): Go through the low target.
15710 (do_child_store_inferior_registers): Remove.
15711 (child_store_inferior_registers): Go through the low target.
15712 (win32_resume): Remove debug registers references.
15713 Set context using the low target.
15714 (handle_exception): Change return type to void. Don't record
15715 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15716 first chance exception.
15717 (get_child_debug_event): Change return type to void. Remove
15718 goto loop. Always return after waiting for debug event.
15719 (win32_wait): Convert to switch statement. Handle spurious
15720 events.
15721
15722 * win32-i386-low.c (debug_registers_changed,
15723 debug_registers_used): New.
15724 (initial_stuff): Rename to ...
15725 (i386_initial_stuff): ... this. Clear debug registers
15726 state variables.
15727 (store_debug_registers): Delete.
15728 (i386_get_thread_context): New.
15729 (load_debug_registers): Delete.
15730 (i386_set_thread_context): New.
15731 (i386_thread_added): New.
15732 (single_step): Rename to ...
15733 (i386_single_step): ... this.
15734 (do_fetch_inferior_registers): Rename to ...
15735 (i386_fetch_inferior_register): ... this.
15736 (i386_store_inferior_register): New.
15737 (the_low_target): Adapt to new interface.
15738
15739 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15740 (arm_get_thread_context): New.
15741 (arm_set_thread_context): New.
15742 (regptr): New.
15743 (do_fetch_inferior_registers): Rename to ...
15744 (arm_fetch_inferior_register): ... this.
15745 (arm_store_inferior_register): New.
15746 (arm_wince_breakpoint): Reimplement as unsigned long.
15747 (arm_wince_breakpoint_len): Define.
15748 (the_low_target): Adapt to new interface.
15749
15750 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15751 load_debug_registers. Add get_thread_context, set_thread_context,
15752 thread_added and store_inferior_register. Rename
15753 fetch_inferior_registers to fetch_inferior_register.
15754 (regptr): Remove declaration.
15755
157562007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15757
15758 * linux-low.c (linux_detach): Change return type to int. Return 0.
15759 * spu-low.c (spu_detach): Likewise.
15760
157612007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15762
15763 * target.h (target_ops): Change return type of detach to int.
15764 Add join.
15765 (join_inferior): New.
15766 * server.c (main): Don't skip detach support on mingw32.
15767 If the inferior doesn't support detaching return error.
15768 Call join_inferior instead of using waitpid.
15769 * linux-low.c (linux_join): New.
15770 (linux_target_op): Add linux_join.
15771 * spu-low.c (spu_join): New.
15772 (spu_target_ops): Add spu_join.
15773 * win32-low.c (win32_detach): Adapt to new interface.
15774 Reopen current_process_handle before detaching. Issue a child
15775 resume before detaching.
15776 (win32_join): New.
15777 (win32_target_op): Add win32_join.
15778
157792007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15780
15781 * win32-low.c (win32-attach): Fix return value.
15782 * target.h (target_ops): Describe ATTACH return values.
15783
157842007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15785
15786 * win32-low.c (GETPROCADDRESS): Define.
15787 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15788 (winapi_DebugSetProcessKillOnExit): Likewise.
15789 (win32_create_inferior): Force usage of ansi CreateProcessA.
15790 (win32_attach): Use GETPROCADDRESS.
15791 (win32_detach): Likewise.
15792
157932007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15794
15795 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15796
157972007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15798
15799 * win32-low.c: Commit leftover changes from 2007-03-29.
15800
158012007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15802
15803 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15804 fields short instead of int. Add explicit padding.
15805 (i387_cache_to_fsave): Remove unnecessary casts.
15806 (i387_fsave_to_cache): Doc fix.
15807 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15808
158092007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15810
15811 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15812 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15813
158142007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15815
15816 * configure.srv (arm*-*-mingw32ce*): Move near the other
15817 arm targets.
15818
158192007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15820
15821 * configure.ac: Add errno checking.
15822 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15823 sys/file.h and malloc.h.
15824 (AC_CHECK_DECLS): Add perror.
15825 (srv_mingwce): Handle.
15826 * configure.srv (i[34567]86-*-cygwin*): Add
15827 win32-i386-low.o to srv_tgtobj.
15828 (i[34567]86-*-mingw*): Likewise.
15829 (arm*-*-mingw32ce*): Add case.
15830 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15831 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15832 [__MINGW32CE__] (strerror): New function.
15833 [__MINGW32CE__] (errno): Define to GetLastError.
15834 [__MINGW32CE__] (COUNTOF): New macro.
15835 (remote_open): Remove extra close call.
15836 * mem-break.c (delete_breakpoint_at): New function.
15837 * mem-break.h (delete_breakpoint_at): Declare.
15838 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15839 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15840 [USE_WIN32API] (read, write): Add char* casts.
15841 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15842 * server.h: Include wincecompat.h on Windows CE.
15843 [HAVE_ERRNO_H]: Check.
15844 (perror): Declare if not declared.
15845 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15846 (perror_with_name): Remove errno declaration.
15847 * wincecompat.h: New.
15848 * wincecompat.c: New.
15849 * win32-low.h: New.
15850 * win32-arm-low.c: New.
15851 * win32-i386-low.c: New.
15852 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15853 (OUTMSG2): Make it safe.
15854 (_T): New macro.
15855 (COUNTOF): New macro.
15856 (NUM_REGS): Get it from the low target.
15857 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15858 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15859 (thread_rec): Let low target handle debug registers.
15860 (child_add_thread): Likewise.
15861 (child_init_thread_list): Likewise.
15862 (continue_one_thread): Likewise.
15863 (regptr): New.
15864 (do_child_fetch_inferior_registers): Move to ...
15865 * win32-i386-low.c: ... here, and rename to ...
15866 (do_fetch_inferior_registers): ... this.
15867 * win32-low.c (child_fetch_inferior_registers):
15868 Go through the low target.
15869 (do_child_store_inferior_registers): Use regptr.
15870 (strwinerror): New function.
15871 (win32_create_inferior): Handle Windows CE.
15872 Use strwinerror instead of strerror on Windows error
15873 codes. Add program to the error output.
15874 Don't close the main thread handle on Windows CE.
15875 (win32_attach): Use coredll.dll on Windows CE.
15876 (win32_kill): Close current process and current
15877 thread handles.
15878 (win32_detach): Use coredll.dll on Windows CE.
15879 (win32_resume): Let low target handle debug registers, and
15880 step request.
15881 (handle_exception): Add/Remove initial breakpoint. Avoid
15882 non-existant WSTOPSIG on Windows CE.
15883 (win32_read_inferior_memory): Cast to remove warning.
15884 (win32_arch_string): Go through the low target.
15885 (initialize_low): Call set_breakpoint_data with the low
15886 target's breakpoint.
15887 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15888 FOP_REGNUM, mappings): Move to ...
15889 * win32-i386-low.c: ... here.
15890 * win32-low.c (win32_thread_info): Move to ...
15891 * win32-low.h: ... here.
15892 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15893 win32-arm-low.c and wincecompat.c.
15894 (all:): Add $EXEEXT.
15895 (install-only:): Likewise.
15896 (gdbserver:): Likewise.
15897 (gdbreplay:): Likewise.
15898 * config.in: Regenerate.
15899 * configure: Regenerate.
15900
159012007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15902
15903 * win32-low.c: Rename typedef thread_info to
15904 win32_thread_info throughout.
15905
159062007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15907
15908 * win32-i386-low.c: Rename to ...
15909 * win32-low.c: ... this.
15910 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15911 * Makefile.in: Likewise.
15912
159132007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15914
15915 * remote-utils.c (monitor_output): Constify msg parameter.
15916 * server.h (monitor_output): Likewise.
15917 * win32-i386-low.c (handle_output_debug_string): New.
15918 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15919 handle_output_debug_string.
15920 (get_child_debug_event): Likewise.
15921
159222007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15923
15924 * server.c (main): Correct strtoul check.
15925
159262007-03-27 Jon Ringle <jon@ringle.org>
15927
15928 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15929
159302007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15931
15932 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15933
159342007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15935
15936 * terminal.h: Check HAVE_SGTTY_H.
15937
159382007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15939
15940 * remote-utils.c (remote_open): Print out the assigned port number.
15941
159422007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15943
15944 * remote-utils.c (monitor_output): New function.
15945 * server.c (debug_threads): Define here.
15946 (monitor_show_help): New function.
15947 (handle_query): Handle qRcmd.
15948 (main): Do not handle 'd' packet.
15949 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15950 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15951 of debug_threads.
15952
159532007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15954
15955 * Makefile.in (EXEEXT): New.
15956 (clean): Use $(EXEEXT).
15957
159582007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15959
15960 * target.h (target_ops): Rename send_signal to request_interrupt,
15961 and remove enum target_signal parameter.
15962 * linux-low.c (linux_request_interrupt): Rename from
15963 linux_send_signal, and always send SIGINT.
15964 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15965 and always send SIGINT.
15966 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15967 of send_signal.
15968 (input_interrupt): Likewise.
15969
159702007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15971
15972 * server.c (get_features_xml): Check if target implemented
15973 arch_string.
15974 * win32-i386-low.c (win32_arch_string): New.
15975 (win32_target_ops): Add win32_arch_string as arch_string member.
15976
159772007-02-22 Markus Deuling <deuling@de.ibm.com>
15978
15979 * spu-low.c (spu_arch_string): New.
15980 (spu_target_ops): Add spu_arch_string.
15981
159822007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15983
15984 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15985 * configure.ac: Do not check for terminal.h.
15986 * configure, config.in: Regenerated.
15987
159882007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15989
15990 * Makefile.in (OBS): Add $(XML_BUILTIN).
15991 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15992 (clean): Update.
15993 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15994 (arm-with-iwmmxt.c): New.
15995 * config.in, configure: Regenerate.
15996 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15997 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15998 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15999 (arm*-*-linux*): Add iWMMXt and regset support.
16000 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
16001 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
16002 (arm_store_wmmxregset, target_regsets): New.
16003 * server.c (get_features_xml): Take annex argument. Check builtin
16004 XML documents.
16005 (handle_query): Handle multiple annexes.
16006
160072007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
16008
16009 * remote-utils.c [USE_WIN32API] (read, write): Define.
16010 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
16011 write.
16012
160132007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
16014
16015 * linux-i386-low.c (the_low_target): Set arch_string.
16016 * linux-x86-64-low.c (the_low_target): Likewise.
16017 * linux-low.c (linux_arch_string): New.
16018 (linux_target_ops): Add it.
16019 * linux-low.h (struct linux_target_ops): Add arch_string.
16020 * server.c (write_qxfer_response): Use const void * for DATA.
16021 (get_features_xml): New.
16022 (handle_query): Handle qXfer:features:read. Report it for qSupported.
16023 * target.h (struct target_ops): Add arch_string method.
16024
160252007-01-03 Denis Pilat <denis.pilat@st.com>
16026 Daniel Jacobowitz <dan@codesourcery.com>
16027
16028 * linux-low.c (linux_kill): Handle being called with no threads.
16029 * win32-i386-low.c (win32_kill): Likewise.
16030 (get_child_debug_event): Clear current_process_handle.
16031
160322006-12-30 Denis PILAT <denis.pilat@st.com>
16033 Daniel Jacobowitz <dan@codesourcery.com>
16034
16035 * remote-utils.c (remote_open): Check the type of specified
16036 serial port devices before opening them.
16037 * server.c (main): Kill the inferior if an error occurs during
16038 the first remote_open.
16039
160402006-12-05 Markus Deuling <deuling@de.ibm.com>
16041
16042 * README: Update supported targets.
16043
160442006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
16045
16046 * Makefile.in (clean): Remove reg-mips64.c.
16047 (reg-mips64.c, reg-mips64.o): New rules.
16048 * configure.srv: Handle mips64. Include regset support for mips.
16049 * linux-mips-low.c (union mips_register): New.
16050 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
16051 (mips_breakpoint, mips_breakpoint_at): Use int.
16052 (mips_collect_register, mips_supply_register)
16053 (mips_collect_register_32bit, mips_supply_register_32bit)
16054 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
16055 (mips_store_fpregset, target_regsets): New.
16056 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
16057
160582006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
16059
16060 * configure.srv: Add target "spu*-*-*".
16061 * Makefile.in (clean): Remove reg-spu.c.
16062 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
16063 * spu-low.c: New file.
16064
160652006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16066
16067 * configure.ac: Correct td_thr_tls_get_addr test.
16068 * configure: Regenerated.
16069
160702006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16071
16072 * linux-low.c (linux_wait_for_event): Reformat. Use the
16073 pass_signals array.
16074 * remote-utils.c (decode_address_to_semicolon): New.
16075 * server.c (pass_signals, handle_general_set): New.
16076 (handle_query): Mention QPassSignals for qSupported.
16077 (main): Call handle_general_set.
16078 * server.h (pass_signals, decode_address_to_semicolon): New.
16079
160802006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16081
16082 * server.c (handle_query): Correct error handling for read_auxv.
16083
160842005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16085
16086 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16087 and srv_linux_thread_db to yes.
16088 * linux-s390-low.c (s390_fill_gregset): New function.
16089 (target_regsets): Define data structure.
16090
160912006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16092
16093 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16094 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16095 * config.in, configure: Regenerated.
16096 * inferiors.c (gdb_id_to_thread): New function.
16097 (gdb_id_to_thread_id): Use it.
16098 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16099 * linux-low.h (struct process_info): Add th member.
16100 (thread_db_get_tls_address): New prototype.
16101 * remote-utils.c (decode_address): Make non-static.
16102 * server.c (handle_query): Handle qGetTLSAddr.
16103 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16104 * target.h (struct target_ops): Add get_tls_address.
16105 * thread-db.c (maybe_attach_thread): Save the thread handle.
16106 (thread_db_get_tls_address): New.
16107
161082006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16109
16110 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16111 (linux_resume_one_process): Take a siginfo_t *. Update all
16112 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16113 (struct pending_signals): Add a siginfo_t.
16114 (linux_wait_for_process): Always set last_status.
16115 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16116 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16117 * linux-low.h (struct process_info): Add last_status.
16118
161192006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16120
16121 * remote-utils.c (try_rle): New function.
16122 (putpkt_binary): Use it.
16123
161242006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16125
16126 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16127 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16128 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16129 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16130 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16131 point registers.
16132
161332006-08-08 Richard Sandiford <richard@codesourcery.com>
16134
16135 * server.c (terminal_fd): New variable.
16136 (old_foreground_pgrp): Likewise.
16137 (restore_old_foreground_pgrp): New function.
16138 (start_inferior): Record the terminal file descriptor in terminal_fd
16139 and its original foreground group in old_foreground_pgrp. Register
16140 restore_old_foreground_pgrp with atexit().
16141
161422006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16143
16144 * server.c (handle_query): Correct qPart to qXfer.
16145
161462006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16147
16148 * configure.ac: Check for more headers which are missing on
16149 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16150 * configure.srv: Add Cygwin and mingw32.
16151 * remote-utils.c: Don't include headers unconditionally which
16152 are missing on mingw32. Include <winsock.h> for mingw32.
16153 (remote_open): Adjust for mingw32 support. Flush
16154 standard error after writing to it.
16155 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16156 (unblock_async_io, enable_async_io, disable_async_io)
16157 (readchar, getpkt): Update for Winsock support.
16158 (prepare_resume_reply): Expect a protocol signal number.
16159 * server.c: Disable <sys/wait.h> on mingw32.
16160 (start_inferior): Adjust for mingw32 support. Flush
16161 standard error after writing to it.
16162 (attach_inferior): Likewise. Use protocol signal
16163 numbers.
16164 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16165 and names.
16166 * win32-i386-low.c: New file.
16167 * Makefile.in (XM_CLIBS): Set.
16168 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16169 (win32-i386-low.o): New dependency rule.
16170 * linux-low.c (linux_wait): Use target signal numbers.
16171 * target.h (struct target_ops): Doc fix.
16172 * server.h (target_signal_to_name): New prototype.
16173 * gdbreplay.c: Don't include headers unconditionally which
16174 are missing on mingw32. Include <winsock.h> for mingw32.
16175 (remote_close, remote_open): Adjust for Winsock support.
16176 * configure, config.in: Regenerated.
16177
161782006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16179
16180 * server.c (decode_xfer_read, write_qxfer_response): New.
16181 (handle_query): Take a packet length argument. Handle
16182 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16183 the qSupported response.
16184 (main): Update call to handle_query.
16185
161862006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16187
16188 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16189 (putpkt_binary): Renamed from putpkt and adjusted for binary
16190 data.
16191 (putpkt): New wrapper for putpkt_binary.
16192 (readchar): Don't mask off the high bit.
16193 (decode_X_packet): New function.
16194 * server.c (main): Call putpkt_binary if a handler sets the packet
16195 length. Save the length of the incoming packet. Handle 'X'.
16196 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16197
161982006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16199
16200 * server.c (handle_query): Handle qSupported.
16201
162022006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16203
16204 * remote-utils.c (all_symbols_looked_up): New variable.
16205 (look_up_one_symbol): Check it.
16206 * server.h (look_up_one_symbol): New declaration.
16207 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16208
162092006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16210
16211 * Makefile.in (linux-arm-low.o): Update dependencies.
16212 * linux-arm-low.c: Include "gdb_proc_service.h".
16213 (PTRACE_GET_THREAD_AREA): Define.
16214 (ps_get_thread_area): New function.
16215
162162006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16217
16218 * configure.srv (m68k*-*-uclinux*): New target.
16219 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16220 (linux_resume_one_process): Remove extraneous cast.
16221 (linux_read_offsets): New.
16222 (linux_target_op): Add linux_read_offsets on mmuless systems.
16223 * server.c (handle_query): Add qOffsets logic.
16224 * target.h (struct target_ops): Add read_offsets.
16225
162262006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16227
16228 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16229 (PTRACE_GET_THREAD_AREA): Define.
16230 (ps_get_thread_area): New function.
16231 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16232 (linux-x86-64-low.o): Update.
16233
162342006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16235
16236 * configure.ac: Remove checks for prfpregset_t.
16237 * gdb_proc_service.h: New file.
16238 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16239 new "gdb_proc_service.h".
16240 * proc-service.c: Likewise.
16241 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16242 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16243 * Makefile.in (gdb_proc_service_h): Updated.
16244 * configure, config.in: Regenerated.
16245
162462006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16247
16248 * remote-utils.c (prepare_resume_reply): Move declaration
16249 of gdb_id_from_wait to the top of the block.
16250
162512006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16252
16253 * linux-low.c (regsets_store_inferior_registers): Read the regset
16254 from the target before filling it.
16255
162562006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16257
16258 * server.c (attach_inferior): Return SIGTRAP for a successful
16259 attach.
16260
162612006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16262
16263 * Makefile.in (OBS): Add version.o.
16264 (STAGESTUFF): Delete.
16265 (version.o): Add dependencies.
16266 (version.c): Replace rule.
16267 (clean): Remove version.c.
16268 * server.c (gdbserver_version): New.
16269 (gdbserver_usage): Use printf.
16270 (main): Handle --version and --help.
16271 * server.h (version, host_name): Add declarations.
16272
162732005-12-23 Eli Zaretskii <eliz@gnu.org>
16274
16275 * linux-arm-low.c:
16276 * linux-arm-low.c:
16277 * inferiors.c:
16278 * i387-fp.h:
16279 * i387-fp.c:
16280 * gdbreplay.c:
16281 * regcache.c:
16282 * proc-service.c:
16283 * mem-break.h:
16284 * mem-break.c:
16285 * linux-x86-64-low.c:
16286 * linux-sh-low.c:
16287 * linux-s390-low.c:
16288 * linux-ppc64-low.c:
16289 * linux-ppc-low.c:
16290 * linux-mips-low.c:
16291 * linux-m68k-low.c:
16292 * linux-m32r-low.c:
16293 * linux-low.h:
16294 * linux-low.c:
16295 * linux-ia64-low.c:
16296 * linux-i386-low.c:
16297 * linux-crisv32-low.c:
16298 * thread-db.c:
16299 * terminal.h:
16300 * target.h:
16301 * target.c:
16302 * server.h:
16303 * server.c:
16304 * remote-utils.c:
16305 * regcache.h:
16306 * utils.c:
16307 * Makefile.in:
16308 * configure.ac:
16309 * gdbserver.1: Add (C) after Copyright. Update the FSF
16310 address.
16311
163122005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16313
16314 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16315 (arm_breakpoint_at): Recognize both breakpoints.
16316 (the_low_target): Use the correct breakpoint instruction.
16317
163182005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16319
16320 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16321 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16322 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16323 (the_low_target): Update.
16324
163252005-10-25 Andreas Schwab <schwab@suse.de>
16326
16327 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16328
16329 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16330 (ia64_num_regs): Reduce to 462.
16331
163322005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16333
16334 * acinclude.m4: Correct quoting.
16335 * aclocal.m4: Regenerated.
16336
16337 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16338 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16339 (thread_db_init): Call thread_db_err_str.
16340 * configure.ac: Check for TD_VERSION.
16341 * config.in, configure: Regenerated.
16342
163432005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16344
16345 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16346
163472005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16348
16349 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16350 is not available. Define HAVE_PTRACE_GETREGS if it is.
16351 * config.in, configure: Regenerated.
16352 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16353 * linux-i386-low.c, linux-m68k-low.c: Update to use
16354 HAVE_PTRACE_GETREGS.
16355 * linux-low.c (regsets_fetch_inferior_registers)
16356 (regsets_store_inferior_registers): Only return 0 if we processed
16357 GENERAL_REGS.
16358 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16359 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16360
163612005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16362
16363 * inferiors.c (struct thread_info): Add gdb_id.
16364 (add_thread): Add gdb_id argument.
16365 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16366 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16367 calls to add_thread.
16368 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16369 * server.c (handle_query): Use thread_to_gdb_id.
16370 (handle_v_cont, main): Use gdb_id_to_thread_id.
16371 * server.h (add_thread): Update prototype.
16372 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16373 prototypes.
16374
163752005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16376
16377 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16378 left-padded registers.
16379 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16380 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16381
163822005-07-01 Steve Ellcey <sje@cup.hp.com>
16383
16384 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16385 * configure: Regenerate.
16386 * config.in: Regenerate.
16387 * server.h (NEED_DECLARATION_STRERROR):
16388 Replace with !HAVE_DECL_STRERROR.
16389
163902005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16391
16392 * linux-low.c (linux_wait, linux_send_signal): Don't test
16393 an unsigned long variable for > 0 if it could be MAX_ULONG.
16394 * server.c (myresume): Likewise.
16395 * target.c (set_desired_inferior): Likewise.
16396
163972005-06-13 Mark Kettenis <kettenis@gnu.org>
16398
16399 * configure.ac: Simplify and improve check for socklen_t.
16400 * configure, config.in: Regenerate.
16401
164022005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16403
16404 * acconfig.h: Remove.
16405 * configure.ac: Add a test for socklen_t. Use three-argument
16406 AC_DEFINE throughout.
16407 * config.in: Regenerated using autoheader 2.59.
16408 * configure: Regenerated.
16409
16410 * gdbreplay.c (socklen_t): Provide a default.
16411 (remote_open): Use socklen_t.
16412 * remote-utils.c (socklen_t): Provide a default.
16413 (remote_open): Use socklen_t.
16414 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16415 unsigned char.
16416
16417 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16418 char for buffers.
16419 * linux-low.c (linux_read_memory, linux_write_memory)
16420 (linux_read_auxv): Likewise.
16421 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16422 (check_mem_write): Likewise.
16423 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16424 Likewise.
16425 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16426 (registers_from_string, register_data): Likewise.
16427 * server.c (handle_query, main): Likewise.
16428 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16429 (decode_M_packet): Likewise.
16430 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16431 * target.h (struct target_ops): Update read_memory, write_memory,
16432 and read_auxv.
16433 (read_inferior_memory, write_inferior_memory): Update.
16434 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16435 to unsigned char *.
16436 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16437 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16438 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16439 linux-s390-low.c, linux-sh-low.c: Update for changes in
16440 read_inferior_memory and the_low_target->breakpoint.
16441
164422005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16443
16444 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16445 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16446 * configure.srv: Add powerpc64-*-linux*.
16447 * linux-ppc64-low.c: New file.
16448
164492005-05-23 Orjan Friberg <orjanf@axis.com>
16450
16451 * linux-cris-low.c: New file with support for CRIS.
16452 * linux-crisv32-low.c: Ditto for CRISv32.
16453 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16454 (clean): Add reg-cris.c and reg-crisv32.c.
16455 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16456 reg-crisv32.o, and reg-crisv32.c to make rules.
16457 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16458 recognized targets.
16459
164602005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16461
16462 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16463 of sizeof (PTRACE_XFER_TYPE).
16464 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16465
164662005-05-12 Orjan Friberg <orjanf@axis.com>
16467
16468 * target.h (struct target_ops): Add insert_watchpoint,
16469 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16470 pointers for hardware watchpoint support.
16471 * linux-low.h (struct linux_target_ops): Ditto.
16472 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16473 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16474 to linux_target_ops.
16475 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16476 reply packet.
16477 * server.c (main): Recognize 'Z' and 'z' packets.
16478
164792005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16480
16481 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16482 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16483 (the_low_target): Add new members.
16484
164852005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16486
16487 * proc-service.c (ps_lgetregs): Search all_processes instead of
16488 all_threads.
16489
164902005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16491
16492 * server.c (start_inferior): Change return type to int.
16493 (attach_inferior): Change sigptr to int *.
16494 (handle_v_cont, handle_v_requests): Change signal to int *.
16495 (main): Change signal to int.
16496
164972005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16498
16499 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16500 * configure.srv: Add m32r*-*-linux*.
16501 * linux-m32r-low.c: New file.
16502
165032005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16504
16505 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16506
165072005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16508
16509 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16510 Take unsigned long arguments for PIDs.
16511 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16512 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16513 (wait_for_sigstop, linux_resume_one_process)
16514 (regsets_fetch_inferior_registers, linux_send_signal)
16515 (linux_read_auxv): Likewise. Update the types of variables holding
16516 PIDs. Update format string specifiers.
16517 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16518 * remote-utils.c (prepare_resume_reply): Likewise.
16519 * server.c (cont_thread, general_thread, step_thread)
16520 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16521 unsigned long.
16522 (handle_query): Update format specifiers.
16523 (handle_v_cont, main): Use strtoul for thread IDs.
16524 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16525 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16526 (general_thread, step_thread, thread_from_wait)
16527 (old_thread_from_wait): Update.
16528 * target.h (struct thread_resume): Use unsigned long for THREAD.
16529 (struct target_ops): Use unsigned long for arguments to attach and
16530 thread_alive.
16531
165322005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16533
16534 * acinclude.m4: Include bfd/bfd.m4 directly.
16535 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16536 <agriffis@toolchain.org>.
16537 * aclocal.m4, configure: Regenerated.
16538
165392005-01-07 Andrew Cagney <cagney@gnu.org>
16540
16541 * configure.ac: Rename configure.in, require autoconf 2.59.
16542 * configure: Re-generate.
16543
165442004-12-08 Daniel Jacobowitz <dan@debian.org>
16545
16546 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16547 LIBS when finished.
16548 * aclocal.m4: Regenerated.
16549 * configure: Regenerated.
16550
165512004-11-21 Andreas Schwab <schwab@suse.de>
16552
16553 * linux-m68k-low.c (m68k_num_gregs): Define.
16554 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16555 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16556 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16557 (m68k_breakpoint_at): New. Add to the_low_target.
16558
16559 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16560 srv_linux_thread_db to yes.
16561
165622004-10-20 Joel Brobecker <brobecker@gnat.com>
16563
16564 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16565 (ARCH_SET_FS): Likewise.
16566 (ARCH_GET_FS): Likewise.
16567 (ARCH_GET_GS): Likewise.
16568
165692004-10-16 Daniel Jacobowitz <dan@debian.org>
16570
16571 * linux-i386-low.c (ps_get_thread_area): New.
16572 * linux-x86-64-low.c (ps_get_thread_area): New.
16573 * linux-low.c: Include <sys/syscall.h>.
16574 (linux_kill_one_process): Don't kill the first thread here.
16575 (linux_kill): Kill the first thread here.
16576 (kill_lwp): New function.
16577 (send_sigstop, linux_send_signal): Use it.
16578 * proc-service.c: Clean up #ifdefs.
16579 (fpregset_info): Delete.
16580 (ps_lgetregs): Update and enable implementation.
16581 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16582 implementations.
16583 * remote-utils.c (struct sym_cache, symbol_cache): New.
16584 (input_interrupt): Print a clearer message.
16585 (async_io_enabled): New variable.
16586 (enable_async_io, disable_async_io): Use it. Update comments.
16587 (look_up_one_symbol): Use the symbol cache.
16588 * thread-db.c (thread_db_look_up_symbols): New function.
16589 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16590
165912004-10-16 Daniel Jacobowitz <dan@debian.org>
16592
16593 * configure.in: Test for -rdynamic.
16594 * configure: Regenerated.
16595 * Makefile (INTERNAL_LDFLAGS): New.
16596 (gdbserver, gdbreplay): Use it.
16597
165982004-09-02 Andrew Cagney <cagney@gnu.org>
16599
16600 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16601
166022004-03-23 Daniel Jacobowitz <drow@mvista.com>
16603
16604 * linux-low.c (linux_wait): Clear all_processes list also.
16605
166062004-03-12 Daniel Jacobowitz <drow@mvista.com>
16607
16608 * linux-low.c: Include <errno.h>. Remove extern declaration of
16609 errno.
16610
166112004-03-12 Daniel Jacobowitz <drow@mvista.com>
16612
16613 * gdbreplay.c, server.h, utils.c: Update copyright years.
16614
166152004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16616
16617 * server.c (main): Print child status or termination signal from
16618 variable 'signal', not 'sig'.
16619
166202004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16621
16622 * linux-low.c (linux_read_memory): Change return type to
16623 int. Check for and return error from ptrace().
16624 * target.c (read_inferior_memory): Change return type to int. Pass
16625 back return status from the_target->read_memory().
16626 * target.h (struct target_ops): Adapt *read_memory() prototype.
16627 Update comment.
16628 (read_inferior_memory): Adapt prototype.
16629 * server.c (main): Return an error packet if
16630 read_inferior_memory() returns an error.
16631
166322004-03-04 Daniel Jacobowitz <drow@mvista.com>
16633
16634 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16635 Unify with other clean targets.
16636
166372004-02-29 Daniel Jacobowitz <drow@mvista.com>
16638
16639 * server.c (handle_v_cont): Call set_desired_inferior.
16640
166412004-02-29 Daniel Jacobowitz <drow@mvista.com>
16642
16643 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16644
166452004-02-29 Daniel Jacobowitz <drow@mvista.com>
16646
16647 * linux-low.c (linux_wait): Unblock async I/O.
16648 (linux_resume): Block and enable async I/O.
16649 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16650 * server.h (block_async_io, unblock_async_io): Add prototypes.
16651
166522004-02-29 Daniel Jacobowitz <drow@mvista.com>
16653
16654 * remote-utils.c (remote_open): Print a status notice after
16655 opening a TCP port.
16656 * server.c (attach_inferior): Print a status notice after
16657 attaching.
16658
166592004-02-29 Daniel Jacobowitz <drow@mvista.com>
16660
16661 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16662
166632004-02-26 Daniel Jacobowitz <drow@mvista.com>
16664
16665 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16666 error packet.
16667 * server.c, target.h: Update copyright years.
16668
166692004-02-25 Roland McGrath <roland@redhat.com>
16670
16671 * target.h (struct target_ops): New member `read_auxv'.
16672 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16673 * linux-low.c (linux_read_auxv): New function.
16674 (linux_target_ops): Initialize `read_auxv' member to that.
16675
166762004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16677
16678 Committed by Jim Blandy <jimb@redhat.com>.
16679
16680 * linux-s390-low.c (s390_num_regs): Update.
16681 (s390_regmap): Remove control registers. Use __s390x__ predefine
16682 instead of GPR_SIZE to distiguish s390 and s390x targets.
16683
166842004-01-31 Daniel Jacobowitz <drow@mvista.com>
16685
16686 * linux-low.c: Update copyright year.
16687 (check_removed_breakpoint): Clear pending_is_breakpoint.
16688 (linux_set_resume_request, linux_queue_one_thread)
16689 (resume_status_pending_p): New functions.
16690 (linux_continue_one_thread): Use process->resume.
16691 (linux_resume): Only resume threads if there are no pending events.
16692 * linux-low.h (struct process_info): Add resume request
16693 pointer.
16694
166952004-01-30 Daniel Jacobowitz <drow@mvista.com>
16696
16697 * regcache.c (new_register_cache): Clear the allocated register
16698 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16699
167002003-10-13 Daniel Jacobowitz <drow@mvista.com>
16701
16702 * linux-low.c (linux_resume): Take a struct thread_resume *
16703 argument.
16704 (linux_wait): Update call.
16705 (resume_ptr): New static variable.
16706 (linux_continue_one_thread): Renamed from
16707 linux_continue_one_process. Use resume_ptr.
16708 (linux_resume): Use linux_continue_one_thread.
16709 * server.c (handle_v_cont, handle_v_requests): New functions.
16710 (myresume): New function.
16711 (main): Handle 'v' case.
16712 * target.h (struct thread_resume): New type.
16713 (struct target_ops): Change argument of "resume" to struct
16714 thread_resume *.
16715 (myresume): Delete macro.
16716
167172003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16718
16719 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16720 (uninstall): Support DESTDIR.
16721
16722Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16723
16724 * configure.srv: Add xscale*linux copy of arm*linux entry.
16725
167262003-07-24 Daniel Jacobowitz <drow@mvista.com>
16727
16728 * linux-arm-low.c (arm_reinsert_addr): New function.
16729 (the_low_target): Add arm_reinsert_addr.
16730
167312003-07-08 Mark Kettenis <kettenis@gnu.org>
16732
16733 * mem-break.c: Remove whitespace at end of file.
16734
167352003-06-28 Daniel Jacobowitz <drow@mvista.com>
16736
16737 * configure.in: Check whether we need to prototype strerror.
16738 * server.h: Optionally prototype strerror.
16739 * gdbreplay.c (perror_with_name): Use strerror.
16740 * linux-low.c (linux_attach_lwp): Use strerror.
16741 * utils.c (perror_with_name): Use strerror.
16742 * config.in, configure: Regenerated.
16743
167442003-06-28 Daniel Jacobowitz <drow@mvista.com>
16745
16746 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16747 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16748
167492003-06-20 Daniel Jacobowitz <drow@mvista.com>
16750
16751 * Makefile.in (SFILES): Update.
16752 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16753 low-sun3.c: Remove files.
16754
167552003-06-17 Daniel Jacobowitz <drow@mvista.com>
16756
16757 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16758 (linux_detach_one_process, linux_detach): New functions.
16759 (linux_target_ops): Add linux_detach.
16760 * server.c (main): Handle 'D' packet.
16761 * target.h (struct target_ops): Add "detach" member.
16762 (detach_inferior): Define.
16763
167642003-06-13 Mark Kettenis <kettenis@gnu.org>
16765
16766 From Kelley Cook <kelleycook@wideopenwest.com>:
16767 * configure.srv: Accept i[34567]86 variants.
16768
167692003-06-05 Daniel Jacobowitz <drow@mvista.com>
16770
16771 * linux-low.c (linux_wait_for_event): Correct comment typos.
16772 (linux_resume_one_process): Call check_removed_breakpoint.
16773 (linux_send_signal): New function.
16774 (linux_target_ops): Add linux_send_signal.
16775 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16776 of kill.
16777 * target.h (struct target_ops): Add send_signal.
16778
167792003-05-29 Jim Blandy <jimb@redhat.com>
16780
16781 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16782 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16783 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16784 away part of the register's value.
16785
167862003-03-26 Daniel Jacobowitz <drow@mvista.com>
16787
16788 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16789 (linux_wait_for_event, linux_init_signals): Likewise.
16790
167912003-03-17 Daniel Jacobowitz <drow@mvista.com>
16792
16793 * configure.in: Check for stdlib.h.
16794 * configure: Regenerated.
16795 * config.in: Regenerated.
16796
167972003-01-04 Andreas Schwab <schwab@suse.de>
16798
16799 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16800
168012003-01-02 Andrew Cagney <ac131313@redhat.com>
16802
16803 * Makefile.in: Remove obsolete code.
16804
168052002-11-20 Daniel Jacobowitz <drow@mvista.com>
16806
16807 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16808 defined(PT_FPR0_HI).
16809
168102002-11-17 Stuart Hughes <seh@zee2.com>
16811
16812 * linux-arm-low.c (arm_num_regs): Increase.
16813 (arm_regmap): Include status register.
16814
168152002-11-17 Daniel Jacobowitz <drow@mvista.com>
16816
16817 * linux-low.c (register_addr): Remove incorrect -1 check.
16818
168192002-08-29 Daniel Jacobowitz <drow@mvista.com>
16820
16821 * linux-low.c (linux_create_inferior): Call setpgid. Return
16822 the new PID.
16823 (unstopped_p, linux_signal_pid): Remove.
16824 (linux_target_ops): Remove linux_signal_pid.
16825 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16826 global instead of target method.
16827 * target.h (struct target_ops): Remove signal_pid. Update comment
16828 for create_inferior.
16829 * server.c (signal_pid): New variable.
16830 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16831 gdbserver. Set the child to be the foreground process group.
16832 (attach_inferior): Set signal_pid.
16833
168342002-08-23 Daniel Jacobowitz <drow@mvista.com>
16835
16836 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16837
168382002-08-20 Jim Blandy <jimb@redhat.com>
16839
16840 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16841 default for this.
16842
168432002-08-01 Andrew Cagney <cagney@redhat.com>
16844
16845 * Makefile.in: Make chill references obsolete.
16846
168472002-07-24 Kevin Buettner <kevinb@redhat.com>
16848
16849 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16850 * configure: Regenerate.
16851 * config.in: Regenerate.
16852
168532002-07-09 David O'Brien <obrien@FreeBSD.org>
16854
16855 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16856 (perror_with_name, remote_close, remote_open, expect, play): Static.
16857
168582002-07-04 Michal Ludvig <mludvig@suse.cz>
16859
16860 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16861 byte offsets instead of an array of indexes.
16862 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16863
168642002-06-13 Daniel Jacobowitz <drow@mvista.com>
16865
16866 * regcache.c: Add comment.
16867
168682002-06-11 Daniel Jacobowitz <drow@mvista.com>
16869
16870 * thread-db.c: New file.
16871 * proc-service.c: New file.
16872 * acinclude.m4: New file.
16873 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16874 proc-service.o, and thread-db.o.
16875 (linux-low.o): Add USE_THREAD_DB.
16876 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16877 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16878 * aclocal.m4: Regenerated.
16879 * config.in: Regenerated.
16880 * configure: Regenerated.
16881 * configure.in: Check for proc_service.h, sys/procfs.h,
16882 thread_db.h, and linux/elf.h headrs.
16883 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16884 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16885 Check for -lthread_db and thread support.
16886 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16887 PowerPC, and SuperH.
16888 * i387-fp.c: Constify arguments.
16889 * i387-fp.h: Likewise.
16890 * inferiors.c: (struct thread_info): Renamed from
16891 `struct inferior_info'. Remove PID member. Use generic inferior
16892 list header. All uses updated.
16893 (inferiors, signal_pid): Removed.
16894 (all_threads): New variable.
16895 (get_thread): Define.
16896 (add_inferior_to_list): New function.
16897 (for_each_inferior): New function.
16898 (change_inferior_id): New function.
16899 (add_inferior): Removed.
16900 (remove_inferior): New function.
16901 (add_thread): New function.
16902 (free_one_thread): New function.
16903 (remove_thread): New function.
16904 (clear_inferiors): Use for_each_inferior and free_one_thread.
16905 (find_inferior): New function.
16906 (find_inferior_id): New function.
16907 (inferior_target_data): Update argument type.
16908 (set_inferior_target_data): Likewise.
16909 (inferior_regcache_data): Likewise.
16910 (set_inferior_regcache_data): Likewise.
16911 * linux-low.c (linux_bp_reinsert): Remove.
16912 (all_processes, stopping_threads, using_thrads)
16913 (struct pending_signals, debug_threads, pid_of): New.
16914 (inferior_pid): Replace with macro.
16915 (struct inferior_linux_data): Remove.
16916 (get_stop_pc, add_process): New functions.
16917 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16918 Use add_process and add_thread.
16919 (linux_attach_lwp): New function, based on old linux_attach. Use
16920 add_process and add_thread. Set stop_expected for new threads.
16921 (linux_attach): New function.
16922 (linux_kill_one_process): New function.
16923 (linux_kill): Kill all LWPs.
16924 (linux_thread_alive): Use find_inferior_id.
16925 (check_removed_breakpoints, status_pending_p): New functions.
16926 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16927 Update. Use WNOHANG. Wait for cloned processes also. Update process
16928 struct for the found process.
16929 (linux_wait_for_event): New function.
16930 (linux_wait): Use it. Support LWPs.
16931 (send_sigstop, wait_for_sigstop, stop_all_processes)
16932 (linux_resume_one_process, linux_continue_one_process): New functions.
16933 (linux_resume): Support LWPs.
16934 (REGISTER_RAW_SIZE): Remove.
16935 (fetch_register): Use register_size instead. Call supply_register.
16936 (usr_store_inferior_registers): Likewise. Call collect_register.
16937 Fix recursive case.
16938 (regsets_fetch_inferior_registers): Improve error message.
16939 (regsets_store_inferior_registers): Add debugging.
16940 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16941 (unstopped_p, linux_signal_pid): New functions.
16942 (linux_target_ops): Add linux_signal_pid.
16943 (linux_init_signals): New function.
16944 (initialize_low): Call it. Initialize using_threads.
16945 * regcache.c (inferior_regcache_data): Add valid
16946 flag.
16947 (get_regcache): Fetch registers lazily. Add fetch argument
16948 and update all callers.
16949 (regcache_invalidate_one, regcache_invalidate): New
16950 functions.
16951 (new_register_cache): Renamed from create_register_cache.
16952 Return the new regcache.
16953 (free_register_cache): Change argument to a void *.
16954 (registers_to_string, registers_from_string): Call get_regcache
16955 with fetch flag set.
16956 (register_data): Make static. Pass fetch flag to get_regcache.
16957 (supply_register): Call get_regcache with fetch flag clear.
16958 (collect_register): Call get_regcache with fetch flag set.
16959 (collect_register_as_string): New function.
16960 * regcache.h: Update.
16961 * remote-utils.c (putpkt): Flush after debug output and use
16962 stderr.
16963 Handle input interrupts while waiting for an ACK.
16964 (input_interrupt): Use signal_pid method.
16965 (getpkt): Flush after debug output and use stderr.
16966 (outreg): Use collect_register_as_string.
16967 (new_thread_notify, dead_thread_notify): New functions.
16968 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16969 and general_thread.
16970 (look_up_one_symbol): Flush after debug output.
16971 * server.c (step_thread, server_waiting): New variables.
16972 (start_inferior): Don't use signal_pid. Update call to mywait.
16973 (attach_inferior): Update call to mywait.
16974 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16975 (main): Don't fetch/store registers explicitly. Use
16976 set_desired_inferior. Support proposed ``Hs'' packet. Update
16977 calls to mywait.
16978 * server.h: Update.
16979 (struct inferior_list, struct_inferior_list_entry): New.
16980 * target.c (set_desired_inferior): New.
16981 (write_inferior_memory): Constify.
16982 (mywait): New function.
16983 * target.h: Update.
16984 (struct target_ops): New signal_pid method.
16985 (mywait): Removed macro, added prototype.
16986
16987 * linux-low.h (regset_func): Removed.
16988 (regset_fill_func, regset_store_func): New.
16989 (enum regset_type): New.
16990 (struct regset_info): Add type field. Use new operation types.
16991 (struct linux_target_ops): stop_pc renamed to get_pc.
16992 Add decr_pc_after_break and breakpoint_at.
16993 (get_process, get_thread_proess, get_process_thread)
16994 (strut process_info, all_processes, linux_attach_lwp)
16995 (thread_db_init): New.
16996
16997 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16998 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16999 (the_low_target): Add new members.
17000 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
17001 (i386_store_fpxregset): Constify.
17002 (target_regsets): Add new kind identifier.
17003 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
17004 (i386_set_pc): Add debugging.
17005 (i386_breakpoint_at): New function.
17006 (the_low_target): Add new members.
17007 * linux-mips-low.c (mips_get_pc, mips_set_pc)
17008 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
17009 (mips_breakpoint_at): New.
17010 (the_low_target): Add new members.
17011 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
17012 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
17013 (the_low_target): Add new members.
17014 * linux-sh-low.c (sh_get_pc, sh_set_pc)
17015 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
17016 (the_low_target): Add new members.
17017 * linux-x86-64-low.c (target_regsets): Add new kind
17018 identifier.
17019
170202002-05-15 Daniel Jacobowitz <drow@mvista.com>
17021
17022 From Martin Pool <mbp@samba.org>:
17023 * server.c (gdbserver_usage): New function.
17024 (main): Call it.
17025
170262002-05-14 Daniel Jacobowitz <drow@mvista.com>
17027
17028 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
17029 stop_at -> stop_pc.
17030
170312002-05-04 Andrew Cagney <ac131313@redhat.com>
17032
17033 * Makefile.in: Remove obsolete code.
17034
170352002-04-24 Michal Ludvig <mludvig@suse.cz>
17036
17037 * linux-low.c (regsets_fetch_inferior_registers),
17038 (regsets_store_inferior_registers): Removed cast to int from
17039 ptrace() calls.
17040 * regcache.h: Added declaration of struct inferior_info.
17041
170422002-04-20 Daniel Jacobowitz <drow@mvista.com>
17043
17044 * inferiors.c (struct inferior_info): Add regcache_data.
17045 (add_inferior): Call create_register_cache.
17046 (clear_inferiors): Call free_register_cache.
17047 (inferior_regcache_data, set_inferior_regcache_data): New functions.
17048 * regcache.c (struct inferior_regcache_data): New.
17049 (registers): Remove.
17050 (get_regcache): New function.
17051 (create_register_cache, free_register_cache): New functions.
17052 (set_register_cache): Don't initialize the register cache here.
17053 (registers_to_string, registers_from_string, register_data): Call
17054 get_regcache.
17055 * regcache.h: Add prototypes.
17056 * server.h: Likewise.
17057
170582002-04-20 Daniel Jacobowitz <drow@mvista.com>
17059
17060 * mem-break.c: New file.
17061 * mem-break.h: New file.
17062 * Makefile.in: Add mem-break.o rule; update server.h
17063 dependencies.
17064 * inferiors.c (struct inferior_info): Add target_data
17065 member.
17066 (clear_inferiors): Free target_data member if set.
17067 (inferior_target_data, set_inferior_target_data): New functions.
17068 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17069 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17070 * linux-low.c (linux_bp_reinsert): New variable.
17071 (struct inferior_linux_data): New.
17072 (linux_create_inferior): Use set_inferior_target_data.
17073 (linux_attach): Likewise. Call add_inferior.
17074 (linux_wait_for_one_inferior): New function.
17075 (linux_wait): Call it.
17076 (linux_write_memory): Add const.
17077 (initialize_low): Call set_breakpoint_data.
17078 * linux-low.h (struct linux_target_ops): Add breakpoint
17079 handling members.
17080 * server.c (attach_inferior): Remove extra add_inferior
17081 call.
17082 * server.h: Include mem-break.h. Update inferior.c
17083 prototypes.
17084 * target.c (read_inferior_memory)
17085 (write_inferior_memory): New functions.
17086 * target.h (read_inferior_memory)
17087 (write_inferior_memory): Change macros to prototypes.
17088 (struct target_ops): Update comments. Add const to write_memory
17089 definition.
17090
170912002-04-11 Daniel Jacobowitz <drow@mvista.com>
17092
17093 * linux-low.c (usr_store_inferior_registers): Support
17094 registers which are allowed to fail to store.
17095 * linux-low.h (linux_target_ops): Likewise.
17096 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17097 (ppc_cannot_store_register): FPSCR may not be storable.
17098
170992002-04-09 Daniel Jacobowitz <drow@mvista.com>
17100
17101 * server.h: Include <string.h> if HAVE_STRING_H.
17102 * ChangeLog: Correct paths in last ChangeLog entry.
17103
171042002-04-09 Daniel Jacobowitz <drow@mvista.com>
17105
17106 * linux-low.h: Remove obsolete prototypes.
17107 (struct linux_target_ops): New.
17108 (extern the_low_target): New.
17109 * linux-low.c (num_regs, regmap): Remove declarations.
17110 (register_addr): Use the_low_target explicitly.
17111 (fetch_register): Likewise.
17112 (usr_fetch_inferior_registers): Likewise.
17113 (usr_store_inferior_registers): Likewise.
17114 * linux-arm-low.c (num_regs): Remove.
17115 (arm_num_regs): Define.
17116 (arm_regmap): Renamed from regmap, made static.
17117 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17118 made static.
17119 (arm_cannot_store_register): Renamed from cannot_store_register,
17120 made static.
17121 (the_low_target): New.
17122 * linux-i386-low.c (num_regs): Remove.
17123 (i386_num_regs): Define.
17124 (i386_regmap): Renamed from regmap, made static.
17125 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17126 made static.
17127 (i386_cannot_store_register): Renamed from cannot_store_register,
17128 made static.
17129 (the_low_target): New.
17130 * linux-ia64-low.c (num_regs): Remove.
17131 (ia64_num_regs): Define.
17132 (ia64_regmap): Renamed from regmap, made static.
17133 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17134 made static.
17135 (ia64_cannot_store_register): Renamed from cannot_store_register,
17136 made static.
17137 (the_low_target): New.
17138 * linux-m68k-low.c (num_regs): Remove.
17139 (m68k_num_regs): Define.
17140 (m68k_regmap): Renamed from regmap, made static.
17141 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17142 made static.
17143 (m68k_cannot_store_register): Renamed from cannot_store_register,
17144 made static.
17145 (the_low_target): New.
17146 * linux-mips-low.c (num_regs): Remove.
17147 (mips_num_regs): Define.
17148 (mips_regmap): Renamed from regmap, made static.
17149 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17150 made static.
17151 (mips_cannot_store_register): Renamed from cannot_store_register,
17152 made static.
17153 (the_low_target): New.
17154 * linux-ppc-low.c (num_regs): Remove.
17155 (ppc_num_regs): Define.
17156 (ppc_regmap): Renamed from regmap, made static.
17157 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17158 made static.
17159 (ppc_cannot_store_register): Renamed from cannot_store_register,
17160 made static.
17161 (the_low_target): New.
17162 * linux-s390-low.c (num_regs): Remove.
17163 (s390_num_regs): Define.
17164 (s390_regmap): Renamed from regmap, made static.
17165 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17166 made static.
17167 (s390_cannot_store_register): Renamed from cannot_store_register,
17168 made static.
17169 (the_low_target): New.
17170 * linux-sh-low.c (num_regs): Remove.
17171 (sh_num_regs): Define.
17172 (sh_regmap): Renamed from regmap, made static.
17173 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17174 made static.
17175 (sh_cannot_store_register): Renamed from cannot_store_register,
17176 made static.
17177 (the_low_target): New.
17178 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17179 (the_low_target): New.
17180
171812002-04-09 Daniel Jacobowitz <drow@mvista.com>
17182
17183 * Makefile.in: Add stamp-h target.
17184 * configure.in: Create stamp-h.
17185 * configure: Regenerated.
17186
171872002-04-09 Daniel Jacobowitz <drow@mvista.com>
17188
17189 * inferiors.c: New file.
17190 * target.c: New file.
17191 * target.h: New file.
17192 * Makefile.in: Add target.o and inferiors.o. Update
17193 dependencies.
17194 * linux-low.c (inferior_pid): New static variable,
17195 moved from server.c.
17196 (linux_create_inferior): Renamed from create_inferior.
17197 Call add_inferior. Return 0 on success instead of a PID.
17198 (linux_attach): Renamed from myattach.
17199 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17200 (linux_thread_alive): Renamed from mythread_alive.
17201 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17202 child dies.
17203 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17204 (regsets_store_inferior_registers): Correct error message.
17205 Add missing ``return 0''.
17206 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17207 (linux_store_registers): Renamed from store_inferior_registers.
17208 (linux_read_memory): Renamed from read_inferior_memory.
17209 (linux_write_memory): Renamed from write_inferior_memory.
17210 (linux_target_ops): New structure.
17211 (initialize_low): Call set_target_ops ().
17212 * remote-utils.c (unhexify): New function.
17213 (hexify): New function.
17214 (input_interrupt): Send signals to ``signal_pid''.
17215 * server.c (inferior_pid): Remove.
17216 (start_inferior): Update create_inferior call.
17217 (attach_inferior): Call add_inferior.
17218 (handle_query): New function.
17219 (main): Call handle_query for `q' packets.
17220 * server.h: Include "target.h". Remove obsolete prototypes.
17221 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17222
172232002-04-09 Daniel Jacobowitz <drow@mvista.com>
17224
17225 * Makefile.in: Add WARN_CFLAGS. Update configury
17226 dependencies.
17227 * configure.in: Check for <string.h>
17228 * configure: Regenerate.
17229 * config.in: Regenerate.
17230 * gdbreplay.c: Include needed system headers.
17231 (remote_open): Remove strchr prototype.
17232 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17233 * regcache.c (supply_register): Change buf argument to const void *.
17234 (supply_register_by_name): Likewise.
17235 (collect_register): Change buf argument to void *.
17236 (collect_register_by_name): Likewise.
17237 * regcache.h: Add missing prototypes.
17238 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17239 * server.c (handle_query): New function.
17240 (attached): New static variable, moved out of main.
17241 (main): Quiet longjmp clobber warnings.
17242 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17243 * utils.c (error): Remove NORETURN.
17244 (fatal): Likewise.
This page took 0.089479 seconds and 4 git commands to generate.