[PR gdb/23985] Fix libinproctrace.so build
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2018-01-30 Szabolcs Nagy <szabolcs.nagy@arm.com>
2
3 PR gdb/23985
4 * Makefile.in (IPAGENT_CFLAGS): Add UNDO_GNULIB_CFLAGS.
5 (UNDO_GNULIB_CFLAGS): Undo gnulib replacements.
6
7 2019-01-25 Tom Tromey <tom@tromey.com>
8
9 * Makefile.in (INCLUDE_CFLAGS): Don't add -I for common.
10
11 2019-01-25 Tom Tromey <tom@tromey.com>
12
13 * win32-low.c: Fix common/ includes.
14 * win32-i386-low.c: Fix common/ includes.
15 * tracepoint.c: Fix common/ includes.
16 * thread-db.c: Fix common/ includes.
17 * target.h: Fix common/ includes.
18 * symbol.c: Fix common/ includes.
19 * spu-low.c: Fix common/ includes.
20 * server.h: Fix common/ includes.
21 * server.c: Fix common/ includes.
22 * remote-utils.c: Fix common/ includes.
23 * regcache.h: Fix common/ includes.
24 * regcache.c: Fix common/ includes.
25 * nto-x86-low.c: Fix common/ includes.
26 * notif.h: Fix common/ includes.
27 * mem-break.h: Fix common/ includes.
28 * lynx-low.c: Fix common/ includes.
29 * lynx-i386-low.c: Fix common/ includes.
30 * linux-x86-tdesc-selftest.c: Fix common/ includes.
31 * linux-x86-low.c: Fix common/ includes.
32 * linux-low.c: Fix common/ includes.
33 * inferiors.h: Fix common/ includes.
34 * i387-fp.c: Fix common/ includes.
35 * hostio.c: Fix common/ includes.
36 * hostio-errno.c: Fix common/ includes.
37 * gdbthread.h: Fix common/ includes.
38 * gdbreplay.c: Fix common/ includes.
39 * fork-child.c: Fix common/ includes.
40 * event-loop.c: Fix common/ includes.
41 * ax.c:
42 (enum gdb_agent_op): Fix common/ includes.
43
44 2019-01-21 Tom Tromey <tom@tromey.com>
45
46 * tracepoint.c: Fix includes.
47 * remote-utils.c: Fix includes.
48 * linux-x86-low.c: Fix includes.
49
50 2019-01-01 Joel Brobecker <brobecker@adacore.com>
51
52 * gdbreplay.c (gdbreplay_version): Update copyright year in
53 version message.
54 * server.c (gdbserver_version): Likewise.
55
56 2018-12-05 Alan Hayward <alan.hayward@arm.com>
57
58 * linux-low.c (add_lwp): Switch ordering.
59
60 2018-11-29 Tom Tromey <tom@tromey.com>
61
62 * win32-low.c (win32_join): Take pid, not process.
63 * target.h (struct target_ops) <join>: Change argument type.
64 (join_inferior): Change argument name.
65 * spu-low.c (spu_join): Take pid, not process.
66 * server.c (handle_detach): Preserve pid before destroying
67 process.
68 * lynx-low.c (lynx_join): Take pid, not process.
69 * linux-low.c (linux_join): Take pid, not process.
70
71 2018-11-23 Alan Hayward <alan.hayward@arm.com>
72
73 * linux-aarch64-low.c (aarch64_cannot_store_register): Remove.
74 (aarch64_cannot_fetch_register): Likewise.
75 (struct linux_target_ops): Update references.
76
77 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
78
79 * linux-ppc-low.c: Include nat/linux-ptrace.h.
80
81 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
82
83 * configure.srv (ipa_ppc_linux_regobj): Add
84 powerpc-isa207-htm-vsx32l-ipa.o and
85 powerpc-isa207-htm-vsx64l-ipa.o.
86 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
87 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
88 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
89 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
90 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
91 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
92 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
93 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
94 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
95 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
96 (init_registers_powerpc_isa207_htm_vsx32l)
97 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
98 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
99 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
100 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
101 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
102 (ppc_store_tm_ctarregset): New functions.
103 (ppc_regsets): Add entries for HTM regsets.
104 (ppc_arch_setup): Set htm in features struct when needed. Set
105 sizes for the HTM regsets.
106 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
107 (initialize_low_arch): Call
108 init_registers_powerpc_isa207_htm_vsx32l and
109 init_registers_powerpc_isa207_htm_vsx64l.
110 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
111 PPC_TDESC_ISA207_HTM_VSX.
112 (initialize_low_tracepoint): Call
113 init_registers_powerpc_isa207_htm_vsx32l and
114 init_registers_powerpc_isa207_htm_vsx64l.
115
116 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
117
118 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
119 rs6000/power-linux-pmu.xml to srv_xmlfiles.
120 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
121 (ppc_store_pmuregset): New functions.
122 (ppc_regsets): Add entries for ebb and pmu regsets.
123 (ppc_arch_setup): Set isa207 in features struct if the ebb and
124 pmu regsets are available. Set sizes for these regsets.
125
126 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
127
128 * configure.srv (ipa_ppc_linux_regobj): Add
129 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
130 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
131 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
132 rs6000/powerpc-isa207-vsx32l.xml, and
133 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
134 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
135 <PPC_TDESC_ISA207_VSX>: New enum value.
136 (init_registers_powerpc_isa207_vsx32l): Declare.
137 (init_registers_powerpc_isa207_vsx64l): Declare.
138 * linux-ppc-low.c (ppc_fill_tarregset): New function.
139 (ppc_store_tarregset): New function.
140 (ppc_regsets): Add entry for the TAR regset.
141 (ppc_arch_setup): Set isa207 in features struct when needed. Set
142 size for the TAR regsets.
143 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
144 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
145 and init_registers_powerpc_isa207_vsx64l.
146 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
147 (initialize_low_tracepoint): Call
148 init_registers_powerpc_isa207_vsx32l and
149 init_registers_powerpc_isa207_vsx64l.
150
151 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
152 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
153
154 * configure.srv (ipa_ppc_linux_regobj): Add
155 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
156 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
157 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
158 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
159 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
160 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
161 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
162 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
163 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
164 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
165 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
166 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
167 (ppc_hwcap): Add comment.
168 (ppc_hwcap2): New global.
169 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
170 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
171 (ppc_regsets): Add entries for the DSCR and PPR regsets.
172 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
173 when needed. Set sizes for the the DSCR and PPR regsets.
174 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
175 (initialize_low_arch): Call
176 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
177 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
178 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
179 PPC_TDESC_ISA205_PPR_DSCR_VSX.
180 (initialize_low_tracepoint): Call
181 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
182 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
183
184 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
185
186 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
187
188 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
189 Simon Marchi <simark@simark.ca>
190
191 * acinclude.m4: Include "../selftest.m4".
192 * configure: Regenerate.
193 * configure.ac: Use "GDB_AC_SELFTEST".
194 * configure.srv: Use "$enable_unittests" instead of
195 "$development" when checking whether unit tests have been
196 enabled.
197 * server.c (captured_main): Update message informing that
198 selftests have been disabled.
199
200 2018-10-04 Tom Tromey <tom@tromey.com>
201
202 * configure: Rebuild.
203
204 2018-10-04 Tom Tromey <tom@tromey.com>
205
206 * server.c (handle_status): Rename inner "thread".
207 (process_serial_event): Declare "res" in 'm' case.
208 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
209 (iterate_over_lwps): Rename inner "thread".
210 (linux_qxfer_libraries_svr4): Rename inner "len".
211 * gdbthread.h (find_thread_in_random): Rename inner "thread".
212
213 2018-10-01 Gary Benson <gbenson@redhat.com>
214
215 * gdb_proc_service.h: Moved common code to
216 common/gdb_proc_service.h.
217
218 2018-10-01 Gary Benson <gbenson@redhat.com>
219
220 * gdb_proc_service.h: Synchronize comments and whitespace with
221 GDB's version of this file.
222
223 2018-09-25 Tom Tromey <tom@tromey.com>
224
225 * configure: Rebuild.
226 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
227
228 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
229
230 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
231 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
232 ($(IPA_LIB)): Sort IPA_OBJS.
233
234 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
235
236 * Makefile.in: Remove references to $(ADD_DEPS).
237
238 2018-09-16 Tom Tromey <tom@tromey.com>
239
240 * remote-utils.c (remote_open): Use GNU style for metasyntactic
241 variables.
242 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
243 variables.
244
245 2018-09-05 Tom Tromey <tom@tromey.com>
246
247 * configure: Rebuild.
248
249 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
250
251 PR build/23399
252 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
253
254 2018-08-27 Tom Tromey <tom@tromey.com>
255
256 PR build/23087:
257 * configure: Rebuild.
258
259 2018-08-27 Tom Tromey <tom@tromey.com>
260
261 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
262 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
263 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
264 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
265 (s390x_emit_stack_adjust): Add casts to unsigned char.
266
267 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
268
269 PR gdb/23374
270 PR gdb/23375
271 * server.h (struct client_state) <disable_randomization>:
272 Initialize to 1.
273
274 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
275
276 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
277 variable.
278 (mips_supply_ptrace_register): Likewise.
279
280 2018-07-22 Tom Tromey <tom@tromey.com>
281
282 * configure: Rebuild.
283
284 2018-07-22 Tom Tromey <tom@tromey.com>
285
286 * win32-low.c (win32_create_inferior): Remove unused variables.
287 * gdbreplay.c (remote_open): Remove unused variable.
288 * remote-utils.c (remote_prepare): Remove unused variable.
289 * x86-tdesc.h (X86_TDESC_H): Define.
290 (amd64_expedite_regs): Define conditionally.
291 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
292 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
293 * remote-utils.c (readchar): Remove unused variable.
294
295 2018-07-13 Pedro Alves <palves@redhat.com>
296
297 * linux-low.c (linux_kill): Change parameter to process_info
298 pointer instead of pid. Adjust.
299 * lynx-low.c (lynx_kill): Likewise.
300 * nto-low.c (nto_kill): Likewise.
301 * spu-low.c (spu_kill): Likewise.
302 * win32-low.c (win32_kill): Likewise.
303 * server.c (handle_v_kill, kill_inferior_callback)
304 (detach_or_kill_for_exit): Adjust.
305 * target.c (kill_inferior): Change parameter to process_info
306 pointer instead of pid. Adjust.
307 * target.h (struct target_ops) <kill>: Change parameter to
308 process_info pointer instead of pid. Adjust all implementations
309 and callers.
310 (kill_inferior): Likewise.
311
312 2018-07-13 Pedro Alves <palves@redhat.com>
313
314 * linux-low.c (linux_detach, linux_join): Change parameter to
315 process_info pointer instead of pid. Adjust.
316 * lynx-low.c (lynx_detach, lynx_join): Likewise.
317 * nto-low.c (nto_detach): Likewise.
318 * spu-low.c (spu_detach, spu_join): Likewise.
319 * win32-low.c (win32_detach, win32_join): Likewise.
320 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
321 * target.h (struct target_ops) <detach, join>: Change parameter to
322 process_info pointer instead of pid. Adjust all implementations
323 and callers.
324 (detach_inferior, join_inferior): Rename 'pid' parameter to
325 'proc'.
326
327 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
328 Jan Kratochvil <jan.kratochvil@redhat.com>
329 Paul Fertser <fercerpav@gmail.com>
330 Tsutomu Seki <sekiriki@gmail.com>
331
332 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
333 (OBS): Add 'common/netstuff.o'.
334 (GDBREPLAY_OBS): Likewise.
335 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
336 (remote_open): Implement support for IPv6
337 connections.
338 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
339 and 'wspiapi.h'.
340 (handle_accept_event): Accept connections from IPv6 sources.
341 (remote_prepare): Handle IPv6-style hostnames; implement
342 support for IPv6 connections.
343 (remote_open): Implement support for printing connections from
344 IPv6 sources.
345
346 2018-07-11 Pedro Alves <palves@redhat.com>
347
348 PR gdb/23377
349 * mem-break.c (any_persistent_commands): Add process_info
350 parameter and use it instead of relying on the current process.
351 Change return type to bool.
352 * mem-break.h (any_persistent_commands): Add process_info
353 parameter and change return type to bool.
354 * server.c (handle_detach): Remove require_running_or_return call.
355 Look up the process_info for the process we're about to detach.
356 If not found, return back error to GDB. Adjust
357 any_persistent_commands call to pass down a process pointer.
358
359 2018-07-11 Pedro Alves <palves@redhat.com>
360
361 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
362 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
363 instead of collect_register_by_name.
364 * regcache.c (regcache_raw_get_unsigned_by_name): New.
365 * regcache.h (regcache_raw_get_unsigned_by_name): New.
366
367 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
368 Pedro Alves <palves@redhat.com>
369
370 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
371
372 2018-07-03 Tom Tromey <tom@tromey.com>
373
374 * linux-low.c: Update.
375 * lynx-low.c: Update.
376 * mem-break.c: Update.
377 * nto-low.c: Update.
378 * remote-utils.c: Update.
379 * server.c: Update.
380 * spu-low.c: Update.
381 * target.c: Update.
382 * win32-low.c: Update.
383
384 2018-07-03 Tom Tromey <tom@tromey.com>
385
386 * server.c: Update.
387
388 2018-07-03 Tom Tromey <tom@tromey.com>
389
390 * linux-low.c: Update.
391
392 2018-07-03 Tom Tromey <tom@tromey.com>
393
394 * target.c: Update.
395
396 2018-07-03 Tom Tromey <tom@tromey.com>
397
398 * linux-low.c: Update.
399 * linux-mips-low.c: Update.
400 * lynx-low.c: Update.
401 * nto-low.c: Update.
402 * remote-utils.c: Update.
403 * server.c: Update.
404 * spu-low.c: Update.
405 * target.c: Update.
406 * thread-db.c: Update.
407
408 2018-07-03 Tom Tromey <tom@tromey.com>
409
410 * linux-low.c: Update.
411 * linux-mips-low.c: Update.
412 * lynx-low.c: Update.
413 * mem-break.c: Update.
414 * nto-low.c: Update.
415 * remote-utils.c: Update.
416 * server.c: Update.
417 * spu-low.c: Update.
418 * target.c: Update.
419 * tracepoint.c: Update.
420
421 2018-07-03 Tom Tromey <tom@tromey.com>
422
423 * linux-low.c: Update.
424 * linux-ppc-low.c: Update.
425 * linux-x86-low.c: Update.
426 * proc-service.c: Update.
427 * server.c: Update.
428 * spu-low.c: Update.
429 * thread-db.c: Update.
430 * win32-low.c: Update.
431
432 2018-07-03 Tom Tromey <tom@tromey.com>
433
434 * linux-low.c: Update.
435 * lynx-low.c: Update.
436 * nto-low.c: Update.
437 * remote-utils.c: Update.
438 * spu-low.c: Update.
439 * thread-db.c: Update.
440 * win32-low.c: Update.
441
442 2018-06-29 Joel Brobecker <brobecker@adacore.com>
443
444 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
445 parameter in call to 'amd64_create_target_description'.
446
447 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
448
449 * x86-tdesc.h: Remove executable permission flag.
450
451 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
452
453 * configure.ac: Remove AC_PREREQ, add missing quoting.
454 * configure: Re-generate.
455 * config.in: Re-generate.
456 * aclocal.m4: Re-generate.
457
458 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
459
460 * tracepoint.h (current_traceframe): Remove declaration.
461
462 2018-06-18 Alan Hayward <alan.hayward@arm.com>
463
464 * linux-aarch64-low.c (is_sve_tdesc): New function.
465 (aarch64_sve_regs_copy_to_regcache): Likewise.
466 (aarch64_sve_regs_copy_from_regcache): Likewise.
467 (aarch64_regs_info): Add SVE checks.
468 (initialize_low_arch): Initialize SVE.
469
470 2018-06-18 Alan Hayward <alan.hayward@arm.com>
471
472 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
473
474 2018-06-11 Alan Hayward <alan.hayward@arm.com>
475
476 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
477 (initialize_low_tracepoint): Likewise
478 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
479 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
480 param.
481 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
482 checks.
483 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
484
485 2018-06-11 Alan Hayward <alan.hayward@arm.com>
486
487 * server.h (PBUFSIZ): Increase size
488
489 2018-06-11 Alan Hayward <alan.hayward@arm.com>
490
491 * regcache.c (regcache::raw_compare): New function.
492 * regcache.h (regcache::raw_compare): New declaration.
493
494 2018-06-11 Alan Hayward <alan.hayward@arm.com>
495
496 * regcache.c (new_register_cache): Use new.
497 (free_register_cache): Use delete.
498 (register_data): Use const.
499 (supply_register): Move body inside regcache.
500 (regcache::raw_supply): New override function.
501 (collect_register): Move body inside regcache.
502 (regcache::raw_collect): New override function.
503 (regcache::get_register_status): New override function.
504 * regcache.h (struct regcache): Inherit from reg_buffer_common.
505
506 2018-06-09 Tom Tromey <tom@tromey.com>
507
508 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
509 declare queue.
510 (event_queue): Use std::queue.
511 (gdb_event_xfree): Remove.
512 (initialize_event_loop, process_event, wait_for_event): Update.
513
514 2018-06-08 Stan Cox <scox@redhat.com>
515
516 * win32-low.c (win32_create_inferior): last_ptid and last_status
517 moved to client_state.
518
519 2018-06-08 Pedro Alves <palves@redhat.com>
520
521 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
522 common/common-exceptions.o, common/common-utils.o,
523 common/errors.o, common/print-utils.o and utils.o.
524 * gdbreplay.c: Include "common-defs.h" instead of the two
525 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
526 string.h or alloca.h.
527 (perror_with_name): Delete.
528 (remote_open): Use xstrdup instead of strdup.
529 (main): Rename to ...
530 (captured_main): ... this.
531 (main): New.
532
533 2018-06-08 Tom Tromey <tom@tromey.com>
534
535 * linux-low.c (linux_low_read_btrace): Update.
536
537 2018-06-04 Stan Cox <scox@redhat.com>
538
539 * server.h (struct client_state): New.
540 * server.c (cont_thread, general_thread, multi_process)
541 (report_fork_events, report_vfork_events, report_exec_events)
542 (report_thread_events, swbreak_feature, hwbreak_feature)
543 (vCont_supported, disable_randomization, pass_signals)
544 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
545 Moved to client_state.
546 * remote-utils.c (remote_debug, noack_mode)
547 (transport_is_reliable): Moved to client_state.
548 * tracepoint.c (current_traceframe): Moved to client_state.
549
550 Update all callers.
551 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
552 linux-low.c, remote-utils.h, target.c: Use client_state.
553
554 2018-05-31 Alan Hayward <alan.hayward@arm.com>
555
556 * configure.srv: Add new c/h file.
557
558 2018-05-31 Alan Hayward <alan.hayward@arm.com>
559
560 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
561 null VQ.
562
563 2018-05-25 Maciej W. Rozycki <macro@mips.com>
564
565 * gdb.arch/mips-fpregset-core.exp: New test.
566 * gdb.arch/mips-fpregset-core.c: New test source.
567
568 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
569
570 PR server/23198
571 * hostio.c (require_int): Do not report overflow for integers
572 between 0xfffffff and 0x7fffffff.
573
574 2018-05-22 Maciej W. Rozycki <macro@mips.com>
575
576 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
577 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
578 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
579 functions.
580 (the_low_target): Wire them.
581
582 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
583
584 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
585 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
586 mode. Call collect_register_by_name with vscr using
587 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
588 (ppc_store_vrregset): Add and set vscr_offset variable as in
589 ppc_fill_vrregset. Call supply_register_by_name with vscr using
590 vscr_offset.
591
592 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
593
594 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
595 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
596 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
597
598 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
599
600 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
601 (ppc_store_vsxregset): Likewise.
602 (ppc_fill_vrregset): Likewise.
603 (ppc_store_vrregset): Likewise.
604 (ppc_fill_evrregset): Likewise.
605 (ppc_store_evrregset): Likewise.
606 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
607 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
608 needed.
609
610 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
611
612 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
613 wordsize of the inferior. Call ppc_linux_target_wordsize.
614
615 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
616
617 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
618 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
619 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
620 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
621 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
622 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
623 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
624 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
625 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
626 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
627 (tdesc_powerpc_e500l): Remove.
628 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
629 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
630 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
631 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
632 linux-ppc-tdesc.h.
633 (ppc_arch_setup): Remove target description matching code. Fill a
634 ppc_linux_features struct and call ppc_linux_match_description
635 with it.
636
637 2018-05-22 Maciej W. Rozycki <macro@mips.com>
638
639 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
640 width of the requested register exceeds the width of the
641 `ptrace' data type.
642 (mips_cannot_store_register): Likewise.
643
644 2018-05-21 Maciej W. Rozycki <macro@mips.com>
645
646 * linux-mips-low.c (mips_fetch_register): New function. Update
647 preceding comment.
648 (mips_store_gregset): Supply 0 rather than $restart for $zero.
649 (the_low_target): Wire `mips_fetch_register'.
650
651 2018-05-10 Joel Brobecker <brobecker@adacore.com>
652
653 * lynx-i386-low.c (LYNXOS_178): New macro.
654 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
655 the layout on LynxOS-178.
656 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
657 handle floating point registers that are not supported by
658 LynxOS-178.
659
660 2018-05-10 Tom Tromey <tom@tromey.com>
661
662 * configure: Rebuild.
663
664 2018-05-10 Joel Brobecker <brobecker@adacore.com>
665
666 PR server/23158:
667 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
668 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
669 Use it to set the expedite_regs field in the given tdesc.
670 * x86-tdesc.h: New file.
671 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
672 Adjust following the addition of the new expedite_regs parameter
673 to init_target_desc.
674 * linux-tic6x-low.c (tic6x_read_description): Likewise.
675 * linux-x86-tdesc.c: #include "x86-tdesc.h".
676 (i386_linux_read_description, amd64_linux_read_description):
677 Adjust following the addition of the new expedite_regs parameter
678 to init_target_desc.
679 * lynx-i386-low.c: #include "x86-tdesc.h".
680 (lynx_i386_arch_setup): Adjust following the addition of the new
681 expedite_regs parameter to init_target_desc.
682 * nto-x86-low.c: #include "x86-tdesc.h".
683 (nto_x86_arch_setup): Adjust following the addition of the new
684 expedite_regs parameter to init_target_desc.
685 * win32-i386-low.c: #include "x86-tdesc.h".
686 (i386_arch_setup): Adjust following the addition of the new
687 expedite_regs parameter to init_target_desc.
688
689 2018-05-10 Joel Brobecker <brobecker@adacore.com>
690
691 PR server/23158:
692 * win32-low.c (win32_create_inferior): Add call to my_wait
693 setting last_status global.
694
695 2018-05-10 Joel Brobecker <brobecker@adacore.com>
696
697 PR server/23158:
698 * win32-low.c (create_process): Only call gdb_tilde_expand if
699 inferior_cwd is not NULL.
700
701 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
702
703 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
704 registers to the cache if their values have changed.
705 (i387_xsave_to_cache): Provide default values for x87 control
706 registers when these features are available, but disabled.
707 * regcache.c (supply_register_by_name_zeroed): New function.
708 * regcache.h (supply_register_by_name_zeroed): Declare new
709 function.
710
711 2018-05-07 Tom Tromey <tom@tromey.com>
712
713 * configure: Rebuild.
714
715 2018-05-04 Tom Tromey <tom@tromey.com>
716
717 * configure: Rebuild.
718
719 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
720 Pedro Alves <palves@redhat.com>
721
722 * linux-aarch64-low.c (aarch64_stopped_data_address):
723 Likewise.
724
725 2018-04-27 Tom Tromey <tom@tromey.com>
726
727 * configure: Rebuild.
728
729 2018-04-23 Tom Tromey <tom@tromey.com>
730
731 * configure: Rebuild.
732
733 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
734
735 * Makefile.in (depcomp): Add "..".
736 (all_deps_files): New and use it.
737
738 2018-04-18 Alan Hayward <alan.hayward@arm.com>
739
740 * configure.srv (aarch64*-*-linux*): Don't include xml.
741 (i[34567]86-*-cygwin*): Likewise.
742 (i[34567]86-*-linux*): Likewise.
743 (i[34567]86-*-lynxos*): Likewise.
744 (i[34567]86-*-mingw32ce*): Likewise.
745 (i[34567]86-*-mingw*): Likewise.
746 (i[34567]86-*-nto*): Likewise.
747 (tic6x-*-uclinux): Likewise.
748 (x86_64-*-linux*): Likewise.
749 (x86_64-*-mingw*): Likewise.
750 (x86_64-*-cygwin*): Likewise.
751
752 2018-04-18 Alan Hayward <alan.hayward@arm.com>
753
754 * tdesc.c: Remove xml parameter.
755
756 2018-04-18 Alan Hayward <alan.hayward@arm.com>
757
758 * server.c (get_features_xml): Remove cast.
759 * tdesc.c (void target_desc::accept): Fill in function.
760 (tdesc_get_features_xml): Remove old xml creation.
761 (print_xml_feature::visit_pre): Add xml vistor.
762 * tdesc.h (struct target_desc): Make xmltarget mutable.
763 (tdesc_get_features_xml): Remove declaration.
764
765 2018-04-18 Alan Hayward <alan.hayward@arm.com>
766
767 * tdesc.c (tdesc_architecture_name): Add new function.
768 (tdesc_osabi_name): Likewise.
769 (tdesc_get_features_xml): Use new functions.
770
771 2018-04-18 Alan Hayward <alan.hayward@arm.com>
772
773 * tdesc.c (tdesc_create_flags): Remove.
774 (tdesc_add_flag): Likewise.
775 (tdesc_named_type): Likewise.
776 (tdesc_create_union): Likewise.
777 (tdesc_create_struct): Likewise.
778 (tdesc_create_vector): Likewise.
779 (tdesc_add_bitfield): Likewise.
780 (tdesc_add_field): Likewise.
781 (tdesc_set_struct_size): Likewise.
782
783 2018-04-18 Alan Hayward <alan.hayward@arm.com>
784
785 * tdesc.c (~target_desc): Remove implictly deleted items.
786 (init_target_desc): Iterate all features.
787 (tdesc_get_features_xml): Use vector.
788 (tdesc_create_feature): Create feature.
789 * tdesc.h (tdesc_feature) Remove
790 (target_desc): Add features.
791
792 2018-04-18 Alan Hayward <alan.hayward@arm.com>
793
794 * Makefile.in: Add common/tdesc.c
795 * tdesc.c (init_target_desc): init all reg_defs from register
796 vector.
797 (tdesc_create_reg): Create tdesc_reg.
798 * tdesc.h (tdesc_feature): Add register vector.
799
800 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
801
802 * tdesc.h (struct target_desc) <features>: Change type to
803 std::vector<std::string>.
804 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
805 changes.
806 (tdesc_get_features_xml): Likewise.
807 (tdesc_create_feature): Likewise.
808
809 2018-03-26 Alan Hayward <alan.hayward@arm.com>
810
811 * regcache.c (find_register_by_number): Return a ref.
812 (find_regno): Use references.
813 (register_size): Likewise.
814 (register_data): Likewise.
815 * tdesc.c (target_desc::~target_desc): Remove free calls.
816 (target_desc::operator==): Use std::vector compare.
817 (init_target_desc): Use reference.
818 (tdesc_create_reg): Use reg constructors.
819 * tdesc.h (struct target_desc): Replace pointer with object.
820
821 2018-03-23 Alan Hayward <alan.hayward@arm.com>
822
823 * regcache.c (find_register_by_number): Make static.
824 (find_regno): Use find_register_by_number
825 * regcache.h (struct reg): Remove declaration.
826
827 2018-03-23 Alan Hayward <alan.hayward@arm.com>
828
829 * tdesc.c (target_desc::~target_desc): Move to here.
830 (target_desc::operator==): Likewise.
831 * tdesc.h (target_desc::~target_desc): Move from here.
832 (target_desc::operator==): Likewise.
833
834 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
835
836 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
837
838 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
839
840 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
841 S390_TDESC_GS.
842 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
843 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
844 and init_registers_s390_gs_linux64.
845
846 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
847
848 * linux-s390-low.c (s390_fill_gs): Remove function.
849 (s390_fill_gsbc): Remove function.
850 (s390_regsets): Set fill functions for the guarded storage regsets
851 to NULL.
852
853 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
854
855 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
856 the word size. Add comment.
857 (s390_get_wordsize): New function.
858 (s390_arch_setup): No longer select a temporary tdesc to fetch the
859 pswm with it. Instead, use s390_get_wordsize to determine the
860 word size first and derive the correct tdesc from that directly.
861
862 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
863
864 * Makefile.in: Include silent-rules.mk.
865 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
866 (COMPILE): Add ECHO_CXX.
867 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
868 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
869 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
870 (version-generated.c): Add ECHO_GEN.
871 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
872 (IPAGENT_COMPILE): Add ECHO_CXX.
873 (%-generated.c): Add ECHO_REGDAT.
874
875 2018-03-14 Tom Tromey <tom@tromey.com>
876
877 PR cli/14977:
878 * ax.c (ax_printf): Special case for NULL.
879
880 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
881
882 * linux-low.c (linux_qxfer_libraries_svr4): Use
883 xml_escape_text_append.
884
885 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
886
887 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
888
889 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
890
891 * server.c (handle_general_set): Remove unnecessary xstrdup.
892
893 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
894
895 * server.c (parse_debug_format_options): Adjust to
896 delim_string_to_char_ptr_vec changes.
897 * thread-db.c (thread_db_load_search): Adjust to
898 dirnames_to_char_ptr_vec changes.
899
900 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
901
902 * target.h (target_enable_btrace, target_disable_btrace)
903 (target_read_btrace, target_read_btrace_conf): Turn macro into
904 inline function. Throw error if target method is not defined.
905 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
906 check for btrace target method. Be prepared to handle exceptions
907 from btrace target methods.
908
909 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
910
911 * server.c (captured_main): Change order of error message printed
912 when the current working directory cannot be found.
913
914 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
915
916 * server.c: Include "filenames.h" and "pathstuff.h".
917 (program_name): Delete variable.
918 (program_path): New anonymous class.
919 (get_exec_wrapper): Use "program_path" instead of
920 "program_name".
921 (handle_v_run): Likewise.
922 (captured_main): Likewise.
923 (process_serial_event): Likewise.
924
925 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
926
927 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
928 (OBJS): Add "pathstuff.o".
929 * server.c (current_directory): New global variable.
930 (captured_main): Initialize "current_directory".
931
932 2018-02-26 Alan Hayward <alan.hayward@arm.com>
933
934 * tdesc.c: Use common/tdesc.h.
935 * tdesc.h: Likewise.
936
937 2018-02-20 Alan Hayward <alan.hayward@arm.com>
938 Simon Marchi <simon.marchi@ericsson.com>
939
940 * Makefile.in: Switch order of make rules.
941
942 2018-02-19 Alan Hayward <alan.hayward@arm.com>
943
944 * Makefile.in: Add common directory in build.
945 * configure.ac: Add common reference.
946 * configure: Regenerate.
947
948 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
949
950 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
951 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
952 * spu-low.c (spu_target_ops): Likewise.
953 * win32-low.c (win32_target_ops): Likewise.
954 * server.c (supported_btrace_packets): Report packets unconditionally.
955 * target.h (target_ops) <supports_btrace>: Remove.
956 (target_supports_btrace): Remove.
957
958 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
959
960 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
961 (handle_btrace_disable): Change return type to void. Use exceptions
962 to report errors.
963 (handle_btrace_general_set): Catch exception and copy message to
964 return message.
965
966 2018-02-08 Tom Tromey <tom@tromey.com>
967
968 * linux-low.c (install_software_single_step_breakpoints): Use
969 make_scoped_restore.
970 * inferiors.c (make_cleanup_restore_current_thread): Remove.
971 (do_restore_current_thread_cleanup): Remove.
972 * gdbthread.h (make_cleanup_restore_current_thread): Don't
973 declare.
974
975 2018-02-08 Tom Tromey <tom@tromey.com>
976
977 * mem-break.c (set_raw_breakpoint_at): Use
978 gdb::unique_xmalloc_ptr.
979
980 2018-01-30 Pedro Alves <palves@redhat.com>
981
982 PR gdb/13211
983 * target.c (target_terminal::terminal_state): Rename to ...
984 (target_terminal::m_terminal_state): ... this.
985
986 2018-01-19 James Clarke <jrtc27@jrtc27.com>
987
988 * linux-low.c (handle_extended_wait): Surround call to
989 thread_db_notice_clone with #ifdef USE_THREAD_DB.
990
991 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
992
993 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
994 linux_ptrace_attach_fail_reason_string now returning an
995 std::string.
996 (linux_attach): Likewise.
997 * thread-db.c (attach_thread): Likewise.
998
999 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
1000
1001 PR gdb/21559
1002 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
1003 checking for fs_base/gs_base fields in struct user_regs_struct.
1004 * configure: Regenerate.
1005
1006 2018-01-16 Yao Qi <yao.qi@linaro.org>
1007
1008 PR gdb/18749
1009 * linux-low.c (fetch_register): Call supply_register instead of
1010 error.
1011
1012 2018-01-08 Yao Qi <yao.qi@linaro.org>
1013 Simon Marchi <simon.marchi@ericsson.com>
1014
1015 * Makefile.in (OBS): Remove selftest.o.
1016 * configure.ac: Set srv_selftest_objs if $development is true.
1017 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
1018 * configure: Re-generated.
1019 * server.c (captured_main): Wrap variable selftest_filter with
1020 GDB_SELF_TEST.
1021
1022 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
1023
1024 * server.c (parse_debug_format_options): Return std::string.
1025 (handle_monitor_command, captured_main): Adjust.
1026
1027 2018-01-05 Pedro Alves <palves@redhat.com>
1028
1029 PR gdb/18653
1030 * server.c (captured_main): Pass quiet=false to
1031 save_original_signals_state.
1032
1033 2018-01-01 Joel Brobecker <brobecker@adacore.com>
1034
1035 * gdbreplay.c (gdbreplay_version): Update copyright year in
1036 version message.
1037 * server.c (gdbserver_version): Likewise.
1038
1039 2017-12-08 Tom Tromey <tom@tromey.com>
1040
1041 * ax.c (ax_printf): Update.
1042
1043 2017-12-07 Yao Qi <yao.qi@linaro.org>
1044
1045 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
1046 aarch64_linux_read_description.
1047 * linux-amd64-ipa.c (idx2mask): New array.
1048 (get_ipa_tdesc): Move idx2mask out.
1049 (initialize_low_tracepoint): Initialize target descriptions.
1050 * linux-i386-ipa.c (idx2mask): New array.
1051 (get_ipa_tdesc): Move idx2mask out.
1052 (initialize_low_tracepoint): Initialize target descriptions.
1053
1054 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
1055
1056 * tdesc.c (struct tdesc_type): Change return type.
1057 (tdesc_add_flag): Change parameter type.
1058 (tdesc_add_bitfield): Likewise.
1059 (tdesc_add_field): Likewise.
1060 (tdesc_set_struct_size): Likewise.
1061
1062 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
1063
1064 * regcache.c (registers_to_string): Remove unused variable.
1065
1066 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1067
1068 * inferiors.c (for_each_inferior_with_data): Remove.
1069 * inferiors.h (for_each_inferior_with_data): Remove.
1070 * server.c (handle_qxfer_threads_worker): Change parameter type.
1071 (handle_qxfer_threads_proper): Use for_each_thread.
1072
1073 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1074
1075 * inferiors.c (for_each_inferior): Remove.
1076 (clear_inferiors): Use for_each_thread.
1077 * inferiors.h (for_each_inferior): Remove.
1078 * linux-low.c (linux_wait_for_event_filtered): Use
1079 for_each_thread.
1080 (linux_stabilize_threads): Likewise.
1081 * regcache.c (regcache_release): Likewise.
1082 * server.c (gdb_wants_all_threads_stopped): Likewise.
1083 (clear_pending_status_callback): Remove.
1084 (handle_status): Use for_each_thread.
1085 (captured_main): Likewise.
1086 * win32-low.c (child_init_thread_list): Likewise.
1087 (win32_clear_inferiors): Likewise.
1088 (fake_breakpoint_event): Likewise.
1089
1090 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1091
1092 * inferiors.h (find_inferior): Remove.
1093 * inferiors.c (find_inferior): Remove.
1094
1095 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1096
1097 * linux-low.c (resume_status_pending_p): Update comment.
1098 (need_step_over_p): Update comment.
1099
1100 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1101
1102 * linux-low.c (proceed_one_lwp): Return void, change parameter
1103 type.
1104 (unsuspend_and_proceed_one_lwp): Likewise.
1105 (proceed_all_lwps): Use for_each_thread.
1106 (unstop_all_lwps): Likewise.
1107
1108 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1109
1110 * linux-low.c (linux_resume_one_thread): Return void, take
1111 parameter directly.
1112 (linux_resume): Use for_each_thread.
1113
1114 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1115
1116 * linux-low.c (send_sigstop_callback): Return void, change
1117 parameter type. Rename to...
1118 (send_sigstop): ... this.
1119 (suspend_and_send_sigstop_callback): Return void, change parameter
1120 type. Rename to...
1121 (suspend_and_send_sigstop): ... this.
1122 (stop_all_lwps): Use for_each_thread.
1123
1124 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1125
1126 * linux-low.c (lwp_running): Return bool, remove unused
1127 argument.
1128 (linux_stabilize_threads): Use find_thread.
1129
1130 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1131
1132 * linux-low.c (select_singlestep_lwp_callback): Remove.
1133 (count_events_callback): Remove.
1134 (select_event_lwp_callback): Remove.
1135 (select_event_lwp): Use find_thread/for_each_thread.
1136
1137 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1138
1139 * linux-low.c (not_stopped_callback): Return bool, take filter
1140 argument directly.
1141 (linux_wait_for_event_filtered): Use find_thread.
1142 (linux_wait_1): Likewise.
1143
1144 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1145
1146 * linux-low.c (same_lwp): Remove.
1147 (find_lwp_pid): Use find_thread.
1148
1149 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1150
1151 * linux-low.c (delete_lwp_callback): Remove.
1152 (linux_mourn): Use for_each_thread.
1153
1154 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1155
1156 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1157 args parameter, don't check for pid.
1158 (linux_detach): Use for_each_thread.
1159
1160 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1161
1162 * linux-low.c (struct counter): Remove.
1163 (second_thread_of_pid_p): Remove.
1164 (last_thread_of_process_p): Use find_thread.
1165
1166 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1167
1168 * inferiors.c (find_inferior_in_random): Remove.
1169 * inferiors.h (find_inferior_in_random): Remove.
1170 * linux-low.c (status_pending_p_callback): Return bool, accept
1171 parameter ptid directly.
1172 (linux_wait_for_event_filtered): Use find_thread_in_random.
1173 (linux_wait_1): Likewise.
1174
1175 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1176
1177 * inferiors.c (find_inferior_id): Remove.
1178 (find_thread_ptid): Move implemention from find_inferior_id to
1179 here.
1180 * inferiors.h (find_inferior_id): Remove.
1181 * server.c (handle_status): Use find_thread_ptid.
1182 (process_serial_event): Likewise.
1183 * thread-db.c (find_one_thread): Likewise.
1184 (thread_db_thread_handle): Likewise.
1185 * win32-low.c (thread_rec): Likewise.
1186 (child_delete_thread): Likewise.
1187 (win32_thread_alive): Likewise.
1188 (get_child_debug_event): Likewise.
1189
1190 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1191
1192 * linux-mips-low.c (update_watch_registers_callback): Return
1193 void, remove pid_p parameter, don't check for pid.
1194 (mips_insert_point, mips_remove_point): Use for_each_thread.
1195
1196 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1197
1198 * lynx.low (lynx_delete_thread_callback): Remove.
1199 (lynx_mourn): Use for_each_thread.
1200
1201 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1202
1203 * regcache.c (regcache_invalidate_one): Remove.
1204 (regcache_invalidate_pid): use for_each_thread.
1205
1206 2017-11-26 Tom Tromey <tom@tromey.com>
1207
1208 * linux-low.c (linux_create_inferior): Update.
1209
1210 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1211
1212 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1213
1214 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1215
1216 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1217 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1218 * linux-aarch64-tdesc-selftest.c: New file.
1219 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1220
1221 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1222
1223 * configure.srv: Add new file.
1224 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1225 * linux-aarch64-tdesc-selftest.c: New file.
1226 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1227
1228 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1229
1230 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1231 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1232 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1233
1234 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1235
1236 * configure.srv: Add new files.
1237 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1238 aarch64_linux_read_description.
1239 * linux-aarch64-low.c (aarch64_linux_read_description):
1240 Merge with aarch64_arch_setup.
1241 (aarch64_arch_setup): Call aarch64_linux_read_description.
1242 * linux-aarch64-tdesc.c: New file.
1243 * linux-aarch64-tdesc.h: New file.
1244
1245 2017-11-24 Yao Qi <yao.qi@linaro.org>
1246
1247 * configure.srv: Set $srv_regobj for tic6x-linux.
1248 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1249 (tic6x_read_description): Move some code to tic6x_arch_setup.
1250 (tic6x_tdesc_test): New function.
1251 (initialize_low_arch): Call selftests::register_test.
1252
1253 2017-11-22 Yao Qi <yao.qi@linaro.org>
1254
1255 * remote-utils.c (prepare_resume_reply): Use memcpy.
1256
1257 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1258
1259 * linux-low.c (kill_one_lwp_callback): Return void, take
1260 argument directly, don't filter on pid.
1261 (linux_kill): Use for_each_thread.
1262
1263 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1264
1265 * linux-low.c (need_step_over_p): Return bool, remove dummy
1266 argument.
1267 (linux_resume, proceed_all_lwps): Use find_thread.
1268
1269 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1270
1271 * linux-low.c (resume_status_pending_p): Return bool, remove
1272 flag_p argument.
1273 (linux_resume): Use find_thread.
1274
1275 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1276
1277 * linux-low.c (struct thread_resume_array): Remove.
1278 (linux_set_resume_request): Return void, take arguments
1279 directly.
1280 (linux_resume): Use for_each_thread.
1281
1282 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1283
1284 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1285 return bool, remove data argument.
1286 (linux_stabilize_threads): Use find_thread.
1287
1288 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1289
1290 * linux-low.c (unsuspend_one_lwp): Remove.
1291 (unsuspend_all_lwps): Use for_each_thread, inline code from
1292 unsuspend_one_lwp.
1293
1294 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1295
1296 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1297 * linux-low.c (struct iterate_over_lwps_args): Remove.
1298 (iterate_over_lwps_filter): Remove.
1299 (iterate_over_lwps): Use find_thread.
1300
1301 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1302
1303 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1304 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1305 code from reset_lwp_ptrace_options_callback.
1306
1307 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1308
1309 * linux-arm-low.c (struct update_registers_data): Remove.
1310 (update_registers_callback): Return void, take arguments
1311 directly, don't check thread's pid.
1312 (arm_insert_point, arm_remove_point): Use for_each_thread.
1313
1314 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1315
1316 * win32-low.c (continue_one_thread): Return void, take argument
1317 directly.
1318 (child_continue): Use for_each_thread.
1319
1320 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1321
1322 * win32-i386-low.c (update_debug_registers_callback): Rename
1323 to ...
1324 (update_debug_registers): ... this, return void, remove pid_p arg.
1325 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1326
1327 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1328
1329 * inferiors.h (struct process_info): Add constructor, initialize
1330 fields..
1331 <syscalls_to_catch>: Change type to std::vector<int>.
1332 * inferiors.c (add_process): Allocate process_info with new.
1333 (remove_process): Free process_info with delete.
1334 * linux-low.c (handle_extended_wait): Adjust.
1335 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1336 * server.c (handle_general_set): Adjust.
1337
1338 2017-11-16 Pedro Alves <palves@redhat.com>
1339
1340 * remote-utils.c (remote_close): Block SIGIO signals instead of
1341 uninstalling the SIGIO handler.
1342
1343 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1344
1345 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1346
1347 2017-11-16 Yao Qi <yao.qi@linaro.org>
1348
1349 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1350 (tic6x_store_gregset): Likewise.
1351 (tic6x_usrregs_info): Move it up.
1352
1353 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1354
1355 * Makefile.in: Update arch rules.
1356 * configure.srv: Explicitly mark arch/ files.
1357
1358 2017-11-13 Andreas Schwab <schwab@suse.de>
1359
1360 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1361 function.
1362 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1363
1364 2017-11-06 Pedro Alves <palves@redhat.com>
1365
1366 * config.in, configure: Regenerate.
1367
1368 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1369
1370 * target.c (struct thread_search): Remove.
1371 (thread_search_callback): Remove.
1372 (prepare_to_access_memory): Use for_each_thread instead of
1373 find_inferior. Inline code from thread_search_callback.
1374
1375 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1376
1377 * server.c (struct visit_actioned_threads_data): Remove.
1378 (visit_actioned_threads): Change prototype to take arguments
1379 directly.
1380 (resume): Use find_thread instead of find_inferior.
1381
1382 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1383
1384 * server.c (queue_stop_reply_callback): Change prototype, return
1385 void.
1386 (find_status_pending_thread_callback): Remove.
1387 (handle_status): Replace find_inferior with find_thread and
1388 for_each_thread.
1389
1390 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1391
1392 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1393 with REGNO.
1394 (aarch64_store_gregset): Likewise.
1395 (aarch64_fill_fpregset): Likewise.
1396 (aarch64_store_fpregset): Likewise.
1397
1398 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1399
1400 * gdbthread.h (find_thread, for_each_thread): New functions.
1401 * inferiors.c (thread_of_pid): Remove.
1402 (find_any_thread_of_pid): Use find_thread.
1403 * linux-low.c (num_lwps): Use for_each_thread.
1404
1405 2017-10-17 Yao Qi <yao.qi@linaro.org>
1406
1407 * Makefile.in: Remove one rule.
1408 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1409
1410 2017-10-17 Yao Qi <yao.qi@linaro.org>
1411
1412 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1413 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1414
1415 2017-10-17 Yao Qi <yao.qi@linaro.org>
1416
1417 * configure.srv: Rename arm.o with arch/arm.o.
1418
1419 2017-10-17 Yao Qi <yao.qi@linaro.org>
1420
1421 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1422 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1423 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1424 (arch-i386.o, arch-amd64.o): Remove rules.
1425 (arch/%.o): New rule.
1426 Update POSTCOMPILE and COMPILE.pre.
1427 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1428 * configure: Re-generated.
1429 * configure.srv: Replace arch-i386.o with arch/i386.o.
1430 Replace arch-amd64.o with arch/amd64.o.
1431
1432 2017-10-16 Yao Qi <yao.qi@linaro.org>
1433
1434 * configure: Regenerated.
1435
1436 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1437
1438 * inferiors.h: (struct inferior_list): Remove.
1439 (struct inferior_list_entry); Remove.
1440 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1441 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1442 get_first_inferior): Remove.
1443 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1444 find_inferior_id, find_inferior_in_random): Change signature.
1445 * inferiors.c (all_threads): Change type to
1446 std::list<thread_info *>.
1447 (get_thread): Remove macro.
1448 (find_inferior, find_inferior_id): Change signature, implement
1449 using find_thread.
1450 (find_inferior_in_random): Change signature, implement using
1451 find_thread_in_random.
1452 (for_each_inferior, for_each_inferior_with_data): Change
1453 signature, implement using for_each_thread.
1454 (add_inferior_to_list, remove_inferior): Remove.
1455 (add_thread, get_first_thread, thread_of_pid,
1456 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1457 (get_first_inferior, one_inferior_p, clear_inferior_list):
1458 Remove.
1459 (clear_inferiors, get_thread_process): Update.
1460 * gdbthread.h: Include <list>.
1461 (struct thread_info) <entry>: Remove field.
1462 <id>: New field.
1463 (all_threads): Change type to std::list<thread_info *>.
1464 (get_first_inferior): Add doc.
1465 (find_thread, for_each_thread, find_thread_in_random): New
1466 functions.
1467 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1468 * linux-arm-low.c (update_registers_callback): Update.
1469 * linux-low.c (second_thread_of_pid_p): Update.
1470 (kill_one_lwp_callback, linux_detach_lwp_callback,
1471 delete_lwp_callback, status_pending_p_callback, same_lwp,
1472 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1473 iterate_over_lwps, not_stopped_callback,
1474 resume_stopped_resumed_lwps, count_events_callback,
1475 select_singlestep_lwp_callback, select_event_lwp_callback,
1476 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1477 suspend_and_send_sigstop_callback, wait_for_sigstop,
1478 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1479 lwp_running, linux_set_resume_request, resume_status_pending_p,
1480 need_step_over_p, start_step_over, linux_resume_one_thread,
1481 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1482 reset_lwp_ptrace_options_callback): Update.
1483 * linux-mips-low.c (update_watch_registers_callback): Update.
1484 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1485 Update.
1486 (free_register_cache_thread_one): Remove.
1487 (regcache_release): Update.
1488 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1489 handle_qxfer_threads_worker): Update.
1490 (handle_query): Update, use list iterator.
1491 (visit_actioned_threads, handle_pending_status,
1492 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1493 clear_pending_status_callback, set_pending_status_callback,
1494 find_status_pending_thread_callback, handle_status,
1495 process_serial_event): Update.
1496 * target.c (thread_search_callback): Update.
1497 * thread-db.c (thread_db_get_tls_address): Update.
1498 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1499 Update.
1500 * win32-i386-low.c (update_debug_registers_callback): Update.
1501 * win32-low.c (delete_thread_info, child_delete_thread,
1502 continue_one_thread, suspend_one_thread,
1503 get_child_debug_event): Adjust.
1504
1505 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1506
1507 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1508 * inferiors.h: Include <list>.
1509 (struct process_info) <entry>: Remove field.
1510 <pid>: New field.
1511 (pid_of): Change macro to function.
1512 (ptid_of, lwpid_of): Remove macro.
1513 (all_processes): Change type to std::list<process_info *>.
1514 (ALL_PROCESSES): Remove macro.
1515 (for_each_process, find_process): New function.
1516 * inferiors.c (all_processes): Change type to
1517 std::list<process_info *>.
1518 (find_thread_process): Adjust.
1519 (add_process): Likewise.
1520 (remove_process): Likewise.
1521 (find_process_pid): Likewise.
1522 (get_first_process): Likewise.
1523 (started_inferior_callback): Remove.
1524 (have_started_inferiors_p): Adjust.
1525 (attached_inferior_callback): Remove.
1526 (have_attached_inferiors_p): Adjust.
1527 * linux-low.c (check_zombie_leaders): Likewise.
1528 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1529 (x86_linux_update_xmltarget): Adjust.
1530 * server.c (handle_query): Likewise.
1531 (gdb_reattached_process): Remove.
1532 (handle_status): Adjust.
1533 (kill_inferior_callback): Likewise.
1534 (detach_or_kill_inferior): Remove.
1535 (print_started_pid): Likewise.
1536 (print_attached_pid): Likewise.
1537 (detach_or_kill_for_exit): Update.
1538 (process_serial_event): Likewise.
1539 * linux-arm-low.c (arm_new_fork): Likewise.
1540
1541 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1542
1543 * dll.h: Include <list>.
1544 (struct dll_info): Add constructor.
1545 <entry>: Remove field.
1546 (all_dlls): Change type to std::list<dll_info>.
1547 * dll.c: Include <algorithm>.
1548 (get_dll): Remove macro.
1549 (all_dlls): Change type to std::list<dll_info *>.
1550 (free_one_dll): Remove.
1551 (match_dll): Likewise.
1552 (loaded_dll): Adjust.
1553 (unloaded_dll): Adjust to all_dlls type change, use
1554 std::find_if. Inline code from match_dll.
1555 (clear_dlls): Adjust to all_dlls type change.
1556 * server.c (emit_dll_description): Remove.
1557 (handle_qxfer_libraries): Adjust to all_dlls type change,
1558 integrate emit_dll_description's functionality.
1559
1560 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1561
1562 * linux-low.h (struct linux_target_ops) <delete_process>: New
1563 field.
1564 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1565 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1566 (struct linux_target_ops): Add delete_process callback.
1567 * linux-arm-low.c (arm_delete_process): New.
1568 (struct linux_target_ops): Add delete_process callback.
1569 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1570 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1571 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1572 * linux-mips-low.c (mips_linux_delete_process): New.
1573 (struct linux_target_ops): Add delete_process callback.
1574 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1575 * linux-s390-low.c (struct linux_target_ops): Likewise.
1576 * linux-sh-low.c (struct linux_target_ops): Likewise.
1577 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1578 * linux-tile-low.c (struct linux_target_ops): Likewise.
1579 * linux-x86-low.c (x86_linux_delete_process): New.
1580 (struct linux_target_ops): Add delete_process callback.
1581 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1582
1583 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1584
1585 * linux-aarch64-low.c (the_low_target): Add thread delete
1586 callback.
1587 * linux-arm-low.c (arm_delete_thread): New function.
1588 (the_low_target): Add thread delete callback.
1589 * linux-bfin-low.c (the_low_target): Likewise.
1590 * linux-crisv32-low.c (the_low_target): Likewise.
1591 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1592 set.
1593 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1594 field.
1595 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1596 * linux-mips-low.c (mips_linux_delete_thread): New function.
1597 (the_low_target): Add thread delete callback.
1598 * linux-ppc-low.c (the_low_target): Likewise.
1599 * linux-s390-low.c (the_low_target): Likewise.
1600 * linux-sh-low.c (the_low_target): Likewise.
1601 * linux-tic6x-low.c (the_low_target): Likewise.
1602 * linux-tile-low.c (the_low_target): Likewise.
1603 * linux-x86-low.c (the_low_target): Likewise.
1604 * linux-xtensa-low.c (the_low_target): Likewise.
1605
1606 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1607
1608 * win32-low.c: Include "common-inferior.h".
1609
1610 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1611
1612 * inferiors.c (set_inferior_cwd): New function.
1613 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1614 (handle_query): Inform that QSetWorkingDir is supported.
1615 * win32-low.c (create_process): Pass the inferior's cwd to
1616 CreateProcess.
1617
1618 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1619
1620 * inferiors.c (current_inferior_cwd): New global variable.
1621 (get_inferior_cwd): New function.
1622 * inferiors.h (struct process_info) <cwd>: New field.
1623
1624 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1625
1626 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1627 (OBS): Add gdb_tilde_expand.o.
1628
1629 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1630
1631 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1632 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1633
1634 2017-09-29 Pedro Alves <palves@redhat.com>
1635
1636 * ax.c (gdb_parse_agent_expr): Constify.
1637 * ax.h (gdb_parse_agent_expr): Constify.
1638 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1639 Constify.
1640 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1641 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1642 * remote-utils.h (read_ptid): Constify.
1643 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1644 (process_point_options, process_serial_event): Constify.
1645 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1646 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1647 (cmd_qtbuffer): Constify.
1648
1649 2017-09-29 Pedro Alves <palves@redhat.com>
1650
1651 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1652 fails.
1653
1654 2017-09-29 Pedro Alves <palves@redhat.com>
1655
1656 * linux-low.c (handle_extended_wait): Pass parent thread instead
1657 of process to thread_db_notice_clone.
1658 * linux-low.h (thread_db_notice_clone): Replace parent process
1659 parameter with parent thread parameter.
1660 * thread-db.c (find_one_thread): Add comment.
1661 (thread_db_notice_clone): Replace parent process parameter with
1662 parent thread parameter. Temporarily switch to the parent thread.
1663
1664 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1665
1666 * gdbthread.h: Include "common-gdbthread.h".
1667 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1668 "if" when validating the ptid.
1669 * remote-utils.c: Include "gdbthread.h".
1670 (prepare_resume_reply): Use "switch_to_thread".
1671 * target.c (done_accessing_memory): Likewise.
1672
1673 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1674
1675 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1676 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1677 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1678 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1679 s390x-gs-linux64-ipa.o to ipa_obj.
1680 * linux-s390-low.c (HWCAP_S390_GS): New define.
1681 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1682 New functions.
1683 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1684 (s390_arch_setup): Check for guarded-storage support and choose
1685 appropriate tdesc.
1686 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1687 init_registers_s390x_gs_linux64.
1688 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1689 enum value.
1690 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1691 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1692
1693 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1694
1695 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1696
1697 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1698
1699 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1700 (thread_db_thread_handle): Declare.
1701 * linux-low.c (linux_target_ops): Initialize thread_handle.
1702 * server.c (handle_qxfer_threads_worker): Add support for
1703 "handle" attribute.
1704 * target.h (struct target_ops): Add new function pointer,
1705 thread_handle.
1706 (target_thread_handle): Define.
1707 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1708 field in lwp.
1709 (thread_db_thread_handle): New function.
1710
1711 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1712
1713 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1714 * linux-low.h (thread_db_notice_clone): Declare.
1715 * thread-db.c (thread_db_notice_clone): New function.
1716
1717 2017-09-21 Pedro Alves <palves@redhat.com>
1718
1719 * server.c (gdb_read_memory, handle_status, process_serial_event)
1720 (handle_serial_event, handle_target_event): Adjust to
1721 set_desired_thread prototype change.
1722 * target.c (set_desired_thread): Remove 'use_general' parameter
1723 and adjust.
1724 * target.h (set_desired_thread): Remove 'use_general' parameter.
1725
1726 2017-09-20 Tom Tromey <tom@tromey.com>
1727
1728 * target.c (target_terminal::terminal_state): Define.
1729 (target_terminal::init): Rename from target_terminal_init.
1730 (target_terminal::inferior): Rename from
1731 target_terminal_inferior.
1732 (target_terminal::ours): Rename from target_terminal_ours.
1733 (target_terminal::ours_for_output, target_terminal::info): New.
1734
1735 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1736
1737 * server.c (accumulate_file_name_length): Remove.
1738 (emit_dll_description): Adjust to std::string change.
1739 (handle_qxfer_libraries): Use std::string to hold document.
1740
1741 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1742
1743 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1744 return type of xml_escape_text.
1745 * server.c (emit_dll_description): Likewise.
1746
1747 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1748
1749 * server.c (captured_main): Accept argument for --selftest.
1750 Update run_tests call.
1751 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1752 when registering selftests.
1753
1754 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1755
1756 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1757 instead of "VEC" for "target_desc.reg_defs".
1758 (regcache_cpy): Likewise.
1759 (registers_to_string): Likewise.
1760 (registers_from_string): Likewise.
1761 (find_regno): Likewise.
1762 (supply_regblock): Likewise.
1763 (regcache_raw_read_unsigned): Likewise.
1764 * tdesc.c (init_target_desc): Likewise.
1765 (tdesc_create_reg): Likewise.
1766 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1767 (struct target_desc) <reg_defs>: Convert to "std::vector".
1768 (target_desc): Do not initialize "reg_defs".
1769 (~target_desc): Update code to use "std::vector" instead of "VEC"
1770 for "target_desc.reg_defs".
1771 (operator==): Likewise.
1772
1773 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1774
1775 * inferiors.h (thread_to_gdb_id): Remove.
1776 * inferiors.c (thread_to_gdb_id): Remove.
1777 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1778 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1779 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1780 Likewise.
1781 * nto-low.c (nto_fetch_registers, nto_store_registers,
1782 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1783
1784 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1785
1786 * inferiors.h (gdb_id_to_thread_id): Remove.
1787 * inferiors.c (gdb_id_to_thread_id): Remove.
1788 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1789 removal. Move pid declaration closer to where it's used.
1790
1791 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1792
1793 * server.c (handle_detach): New function.
1794 (process_serial_event): Move code out, call handle_detach.
1795
1796 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1797
1798 * server.c (require_running): Rename to ...
1799 (require_running_or_return): ... this ...
1800 (require_running_or_break): ... and this.
1801 (handle_query, process_serial_event): Adjust.
1802
1803 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1804
1805 * linux-low.c (linux_set_resume_request): Remove unused
1806 variables.
1807
1808 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1809
1810 * server.c (first_thread_of): Remove.
1811 (process_serial_event): Replace usage of first_thread_of with
1812 find_any_thread_of_pid.
1813 * tracepoint.c (same_process_p): Remove.
1814 (gdb_agent_about_to_close): Replace usage of same_process_p with
1815 find_any_thread_of_pid.
1816 * linux-x86-low.c (same_process_callback): Remove.
1817 (x86_arch_setup_process_callback): Replace usage of
1818 same_process_callback with find_any_thread_of_pid.
1819 * thread-db.c (any_thread_of): Remove.
1820 (switch_to_process): Replace usage of any_thread_of with
1821 find_any_thread_of_pid.
1822 * inferiors.c (thread_pid_matches_callback): Remove.
1823 (find_thread_process): Adjust to use find_any_thread_of_pid.
1824
1825 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1826
1827 * regcache.c (get_thread_regcache): Guard calls to "memset"
1828 with "!VEC_empty".
1829
1830 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1831
1832 * linux-low.c (handle_extended_wait): Use
1833 "allocate_target_description" instead of "XNEW".
1834 * linux-x86-low.c (initialize_low_arch): Likewise.
1835
1836 2017-09-05 Yao Qi <yao.qi@linaro.org>
1837
1838 * configure.srv (srv_i386_regobj): Remove.
1839 (srv_amd64_regobj): Remove.
1840 (srv_regobj): Set it to "" for x86 non-linux targets.
1841 * linux-x86-tdesc.c (i386_linux_read_description):
1842 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1843 (init_registers_i386): Remove the declaration.
1844 (tdesc_i386): Remove the declaration.
1845 (lynx_i386_arch_setup): Call i386_create_target_description.
1846 * nto-x86-low.c: Likewise.
1847 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1848 [!__x86_64__]: include arch/i386.h.
1849 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1850
1851 2017-09-05 Yao Qi <yao.qi@linaro.org>
1852
1853 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1854 i386/amd64-XXX-linux from it.
1855
1856 2017-09-05 Yao Qi <yao.qi@linaro.org>
1857
1858 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1859 false.
1860 (ipa_amd64_linux_regobj): Remove.
1861 (ipa_x32_linux_regobj): Remove.
1862
1863 2017-09-05 Yao Qi <yao.qi@linaro.org>
1864
1865 * Makefile.in (arch-amd64.o): New rule.
1866 * configure.srv: Append arch-amd64.o.
1867 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1868 (get_ipa_tdesc): Call amd64_linux_read_description.
1869 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1870 and init_registers_amd64_XXX.
1871 * linux-x86-low.c (x86_linux_read_description): Call
1872 amd64_linux_read_description.
1873 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1874 (initialize_low_arch): Don't call init_registers_x32_XXX and
1875 init_registers_amd64_XXX.
1876 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1877 and tdesc_amd64_XXX.
1878 [__x86_64__] (amd64_tdesc_test): New function.
1879 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1880 and init_registers_amd64_XXX.
1881 * linux-x86-tdesc.c: Include arch/amd64.h.
1882 (xcr0_to_tdesc_idx): New function.
1883 (i386_linux_read_description): New function.
1884 (amd64_get_ipa_tdesc_idx): New function.
1885 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1886 (amd64_get_ipa_tdesc): Declare.
1887
1888 2017-09-05 Yao Qi <yao.qi@linaro.org>
1889
1890 * configure.srv (srv_i386_linux_xmlfiles): Remove
1891 i386/i386-XXX-linux.xml from it.
1892
1893 2017-09-05 Yao Qi <yao.qi@linaro.org>
1894
1895 * configure.srv: Set srv_i386_linux_regobj empty if $development
1896 is false.
1897 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1898 initialize_low_tdesc.
1899 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1900 with #if initialize_low_tdesc.
1901 * linux-x86-tdesc-selftest.c: New file.
1902 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1903
1904 2017-09-05 Yao Qi <yao.qi@linaro.org>
1905
1906 * Makefile.in (arch-i386.o): New rule.
1907 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1908 (x86_64-*-linux*): Likewise.
1909 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1910 include arch/i386.h.
1911 (i386_linux_read_description): Remove code and call
1912 i386_create_target_description.
1913 * tdesc.c (allocate_target_description): New function.
1914 * tdesc.h (set_tdesc_architecture): Remove declaration.
1915 (set_tdesc_osabi): Likewise.
1916
1917 2017-09-05 Yao Qi <yao.qi@linaro.org>
1918
1919 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1920 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1921 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1922 .xmltarget.
1923 * server.c (get_features_xml): Call tdesc_get_features_xml.
1924 * tdesc.c (set_tdesc_architecture): New function.
1925 (set_tdesc_osabi): New function.
1926 (tdesc_get_features_xml): New function.
1927 (tdesc_create_feature): Add an argument.
1928 * tdesc.h (struct target_desc) <features>: New field.
1929 <arch, osabi>: New field.
1930 (~target_desc): xfree features, arch, and osabi.
1931 (target_desc::oerator==): Don't compare .xmltarget.
1932 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1933 (set_tdesc_osabi): Likewise.
1934 (tdesc_get_features_xml): Likewise.
1935
1936 2017-09-05 Yao Qi <yao.qi@linaro.org>
1937
1938 * linux-x86-tdesc.c: Include selftest.h.
1939 (i386_tdesc_test): New function.
1940 (initialize_low_tdesc): Call selftests::register_test.
1941 * tdesc.h: Include regdef.h.
1942 (target_desc): Override operator == and !=.
1943
1944 2017-09-05 Yao Qi <yao.qi@linaro.org>
1945
1946 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1947 (ipa_obj): Likewise.
1948 * linux-i386-ipa.c: Include common/x86-xstate.h
1949 (get_ipa_tdesc): Call i386_linux_read_description.
1950 (initialize_low_tracepoint): Don't call init_registers_XXX
1951 functions, call initialize_low_tdesc instead.
1952 * linux-x86-low.c (x86_linux_read_description): Call
1953 i386_linux_read_description.
1954 (initialize_low_arch): Don't call init_registers_i386_XXX
1955 functions, call initialize_low_tdesc.
1956 * linux-x86-tdesc.c: New file.
1957 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1958 (i386_get_ipa_tdesc_idx): Declare.
1959 (i386_get_ipa_tdesc): Declare.
1960 (initialize_low_tdesc): Declare.
1961
1962 2017-09-05 Yao Qi <yao.qi@linaro.org>
1963
1964 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1965 instead of 0.
1966
1967 2017-09-05 Yao Qi <yao.qi@linaro.org>
1968
1969 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1970 * regcache.c (get_thread_regcache): Use VEC_length.
1971 (init_register_cache): Likewise.
1972 (regcache_cpy): Likewise.
1973 (registers_to_string): Iterate reg_defs via VEC_iterate.
1974 (find_regno): Likewise.
1975 (find_register_by_number): Use VEC_index.
1976 (register_size): Call find_register_by_number.
1977 (register_data): Call find_register_by_number.
1978 (supply_regblock): Use VEC_length.
1979 (regcache_raw_read_unsigned): Likewise.
1980 * tdesc.c (init_target_desc): Iterate reg_defs via
1981 VEC_iterate.
1982 (default_description): Update initializer.
1983 (copy_target_description): Don't update field num_registers.
1984 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1985 <num_registers>: Remove.
1986
1987 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1988
1989 * Makefile.in (.SECONDARY): Define target.
1990
1991 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1992
1993 * linux-low.c (linux_wait_1): Adjust.
1994 * server.c (queue_stop_reply_callback): Adjust.
1995
1996 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1997
1998 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1999 QEnvironmentUnset and QEnvironmentReset packets.
2000 (handle_query): Inform remote that QEnvironmentHexEncoded,
2001 QEnvironmentUnset and QEnvironmentReset are supported.
2002
2003 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
2004
2005 * inferiors.h (inferior_target_data): Rename to ...
2006 (thread_target_data): ... this.
2007 (inferior_regcache_data): Rename to ...
2008 (thread_regcache_data): ... this.
2009 (set_inferior_regcache_data): Rename to ...
2010 (set_thread_regcache_data): ... this.
2011 * inferiors.c (inferior_target_data): Rename to ...
2012 (thread_target_data): ... this.
2013 (inferior_regcache_data): Rename to ...
2014 (thread_regcache_data): ... this.
2015 (set_inferior_regcache_data): Rename to ...
2016 (set_thread_regcache_data): ... this.
2017 (free_one_thread): Update.
2018 * linux-low.h (get_thread_lwp): Update.
2019 * regcache.c (get_thread_regcache): Update.
2020 (regcache_invalidate_thread): Update.
2021 (free_register_cache_thread): Update.
2022 * win32-i386-low.c (update_debug_registers_callback): Update.
2023 (win32_get_current_dr): Update.
2024 * win32-low.c (thread_rec): Update.
2025 (delete_thread_info): Update.
2026 (continue_one_thread): Update.
2027 (suspend_one_thread): Update.
2028
2029 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
2030
2031 * inferiors.c (set_inferior_target_data): Remove.
2032 * inferiors.h (set_inferior_target_data): Remove.
2033
2034 2017-08-18 Yao Qi <yao.qi@linaro.org>
2035
2036 * Makefile.in (OBS): Add selftest.o.
2037 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
2038 * configure, config.in: Re-generated.
2039 * server.c: Include common/sefltest.h.
2040 (captured_main): Handle option --selftest.
2041
2042 2017-08-09 Yao Qi <yao.qi@linaro.org>
2043
2044 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
2045 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
2046 i386-avx-mpx.o and i386-mmx.o.
2047 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
2048 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
2049 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
2050 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
2051 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
2052 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
2053 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
2054 i386/amd64-avx-mpx.xml.
2055
2056 2017-08-09 Yao Qi <yao.qi@linaro.org>
2057
2058 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
2059 and x32-avx-avx512.o.
2060 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
2061 i386/x32-avx-avx512.xml.
2062
2063 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
2064
2065 * tracepoint.h (enum class fast_tpoint_collect_result): New
2066 enumeration.
2067 (fast_tracepoint_collecting): Change return type to
2068 fast_tpoint_collect_result.
2069 * tracepoint.c (fast_tracepoint_collecting): Likewise.
2070 * linux-low.h: Include tracepoint.h.
2071 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
2072 fast_tpoint_collect_result.
2073 * linux-low.c (handle_tracepoints): Adjust.
2074 (linux_fast_tracepoint_collecting): Change return type to
2075 fast_tpoint_collect_result.
2076 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2077 linux_wait_1, stuck_in_jump_pad_callback,
2078 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2079 proceed_one_lwp): Adjust to type change.
2080
2081 2017-07-10 Yao Qi <yao.qi@linaro.org>
2082
2083 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2084
2085 2017-06-29 Yao Qi <yao.qi@linaro.org>
2086
2087 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2088 Remove.
2089 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2090
2091 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2092
2093 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2094
2095 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2096
2097 * linux-low.c (linux_create_inferior): Adjust code to access the
2098 environment information via 'gdb_environ' class.
2099 * lynx-low.c (lynx_create_inferior): Likewise.
2100 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2101 (get_environ): Return a pointer to 'our_environ'.
2102 (captured_main): Initialize 'our_environ'.
2103 * server.h (get_environ): Adjust prototype.
2104 * spu-low.c (spu_create_inferior): Adjust code to access the
2105 environment information via 'gdb_environ' class.
2106
2107 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2108
2109 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2110 usage of "register" keyword.
2111
2112 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2113
2114 * configure: Re-generate.
2115
2116 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2117
2118 * configure: Re-generate.
2119
2120 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2121
2122 * Makefile.in (COMPILE.pre): Add "-x c++".
2123
2124 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2125
2126 * fork-child.c: Conditionally include <signal.h>.
2127
2128 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2129
2130 * server.c (handle_general_set): Handle new packet
2131 "QStartupWithShell".
2132 (handle_query): Add "QStartupWithShell" to the list of supported
2133 packets.
2134 (gdbserver_usage): Add help text explaining the
2135 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2136 options.
2137 (captured_main): Recognize and act upon the presence of the new
2138 CLI options.
2139
2140 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2141 Pedro Alves <palves@redhat.com>
2142
2143 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2144 * configure: Regenerate.
2145 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2146 "fork-inferior.o".
2147 (i[34567]86-*-lynxos*): Likewise.
2148 (spu*-*-*): Likewise.
2149 * fork-child.c: New file.
2150 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2151 and "environ.h".
2152 (linux_ptrace_fun): New function.
2153 (linux_create_inferior): Adjust function prototype to reflect
2154 change on "target.h". Adjust function code to use
2155 "fork_inferior".
2156 (linux_request_interrupt): Delete "signal_pid".
2157 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2158 (lynx_ptrace_fun): New function.
2159 (lynx_create_inferior): Adjust function prototype to reflect
2160 change on "target.h". Adjust function code to use
2161 "fork_inferior".
2162 * nto-low.c (nto_create_inferior): Adjust function prototype and
2163 code to reflect change on "target.h". Update comments.
2164 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2165 "common-terminal.h" and "environ.h".
2166 (terminal_fd): Moved to fork-child.c.
2167 (old_foreground_pgrp): Likewise.
2168 (restore_old_foreground_pgrp): Likewise.
2169 (last_status): Make it global.
2170 (last_ptid): Likewise.
2171 (our_environ): New variable.
2172 (startup_with_shell): Likewise.
2173 (program_name): Likewise.
2174 (program_argv): Rename to...
2175 (program_args): ...this.
2176 (wrapper_argv): New variable.
2177 (start_inferior): Delete function.
2178 (get_exec_wrapper): New function.
2179 (get_exec_file): Likewise.
2180 (get_environ): Likewise.
2181 (prefork_hook): Likewise.
2182 (post_fork_inferior): Likewise.
2183 (postfork_hook): Likewise.
2184 (postfork_child_hook): Likewise.
2185 (handle_v_run): Update code to deal with arguments coming from the
2186 remote host. Update calls from "start_inferior" to
2187 "create_inferior".
2188 (captured_main): Likewise. Initialize environment variable. Call
2189 "have_job_control".
2190 * server.h (post_fork_inferior): New prototype.
2191 (get_environ): Likewise.
2192 (last_status): Declare.
2193 (last_ptid): Likewise.
2194 (signal_pid): Likewise.
2195 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2196 (spu_ptrace_fun): New function.
2197 (spu_create_inferior): Adjust function prototype to reflect change
2198 on "target.h". Adjust function code to use "fork_inferior".
2199 * target.c (target_terminal_init): New function.
2200 (target_terminal_inferior): Likewise.
2201 (target_terminal_ours): Likewise.
2202 * target.h: Include <vector>.
2203 (struct target_ops) <create_inferior>: Update prototype.
2204 (create_inferior): Update macro.
2205 * utils.c (gdb_flush_out_err): New function.
2206 * win32-low.c (win32_create_inferior): Adjust function prototype
2207 and code to reflect change on "target.h".
2208
2209 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2210
2211 * inferiors.c (switch_to_thread): New function.
2212
2213 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2214
2215 * Makefile.in (SFILE): Add "common/job-control.c".
2216 (OBS): Add "job-control.o".
2217
2218 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2219
2220 * Makefile: Remove "@host_makefile_frag@".
2221
2222 2017-05-05 Pedro Alves <palves@redhat.com>
2223
2224 * configure: Regenerate.
2225
2226 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2227
2228 * configure: Regenerate.
2229
2230 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2231
2232 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2233 software_single_step change of return type to
2234 std::vector<CORE_ADDR>.
2235 * linux-low.c (install_software_single_step_breakpoints):
2236 Likewise.
2237 * linux-low.h (install_software_single_step_breakpoints):
2238 Likewise.
2239
2240 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2241
2242 * remote-utils.c: Include "gdb_termios.h" instead of
2243 "terminal.h".
2244 * terminal.h: Delete file.
2245
2246 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2247
2248 * server.c: Include <vector>.
2249 <program_argv, wrapper_argv>: Convert to std::vector.
2250 (start_inferior): Rewrite function to use C++.
2251 (handle_v_run): Likewise. Update code that calculates the argv
2252 based on the vRun packet; use C++.
2253 (captured_main): Likewise.
2254
2255 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2256
2257 * server.c (handle_v_cont): Initialize thread_resume::thread
2258 with null_ptid.
2259
2260 2017-04-05 Pedro Alves <palves@redhat.com>
2261
2262 * configure: Regenerate.
2263
2264 2017-04-05 Pedro Alves <palves@redhat.com>
2265
2266 * gdbreplay.c (sync_error): Constify.
2267 * linux-x86-low.c (push_opcode): Constify.
2268
2269 2017-04-05 Pedro Alves <palves@redhat.com>
2270
2271 * win32-low.c (get_child_debug_event)
2272 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2273 Report TARGET_WAITKIND_SPURIOUS instead.
2274
2275 2017-04-05 Pedro Alves <palves@redhat.com>
2276
2277 * remote-utils.c (remote_prepare, remote_open): Constify.
2278 * remote-utils.h (remote_prepare, remote_open): Constify.
2279 * server.c (captured_main): Constify 'port' handling.
2280
2281 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2282
2283 * Makefile.in (clean): Clear .deps.
2284
2285 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2286
2287 * .gitignore: Remove generated files, replace with wildcard.
2288 * (clean): Replace removal of generated files with wildcard.
2289 (version.c): Replace with...
2290 (version-generated.c): ...this.
2291 (xml-builtin.c): Replace with...
2292 (xml-builtin-generated.c): ...this.
2293 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2294 (%.c: *regformats*): Replace with...
2295 (%-generated.c: *regformats*): ...this.
2296
2297 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2298
2299 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2300 (xtensa_fill_gregset): Call collect_register_by_name for
2301 threadptr register.
2302 (xtensa_store_gregset): Call supply_register_by_name for
2303 threadptr register.
2304
2305 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2306
2307 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2308 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2309 (xtensa_store_gregset): Call supply_register for all registers in
2310 a0_regnum..a0_regnum + C0_NREGS range.
2311
2312 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2313
2314 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2315 (ax-ipa.o: ax.c): Remove.
2316 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2317 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2318 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2319 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2320 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2321
2322 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2323
2324 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2325 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2326 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2327 (errors-ipa.o: ../common/errors.c): Remove.
2328 (format-ipa.o: ../common/format.c): Remove.
2329 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2330
2331 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2332
2333 * Makefile.in (%-ipa.o: %.c): New rule.
2334 (tracepoint-ipa.o: tracepoint.c): Remove.
2335 (utils-ipa.o: utils.c): Remove.
2336 (remote-utils-ipa.o: remote-utils.c): Remove.
2337 (regcache-ipa.o: regcache.c): Remove.
2338 (i386-linux-ipa.o: i386-linux.c): Remove.
2339 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2340 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2341 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2342 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2343 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2344 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2345 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2346 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2347 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2348 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2349 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2350 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2351 (aarch64-ipa.o: aarch64.c): Remove.
2352 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2353 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2354 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2355 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2356 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2357 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2358 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2359 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2360 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2361 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2362 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2363 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2364 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2365 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2366 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2367 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2368 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2369 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2370 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2371 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2372 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2373 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2374 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2375 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2376 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2377 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2378 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2379 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2380 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2381 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2382 (tdesc-ipa.o: tdesc.c): Remove.
2383 (x32-linux-ipa.o: x32-linux.c): Remove.
2384 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2385 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2386
2387 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2388
2389 * Makefile.in (%.o: ../arch/%.c): New rule.
2390 (arm.o: ../arch/arm.c): Remove.
2391 (arm-linux.o: ../arch/arm-linux.c): Remove.
2392 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2393 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2394
2395 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2396
2397 * Makefile.in (%.o: ../nat/%.c): New rule.
2398 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2399 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2400 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2401 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2402 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2403 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2404 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2405 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2406 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2407 (linux-personality.o: ../nat/linux-personality.c): Remove.
2408 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2409 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2410 (x86-linux.o: ../nat/x86-linux.c): Remove.
2411 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2412 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2413
2414 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2415
2416 * Makefile.in (%.o: ../common/%.c): New rule.
2417 (signals.o: ../common/signals.c): Remove.
2418 (print-utils.o: ../common/print-utils.c): Remove.
2419 (rsp-low.o: ../common/rsp-low.c): Remove.
2420 (common-utils.o: ../common/common-utils.c): Remove.
2421 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2422 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2423 (vec.o: ../common/vec.c): Remove.
2424 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2425 (xml-utils.o: ../common/xml-utils.c): Remove.
2426 (ptid.o: ../common/ptid.c): Remove.
2427 (buffer.o: ../common/buffer.c): Remove.
2428 (format.o: ../common/format.c): Remove.
2429 (filestuff.o: ../common/filestuff.c): Remove.
2430 (agent.o: ../common/agent.c): Remove.
2431 (errors.o: ../common/errors.c): Remove.
2432 (environ.o: ../common/environ.c): Remove.
2433 (common-debug.o: ../common/common-debug.c): Remove.
2434 (cleanups.o: ../common/cleanups.c): Remove.
2435 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2436 (fileio.o: ../common/fileio.c): Remove.
2437 (common-regcache.o: ../common/common-regcache.c): Remove.
2438 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2439 (new-op.o: ../common/new-op.c): Remove.
2440 (btrace-common.o: ../common/btrace-common.c): Remove.
2441
2442 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2443
2444 * Makefile.in (%.o: ../target/%.c): New rule.
2445 (waitstatus.o: ../target/waitstatus.c): Remove.
2446
2447 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2448
2449 * Makefile.in
2450 (%.c: ../regformats/%.dat,
2451 (%.c: ../regformats/arm/%.dat,
2452 (%.c: ../regformats/i386/%.dat,
2453 (%.c: ../regformats/rs6000/%.dat): New rules.
2454 (aarch64.c): Remove.
2455 (reg-arm.c): Remove.
2456 (arm-with-iwmmxt.c): Remove.
2457 (arm-with-vfpv2.c): Remove.
2458 (arm-with-vfpv3.c): Remove.
2459 (arm-with-neon.c): Remove.
2460 (reg-bfin.c): Remove.
2461 (reg-cris.c): Remove.
2462 (reg-crisv32.c): Remove.
2463 (i386.c): Remove.
2464 (i386-linux.c): Remove.
2465 (i386-avx.c): Remove.
2466 (i386-avx-linux.c): Remove.
2467 (i386-avx-avx512.c): Remove.
2468 (i386-avx-avx512-linux.c): Remove.
2469 (i386-mpx.c): Remove.
2470 (i386-mpx-linux.c): Remove.
2471 (i386-avx-mpx-avx512-pku.c): Remove.
2472 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2473 (i386-avx-mpx.c): Remove.
2474 (i386-avx-mpx-linux.c): Remove.
2475 (i386-mmx.c): Remove.
2476 (i386-mmx-linux.c): Remove.
2477 (reg-ia64.c): Remove.
2478 (reg-m32r.c): Remove.
2479 (reg-m68k.c): Remove.
2480 (reg-cf.c): Remove.
2481 (mips-linux.c): Remove.
2482 (mips-dsp-linux.c): Remove.
2483 (mips64-linux.c): Remove.
2484 (mips64-dsp-linux.c): Remove.
2485 (nios2-linux.c): Remove.
2486 (powerpc-32.c): Remove.
2487 (powerpc-32l.c): Remove.
2488 (powerpc-altivec32l.c): Remove.
2489 (powerpc-cell32l.c): Remove.
2490 (powerpc-vsx32l.c): Remove.
2491 (powerpc-isa205-32l.c): Remove.
2492 (powerpc-isa205-altivec32l.c): Remove.
2493 (powerpc-isa205-vsx32l.c): Remove.
2494 (powerpc-e500l.c): Remove.
2495 (powerpc-64l.c): Remove.
2496 (powerpc-altivec64l.c): Remove.
2497 (powerpc-cell64l.c): Remove.
2498 (powerpc-vsx64l.c): Remove.
2499 (powerpc-isa205-64l.c): Remove.
2500 (powerpc-isa205-altivec64l.c): Remove.
2501 (powerpc-isa205-vsx64l.c): Remove.
2502 (s390-linux32.c): Remove.
2503 (s390-linux32v1.c): Remove.
2504 (s390-linux32v2.c): Remove.
2505 (s390-linux64.c): Remove.
2506 (s390-linux64v1.c): Remove.
2507 (s390-linux64v2.c): Remove.
2508 (s390-te-linux64.c): Remove.
2509 (s390-vx-linux64.c): Remove.
2510 (s390-tevx-linux64.c): Remove.
2511 (s390x-linux64.c): Remove.
2512 (s390x-linux64v1.c): Remove.
2513 (s390x-linux64v2.c): Remove.
2514 (s390x-te-linux64.c): Remove.
2515 (s390x-vx-linux64.c): Remove.
2516 (s390x-tevx-linux64.c): Remove.
2517 (tic6x-c64xp-linux.c): Remove.
2518 (tic6x-c64x-linux.c): Remove.
2519 (tic6x-c62x-linux.c): Remove.
2520 (reg-sh.c): Remove.
2521 (reg-sparc64.c): Remove.
2522 (reg-spu.c): Remove.
2523 (amd64.c): Remove.
2524 (amd64-linux.c): Remove.
2525 (amd64-avx.c): Remove.
2526 (amd64-avx-linux.c): Remove.
2527 (amd64-avx-avx512.c): Remove.
2528 (amd64-avx-avx512-linux.c): Remove.
2529 (amd64-mpx.c): Remove.
2530 (amd64-mpx-linux.c): Remove.
2531 (amd64-avx-mpx-avx512-pku.c): Remove.
2532 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2533 (amd64-avx-mpx.c): Remove.
2534 (amd64-avx-mpx-linux.c): Remove.
2535 (x32.c): Remove.
2536 (x32-linux.c): Remove.
2537 (x32-avx.c): Remove.
2538 (x32-avx-linux.c): Remove.
2539 (x32-avx-avx512.c): Remove.
2540 (x32-avx-avx512-linux.c): Remove.
2541 (reg-xtensa.c): Remove.
2542 (reg-tilegx.c): Remove.
2543 (reg-tilegx32.c): Remove.
2544
2545 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2546
2547 * Makefile.in (SFILES): Add "common/environ.c".
2548 (OBJS): Add "common/environ.h".
2549
2550 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2551
2552 * configure.ac: Check if the fs_base and gs_base members of
2553 `struct user_regs_struct' exist.
2554 * config.in: Regenerated.
2555 * configure: Likewise.
2556
2557 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2558
2559 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2560 target_read_memory.
2561 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2562 (get_next_pcs_syscall_next_pc): Likewise.
2563
2564 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2565
2566 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2567 * nto-x86-low.c: Likewise.
2568
2569 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2570
2571 * Makefile.in: Include disable-implicit-rules.mk.
2572
2573 2016-11-23 Pedro Alves <palves@redhat.com>
2574
2575 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2576 (debug_vprintf): Use std::chrono::steady_clock instead of
2577 gettimeofday. Use '.' instead of ':'.
2578 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2579 (get_timestamp): Use std::chrono::steady_clock instead of
2580 gettimeofday.
2581
2582 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2583
2584 * Makefile.in: Fix whitespace formatting.
2585
2586 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2587
2588 * Makefile.in (SFILES, OBS): Flatten list and order
2589 alphabetically.
2590
2591 2016-11-23 Pedro Alves <palves@redhat.com>
2592
2593 * event-loop.c (handle_file_event): Use warning.
2594 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2595 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2596 Use warning.
2597
2598 2016-11-23 Pedro Alves <palves@redhat.com>
2599
2600 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2601 output.
2602 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2603 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2604 debug_printf and debug_flush for debug output.
2605 * server.c (handle_general_set): Likewise.
2606 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2607 output.
2608
2609 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2610
2611 * Makefile.in (.c.o): Replace rule with ...
2612 (%.o: %.c): ... this one.
2613
2614 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2615
2616 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2617 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2618 make.
2619 * configure.ac: Remove checks for the make program.
2620 * configure: Re-generate.
2621
2622 2016-10-28 Pedro Alves <palves@redhat.com>
2623
2624 * Makefile.in (CXX_DIALECT): Get from configure.
2625 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2626 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2627 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2628 * config.in: Regenerate.
2629 * configure: Regenerate.
2630
2631 2016-10-27 Yao Qi <yao.qi@linaro.org>
2632
2633 * linux-low.c (linux_supports_range_stepping): Return true if
2634 can_software_single_step return true.
2635
2636 2016-10-27 Yao Qi <yao.qi@linaro.org>
2637
2638 * inferiors.c (find_inferior_in_random): New function.
2639 * inferiors.h (find_inferior_in_random): Declare.
2640 * linux-low.c (linux_wait_for_event_filtered): Call
2641 find_inferior_in_random instead of find_inferior.
2642
2643 2016-10-27 Yao Qi <yao.qi@linaro.org>
2644
2645 * linux-low.c (linux_wait_1): If single-step breakpoints are
2646 inserted, remove them.
2647
2648 2016-10-26 Pedro Alves <palves@redhat.com>
2649
2650 * linux-low.c (handle_extended_wait): Link parent/child fork
2651 threads.
2652 (linux_wait_1): Unlink them.
2653 (linux_set_resume_request): Ignore resume requests for
2654 already-resumed and unhandled fork child threads.
2655 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2656 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2657 New functions.
2658 (handle_v_requests) <vCont>: Don't call require_running.
2659 * server.h (in_queued_stop_replies): New declaration.
2660
2661 2016-10-24 Yao Qi <yao.qi@linaro.org>
2662
2663 PR server/20733
2664 * linux-aarch64-low.c (append_insns): Cast the return value to
2665 'uint32_t *'.
2666
2667 2016-10-10 Yao Qi <yao.qi@linaro.org>
2668
2669 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2670
2671 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2672
2673 * target.c (target_supports_multi_process): New function, moved
2674 from...
2675 * target.h (target_supports_multi_process): ... here. Remove
2676 macro.
2677
2678 2016-10-05 Tom Tromey <tom@tromey.com>
2679
2680 PR remote/20655:
2681 * tracepoint.c (handle_tracepoint_bkpts): Check
2682 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2683
2684 2016-10-05 Yao Qi <yao.qi@linaro.org>
2685
2686 * configure.srv: Update the path of arm-*.xml files.
2687
2688 2016-10-05 Terry Guo <terry.guo@arm.com>
2689 Yao Qi <yao.qi@linaro.org>
2690
2691 * Makefile.in: Adjust the path of rules.
2692 * configure.srv: Update the path of xml files.
2693 * regformats/arm-with-iwmmxt.dat: Regenerated.
2694 * regformats/arm-with-neon.dat: Likewise.
2695 * regformats/arm-with-vfpv2.dat: Likewise.
2696 * regformats/arm-with-vfpv3.dat Likewise.
2697
2698 2016-09-30 Yao Qi <yao.qi@linaro.org>
2699
2700 PR gdbserver/20627
2701 * target.c (target_stop_and_wait): Don't call
2702 target_continue_no_signal, use resume_stop instead.
2703
2704 2016-09-26 Yao Qi <yao.qi@linaro.org>
2705
2706 * linux-low.c (linux_wait_1): Call debug_exit.
2707
2708 2016-09-23 Pedro Alves <palves@redhat.com>
2709
2710 * Makefile.in (SFILES): Add common/new-op.c.
2711 (OBS): Add common/new-op.o.
2712 (new-op.o): New rule.
2713
2714 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2715
2716 * .gitinore: Ignore more files.
2717
2718 2016-09-21 Yao Qi <yao.qi@linaro.org>
2719
2720 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2721 23.
2722
2723 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2724
2725 * server.c (start_inferior): Call target_mourn_inferior instead of
2726 mourn_inferior; pass ptid_t argument to it.
2727 (resume): Likewise.
2728 (handle_target_event): Likewise.
2729 * target.c (target_mourn_inferior): New function.
2730 * target.h (mourn_inferior): Delete macro.
2731
2732 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2733
2734 * linux-low.c (lwp_is_stepping): New function.
2735
2736 2016-09-06 Carl Love <cel@us.ibm.com>
2737
2738 * server.c (start_inferior): Fixed comment, requested comment change
2739 didn't get updated correctly. Removed reference to ptrace () call as
2740 it is only true on Linux systems.
2741
2742 2016-09-06 Carl Love <cel@us.ibm.com>
2743
2744 * server.c (start_inferior): Do not call
2745 function target_post_create_inferior () if the
2746 inferior process has already exited.
2747
2748 2016-09-05 Pedro Alves <palves@redhat.com>
2749
2750 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2751 (COMPILE.pre, CC_LD): Use CXX directly.
2752 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2753 * acinclude.m4: Don't include build-with-cxx.m4.
2754 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2755 * configure: Regenerate.
2756
2757 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2758
2759 PR gdb/19495
2760 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2761 call writing data to own_buf.
2762
2763 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2764
2765 * target.c (mywait): Call target_wait instead of
2766 the_target->wait.
2767 (target_wait): New function.
2768
2769 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2770
2771 * server.c (start_inferior): New variable 'ptid'. Replace calls
2772 to the_target->resume by target_continue{,_no_signal}, depending
2773 on the case.
2774 * target.c (target_stop_and_wait): Call target_continue_no_signal
2775 instead of the_target->resume.
2776 (target_continue): New function.
2777
2778 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2779
2780 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2781
2782 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2783
2784 PR server/20491
2785 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2786 ps_prochandle.
2787 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2788 * linux-arm-low.c (ps_get_thread_area): Likewise.
2789 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2790 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2791 * linux-mips-low.c (ps_get_thread_area): Likewise.
2792 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2793 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2794 * linux-x86-low.c (ps_get_thread_area): Likewise.
2795 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2796
2797 2016-08-19 Pedro Alves <palves@redhat.com>
2798
2799 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2800
2801 2016-08-19 Pedro Alves <palves@redhat.com>
2802
2803 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2804 comment. Use memcpy instead of casting through unsigned long.
2805
2806 2016-08-19 Pedro Alves <palves@redhat.com>
2807
2808 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2809 allocating around 0x80000000.
2810
2811 2016-08-19 Pedro Alves <palves@redhat.com>
2812
2813 PR gdb/20415
2814 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2815 (x32-avx512-linux-ipa.o): New rules.
2816 * configure.ac (x86_64-*-linux*): New x32 check.
2817 * configure.srv (ipa_x32_linux_regobj): New.
2818 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2819 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2820 descriptions.
2821 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2822 descriptions.
2823 * configure: Regenerate.
2824
2825 2016-08-09 Pedro Alves <palves@redhat.com>
2826
2827 PR gdb/18653
2828 * Makefile.in (OBS): Add signals-state-save-restore.o.
2829 (signals-state-save-restore.o): New rule.
2830 * config.in: Regenerate.
2831 * configure: Regenerate.
2832 * linux-low.c: Include "signals-state-save-restore.h".
2833 (linux_create_inferior): Call
2834 restore_original_signals_state.
2835 * server.c: Include "dispositions-save-restore.h".
2836 (captured_main): Call save_original_signals_state.
2837
2838 2016-08-05 Pedro Alves <palves@redhat.com>
2839
2840 * configure: Regenerate.
2841
2842 2016-08-04 Yao Qi <yao.qi@linaro.org>
2843
2844 * linux-low.c (regsets_fetch_inferior_registers): Check
2845 errno is ESRCH or not.
2846
2847 2016-08-02 Yao Qi <yao.qi@linaro.org>
2848
2849 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2850 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2851 (thread_db_load_search): Update.
2852 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2853 td_ta_set_event and td_ta_event_getmsg.
2854
2855 2016-07-26 Pedro Alves <palves@redhat.com>
2856
2857 PR server/20414
2858 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2859 of unsigned long for 64-bit registers and use uint32_t instead of
2860 unsigned int for 32-bit registers.
2861
2862 2016-07-26 Pedro Alves <palves@redhat.com>
2863
2864 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2865 to 'ptrace'.
2866
2867 2016-07-21 Tom Tromey <tom@tromey.com>
2868
2869 * configure: Rebuild.
2870
2871 2016-07-21 Yao Qi <yao.qi@linaro.org>
2872
2873 * mem-break.c (find_gdb_breakpoint): Cast bp to
2874 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2875
2876 2016-07-21 Yao Qi <yao.qi@linaro.org>
2877
2878 * server.c (handle_v_requests): Support s and S actions
2879 if target_supports_software_single_step return true.
2880
2881 2016-07-21 Yao Qi <yao.qi@linaro.org>
2882
2883 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2884 is resume_step, call maybe_hw_step.
2885 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2886 and unstop them.
2887 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2888 breakpoints or not.
2889 (proceed_one_lwp): If resume request is resume_step, install
2890 reinsert breakpoints and call maybe_hw_step.
2891
2892 2016-07-21 Yao Qi <yao.qi@linaro.org>
2893
2894 * linux-low.c (proceed_one_lwp): Declare.
2895 (linux_resume_one_thread): Remove local variable 'step'.
2896 Lift code enqueue signal. Call proceed_one_lwp instead of
2897 linux_resume_one_lwp.
2898
2899 2016-07-21 Yao Qi <yao.qi@linaro.org>
2900
2901 * linux-low.c (linux_resume_one_thread): Call
2902 enqueue_pending_signal.
2903
2904 2016-07-21 Yao Qi <yao.qi@linaro.org>
2905
2906 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2907 * inferiors.c (do_restore_current_thread_cleanup): New function.
2908 (make_cleanup_restore_current_thread): Likewise.
2909 * linux-low.c (install_software_single_step_breakpoints): Call
2910 make_cleanup_restore_current_thread. Switch current_thread to
2911 thread.
2912
2913 2016-07-21 Yao Qi <yao.qi@linaro.org>
2914
2915 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2916 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2917 (clone_one_breakpoint): Likewise.
2918 (delete_reinsert_breakpoints): Change parameter to thread.
2919 Callers updated.
2920 (has_reinsert_breakpoints): Likewise.
2921 (uninsert_reinsert_breakpoints): Likewise.
2922 (reinsert_reinsert_breakpoints): Likewise.
2923 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2924 (delete_reinsert_breakpoints): Likewise.
2925 (reinsert_reinsert_breakpoints): Likewise.
2926 (uninsert_reinsert_breakpoints): Likewise.
2927 (has_reinsert_breakpoints): Likewise.
2928
2929 2016-07-21 Yao Qi <yao.qi@linaro.org>
2930
2931 * inferiors.c (get_thread_process): Make parameter const.
2932 * inferiors.h (get_thread_process): Update declaration.
2933 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2934 Add new parameters child_thread and parent_thread. Callers
2935 updated.
2936 * mem-break.h (clone_all_breakpoints): Update declaration.
2937
2938 2016-07-21 Yao Qi <yao.qi@linaro.org>
2939
2940 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2941 <command_list, handler>: Remove.
2942 (struct gdb_breakpoint): New.
2943 (struct other_breakpoint): New.
2944 (struct reinsert_breakpoint): New.
2945 (is_gdb_breakpoint): New function.
2946 (any_persistent_commands): Update command_list if
2947 is_gdb_breakpoint returns true.
2948 (set_breakpoint): Create breakpoints according to their types.
2949 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2950 (set_gdb_breakpoint_1): Likewise.
2951 (set_gdb_breakpoint): Likewise.
2952 (clear_breakpoint_conditions): Change parameter type to
2953 'struct gdb_breakpoint *'.
2954 (clear_breakpoint_commands): Likewise.
2955 (clear_breakpoint_conditions_and_commands): Likewise.
2956 (add_condition_to_breakpoint): Likewise.
2957 (add_breakpoint_condition): Likewise.
2958 (add_commands_to_breakpoint): Likewise.
2959 (check_breakpoints): Check other_breakpoint.
2960 (clone_one_breakpoint): Clone breakpopint according to its type.
2961 * mem-break.h (struct gdb_breakpoint): Declare.
2962 (set_gdb_breakpoint): Update declaration.
2963 (clear_breakpoint_conditions_and_commands): Likewise.
2964 (add_breakpoint_condition): Likewise.
2965 (add_breakpoint_commands): Likewise.
2966 * server.c (process_point_options): Change parameter type to
2967 'struct gdb_breakpoint *'.
2968
2969 2016-07-21 Yao Qi <yao.qi@linaro.org>
2970
2971 * mem-break.c (set_breakpoint_at): Rename it to ...
2972 (set_breakpoint_type_at): ... it.
2973 (set_breakpoint_at): Call set_breakpoint_type_at.
2974 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2975 * mem-break.h (set_breakpoint_at): Update comments.
2976
2977 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2978
2979 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2980 to buf parameter.
2981 (nios2_store_gregset): Likewise.
2982
2983 2016-07-01 Pedro Alves <palves@redhat.com>
2984 Antoine Tremblay <antoine.tremblay@ericsson.com>
2985
2986 * linux-low.c: Change interface to take the target lwp_info
2987 pointer directly and return void. Handle detaching from a zombie
2988 thread.
2989 (linux_detach_lwp_callback): New function.
2990 (linux_detach): Detach from the leader thread after detaching from
2991 the clone threads.
2992
2993 2016-06-28 Yao Qi <yao.qi@linaro.org>
2994
2995 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2996 for variable new_offset.
2997 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2998 (aarch64_ftrace_insn_reloc_cb): Likewise.
2999 (aarch64_ftrace_insn_reloc_tb): Likewise.
3000 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
3001 PRIx64 instead of PRIx32.
3002
3003 2016-06-28 Yao Qi <yao.qi@linaro.org>
3004
3005 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
3006 (the_low_target): Install arm_get_syscall_trapinfo.
3007
3008 2016-06-28 Yao Qi <yao.qi@linaro.org>
3009
3010 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
3011 function.
3012 (the_low_target): Install aarch64_get_syscall_trapinfo.
3013
3014 2016-06-28 Yao Qi <yao.qi@linaro.org>
3015
3016 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
3017 Callers updated.
3018 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
3019 Remove parameter sysno.
3020 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
3021 sysret.
3022
3023 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
3024
3025 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
3026 (s390_emit_ne_goto): Likewise.
3027 (s390_emit_lt_goto): Likewise.
3028 (s390_emit_le_goto): Likewise.
3029 (s390_emit_gt_goto): Likewise.
3030 (s390_emit_ge_goto): Likewise.
3031 (s390x_emit_eq_goto): Likewise.
3032 (s390x_emit_ne_goto): Likewise.
3033 (s390x_emit_lt_goto): Likewise.
3034 (s390x_emit_le_goto): Likewise.
3035 (s390x_emit_gt_goto): Likewise.
3036 (s390x_emit_ge_goto): Likewise.
3037 (s390_emit_ops_impl): Mark variable static.
3038 (s390x_emit_ops): Likewise.
3039
3040 2016-06-17 Yao Qi <yao.qi@linaro.org>
3041
3042 * linux-low.c (handle_extended_wait): Call
3043 uninsert_reinsert_breakpoints for the parent process. Remove
3044 reinsert breakpoints from the child process. Reinsert them to
3045 the parent process when vfork is done.
3046 * mem-break.c (uninsert_reinsert_breakpoints): New function.
3047 (reinsert_reinsert_breakpoints): New function.
3048 * mem-break.h (uninsert_reinsert_breakpoints): Declare
3049 (reinsert_reinsert_breakpoints): Declare.
3050
3051 2016-06-17 Yao Qi <yao.qi@linaro.org>
3052
3053 * linux-low.c (handle_extended_wait): If the parent is doing
3054 step-over, remove the reinsert breakpoints from the forked child.
3055
3056 2016-06-17 Yao Qi <yao.qi@linaro.org>
3057
3058 * linux-low.c (unsuspend_all_lwps): Declare.
3059 (linux_low_filter_event): If thread exited, call finish_step_over.
3060 If step-over is finished, unsuspend other threads.
3061
3062 2016-06-17 Yao Qi <yao.qi@linaro.org>
3063
3064 * linux-low.c (linux_resume_one_lwp_throw): Assert
3065 has_reinsert_breakpoints returns false.
3066 * mem-break.c (delete_disabled_breakpoints): Assert
3067 bp type isn't reinsert_breakpoint.
3068
3069 2016-06-17 Yao Qi <yao.qi@linaro.org>
3070
3071 * linux-low.c (maybe_hw_step): New function.
3072 (linux_resume_one_lwp_throw): Call maybe_hw_step.
3073 (finish_step_over): Switch current_thread to lwp temporarily,
3074 and assert has_reinsert_breakpoints returns true.
3075 (proceed_one_lwp): Call maybe_hw_step.
3076 * mem-break.c (has_reinsert_breakpoints): New function.
3077 * mem-break.h (has_reinsert_breakpoints): Declare.
3078
3079 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3080
3081 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3082
3083 2016-05-17 Yao Qi <yao.qi@linaro.org>
3084
3085 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3086 instead of find_inferior.
3087
3088 2016-05-05 Yao Qi <yao.qi@linaro.org>
3089
3090 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3091 Initialize res to zero.
3092
3093 2016-05-05 Yao Qi <yao.qi@linaro.org>
3094
3095 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3096 to uint32_t.
3097
3098 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3099
3100 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3101 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3102 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3103
3104 2016-04-28 Par Olsson <par.olsson@windriver.com>
3105 Simon Marchi <simon.marchi@ericsson.com>
3106
3107 * tracepoint.c (write_inferior_int8): New function.
3108 (cmd_qtenable_disable): Write enable flag using
3109 write_inferior_int8.
3110
3111 2016-04-25 Yao Qi <yao.qi@linaro.org>
3112
3113 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3114 (need_step_over_p): Return zero if the LWP has pending signals
3115 can be delivered on software single step target.
3116
3117 2016-04-25 Yao Qi <yao.qi@linaro.org>
3118
3119 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3120 return instead of error.
3121
3122 2016-04-22 Yao Qi <yao.qi@linaro.org>
3123
3124 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3125 to 23.
3126
3127 2016-04-22 Yao Qi <yao.qi@linaro.org>
3128
3129 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3130 signal when stepping over breakpoint with software single
3131 step.
3132
3133 2016-04-21 Pedro Alves <palves@redhat.com>
3134
3135 * linux-s390-low.c (s390_collect_ptrace_register)
3136 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3137 add casts.
3138 (s390_check_regset): Use void * instead of gdb_byte *.
3139
3140 2016-04-20 Pedro Alves <palves@redhat.com>
3141
3142 * configure: Renegerate.
3143
3144 2016-04-20 Yao Qi <yao.qi@linaro.org>
3145
3146 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3147 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3148 number 16.
3149 (arm_store_gregset): Likewise.
3150
3151 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3152
3153 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3154 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3155 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3156 (amd64-avx-mpx-linux.c): New rules.
3157 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3158 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3159 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3160 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3161 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3162 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3163 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3164 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3165 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3166 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3167 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3168 * linux-x86-low.c (x86_linux_read_description): Add case for
3169 X86_XSTATE_AVX_MPX_MASK.
3170 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3171 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3172 init_registers_i386_avx_mpx_linux.
3173 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3174 (initialize_low_tracepoint): Call
3175 init_registers_i386_avx_mpx_linux.
3176 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3177 (initialize_low_tracepoint): Call
3178 init_registers_amd64_avx_mpx_linux.
3179 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3180 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3181 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3182 declarations.
3183
3184 2016-04-18 Pedro Alves <palves@redhat.com>
3185
3186 * configure: Regenerate.
3187
3188 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3189
3190 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3191 (aarch64_emit_sub): Likewise.
3192
3193 2016-04-12 Pedro Alves <palves@redhat.com>
3194
3195 * utils.c (prepare_to_throw_exception): Delete.
3196
3197 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3198
3199 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3200
3201 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3202
3203 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3204
3205 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3206
3207 * linux-aarch64-ipa.c: Add <elf.h> include.
3208 * linux-ppc-ipa.c: Add <elf.h> include.
3209 * linux-s390-ipa.c: Add <elf.h> include.
3210
3211 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3212
3213 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3214 (get_raw_reg_ptr): Likewise.
3215 (get_trace_state_variable_value_ptr): Likewise.
3216 (set_trace_state_variable_value_ptr): Likewise.
3217 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3218 char *.
3219
3220 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3221 Marcin Kościelnicki <koriakin@0x04.net>
3222
3223 PR/17221
3224 * linux-ppc-low.c (emit_insns): New function.
3225 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3226 (ppc_emit_prologue): New function.
3227 (ppc_emit_epilogue): New function.
3228 (ppc_emit_add): New function.
3229 (ppc_emit_sub): New function.
3230 (ppc_emit_mul): New function.
3231 (ppc_emit_lsh): New function.
3232 (ppc_emit_rsh_signed): New function.
3233 (ppc_emit_rsh_unsigned): New function.
3234 (ppc_emit_ext): New function.
3235 (ppc_emit_zero_ext): New function.
3236 (ppc_emit_log_not): New function.
3237 (ppc_emit_bit_and): New function.
3238 (ppc_emit_bit_or): New function.
3239 (ppc_emit_bit_xor): New function.
3240 (ppc_emit_bit_not): New function.
3241 (ppc_emit_equal): New function.
3242 (ppc_emit_less_signed): New function.
3243 (ppc_emit_less_unsigned): New function.
3244 (ppc_emit_ref): New function.
3245 (ppc_emit_const): New function.
3246 (ppc_emit_reg): New function.
3247 (ppc_emit_pop): New function.
3248 (ppc_emit_stack_flush): New function.
3249 (ppc_emit_swap): New function.
3250 (ppc_emit_stack_adjust): New function.
3251 (ppc_emit_call): New function.
3252 (ppc_emit_int_call_1): New function.
3253 (ppc_emit_void_call_2): New function.
3254 (ppc_emit_if_goto): New function.
3255 (ppc_emit_goto): New function.
3256 (ppc_emit_eq_goto): New function.
3257 (ppc_emit_ne_goto): New function.
3258 (ppc_emit_lt_goto): New function.
3259 (ppc_emit_le_goto): New function.
3260 (ppc_emit_gt_goto): New function.
3261 (ppc_emit_ge_goto): New function.
3262 (ppc_write_goto_address): New function.
3263 (ppc_emit_ops_impl): New static variable.
3264 (ppc64v1_emit_prologue): New function.
3265 (ppc64v2_emit_prologue): New function.
3266 (ppc64_emit_epilogue): New function.
3267 (ppc64_emit_add): New function.
3268 (ppc64_emit_sub): New function.
3269 (ppc64_emit_mul): New function.
3270 (ppc64_emit_lsh): New function.
3271 (ppc64_emit_rsh_signed): New function.
3272 (ppc64_emit_rsh_unsigned): New function.
3273 (ppc64_emit_ext): New function.
3274 (ppc64_emit_zero_ext): New function.
3275 (ppc64_emit_log_not): New function.
3276 (ppc64_emit_bit_and): New function.
3277 (ppc64_emit_bit_or): New function.
3278 (ppc64_emit_bit_xor): New function.
3279 (ppc64_emit_bit_not): New function.
3280 (ppc64_emit_equal): New function.
3281 (ppc64_emit_less_signed): New function.
3282 (ppc64_emit_less_unsigned): New function.
3283 (ppc64_emit_ref): New function.
3284 (ppc64_emit_const): New function.
3285 (ppc64v1_emit_reg): New function.
3286 (ppc64v2_emit_reg): New function.
3287 (ppc64_emit_pop): New function.
3288 (ppc64_emit_stack_flush): New function.
3289 (ppc64_emit_swap): New function.
3290 (ppc64v1_emit_call): New function.
3291 (ppc64v2_emit_call): New function.
3292 (ppc64v1_emit_int_call_1): New function.
3293 (ppc64v2_emit_int_call_1): New function.
3294 (ppc64v1_emit_void_call_2): New function.
3295 (ppc64v2_emit_void_call_2): New function.
3296 (ppc64_emit_if_goto): New function.
3297 (ppc64_emit_eq_goto): New function.
3298 (ppc64_emit_ne_goto): New function.
3299 (ppc64_emit_lt_goto): New function.
3300 (ppc64_emit_le_goto): New function.
3301 (ppc64_emit_gt_goto): New function.
3302 (ppc64_emit_ge_goto): New function.
3303 (ppc64v1_emit_ops_impl): New static variable.
3304 (ppc64v2_emit_ops_impl): New static variable.
3305 (ppc_emit_ops): New function.
3306 (linux_low_target): Wire in ppc_emit_ops.
3307
3308 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3309 Marcin Kościelnicki <koriakin@0x04.net>
3310
3311 PR/17221
3312 * Makefile.in: Add powerpc-*-ipa.o
3313 * configure.srv: Add ipa_obj for powerpc*-linux.
3314 * linux-ppc-ipa.c: New file.
3315 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3316 includes.
3317 (PPC_FIELD): New macro.
3318 (PPC_SEXT): New macro.
3319 (PPC_OP6): New macro.
3320 (PPC_BO): New macro.
3321 (PPC_LI): New macro.
3322 (PPC_BD): New macro.
3323 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3324 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3325 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3326 (ppc_get_thread_area): New function.
3327 (is_elfv2_inferior): New function.
3328 (gen_ds_form): New function.
3329 (GEN_STD): New macro.
3330 (GEN_STDU): New macro.
3331 (GEN_LD): New macro.
3332 (GEN_LDU): New macro.
3333 (gen_d_form): New function.
3334 (GEN_ADDI): New macro.
3335 (GEN_ADDIS): New macro.
3336 (GEN_LI): New macro.
3337 (GEN_LIS): New macro.
3338 (GEN_ORI): New macro.
3339 (GEN_ORIS): New macro.
3340 (GEN_LWZ): New macro.
3341 (GEN_STW): New macro.
3342 (GEN_STWU): New macro.
3343 (gen_xfx_form): New function.
3344 (GEN_MFSPR): New macro.
3345 (GEN_MTSPR): New macro.
3346 (GEN_MFCR): New macro.
3347 (GEN_MTCR): New macro.
3348 (GEN_SYNC): New macro.
3349 (GEN_LWSYNC): New macro.
3350 (gen_x_form): New function.
3351 (GEN_OR): New macro.
3352 (GEN_MR): New macro.
3353 (GEN_LWARX): New macro.
3354 (GEN_STWCX): New macro.
3355 (GEN_CMPW): New macro.
3356 (gen_md_form): New function.
3357 (GEN_RLDICL): New macro.
3358 (GEN_RLDICR): New macro.
3359 (gen_i_form): New function.
3360 (GEN_B): New macro.
3361 (GEN_BL): New macro.
3362 (gen_b_form): New function.
3363 (GEN_BNE): New macro.
3364 (GEN_LOAD): New macro.
3365 (GEN_STORE): New macro.
3366 (gen_limm): New function.
3367 (gen_atomic_xchg): New function.
3368 (gen_call): New function.
3369 (ppc_relocate_instruction): New function.
3370 (ppc_install_fast_tracepoint_jump_pad): New function.
3371 (ppc_get_min_fast_tracepoint_insn_len): New function.
3372 (ppc_get_ipa_tdesc_idx): New function.
3373 (the_low_target): Wire in the new functions.
3374 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3375 tdescs.
3376 * linux-ppc-tdesc.h: New file.
3377
3378 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3379
3380 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3381 (alloc_jump_pad_buffer): New function.
3382 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3383 (alloc_jump_pad_buffer): New function.
3384 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3385 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3386 (alloc_jump_pad_buffer): New function.
3387 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3388 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3389 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3390 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3391
3392 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3393
3394 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3395 * linux-amd64-ipa.c: Likewise.
3396 * linux-i386-ipa.c: Likewise.
3397 * linux-s390-ipa.c: Likewise.
3398 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3399 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3400 set_trace_state_variable_value_ptr.
3401 (struct ipa_sym_addresses): Likewise.
3402 (symbol_list): Likewise.
3403 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3404 accessing gdb_collect directly.
3405 (gdb_collect_ptr_type): New typedef.
3406 (get_raw_reg_ptr_type): New typedef.
3407 (get_trace_state_variable_value_ptr_type): New typedef.
3408 (set_trace_state_variable_value_ptr_type): New typedef.
3409 (gdb_collect_ptr): New global.
3410 (get_raw_reg_ptr): New global.
3411 (get_trace_state_variable_value_ptr): New global.
3412 (set_trace_state_variable_value_ptr): New global.
3413 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3414 accessing get_raw_reg directly.
3415 (get_get_tsv_func_addr): Likewise for
3416 get_trace_state_variable_value_ptr.
3417 (get_set_tsv_func_addr): Likewise for
3418 set_trace_state_variable_value_ptr.
3419 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3420
3421 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3422
3423 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3424
3425 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3426
3427 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3428 packets.
3429 (relocate_instruction): Remove own_buf.
3430 * server.c (own_buf): Make global.
3431 (handle_v_requests): Make global.
3432 * server.h (own_buf): New declaration.
3433 (handle_v_requests): New prototype.
3434
3435 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3436
3437 PR 18377
3438 * linux-s390-low.c (add_insns): New function.
3439 (s390_emit_prologue): New function.
3440 (s390_emit_epilogue): New function.
3441 (s390_emit_add): New function.
3442 (s390_emit_sub): New function.
3443 (s390_emit_mul): New function.
3444 (s390_emit_lsh): New function.
3445 (s390_emit_rsh_signed): New function.
3446 (s390_emit_rsh_unsigned): New function.
3447 (s390_emit_ext): New function.
3448 (s390_emit_log_not): New function.
3449 (s390_emit_bit_and): New function.
3450 (s390_emit_bit_or): New function.
3451 (s390_emit_bit_xor): New function.
3452 (s390_emit_bit_not): New function.
3453 (s390_emit_equal): New function.
3454 (s390_emit_less_signed): New function.
3455 (s390_emit_less_unsigned): New function.
3456 (s390_emit_ref): New function.
3457 (s390_emit_if_goto): New function.
3458 (s390_emit_goto): New function.
3459 (s390_write_goto_address): New function.
3460 (s390_emit_litpool): New function.
3461 (s390_emit_const): New function.
3462 (s390_emit_call): New function.
3463 (s390_emit_reg): New function.
3464 (s390_emit_pop): New function.
3465 (s390_emit_stack_flush): New function.
3466 (s390_emit_zero_ext): New function.
3467 (s390_emit_swap): New function.
3468 (s390_emit_stack_adjust): New function.
3469 (s390_emit_set_r2): New function.
3470 (s390_emit_int_call_1): New function.
3471 (s390_emit_void_call_2): New function.
3472 (s390_emit_eq_goto): New function.
3473 (s390_emit_ne_goto): New function.
3474 (s390_emit_lt_goto): New function.
3475 (s390_emit_le_goto): New function.
3476 (s390_emit_gt_goto): New function.
3477 (s390_emit_ge_goto): New function.
3478 (s390x_emit_prologue): New function.
3479 (s390x_emit_epilogue): New function.
3480 (s390x_emit_add): New function.
3481 (s390x_emit_sub): New function.
3482 (s390x_emit_mul): New function.
3483 (s390x_emit_lsh): New function.
3484 (s390x_emit_rsh_signed): New function.
3485 (s390x_emit_rsh_unsigned): New function.
3486 (s390x_emit_ext): New function.
3487 (s390x_emit_log_not): New function.
3488 (s390x_emit_bit_and): New function.
3489 (s390x_emit_bit_or): New function.
3490 (s390x_emit_bit_xor): New function.
3491 (s390x_emit_bit_not): New function.
3492 (s390x_emit_equal): New function.
3493 (s390x_emit_less_signed): New function.
3494 (s390x_emit_less_unsigned): New function.
3495 (s390x_emit_ref): New function.
3496 (s390x_emit_if_goto): New function.
3497 (s390x_emit_const): New function.
3498 (s390x_emit_call): New function.
3499 (s390x_emit_reg): New function.
3500 (s390x_emit_pop): New function.
3501 (s390x_emit_stack_flush): New function.
3502 (s390x_emit_zero_ext): New function.
3503 (s390x_emit_swap): New function.
3504 (s390x_emit_stack_adjust): New function.
3505 (s390x_emit_int_call_1): New function.
3506 (s390x_emit_void_call_2): New function.
3507 (s390x_emit_eq_goto): New function.
3508 (s390x_emit_ne_goto): New function.
3509 (s390x_emit_lt_goto): New function.
3510 (s390x_emit_le_goto): New function.
3511 (s390x_emit_gt_goto): New function.
3512 (s390x_emit_ge_goto): New function.
3513 (s390_emit_ops): New function.
3514 (struct linux_target_ops): Fill in emit_ops hook.
3515
3516 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3517
3518 PR 18377
3519 * Makefile.in: Add s390 IPA files.
3520 * configure.srv: Build IPA for s390.
3521 * linux-s390-ipa.c: New file.
3522 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3523 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3524 (tdesc_s390_linux32): Likewise.
3525 (init_registers_s390_linux32v1): Likewise.
3526 (tdesc_s390_linux32v1): Likewise.
3527 (init_registers_s390_linux32v2): Likewise.
3528 (tdesc_s390_linux32v2): Likewise.
3529 (init_registers_s390_linux64): Likewise.
3530 (tdesc_s390_linux64): Likewise.
3531 (init_registers_s390_linux64v1): Likewise.
3532 (tdesc_s390_linux64v1): Likewise.
3533 (init_registers_s390_linux64v2): Likewise.
3534 (tdesc_s390_linux64v2): Likewise.
3535 (init_registers_s390_te_linux64): Likewise.
3536 (tdesc_s390_te_linux64): Likewise.
3537 (init_registers_s390_vx_linux64): Likewise.
3538 (tdesc_s390_vx_linux64): Likewise.
3539 (init_registers_s390_tevx_linux64): Likewise.
3540 (tdesc_s390_tevx_linux64): Likewise.
3541 (init_registers_s390x_linux64): Likewise.
3542 (tdesc_s390x_linux64): Likewise.
3543 (init_registers_s390x_linux64v1): Likewise.
3544 (tdesc_s390x_linux64v1): Likewise.
3545 (init_registers_s390x_linux64v2): Likewise.
3546 (tdesc_s390x_linux64v2): Likewise.
3547 (init_registers_s390x_te_linux64): Likewise.
3548 (tdesc_s390x_te_linux64): Likewise.
3549 (init_registers_s390x_vx_linux64): Likewise.
3550 (tdesc_s390x_vx_linux64): Likewise.
3551 (init_registers_s390x_tevx_linux64): Likewise.
3552 (tdesc_s390x_tevx_linux64): Likewise.
3553 (have_hwcap_s390_vx): New static variable.
3554 (s390_arch_setup): Fill have_hwcap_s390_vx.
3555 (s390_get_thread_area): New function.
3556 (s390_ft_entry_gpr_esa): New const.
3557 (s390_ft_entry_gpr_zarch): New const.
3558 (s390_ft_entry_misc): New const.
3559 (s390_ft_entry_fr): New const.
3560 (s390_ft_entry_vr): New const.
3561 (s390_ft_main_31): New const.
3562 (s390_ft_main_64): New const.
3563 (s390_ft_exit_fr): New const.
3564 (s390_ft_exit_vr): New const.
3565 (s390_ft_exit_misc): New const.
3566 (s390_ft_exit_gpr_esa): New const.
3567 (s390_ft_exit_gpr_zarch): New const.
3568 (append_insns): New function.
3569 (s390_relocate_instruction): New function.
3570 (s390_install_fast_tracepoint_jump_pad): New function.
3571 (s390_get_min_fast_tracepoint_insn_len): New function.
3572 (s390_get_ipa_tdesc_idx): New function.
3573 (struct linux_target_ops): Wire in the above functions.
3574 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3575 * linux-s390-tdesc.h: New file.
3576
3577 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3578
3579 * linux-s390-low.c (s390_supports_tracepoints): New function.
3580 (struct linux_target_ops): Fill supports_tracepoints hook.
3581
3582 2016-03-18 Yao Qi <yao.qi@linaro.org>
3583
3584 * linux-low.c (lwp_signal_can_be_delivered): New function.
3585 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3586
3587 2016-03-18 Yao Qi <yao.qi@linaro.org>
3588
3589 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3590 0 if signal is enqueued. Remove 'signal' from one debugging
3591 message. Move one debugging message to some lines below.
3592 Remove code setting 'signal' to 0.
3593
3594 2016-03-18 Yao Qi <yao.qi@linaro.org>
3595
3596 * linux-low.c (linux_low_filter_event): Remove redundant
3597 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3598
3599 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3600
3601 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3602 (struct linux_target_ops): Wire in the above.
3603
3604 2016-03-03 Yao Qi <yao.qi@linaro.org>
3605
3606 * linux-low.c: Update comments to start_step_over.
3607
3608 2016-03-03 Yao Qi <yao.qi@linaro.org>
3609
3610 PR server/19736
3611 * linux-low.c (handle_extended_wait): Set child suspended
3612 if event_lwp->bp_reinsert isn't zero.
3613
3614 2016-03-02 Yao Qi <yao.qi@linaro.org>
3615
3616 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3617 enqueue_pending_signal.
3618
3619 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3620
3621 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3622 is actually loaded.
3623
3624 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3625
3626 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3627 (s390_regmap_3264) [!__s390x__]: New global.
3628 (s390_collect_ptrace_register): Skip map entries containing -1.
3629 (s390_supply_ptrace_register): Ditto.
3630 (s390_fill_gprs_high): New function.
3631 (s390_store_gprs_high): New function.
3632 (s390_regsets): Add NT_S390_HIGH_GPRS.
3633 (s390_get_hwcap): Enable on 31-bit.
3634 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3635 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3636 Detect NT_S390_HIGH_GPRS.
3637 (s390_usrregs_info_3264): Enable on 31-bit.
3638 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3639 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3640
3641 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3642
3643 PR gdb/13808
3644 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3645 * configure.srv: Ditto.
3646 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3647 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3648 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3649 (init_registers_amd64_linux): Remove prototype.
3650 (tdesc_amd64_linux): Remove declaration.
3651 (get_ipa_tdesc): New function.
3652 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3653 initialize remaining tdescs.
3654 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3655 (init_registers_i386_linux): Remove prototype.
3656 (tdesc_i386_linux): Remove declaration.
3657 (get_ipa_tdesc): New function.
3658 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3659 initialize remaining tdescs.
3660 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3661 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3662 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3663 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3664 (x86_get_ipa_tdesc_idx): New function.
3665 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3666 * linux-x86-tdesc.h: New file.
3667 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3668 (target_get_ipa_tdesc_idx): New macro.
3669 * tracepoint.c (ipa_tdesc_idx): New macro.
3670 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3671 (symbol_list): Add ipa_tdesc_idx.
3672 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3673 (ipa_tdesc): Remove.
3674 (ipa_tdesc_idx): New variable.
3675 (get_context_regcache): Use get_ipa_tdesc.
3676 (gdb_collect): Ditto.
3677 (gdb_probe): Ditto.
3678 * tracepoint.h (get_ipa_tdesc): New prototype.
3679 (ipa_tdesc): Remove.
3680
3681 2016-02-24 Pedro Alves <palves@redhat.com>
3682
3683 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3684 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3685 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3686 Factor out common code between the USE_SIGTRAP_SIGINFO and
3687 !USE_SIGTRAP_SIGINFO blocks.
3688 (linux_low_filter_event): Call save_stop_reason instead of
3689 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3690 Update comments.
3691 (linux_wait_1): Update comments.
3692
3693 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3694
3695 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3696 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3697 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3698 ppc_insert_point, ppc_remove_point.
3699
3700 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3701
3702 * linux-s390-low.c (s390_supports_z_point_type): New function.
3703 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3704
3705 2016-02-16 Yao Qi <yao.qi@linaro.org>
3706
3707 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3708 PC. Get pc from regcache_read_pc.
3709
3710 2016-02-12 Yao Qi <yao.qi@linaro.org>
3711
3712 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3713 or linux_get_pc_32bit.
3714 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3715
3716 2016-02-12 Yao Qi <yao.qi@linaro.org>
3717
3718 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3719 arm_linux_get_next_pcs_fixup.
3720
3721 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3722
3723 * tracepoint.c (x_tracepoint_action_download): Change
3724 write_inferior_data_ptr to write_inferior_data_pointer.
3725 (cmd_qtstart): Likewise.
3726 (write_inferior_data_ptr): Remove.
3727 (download_agent_expr): Change write_inferior_data_ptr to
3728 write_inferior_data_pointer.
3729 (download_tracepoint_1): Likewise.
3730 (download_tracepoint): Likewise.
3731 (download_trace_state_variables): Likewise.
3732
3733 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3734 Marcin Kościelnicki <koriakin@0x04.net>
3735
3736 * tracepoint.c (struct tracepoint_action_ops): Remove.
3737 (struct tracepoint_action): Remove ops.
3738 (m_tracepoint_action_download, r_tracepoint_action_download)
3739 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3740 size and offset accordingly.
3741 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3742 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3743 (tracepoint_action_send, tracepoint_action_download): New functions.
3744 Helpers for trace action handlers.
3745 (add_tracepoint_action): Remove setup actions ops.
3746 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3747
3748 2016-02-10 Yao Qi <yao.qi@linaro.org>
3749
3750 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3751
3752 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3753
3754 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3755 to AC_OUTPUT.
3756 * configure: Regenerate.
3757
3758 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3759
3760 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3761 void * to gdb_byte *.
3762 * linux-low.c (siginfo_fixup): Likewise.
3763 (linux_xfer_siginfo): Likewise.
3764 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3765 Likewise.
3766 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3767
3768 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3769
3770 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3771 to srv_tgtobj.
3772 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3773 to srv_tgtobj.
3774 * linux-x86-low.c [__x86_64__]: Include
3775 "nat/amd64-linux-siginfo.h".
3776 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3777 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3778 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3779 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3780 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3781 (cpt_si_fd, si_timerid, si_overrun): Move from
3782 nat/amd64-linux-siginfo.c.
3783 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3784
3785 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3786
3787 * server.c (skip_to_semicolon): Remove.
3788 (process_point_options): Use strchrnul instead of
3789 skip_to_semicolon.
3790
3791 2016-01-26 Yao Qi <yao.qi@linaro.org>
3792
3793 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3794 * linux-low.c (install_software_single_step_breakpoints): Don't
3795 call regcache_read_pc.
3796 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3797 argument pc.
3798
3799 2016-01-26 Yao Qi <yao.qi@linaro.org>
3800
3801 * linux-low.c (install_software_single_step_breakpoints): Call
3802 regcache_read_pc instead of get_pc.
3803
3804 2016-01-26 Yao Qi <yao.qi@linaro.org>
3805
3806 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3807 (unblock_async_io): Rename to ...
3808 (block_unblock_async_io): ... it. New function.
3809 (enable_async_io): Don't install SIGIO handler. Unblock it
3810 instead.
3811 (disable_async_io): Don't ignore SIGIO. Block it instead.
3812 (initialize_async_io): Install SIGIO handler. Don't call
3813 unblock_async_io.
3814
3815 2016-01-26 Yao Qi <yao.qi@linaro.org>
3816
3817 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3818 first character is '\003', call *the_target->request_interrupt.
3819
3820 2016-01-25 Yao Qi <yao.qi@linaro.org>
3821
3822 * remote-utils.c (new_thread_notify): Remove.
3823 (dead_thread_notify): Likewise.
3824 * remote-utils.h (new_thread_notify): Remove declaration.
3825 (dead_thread_notify): Likewise.
3826
3827 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3828
3829 * gdb.trace/pending.exp: Fix expected message on continue.
3830
3831 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3832
3833 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3834 it works properly on big-endian machines where sizeof (CORE_ADDR)
3835 != sizeof (void *).
3836
3837 2016-01-21 Pedro Alves <palves@redhat.com>
3838
3839 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3840 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3841 * configure: Regenerate.
3842
3843 2016-01-21 Yao Qi <yao.qi@linaro.org>
3844
3845 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3846 is_thumb and set it according to CPSR saved on the stack.
3847 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3848 arm_sigreturn_next_pc.
3849
3850 2016-01-18 Yao Qi <yao.qi@linaro.org>
3851
3852 * linux-low.c (linux_set_pc_64bit): New function.
3853 (linux_get_pc_64bit): New function.
3854 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3855 Declare.
3856 * linux-sparc-low.c (debug_threads): Remove declaration.
3857 (sparc_get_pc): Remove.
3858 (the_low_target): Use linux_get_pc_64bit instead of
3859 sparc_get_pc.
3860 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3861 (the_low_target): Use linux_get_pc_64bit and
3862 linux_set_pc_64bit.
3863
3864 2016-01-18 Yao Qi <yao.qi@linaro.org>
3865
3866 * linux-arm-low.c (debug_threads): Remove declaration.
3867 (arm_get_pc, arm_set_pc): Remove.
3868 (the_low_target): Use linux_get_pc_32bit and
3869 linux_set_pc_32bit.
3870 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3871 (the_low_target): Use linux_get_pc_32bit and
3872 linux_set_pc_32bit.
3873 * linux-cris-low.c (debug_threads): Remove declaration.
3874 (cris_get_pc, cris_set_pc,): Remove.
3875 (the_low_target): Use linux_get_pc_32bit and
3876 linux_set_pc_32bit.
3877 * linux-crisv32-low.c (debug_threads): Remove declaration.
3878 (cris_get_pc, cris_set_pc): Remove.
3879 (the_low_target): Use linux_get_pc_32bit and
3880 linux_set_pc_32bit.
3881 * linux-low.c: Include inttypes.h.
3882 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3883 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3884 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3885 (the_low_target): Use linux_get_pc_32bit and
3886 linux_set_pc_32bit.
3887 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3888 (the_low_target): Use linux_get_pc_32bit and
3889 linux_set_pc_32bit.
3890 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3891 (the_low_target): Use linux_get_pc_32bit and
3892 linux_set_pc_32bit.
3893 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3894 (the_low_target): Use linux_get_pc_32bit and
3895 linux_set_pc_32bit.
3896 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3897 (the_low_target): Use linux_get_pc_32bit and
3898 linux_set_pc_32bit.
3899
3900 2016-01-18 Gary Benson <gbenson@redhat.com>
3901
3902 * configure.ac (AC_FUNC_FORK): New check.
3903 * config.in: Regenerate.
3904 * configure: Likewise.
3905
3906 2016-01-14 Yao Qi <yao.qi@linaro.org>
3907
3908 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3909 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3910 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3911 arm_get_next_pcs_ctor.
3912
3913 2016-01-12 Josh Stone <jistone@redhat.com>
3914 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3915
3916 * inferiors.h: Include "gdb_vecs.h".
3917 (struct process_info): Add syscalls_to_catch.
3918 * inferiors.c (remove_process): Free syscalls_to_catch.
3919 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3920 syscall_return stops.
3921 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3922 * server.c (handle_general_set): Handle QCatchSyscalls.
3923 (handle_query): Report support for QCatchSyscalls.
3924 * target.h (struct target_ops): Add supports_catch_syscall.
3925 (target_supports_catch_syscall): New macro.
3926 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3927 (struct lwp_info): Add syscall_state.
3928 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3929 Maintain syscall_state and syscalls_to_catch across exec.
3930 (get_syscall_trapinfo): New function, proxy to the_low_target.
3931 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3932 (linux_low_filter_event): Toggle syscall_state entry/return for
3933 syscall traps, and set it ignored for all others.
3934 (gdb_catching_syscalls_p): New function.
3935 (gdb_catch_this_syscall_p): New function.
3936 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3937 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3938 (linux_supports_catch_syscall): New function.
3939 (linux_target_ops): Install it.
3940 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3941 (the_low_target): Install it.
3942
3943 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3944
3945 * acinclude.m4: Include new ../warning.m4 file.
3946 * configure: Regenerated.
3947 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3948
3949 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3950
3951 * ax.c (is_goto_target): Mark static.
3952 * linux-low.c (register_addr): Likewise.
3953 (linux_fetch_registers, linux_store_registers): Likewise.
3954 * mem-break.c (any_persistent_commands): Fix old prototype.
3955 (add_commands_to_breakpoint): Mark static.
3956 * regcache.c (find_register_by_name): Delete unused func.
3957 * remote-utils.c (hex_or_minus_one): Mark static.
3958 * server.c (monitor_show_help): Mark static.
3959 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3960 handle_v_requests): Likewise.
3961
3962 2016-01-12 Pedro Alves <palves@redhat.com>
3963
3964 Remove use of the registered trademark symbol throughout.
3965
3966 2016-01-08 Yao Qi <yao.qi@linaro.org>
3967
3968 * remote-utils.c (getpkt): If c is '\003', call target hook
3969 request_interrupt.
3970
3971 2016-01-06 Yao Qi <yao.qi@linaro.org>
3972
3973 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3974 linux-aarch32-low.c.
3975 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3976 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3977 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3978 (thumb2_breakpoint): Declare.
3979 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3980 linux-aarch32-low.h.
3981 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3982 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3983 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3984
3985 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3986
3987 * gdbreplay.c (gdbreplay_version): Change copyright year in
3988 version message.
3989 * server.c (gdbserver_version): Likewise.
3990
3991 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3992
3993 * server.c (crc32_table): Delete.
3994 (crc32): Use libiberty's xcrc32 function.
3995
3996 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3997
3998 * lynx-low.c (lynx_delete_thread_callback): New function.
3999 (lynx_mourn): Properly delete our process and all of its
4000 threads. Remove call to clear_inferiors.
4001
4002 2015-12-22 Joel Brobecker <brobecker@adacore.com>
4003
4004 * target.c (thread_search_callback): Add check that
4005 the thread_stopped target callback is not NULL before
4006 calling it.
4007
4008 2015-12-21 Yao Qi <yao.qi@linaro.org>
4009
4010 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
4011 arm breakpoint.
4012
4013 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4014
4015 * server.c (handle_query): Call target_supports_software_single_step.
4016
4017 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4018
4019 * linux-low.c (single_step): New function.
4020 (linux_resume_one_lwp_throw): Call single_step.
4021 (start_step_over): Likewise.
4022
4023 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4024
4025 * Makefile.in (SFILES): Append arch/arm-linux.c,
4026 arch/arm-get-next-pcs.c.
4027 (arm-linux.o): New rule.
4028 (arm-get-next-pcs.o): New rule.
4029 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
4030 arm-linux.o.
4031 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
4032 to linux-aarch32-low.c.
4033 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4034 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4035 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4036 (thumb2_breakpoint_len): Likewise.
4037 (arm_is_thumb_mode): Make non-static.
4038 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
4039 from linux-aarch32-low.c.
4040 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4041 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4042 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4043 (thumb2_breakpoint_len): Likewise.
4044 (arm_is_thumb_mode): New declaration.
4045 * linux-arm-low.c: Include arch/arm-linux.h
4046 aarch/arm-get-next-pcs.h, sys/syscall.h.
4047 (get_next_pcs_ops): New struct.
4048 (get_next_pcs_addr_bits_remove): New function.
4049 (get_next_pcs_is_thumb): New function.
4050 (get_next_pcs_read_memory_unsigned_integer): Likewise.
4051 (arm_sigreturn_next_pc): Likewise.
4052 (get_next_pcs_syscall_next_pc): Likewise.
4053 (arm_gdbserver_get_next_pcs): Likewise.
4054 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
4055 Initialize.
4056 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
4057 * server.h: Include gdb_vecs.h.
4058
4059 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4060
4061 * Makefile.in (SFILES): Append common/common-regcache.c.
4062 (OBS): Append common-regcache.o.
4063 (common-regcache.o): New rule.
4064 * regcache.c (init_register_cache): Initialize cache to
4065 REG_UNAVAILABLE.
4066 (regcache_raw_read_unsigned): New function.
4067 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
4068 register_status enum.
4069
4070 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
4071
4072 * linux-aarch64-low.c (the_low_targets): Rename
4073 breakpoint_reinsert_addr to get_next_pcs.
4074 * linux-arm-low.c (the_low_targets): Likewise.
4075 * linux-bfin-low.c (the_low_targets): Likewise.
4076 * linux-cris-low.c (the_low_targets): Likewise.
4077 * linux-crisv32-low.c (the_low_targets): Likewise.
4078 * linux-low.c (can_software_single_step): Likewise.
4079 (install_software_single_step_breakpoints): New function.
4080 (start_step_over): Use install_software_single_step_breakpoints.
4081 * linux-low.h: New CORE_ADDR vector.
4082 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4083 get_next_pcs.
4084 * linux-mips-low.c (the_low_targets): Likewise.
4085 * linux-nios2-low.c (the_low_targets): Likewise.
4086 * linux-sparc-low.c (the_low_targets): Likewise.
4087
4088 2015-12-17 Pedro Alves <palves@redhat.com>
4089
4090 * linux-low.c (linux_kill_one_lwp): Remove references to
4091 LinuxThreads.
4092 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4093 to 'kill'.
4094 (linux_init_signals): Delete.
4095 (initialize_low): Adjust.
4096 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4097
4098 2015-12-16 Pedro Alves <palves@redhat.com>
4099
4100 * configure.ac (compiler warning flags): When testing a
4101 -Wno-foo option, check whether -Wfoo works instead.
4102 * configure: Regenerate.
4103
4104 2015-12-11 Don Breazeal <donb@codesourcery.com>
4105
4106 * server.c (process_serial_event): Don't exit from gdbserver
4107 in remote mode if there are still active inferiors.
4108
4109 2015-12-11 Yao Qi <yao.qi@linaro.org>
4110
4111 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4112 arm_breakpoint_at if the process is 32-bit.
4113
4114 2015-12-11 Yao Qi <yao.qi@linaro.org>
4115
4116 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4117 arm breakpoint.
4118
4119 2015-12-07 Yao Qi <yao.qi@linaro.org>
4120
4121 * configure.srv: Append arm.o to srv_tgtobj for
4122 aarch64*-*-linux* target.
4123 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4124 from linux-arm-low.c.
4125 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4126 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4127 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4128 (thumb2_breakpoint_len): Likewise.
4129 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4130 (arm_breakpoint_kinds): Likewise.
4131 (arm_breakpoint_kind_from_pc): Likewise.
4132 (arm_sw_breakpoint_from_kind): Likewise.
4133 (arm_breakpoint_kind_from_current_state): Likewise.
4134 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4135 (arm_sw_breakpoint_from_kind): Declare.
4136 (arm_breakpoint_kind_from_current_state): Declare.
4137 (arm_breakpoint_at): Declare.
4138 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4139 arm_sw_breakpoint_from_kind if process is 32-bit.
4140 (aarch64_breakpoint_kind_from_pc): New function.
4141 (aarch64_breakpoint_kind_from_current_state): New function.
4142 (the_low_target): Initialize fields breakpoint_kind_from_pc
4143 and breakpoint_kind_from_current_state.
4144 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4145 linux-aarch32-low.c.
4146 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4147 (arm_breakpoint, arm_breakpoint_len): Likewise.
4148 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4149 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4150 (arm_is_thumb_mode): Likewise.
4151 (arm_breakpoint_at): Likewise.
4152 (arm_breakpoint_kind_from_pc): Likewise.
4153 (arm_sw_breakpoint_from_kind): Likewise.
4154 (arm_breakpoint_kind_from_current_state): Likewise.
4155
4156 Revert:
4157 2015-08-04 Yao Qi <yao.qi@linaro.org>
4158
4159 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4160 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4161 * server.c (extended_protocol): Remove "static".
4162 * server.h (extended_protocol): Declare it.
4163
4164 2015-12-04 Josh Stone <jistone@redhat.com>
4165
4166 * target.h (struct target_ops) <arch_setup>: Rename to ...
4167 (struct target_ops) <post_create_inferior>: ... this.
4168 (target_arch_setup): Rename to ...
4169 (target_post_create_inferior): ... this, calling post_create_inferior.
4170 * server.c (start_inferior): Update target_arch_setup calls to
4171 target_post_create_inferior.
4172 * linux-low.c (linux_low_ptrace_options): Forward declare.
4173 (linux_arch_setup): Update its comment for general use.
4174 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4175 (struct linux_target_ops): Use linux_post_create_inferior.
4176 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4177 to post_create_inferior.
4178 * nto-low.c (struct nto_target_ops): Likewise.
4179 * spu-low.c (struct spu_target_ops): Likewise.
4180 * win32-low.c (struct win32_target_ops): Likewise.
4181
4182 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4183
4184 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4185
4186 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4187
4188 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4189 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4190 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4191 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4192 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4193 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4194 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4195 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4196 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4197 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4198 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4199 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4200
4201 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4202
4203 * linux-low.c (linux_look_up_symbols): Don't call
4204 linux_supports_traceclone.
4205 * linux-low.h (thread_db_init): Remove use_events argument.
4206 * thread-db.c (thread_db_use_event): Remove global variable.
4207 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4208 (struct thread_db) <td_create_bp>: Remove field.
4209 (thread_db_create_event): Remove function.
4210 (thread_db_enable_reporting): Likewise.
4211 (find_one_thread): Don't check for thread_db_use_events.
4212 (attach_thread): Likewise.
4213 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4214 (try_thread_db_load_1): Don't check for thread_db_use_events.
4215 (thread_db_init): Remove use_events argument and thread events
4216 handling.
4217 (remove_thread_event_breakpoints): Remove function.
4218 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4219
4220 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4221
4222 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4223 New function.
4224 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4225 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4226 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4227 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4228 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4229 Initialize.
4230 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4231 New function.
4232 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4233 * linux-low.c (can_hardware_single_step): Use
4234 supports_hardware_single_step.
4235 (can_software_single_step): New function.
4236 (start_step_over): Call can_software_single_step.
4237 (linux_supports_hardware_single_step): New function.
4238 (struct target_ops) <supports_software_single_step>: Initialize.
4239 * linux-low.h (struct linux_target_ops)
4240 <supports_hardware_single_step>: Initialize.
4241 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4242 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4243 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4244 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4245 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4246 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4247 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4248 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4249 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4250 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4251 Initialize.
4252 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4253 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4254 Initialize.
4255 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4256 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4257 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4258 New function.
4259 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4260 * target.h (struct target_ops): <supports_software_single_step>:
4261 New field.
4262 (target_supports_software_single_step): New macro.
4263
4264 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4265
4266 * linux-low.c (linux_wait_1): Fix pc advance condition.
4267 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4268 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4269
4270 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4271
4272 * linux-arm-low.c (arm_is_thumb_mode): New function.
4273 (arm_breakpoint_at): Use arm_is_thumb_mode.
4274 (arm_breakpoint_kind_from_current_state): New function.
4275 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4276 Initialize.
4277 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4278 (linux_breakpoint_kind_from_current_state): New function.
4279 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4280 * linux-low.h (struct linux_target_ops)
4281 <breakpoint_kind_from_current_state>: New field.
4282 * target.h (struct target_ops): Likewise.
4283 (target_breakpoint_kind_from_current_state): New macro.
4284
4285 2015-11-30 Pedro Alves <palves@redhat.com>
4286
4287 * linux-low.c (linux_resume): Wake up the event loop before
4288 returning.
4289
4290 2015-11-30 Pedro Alves <palves@redhat.com>
4291
4292 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4293 check.
4294 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4295 to -1.
4296 * target.c (struct thread_search): New structure.
4297 (thread_search_callback): New function.
4298 (prev_general_thread): New global.
4299 (prepare_to_access_memory, done_accessing_memory): New functions.
4300 * target.h (prepare_to_access_memory, done_accessing_memory):
4301 Replace macros with function declarations.
4302
4303 2015-11-30 Pedro Alves <palves@redhat.com>
4304
4305 PR 14618
4306 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4307 report TARGET_WAITKIND_NO_RESUMED.
4308 * remote-utils.c (prepare_resume_reply): Handle
4309 TARGET_WAITKIND_NO_RESUMED.
4310 * server.c (report_no_resumed): New global.
4311 (handle_query) <qSupported>: Handle "no-resumed+". Report
4312 "no-resumed+" support.
4313 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4314 return error if the client doesn't support no-resumed events.
4315 (push_stop_notification): New function.
4316 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4317 events if the client supports them.
4318
4319 2015-11-30 Pedro Alves <palves@redhat.com>
4320
4321 * linux-low.c (thread_still_has_status_pending_p): Don't check
4322 vCont;t here.
4323 (lwp_resumed): New function.
4324 (status_pending_p_callback): Return early if the LWP is not
4325 supposed to be resumed.
4326
4327 2015-11-30 Pedro Alves <palves@redhat.com>
4328
4329 * linux-low.c (handle_extended_wait): Assert that the LWP's
4330 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4331 thread create events, leave the new child's status pending.
4332 (linux_low_filter_event): If GDB wants to hear about thread exit
4333 events, leave the LWP marked dead and don't delete it.
4334 (linux_wait_for_event_filtered): Don't check for thread exit.
4335 (filter_exit_event): New function.
4336 (linux_wait_1): Use it, when returning an exit event.
4337 (linux_resume_one_lwp_throw): Assert that the LWP's
4338 waitstatus is TARGET_WAITKIND_IGNORE.
4339 * remote-utils.c (prepare_resume_reply): Handle
4340 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4341 * server.c (report_thread_events): New global.
4342 (handle_general_set): Handle QThreadEvents.
4343 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4344 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4345 TARGET_WAITKIND_THREAD_EXITED.
4346 * server.h (report_thread_events): Declare.
4347
4348 2015-11-30 Pedro Alves <palves@redhat.com>
4349
4350 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4351 the thread's last_resume_kind was resume_stop.
4352
4353 2015-11-30 Pedro Alves <palves@redhat.com>
4354
4355 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4356 before returning.
4357
4358 2015-11-30 Pedro Alves <palves@redhat.com>
4359
4360 * server.c (handle_v_requests): Handle vCtrlC.
4361
4362 2015-11-30 Pedro Alves <palves@redhat.com>
4363
4364 * gdbthread.h (find_any_thread_of_pid): Declare.
4365 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4366 functions.
4367 * server.c (handle_query): If current_thread is NULL, look for
4368 another thread of the selected process.
4369
4370 2015-11-26 Daniel Colascione <dancol@dancol.org>
4371 Simon Marchi <simon.marchi@ericsson.com>
4372
4373 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4374 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4375 name in reply.
4376 * target.h (struct target_ops) <thread_name>: New field.
4377 (target_thread_name): New macro.
4378
4379 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4380
4381 * regcache.h (regcache_invalidate_pid): Add declaration.
4382 * regcache.c (regcache_invalidate_pid): New function, extracted
4383 from regcache_invalidate.
4384 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4385 Add trivial documentation comment.
4386 * lynx-low.c: Use regcache_invalidate_pid instead of
4387 regcache_invalidate.
4388
4389 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4390
4391 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4392 and Elf64_auxv_t if the target is Android.
4393
4394 2015-11-22 Doug Evans <xdje42@gmail.com>
4395
4396 * target.h: #include <sys/types.h>.
4397
4398 2015-11-19 Pedro Alves <palves@redhat.com>
4399
4400 * linux-low.c (linux_process_qsupported): Change prototype.
4401 Adjust.
4402 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4403 Change prototype.
4404 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4405 and adjust to loop over all features.
4406 * server.c (handle_query) <qSupported>: Adjust to call
4407 target_process_qsupported once, passing it a vector of unprocessed
4408 features.
4409 * target.h (struct target_ops) <process_qsupported>: Change
4410 prototype.
4411 (target_process_qsupported): Adjust.
4412
4413 2015-11-19 Pedro Alves <palves@redhat.com>
4414
4415 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4416 mode.
4417 * configure: Regenerate.
4418
4419 2015-11-19 Pedro Alves <palves@redhat.com>
4420
4421 * configure: Regenerate.
4422
4423 2015-11-19 Yao Qi <yao.qi@linaro.org>
4424
4425 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4426 type to uint32_t.
4427
4428 2015-11-19 Yao Qi <yao.qi@linaro.org>
4429
4430 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4431 (struct aarch64_operand): Move enum out.
4432
4433 2015-11-19 Yao Qi <yao.qi@linaro.org>
4434
4435 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4436 struct user_fpsimd_state *.
4437 (aarch64_store_fpregset): Likewise.
4438
4439 2015-11-19 Yao Qi <yao.qi@linaro.org>
4440
4441 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4442 struct user_pt_regs *.
4443 (aarch64_store_gregset): Likewise.
4444
4445 2015-11-18 Pedro Alves <palves@redhat.com>
4446
4447 * Makefile.in (all_object_files): Add $IPA_OBJS.
4448
4449 2015-11-17 Pedro Alves <palves@redhat.com>
4450
4451 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4452 GDB_SIGNAL_0 and gdb_signal_to_string.
4453
4454 2015-11-17 Pedro Alves <palves@redhat.com>
4455
4456 * win32-low.c (handle_output_debug_string): Remove parameter.
4457 (win32_kill): Remove our_status local and adjust call to
4458 handle_output_debug_string.
4459 (get_child_debug_event): Adjust call to
4460 handle_output_debug_string.
4461
4462 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4463
4464 * linux-mips-low.c (mips_fill_gregset): Add cast.
4465 (mips_store_gregset): Likewise.
4466 (mips_fill_fpregset): Likewise.
4467 (mips_store_fpregset): Likewise.
4468
4469 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4470
4471 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4472 priv.
4473
4474 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4475
4476 * linux-mips-low.c (mips_linux_new_thread): Change type of
4477 watch_type to enum target_hw_bp_type.
4478
4479 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4480
4481 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4482 Change return type to arm_hwbp_type.
4483
4484 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4485
4486 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4487 (arm_store_gregset): Likewise.
4488 * linux-arm-low.c (arm_get_hwcap): Likewise.
4489 (arm_read_description): Likewise.
4490
4491 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4492
4493 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4494
4495 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4496
4497 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4498 (ppc_fill_vsxregset): Likewise.
4499 (ppc_store_vsxregset): Likewise.
4500 (ppc_fill_vrregset): Likewise.
4501 (ppc_store_vrregset): Likewise.
4502 (ppc_fill_evrregset): Likewise.
4503 (ppc_store_evrregset): Likewise.
4504
4505 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4506
4507 * linux-ppc-low.c (ppc_usrregs_info): Remove
4508 forward-declaration.
4509 (ppc_arch_setup): Move lower in file.
4510
4511 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4512
4513 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4514 (ps_pdwrite): Likewise.
4515
4516 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4517
4518 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4519 to after assert checks.
4520
4521 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4522
4523 * proc-service.c (ps_pdread): Add/adjust casts.
4524 (ps_pdwrite): Add/adjust casts.
4525
4526 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4527
4528 * server.c (handle_search_memory_1): Cast return value of
4529 memmem.
4530
4531 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4532
4533 * server.c (write_qxfer_response): Change type of data to
4534 gdb_byte *.
4535
4536 2015-10-29 Pedro Alves <palves@redhat.com>
4537
4538 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4539
4540 2015-10-29 Pedro Alves <palves@redhat.com>
4541
4542 * tracepoint.c (clear_installed_tracepoints): Add casts.
4543
4544 2015-10-29 Pedro Alves <palves@redhat.com>
4545
4546 * server.c (handle_v_cont, process_serial_event): Add enum
4547 gdb_signal casts to signal parsing code.
4548
4549 2015-10-29 Pedro Alves <palves@redhat.com>
4550
4551 * linux-low.h (NULL_REGSET): Define.
4552 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4553 * linux-arm-low.c (arm_regsets): Likewise.
4554 * linux-crisv32-low.c (cris_regsets): Likewise.
4555 * linux-m68k-low.c (m68k_regsets): Likewise.
4556 * linux-mips-low.c (mips_regsets): Likewise.
4557 * linux-nios2-low.c (nios2_regsets): Likewise.
4558 * linux-ppc-low.c (ppc_regsets): Likewise.
4559 * linux-s390-low.c (s390_regsets): Likewise.
4560 * linux-sh-low.c (sh_regsets): Likewise.
4561 * linux-sparc-low.c (sparc_regsets): Likewise.
4562 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4563 * linux-tile-low.c (tile_regsets): Likewise.
4564 * linux-x86-low.c (x86_regsets): Likewise.
4565 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4566
4567 2015-10-29 Pedro Alves <palves@redhat.com>
4568
4569 * linux-low.h (NULL_REGSET): Define.
4570 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4571 * linux-arm-low.c (arm_regsets): Likewise.
4572 * linux-crisv32-low.c (cris_regsets): Likewise.
4573 * linux-m68k-low.c (m68k_regsets): Likewise.
4574 * linux-mips-low.c (mips_regsets): Likewise.
4575 * linux-nios2-low.c (nios2_regsets): Likewise.
4576 * linux-ppc-low.c (ppc_regsets): Likewise.
4577 * linux-s390-low.c (s390_regsets): Likewise.
4578 * linux-sh-low.c (sh_regsets): Likewise.
4579 * linux-sparc-low.c (sparc_regsets): Likewise.
4580 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4581 * linux-tile-low.c (tile_regsets): Likewise.
4582 * linux-x86-low.c (x86_regsets): Likewise.
4583 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4584
4585 2015-10-26 Doug Evans <dje@google.com>
4586
4587 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4588
4589 2015-10-26 Doug Evans <dje@google.com>
4590
4591 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4592
4593 2015-10-26 Doug Evans <dje@google.com>
4594
4595 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4596 for debug_printf.
4597 (attach_thread, find_new_threads_callback): Ditto.
4598
4599 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4600
4601 * mem-break.h (set_breakpoint_data): Remove.
4602
4603 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4604
4605 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4606 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4607 (initialize_low): Remove set_breakpoint_data call.
4608 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4609 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4610 (initialize_low): Remove set_breakpoint_data call.
4611 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4612 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4613 (initialize_low): Remove set_breakpoint_data call.
4614
4615 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4616
4617 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4618 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4619 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4620 * target.h (target_breakpoint_kind_from_pc): New macro.
4621
4622 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4623
4624 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4625 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4626 the default breakpoint kind.
4627
4628 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4629
4630 * linux-arm-low.c (arm_supports_z_point_type): Add software
4631 breakpoint support.
4632
4633 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4634
4635 * linux-arm-low.c: Refactor breakpoint definitions.
4636 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4637 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4638
4639 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4640
4641 * Makefile.in: Add arm.c/o.
4642 * configure.srv: Likewise.
4643 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4644 (arm_breakpoint_kind_from_pc): New function.
4645 (arm_sw_breakpoint_from_kind): Return proper kind.
4646 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4647
4648 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4649
4650 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4651 removal.
4652 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4653 (struct raw_breakpoint) <size>: Remove.
4654 (struct raw_breakpoint) <kind>: Add.
4655 (bp_size): New function.
4656 (bp_opcode): Likewise.
4657 (find_raw_breakpoint_at): Adjust for kind.
4658 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4659 (remove_memory_breakpoint): Adjust for kind call bp_size.
4660 (set_raw_breakpoint_at): Adjust for kind.
4661 (set_breakpoint): Likewise.
4662 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4663 (delete_raw_breakpoint): Adjust for kind.
4664 (delete_breakpoint): Likewise.
4665 (find_gdb_breakpoint): Likewise.
4666 (set_gdb_breakpoint_1): Likewise.
4667 (set_gdb_breakpoint): Likewise.
4668 (delete_gdb_breakpoint_1): Likewise.
4669 (delete_gdb_breakpoint): Likewise.
4670 (uninsert_raw_breakpoint): Likewise.
4671 (reinsert_raw_breakpoint): Likewise.
4672 (set_breakpoint_data): Remove.
4673 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4674 (check_mem_read): Adjust for kind call bp_size.
4675 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4676 (clone_one_breakpoint): Adjust for kind.
4677 * mem-break.h (set_gdb_breakpoint): Likewise.
4678 (delete_gdb_breakpoint): Likewise.
4679 * server.c (process_serial_event): Likewise.
4680
4681 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4682
4683 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4684 (struct linux_target_ops) <breakpoint>: Remove.
4685 (struct linux_target_ops) <breakpoint_len>: Remove.
4686 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4687 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4688 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4689 (arm_sw_breakpoint_from_kind): New function.
4690 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4691 (struct linux_target_ops) <breakpoint>: Remove.
4692 (struct linux_target_ops) <breakpoint_len>: Remove.
4693 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4694 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4695 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4696 (struct linux_target_ops) <breakpoint>: Remove.
4697 (struct linux_target_ops) <breakpoint_len>: Remove.
4698 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4699 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4700 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4701 (struct linux_target_ops) <breakpoint>: Remove.
4702 (struct linux_target_ops) <breakpoint_len>: Remove.
4703 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4704 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4705 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4706 and sw_breakpoint_from_kind to increment the pc.
4707 (linux_breakpoint_kind_from_pc): New function.
4708 (linux_sw_breakpoint_from_kind): New function.
4709 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4710 (initialize_low): Call breakpoint_kind_from_pc and
4711 sw_breakpoint_from_kind to replace breakpoint_data/len.
4712 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4713 New field.
4714 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4715 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4716 (struct linux_target_ops) <breakpoint>: Remove.
4717 (struct linux_target_ops) <breakpoint_len>: Remove.
4718 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4719 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4720 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4721 (struct linux_target_ops) <breakpoint>: Remove.
4722 (struct linux_target_ops) <breakpoint_len>: Remove.
4723 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4724 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4725 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4726 (struct linux_target_ops) <breakpoint>: Remove.
4727 (struct linux_target_ops) <breakpoint_len>: Remove.
4728 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4729 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4730 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4731 (struct linux_target_ops) <breakpoint>: Remove.
4732 (struct linux_target_ops) <breakpoint_len>: Remove.
4733 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4734 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4735 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4736 (struct linux_target_ops) <breakpoint>: Remove.
4737 (struct linux_target_ops) <breakpoint_len>: Remove.
4738 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4739 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4740 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4741 (struct linux_target_ops) <breakpoint>: Remove.
4742 (struct linux_target_ops) <breakpoint_len>: Remove.
4743 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4744 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4745 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4746 (struct linux_target_ops) <breakpoint>: Remove.
4747 (struct linux_target_ops) <breakpoint_len>: Remove.
4748 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4749 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4750 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4751 (struct linux_target_ops) <breakpoint>: Remove.
4752 (struct linux_target_ops) <breakpoint_len>: Remove.
4753 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4754 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4755 * linux-tic6x-low.c (tic6x_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-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4761 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4762 (struct linux_target_ops) <breakpoint>: Remove.
4763 (struct linux_target_ops) <breakpoint_len>: Remove.
4764 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4765 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4766 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
4767 (struct linux_target_ops) <breakpoint>: Remove.
4768 (struct linux_target_ops) <breakpoint_len>: Remove.
4769 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4770 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4771
4772 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4773
4774 * linux-cris-low.c (cris_get_pc): Remove void arg.
4775
4776 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4777
4778 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4779 variable name.
4780
4781 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4782
4783 * inferiors.c (thread_pid_matches_callback): New function.
4784 (find_thread_process): New function.
4785 (remove_thread): Reset current_thread.
4786 (remove_process): Assert threads have been removed first.
4787
4788 2015-10-15 Yao Qi <yao.qi@linaro.org>
4789
4790 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4791 if it is 3.
4792 (aarch64_remove_point): Likewise.
4793 * regcache.c (regcache_register_size): New function.
4794
4795 2015-10-12 Yao Qi <yao.qi@linaro.org>
4796
4797 * linux-aarch64-low.c: Update all callers as emit_load_store
4798 is renamed to aarch64_emit_load_store.
4799
4800 2015-10-12 Yao Qi <yao.qi@linaro.org>
4801
4802 * linux-aarch64-low.c: Update all callers of function renaming
4803 from emit_insn to aarch64_emit_insn.
4804
4805 2015-10-12 Yao Qi <yao.qi@linaro.org>
4806
4807 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4808 arch/aarch64-insn.h.
4809 (struct aarch64_memory_operand): Likewise.
4810 (ENCODE): Likewise.
4811 (emit_insn): Move to arch/aarch64-insn.c.
4812 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4813 (emit_load_store): Move to arch/aarch64-insn.c.
4814 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4815 (can_encode_int32): Remove.
4816
4817 2015-10-12 Yao Qi <yao.qi@linaro.org>
4818
4819 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4820 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4821 (aarch64_relocate_instruction): Likewise.
4822 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4823 (struct aarch64_insn_visitor): Likewise.
4824
4825 2015-10-12 Yao Qi <yao.qi@linaro.org>
4826
4827 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4828 (struct aarch64_insn_visitor): New.
4829 (struct aarch64_insn_relocation_data): New.
4830 (aarch64_ftrace_insn_reloc_b): New function.
4831 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4832 (aarch64_ftrace_insn_reloc_cb): Likewise.
4833 (aarch64_ftrace_insn_reloc_tb): Likewise.
4834 (aarch64_ftrace_insn_reloc_adr): Likewise.
4835 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4836 (aarch64_ftrace_insn_reloc_others): Likewise.
4837 (visitor): New.
4838 (aarch64_relocate_instruction): Use visitor.
4839
4840 2015-10-12 Yao Qi <yao.qi@linaro.org>
4841
4842 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4843 int. Add argument buf.
4844 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4845 aarch64_relocate_instruction.
4846
4847 2015-10-12 Yao Qi <yao.qi@linaro.org>
4848
4849 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4850 argument insn. Remove local variable insn. Don't call
4851 target_read_uint32.
4852 (aarch64_install_fast_tracepoint_jump_pad): Call
4853 target_read_uint32.
4854
4855 2015-09-30 Yao Qi <yao.qi@linaro.org>
4856
4857 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4858 (emit_load_store_pair): Likewise.
4859
4860 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4861
4862 * dll.c (match_dll): Add cast(s).
4863 (unloaded_dll): Likewise.
4864 * linux-low.c (second_thread_of_pid_p): Likewise.
4865 (delete_lwp_callback): Likewise.
4866 (count_events_callback): Likewise.
4867 (select_event_lwp_callback): Likewise.
4868 (linux_set_resume_request): Likewise.
4869 * server.c (accumulate_file_name_length): Likewise.
4870 (emit_dll_description): Likewise.
4871 (handle_qxfer_threads_worker): Likewise.
4872 (visit_actioned_threads): Likewise.
4873 * thread-db.c (any_thread_of): Likewise.
4874 * tracepoint.c (same_process_p): Likewise.
4875 (match_blocktype): Likewise.
4876 (build_traceframe_info_xml): Likewise.
4877
4878 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4879
4880 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4881 assignment.
4882 (gdb_unparse_agent_expr): Likewise.
4883 * hostio.c (require_data): Likewise.
4884 (handle_pread): Likewise.
4885 * linux-low.c (disable_regset): Likewise.
4886 (fetch_register): Likewise.
4887 (store_register): Likewise.
4888 (get_dynamic): Likewise.
4889 (linux_qxfer_libraries_svr4): Likewise.
4890 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4891 (set_fast_tracepoint_jump): Likewise.
4892 (uninsert_fast_tracepoint_jumps_at): Likewise.
4893 (reinsert_fast_tracepoint_jumps_at): Likewise.
4894 (validate_inserted_breakpoint): Likewise.
4895 (clone_agent_expr): Likewise.
4896 * regcache.c (init_register_cache): Likewise.
4897 * remote-utils.c (putpkt_binary_1): Likewise.
4898 (decode_M_packet): Likewise.
4899 (decode_X_packet): Likewise.
4900 (look_up_one_symbol): Likewise.
4901 (relocate_instruction): Likewise.
4902 (monitor_output): Likewise.
4903 * server.c (handle_search_memory): Likewise.
4904 (handle_qxfer_exec_file): Likewise.
4905 (handle_qxfer_libraries): Likewise.
4906 (handle_qxfer): Likewise.
4907 (handle_query): Likewise.
4908 (handle_v_cont): Likewise.
4909 (handle_v_run): Likewise.
4910 (captured_main): Likewise.
4911 * target.c (write_inferior_memory): Likewise.
4912 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4913 * tracepoint.c (init_trace_buffer): Likewise.
4914 (add_tracepoint_action): Likewise.
4915 (add_traceframe): Likewise.
4916 (add_traceframe_block): Likewise.
4917 (cmd_qtdpsrc): Likewise.
4918 (cmd_qtdv): Likewise.
4919 (cmd_qtstatus): Likewise.
4920 (response_source): Likewise.
4921 (response_tsv): Likewise.
4922 (cmd_qtnotes): Likewise.
4923 (gdb_collect): Likewise.
4924 (initialize_tracepoint): Likewise.
4925
4926 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4927
4928 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4929 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4930 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4931 <NOP>: New.
4932 (enum aarch64_condition_codes): New enum.
4933 (w0): New static global.
4934 (fp): Likewise.
4935 (lr): Likewise.
4936 (struct aarch64_memory_operand) <type>: New
4937 MEMORY_OPERAND_POSTINDEX type.
4938 (postindex_memory_operand): New helper function.
4939 (emit_ret): New function.
4940 (emit_load_store_pair): New function, factored out of emit_stp
4941 with support for MEMORY_OPERAND_POSTINDEX.
4942 (emit_stp): Rewrite using emit_load_store_pair.
4943 (emit_ldp): New function.
4944 (emit_load_store): Likewise.
4945 (emit_ldr): Mention post-index instruction in comment.
4946 (emit_ldrh): New function.
4947 (emit_ldrb): New function.
4948 (emit_ldrsw): Mention post-index instruction in comment.
4949 (emit_str): Likewise.
4950 (emit_subs): New function.
4951 (emit_cmp): Likewise.
4952 (emit_and): Likewise.
4953 (emit_orr): Likewise.
4954 (emit_orn): Likewise.
4955 (emit_eor): Likewise.
4956 (emit_mvn): Likewise.
4957 (emit_lslv): Likewise.
4958 (emit_lsrv): Likewise.
4959 (emit_asrv): Likewise.
4960 (emit_mul): Likewise.
4961 (emit_sbfm): Likewise.
4962 (emit_sbfx): Likewise.
4963 (emit_ubfm): Likewise.
4964 (emit_ubfx): Likewise.
4965 (emit_csinc): Likewise.
4966 (emit_cset): Likewise.
4967 (emit_nop): Likewise.
4968 (emit_ops_insns): New helper function.
4969 (emit_pop): Likewise.
4970 (emit_push): Likewise.
4971 (aarch64_emit_prologue): New function.
4972 (aarch64_emit_epilogue): Likewise.
4973 (aarch64_emit_add): Likewise.
4974 (aarch64_emit_sub): Likewise.
4975 (aarch64_emit_mul): Likewise.
4976 (aarch64_emit_lsh): Likewise.
4977 (aarch64_emit_rsh_signed): Likewise.
4978 (aarch64_emit_rsh_unsigned): Likewise.
4979 (aarch64_emit_ext): Likewise.
4980 (aarch64_emit_log_not): Likewise.
4981 (aarch64_emit_bit_and): Likewise.
4982 (aarch64_emit_bit_or): Likewise.
4983 (aarch64_emit_bit_xor): Likewise.
4984 (aarch64_emit_bit_not): Likewise.
4985 (aarch64_emit_equal): Likewise.
4986 (aarch64_emit_less_signed): Likewise.
4987 (aarch64_emit_less_unsigned): Likewise.
4988 (aarch64_emit_ref): Likewise.
4989 (aarch64_emit_if_goto): Likewise.
4990 (aarch64_emit_goto): Likewise.
4991 (aarch64_write_goto_address): Likewise.
4992 (aarch64_emit_const): Likewise.
4993 (aarch64_emit_call): Likewise.
4994 (aarch64_emit_reg): Likewise.
4995 (aarch64_emit_pop): Likewise.
4996 (aarch64_emit_stack_flush): Likewise.
4997 (aarch64_emit_zero_ext): Likewise.
4998 (aarch64_emit_swap): Likewise.
4999 (aarch64_emit_stack_adjust): Likewise.
5000 (aarch64_emit_int_call_1): Likewise.
5001 (aarch64_emit_void_call_2): Likewise.
5002 (aarch64_emit_eq_goto): Likewise.
5003 (aarch64_emit_ne_goto): Likewise.
5004 (aarch64_emit_lt_goto): Likewise.
5005 (aarch64_emit_le_goto): Likewise.
5006 (aarch64_emit_gt_goto): Likewise.
5007 (aarch64_emit_ge_got): Likewise.
5008 (aarch64_emit_ops_impl): New static global variable.
5009 (aarch64_emit_ops): New target function, return
5010 &aarch64_emit_ops_impl.
5011 (struct linux_target_ops): Install it.
5012
5013 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5014
5015 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
5016 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
5017 aarch64-ipa.o.
5018 * linux-aarch64-ipa.c: New file.
5019 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
5020 and endian.h.
5021 (aarch64_get_thread_area): New target method.
5022 (extract_signed_bitfield): New helper function.
5023 (aarch64_decode_ldr_literal): New function.
5024 (enum aarch64_opcodes): New enum.
5025 (struct aarch64_register): New struct.
5026 (struct aarch64_operand): New struct.
5027 (x0): New static global.
5028 (x1): Likewise.
5029 (x2): Likewise.
5030 (x3): Likewise.
5031 (x4): Likewise.
5032 (w2): Likewise.
5033 (ip0): Likewise.
5034 (sp): Likewise.
5035 (xzr): Likewise.
5036 (aarch64_register): New helper function.
5037 (register_operand): Likewise.
5038 (immediate_operand): Likewise.
5039 (struct aarch64_memory_operand): New struct.
5040 (offset_memory_operand): New helper function.
5041 (preindex_memory_operand): Likewise.
5042 (enum aarch64_system_control_registers): New enum.
5043 (ENCODE): New macro.
5044 (emit_insn): New helper function.
5045 (emit_b): New function.
5046 (emit_bcond): Likewise.
5047 (emit_cb): Likewise.
5048 (emit_tb): Likewise.
5049 (emit_blr): Likewise.
5050 (emit_stp): Likewise.
5051 (emit_ldp_q_offset): Likewise.
5052 (emit_stp_q_offset): Likewise.
5053 (emit_load_store): Likewise.
5054 (emit_ldr): Likewise.
5055 (emit_ldrsw): Likewise.
5056 (emit_str): Likewise.
5057 (emit_ldaxr): Likewise.
5058 (emit_stxr): Likewise.
5059 (emit_stlr): Likewise.
5060 (emit_data_processing_reg): Likewise.
5061 (emit_data_processing): Likewise.
5062 (emit_add): Likewise.
5063 (emit_sub): Likewise.
5064 (emit_mov): Likewise.
5065 (emit_movk): Likewise.
5066 (emit_mov_addr): Likewise.
5067 (emit_mrs): Likewise.
5068 (emit_msr): Likewise.
5069 (emit_sevl): Likewise.
5070 (emit_wfe): Likewise.
5071 (append_insns): Likewise.
5072 (can_encode_int32_in): New helper function.
5073 (aarch64_relocate_instruction): New function.
5074 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
5075 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5076 (struct linux_target_ops): Install aarch64_get_thread_area,
5077 aarch64_install_fast_tracepoint_jump_pad and
5078 aarch64_get_min_fast_tracepoint_insn_len.
5079
5080 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5081
5082 * Makefile.in (aarch64-insn.o): New rule.
5083 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5084
5085 2015-09-21 Yao Qi <yao.qi@linaro.org>
5086
5087 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5088
5089 2015-09-21 Yao Qi <yao.qi@linaro.org>
5090
5091 * tracepoint.c (max_jump_pad_size): Remove.
5092
5093 2015-09-18 Yao Qi <yao.qi@linaro.org>
5094
5095 * linux-aarch64-low.c: Don't include sys/uio.h.
5096 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5097
5098 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5099
5100 * tracepoint.c (eval_result_type): Change prototype.
5101 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5102
5103 2015-09-15 Pedro Alves <palves@redhat.com>
5104
5105 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5106 Check whether to report exec events instead of checking whether
5107 multiprocess is enabled.
5108
5109 2015-09-15 Pedro Alves <palves@redhat.com>
5110
5111 PR remote/18965
5112 * remote-utils.c (prepare_resume_reply): Merge
5113 TARGET_WAITKIND_VFORK_DONE switch case with the
5114 TARGET_WAITKIND_FORKED case.
5115
5116 2015-09-15 Yao Qi <yao.qi@linaro.org>
5117
5118 * server.c (handle_query): Check string comparison using
5119 "else if" instead of "if".
5120
5121 2015-09-15 Yao Qi <yao.qi@linaro.org>
5122
5123 * server.c (vCont_supported): New global variable.
5124 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5125 matches. Append ";vContSupported+" to own_buf.
5126 (handle_v_requests): Append ";s;S" to own_buf if target supports
5127 hardware single step or vCont_supported is false.
5128 (capture_main): Set vCont_supported to zero.
5129
5130 2015-09-15 Yao Qi <yao.qi@linaro.org>
5131
5132 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5133 it to ...
5134 (linux_supports_hardware_single_step): ... New function.
5135 (linux_target_ops): Update.
5136 * lynx-low.c (lynx_target_ops): Set field
5137 supports_hardware_single_step to target_can_do_hardware_single_step.
5138 * nto-low.c (nto_target_ops): Likewise.
5139 * spu-low.c (spu_target_ops): Likewise.
5140 * win32-low.c (win32_target_ops): Likewise.
5141 * target.c (target_can_do_hardware_single_step): New function.
5142 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5143 Remove. <supports_hardware_single_step>: New field.
5144 (target_supports_conditional_breakpoints): Remove.
5145 (target_supports_hardware_single_step): New macro.
5146 (target_can_do_hardware_single_step): Declare.
5147 * server.c (handle_query): Use target_supports_hardware_single_step
5148 instead of target_supports_conditional_breakpoints.
5149
5150 2015-09-15 Yao Qi <yao.qi@linaro.org>
5151
5152 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5153 function.
5154 (struct linux_target_ops the_low_target): Install
5155 aarch64_linux_siginfo_fixup.
5156
5157 2015-09-11 Don Breazeal <donb@codesourcery.com>
5158 Luis Machado <lgustavo@codesourcery.com>
5159
5160 * linux-low.c (linux_mourn): Static declaration.
5161 (linux_arch_setup): Move in front of
5162 handle_extended_wait.
5163 (linux_arch_setup_thread): New function.
5164 (handle_extended_wait): Handle exec events. Call
5165 linux_arch_setup_thread. Make event_lwp argument a
5166 pointer-to-a-pointer.
5167 (check_zombie_leaders): Do not check stopped threads.
5168 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5169 (linux_low_filter_event): Add lwp and thread for exec'ing
5170 non-leader thread if leader thread has been deleted.
5171 Refactor code into linux_arch_setup_thread and call it.
5172 Pass child lwp pointer by reference to handle_extended_wait.
5173 (linux_wait_for_event_filtered): Update comment.
5174 (linux_wait_1): Prevent clobbering exec event status.
5175 (linux_supports_exec_events): New function.
5176 (linux_target_ops) <supports_exec_events>: Initialize new member.
5177 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5178 new member.
5179 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5180 * server.c (report_exec_events): New global variable.
5181 (handle_query): Handle qSupported query for exec-events feature.
5182 (captured_main): Initialize report_exec_events.
5183 * server.h (report_exec_events): Declare new global variable.
5184 * target.h (struct target_ops) <supports_exec_events>: New
5185 member.
5186 (target_supports_exec_events): New macro.
5187 * win32-low.c (win32_target_ops) <supports_exec_events>:
5188 Initialize new member.
5189
5190 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5191
5192 * linux-low.c (linux_low_enable_btrace): Remove.
5193 (linux_target_ops): Replace linux_low_enable_btrace with
5194 linux_enable_btrace.
5195
5196 2015-09-03 Yao Qi <yao.qi@linaro.org>
5197
5198 * linux-aarch64-low.c (aarch64_insert_point): Call
5199 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5200 returns true.
5201
5202 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5203
5204 * linux-low.c (check_stopped_by_breakpoint): Use
5205 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5206
5207 2015-08-27 Pedro Alves <palves@redhat.com>
5208
5209 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5210
5211 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5212
5213 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5214 the XNEW-family equivalent.
5215 (compile_bytecodes): Likewise.
5216 * dll.c (loaded_dll): Likewise.
5217 * event-loop.c (append_callback_event): Likewise.
5218 (create_file_handler): Likewise.
5219 (create_file_event): Likewise.
5220 * hostio.c (handle_open): Likewise.
5221 * inferiors.c (add_thread): Likewise.
5222 (add_process): Likewise.
5223 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5224 * linux-arm-low.c (arm_new_process): Likewise.
5225 (arm_new_thread): Likewise.
5226 * linux-low.c (add_to_pid_list): Likewise.
5227 (linux_add_process): Likewise.
5228 (handle_extended_wait): Likewise.
5229 (add_lwp): Likewise.
5230 (enqueue_one_deferred_signal): Likewise.
5231 (enqueue_pending_signal): Likewise.
5232 (linux_resume_one_lwp_throw): Likewise.
5233 (linux_resume_one_thread): Likewise.
5234 (linux_read_memory): Likewise.
5235 (linux_write_memory): Likewise.
5236 * linux-mips-low.c (mips_linux_new_process): Likewise.
5237 (mips_linux_new_thread): Likewise.
5238 (mips_add_watchpoint): Likewise.
5239 * linux-x86-low.c (initialize_low_arch): Likewise.
5240 * lynx-low.c (lynx_add_process): Likewise.
5241 * mem-break.c (set_raw_breakpoint_at): Likewise.
5242 (set_breakpoint): Likewise.
5243 (add_condition_to_breakpoint): Likewise.
5244 (add_commands_to_breakpoint): Likewise.
5245 (clone_agent_expr): Likewise.
5246 (clone_one_breakpoint): Likewise.
5247 * regcache.c (new_register_cache): Likewise.
5248 * remote-utils.c (look_up_one_symbol): Likewise.
5249 * server.c (queue_stop_reply): Likewise.
5250 (start_inferior): Likewise.
5251 (queue_stop_reply_callback): Likewise.
5252 (handle_target_event): Likewise.
5253 * spu-low.c (fetch_ppc_memory): Likewise.
5254 (store_ppc_memory): Likewise.
5255 * target.c (set_target_ops): Likewise.
5256 * thread-db.c (thread_db_load_search): Likewise.
5257 (try_thread_db_load_1): Likewise.
5258 * tracepoint.c (add_tracepoint): Likewise.
5259 (add_tracepoint_action): Likewise.
5260 (create_trace_state_variable): Likewise.
5261 (cmd_qtdpsrc): Likewise.
5262 (cmd_qtro): Likewise.
5263 (add_while_stepping_state): Likewise.
5264 * win32-low.c (child_add_thread): Likewise.
5265 (get_image_name): Likewise.
5266
5267 2015-08-25 Yao Qi <yao.qi@linaro.org>
5268
5269 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5270
5271 2015-08-25 Yao Qi <yao.qi@linaro.org>
5272
5273 * Makefile.in (aarch64-linux.o): New rule.
5274 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5275 srv_tgtobj.
5276 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5277 (aarch64_init_debug_reg_state): Make it extern.
5278 (aarch64_linux_prepare_to_resume): Remove.
5279
5280 2015-08-25 Yao Qi <yao.qi@linaro.org>
5281
5282 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5283 lwp_arch_private_info and ptid_of_lwp.
5284
5285 2015-08-25 Yao Qi <yao.qi@linaro.org>
5286
5287 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5288 Find proc_info by find_process_pid. All callers updated.
5289
5290 2015-08-25 Yao Qi <yao.qi@linaro.org>
5291
5292 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5293 Remove.
5294 (debug_reg_change_callback): Remove.
5295 (aarch64_notify_debug_reg_change): Remove.
5296
5297 2015-08-25 Yao Qi <yao.qi@linaro.org>
5298
5299 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5300 Call current_lwp_ptid.
5301
5302 2015-08-25 Yao Qi <yao.qi@linaro.org>
5303
5304 * linux-aarch64-low.c (debug_reg_change_callback): Use
5305 debug_printf.
5306
5307 2015-08-25 Yao Qi <yao.qi@linaro.org>
5308
5309 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5310
5311 2015-08-25 Yao Qi <yao.qi@linaro.org>
5312
5313 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5314
5315 2015-08-25 Yao Qi <yao.qi@linaro.org>
5316
5317 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5318 the code.
5319
5320 2015-08-25 Yao Qi <yao.qi@linaro.org>
5321
5322 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5323 Remove.
5324 (debug_reg_change_callback): Remove argument entry and add argument
5325 lwp. Remove local variable thread. Don't print thread id in the
5326 debugging output. Don't check whether pid of thread equals to pid.
5327 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5328 iterate_over_lwps instead find_inferior.
5329
5330 2015-08-24 Pedro Alves <palves@redhat.com>
5331
5332 * inferiors.c (get_first_process): New function.
5333 * inferiors.h (get_first_process): New declaration.
5334 * remote-utils.c (read_ptid): Default to the first process in the
5335 list, instead of to the current thread's process.
5336
5337 2015-08-24 Pedro Alves <palves@redhat.com>
5338
5339 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5340 * event-loop.c: Likewise.
5341 * remote-utils.c: Likewise.
5342 * tracepoint.c: Likewise.
5343
5344 2015-08-24 Pedro Alves <palves@redhat.com>
5345
5346 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5347 ptid_get_lwp.
5348
5349 2015-08-21 Pedro Alves <palves@redhat.com>
5350
5351 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5352 instead of literal 1.
5353
5354 2015-08-21 Pedro Alves <palves@redhat.com>
5355
5356 * tdesc.c (default_description): Explicitly zero-initialize.
5357
5358 2015-08-21 Pedro Alves <palves@redhat.com>
5359
5360 PR gdb/18749
5361 * inferiors.c (remove_thread): Discard any pending stop reply for
5362 this thread.
5363 * server.c (remove_all_on_match_pid): Rename to ...
5364 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5365 instead of a pid.
5366 (discard_queued_stop_replies): Change parameter to a ptid. Now
5367 extern.
5368 (handle_v_kill, kill_inferior_callback, captured_main)
5369 (process_serial_event): Adjust.
5370 * server.h (discard_queued_stop_replies): Declare.
5371
5372 2015-08-21 Pedro Alves <palves@redhat.com>
5373
5374 * linux-low.c (wait_for_sigstop): Always switch to no thread
5375 selected if the previously current thread dies.
5376 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5377 process instead of the current thread's.
5378 * remote-utils.c (input_interrupt): Don't check if there's no
5379 current thread.
5380 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5381 current thread to the general thread fails, error out.
5382 (handle_qxfer_auxv, handle_qxfer_libraries)
5383 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5384 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5385 (handle_query): Check if there's a thread selected instead of
5386 checking whether there's any thread in the thread list.
5387 (handle_qxfer_threads, handle_qxfer_btrace)
5388 (handle_qxfer_btrace_conf): Don't error out early if there's no
5389 thread in the thread list.
5390 (handle_v_cont, myresume): Don't set the current thread to the
5391 continue thread.
5392 (process_serial_event) <Hg handling>: Also set thread_id if the
5393 previous general thread is still alive.
5394 (process_serial_event) <g/G handling>: If setting the current
5395 thread to the general thread fails, error out.
5396 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5397 thread's lwp instead of the current thread's.
5398 * target.c (set_desired_thread): If the desired thread was not
5399 found, leave the current thread pointing to NULL. Return an int
5400 (boolean) indicating success.
5401 * target.h (set_desired_thread): Change return type to int.
5402
5403 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5404
5405 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5406 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5407 #includes.
5408 (ps_get_thread_area): New function.
5409
5410 2015-08-19 Gary Benson <gbenson@redhat.com>
5411
5412 * hostio.c (handle_pread): Do not attempt to read more data
5413 than hostio_reply_with_data can fit in a packet.
5414
5415 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5416
5417 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5418
5419 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5420
5421 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5422
5423 2015-08-06 Pedro Alves <palves@redhat.com>
5424
5425 * tracepoint.c (expr_eval_result): Now an int.
5426
5427 2015-08-06 Pedro Alves <palves@redhat.com>
5428
5429 * gdbthread.h (struct regcache): Forward declare.
5430 (struct thread_info) <regcache_data>: Now a struct regcache
5431 pointer.
5432 * inferiors.c (inferior_regcache_data)
5433 (set_inferior_regcache_data): Now work with struct regcache
5434 pointers.
5435 * inferiors.h (struct regcache): Forward declare.
5436 (inferior_regcache_data, set_inferior_regcache_data): Now work
5437 with struct regcache pointers.
5438 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5439 (free_register_cache_thread): Remove struct regcache pointer
5440 casts.
5441
5442 2015-08-06 Pedro Alves <palves@redhat.com>
5443
5444 * server.c (captured_main): On error, print the exception message
5445 to stderr, and if run_once is set, throw a quit.
5446
5447 2015-08-06 Pedro Alves <palves@redhat.com>
5448
5449 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5450 the current thread.
5451
5452 2015-08-06 Pedro Alves <palves@redhat.com>
5453
5454 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5455 reading beyond the passed in buffer length.
5456
5457 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5458
5459 * tracepoint.c (symbol_list) <required>: Remove.
5460
5461 2015-08-06 Pedro Alves <palves@redhat.com>
5462
5463 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5464 count if stopping and suspending threads.
5465 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5466 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5467 (linux_detach): Complete an ongoing step-over.
5468 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5469 throughout.
5470 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5471 (linux_wait_1): If passing a signal to the inferior after
5472 finishing a step-over, unsuspend and re-resume all lwps. If we
5473 see a single-step event but the thread should be continuing, don't
5474 pass the trap to gdb.
5475 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5476 internal_error instead of gdb_assert.
5477 (enqueue_pending_signal): New function.
5478 (check_ptrace_stopped_lwp_gone): Add debug output.
5479 (start_step_over): Use internal_error instead of gdb_assert.
5480 (complete_ongoing_step_over): New function.
5481 (linux_resume_one_thread): Don't resume a suspended thread.
5482 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5483 it stepping.
5484
5485 2015-08-06 Pedro Alves <palves@redhat.com>
5486
5487 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5488 (linux_thread_alive): Use lwp_is_marked_dead.
5489 (extended_event_reported): Delete.
5490 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5491 instead of extended_event_reported.
5492 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5493 as well.
5494 (lwp_is_marked_dead): New function.
5495 (lwp_running): Use lwp_is_marked_dead.
5496 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5497 comment.
5498
5499 2015-08-06 Pedro Alves <palves@redhat.com>
5500
5501 * linux-low.c (linux_wait_1): Move fork event output out of the
5502 !report_to_gdb check. Pass event_child->waitstatus to
5503 target_waitstatus_to_string instead of ourstatus.
5504
5505 2015-08-04 Yao Qi <yao.qi@linaro.org>
5506
5507 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5508 if current_thread is 32 bit.
5509
5510 2015-08-04 Yao Qi <yao.qi@linaro.org>
5511
5512 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5513 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5514 * server.c (extended_protocol): Remove "static".
5515 * server.h (extended_protocol): Declare it.
5516
5517 2015-08-04 Yao Qi <yao.qi@linaro.org>
5518
5519 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5520 both aarch64 and aarch32.
5521 (aarch64_set_pc): Likewise.
5522
5523 2015-08-04 Yao Qi <yao.qi@linaro.org>
5524
5525 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5526 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5527 arm-with-neon.xml to srv_xmlfiles.
5528 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5529 (is_64bit_tdesc): New function.
5530 (aarch64_linux_read_description): New function.
5531 (aarch64_arch_setup): Call aarch64_linux_read_description.
5532 (regs_info): Rename to regs_info_aarch64.
5533 (aarch64_regs_info): Return right regs_info.
5534 (initialize_low_arch): Call initialize_low_arch_aarch32.
5535
5536 2015-08-04 Yao Qi <yao.qi@linaro.org>
5537
5538 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5539 * linux-aarch32-low.c: New file.
5540 * linux-aarch32-low.h: New file.
5541 * linux-arm-low.c (arm_fill_gregset): Move it to
5542 linux-aarch32-low.c.
5543 (arm_store_gregset): Likewise.
5544 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5545 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5546 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5547 (regs_info): Rename to regs_info_arm.
5548 (arm_regs_info): Return regs_info_aarch32 if
5549 have_ptrace_getregset is 1 and target description is
5550 arm_with_neon or arm_with_vfpv3.
5551 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5552 Call initialize_low_arch_aarch32 instead.
5553
5554 2015-08-04 Yao Qi <yao.qi@linaro.org>
5555
5556 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5557 * linux-low.c: ... here.
5558 * linux-low.h (have_ptrace_getregset): Declare it.
5559
5560 2015-08-04 Pedro Alves <palves@redhat.com>
5561
5562 * thread-db.c (struct thread_db): Use new typedefs.
5563 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5564 CHK calls.
5565 (disable_thread_event_reporting): Cast result of dlsym to
5566 destination function pointer type.
5567 (thread_db_mourn): Use td_ta_delete_ftype.
5568
5569 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5570
5571 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5572 arch variant.
5573 (CDX_BREAKPOINT): Define for R2.
5574 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5575 (the_low_target): Add comments.
5576
5577 2015-07-30 Yao Qi <yao.qi@linaro.org>
5578
5579 * linux-arm-low.c (arm_hwcap): Remove it.
5580 (arm_read_description): New local variable arm_hwcap. Don't
5581 set arm_hwcap to zero.
5582
5583 2015-07-30 Yao Qi <yao.qi@linaro.org>
5584
5585 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5586 Use regcache->tdesc instead.
5587 (arm_store_wmmxregset): Likewise.
5588 (arm_fill_vfpregset): Likewise.
5589 (arm_store_vfpregset): Likewise.
5590
5591 2015-07-30 Yao Qi <yao.qi@linaro.org>
5592
5593 * linux-arm-low.c: Include arch/arm.h.
5594 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5595 (arm_store_gregset): Likewise.
5596
5597 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5598
5599 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5600 ptrace's 4th parameter.
5601
5602 2015-07-27 Yao Qi <yao.qi@linaro.org>
5603
5604 * configure.srv (case aarch64*-*-linux*): Don't set
5605 srv_linux_usrregs.
5606
5607 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5608
5609 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5610 sys/ptrace.h.
5611 * linux-arm-low.c: Likewise.
5612 * linux-cris-low.c: Likewise.
5613 * linux-crisv32-low.c: Likewise.
5614 * linux-low.c: Likewise.
5615 * linux-m68k-low.c: Likewise.
5616 * linux-mips-low.c: Likewise.
5617 * linux-nios2-low.c: Likewise.
5618 * linux-s390-low.c: Likewise.
5619 * linux-sparc-low.c: Likewise.
5620 * linux-tic6x-low.c: Likewise.
5621 * linux-tile-low.c: Likewise.
5622 * linux-x86-low.c: Likewise.
5623
5624 2015-07-24 Pedro Alves <palves@redhat.com>
5625
5626 * config.in: Regenerate.
5627 * configure: Regenerate.
5628
5629 2015-07-24 Pedro Alves <palves@redhat.com>
5630
5631 * acinclude.m4: Include ../ptrace.m4.
5632 * configure.ac: Call GDB_AC_PTRACE.
5633 * config.in, configure: Regenerate.
5634
5635 2015-07-24 Yao Qi <yao.qi@linaro.org>
5636
5637 * linux-low.c (linux_create_inferior): Remove setting to
5638 proc->priv->new_inferior.
5639 (linux_attach): Likewise.
5640 (linux_low_filter_event): Likewise.
5641 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5642
5643 2015-07-24 Yao Qi <yao.qi@linaro.org>
5644
5645 * linux-low.c (linux_arch_setup): New function.
5646 (linux_low_filter_event): If proc->tdesc is NULL and
5647 proc->attached is true, call the_low_target.arch_setup.
5648 Otherwise, keep status pending, and return.
5649 (linux_resume_one_lwp_throw): Don't call get_pc if
5650 thread->while_stepping isn't NULL. Don't call
5651 get_thread_regcache if proc->tdesc is NULL.
5652 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5653 (linux_target_ops): Install arch_setup.
5654 * server.c (start_inferior): Call the_target->arch_setup.
5655 * target.h (struct target_ops) <arch_setup>: New field.
5656 (target_arch_setup): New marco.
5657 * lynx-low.c (lynx_target_ops): Update.
5658 * nto-low.c (nto_target_ops): Update.
5659 * spu-low.c (spu_target_ops): Update.
5660 * win32-low.c (win32_target_ops): Update.
5661
5662 2015-07-24 Yao Qi <yao.qi@linaro.org>
5663
5664 * linux-low.c (linux_add_process): Don't set
5665 proc->priv->new_inferior.
5666 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5667 (linux_attach): Likewise.
5668
5669 2015-07-24 Yao Qi <yao.qi@linaro.org>
5670
5671 * server.c (start_inferior): Code refactor.
5672
5673 2015-07-24 Yao Qi <yao.qi@linaro.org>
5674
5675 * server.c (process_serial_event): Set general_thread.
5676
5677 2015-07-21 Yao Qi <yao.qi@linaro.org>
5678
5679 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5680 aarch64_linux_get_debug_reg_capacity.
5681
5682 2015-07-17 Yao Qi <yao.qi@linaro.org>
5683
5684 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5685 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5686 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5687 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5688 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5689 (AARCH64_HWP_ALIGNMENT): Likewise.
5690 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5691 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5692 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5693 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5694 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5695 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5696 (struct aarch64_debug_reg_state): Likewise.
5697 (struct arch_lwp_info): Likewise.
5698 (aarch64_align_watchpoint): Likewise.
5699 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5700 (aarch64_watchpoint_length): Likewise.
5701 (aarch64_point_encode_ctrl_reg): Likewise
5702 (aarch64_point_is_aligned): Likewise.
5703 (aarch64_align_watchpoint): Likewise.
5704 (aarch64_linux_set_debug_regs):
5705 (aarch64_dr_state_insert_one_point): Likewise.
5706 (aarch64_dr_state_remove_one_point): Likewise.
5707 (aarch64_handle_breakpoint): Likewise.
5708 (aarch64_handle_aligned_watchpoint): Likewise.
5709 (aarch64_handle_unaligned_watchpoint): Likewise.
5710 (aarch64_handle_watchpoint): Likewise.
5711
5712 2015-07-17 Yao Qi <yao.qi@linaro.org>
5713
5714 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5715 and don't aarch64_get_debug_reg_state. All callers update.
5716 (aarch64_handle_aligned_watchpoint): Likewise.
5717 (aarch64_handle_unaligned_watchpoint): Likewise.
5718 (aarch64_handle_watchpoint): Likewise.
5719 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5720 (aarch64_remove_point): Likewise.
5721
5722 2015-07-17 Yao Qi <yao.qi@linaro.org>
5723
5724 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5725 debug_printf.
5726 (aarch64_handle_unaligned_watchpoint): Likewise.
5727
5728 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5729
5730 Revert the previous 3 commits:
5731 Move gdb_regex* to common/
5732 Move linux_find_memory_regions_full & co.
5733 gdbserver build-id attribute generator
5734
5735 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5736 Jan Kratochvil <jan.kratochvil@redhat.com>
5737
5738 gdbserver build-id attribute generator.
5739 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5740 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5741 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5742 (find_phdr): New.
5743 (get_dynamic): Use find_pdhr to traverse program headers.
5744 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5745 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5746 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5747 (get_hex_build_id): New.
5748 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5749 to reply XML document.
5750
5751 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5752 Jan Kratochvil <jan.kratochvil@redhat.com>
5753
5754 * target.c: Include target/target-utils.h and fcntl.h.
5755 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5756 (target_fileio_read_stralloc): New functions.
5757
5758 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5759
5760 * Makefile.in (OBS): Add gdb_regex.o.
5761 (gdb_regex.o): New.
5762 * config.in: Rebuilt.
5763 * configure: Rebuilt.
5764
5765 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5766 Jan Kratochvil <jan.kratochvil@redhat.com>
5767
5768 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5769 * Makefile.in (OBS): Add target-utils.o.
5770 (linux-maps.o, target-utils.o): New.
5771 * configure.srv (srv_linux_obj): Add linux-maps.o.
5772
5773 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5774
5775 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5776 function, return 1.
5777 (the_low_target): Install it.
5778
5779 2015-07-14 Pedro Alves <palves@redhat.com>
5780
5781 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5782 Instead, ignore ECHILD, and throw an error for other errnos.
5783
5784 2015-07-10 Pedro Alves <palves@redhat.com>
5785
5786 * event-loop.c (struct callback_event) <data>: Change type to
5787 gdb_client_data instance instead of gdb_client_data pointer.
5788 (append_callback_event): Adjust.
5789
5790 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5791
5792 * linux-aarch64-low.c: Add comments for each linux_target_ops
5793 method. Remove comments already covered in target_ops and
5794 linux_target_ops definitions.
5795 (the_low_target): Add comments for each unimplemented method.
5796
5797 2015-07-09 Yao Qi <yao.qi@linaro.org>
5798
5799 * linux-aarch64-low.c (aarch64_regmap): Remove.
5800 (aarch64_usrregs_info): Remove.
5801 (regs_info): Set field usrregs to NULL.
5802
5803 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5804
5805 * linux-low.c: Include "rsp-low.h"
5806 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5807 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5808 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5809 (handle_btrace_enable_pt): New.
5810 (handle_btrace_general_set): Support "pt".
5811 (handle_btrace_conf_general_set): Support "pt:size".
5812
5813 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5814
5815 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5816 Z_PACKET_SW_BP.
5817
5818 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5819
5820 * linux-aarch64-low.c: Remove comment about endianness.
5821 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5822 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5823 memcmp.
5824
5825 2015-06-24 Gary Benson <gbenson@redhat.com>
5826
5827 * linux-i386-ipa.c (stdint.h): Do not include.
5828 * lynx-i386-low.c (stdint.h): Likewise.
5829 * lynx-ppc-low.c (stdint.h): Likewise.
5830 * mem-break.c (stdint.h): Likewise.
5831 * thread-db.c (stdint.h): Likewise.
5832 * tracepoint.c (stdint.h): Likewise.
5833 * win32-low.c (stdint.h): Likewise.
5834
5835 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5836
5837 * server.c (write_qxfer_response): Update call to
5838 remote_escape_output.
5839
5840 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5841 Jan Kratochvil <jan.kratochvil@redhat.com>
5842
5843 Merge multiple hex conversions.
5844 * gdbreplay.c (tohex): Rename to 'fromhex'.
5845 (logchar): Use fromhex.
5846
5847 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5848
5849 * server.c (handle_qxfer_libraries): Set `version' attribute for
5850 <library-list>.
5851
5852 2015-06-10 Gary Benson <gbenson@redhat.com>
5853
5854 * target.h (struct target_ops) <multifs_open>: New field.
5855 <multifs_unlink>: Likewise.
5856 <multifs_readlink>: Likewise.
5857 * linux-low.c (nat/linux-namespaces.h): New include.
5858 (linux_target_ops): Initialize the_target->multifs_open,
5859 the_target->multifs_unlink and the_target->multifs_readlink.
5860 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5861 * hostio.c (hostio_fs_pid): New static variable.
5862 (hostio_handle_new_gdb_connection): New function.
5863 (handle_setfs): Likewise.
5864 (handle_open): Use the_target->multifs_open as appropriate.
5865 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5866 (handle_readlink): Use the_target->multifs_readlink as
5867 appropriate.
5868 (handle_vFile): Handle vFile:setfs packets.
5869 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5870 after target_handle_new_gdb_connection.
5871
5872 2015-06-10 Gary Benson <gbenson@redhat.com>
5873
5874 * configure.ac (AC_CHECK_FUNCS): Add setns.
5875 * config.in: Regenerate.
5876 * configure: Likewise.
5877 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5878 (linux-namespaces.o): New rule.
5879 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5880
5881 2015-06-09 Gary Benson <gbenson@redhat.com>
5882
5883 * hostio.c (handle_open): Process mode argument with
5884 fileio_to_host_mode.
5885
5886 2015-06-01 Yao Qi <yao.qi@linaro.org>
5887
5888 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5889 * linux-x86-low.c: Likewise.
5890
5891 2015-05-28 Don Breazeal <donb@codesourcery.com>
5892
5893 * linux-low.c (handle_extended_wait): Initialize
5894 thread_info.last_resume_kind for new fork children.
5895
5896 2015-05-15 Pedro Alves <palves@redhat.com>
5897
5898 * target.h (target_handle_new_gdb_connection): Rewrite using if
5899 wrapped in do/while.
5900
5901 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5902
5903 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5904 * configure, config.in: Regenerate.
5905 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5906 Declare typedef.
5907
5908 2015-05-12 Don Breazeal <donb@codesourcery.com>
5909
5910 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5911 PTRACE_EVENT_VFORK_DONE.
5912 (linux_low_ptrace_options, extended_event_reported): Add vfork
5913 events.
5914 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5915 and "vforkdone" for RSP 'T' Stop Reply Packet.
5916 * server.h (report_vfork_events): Declare
5917 global variable.
5918
5919 2015-05-12 Don Breazeal <donb@codesourcery.com>
5920
5921 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5922 (the_low_target) <new_fork>: Initialize new member.
5923 * linux-arm-low.c (arm_new_fork): New function.
5924 (the_low_target) <new_fork>: Initialize new member.
5925 * linux-low.c (handle_extended_wait): Call new target function
5926 new_fork.
5927 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5928 * linux-mips-low.c (mips_add_watchpoint): New function
5929 extracted from mips_insert_point.
5930 (the_low_target) <new_fork>: Initialize new member.
5931 (mips_linux_new_fork): New function.
5932 (mips_insert_point): Call mips_add_watchpoint.
5933 * linux-x86-low.c (x86_linux_new_fork): New function.
5934 (the_low_target) <new_fork>: Initialize new member.
5935
5936 2015-05-12 Don Breazeal <donb@codesourcery.com>
5937
5938 * linux-low.c (handle_extended_wait): Implement return value,
5939 rename argument 'event_child' to 'event_lwp', handle
5940 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5941 (linux_low_ptrace_options): New function.
5942 (linux_low_filter_event): Call linux_low_ptrace_options,
5943 use different argument fo linux_enable_event_reporting,
5944 use return value from handle_extended_wait.
5945 (extended_event_reported): New function.
5946 (linux_wait_1): Call extended_event_reported and set
5947 status to report fork events.
5948 (linux_write_memory): Add pid to debug message.
5949 (reset_lwp_ptrace_options_callback): New function.
5950 (linux_handle_new_gdb_connection): New function.
5951 (linux_target_ops): Initialize new structure member.
5952 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5953 * lynx-low.c: Initialize new structure member.
5954 * remote-utils.c (prepare_resume_reply): Implement stop reason
5955 "fork" for "T" stop message.
5956 * server.c (handle_query): Call handle_new_gdb_connection.
5957 * server.h (report_fork_events): Declare global flag.
5958 * target.h (struct target_ops) <handle_new_gdb_connection>:
5959 New member.
5960 (target_handle_new_gdb_connection): New macro.
5961 * win32-low.c: Initialize new structure member.
5962
5963 2015-05-12 Don Breazeal <donb@codesourcery.com>
5964
5965 * mem-break.c (APPEND_TO_LIST): Define macro.
5966 (clone_agent_expr): New function.
5967 (clone_one_breakpoint): New function.
5968 (clone_all_breakpoints): New function.
5969 * mem-break.h: Declare new functions.
5970
5971 2015-05-12 Don Breazeal <donb@codesourcery.com>
5972
5973 * linux-low.c (linux_supports_fork_events): New function.
5974 (linux_supports_vfork_events): New function.
5975 (linux_target_ops): Initialize new structure members.
5976 (initialize_low): Call linux_check_ptrace_features.
5977 * lynx-low.c (lynx_target_ops): Initialize new structure
5978 members.
5979 * server.c (report_fork_events, report_vfork_events):
5980 New global flags.
5981 (handle_query): Add new features to qSupported packet and
5982 response.
5983 (captured_main): Initialize new global variables.
5984 * target.h (struct target_ops) <supports_fork_events>:
5985 New member.
5986 <supports_vfork_events>: New member.
5987 (target_supports_fork_events): New macro.
5988 (target_supports_vfork_events): New macro.
5989 * win32-low.c (win32_target_ops): Initialize new structure
5990 members.
5991
5992 2015-05-12 Gary Benson <gbenson@redhat.com>
5993
5994 * server.c (handle_qxfer_exec_file): Use current process
5995 if annex is empty.
5996
5997 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5998
5999 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
6000 Remove HAVE_PTRACE_GETREGS conditionals.
6001 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
6002 instead of PTRACE_GETREGS and PTRACE_SETREGS.
6003
6004 2015-05-08 Yao Qi <yao.qi@linaro.org>
6005
6006 * linux-low.c (linux_supports_conditional_breakpoints): New
6007 function.
6008 (linux_target_ops): Install new target method.
6009 * lynx-low.c (lynx_target_ops): Install NULL hook for
6010 supports_conditional_breakpoints.
6011 * nto-low.c (nto_target_ops): Likewise.
6012 * spu-low.c (spu_target_ops): Likewise.
6013 * win32-low.c (win32_target_ops): Likewise.
6014 * server.c (handle_query): Check
6015 target_supports_conditional_breakpoints.
6016 * target.h (struct target_ops) <supports_conditional_breakpoints>:
6017 New field.
6018 (target_supports_conditional_breakpoints): New macro.
6019
6020 2015-05-06 Pedro Alves <palves@redhat.com>
6021
6022 PR server/18081
6023 * server.c (start_inferior): If the process exits, mourn it.
6024
6025 2015-04-21 Gary Benson <gbenson@redhat.com>
6026
6027 * hostio.c (fileio_open_flags_to_host): Factored out to
6028 fileio_to_host_openflags in common/fileio.c. Single use
6029 updated.
6030
6031 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6032
6033 * linux-xtensa-low.c (xtensa_fill_gregset)
6034 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
6035 XCHAL_HAVE_LOOP.
6036
6037 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
6038
6039 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
6040 (regs_info): Replace usrregs pointer with NULL.
6041
6042 2015-04-17 Gary Benson <gbenson@redhat.com>
6043
6044 * target.h (struct target_ops) <pid_to_exec_file>: New field.
6045 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
6046 * server.c (handle_qxfer_exec_file): New function.
6047 (qxfer_packets): Add exec-file entry.
6048 (handle_query): Report qXfer:exec-file:read as supported packet.
6049
6050 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
6051
6052 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
6053
6054 2015-04-09 Gary Benson <gbenson@redhat.com>
6055
6056 * hostio-errno.c (errno_to_fileio_error): Remove function.
6057 Update caller to use remote_fileio_to_fio_error.
6058
6059 2015-04-09 Yao Qi <yao.qi@linaro.org>
6060
6061 * linux-low.c (linux_insert_point): Call
6062 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
6063 (linux_remove_point): Call remove_memory_breakpoint if type is
6064 raw_bkpt_type_sw.
6065 * linux-x86-low.c (x86_insert_point): Don't call
6066 insert_memory_breakpoint.
6067 (x86_remove_point): Don't call remove_memory_breakpoint.
6068
6069 2015-04-01 Pedro Alves <palves@redhat.com>
6070 Cleber Rosa <crosa@redhat.com>
6071
6072 * server.c (gdbserver_usage): Reorganize and extend the usage
6073 message.
6074
6075 2015-03-24 Pedro Alves <palves@redhat.com>
6076
6077 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6078 output. Also dump TRAP_TRACE.
6079 (linux_low_filter_event): In debug output, distinguish a
6080 resume_stop SIGSTOP from a delayed SIGSTOP.
6081
6082 2015-03-24 Gary Benson <gbenson@redhat.com>
6083
6084 * linux-x86-low.c (x86_linux_new_thread): Moved to
6085 nat/x86-linux.c.
6086 (x86_linux_prepare_to_resume): Likewise.
6087
6088 2015-03-24 Gary Benson <gbenson@redhat.com>
6089
6090 * Makefile.in (x86-linux-dregs.o): New rule.
6091 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6092 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6093 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6094 (x86_linux_dr_get): Likewise.
6095 (x86_linux_dr_set): Likewise.
6096 (update_debug_registers_callback): Likewise.
6097 (x86_linux_dr_set_addr): Likewise.
6098 (x86_linux_dr_get_addr): Likewise.
6099 (x86_linux_dr_set_control): Likewise.
6100 (x86_linux_dr_get_control): Likewise.
6101 (x86_linux_dr_get_status): Likewise.
6102 (x86_linux_update_debug_registers): Likewise.
6103
6104 2015-03-24 Gary Benson <gbenson@redhat.com>
6105
6106 * linux-x86-low.c (x86_linux_update_debug_registers):
6107 New function, factored out from...
6108 (x86_linux_prepare_to_resume): ...this.
6109
6110 2015-03-24 Gary Benson <gbenson@redhat.com>
6111
6112 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6113 (x86_linux_dr_set): Likewise.
6114 (update_debug_registers_callback): Likewise.
6115 (x86_linux_dr_set_addr): Likewise.
6116 (x86_linux_dr_get_addr): Likewise.
6117 (x86_linux_dr_set_control): Likewise.
6118 (x86_linux_dr_get_control): Likewise.
6119 (x86_linux_dr_get_status): Likewise.
6120 (x86_linux_prepare_to_resume): Likewise.
6121
6122 2015-03-24 Gary Benson <gbenson@redhat.com>
6123
6124 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6125 Use perror_with_name. Pass string through gettext.
6126 (x86_linux_dr_set): Likewise.
6127
6128 2015-03-24 Gary Benson <gbenson@redhat.com>
6129
6130 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6131 (x86_linux_dr_set_addr): ...this.
6132 (x86_dr_low_get_addr): Rename to...
6133 (x86_linux_dr_get_addr): ...this.
6134 (x86_dr_low_set_control): Rename to...
6135 (x86_linux_dr_set_control): ...this.
6136 (x86_dr_low_get_control): Rename to...
6137 (x86_linux_dr_get_control): ...this.
6138 (x86_dr_low_get_status): Rename to...
6139 (x86_linux_dr_get_status): ...this.
6140 (x86_dr_low): Update with new function names.
6141
6142 2015-03-24 Gary Benson <gbenson@redhat.com>
6143
6144 * Makefile.in (x86-linux.o): New rule.
6145 * configure.srv: Add x86-linux.o to relevant targets.
6146 * linux-low.c (lwp_set_arch_private_info): New function.
6147 (lwp_arch_private_info): Likewise.
6148 * linux-x86-low.c: Include nat/x86-linux.h.
6149 (arch_lwp_info): Removed structure.
6150 (update_debug_registers_callback):
6151 Use lwp_set_debug_registers_changed.
6152 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6153 and lwp_set_debug_registers_changed.
6154 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6155
6156 2015-03-24 Gary Benson <gbenson@redhat.com>
6157
6158 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6159 * linux-arm-low.c (arm_new_thread): Likewise.
6160 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6161 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6162 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6163 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6164
6165 2015-03-24 Gary Benson <gbenson@redhat.com>
6166
6167 * linux-low.c (ptid_of_lwp): New function.
6168 (lwp_is_stopped): Likewise.
6169 (lwp_stop_reason): Likewise.
6170 * linux-x86-low.c (update_debug_registers_callback):
6171 Use lwp_is_stopped.
6172 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6173 lwp_stop_reason.
6174
6175 2015-03-24 Gary Benson <gbenson@redhat.com>
6176
6177 * linux-low.h (linux_stop_lwp): Remove declaration.
6178
6179 2015-03-24 Gary Benson <gbenson@redhat.com>
6180
6181 * linux-low.h: Include nat/linux-nat.h.
6182 * linux-low.c (iterate_over_lwps_args): New structure.
6183 (iterate_over_lwps_filter): New function.
6184 (iterate_over_lwps): Likewise.
6185 * linux-x86-low.c (update_debug_registers_callback):
6186 Update signature to what iterate_over_lwps expects.
6187 Remove PID check that iterate_over_lwps now performs.
6188 (x86_dr_low_set_addr): Use iterate_over_lwps.
6189 (x86_dr_low_set_control): Likewise.
6190
6191 2015-03-24 Gary Benson <gbenson@redhat.com>
6192
6193 * linux-x86-low.c (x86_debug_reg_state): New function.
6194 (x86_linux_prepare_to_resume): Use the above.
6195
6196 2015-03-24 Gary Benson <gbenson@redhat.com>
6197
6198 * linux-low.c (current_lwp_ptid): New function.
6199 * linux-x86-low.c: Include nat/linux-nat.h.
6200 (x86_dr_low_get_addr): Use current_lwp_ptid.
6201 (x86_dr_low_get_control): Likewise.
6202 (x86_dr_low_get_status): Likewise.
6203
6204 2015-03-20 Pedro Alves <palves@redhat.com>
6205
6206 * tracepoint.c (cmd_qtstatus): Make "str" const.
6207
6208 2015-03-20 Pedro Alves <palves@redhat.com>
6209
6210 * server.c (handle_general_set): Make "req_str" const.
6211
6212 2015-03-19 Pedro Alves <palves@redhat.com>
6213
6214 * linux-low.c (linux_resume_one_lwp): Rename to ...
6215 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6216 instead call perror_with_name.
6217 (check_ptrace_stopped_lwp_gone): New function.
6218 (linux_resume_one_lwp): Reimplement as wrapper around
6219 linux_resume_one_lwp_throw that swallows errors if the LWP is
6220 gone.
6221
6222 2015-03-19 Pedro Alves <palves@redhat.com>
6223
6224 * linux-low.c (count_events_callback, select_event_lwp_callback):
6225 No longer check whether the thread has resume_stop as last resume
6226 kind.
6227
6228 2015-03-19 Pedro Alves <palves@redhat.com>
6229
6230 * linux-low.c (count_events_callback, select_event_lwp_callback):
6231 Use the lwp's status_pending_p field, not the thread's.
6232
6233 2015-03-19 Pedro Alves <palves@redhat.com>
6234
6235 * linux-low.c (select_event_lwp_callback): Update comments to
6236 no longer mention SIGTRAP.
6237
6238 2015-03-18 Gary Benson <gbenson@redhat.com>
6239
6240 * server.c (handle_query): Do not report vFile:fstat as supported.
6241
6242 2015-03-11 Gary Benson <gbenson@redhat.com>
6243
6244 * hostio.c (sys/types.h): New include.
6245 (sys/stat.h): Likewise.
6246 (common-remote-fileio.h): Likewise.
6247 (handle_fstat): New function.
6248 (handle_vFile): Handle vFile:fstat packets.
6249
6250 2015-03-11 Gary Benson <gbenson@redhat.com>
6251
6252 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6253 struct stat.st_blocks and struct stat.st_blksize.
6254 * configure: Regenerate.
6255 * config.in: Likewise.
6256 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6257 (OBS): Add common-remote-fileio.o.
6258 (common-remote-fileio.o): New rule.
6259
6260 2015-03-09 Pedro Alves <palves@redhat.com>
6261
6262 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6263 'struct sockaddr' pointer in 'accept' call.
6264
6265 2015-03-09 Pedro Alves <palves@redhat.com>
6266
6267 Revert:
6268 2015-03-07 Pedro Alves <palves@redhat.com>
6269 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6270 or <winsock2.h> here. Instead include "gdb_socket.h".
6271 (remote_open): Use union gdb_sockaddr_u.
6272 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6273 or <winsock2.h> here. Instead include "gdb_socket.h".
6274 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6275 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6276 or <sys/un.h>.
6277 (init_named_socket, gdb_agent_helper_thread): Use union
6278 gdb_sockaddr_u.
6279
6280 2015-03-07 Pedro Alves <palves@redhat.com>
6281
6282 * configure.ac (build_warnings): Move
6283 -Wdeclaration-after-statement to the C-specific set.
6284 * configure: Regenerate.
6285
6286 2015-03-07 Pedro Alves <palves@redhat.com>
6287
6288 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6289 or <winsock2.h> here. Instead include "gdb_socket.h".
6290 (remote_open): Use union gdb_sockaddr_u.
6291 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6292 or <winsock2.h> here. Instead include "gdb_socket.h".
6293 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6294 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6295 or <sys/un.h>.
6296 (init_named_socket, gdb_agent_helper_thread): Use union
6297 gdb_sockaddr_u.
6298
6299 2015-03-07 Pedro Alves <palves@redhat.com>
6300
6301 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6302 instead.
6303
6304 2015-03-06 Yao Qi <yao.qi@linaro.org>
6305
6306 * linux-aarch64-low.c (aarch64_insert_point): Use
6307 show_debug_regs as a boolean.
6308 (aarch64_remove_point): Likewise.
6309
6310 2015-03-05 Pedro Alves <palves@redhat.com>
6311
6312 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6313 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6314 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6315 * nto-low.c (nto_target_ops): Likewise.
6316 * spu-low.c (spu_target_ops): Likewise.
6317 * win32-low.c (win32_target_ops): Likewise.
6318
6319 2015-03-04 Pedro Alves <palves@redhat.com>
6320
6321 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6322 Decide whether a breakpoint triggered based on the SIGTRAP's
6323 siginfo.si_code.
6324 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6325 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6326 (linux_low_filter_event): Check for breakpoints before checking
6327 watchpoints.
6328 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6329 siginfo.si_code.
6330 (linux_stopped_by_sw_breakpoint)
6331 (linux_supports_stopped_by_sw_breakpoint)
6332 (linux_stopped_by_hw_breakpoint)
6333 (linux_supports_stopped_by_hw_breakpoint): New functions.
6334 (linux_target_ops): Install new target methods.
6335
6336 2015-03-04 Pedro Alves <palves@redhat.com>
6337
6338 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6339 * server.c (swbreak_feature, hwbreak_feature): New globals.
6340 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6341 (captured_main): Clear swbreak_feature and hwbreak_feature.
6342 * server.h (swbreak_feature, hwbreak_feature): Declare.
6343 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6344 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6345 supports_stopped_by_hw_breakpoint>: New fields.
6346 (target_supports_stopped_by_sw_breakpoint)
6347 (target_stopped_by_sw_breakpoint)
6348 (target_supports_stopped_by_hw_breakpoint)
6349 (target_stopped_by_hw_breakpoint): Declare.
6350
6351 2015-03-04 Pedro Alves <palves@redhat.com>
6352
6353 enum lwp_stop_reason -> enum target_stop_reason
6354 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6355 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6356 (linux_wait_1, stuck_in_jump_pad_callback)
6357 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6358 (linux_stopped_by_watchpoint):
6359 * linux-low.h (enum lwp_stop_reason): Delete.
6360 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6361 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6362
6363 2015-03-04 Yao Qi <yao.qi@linaro.org>
6364
6365 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6366
6367 2015-03-03 Gary Benson <gbenson@redhat.com>
6368
6369 * hostio.c (handle_vFile): Fix prefix lengths.
6370
6371 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6372
6373 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6374 ptr_bits.
6375
6376 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6377
6378 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6379 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6380 (clean): Add "rm -f" for above C files.
6381 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6382 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6383 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6384 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6385 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6386 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6387 (init_registers_s390x_vx_linux64)
6388 (init_registers_s390x_tevx_linux64)
6389 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6390 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6391 declarations.
6392 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6393 (s390_store_vxrs_high): New functions.
6394 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6395 NT_S390_VXRS_HIGH.
6396 (s390_arch_setup): Add logic for selecting one of the new target
6397 descriptions. Activate the new vector regsets if applicable.
6398 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6399 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6400 and init_registers_s390x_tevx_linux64.
6401
6402 2015-03-01 Pedro Alves <palves@redhat.com>
6403
6404 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6405 parameter.
6406
6407 2015-02-27 Pedro Alves <palves@redhat.com>
6408
6409 * linux-x86-low.c (u_debugreg_offset): New function.
6410 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6411
6412 2015-02-27 Pedro Alves <palves@redhat.com>
6413
6414 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6415 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6416 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6417 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6418 (ps_lsetfpregs, ps_getpid)
6419 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6420 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6421 (ps_lsetxregs, ps_plog): Declare.
6422
6423 2015-02-27 Pedro Alves <palves@redhat.com>
6424
6425 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6426 IP_AGENT_EXPORT_FUNC.
6427 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6428 IP_AGENT_EXPORT_FUNC.
6429 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6430 (IP_AGENT_EXPORT): Delete.
6431 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6432 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6433 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6434 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6435 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6436 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6437 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6438 (traceframe_read_count, traceframe_write_count)
6439 (traceframes_created, trace_state_variables, get_raw_reg)
6440 (get_trace_state_variable_value, set_trace_state_variable_value)
6441 (ust_loaded, helper_thread_id, cmd_buf): Use
6442 IPA_SYM_EXPORTED_NAME.
6443 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6444 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6445 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6446 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6447 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6448 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6449 EXTERN_C_PUSH/EXTERN_C_POP.
6450 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6451 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6452 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6453 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6454 (traceframe_write_count, traceframe_read_count)
6455 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6456 (about_to_request_buffer_space, get_trace_state_variable_value)
6457 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6458 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6459 EXTERN_C_PUSH/EXTERN_C_POP.
6460 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6461 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6462 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6463 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6464 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6465 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6466 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6467 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6468 Define.
6469 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6470 (IP_AGENT_EXPORT_VAR_DECL): Define.
6471 (tracing): Declare.
6472 (gdb_agent_get_raw_reg): Declare.
6473
6474 2015-02-27 Tom Tromey <tromey@redhat.com>
6475 Pedro Alves <palves@redhat.com>
6476
6477 Rename symbols whose names are reserved C++ keywords throughout.
6478
6479 2015-02-27 Pedro Alves <palves@redhat.com>
6480
6481 * Makefile.in (COMPILER): New, get it from autoconf.
6482 (CXX): Get from autoconf instead.
6483 (COMPILE.pre): Use COMPILER.
6484 (CC-LD): Rename to ...
6485 (CC_LD): ... this. Use COMPILER.
6486 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6487 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6488 * acinclude.m4: Include build-with-cxx.m4.
6489 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6490 Disable -Werror by default if building in C++ mode.
6491 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6492 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6493 the C++ compiler. Save/restore CXXFLAGS too.
6494 * configure: Regenerate.
6495
6496 2015-02-27 Pedro Alves <palves@redhat.com>
6497
6498 * acinclude.m4: Include libiberty.m4.
6499 * configure.ac: Call libiberty_INIT.
6500 * config.in, configure: Regenerate.
6501
6502 2015-02-26 Pedro Alves <palves@redhat.com>
6503
6504 * linux-low.c (linux_wait_1): When incrementing the PC past a
6505 program breakpoint always use the_low_target.breakpoint_len as
6506 increment, rather than the maximum between that and
6507 the_low_target.decr_pc_after_break.
6508
6509 2015-02-23 Pedro Alves <palves@redhat.com>
6510
6511 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6512 thread was doing a step-over; always adjust the PC if
6513 we stepped over a permanent breakpoint.
6514 (linux_wait_1): If we stepped over breakpoint that was on top of a
6515 permanent breakpoint, manually advance the PC past it.
6516
6517 2015-02-23 Pedro Alves <palves@redhat.com>
6518
6519 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6520 modes.
6521 (x86_fill_gregset, x86_store_gregset): Use it when handling
6522 $orig_eax.
6523
6524 2015-02-20 Pedro Alves <palves@redhat.com>
6525
6526 * thread-db.c: Include "nat/linux-procfs.h".
6527 (thread_db_init): Skip listing new threads if the kernel supports
6528 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6529
6530 2015-02-20 Pedro Alves <palves@redhat.com>
6531
6532 * linux-low.c (status_pending_p_callback): Use ptid_match.
6533
6534 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6535
6536 PR breakpoints/16812
6537 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6538 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6539 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6540
6541 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6542
6543 PR breakpoints/15956
6544 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6545
6546 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6547
6548 * linux-low.c (linux_low_btrace_conf): Print size.
6549 * server.c (handle_btrace_conf_general_set): New.
6550 (hanle_general_set): Call handle_btrace_conf_general_set.
6551 (handle_query): Report Qbtrace-conf:bts:size as supported.
6552
6553 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6554
6555 * linux-low.c (linux_low_enable_btrace): Update parameters.
6556 (linux_low_btrace_conf): New.
6557 (linux_target_ops)<to_btrace_conf>: Initialize.
6558 * server.c (current_btrace_conf): New.
6559 (handle_btrace_enable): Rename to ...
6560 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6561 to target_enable_btrace. Update comment. Update users.
6562 (handle_qxfer_btrace_conf): New.
6563 (qxfer_packets): Add btrace-conf entry.
6564 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6565 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6566 (target_ops)<read_btrace_conf>: New.
6567 (target_enable_btrace): Update parameters.
6568 (target_read_btrace_conf): New.
6569
6570 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6571
6572 * server.c (handle_btrace_general_set): Remove call to
6573 target_supports_btrace.
6574 (supported_btrace_packets): New.
6575 (handle_query): Call supported_btrace_packets.
6576 * target.h: include btrace-common.h.
6577 (btrace_target_info): Removed.
6578 (supports_btrace, target_supports_btrace): Update parameters.
6579
6580 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6581
6582 * Makefile.in (SFILES): Add common/btrace-common.c.
6583 (OBS): Add common/btrace-common.o.
6584 (btrace-common.o): Add build rules.
6585 * linux-low: Include btrace-common.h.
6586 (linux_low_read_btrace): Use struct btrace_data. Call
6587 btrace_data_init and btrace_data_fini.
6588
6589 2015-02-06 Pedro Alves <palves@redhat.com>
6590
6591 * thread-db.c (find_new_threads_callback): Add debug output.
6592
6593 2015-02-04 Pedro Alves <palves@redhat.com>
6594
6595 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6596 (resume_stopped_resumed_lwps): New function.
6597 (linux_wait_for_event_filtered): Use it.
6598
6599 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6600
6601 * Makefile.in (SFILES): Add linux-personality.c.
6602 (linux-personality.o): New rule.
6603 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6604 list of objects to be built.
6605 * linux-low.c: Include nat/linux-personality.h.
6606 (linux_create_inferior): Remove code to disable address space
6607 randomization (moved to ../nat/linux-personality.c). Create
6608 cleanup to disable address space randomization.
6609
6610 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6611
6612 * Makefile.in (posix-strerror.o): New rule.
6613 (mingw-strerror.o): Likewise.
6614 * configure: Regenerated.
6615 * configure.ac: Source file ../common/common.host. Initialize new
6616 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6617
6618 2015-01-14 Yao Qi <yao@codesourcery.com>
6619
6620 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6621 (ppc-linux.o): New rule.
6622 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6623 * configure.ac: AC_CHECK_FUNCS(getauxval).
6624 * config.in: Re-generated.
6625 * configure: Re-generated.
6626 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6627 ppc64_64bit_inferior_p
6628
6629 2015-01-14 Yao Qi <yao@codesourcery.com>
6630
6631 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6632 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6633 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6634 (PT_ORIG_R3, PT_TRAP): Likewise.
6635 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6636 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6637 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6638
6639 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6640
6641 * i387-fp.c (i387_cache_to_xsave): In look over
6642 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6643 zmmh_low_space field by use of zmmh_high_space.
6644
6645 2015-01-09 Pedro Alves <palves@redhat.com>
6646
6647 * linux-low.c (step_over_bkpt): Move higher up in the file.
6648 (handle_extended_wait): Don't store the stop_pc here.
6649 (get_stop_pc): Adjust comments and rename to ...
6650 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6651 stopped for a software breakpoint or hardware breakpoint.
6652 (thread_still_has_status_pending_p): New function.
6653 (status_pending_p_callback): Use
6654 thread_still_has_status_pending_p. If the event is no longer
6655 interesting, resume the LWP.
6656 (handle_tracepoints): Add assert.
6657 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6658 (wstatus_maybe_breakpoint): New function.
6659 (cancel_breakpoint): Delete function.
6660 (check_stopped_by_watchpoint): New function, factored out from
6661 linux_low_filter_event.
6662 (lp_status_maybe_breakpoint): Delete function.
6663 (linux_low_filter_event): Remove filter_ptid argument.
6664 Leave thread group exits pending here. Store the LWP's stop PC.
6665 Always leave events pending.
6666 (linux_wait_for_event_filtered): Pull all events out of the
6667 kernel, and leave them all pending.
6668 (count_events_callback, select_event_lwp_callback): Consider all
6669 events.
6670 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6671 (select_event_lwp): Only give preference to the stepping LWP in
6672 all-stop mode. Adjust comments.
6673 (ignore_event): New function.
6674 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6675 references to cancel_breakpoints. Adjust to renames. Also give
6676 equal priority to all LWPs that have had events in non-stop mode.
6677 If reporting a software breakpoint event, unadjust the LWP's PC.
6678 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6679 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6680 Adjust.
6681 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6682 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6683 (linux_stopped_by_watchpoint): Adjust.
6684 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6685 * linux-low.h (enum lwp_stop_reason): New.
6686 (struct lwp_info) <stop_pc>: Adjust comment.
6687 <stopped_by_watchpoint>: Delete field.
6688 <stop_reason>: New field.
6689 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6690 * mem-break.c (software_breakpoint_inserted_here)
6691 (hardware_breakpoint_inserted_here): New function.
6692 * mem-break.h (software_breakpoint_inserted_here)
6693 (hardware_breakpoint_inserted_here): Declare.
6694 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6695 (cancel_breakpoints): Delete.
6696 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6697 (upload_fast_traceframes): Remove references to
6698 cancel_breakpoints.
6699
6700 2015-01-09 Pedro Alves <palves@redhat.com>
6701
6702 * thread-db.c (find_new_threads_callback): Ignore thread if the
6703 kernel thread ID is -1.
6704
6705 2015-01-09 Pedro Alves <palves@redhat.com>
6706
6707 * linux-low.c (linux_attach_fail_reason_string): Move to
6708 nat/linux-ptrace.c, and rename.
6709 (linux_attach_lwp): Update comment.
6710 (attach_proc_task_lwp_callback): New function.
6711 (linux_attach): Adjust to rename and use
6712 linux_proc_attach_tgid_threads.
6713 (linux_attach_fail_reason_string): Delete declaration.
6714
6715 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6716
6717 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6718 * server.c (gdbserver_version): Likewise.
6719
6720 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6721
6722 * remote-utils.c: Include ctype.h.
6723 (input_interrupt): Explicitly handle the case when the char
6724 received is the NUL byte. Improve the printing of non-ASCII
6725 characters.
6726
6727 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6728
6729 * linux-low.c (linux_low_filter_event): Update call to
6730 linux_enable_event_reporting following the addition of
6731 a new parameter to that function.
6732
6733 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6734
6735 PR server/17457
6736 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6737 (AARCH64_FPCR_REGNO): Likewise.
6738 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6739 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6740 (aarch64_store_fpregset): Likewise.
6741
6742 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6743
6744 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6745 Remove FIXME comment about assumption about N.
6746
6747 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6748
6749 * configure.ac: If large-file support is disabled in GDBserver,
6750 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6751 * configure: Regenerate.
6752
6753 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6754
6755 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6756 warning upon ENODATA from ptrace.
6757 * linux-s390-low.c (s390_store_tdb): New.
6758 (s390_regsets): Add regset for NT_S390_TDB.
6759
6760 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6761
6762 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6763 without a fill_function.
6764 * linux-s390-low.c (s390_fill_last_break): Remove.
6765 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6766 (s390_arch_setup): Use regset's size instead of fill_function for
6767 loop end condition.
6768
6769 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6770
6771 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6772 the regset's store function when ptrace returned an error.
6773 * regcache.c (get_thread_regcache): Invalidate register cache
6774 before fetching inferior's registers.
6775
6776 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6777
6778 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6779 while-loop as for-loop.
6780 (regsets_store_inferior_registers): Likewise.
6781
6782 2014-11-28 Yao Qi <yao@codesourcery.com>
6783
6784 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6785 * config.in, configure: Re-generate.
6786 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6787 is defined.
6788
6789 2014-11-21 Yao Qi <yao@codesourcery.com>
6790
6791 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6792 (AC_CHECK_HEADERS): Remove malloc.h.
6793 * configure: Re-generated.
6794 * config.in: Re-generated.
6795 * server.h: Don't include alloca.h and malloc.h.
6796 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6797 Don't include malloc.h.
6798
6799 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6800
6801 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6802 corresponding ERRNO check in same block.
6803
6804 2014-11-12 Pedro Alves <palves@redhat.com>
6805
6806 * server.c (cont_thread): Update comment.
6807 (start_inferior, attach_inferior): No longer clear cont_thread.
6808 (handle_v_cont): No longer set cont_thread.
6809 (captured_main): Clear cont_thread each time a GDB connects.
6810
6811 2014-11-12 Pedro Alves <palves@redhat.com>
6812
6813 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6814 thread, and don't resume all threads if the Hc thread has exited.
6815
6816 2014-11-12 Pedro Alves <palves@redhat.com>
6817
6818 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6819 the process group instead of to a specific LWP.
6820
6821 2014-10-15 Pedro Alves <palves@redhat.com>
6822
6823 PR server/17487
6824 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6825 parameter.
6826 (arm_set_thread_context): Delete.
6827 (the_low_target): Adjust.
6828 * win32-i386-low.c (debug_registers_changed)
6829 (debug_registers_used): Delete.
6830 (update_debug_registers_callback): New function.
6831 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6832 needing to update their debug registers.
6833 (win32_get_current_dr): New function.
6834 (x86_dr_low_get_addr, x86_dr_low_get_control)
6835 (x86_dr_low_get_status): Fetch the debug register from the thread
6836 record's context.
6837 (i386_initial_stuff): Adjust.
6838 (i386_get_thread_context): Remove current_event parameter. Don't
6839 clear debug_registers_changed nor copy DR values to
6840 debug_reg_state.
6841 (i386_set_thread_context): Delete.
6842 (i386_prepare_to_resume): New function.
6843 (i386_thread_added): Mark the thread as needing to update irs
6844 debug registers.
6845 (the_low_target): Remove i386_set_thread_context and install
6846 i386_prepare_to_resume.
6847 * win32-low.c (win32_get_thread_context): Adjust.
6848 (win32_set_thread_context): Use SetThreadContext
6849 directly.
6850 (win32_prepare_to_resume): New function.
6851 (win32_require_context): New function, factored out from ...
6852 (thread_rec): ... this.
6853 (continue_one_thread): Call win32_prepare_to_resume on each thread
6854 we're about to continue.
6855 (win32_resume): Call win32_prepare_to_resume on the event thread.
6856 * win32-low.h (struct win32_thread_info)
6857 <debug_registers_changed>: New field.
6858 (struct win32_target_ops): Change prototype of set_thread_context,
6859 delete set_thread_context and add prepare_to_resume.
6860 (win32_require_context): New declaration.
6861
6862 2014-10-08 Gary Benson <gbenson@redhat.com>
6863
6864 * server.h: Do not include common-exceptions.h.
6865
6866 2014-10-08 Gary Benson <gbenson@redhat.com>
6867
6868 * server.h: Do not include cleanups.h.
6869
6870 2014-09-30 James Hogan <james.hogan@imgtec.com>
6871
6872 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6873 mips64-dsp-linux.c.
6874
6875 2014-09-23 Yao Qi <yao@codesourcery.com>
6876
6877 * linux-low.c (lp_status_maybe_breakpoint): New function.
6878 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6879 (count_events_callback): Likewise.
6880 (select_event_lwp_callback): Likewise.
6881 (cancel_breakpoints_callback): Likewise.
6882
6883 2014-09-19 Don Breazeal <donb@codesourcery.com>
6884
6885 * linux-low.c (handle_extended_wait): Call
6886 linux_ptrace_get_extended_event.
6887 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6888 linux_is_extended_waitstatus.
6889
6890 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6891
6892 * Makefile.in (CPPFLAGS): Define.
6893 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6894 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6895
6896 2014-09-16 Gary Benson <gbenson@redhat.com>
6897
6898 * inferiors.h (current_inferior): Renamed as...
6899 (current_thread): New variable. All uses updated.
6900 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6901 (maybe_move_out_of_jump_pad): Likewise.
6902 (cancel_breakpoint): Likewise.
6903 (linux_low_filter_event): Likewise.
6904 (wait_for_sigstop): Likewise.
6905 (linux_resume_one_lwp): Likewise.
6906 (need_step_over_p): Likewise.
6907 (start_step_over): Likewise.
6908 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6909 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6910 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6911 and save_inferior as saved_thread.
6912 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6913 saved_thread.
6914 (regcache_invalidate_thread): Likewise.
6915 * remote-utils.c (prepare_resume_reply): Likewise.
6916 * thread-db.c (thread_db_get_tls_address): Likewise.
6917 (disable_thread_event_reporting): Likewise.
6918 (remove_thread_event_breakpoints): Likewise.
6919 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6920 as saved_thread.
6921 * target.h (set_desired_inferior): Renamed as...
6922 (set_desired_thread): New declaration. All uses updated.
6923 * server.c (myresume): Updated comment to reference thread instead
6924 of inferior.
6925 (handle_serial_event): Likewise.
6926 (handle_target_event): Likewise.
6927
6928 2014-09-12 Tom Tromey <tromey@redhat.com>
6929 Gary Benson <gbenson@redhat.com>
6930
6931 * regcache.h: Include common-regcache.h.
6932 (regcache_read_pc): Don't declare.
6933 * regcache.c (get_thread_regcache_for_ptid): New function.
6934
6935 2014-09-11 Tom Tromey <tromey@redhat.com>
6936 Gary Benson <gbenson@redhat.com>
6937
6938 * symbol.c: New file.
6939 * Makefile.in (SFILES): Add symbol.c.
6940 (OBS): Add symbol.o.
6941
6942 2014-09-11 Gary Benson <gbenson@redhat.com>
6943
6944 * target.c (target_stop_ptid, target_continue_ptid): New
6945 functions.
6946
6947 2014-09-11 Tom Tromey <tromey@redhat.com>
6948 Gary Benson <gbenson@redhat.com>
6949
6950 * target.h: Include target/target.h.
6951 * target.c (target_read_memory, target_read_uint32)
6952 (target_write_memory): New functions.
6953
6954 2014-09-11 Gary Benson <gbenson@redhat.com>
6955
6956 * server.h (debug_hw_points): Don't declare.
6957 * server.c (debug_hw_points): Don't define. Replace all uses
6958 with show_debug_regs.
6959 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6960 all uses with show_debug_regs.
6961
6962 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6963
6964 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6965 endianness into account.
6966 (ppc_supply_ptrace_register): Likewise.
6967
6968 2014-09-03 James Hogan <james.hogan@imgtec.com>
6969
6970 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6971 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6972
6973 2014-09-03 Gary Benson <gbenson@redhat.com>
6974
6975 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6976 ALL_DEBUG_ADDRESS_REGISTERS.
6977
6978 2014-09-02 Gary Benson <gbenson@redhat.com>
6979
6980 * i386-low.h: Renamed as...
6981 * x86-low.h: New file. All type, function and variable name
6982 prefixes changed from "i386_" to "x86_". All references updated.
6983 * i386-low.c: Renamed as...
6984 * x86-low.c: New file. All type, function and variable name
6985 prefixes changed from "i386_" to "x86_". All references updated.
6986
6987 2014-09-02 Gary Benson <gbenson@redhat.com>
6988
6989 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6990 (x86_linux_new_thread): Likewise.
6991
6992 2014-08-29 Gary Benson <gbenson@redhat.com>
6993
6994 * server.h (setjmp.h): Do not include.
6995 (toplevel): Do not declare.
6996 (common-exceptions.h): Include.
6997 (cleanups.h): Likewise.
6998 * server.c (toplevel): Do not define.
6999 (exit_code): New static global.
7000 (detach_or_kill_for_exit_cleanup): New function.
7001 (main): New function. Original main renamed to...
7002 (captured_main): New function.
7003 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
7004
7005 2014-08-29 Gary Benson <gbenson@redhat.com>
7006
7007 * Makefile.in (SFILES): Add common/common-exceptions.c.
7008 (OBS): Add common-exceptions.o.
7009 (common-exceptions.o): New rule.
7010 * utils.c (prepare_to_throw_exception): New function.
7011
7012 2014-08-29 Gary Benson <gbenson@redhat.com>
7013
7014 * config.in: Regenerate.
7015 * configure: Likewise.
7016
7017 2014-08-29 Gary Benson <gbenson@redhat.com>
7018
7019 * Makefile.in (SFILES): Add common/cleanups.c.
7020 (OBS): cleanups.o.
7021 (cleanups.o): New rule.
7022
7023 2014-08-29 Gary Benson <gbenson@redhat.com>
7024
7025 * utils.c (internal_vwarning): New function.
7026
7027 2014-08-28 Gary Benson <gbenson@redhat.com>
7028
7029 * utils.h (fatal): Remove declaration.
7030 * utils.c (fatal): Remove function.
7031
7032 2014-08-28 Gary Benson <gbenson@redhat.com>
7033
7034 * tracepoint.c (gdb_agent_init): Replace fatal with
7035 perror_with_name.
7036 (initialize_tracepoint): Likewise.
7037
7038 2014-08-28 Gary Benson <gbenson@redhat.com>
7039
7040 * remote-utils.c (remote_prepare): Replace fatal with error.
7041
7042 2014-08-28 Gary Benson <gbenson@redhat.com>
7043
7044 * linux-low.c (linux_async): Replace fatal with warning.
7045 Tidy up and return.
7046 (linux_start_non_stop): Return -1 if linux_async failed.
7047
7048 2014-08-28 Gary Benson <gbenson@redhat.com>
7049
7050 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
7051 gdb_assert.
7052 (i386_dr_low_get_addr): Remove vague comment.
7053 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
7054 gdb_assert.
7055
7056 2014-08-28 Gary Benson <gbenson@redhat.com>
7057
7058 * inferiors.c (get_thread_process): Replace check with gdb_assert.
7059 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
7060 internal_error.
7061 (linux_resume_one_lwp): Likewise.
7062 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
7063 gdb_assert.
7064 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
7065 with internal_error.
7066 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
7067 (init_register_cache): Replace fatal with gdb_assert_not_reached.
7068 (find_register_by_name): Replace fatal with internal_error.
7069 (find_regno): Likewise.
7070 * tdesc.c (init_target_desc): Replace check with gdb_assert.
7071 * thread-db.c (thread_db_create_event): Likewise.
7072 (thread_db_load_search): Likewise.
7073 (try_thread_db_load_1): Likewise.
7074 * tracepoint.c (get_jump_space_head): Replace fatal with
7075 internal_error.
7076 (claim_trampoline_space): Likewise.
7077 (have_fast_tracepoint_trampoline_buffer): Likewise.
7078 (cmd_qtstart): Likewise.
7079 (stop_tracing): Likewise.
7080 (fast_tracepoint_collecting): Likewise.
7081 (target_malloc): Likewise.
7082 (download_tracepoint): Likewise.
7083 (download_trace_state_variables): Replace check with gdb_assert.
7084 (upload_fast_traceframes): Replace fatal with internal_error.
7085
7086 2014-08-19 Tom Tromey <tromey@redhat.com>
7087 Gary Benson <gbenson@redhat.com>
7088
7089 * Makefile.in (SFILES): Add common/common-debug.c.
7090 (OBS): Add common-debug.o.
7091 (common-debug.o): New rule.
7092 * debug.h (debug_printf): Don't declare.
7093 * debug.c (debug_printf): Renamed and rewritten as...
7094 (debug_vprintf): New function.
7095
7096 2014-08-19 Gary Benson <gbenson@redhat.com>
7097
7098 * utils.h: Do not include print-utils.h.
7099
7100 2014-08-19 Tom Tromey <tromey@redhat.com>
7101 Gary Benson <gbenson@redhat.com>
7102
7103 * server.h: Add static assertion.
7104 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7105
7106 2014-08-19 Tom Tromey <tromey@redhat.com>
7107 Gary Benson <gbenson@redhat.com>
7108
7109 * Makefile.in (SFILES): Add common/errors.c.
7110 (OBS): Add errors.o.
7111 (IPA_OBS): Add errors-ipa.o.
7112 (errors.o): New rule.
7113 (errors-ipa.o): Likewise.
7114 * utils.h (perror_with_name, error, warning): Don't declare.
7115 * utils.c (warning): Renamed and rewritten as...
7116 (vwarning): New function.
7117 (error): Renamed and rewritten as...
7118 (verror): New function.
7119 (internal_error): Renamed and rewritten as...
7120 (internal_verror): New function.
7121
7122 2014-08-07 Gary Benson <gbenson@redhat.com>
7123
7124 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7125 * configure: Regenerate.
7126 * config.in: Likewise.
7127 * server.h: Do not include errno.h.
7128 * event-loop.c: Likewise.
7129 * hostio-errno.c: Likewise.
7130 * linux-low.c: Likewise.
7131 * remote-utils.c: Likewise.
7132 * spu-low.c: Likewise.
7133 * utils.c: Likewise.
7134 * gdbreplay.c: Unconditionally include errno.h.
7135
7136 2014-08-07 Gary Benson <gbenson@redhat.com>
7137
7138 * server.h: Do not include string.h.
7139 * event-loop.c: Likewise.
7140 * linux-low.c: Likewise.
7141 * regcache.c: Likewise.
7142 * remote-utils.c: Likewise.
7143 * spu-low.c: Likewise.
7144 * utils.c: Likewise.
7145
7146 2014-08-07 Gary Benson <gbenson@redhat.com>
7147
7148 * server.h: Do not include gdb_assert.h.
7149
7150 2014-08-07 Gary Benson <gbenson@redhat.com>
7151
7152 * server.h: Do not include common-utils.h.
7153
7154 2014-08-07 Gary Benson <gbenson@redhat.com>
7155
7156 * server.h: Do not include ptid.h.
7157 * notif.h: Likewise.
7158
7159 2014-08-07 Gary Benson <gbenson@redhat.com>
7160
7161 * server.h: Do not include gdb_locale.h.
7162
7163 2014-08-07 Gary Benson <gbenson@redhat.com>
7164
7165 * server.h: Do not include gdb/signals.h.
7166 * win32-low.c: Likewise.
7167
7168 2014-08-07 Gary Benson <gbenson@redhat.com>
7169
7170 * server.h: Do not include pathmax.h.
7171
7172 2014-08-07 Gary Benson <gbenson@redhat.com>
7173
7174 * server.h: Do not include libiberty.h.
7175 * linux-bfin-low.c: Likewise.
7176
7177 2014-08-07 Gary Benson <gbenson@redhat.com>
7178
7179 * server.h: Do not include ansidecl.h.
7180
7181 2014-08-07 Gary Benson <gbenson@redhat.com>
7182
7183 * linux-x86-low.c: Do not include stddef.h.
7184 * lynx-ppc-low.c: Likewise.
7185 * tracepoint.c: Likewise.
7186
7187 2014-08-07 Gary Benson <gbenson@redhat.com>
7188
7189 * server.h: Do not include stdarg.h.
7190 * nto-low.c: Likewise.
7191
7192 2014-08-07 Gary Benson <gbenson@redhat.com>
7193
7194 * server.h: Do not include stdlib.h.
7195 * inferiors.c: Likewise.
7196 * linux-low.c: Likewise.
7197 * regcache.c: Likewise.
7198 * spu-low.c: Likewise.
7199 * tracepoint.c: Likewise.
7200 * utils.c: Likewise.
7201
7202 2014-08-07 Gary Benson <gbenson@redhat.com>
7203
7204 * server.h: Do not include stdio.h.
7205 * linux-low.c: Likewise.
7206 * remote-utils.c: Likewise.
7207 * spu-low.c: Likewise.
7208 * utils.c: Likewise.
7209 * wincecompat.c: Likewise.
7210
7211 2014-08-06 Gary Benson <gbenson@redhat.com>
7212
7213 * regcache.c (init_register_cache): Move conditionals inside if.
7214
7215 2014-08-06 Gary Benson <gbenson@redhat.com>
7216
7217 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7218
7219 2014-07-31 Gary Benson <gbenson@redhat.com>
7220
7221 * ax.h: Do not include server.h.
7222 * gdbthread.h: Likewise.
7223 * lynx-low.h: Likewise.
7224 * notif.h: Likewise.
7225
7226 2014-07-30 Gary Benson <gbenson@redhat.com>
7227
7228 * server.h: Include common-defs.h.
7229 Do not include config.h or build-gnulib-gdbserver/config.h.
7230
7231 2014-07-30 Gary Benson <gbenson@redhat.com>
7232
7233 * hostio-errno.c: Move server.h to top of includes list.
7234 * inferiors.c: Likewise.
7235 * linux-x86-low.c: Likewise.
7236 * notif.c: Include server.h.
7237
7238 2014-07-24 Tom Tromey <tromey@redhat.com>
7239 Gary Benson <gbenson@redhat.com>
7240
7241 * server.h (CORE_ADDR): Now unsigned.
7242
7243 2014-07-16 Pedro Alves <palves@redhat.com>
7244
7245 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7246
7247 2014-07-15 Pedro Alves <palves@redhat.com>
7248
7249 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7250 copy.
7251
7252 2014-07-11 Pedro Alves <palves@redhat.com>
7253
7254 * linux-low.c (kill_wait_lwp): New function, based on
7255 kill_one_lwp_callback, but use my_waitpid directly.
7256 (kill_one_lwp_callback, linux_kill): Use it.
7257
7258 2014-06-23 Pedro Alves <palves@redhat.com>
7259
7260 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7261 before setting DR0..DR3.
7262
7263 2014-06-20 Gary Benson <gbenson@redhat.com>
7264
7265 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7266 * configure: Regenerated.
7267 * config.in: Likewise.
7268
7269 2014-06-20 Gary Benson <gbenson@redhat.com>
7270
7271 * Makefile.in (SFILES): Update locations for files moved
7272 from common to nat.
7273 (object file files): Reordered.
7274
7275 2014-06-20 Gary Benson <gbenson@redhat.com>
7276
7277 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7278 (i386_dr_low_set_addr): Likewise.
7279 (i386_dr_low_get_addr): Likewise.
7280 (i386_dr_low_can_set_control): Likewise.
7281 (i386_dr_low_set_control): Likewise.
7282 (i386_dr_low_get_control): Likewise.
7283 (i386_dr_low_get_status): Likewise.
7284 (i386_get_debug_register_length): Likewise.
7285 * linux-x86-low.c (i386_dr_low_set_addr):
7286 Changed signature. Made static.
7287 (i386_dr_low_get_addr): Likewise.
7288 (i386_dr_low_set_control): Likewise.
7289 (i386_dr_low_get_control): Likewise.
7290 (i386_dr_low_get_status): Likewise.
7291 (i386_dr_low): New global variable.
7292 * win32-i386-low.c (i386_dr_low_set_addr):
7293 Changed signature. Made static.
7294 (i386_dr_low_get_addr): Likewise.
7295 (i386_dr_low_set_control): Likewise.
7296 (i386_dr_low_get_control): Likewise.
7297 (i386_dr_low_get_status): Likewise.
7298 (i386_dr_low): New global variable.
7299
7300 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7301
7302 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7303 * Makefile.in (AR, AR_FLAGS): Define.
7304 * configure: Regenerate.
7305
7306 2014-06-19 Gary Benson <gbenson@redhat.com>
7307
7308 * Makefile.in (i386-dregs.o): New rule.
7309 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7310 * i386-low.c (target.h): Remove include.
7311 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7312 (DR_CONTROL_SHIFT): Likewise.
7313 (DR_CONTROL_SIZE): Likewise.
7314 (DR_RW_EXECUTE): Likewise.
7315 (DR_RW_WRITE): Likewise.
7316 (DR_RW_READ): Likewise.
7317 (DR_RW_IORW): Likewise.
7318 (DR_LEN_1): Likewise.
7319 (DR_LEN_2): Likewise.
7320 (DR_LEN_4): Likewise.
7321 (DR_LEN_8): Likewise.
7322 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7323 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7324 (DR_ENABLE_SIZE): Likewise.
7325 (DR_LOCAL_SLOWDOWN): Likewise.
7326 (DR_GLOBAL_SLOWDOWN): Likewise.
7327 (DR_CONTROL_RESERVED): Likewise.
7328 (I386_DR_CONTROL_MASK): Likewise.
7329 (I386_DR_VACANT): Likewise.
7330 (I386_DR_LOCAL_ENABLE): Likewise.
7331 (I386_DR_GLOBAL_ENABLE): Likewise.
7332 (I386_DR_DISABLE): Likewise.
7333 (I386_DR_SET_RW_LEN): Likewise.
7334 (I386_DR_GET_RW_LEN): Likewise.
7335 (I386_DR_WATCH_HIT): Likewise.
7336 (i386_wp_op_t): Likewise.
7337 (i386_show_dr): Likewise.
7338 (i386_length_and_rw_bits): Likewise.
7339 (i386_insert_aligned_watchpoint): Likewise.
7340 (i386_remove_aligned_watchpoint): Likewise.
7341 (i386_handle_nonaligned_watchpoint): Likewise.
7342 i386_update_inferior_debug_regs(): Likewise.
7343 (i386_dr_insert_watchpoint): Likewise.
7344 (i386_dr_remove_watchpoint): Likewise.
7345 (i386_dr_region_ok_for_watchpoint): Likewise.
7346 (i386_dr_stopped_data_address): Likewise.
7347 (i386_dr_stopped_by_watchpoint): Likewise.
7348
7349 2014-06-19 Gary Benson <gbenson@redhat.com>
7350
7351 * i386-low.c (i386_dr_show): Renamed to
7352 i386_show_dr and made static. All uses updated.
7353 (i386_dr_length_and_rw_bits): Renamed to
7354 i386_length_and_rw_bits and made static.
7355 All uses updated.
7356 (i386_dr_insert_aligned_watchpoint): Renamed to
7357 i386_insert_aligned_watchpoint and made static.
7358 All uses updated.
7359 (i386_dr_remove_aligned_watchpoint): Renamed to
7360 i386_remove_aligned_watchpoint and made static.
7361 All uses updated.
7362 (i386_dr_update_inferior_debug_regs): Renamed to
7363 i386_update_inferior_debug_regs and made static.
7364 All uses updated.
7365
7366 2014-06-18 Gary Benson <gbenson@redhat.com>
7367
7368 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7369 (i386_dr_low_can_set_control): Likewise.
7370 (i386_get_debug_register_length): Likewise.
7371 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7372 (i386_dr_low_can_set_control): Likewise.
7373 (i386_get_debug_register_length): Likewise.
7374
7375 2014-06-17 Gary Benson <gbenson@redhat.com>
7376
7377 * i386-low.h (i386-dregs.h): New include.
7378 (DR_FIRSTADDR): Now in i386-dregs.h.
7379 (DR_LASTADDR): Likewise.
7380 (DR_NADDR): Likewise.
7381 (DR_STATUS): Likewise.
7382 (DR_CONTROL): Likewise.
7383 (i386_debug_reg_state): Likewise.
7384 (i386_dr_insert_watchpoint): Likewise.
7385 (i386_dr_remove_watchpoint): Likewise.
7386 (i386_dr_region_ok_for_watchpoint): Likewise.
7387 (i386_dr_stopped_data_address): Likewise.
7388 (i386_dr_stopped_by_watchpoint): Likewise.
7389 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7390
7391 2014-06-18 Gary Benson <gbenson@redhat.com>
7392
7393 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7394 i386_dr_insert_watchpoint.
7395 (i386_low_remove_watchpoint): Renamed to
7396 i386_dr_remove_watchpoint.
7397 (i386_low_region_ok_for_watchpoint): Renamed to
7398 i386_dr_region_ok_for_watchpoint.
7399 (i386_low_stopped_data_address): Renamed to
7400 i386_dr_stopped_data_address.
7401 (i386_low_stopped_by_watchpoint): Renamed to
7402 i386_dr_stopped_by_watchpoint.
7403 * i386-low.c (i386_show_dr): Renamed to
7404 i386_dr_show and made nonstatic. All uses updated.
7405 (i386_length_and_rw_bits): Renamed to
7406 i386_dr_length_and_rw_bits and made nonstatic.
7407 All uses updated.
7408 (i386_insert_aligned_watchpoint): Renamed to
7409 i386_dr_insert_aligned_watchpoint and made nonstatic.
7410 All uses updated.
7411 (i386_remove_aligned_watchpoint): Renamed to
7412 i386_dr_remove_aligned_watchpoint and made nonstatic.
7413 All uses updated.
7414 (i386_update_inferior_debug_regs): Renamed to
7415 i386_dr_update_inferior_debug_regs and made nonstatic.
7416 All uses updated.
7417 (i386_low_insert_watchpoint): Renamed to
7418 i386_dr_insert_watchpoint. All uses updated.
7419 (i386_low_remove_watchpoint): Renamed to
7420 i386_dr_remove_watchpoint. All uses updated.
7421 (i386_low_region_ok_for_watchpoint): Renamed to
7422 i386_dr_region_ok_for_watchpoint. All uses updated.
7423 (i386_low_stopped_data_address): Renamed to
7424 i386_dr_stopped_data_address. All uses updated.
7425 (i386_low_stopped_by_watchpoint): Renamed to
7426 i386_dr_stopped_by_watchpoint. All uses updated.
7427
7428 2014-06-18 Gary Benson <gbenson@redhat.com>
7429
7430 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7431 (i386_dr_low_can_set_control): Likewise.
7432 (i386_insert_aligned_watchpoint): New check.
7433
7434 2014-06-18 Gary Benson <gbenson@redhat.com>
7435
7436 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7437 Renamed to state.
7438
7439 2014-06-18 Gary Benson <gbenson@redhat.com>
7440
7441 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7442 instead of fatal and error.
7443 (i386_handle_nonaligned_watchpoint): Likewise.
7444
7445 2014-06-18 Gary Benson <gbenson@redhat.com>
7446
7447 * i386-low.c (i386_get_debug_register_length): New macro.
7448 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7449 (i386_show_dr): Use debug_printf instead of fprintf. Use
7450 phex to format values.
7451
7452 2014-06-18 Gary Benson <gbenson@redhat.com>
7453
7454 * i386-low.h: Comment changes.
7455 * i386-low.c: Likewise.
7456
7457 2014-06-18 Gary Benson <gbenson@redhat.com>
7458
7459 * i386-low.c: Whitespace changes.
7460
7461 2014-06-12 Tom Tromey <tromey@redhat.com>
7462
7463 * utils.c (freeargv): Remove.
7464
7465 2014-06-12 Tom Tromey <tromey@redhat.com>
7466
7467 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7468 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7469 (parse_debug_format_options): Likewise.
7470 (gdbserver_usage): Likewise.
7471 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7472 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7473 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7474 against libiberty.
7475 ($(LIBGNU)): Depend on libiberty.
7476 (all-lib): Recurse into all subdirs.
7477 (install-only): Invoke "install" target in subdirs.
7478 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7479 targets.
7480 * configure: Rebuild.
7481 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7482 for vasprintf, vsnprintf, or gettimeofday.
7483 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7484 srv_tgtobj.
7485
7486 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7487
7488 * development.sh: Delete.
7489 * Makefile.in (config.status): Adjust dependency on development.sh.
7490 * configure.ac: Adjust development.sh source call.
7491 * configure: Regenerate.
7492
7493 2014-06-02 Pedro Alves <palves@redhat.com>
7494
7495 * ax.c (gdb_free_agent_expr): New function.
7496 * ax.h (gdb_free_agent_expr): New declaration.
7497 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7498 list.
7499 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7500 static.
7501 (clear_breakpoint_conditions_and_commands): New function.
7502 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7503 (clear_breakpoint_conditions_and_commands): New declaration.
7504
7505 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7506
7507 * linux-aarch64-low.c (asm/ptrace.h): Include.
7508
7509 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7510
7511 Fix TLS access for -static -pthread.
7512 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7513 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7514 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7515
7516 2014-05-20 Pedro Alves <palves@redhat.com>
7517
7518 * linux-aarch64-low.c (aarch64_insert_point)
7519 (aarch64_remove_point): No longer check whether the type is
7520 supported here. Adjust to new interface.
7521 (the_low_target): Install aarch64_supports_z_point_type as
7522 supports_z_point_type method.
7523 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7524 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7525 instead of a Z packet char. Adjust.
7526 (arm_supports_z_point_type): New function.
7527 (arm_insert_point, arm_remove_point): Adjust to new interface.
7528 (the_low_target): Install arm_supports_z_point_type.
7529 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7530 (cris_insert_point, cris_remove_point): Adjust to new interface.
7531 Don't check whether the type is supported here.
7532 (the_low_target): Install cris_supports_z_point_type.
7533 * linux-low.c (linux_supports_z_point_type): New function.
7534 (linux_insert_point, linux_remove_point): Adjust to new interface.
7535 * linux-low.h (struct linux_target_ops) <insert_point,
7536 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7537 raw_breakpoint pointer parameter.
7538 <supports_z_point_type>: New method.
7539 * linux-mips-low.c (mips_supports_z_point_type): New function.
7540 (mips_insert_point, mips_remove_point): Adjust to new interface.
7541 Use mips_supports_z_point_type.
7542 (the_low_target): Install mips_supports_z_point_type.
7543 * linux-ppc-low.c (the_low_target): Install NULL as
7544 supports_z_point_type method.
7545 * linux-s390-low.c (the_low_target): Install NULL as
7546 supports_z_point_type method.
7547 * linux-sparc-low.c (the_low_target): Install NULL as
7548 supports_z_point_type method.
7549 * linux-x86-low.c (x86_supports_z_point_type): New function.
7550 (x86_insert_point): Adjust to new insert_point interface. Use
7551 insert_memory_breakpoint. Adjust to new
7552 i386_low_insert_watchpoint interface.
7553 (x86_remove_point): Adjust to remove_point interface. Use
7554 remove_memory_breakpoint. Adjust to new
7555 i386_low_remove_watchpoint interface.
7556 (the_low_target): Install x86_supports_z_point_type.
7557 * lynx-low.c (lynx_target_ops): Install NULL as
7558 supports_z_point_type callback.
7559 * nto-low.c (nto_supports_z_point_type): New.
7560 (nto_insert_point, nto_remove_point): Adjust to new interface.
7561 (nto_target_ops): Install nto_supports_z_point_type.
7562 * mem-break.c: Adjust intro comment.
7563 (struct raw_breakpoint) <raw_type, size>: New fields.
7564 <inserted>: Update comment.
7565 <shlib_disabled>: Delete field.
7566 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7567 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7568 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7569 (raw_bkpt_type_to_target_hw_bp_type): New function.
7570 (find_enabled_raw_code_breakpoint_at): New function.
7571 (find_raw_breakpoint_at): New type and size parameters. Use them.
7572 (insert_memory_breakpoint): New function, based off
7573 set_raw_breakpoint_at.
7574 (remove_memory_breakpoint): New function.
7575 (set_raw_breakpoint_at): Reimplement.
7576 (set_breakpoint): New, based on set_breakpoint_at.
7577 (set_breakpoint_at): Reimplement.
7578 (delete_raw_breakpoint): Go through the_target->remove_point
7579 instead of assuming memory breakpoints.
7580 (find_gdb_breakpoint_at): Delete.
7581 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7582 (find_gdb_breakpoint): New function.
7583 (set_gdb_breakpoint_at): Delete.
7584 (z_type_supported): New function.
7585 (set_gdb_breakpoint_1): New function, loosely based off
7586 set_gdb_breakpoint_at.
7587 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7588 (delete_gdb_breakpoint_at): Delete.
7589 (delete_gdb_breakpoint_1): New function, loosely based off
7590 delete_gdb_breakpoint_at.
7591 (delete_gdb_breakpoint): New function.
7592 (clear_gdb_breakpoint_conditions): Rename to ...
7593 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7594 breakpoint.
7595 (add_condition_to_breakpoint): Make static.
7596 (add_breakpoint_condition): Take a struct breakpoint pointer
7597 instead of an address. Adjust.
7598 (gdb_condition_true_at_breakpoint): Rename to ...
7599 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7600 z_type parameter.
7601 (gdb_condition_true_at_breakpoint): Reimplement.
7602 (add_breakpoint_commands): Take a struct breakpoint pointer
7603 instead of an address. Adjust.
7604 (gdb_no_commands_at_breakpoint): Rename to ...
7605 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7606 parameter. Return true if no breakpoint was found. Change debug
7607 output.
7608 (gdb_no_commands_at_breakpoint): Reimplement.
7609 (run_breakpoint_commands): Rename to ...
7610 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7611 and change return type to boolean.
7612 (run_breakpoint_commands): New function.
7613 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7614 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7615 breakpoint. Go through the_target->remove_point instead of
7616 assuming memory breakpoint.
7617 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7618 software and hardware breakpoints.
7619 (reinsert_raw_breakpoint): Go through the_target->insert_point
7620 instead of assuming memory breakpoint.
7621 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7622 software and hardware breakpoints.
7623 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7624 Check both software and hardware breakpoints.
7625 (validate_inserted_breakpoint): Assert the breakpoint is a
7626 software breakpoint. Set the inserted flag to -1 instead of
7627 setting shlib_disabled.
7628 (delete_disabled_breakpoints): Adjust.
7629 (validate_breakpoints): Only validate software breakpoints.
7630 Adjust to inserted flag change.
7631 (check_mem_read, check_mem_write): Skip breakpoint types other
7632 than software breakpoints. Adjust to inserted flag change.
7633 * mem-break.h (enum raw_bkpt_type): New enum.
7634 (raw_breakpoint, struct process_info): Forward declare.
7635 (Z_packet_to_target_hw_bp_type): Delete declaration.
7636 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7637 (set_gdb_breakpoint, delete_gdb_breakpoint)
7638 (clear_breakpoint_conditions): New declarations.
7639 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7640 (breakpoint_inserted_here): Update comment.
7641 (add_breakpoint_condition, add_breakpoint_commands): Replace
7642 address parameter with a breakpoint pointer parameter.
7643 (gdb_breakpoint_here): Update comment.
7644 (delete_gdb_breakpoint_at): Delete.
7645 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7646 * server.c (process_point_options): Take a struct breakpoint
7647 pointer instead of an address. Adjust.
7648 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7649 delete_gdb_breakpoint.
7650 * spu-low.c (spu_target_ops): Install NULL as
7651 supports_z_point_type method.
7652 * target.h: Include mem-break.h.
7653 (struct target_ops) <prepare_to_access_memory>: Update comment.
7654 <supports_z_point_type>: New field.
7655 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7656 instead of a char. Also take a raw breakpoint pointer.
7657 * win32-arm-low.c (the_low_target): Install NULL as
7658 supports_z_point_type.
7659 * win32-i386-low.c (i386_supports_z_point_type): New function.
7660 (i386_insert_point, i386_remove_point): Adjust to new interface.
7661 (the_low_target): Install i386_supports_z_point_type.
7662 * win32-low.c (win32_supports_z_point_type): New function.
7663 (win32_insert_point, win32_remove_point): Adjust to new interface.
7664 (win32_target_ops): Install win32_supports_z_point_type.
7665 * win32-low.h (struct win32_target_ops):
7666 <supports_z_point_type>: New method.
7667 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7668 instead of a char. Also take a raw breakpoint pointer.
7669
7670 2014-05-20 Pedro Alves <palves@redhat.com>
7671
7672 * mem-break.h: Include break-common.h.
7673 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7674 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7675 (Z_packet_to_target_hw_bp_type): New declaration.
7676 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7677 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7678 (Z_PACKET_ACCESS_WP): Delete macros.
7679 (Z_packet_to_hw_type): Delete function.
7680 * i386-low.h: Don't include break-common.h here.
7681 (Z_packet_to_hw_type): Delete declaration.
7682 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7683 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7684 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7685 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7686 * linux-aarch64-low.c: Don't include break-common.h here.
7687 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7688 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7689 (Z_packet_to_target_hw_bp_type): Delete function.
7690 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7691 function.
7692 (mips_insert_point, mips_remove_point): Use
7693 Z_packet_to_target_hw_bp_type.
7694
7695 2014-05-20 Pedro Alves <palves@redhat.com>
7696
7697 * linux-aarch64-low.c: Include break-common.h.
7698 (enum target_point_type): Delete.
7699 (Z_packet_to_point_type): Rename to ...
7700 (Z_packet_to_target_hw_bp_type): ... this, and return a
7701 target_hw_bp_type instead.
7702 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7703 instead of an enum target_point_type.
7704 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7705 breakpoint type.
7706 (aarch64_dr_state_insert_one_point)
7707 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7708 (aarch64_handle_aligned_watchpoint)
7709 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7710 Take an enum target_hw_bp_type instead of an enum
7711 target_point_type.
7712 (aarch64_supports_z_point_type): New function.
7713 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7714 use Z_packet_to_target_hw_bp_type.
7715
7716 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7717
7718 * configure.ac: Only use -Werror by default when DEVELOPMENT
7719 is true.
7720 * configure: Regenerate.
7721
7722 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7723
7724 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7725 * linux-x86-low.c (X86_64_USER_REGS): New.
7726 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7727
7728 2014-04-28 Yao Qi <yao@codesourcery.com>
7729
7730 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7731 name.
7732
7733 2014-04-25 Pedro Alves <palves@redhat.com>
7734
7735 PR server/16255
7736 * linux-low.c (linux_attach_fail_reason_string): New function.
7737 (linux_attach_lwp): Delete.
7738 (linux_attach_lwp_1): Rename to ...
7739 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7740 argument. Remove "initial" parameter. Return int instead of
7741 void. Don't error or warn here.
7742 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7743 failure to attach to the tgid. Call warning when failing to
7744 attach to an lwp.
7745 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7746 argument. Remove "initial" parameter. Return int instead of
7747 void. Don't error or warn here.
7748 (linux_attach_fail_reason_string): New declaration.
7749 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7750 interface change. Use linux_attach_fail_reason_string.
7751
7752 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7753 Walfred Tedeschi <walfred.tedeschi@intel.com>
7754
7755 * Makefile.in: Added rules to handle new files
7756 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7757 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7758 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7759 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7760 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7761 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7762 x32-avx512-linux.o.
7763 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7764 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7765 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7766 i386/x32-avx512.xml.
7767 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7768 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7769 i386/x32-avx512-linux.xml.
7770 * i387-fp.c (num_avx512_k_registers): New constant for number
7771 of K registers.
7772 (num_avx512_zmmh_low_registers): New constant for number of
7773 lower ZMM registers (0-15).
7774 (num_avx512_zmmh_high_registers): New constant for number of
7775 higher ZMM registers (16-31).
7776 (num_avx512_ymmh_registers): New contant for number of higher
7777 YMM registers (ymm16-31 added by avx521 on x86_64).
7778 (num_avx512_xmm_registers): New constant for number of higher
7779 XMM registers (xmm16-31 added by AVX512 on x86_64).
7780 (struct i387_xsave): Add space for AVX512 registers.
7781 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7782 Add code to handle AVX512 registers.
7783 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7784 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7785 prototypei from generated file.
7786 (tdesc_amd64_avx512_linux): Likewise.
7787 (init_registers_x32_avx512_linux): Likewise.
7788 (tdesc_x32_avx512_linux): Likewise.
7789 (init_registers_i386_avx512_linux): Likewise.
7790 (tdesc_i386_avx512_linux): Likewise.
7791 (x86_64_regmap): Add AVX512 registers.
7792 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7793 mask.
7794 (initialize_low_arch): Add code to initialize AVX512 registers.
7795
7796 2014-04-23 Pedro Alves <palves@redhat.com>
7797
7798 * mem-break.c (find_gdb_breakpoint_at): Make static.
7799 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7800
7801 2014-04-23 Pedro Alves <palves@redhat.com>
7802
7803 * i386-low.c: Don't include break-common.h here.
7804 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7805 prototype to take target_hw_bp_type as argument instead of a Z
7806 packet char.
7807 * i386-low.h: Include break-common.h here.
7808 (Z_packet_to_hw_type): Declare.
7809 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7810 prototypes.
7811 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7812 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7813 (x86_remove_point): Convert the packet number to a
7814 target_hw_bp_type before calling i386_low_remove_watchpoint.
7815 * win32-i386-low.c (i386_insert_point): Convert the packet number
7816 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7817 (i386_remove_point): Convert the packet number to a
7818 target_hw_bp_type before calling i386_low_remove_watchpoint.
7819
7820 2014-04-23 Pedro Alves <palves@redhat.com>
7821
7822 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7823
7824 2014-04-10 Pedro Alves <palves@redhat.com>
7825
7826 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7827 Check if the condition or command is NULL before checking if the
7828 breakpoint is known. On success, return true.
7829 * mem-break.h (add_breakpoint_condition): Document return.
7830 (add_breakpoint_commands): Add describing comment.
7831 * server.c (skip_to_semicolon): New function.
7832 (process_point_options): Use it.
7833
7834 2014-04-09 Pedro Alves <palves@redhat.com>
7835
7836 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7837 to lwpid_of.
7838
7839 2014-02-27 Pedro Alves <palves@redhat.com>
7840
7841 PR 12702
7842 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7843 macros.
7844 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7845 output.
7846 (last_thread_of_process_p): Take a PID argument instead of a
7847 thread pointer.
7848 (linux_wait_for_lwp): Delete.
7849 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7850 functions.
7851 (linux_low_filter_event): New function, party factored out from
7852 linux_wait_for_event.
7853 (linux_wait_for_event): Rename to ...
7854 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7855 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7856 sigsuspend. Check for zombie leaders.
7857 (linux_wait_for_event): Reimplement as wrapper around
7858 linux_wait_for_event_filtered.
7859 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7860 a normal or signal exit is seen, it's the whole process exiting.
7861 (wait_for_sigstop): No longer a for_each_inferior callback.
7862 Rewrite on top of linux_wait_for_event_filtered.
7863 (stop_all_lwps): Call wait_for_sigstop directly.
7864 * server.c (resume, handle_target_event): Handle
7865 TARGET_WAITKIND_NO_RESUMED.
7866
7867 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7868
7869 * win32-low.c (psapi_get_dll_name,
7870 * win32_CreateToolhelp32Snapshot): Delete.
7871 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7872 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7873 Delete.
7874 (handle_load_dll): Add function description.
7875 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7876
7877 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7878
7879 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7880 Add comment.
7881 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7882 base address when calling win32_add_one_solib.
7883 (handle_load_dll): Delete local variable load_addr.
7884 Remove 0x1000 offset applied to DLL base address when calling
7885 win32_add_one_solib.
7886 (handle_unload_dll): Add comment.
7887
7888 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7889
7890 * win32-low.c (win32_add_all_dlls): Renames
7891 win32_ensure_ntdll_loaded. Rewrite function documentation.
7892 Adjust implementation to always load all DLLs.
7893 Add 0x1000 offset to DLL base address when calling
7894 win32_add_one_solib.
7895 (child_initialization_done): New static global.
7896 (do_initial_child_stuff): Set child_initialization_done to
7897 zero during child initialization, and 1 after. Replace call
7898 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7899 Add comment.
7900 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7901 (handle_unload_dll): Add function documentation.
7902 (get_child_debug_event): Ignore load and unload DLL events
7903 during child initialization.
7904
7905 2014-02-20 Doug Evans <dje@google.com>
7906
7907 Remove global all_lwps.
7908 * inferiors.h (ptid_of): Move here from linux-low.h.
7909 (pid_of, lwpid_of): Ditto.
7910 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7911 parameter is a struct thread_info * now.
7912 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7913 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7914 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7915 directly.
7916 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7917 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7918 * linux-arm-low.c (update_registers_callback): Update, "entry"
7919 parameter is a struct thread_info * now.
7920 Fetch lwpid from current_inferior directly.
7921 (arm_insert_point): Pass &all_threads to find_inferior instead of
7922 &all_lwps.
7923 (arm_remove_point): Ditto.
7924 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7925 (arm_prepare_to_resume): Fetch pid from thread.
7926 (arm_read_description): Fetch lwpid from current_inferior directly.
7927 * linux-low.c (all_lwps): Delete.
7928 (delete_lwp): Delete call to remove_inferior.
7929 (handle_extended_wait): Fetch lwpid from thread.
7930 (add_lwp): Don't set lwp->entry.id. Remove call to
7931 add_inferior_to_list.
7932 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7933 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7934 (kill_one_lwp_callback): Ditto.
7935 (linux_kill): Don't dereference NULL pointer.
7936 Fetch ptid,lwpid from thread.
7937 (get_detach_signal): Fetch ptid from thread.
7938 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7939 Simplify call to regcache_invalidate_thread.
7940 (delete_lwp_callback): Update, "entry" parameter is a
7941 struct thread_info * now. Fetch pid from thread.
7942 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7943 (status_pending_p_callback): Update, "entry" parameter is a
7944 struct thread_info * now. Fetch ptid from thread.
7945 (find_lwp_pid): Update, "entry" parameter is a
7946 struct thread_info * now.
7947 (linux_wait_for_lwp): Fetch pid from thread.
7948 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7949 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7950 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7951 (dequeue_one_deferred_signal): Ditto.
7952 (cancel_breakpoint): Fetch ptid from current_inferior.
7953 (linux_wait_for_event): Pass &all_threads to find_inferior,
7954 not &all_lwps. Fetch ptid, lwpid from thread.
7955 (count_events_callback): Update, "entry" parameter is a
7956 struct thread_info * now.
7957 (select_singlestep_lwp_callback): Ditto.
7958 (select_event_lwp_callback): Ditto.
7959 (cancel_breakpoints_callback): Ditto.
7960 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7961 not &all_lwps.
7962 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7963 (unsuspend_one_lwp): Update, "entry" parameter is a
7964 struct thread_info * now.
7965 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7966 not &all_lwps.
7967 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7968 Fetch lwpid from thread, not lwp.
7969 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7970 Pass &all_threads to find_inferior, not &all_lwps.
7971 (send_sigstop): Fetch lwpid from thread, not lwp.
7972 (send_sigstop_callback): Update, "entry" parameter is a
7973 struct thread_info * now.
7974 (suspend_and_send_sigstop_callback): Ditto.
7975 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7976 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7977 struct thread_info * now.
7978 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7979 from thread, lwp.
7980 (lwp_running): Update, "entry" parameter is a
7981 struct thread_info * now.
7982 (stop_all_lwps): Fetch ptid from thread.
7983 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7984 (linux_resume_one_lwp): Fetch lwpid from thread.
7985 (linux_set_resume_request): Update, "entry" parameter is a
7986 struct thread_info * now. Fetch pid, lwpid from thread.
7987 (resume_status_pending_p): Update, "entry" parameter is a
7988 struct thread_info * now.
7989 (need_step_over_p): Ditto. Fetch lwpid from thread.
7990 (start_step_over): Fetch lwpid from thread.
7991 (linux_resume_one_thread): Update, "entry" parameter is a
7992 struct thread_info * now. Fetch lwpid from thread.
7993 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7994 (proceed_one_lwp): Update, "entry" parameter is a
7995 struct thread_info * now. Fetch lwpid from thread.
7996 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7997 struct thread_info * now.
7998 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7999 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
8000 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
8001 directly.
8002 (regsets_store_inferior_registers): Ditto.
8003 (fetch_register, store_register): Ditto.
8004 (linux_read_memory, linux_write_memory): Ditto.
8005 (linux_request_interrupt): Ditto.
8006 (linux_read_auxv): Ditto.
8007 (linux_xfer_siginfo): Ditto.
8008 (linux_qxfer_spu): Ditto.
8009 (linux_qxfer_libraries_svr4): Ditto.
8010 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
8011 moved to inferiors.h.
8012 (get_lwp): Delete.
8013 (get_thread_lwp): Update.
8014 (struct lwp_info): Delete member "entry". Simplify comment for
8015 member "thread".
8016 (all_lwps): Delete.
8017 * linux-mips-low.c (mips_read_description): Fetch lwpid from
8018 current_inferior directly.
8019 (update_watch_registers_callback): Update, "entry" parameter is a
8020 struct thread_info * now. Fetch pid from thread.
8021 (mips_linux_prepare_to_resume): Fetch ptid from thread.
8022 (mips_insert_point): Fetch lwpid from current_inferior.
8023 Pass &all_threads to find_inferior, not &all_lwps.
8024 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
8025 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
8026 directly.
8027 (mips_stopped_data_address): Ditto.
8028 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
8029 directly.
8030 * linux-tile-low.c (tile_arch_setup): Ditto.
8031 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
8032 (update_debug_registers_callback): Update, "entry" parameter is a
8033 struct thread_info * now. Fetch pid from thread.
8034 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
8035 Pass &all_threads to find_inferior, not &all_lwps.
8036 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
8037 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
8038 Pass &all_threads to find_inferior, not &all_lwps.
8039 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
8040 (i386_dr_low_get_status): Ditto.
8041 (x86_linux_prepare_to_resume): Fetch ptid from thread.
8042 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
8043 (x86_linux_read_description): Ditto.
8044 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
8045
8046 2014-02-20 Doug Evans <dje@google.com>
8047
8048 * inferiors.c (get_first_inferior): Fix buglet.
8049
8050 2014-02-19 Doug Evans <dje@google.com>
8051
8052 * gdbthread.h (add_thread): Change result type to struct thread_info *.
8053 * inferiors.c (add_thread): Change result type to struct thread_info *.
8054 All callers updated.
8055 (add_lwp): Call add_thread here instead of in callers.
8056 All callers updated.
8057 * linux-low.h (get_lwp_thread): Rewrite.
8058 (struct lwp_info): New member "thread".
8059
8060 2014-02-19 Doug Evans <dje@google.com>
8061
8062 * linux-low.c (add_lwp): Change result to struct lwp_info *.
8063 All callers updated.
8064
8065 2014-02-19 Doug Evans <dje@google.com>
8066
8067 * inferiors.c (add_thread): Fix whitespace.
8068
8069 2014-02-19 Doug Evans <dje@google.com>
8070
8071 * dll.c (clear_dlls): Replace accessing list implemention details
8072 with API function.
8073 * gdbthread.h (get_first_thread): Declare.
8074 * inferiors.c (for_each_inferior_with_data): New function.
8075 (get_first_thread): New function.
8076 (find_thread_ptid): Simplify.
8077 (get_first_inferior): New function.
8078 (clear_list): Delete.
8079 (one_inferior_p): New function.
8080 (clear_inferior_list): New function.
8081 (clear_inferiors): Update.
8082 * inferiors.h (for_each_inferior_with_data): Declare.
8083 (clear_inferior_list): Declare.
8084 (one_inferior_p): Declare.
8085 (get_first_inferior): Declare.
8086 * linux-low.c (linux_wait_for_event): Replace accessing list
8087 implemention details with API function.
8088 * server.c (target_running): Ditto.
8089 (accumulate_file_name_length): New function.
8090 (emit_dll_description): New function.
8091 (handle_qxfer_libraries): Replace accessing list implemention
8092 details with API function.
8093 (handle_qxfer_threads_worker): New function.
8094 (handle_qxfer_threads_proper): Replace accessing list implemention
8095 details with API function.
8096 (handle_query): Ditto.
8097 (visit_actioned_threads_callback_ftype): New typedef.
8098 (visit_actioned_threads_data): New struct.
8099 (visit_actioned_threads): Rewrite to be find_inferior callback.
8100 (resume): Call find_inferior.
8101 (handle_status): Replace accessing list implemention
8102 details with API function.
8103 (process_serial_event): Replace accessing list implemention details
8104 with API function.
8105 * target.c (set_desired_inferior): Replace accessing list implemention
8106 details with API function.
8107 * tracepoint.c (same_process_p): New function.
8108 (gdb_agent_about_to_close): Replace accessing list implemention
8109 details with API function.
8110 * win32-low.c (child_delete_thread): Replace accessing list
8111 implemention details with API function.
8112 (match_dll_by_basename): New function.
8113 (dll_is_loaded_by_basename): New function.
8114 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8115 details call to dll_is_loaded_by_basename.
8116
8117 2014-02-19 Doug Evans <dje@google.com>
8118
8119 * dll.h (struct dll_info): Add comment.
8120 * gdbthread.h (struct thread_info): Add comment.
8121 (current_ptid): Simplify.
8122 * inferiors.c (add_process): Update.
8123 (remove_process): Update.
8124 * inferiors.h (struct process_info): Rename member "head" to "entry".
8125 * linux-low.c (delete_lwp): Update.
8126 (add_lwp): Update.
8127 (last_thread_of_process_p): Update.
8128 (kill_one_lwp_callback, linux_kill): Update.
8129 (status_pending_p_callback): Update.
8130 (wait_for_sigstop): Update. Simplify read of ptid.
8131 (start_step_over): Update.
8132 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8133 (get_lwp_thread): Update.
8134 (struct lwp_info): Rename member "head" to "entry".
8135 * regcache.h (inferior_list_entry): Delete.
8136 * server.c (kill_inferior_callback): Update.
8137 (detach_or_kill_inferior_callback): Update.
8138 (print_started_pid): Update.
8139 (print_attached_pid): Update.
8140 (process_serial_event): Simplify read of ptid.
8141 * thread-db.c (thread_db_create_event): Update.
8142 (thread_db_get_tls_address): Update.
8143 * win32-low.c (current_inferior_ptid): Simplify.
8144
8145 2014-02-19 Tom Tromey <tromey@redhat.com>
8146
8147 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8148 argument.
8149 (target_supports_btrace): Update.
8150
8151 2014-02-14 Yao Qi <yao@codesourcery.com>
8152
8153 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8154 (rsp-low-ipa.o): New target.
8155
8156 2014-02-12 Tom Tromey <tromey@redhat.com>
8157
8158 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8159 convert_ascii_to_int.
8160 * regcache.c (registers_to_string): Likewise.
8161 * remote-utils.c (decode_M_packet): Likewise.
8162 * server.c (process_serial_event): Likewise.
8163
8164 2014-02-12 Tom Tromey <tromey@redhat.com>
8165
8166 * server.c (handle_query, handle_v_run): Use hex2bin, not
8167 unhexify.
8168 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8169
8170 2014-02-12 Tom Tromey <tromey@redhat.com>
8171
8172 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8173 convert_int_to_ascii.
8174 * regcache.c (registers_to_string, collect_register_as_string):
8175 Likewise.
8176 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8177 Likewise.
8178 * server.c (process_serial_event): Likewise.
8179 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8180 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8181
8182 2014-02-12 Tom Tromey <tromey@redhat.com>
8183
8184 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8185 bin2hex, not hexify.
8186 * tracepoint.c (cmd_qtstatus): Likewise.
8187
8188 2014-02-12 Tom Tromey <tromey@redhat.com>
8189
8190 * remote-utils.c (monitor_output): Pass explicit length to
8191 hexify.
8192
8193 2014-02-12 Tom Tromey <tromey@redhat.com>
8194
8195 * tracepoint.c: Include rsp-low.h.
8196 * server.c: Include rsp-low.h.
8197 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8198 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8199 declare.
8200 * remote-utils.c: Include rsp-low.h.
8201 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8202 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8203 (convert_int_to_ascii, convert_ascii_to_int): Move to
8204 common/rsp-low.c.
8205 * regcache.c: Include rsp-low.h.
8206 * ax.c: Include rsp-low.h.
8207 * Makefile.in (SFILES): Add common/rsp-low.c.
8208 (OBS): Add rsp-low.o.
8209 (rsp-low.o): New target.
8210
8211 2014-02-12 Tom Tromey <tromey@redhat.com>
8212
8213 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8214 Include print-utils.h.
8215 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8216 (plongest, thirty_two, phex_nz): Remove.
8217 * Makefile.in (SFILES): Add common/print-utils.c.
8218 (OBS): Add print-utils.o.
8219 (print-utils-ipa.o): New target.
8220 (print-utils.o): New target.
8221 (IPA_OBJS): Add print-utils-ipa.o.
8222
8223 2014-02-06 Tom Tromey <tromey@redhat.com>
8224
8225 * Makefile.in (SFILES): Fix indentation.
8226
8227 2014-02-05 Doug Evans <dje@google.com>
8228
8229 * linux-low.c (linux_wait_for_event): Improve comment.
8230 (linux_wait_1): Keep current_inferior in sync with event_child.
8231
8232 2014-01-22 Doug Evans <dje@google.com>
8233
8234 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8235
8236 2014-01-22 Doug Evans <dje@google.com>
8237
8238 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8239 * configure: Regenerate.
8240 * config.in: Regenerate.
8241 * Makefile.in (SFILES): Add debug.c.
8242 (OBS): Add debug.o.
8243 * debug.c: New file.
8244 * debug.h: New file.
8245 * linux-aarch64-low.c (*): Update all debugging printfs to use
8246 debug_printf instead of fprintf.
8247 * linux-arm-low.c (*): Ditto.
8248 * linux-cris-low.c (*): Ditto.
8249 * linux-crisv32-low.c (*): Ditto.
8250 * linux-m32r-low.c (*): Ditto.
8251 * linux-sparc-low.c (*): Ditto.
8252 * linux-x86.c (*): Ditto.
8253 * linux-low.c (*): Ditto.
8254 (linux_wait_1): Add calls to debug_enter, debug_exit.
8255 (linux_wait): Remove redundant debugging printf.
8256 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8257 (linux_resume, unstop_all_lwps): Ditto.
8258 * mem-break.c (*): Update all debugging printfs to use
8259 debug_printf instead of fprintf.
8260 * remote-utils.c (*): Ditto.
8261 * thread-db.c (*): Ditto.
8262 * server.c #include <ctype.h>, "gdb_vecs.h".
8263 (debug_threads): Moved to debug.c.
8264 (*): Update all debugging printfs to use debug_printf instead of
8265 fprintf.
8266 (start_inferior): Replace call to fflush with call to debug_flush.
8267 (monitor_show_help): Mention set debug-format.
8268 (parse_debug_format_options): New function.
8269 (handle_monitor_command): Handle "monitor set debug-format".
8270 (gdbserver_usage): Mention --debug-format.
8271 (main): Parse --debug-format.
8272 * server.h (debug_threads): Declaration moved to debug.h.
8273 #include "debug.h".
8274 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8275 trace_debug_1 that uses debug_printf.
8276 (tracepoint_look_up_symbols): Update all debugging printfs to use
8277 debug_printf instead of fprintf.
8278
8279 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8280
8281 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8282 sys/ptrace.h.
8283
8284 2014-01-17 Pedro Alves <palves@redhat.com>
8285
8286 PR build/16445
8287 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8288 defined after including gdb_proc_service.h.
8289
8290 2014-01-16 Doug Evans <dje@google.com>
8291
8292 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8293 (match_dll): Use it.
8294
8295 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8296
8297 * target.h (target_ops) <read_btrace>: Change parameters and
8298 return type to allow error reporting.
8299 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8300 trace reading errors on.
8301 * linux-low.c (linux_low_read_btrace): Pass trace reading
8302 errors on.
8303 (linux_low_disable_btrace): New.
8304
8305 2014-01-15 Doug Evans <dje@google.com>
8306
8307 * inferiors.c (thread_id_to_gdb_id): Delete.
8308 * inferiors.h (thread_id_to_gdb_id): Delete.
8309
8310 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8311
8312 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8313 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8314 versions.
8315
8316 2014-01-08 Pedro Alves <palves@redhat.com>
8317
8318 * server.c (handle_status): Don't discard previous queued stop
8319 replies or thread's pending status here.
8320 (main) <disconnection>: Do it here instead.
8321
8322 2014-01-08 Pedro Alves <palves@redhat.com>
8323
8324 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8325 * server.c (visit_actioned_threads, handle_pending_status): New
8326 function.
8327 (handle_v_cont): Factor out parts to ...
8328 (resume): ... this new function. If in all-stop, and a thread
8329 being resumed has a pending status, report it without actually
8330 resuming.
8331 (myresume): Adjust to use the new 'resume' function.
8332 (clear_pending_status_callback, set_pending_status_callback)
8333 (find_status_pending_thread_callback): New functions.
8334 (handle_status): Handle the case of multiple threads having
8335 interesting statuses to report. Report threads' real last signal
8336 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8337 with an interesting thread to report the status for, instead of
8338 always reporting the status of the first thread.
8339
8340 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8341
8342 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8343 * gdbreplay.c (gdbreplay_version): Likewise.
8344
8345 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8346
8347 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8348 iov.iov_len with the real length in use.
8349
8350 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8351
8352 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8353 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8354 for all targets that use win32-low.c.
8355 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8356 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8357
8358 2013-12-13 Pedro Alves <palves@redhat.com>
8359
8360 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8361 if equal to TARGET_WAITKIND_LOADED.
8362 * win32-low.c (cached_status): New static global.
8363 (win32_wait): Add declaration.
8364 (do_initial_child_stuff): Flush all initial pending debug events
8365 up to the initial breakpoint.
8366 (win32_wait): If CACHED_STATUS was set, return that instead
8367 of doing a real wait. Remove the code resuming the execution
8368 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8369 during the initial phase. Also remove the code changing
8370 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8371 TARGET_WAITKIND_STOPPED.
8372
8373 2013-12-11 Yao Qi <yao@codesourcery.com>
8374
8375 * notif.c (handle_notif_ack): Return 0 if no notification
8376 matches.
8377
8378 2013-11-20 Doug Evans <dje@google.com>
8379
8380 * linux-low.c (linux_set_resume_request): Fix comment.
8381
8382 2013-11-20 Doug Evans <dje@google.com>
8383
8384 * linux-low.c (resume_status_pending_p): Tweak comment.
8385
8386 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8387
8388 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8389 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8390 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8391 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8392 (srv_amd64_regobj): Add amd64-mpx.o.
8393 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8394 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8395 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8396 * i387-fp.c (num_pl_bnd_register) Added constant.
8397 (num_pl_bnd_cfg_registers) Added constant.
8398 (struct i387_xsave) Added reserved area and MPX fields.
8399 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8400 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8401 function.
8402 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8403 (init_registers_amd64_mpx_linux): Declare new function.
8404 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8405 (x86_64_regmap): Add MPX registers.
8406 (x86_linux_read_description): Add MPX case.
8407 (initialize_low_arch): Initialize MPX targets.
8408
8409 2013-11-18 Tom Tromey <tromey@redhat.com>
8410
8411 * configure: Rebuild.
8412 * configure.ac: Don't check for stdlib.h.
8413 * gdbreplay.c: Unconditionally include stdlib.h.
8414
8415 2013-11-18 Tom Tromey <tromey@redhat.com>
8416
8417 * config.in: Rebuild.
8418 * configure: Rebuild.
8419 * configure.ac: Don't use AC_HEADER_DIRENT.
8420
8421 2013-11-18 Tom Tromey <tromey@redhat.com>
8422
8423 * server.h: Don't check HAVE_STRING_H.
8424 * gdbreplay.c: Don't check HAVE_STRING_H.
8425 * configure: Rebuild.
8426
8427 2013-11-18 Tom Tromey <tromey@redhat.com>
8428
8429 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8430 LIBGNU.
8431
8432 2013-11-08 Tom Tromey <tromey@redhat.com>
8433
8434 * configure, config.in: Rebuild.
8435 * configure.ac: Remove unused configury.
8436
8437 2013-11-08 Tom Tromey <tromey@redhat.com>
8438
8439 * acinclude.m4: Include common.m4, codeset.m4.
8440 * configure, config.in: Rebuild.
8441 * configure.ac: Use GDB_AC_COMMON.
8442
8443 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8444
8445 * linux-s390-low.c (HWCAP_S390_TE): New define.
8446 (s390_arch_setup): Consider the TE field in the HWCAP for
8447 determining 'have_regset_tdb'.
8448
8449 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8450
8451 PR gdb/16014
8452 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8453 call to sizeof.
8454
8455 2013-10-02 Pedro Alves <palves@redhat.com>
8456
8457 * server.c (process_serial_event): Don't output "GDBserver
8458 exiting" if GDB is connected through stdio.
8459 * target.c (mywait): Likewise, be silent if GDB is connected
8460 through stdio.
8461
8462 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8463
8464 * lynx-low.c (lynx_add_threads_after_attach): New function.
8465 (lynx_attach): Remove call to add_thread. Add call to
8466 lynx_add_threads_after_attach instead.
8467
8468 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8469
8470 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8471 * config.in, configure: Regenerated.
8472
8473 2013-09-18 Yao Qi <yao@codesourcery.com>
8474
8475 PR server/15959
8476 * server.c (start_inferior): Clear 'resume_info'.
8477
8478 2013-09-16 Jiong Wang <jiwang@tilera.com>
8479
8480 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8481 for each register.
8482
8483 2013-09-16 Jiong Wang <jiwang@tilera.com>
8484
8485 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8486 linux-tile-low.o to srv_tgtobj.
8487
8488 2013-09-16 Will Newton <will.newton@linaro.org>
8489
8490 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8491 out regs.
8492
8493 2013-09-06 Pedro Alves <palves@redhat.com>
8494
8495 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8496 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8497 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8498 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8499 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8500 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8501
8502 2013-09-06 Pedro Alves <palves@redhat.com>
8503
8504 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8505 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8506
8507 2013-09-06 Pedro Alves <palves@redhat.com>
8508
8509 * linux-amd64-ipa.c: Include tracepoint.h.
8510 * linux-i386-ipa.c: Include tracepoint.h.
8511
8512 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8513
8514 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8515 (ps_get_thread_area): New function.
8516
8517 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8518
8519 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8520 (initialize_low_arch): Call init_registers_crisv32 rather than
8521 init_register_crisv32.
8522
8523 2013-09-05 Pedro Alves <palves@redhat.com>
8524
8525 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8526 to ...
8527 * hostio.h: ... this new file.
8528 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8529 win32-low.c: Include hostio.h.
8530
8531 2013-09-05 Pedro Alves <palves@redhat.com>
8532
8533 * server.h (gdb_client_data, handler_func, callback_handler_func)
8534 (delete_file_handler, add_file_handler, append_callback_event)
8535 (delete_callback_event, start_event_loop, initialize_event_loop):
8536 Move to event-loop.h and include it.
8537 * event-loop.h: New file.
8538
8539 2013-09-05 Pedro Alves <palves@redhat.com>
8540
8541 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8542 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8543 (loaded_dll, unloaded_dll): Move to ...
8544 * dll.h: ... this new file.
8545 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8546
8547 2013-09-05 Pedro Alves <palves@redhat.com>
8548
8549 * server.h (current_process, get_thread_process, all_processes)
8550 (add_inferior_to_list, for_each_inferior, current_inferior)
8551 (remove_inferior, add_process, remove_process, find_process_pid)
8552 (have_started_inferiors_p, have_attached_inferiors_p)
8553 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8554 (clear_inferiors, find_inferior, find_inferior_id)
8555 (inferior_target_data, set_inferior_target_data)
8556 (inferior_regcache_data, set_inferior_regcache_data): Move to
8557 inferiors.h, and include it.
8558 * inferiors.h: New file.
8559
8560 2013-09-05 Pedro Alves <palves@redhat.com>
8561
8562 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8563 Move ...
8564 * ax.h: ... here.
8565
8566 2013-09-05 Pedro Alves <palves@redhat.com>
8567
8568 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8569 tracepoint.h.
8570 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8571 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8572 (handle_tracepoint_general_set, handle_tracepoint_query)
8573 (tracepoint_finished_step, tracepoint_was_hit)
8574 (release_while_stepping_state_list, current_traceframe)
8575 (in_readonly_region, traceframe_read_mem)
8576 (fetch_traceframe_registers, traceframe_read_sdata)
8577 (traceframe_read_info, struct fast_tpoint_collect_status)
8578 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8579 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8580 (supply_fast_tracepoint_registers)
8581 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8582 (ipa_tdesc, claim_trampoline_space)
8583 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8584 (agent_mem_read, agent_get_trace_state_variable_value)
8585 (agent_set_trace_state_variable_value, agent_tsv_read)
8586 (agent_mem_read_string, get_raw_reg_func_addr)
8587 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8588 * tracepoint.h: ... this new file.
8589
8590 2013-09-05 Pedro Alves <palves@redhat.com>
8591
8592 * server.h (perror_with_name, error, fatal, warning, paddress)
8593 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8594 include it.
8595 * utils.h: New file.
8596
8597 2013-09-05 Pedro Alves <palves@redhat.com>
8598
8599 * server.h (remote_debug, noack_mode, transport_is_reliable)
8600 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8601 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8602 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8603 (write_enn, initialize_async_io, enable_async_io)
8604 (disable_async_io, check_remote_input_interrupt_request)
8605 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8606 (dead_thread_notify, prepare_resume_reply)
8607 (decode_address_to_semicolon, decode_address, decode_m_packet)
8608 (decode_M_packet, decode_X_packet, decode_xfer_write)
8609 (decode_search_memory_packet, unhexify, hexify)
8610 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8611 (look_up_one_symbol, relocate_instruction)
8612 (monitor_output): Move to remote-utils.h, and include it.
8613 * remote-utils.h: New file.
8614
8615 2013-09-05 Pedro Alves <palves@redhat.com>
8616
8617 * server.h (_): Delete.
8618
8619 2013-09-02 Pedro Alves <palves@redhat.com>
8620
8621 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8622 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8623 allocated.
8624 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8625
8626 2013-09-02 Pierre Muller <muller@sourceware.org>
8627
8628 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8629 or WriteProcessMemory complete successfully and handle
8630 ERROR_PARTIAL_COPY error.
8631
8632 2013-09-02 Pedro Alves <palves@redhat.com>
8633
8634 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8635 error instead of EIO.
8636
8637 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8638
8639 PR server/15604
8640 * linux-low.c: Include filestuff.h.
8641 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8642 * lynx-low.c: Include filestuff.h.
8643 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8644 * server.c: Include filestuff.h.
8645 (main): Call notice_open_fds.
8646 * spu-low.c: Include filestuff.h.
8647 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8648
8649 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8650
8651 * Makefile.in: Explain why ../target and ../nat are not
8652 listed as include file search paths.
8653 (linux-waitpid.o): New object file rule.
8654 * configure.srv (srv_native_linux_obj): New variable.
8655 Replace all occurrences of linux native object files with
8656 $srv_native_linux_obj.
8657 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8658 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8659 (linux_enable_event_reporting): Remove declaration.
8660 (my_waitpid): Moved to common/linux-waitpid.c.
8661 (linux_wait_for_event): Pass ptid when calling
8662 linux_enable_event_reporting.
8663 (linux_supports_tracefork_flag): Remove.
8664 (linux_enable_event_reporting): Likewise.
8665 (linux_tracefork_grandchild): Remove.
8666 (STACK_SIZE): Moved to common/linux-ptrace.c.
8667 (linux_tracefork_child): Remove.
8668 (linux_test_for_tracefork): Remove.
8669 (linux_look_up_symbols): Call linux_supports_traceclone.
8670 (initialize_low): Remove call to linux_test_for_tracefork.
8671 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8672 common/linux-ptrace.h.
8673 (PTRACE_TYPE_ARG4): Likewise.
8674 Include linux-ptrace.h.
8675
8676 2013-08-21 Pedro Alves <palves@redhat.com>
8677
8678 * config.in: Renegerate.
8679
8680 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8681
8682 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8683 (SFILES): Remove $(srcdir)/common/target-common.c and
8684 add $(srcdir)/target/waitstatus.c.
8685 (OBS): Remove target-common.o and add waitstatus.o.
8686 (server_h): Remove $(srcdir)/../common/target-common.h and
8687 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8688 and $(srcdir)/../target/waitstatus.h.
8689 (target-common.o): Remove.
8690 (waitstatus.o): New target object file.
8691 * target.h: Do not include target-common.h and
8692 include target/resume.h, target/wait.h and
8693 target/waitstatus.h.
8694
8695 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8696
8697 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8698 to PTRACE_TYPE_ARG3.
8699 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8700 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8701 PTRACE_TYPE_ARG4.
8702 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8703 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8704
8705 2013-07-27 Jie Zhang <jie@codesourcery.com>
8706 Daniel Jacobowitz <dan@codesourcery.com>
8707 Yao Qi <yao@codesourcery.com>
8708
8709 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8710 (mips-linux-watch.o): New rule.
8711 (mips_linux_watch_h): New variable.
8712 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8713 srv_tgtobj.
8714 * linux-mips-low.c: Include mips-linux-watch.h.
8715 (struct arch_process_info, struct arch_lwp_info): New.
8716 (update_watch_registers_callback): New function.
8717 (mips_linux_new_process, mips_linux_new_thread) New functions.
8718 (mips_linux_prepare_to_resume, mips_insert_point): New
8719 functions.
8720 (mips_remove_point, mips_stopped_by_watchpoint): New
8721 functions.
8722 (rsp_bp_type_to_target_hw_bp_type): New function.
8723 (mips_stopped_data_address): New function.
8724 (the_low_target): Add watchpoint support functions.
8725
8726 2013-07-27 Yao Qi <yao@codesourcery.com>
8727
8728 * i386-low.c: Include break-common.h.
8729 (enum target_hw_bp_type): Remove.
8730
8731 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8732
8733 * Makefile.in (SFILES): /common/target-common.c.
8734 (OBS): Add target-common.o.
8735 (server_h): Add $(srcdir)/../common/target-common.h.
8736 (target-common.o): New target.
8737 * server.c (queue_stop_reply_callback): Free
8738 status string after use.
8739 * target.c (target_waitstatus_to_string): Remove.
8740 * target.h: Include target-common.h.
8741 (resume_kind): Likewise.
8742 (target_waitkind): Likewise.
8743 (target_waitstatus): Likewise.
8744 (TARGET_WNOHANG): Likewise.
8745
8746 2013-07-04 Yao Qi <yao@codesourcery.com>
8747
8748 * Makefile.in (host_alias): Use @host_noncanonical@.
8749 (target_alias): Use @target_noncanonical@.
8750 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8751 ACX_NONCANONICAL_HOST.
8752 * configure: Regenerated.
8753
8754 Revert:
8755 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8756
8757 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8758 * configure: Rebuild.
8759 * Makefile.in (version_host, version_target): Get from configure.
8760 (version.c): Use $(version_host) and $(version_target).
8761
8762 2013-07-03 Pedro Alves <palves@redhat.com>
8763
8764 * Makefile.in (config.status): Depend on development.sh.
8765 * acinclude.m4: Include libmcheck.m4.
8766 * configure: Regenerate.
8767
8768 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8769
8770 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8771 attribute inside the parentheses.
8772 (winapi_DebugSetProcessKillOnExit): Ditto.
8773 (winapi_DebugBreakProcess): Ditto.
8774 (winapi_GenerateConsoleCtrlEvent): Ditto.
8775
8776 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8777
8778 * notif.h (notif_event): Add a dummy member to avoid compiler
8779 errors.
8780
8781 2013-07-01 Pedro Alves <palves@redhat.com>
8782
8783 * hostio.c (HOSTIO_PATH_MAX): Define.
8784 (require_filename, handle_open, handle_unlink, handle_readlink):
8785 Use it.
8786
8787 2013-07-01 Pedro Alves <palves@redhat.com>
8788
8789 * server.h: Include "pathmax.h".
8790 * linux-low.c: Don't include sys/param.h.
8791 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8792 MAXPATHLEN.
8793 * win32-low.c: Don't include sys/param.h.
8794 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8795
8796 2013-07-01 Pedro Alves <palves@redhat.com>
8797
8798 * event-loop.c: Don't check HAVE_UNISTD_H before including
8799 <unistd.h>.
8800 * gdbreplay.c: Likewise.
8801 * remote-utils.c: Likewise.
8802 * server.c: Likewise.
8803 * configure.ac: Don't check for unistd.h.
8804 * configure: Regenerate.
8805
8806 2013-06-28 Tom Tromey <tromey@redhat.com>
8807
8808 * Makefile.in (version.c): Use version.in, not
8809 common/version.in.
8810
8811 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8812
8813 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8814 * configure: Rebuild.
8815 * Makefile.in (version_host, version_target): Get from configure.
8816 (version.c): Use $(version_host) and $(version_target).
8817
8818 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8819
8820 Fix trace-status to output user name without trailing colon.
8821 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8822
8823 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8824
8825 Fix trace-status to output proper start-time and stop-time.
8826 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8827 output start time and stop time in hex as gdb expects.
8828
8829 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8830
8831 * tracepoint.c (build_traceframe_info_xml): Output trace state
8832 variables present in the trace buffer.
8833
8834 2013-06-24 Tom Tromey <tromey@redhat.com>
8835
8836 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8837 create-version.sh.
8838 (version.o): Remove.
8839 * gdbreplay.c: Include version.h.
8840 (version, host_name): Don't declare.
8841 * server.h: Include version.h.
8842 (version, host_name): Don't declare.
8843
8844 2013-06-12 Pedro Alves <palves@redhat.com>
8845
8846 * linux-x86-low.c (linux_is_elf64): Delete global.
8847 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8848 with local linux_pid_exe_is_elf_64_file use.
8849
8850 2013-06-11 Pedro Alves <palves@redhat.com>
8851
8852 * linux-low.c (regset_disabled, disable_regset): New functions.
8853 (regsets_fetch_inferior_registers)
8854 (regsets_store_inferior_registers): Use them.
8855 (initialize_regsets_info); Don't allocate the disabled_regsets
8856 array here.
8857 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8858 comment.
8859
8860 2013-06-11 Pedro Alves <palves@redhat.com>
8861
8862 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8863 xmalloc.
8864
8865 2013-06-11 Pedro Alves <palves@redhat.com>
8866
8867 * linux-x86-low.c (initialize_low_arch): Call
8868 init_registers_x32_avx_linux.
8869
8870 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8871
8872 Fix compatibility with Android Bionic.
8873 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8874 it is not empty.
8875
8876 2013-06-07 Pedro Alves <palves@redhat.com>
8877
8878 PR server/14823
8879 * Makefile.in (OBS): Add tdesc.o.
8880 (IPA_OBJS): Add tdesc-ipa.o.
8881 (tdesc-ipa.o): New rule.
8882 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8883 interface.
8884 * linux-low.c (new_inferior): Delete.
8885 (disabled_regsets, num_regsets): Delete.
8886 (linux_add_process): Adjust to set the new per-process
8887 new_inferior flag.
8888 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8889 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8890 was a stop. When calling arch_setup, switch the current inferior
8891 to the thread that got an event.
8892 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8893 (regsets_fetch_inferior_registers)
8894 (regsets_store_inferior_registers): New regsets_info parameter.
8895 Adjust to use it.
8896 (linux_register_in_regsets): New regs_info parameter. Adjust to
8897 use it.
8898 (register_addr, fetch_register, store_register): New usrregs_info
8899 parameter. Adjust to use it.
8900 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8901 parameter regs_info. Adjust to use it.
8902 (linux_fetch_registers): Get the current inferior's regs_info, and
8903 adjust to use it.
8904 (linux_store_registers): Ditto.
8905 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8906 (initialize_low): Don't initialize the target_regsets here. Call
8907 initialize_low_arch.
8908 * linux-low.h (target_regsets): Delete declaration.
8909 (struct regsets_info): New.
8910 (struct usrregs_info): New.
8911 (struct regs_info): New.
8912 (struct process_info_private) <new_inferior>: New field.
8913 (struct linux_target_ops): Delete the num_regs, regmap, and
8914 regset_bitmap fields. New field regs_info.
8915 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8916 * i387-fp.c (num_xmm_registers): Delete.
8917 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8918 calls to new interface.
8919 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8920 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8921 Infer the number of xmm registers from the regcache's target
8922 description.
8923 * i387-fp.h (num_xmm_registers): Delete.
8924 * inferiors.c (add_thread): Don't install the thread's regcache
8925 here.
8926 * proc-service.c (gregset_info): Fetch the current inferior's
8927 regs_info. Adjust to use it.
8928 * regcache.c: Include tdesc.h.
8929 (register_bytes, reg_defs, num_registers)
8930 (gdbserver_expedite_regs): Delete.
8931 (get_thread_regcache): If the thread doesn't have a regcache yet,
8932 create one, instead of aborting gdbserver.
8933 (regcache_invalidate_one): Rename to ...
8934 (regcache_invalidate_thread): ... this.
8935 (regcache_invalidate_one): New.
8936 (regcache_invalidate): Only invalidate registers of the current
8937 process.
8938 (init_register_cache): Add target_desc parameter, and use it.
8939 (new_register_cache): Ditto. Assert the target description has a
8940 non zero registers_size.
8941 (regcache_cpy): Add assertions. Adjust.
8942 (realloc_register_cache, set_register_cache): Delete.
8943 (registers_to_string, registers_from_string): Adjust.
8944 (find_register_by_name, find_regno, find_register_by_number)
8945 (register_cache_size): Add target_desc parameter, and use it.
8946 (free_register_cache_thread, free_register_cache_thread_one)
8947 (regcache_release, register_cache_size): New.
8948 (register_size): Add target_desc parameter, and use it.
8949 (register_data, supply_register, supply_register_zeroed)
8950 (supply_regblock, supply_register_by_name, collect_register)
8951 (collect_register_as_string, collect_register_by_name): Adjust.
8952 * regcache.h (struct target_desc): Forward declare.
8953 (struct regcache) <tdesc>: New field.
8954 (init_register_cache, new_register_cache): Add target_desc
8955 parameter.
8956 (regcache_invalidate_thread): Declare.
8957 (regcache_invalidate_one): Delete declaration.
8958 (regcache_release): Declare.
8959 (find_register_by_number, register_cache_size, register_size)
8960 (find_regno): Add target_desc parameter.
8961 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8962 declarations.
8963 * remote-utils.c: Include tdesc.h.
8964 (outreg, prepare_resume_reply): Adjust.
8965 * server.c: Include tdesc.h.
8966 (gdbserver_xmltarget): Delete declaration.
8967 (get_features_xml, process_serial_event): Adjust.
8968 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8969 declare.
8970 (struct process_info) <tdesc>: New field.
8971 (ipa_tdesc): Declare.
8972 * tdesc.c: New file.
8973 * tdesc.h: New file.
8974 * tracepoint.c: Include tdesc.h.
8975 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8976 (get_context_regcache): Adjust to pass ipa_tdesc down.
8977 (do_action_at_tracepoint): Adjust to get the register cache size
8978 from the context regcache's description.
8979 (traceframe_walk_blocks): Adjust to get the register cache size
8980 from the current trace frame's description.
8981 (traceframe_get_pc): Adjust to get current trace frame's
8982 description and pass it down.
8983 (gdb_collect): Adjust to get the register cache size from the
8984 IPA's description.
8985 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8986 (gdbserver_xmltarget): Delete.
8987 (initialize_low_tracepoint): Set the ipa's target description.
8988 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8989 (initialize_low_tracepoint): Set the ipa's target description.
8990 * linux-x86-low.c: Include tdesc.h.
8991 [__x86_64__] (is_64bit_tdesc): New.
8992 (ps_get_thread_area, x86_get_thread_area): Use it.
8993 (i386_cannot_store_register): Rename to ...
8994 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8995 (i386_cannot_fetch_register): Rename to ...
8996 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8997 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8998 to new interface.
8999 (target_regsets): Rename to ...
9000 (x86_regsets): ... this.
9001 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
9002 interface.
9003 (x86_siginfo_fixup): Use is_64bit_tdesc.
9004 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
9005 (tdesc_x32_avx_linux, tdesc_x32_linux)
9006 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
9007 Declare.
9008 (x86_linux_update_xmltarget): Delete.
9009 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
9010 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
9011 (AMD64_LINUX_USER64_CS): New.
9012 (x86_linux_read_description): New, based on
9013 x86_linux_update_xmltarget.
9014 (same_process_callback): New.
9015 (x86_arch_setup_process_callback): New.
9016 (x86_linux_update_xmltarget): New.
9017 (x86_regsets_info): New.
9018 (amd64_linux_regs_info): New.
9019 (i386_linux_usrregs_info): New.
9020 (i386_linux_regs_info): New.
9021 (x86_linux_regs_info): New.
9022 (x86_arch_setup): Reimplement.
9023 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
9024 (x86_emit_ops): Ditto.
9025 (the_low_target): Adjust. Install x86_linux_regs_info,
9026 x86_cannot_fetch_register, and x86_cannot_store_register.
9027 (initialize_low_arch): New.
9028 * linux-ia64-low.c (tdesc_ia64): Declare.
9029 (ia64_fetch_register): Adjust.
9030 (ia64_usrregs_info, regs_info): New globals.
9031 (ia64_regs_info): New function.
9032 (the_low_target): Adjust.
9033 (initialize_low_arch): New function.
9034 * linux-sparc-low.c (tdesc_sparc64): Declare.
9035 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
9036 Adjust.
9037 (sparc_arch_setup): New function.
9038 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
9039 (the_low_target): Adjust.
9040 (initialize_low_arch): New function.
9041 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
9042 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
9043 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
9044 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
9045 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
9046 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
9047 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
9048 (tdesc_powerpc_isa205_vsx64l): Declare.
9049 (ppc_cannot_store_register, ppc_collect_ptrace_register)
9050 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
9051 (ppc_set_pc, ppc_get_hwcap): Adjust.
9052 (ppc_usrregs_info): Forward declare.
9053 (!__powerpc64__) ppc_regmap_adjusted: New global.
9054 (ppc_arch_setup): Adjust to the current process'es target
9055 description.
9056 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
9057 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
9058 (ppc_store_evrregset): Adjust.
9059 (target_regsets): Rename to ...
9060 (ppc_regsets): ... this, and make static.
9061 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
9062 (ppc_regs_info): New function.
9063 (the_low_target): Adjust.
9064 (initialize_low_arch): New function.
9065 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
9066 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
9067 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
9068 (tdesc_s390x_linux64v2): Declare.
9069 (s390_collect_ptrace_register, s390_supply_ptrace_register)
9070 (s390_fill_gregset, s390_store_last_break): Adjust.
9071 (target_regsets): Rename to ...
9072 (s390_regsets): ... this, and make static.
9073 (s390_get_pc, s390_set_pc): Adjust.
9074 (s390_get_hwcap): New target_desc parameter, and use it.
9075 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9076 (s390_arch_setup): Adjust to set the current process'es target
9077 description. Don't adjust the regmap.
9078 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9079 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9080 (regs_info_3264): New globals.
9081 (s390_regs_info): New function.
9082 (the_low_target): Adjust.
9083 (initialize_low_arch): New function.
9084 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9085 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9086 [__mips64] (init_registers_mips_linux)
9087 (init_registers_mips_dsp_linux): Delete defines.
9088 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9089 (have_dsp): New global.
9090 (mips_read_description): New, based on mips_arch_setup.
9091 (mips_arch_setup): Reimplement.
9092 (get_usrregs_info): New function.
9093 (mips_cannot_fetch_register, mips_cannot_store_register)
9094 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9095 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9096 (target_regsets): Rename to ...
9097 (mips_regsets): ... this, and make static.
9098 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9099 (dsp_regs_info, regs_info): New globals.
9100 (mips_regs_info): New function.
9101 (the_low_target): Adjust.
9102 (initialize_low_arch): New function.
9103 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9104 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9105 Declare.
9106 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9107 (arm_read_description): New, with bits factored from
9108 arm_arch_setup.
9109 (arm_arch_setup): Reimplement.
9110 (target_regsets): Rename to ...
9111 (arm_regsets): ... this, and make static.
9112 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9113 (arm_regs_info): New function.
9114 (the_low_target): Adjust.
9115 (initialize_low_arch): New function.
9116 * linux-m68k-low.c (tdesc_m68k): Declare.
9117 (target_regsets): Rename to ...
9118 (m68k_regsets): ... this, and make static.
9119 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9120 (m68k_regs_info): New function.
9121 (m68k_arch_setup): New function.
9122 (the_low_target): Adjust.
9123 (initialize_low_arch): New function.
9124 * linux-sh-low.c (tdesc_sharch): Declare.
9125 (target_regsets): Rename to ...
9126 (sh_regsets): ... this, and make static.
9127 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9128 (sh_regs_info, sh_arch_setup): New functions.
9129 (the_low_target): Adjust.
9130 (initialize_low_arch): New function.
9131 * linux-bfin-low.c (tdesc_bfin): Declare.
9132 (bfin_arch_setup): New function.
9133 (bfin_usrregs_info, regs_info): New globals.
9134 (bfin_regs_info): New function.
9135 (the_low_target): Adjust.
9136 (initialize_low_arch): New function.
9137 * linux-cris-low.c (tdesc_cris): Declare.
9138 (cris_arch_setup): New function.
9139 (cris_usrregs_info, regs_info): New globals.
9140 (cris_regs_info): New function.
9141 (the_low_target): Adjust.
9142 (initialize_low_arch): New function.
9143 * linux-cris-low.c (tdesc_crisv32): Declare.
9144 (cris_arch_setup): New function.
9145 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9146 (cris_regs_info): New function.
9147 (the_low_target): Adjust.
9148 (initialize_low_arch): New function.
9149 * linux-m32r-low.c (tdesc_m32r): Declare.
9150 (m32r_arch_setup): New function.
9151 (m32r_usrregs_info, regs_info): New globals.
9152 (m32r_regs_info): Adjust.
9153 (initialize_low_arch): New function.
9154 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9155 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9156 (tic6x_usrregs_info): Forward declare.
9157 (tic6x_read_description): New function, based on ...
9158 (tic6x_arch_setup): ... this. Reimplement.
9159 (target_regsets): Rename to ...
9160 (tic6x_regsets): ... this, and make static.
9161 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9162 (tic6x_regs_info): New function.
9163 (the_low_target): Adjust.
9164 (initialize_low_arch): New function.
9165 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9166 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9167 (target_regsets): Rename to ...
9168 (xtensa_regsets): ... this, and make static.
9169 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9170 globals.
9171 (xtensa_arch_setup, xtensa_regs_info): New functions.
9172 (the_low_target): Adjust.
9173 (initialize_low_arch): New function.
9174 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9175 (nios2_arch_setup): Set the current process'es tdesc.
9176 (target_regsets): Rename to ...
9177 (nios2_regsets): ... this.
9178 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9179 (nios2_regs_info): New function.
9180 (the_low_target): Adjust.
9181 (initialize_low_arch): New function.
9182 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9183 (aarch64_arch_setup): Set the current process'es tdesc.
9184 (target_regsets): Rename to ...
9185 (aarch64_regsets): ... this.
9186 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9187 (aarch64_regs_info): New function.
9188 (the_low_target): Adjust.
9189 (initialize_low_arch): New function.
9190 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9191 globals.
9192 (target_regsets): Rename to ...
9193 (tile_regsets): ... this.
9194 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9195 (tile_regs_info): New function.
9196 (tile_arch_setup): Set the current process'es tdesc.
9197 (the_low_target): Adjust.
9198 (initialize_low_arch): New function.
9199 * spu-low.c (tdesc_spu): Declare.
9200 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9201 * win32-arm-low.c (tdesc_arm): Declare.
9202 (arm_arch_setup): New function.
9203 (the_low_target): Install arm_arch_setup instead of
9204 init_registers_arm.
9205 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9206 (init_windows_x86): Rename to ...
9207 (i386_arch_setup): ... this. Set `win32_tdesc'.
9208 (the_low_target): Adjust.
9209 * win32-low.c (win32_tdesc): New global.
9210 (child_add_thread): Don't create the thread cache here.
9211 (do_initial_child_stuff): Set the new process'es tdesc.
9212 * win32-low.h (struct target_desc): Forward declare.
9213 (win32_tdesc): Declare.
9214 * lynx-i386-low.c (tdesc_i386): Declare global.
9215 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9216 * lynx-low.c (lynx_tdesc): New global.
9217 (lynx_add_process): Set the new process'es tdesc.
9218 * lynx-low.h (struct target_desc): Forward declare.
9219 (lynx_tdesc): Declare global.
9220 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9221 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9222 * nto-low.c (nto_tdesc): New global.
9223 (do_attach): Set the new process'es tdesc.
9224 * nto-low.h (struct target_desc): Forward declare.
9225 (nto_tdesc): Declare.
9226 * nto-x86-low.c (tdesc_i386): Declare.
9227 (nto_x86_arch_setup): Set `nto_tdesc'.
9228
9229 2013-06-04 Gary Benson <gbenson@redhat.com>
9230
9231 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9232 to qSupported response when appropriate.
9233 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9234 with nonzero-length annex.
9235 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9236 arguments supplied in annex.
9237
9238 2013-05-31 Doug Evans <dje@google.com>
9239
9240 PR server/15594
9241 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9242 64 bits in 64-cross-32 environment.
9243
9244 2013-05-28 Pedro Alves <palves@redhat.com>
9245
9246 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9247 (aarch64-without-fpu.c): Delete rule.
9248 * configure.srv (aarch64*-*-linux*): Remove references to
9249 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9250 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9251 declaration.
9252
9253 2013-05-24 Pedro Alves <palves@redhat.com>
9254
9255 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9256 instead of strchr/decode_address. Error if the range isn't split
9257 with a ','. Don't assume there's be a ':' in the action.
9258
9259 2013-05-23 Yao Qi <yao@codesourcery.com>
9260 Pedro Alves <palves@redhat.com>
9261
9262 * linux-low.c (lwp_in_step_range): New function.
9263 (linux_wait_1): If the thread was range stepping and stopped
9264 outside the stepping range, report the stop to GDB. Otherwise,
9265 continue stepping. Add range stepping debug output.
9266 (linux_set_resume_request): Copy the step range from the resume
9267 request to the lwp.
9268 (linux_supports_range_stepping): New.
9269 (linux_target_ops) <supports_range_stepping>: Set to
9270 linux_supports_range_stepping.
9271 * linux-low.h (struct linux_target_ops)
9272 <supports_range_stepping>: New field.
9273 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9274 * linux-x86-low.c (x86_supports_range_stepping): New.
9275 (the_low_target) <supports_range_stepping>: Set to
9276 x86_supports_range_stepping.
9277 * server.c (handle_v_cont): Handle 'r' action.
9278 (handle_v_requests): Append ";r" if the target supports range
9279 stepping.
9280 * target.h (struct thread_resume) <step_range_start,
9281 step_range_end>: New fields.
9282 (struct target_ops) <supports_range_stepping>:
9283 New field.
9284 (target_supports_range_stepping): New macro.
9285
9286 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9287
9288 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9289 confusion in comment.
9290
9291 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9292
9293 * lynx-low.c (struct process_info_private): New type.
9294 (lynx_add_process): New function.
9295 (lynx_create_inferior, lynx_attach): Replace calls to
9296 add_process by calls to lynx_add_process.
9297 (lynx_resume): If PTID is null, then try using
9298 current_process()->private->last_wait_event_ptid.
9299 Add comments.
9300 (lynx_clear_inferiors): Delete. The contents of that function
9301 has been inlined in lynx_mourn;
9302 (lynx_wait_1): Save the ptid in the process's private data.
9303 (lynx_mourn): Free the process' private data. Replace call
9304 to lynx_clear_inferiors by call to clear_inferiors.
9305
9306 2013-05-17 Yao Qi <yao@codesourcery.com>
9307
9308 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9309 the right place.
9310
9311 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9312
9313 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9314 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9315 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9316 PT_TEXT_END_ADDR guards. Update comments.
9317 (linux_target_op) <read_offsets>: Conditionally define to
9318 linux_read_offsets if the target is UCLIBC and if it defines
9319 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9320
9321 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9322 Andrew Jenner <andrew@codesourcery.com>
9323
9324 * Makefile.in (SFILES): Add linux-nios2-low.c.
9325 (clean): Add action to delete nios2-linux.c.
9326 (nios2-linux.c): New rule.
9327 * configure.srv: Add nios2*-*-linux*.
9328 * linux-nios2-low.c: New.
9329
9330 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9331
9332 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9333
9334 2013-04-25 Hui Zhu <hui@codesourcery.com>
9335
9336 PR gdb/15186
9337 * ax.c (ax_printf): Add fflush.
9338
9339 2013-04-22 Tom Tromey <tromey@redhat.com>
9340
9341 * Makefile.in (SFILES): Add filestuff.c.
9342 (OBS): Add filestuff.o.
9343 (filestuff.o): New target.
9344 * config.in, configure: Rebuild.
9345 * configure.ac: Check for fdwalk, pipe2.
9346
9347 2013-04-17 Pedro Alves <palves@redhat.com>
9348
9349 * configure.ac (USE_THREAD_DB): Delete variable.
9350 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9351 Don't AC_SUBST USE_THREAD_DB.
9352 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9353 * config.in, configure: Regenerate.
9354
9355 2013-04-16 Pedro Alves <palves@redhat.com>
9356
9357 * linux-low.h (struct lwp_info) <thread_known>: Move under
9358 the USE_THREAD_DB #ifdef.
9359
9360 2013-04-16 Pedro Alves <palves@redhat.com>
9361
9362 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9363 (linux-low.o): Delete rule.
9364 * linux-low.h: Always include "gdb_thread_db.h" instead of
9365 conditionally including thread_db.h.
9366 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9367 HAVE_THREAD_DB_H.
9368
9369 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9370
9371 * Makefile.in (install-only): Fix make install regression.
9372
9373 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9374
9375 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9376 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9377 installation.
9378 * gdbserver.1: Remove.
9379
9380 2013-03-22 Pedro Alves <palves@redhat.com>
9381
9382 * linux-low.c (handle_extended_wait): Don't call
9383 linux_enable_event_reporting.
9384
9385 2013-03-15 Tony Theodore <tonyt@logyst.com>
9386
9387 PR build/9098:
9388 * Makefile.in (SHELL): Use @SHELL@.
9389
9390 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9391
9392 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9393 compiler warning.
9394
9395 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9396
9397 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9398 Remove extraneous NULL element.
9399
9400 2013-03-13 Yao Qi <yao@codesourcery.com>
9401
9402 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9403 'V' block in trace frame.
9404
9405 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9406
9407 * target.h (struct target_ops): Add btrace ops.
9408 (target_supports_btrace): New macro.
9409 (target_enable_btrace): New macro.
9410 (target_disable_btrace): New macro.
9411 (target_read_btrace): New macro.
9412 * gdbthread.h (struct thread_info): Add btrace field.
9413 * server.c: Include btrace-common.h.
9414 (handle_btrace_general_set): New function.
9415 (handle_btrace_enable): New function.
9416 (handle_btrace_disable): New function.
9417 (handle_general_set): Call handle_btrace_general_set.
9418 (handle_qxfer_btrace): New function.
9419 (struct qxfer qxfer_packets[]): Add btrace entry.
9420 * inferiors.c (remove_thread): Disable btrace.
9421 * linux-low: Include linux-btrace.h.
9422 (linux_low_enable_btrace): New function.
9423 (linux_low_read_btrace): New function.
9424 (linux_target_ops): Add btrace ops.
9425 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9426 Add srv_linux_btrace=yes.
9427 (x86_64-*-linux*): Add linux-btrace.o.
9428 Add srv_linux_btrace=yes.
9429 * configure.ac: Define HAVE_LINUX_BTRACE.
9430 * config.in: Regenerated.
9431 * configure: Regenerated.
9432
9433 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9434
9435 * server.c (handle_qxfer): Preserve error message if -3 is
9436 returned.
9437 (qxfer): Document the -3 return value.
9438
9439 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9440
9441 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9442 (linux_btrace_h): New variable.
9443 (linux-btrace.o): New rule.
9444
9445 2013-03-08 Stan Shebs <stan@codesourcery.com>
9446 Hafiz Abid Qadeer <abidh@codesourcery.com>
9447
9448 * tracepoint.c (trace_buffer_size): New global.
9449 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9450 (init_trace_buffer): Change to one-argument function. Allocate
9451 trace buffer memory.
9452 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9453 handle QTBuffer:size packet.
9454 (cmd_bigqtbuffer_size): New function.
9455 (initialize_tracepoint): Call init_trace_buffer with
9456 DEFAULT_TRACE_BUFFER_SIZE.
9457 * server.c (handle_query): Add QTBuffer:size in the
9458 supported packets.
9459
9460 2013-03-07 Yao Qi <yao@codesourcery.com>
9461
9462 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9463 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9464 of -1.
9465 (cmd_qtsp): Adjust condition. Do post increment.
9466 Set cur_action and cur_step_action back to 0.
9467
9468 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9469
9470 PR server/15236
9471 * linux-low.c (linux_write_memory): Return early success if LEN is
9472 zero.
9473
9474 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9475
9476 * configure.srv: Add x86_64-*-cygwin* as target.
9477
9478 2013-02-28 Tom Tromey <tromey@redhat.com>
9479
9480 * configure.ac: Invoke AC_SYS_LARGEFILE.
9481 * configure, config.in: Rebuild.
9482
9483 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9484
9485 * win32-low.c: Throughout, fix format strings and casts of
9486 printf-like functions to avoid type related warnings on all
9487 platforms.
9488 (get_child_debug_event): Print dwDebugEventCode as hex since
9489 that's how it's usually documented.
9490
9491 2013-02-28 Yao Qi <yao@codesourcery.com>
9492
9493 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9494 pulongest.
9495
9496 2013-02-27 Jiong Wang <jiwang@tilera.com>
9497
9498 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9499 (reg-tilegx32.c): New rule.
9500 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9501 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9502 different register info initializer according to elf class.
9503 (init_registers_tilgx32): New function. The tilegx32 register info
9504 initializer.
9505 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9506 (tile_store_gregset): Likewise.
9507
9508 2013-02-27 Yao Qi <yao@codesourcery.com>
9509
9510 * server.c (process_point_options): Print debug message when
9511 debug_threads is true.
9512
9513 2013-02-26 Yao Qi <yao@codesourcery.com>
9514
9515 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9516
9517 2013-02-19 Pedro Alves <palves@redhat.com>
9518 Kai Tietz <ktietz@redhat.com>
9519
9520 PR gdb/15161
9521
9522 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9523 instead of strtoul to extract address from packet.
9524 (process_serial_event) <'z'>: Likewise.
9525
9526 2013-02-18 Yao Qi <yao@codesourcery.com>
9527
9528 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9529
9530 2013-02-14 Pedro Alves <palves@redhat.com>
9531
9532 Plug memory leak.
9533
9534 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9535 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9536
9537 2013-02-14 Pedro Alves <palves@redhat.com>
9538
9539 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9540
9541 2013-02-14 Pedro Alves <palves@redhat.com>
9542
9543 * tracepoint.c (save_string): Delete.
9544 (add_tracepoint_action): Use savestring instead of save_string.
9545
9546 2013-02-12 Pedro Alves <palves@redhat.com>
9547
9548 * linux-xtensa-low.c: Ditto.
9549 * xtensa-xtregs.c: Ditto.
9550
9551 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9552
9553 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9554 thread_db.
9555
9556 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9557
9558 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9559 aarch64_num_wp_regs and aarch64_num_bp_regs to
9560 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9561
9562 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9563
9564 * linux-aarch64-low.c (ps_get_thread_area): Replace
9565 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9566
9567 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9568 Marcus Shawcroft <marcus.shawcroft@arm.com>
9569 Nigel Stephens <nigel.stephens@arm.com>
9570 Yufeng Zhang <yufeng.zhang@arm.com>
9571
9572 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9573 (aarch64.c, aarch64-without-fpu.c): New targets.
9574 * configure.srv (aarch64*-*-linux*): New.
9575 * linux-aarch64-low.c: New file.
9576
9577 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9578
9579 * linux-low.c (handle_extended_wait, linux_create_inferior)
9580 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9581 (dequeue_one_deferred_signal, linux_resume_one_thread)
9582 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9583 (linux_tracefork_grandchild, linux_test_for_tracefork)
9584 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9585 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9586 where the argument is 0.
9587
9588 2013-01-25 Yao Qi <yao@codesourcery.com>
9589
9590 * event-loop.c: Include "queue.h".
9591 (gdb_event_p): New typedef.
9592 (struct gdb_event) <next_event>: Remove.
9593 (event_queue): Change to QUEUE(gdb_event_p).
9594 (async_queue_event): Remove.
9595 (gdb_event_xfree): New.
9596 (initialize_event_loop): New.
9597 (process_event): Use API from QUEUE.
9598 (wait_for_event): Likewise.
9599 * server.c (main): Call initialize_event_loop.
9600 * server.h (initialize_event_loop): Declare.
9601
9602 2013-01-18 Yao Qi <yao@codesourcery.com>
9603
9604 * ax.h (struct eval_agent_expr_context): New.
9605 (gdb_eval_agent_expr): Update declaration.
9606 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9607 TFRAME. Add new argument CTX.
9608 * server.h (struct eval_agent_expr_context): Declare.
9609 (agent_mem_read, agent_tsv_read): Update declaration.
9610 (agent_mem_read_string): Likewise.
9611 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9612 (add_traceframe_block): Add new argument TPOINT.
9613 Increase TPOINT->traceframe_usage.
9614 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9615 eval_tracepoint_agent_expr.
9616 (condition_true_at_tracepoint): Likewise.
9617 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9618 (agent_mem_read_string, agent_tsv_read): Likewise.
9619
9620 2013-01-16 Yao Qi <yao@codesourcery.com>
9621
9622 * linux-low.c (linux_resume_one_lwp): Don't check
9623 'lwp->bp_reinsert != 0'.
9624
9625 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9626 Pedro Alves <palves@redhat.com>
9627
9628 * lynx-low.c (ptrace_request_to_str): Define a temporary
9629 macro and use it to simplify this function's implementation.
9630
9631 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9632
9633 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9634 sets errno.
9635
9636 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9637
9638 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9639
9640 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9641
9642 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9643
9644 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9645
9646 * lynx-low.c (lynx_resume): Use the resume_info parameter
9647 to determine the ptid for the lynx_ptrace call, unless
9648 it is equal to minus_one_ptid, in which case we use the
9649 ptid of the current_inferior.
9650 (lynx_wait_1): After having received a thread create/exit
9651 event, resume the inferior's execution using the signaling
9652 thread's ptid, rather than the old ptid.
9653
9654 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9655
9656 * lynx-low.c (lynx_resume): Delete variable ret.
9657
9658 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9659
9660 * gdbreplay.c (gdbreplay_version): Update copyright year.
9661 * server.c (gdbserver_version): Likewise.
9662
9663 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9664
9665 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9666 new thread.
9667
9668 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9669
9670 * lynx-low.c (ptrace_request_to_str): Add handling for
9671 PTRACE_GETTRACESIG.
9672
9673 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9674
9675 * lynx-low.c (lynx_attach): Delete variable new_process.
9676
9677 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9678
9679 * lynx-low.c (lynx_create_inferior): Delete variable
9680 new_process.
9681
9682 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9683
9684 * lynx-low.c (ptrace_request_to_str): Do not handle
9685 PTRACE_GETTHREADLIST if this macro does not exist.
9686
9687 2012-12-15 Yao Qi <yao@codesourcery.com>
9688
9689 * Makefile.in (OBS): Add notif.o.
9690 * notif.c, notif.h: New.
9691 * server.c: Include "notif.h".
9692 (struct vstop_notif) <next>: Remove.
9693 <base>: New field.
9694 (queue_stop_reply): Update.
9695 (push_event, send_next_stop_reply): Remove.
9696 (discard_queued_stop_replies): Update.
9697 (notif_stop): New variable.
9698 (handle_v_stopped): Remove.
9699 (handle_v_requests): Don't call handle_v_stopped. Call
9700 handle_ack_notif instead.
9701 (queue_stop_reply_callback): Call notif_event_enque instead
9702 of queue_stop_reply.
9703 (handle_status): Don't call send_next_stop_reply, call
9704 notif_write_event instead.
9705 (kill_inferior_callback): Likewise.
9706 (detach_or_kill_inferior_callback): Likewise.
9707 (main): Call initialize_notif.
9708 (process_serial_event): Call QUEUE_is_empty.
9709 (handle_target_event): Call notif_push instead of push event.
9710 * server.h (push_event): Remove declaration.
9711
9712 2012-12-10 Tom Tromey <tromey@redhat.com>
9713
9714 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9715 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9716 macros.
9717 (.c.o): Rewrite.
9718 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9719 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9720 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9721 (amd64-linux-ipa.o, ax.o): Rewrite.
9722 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9723 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9724 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9725 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9726 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9727 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9728 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9729 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9730 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9731 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9732 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9733 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9734 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9735 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9736 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9737 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9738 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9739 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9740 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9741 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9742 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9743 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9744 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9745 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9746 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9747 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9748 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9749 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9750 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9751 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9752 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9753 (reg-tilegx.o): Remove.
9754 (all_object_files): New macro.
9755 Include .deps files.
9756 * aclocal.m4, configure: Rebuild.
9757 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9758 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9759 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9760
9761 2012-12-05 Tom Tromey <tromey@redhat.com>
9762
9763 PR gdb/14917:
9764 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9765
9766 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9767
9768 * configure.ac: Check for linux/perf_event.h.
9769 * config.in: Regenerated.
9770 * configure: Regenerated.
9771
9772 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9773
9774 * hostio.c (handle_readlink): Decrease buffer size
9775 parameter passed to readlink by one byte.
9776
9777 2012-11-26 Yao Qi <yao@codesourcery.com>
9778
9779 * configure.ac (build_warnings): Append '-Wempty-body'.
9780 * configure: Regenerated.
9781 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9782 body.
9783
9784 2012-11-15 Pierre Muller <muller@sourceware.org>
9785
9786 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9787 * config.in: Regenerate.
9788 * configure: Regenerate.
9789 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9790 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9791 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9792 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9793 header.
9794 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9795 instead of <sys/wait.h> header.
9796 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9797
9798 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9799
9800 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9801 (various make rules): Remove -DGDBSERVER
9802
9803 2012-11-09 Yao Qi <yao@codesourcery.com>
9804
9805 * spu-low.c (current_ptid): Move it to ..
9806 * gdbthread.h: ... here. New.
9807 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9808 * server.c (myresume, process_serial_event): Likewise.
9809 * thread-db.c (thread_db_find_new_threads): Likewise.
9810 * tracepoint.c (run_inferior_command): Likewise.
9811
9812 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9813
9814 * server.c (handle_search_memory_1): Include access length in
9815 warning message.
9816
9817 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9818
9819 * linux-crisv32-low.c: Fix compile errors.
9820
9821 2012-09-04 Yao Qi <yao@codesourcery.com>
9822
9823 * tracepoint.c (cmd_qtsv): Adjust debug message.
9824 Don't check CUR_TPOINT.
9825
9826 2012-08-28 Yao Qi <yao@codesourcery.com>
9827
9828 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9829 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9830 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9831 Remove declarations of xmalloc, xreallloc, xstrdup and
9832 freeargv.
9833 * Makefile.in (libiberty_h): New.
9834 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9835 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9836
9837 2012-08-23 Yao Qi <yao@codesourcery.com>
9838
9839 * server.h: Remove declaration of 'xsnprintf'.
9840
9841 2012-08-22 Keith Seitz <keiths@redhat.com>
9842
9843 * server.h: Include build-gnulib-gbserver/config.h.
9844 * gdbreplay.c: Likewise.
9845
9846 2012-08-08 Doug Evans <dje@google.com>
9847
9848 * Makefile.in (SFILES): Add gdb_vecs.c.
9849 (OBS): Add gdb_vecs.o.
9850 (gdb_vecs_h, host_defs_h): New variables.
9851 (thread-db.o): Add $(gdb_vecs_h) dependency.
9852 (gdb_vecs.o): New rule.
9853 * thread-db.c: #include "gdb_vecs.h".
9854 (thread_db_load_search): Use a vector to iterate over path elements.
9855 Handle text appearing after "$pdir".
9856
9857 * configure.ac: Add check for strstr.
9858 * config.in: Regenerate.
9859 * configure: Regenerate.
9860
9861 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9862
9863 * hostio.c (handle_pread): If pread fails, fall back to attempting
9864 lseek/read.
9865 (handle_pwrite): Likewise for pwrite.
9866
9867 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9868
9869 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9870 between unsupported TYPE and unimplementable ADDR/LEN combination.
9871 (arm_insert_point): Act on new return value.
9872
9873 2012-07-31 Pedro Alves <palves@redhat.com>
9874
9875 * server.c (process_point_options): Only skip tokens if we find
9876 one that is unrecognized. Don't treat 'X' specially while
9877 skipping unrecognized tokens.
9878
9879 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9880
9881 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9882 to 4-byte-align HW breakpoint addresses for Thumb.
9883
9884 2012-07-27 Yao Qi <yao@codesourcery.com>
9885
9886 PR remote/14161.
9887
9888 * server.h: Declare gdb_agent_about_to_close.
9889 * target.c (kill_inferior): Include "agent.h".
9890 New. Send command 'kill'.
9891 * target.h (kill_inferior): Removed macro.
9892 * tracepoint.c (gdb_agent_about_to_close): New.
9893 (gdb_agent_helper_thread): Handle command 'close'.
9894 Wait endlessly until the inferior stops.
9895 Install gdb_agent_remove_socket to atexit hook.
9896 (agent_socket_name): New static variable.
9897 (gdb_agent_socket_init): Replace local variable 'name' with
9898 'agent_socket_name'.
9899 (gdb_agent_remove_socket): New.
9900
9901 2012-07-27 Yao Qi <yao@codesourcery.com>
9902
9903 * server.c (process_point_options): Stop at 'X' when parsing.
9904
9905 2012-07-19 Michael Eager <eager@eagercon.com>
9906
9907 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9908 to hw_execute.
9909 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9910 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9911 hardware breakpoint.
9912
9913 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9914
9915 * gdbserver/linux-low.c (initialize_low): Call
9916 linux_ptrace_init_warnings.
9917
9918 2012-07-02 Doug Evans <dje@google.com>
9919
9920 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9921 pointer to int.
9922
9923 2012-07-02 Stan Shebs <stan@codesourcery.com>
9924
9925 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9926 (ax.o): Add it to build rule.
9927 (ax-ipa.o): Ditto.
9928 (OBS): Add format.o.
9929 (IPA_OBS): Add format.o.
9930 * server.c (handle_query): Claim support for breakpoint commands.
9931 (process_point_options): Add command case.
9932 (process_serial_event): Leave running if there are printfs in
9933 effect.
9934 * mem-break.h (any_persistent_commands): Declare.
9935 (add_breakpoint_commands): Declare.
9936 (gdb_no_commands_at_breakpoint): Declare.
9937 (run_breakpoint_commands): Declare.
9938 * mem-break.c (struct point_command_list): New struct.
9939 (struct breakpoint): New field command_list.
9940 (any_persistent_commands): New function.
9941 (add_commands_to_breakpoint): New function.
9942 (add_breakpoint_commands): New function.
9943 (gdb_no_commands_at_breakpoint): New function.
9944 (run_breakpoint_commands): New function.
9945 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9946 locally.
9947 * ax.c: Include format.h.
9948 (ax_printf): New function.
9949 (gdb_eval_agent_expr): Add printf opcode.
9950
9951 2012-06-13 Yao Qi <yao@codesourcery.com>
9952
9953 * server.c (start_inferior): Remove duplicated writes to fields
9954 'last_resume_kind' and 'last_status' of 'current_inferior'.
9955
9956 2012-06-12 Yao Qi <yao@codesourcery.com>
9957 Pedro Alves <palves@redhat.com>
9958
9959 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9960 comment.
9961 * server.c (handle_v_cont): Extend comment.
9962
9963 2012-06-11 Yao Qi <yao@codesourcery.com>
9964
9965 * linux-low.c (linux_attach): Add 'static'.
9966
9967 2012-06-06 Yao Qi <yao@codesourcery.com>
9968
9969 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9970
9971 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9972
9973 Fix gcc -flto compilation warning.
9974 * server.c (main): Make variable multi_mode and attach volatile.
9975
9976 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9977
9978 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9979 if the platform doesn't know about it.
9980
9981 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9982
9983 * Makefile.in (SFILES): Add linux-tile-low.c.
9984 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9985 * configure.srv: Handle tilegx-*-linux*.
9986 * linux-tile-low.c: New file.
9987
9988 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9989
9990 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9991
9992 2012-05-24 Pedro Alves <palves@redhat.com>
9993
9994 PR gdb/7205
9995
9996 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9997
9998 2012-05-24 Pedro Alves <palves@redhat.com>
9999
10000 PR gdb/7205
10001
10002 Replace target_signal with gdb_signal throughout.
10003
10004 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
10005
10006 * linux-low.c (linux_store_registers): Avoid the copying sequence
10007 when no data has been retrieved by ptrace.
10008
10009 2012-05-22 Will Deacon <will.deacon@arm.com>
10010
10011 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
10012 Include asm/ptrace.h.
10013 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
10014 already defined.
10015
10016 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
10017
10018 * linux-low.c (linux_store_registers): Don't re-retrieve data
10019 with ptrace that has already been obtained from /proc. Always
10020 copy any data retrieved with ptrace to the buffer supplied.
10021
10022 2012-05-11 Yao Qi <yao@codesourcery.com>
10023 Pedro Alves <palves@redhat.com>
10024
10025 * linux-low.c (enum stopping_threads_kind): New.
10026 (stopping_threads): Change type to `enum stopping_threads_kind'.
10027 (handle_extended_wait): If stopping and suspending threads, leave
10028 the new_lwp suspended too.
10029 (linux_wait_for_event): Adjust.
10030 (stop_all_lwps): Set `stopping_threads' to
10031 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
10032 whether we're suspending threads or just stopping them. Assert no
10033 recursion happens.
10034
10035 2012-04-29 Yao Qi <yao@codesourcery.com>
10036
10037 * server.h: Move some code to ...
10038 * gdbthread.h: ... here. New.
10039 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
10040 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
10041 (nto-low.o, win32-low.o): Likewise.
10042 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
10043 * regcache.c, remote-utils.c, server.c: Likewise.
10044 * target.c, tracepoint.c, win32-low.c: Likewise.
10045
10046 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10047
10048 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
10049 (PTRACE_ARG4_TYPE): Likewise.
10050 (PTRACE_XFER_TYPE): Likewise.
10051 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
10052 ptrace to PTRACE_ARG3_TYPE.
10053 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
10054 (PTRACE_ARG4_TYPE): Likewise.
10055 (PTRACE_XFER_TYPE): Likewise.
10056 (linux_detach_one_lwp): Cast fourth argument of
10057 ptrace to long then PTRACE_ARG4_TYPE.
10058 (regsets_fetch_inferior_registers): Cast third argument of
10059 ptrace to long then PTRACE_ARG3_TYPE.
10060 (regsets_store_inferior_registers): Likewise.
10061
10062 2012-04-20 Pedro Alves <palves@redhat.com>
10063
10064 * configure: Regenerate.
10065
10066 2012-04-19 Pedro Alves <palves@redhat.com>
10067
10068 * Makefile.in (GNULIB_BUILDDIR): New.
10069 (LIBGNU, INCGNU, GNULIB_H): Adjust.
10070 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
10071 (all, install-only, uninstall, clean-info, all-lib, clean): No
10072 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
10073 (maintainer-clean realclean distclean): Use subdir_do.
10074 (subdir_do): New.
10075 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10076 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10077 * acinclude.m4: Include acx_configure_dir.m4.
10078 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10079 calls. Call AC_PROG_RANLIB. Configure gnulib using
10080 ACX_CONFIGURE_DIR.
10081 (GNULIB): New.
10082 (GNULIB_STDINT_H): Adjust.
10083 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10084 * gdbreplay.c: Include build-gnulib/config.h.
10085 * server.h: Likewise.
10086 * aclocal.m4: Regenerate.
10087 * config.in: Regenerate.
10088 * configure: Regenerate.
10089
10090 2012-04-19 Pedro Alves <palves@redhat.com>
10091
10092 * Makefile.in (LIBGNU, INCGNU): Adjust.
10093 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10094 (all, install-only, uninstall, clean-info, all-lib, clean)
10095 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10096 * configure.ac: Adjust AC_OUTPUT output.
10097 * aclocal.m4: Regenerate.
10098 * configure: Regenerate.
10099
10100 2012-04-19 Pedro Alves <palves@redhat.com>
10101
10102 * Makefile.in (generated_files): New.
10103 (server_h): Remove the explicit dependency on config.h, and depend
10104 on $generated_files.
10105
10106 2012-04-19 Pedro Alves <palves@redhat.com>
10107
10108 * Makefile.in (INCGNU): Add -Ignulib.
10109
10110 2012-04-19 Pedro Alves <palves@redhat.com>
10111
10112 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10113 (INCGNU): ... this, and spell out -I here.
10114 (GNULIB_LIB): Rename to ...
10115 (LIBGNU): ... this.
10116 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10117
10118 2012-04-19 Pedro Alves <palves@redhat.com>
10119
10120 * config.in: Regenerate.
10121
10122 2012-04-19 Pedro Alves <palves@redhat.com>
10123
10124 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10125 * server.h (memmem): Remove declaration.
10126 * config.in: Regenerate.
10127 * configure: Regenerate.
10128
10129 2012-04-19 Yao Qi <yao@codesourcery.com>
10130
10131 * Makefile.in (SFILES): Add common/vec.c.
10132 (OBS): Add vec.o.
10133 (vec.o): New rule.
10134
10135 2012-04-19 Yao Qi <yao@codesourcery.com>
10136
10137 * remote-utils.c (prepare_resume_reply): Replace with macro
10138 target_core_of_thread.
10139 * server.c (handle_qxfer_threads_proper): Likewise.
10140 * target.h (traget_core_of_thread): New macro.
10141
10142 2012-04-18 Pedro Alves <palves@redhat.com>
10143
10144 * aclocal.m4: Regenerate.
10145 * configure: Regenerate.
10146
10147 2012-04-16 Yao Qi <yao@codesourcery.com>
10148
10149 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10150 duplicated on address.
10151
10152 2012-04-16 Yao Qi <yao@codesourcery.com>
10153
10154 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10155 (struct tracepoint_action_ops) <send>: New field.
10156 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10157 (agent_expr_send, x_tracepoint_action_send): New.
10158 (l_tracepoint_action_send): New.
10159 (cmd_qtdp): Download and install tracepoint
10160 according to `use_agent'.
10161 (run_inferior_command): Add one more parameter `len'.
10162 Update callers.
10163 (tracepoint_send_agent): New.
10164 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10165
10166 2012-04-16 Yao Qi <yao@codesourcery.com>
10167
10168 * tracepoint.c (download_tracepoints): Moved to ...
10169 (cmd_qtstart): ... here.
10170
10171 2012-04-14 Yao Qi <yao@codesourcery.com>
10172
10173 * tracepoint.c: Include inttypes.h.
10174 (struct collect_memory_action): Use sized types.
10175 (struct tracepoint): Likewise.
10176 (cmd_qtdp, stop_tracing): Update print specifiers.
10177 (cmd_qtp, response_tracepoint): Likewise.
10178 (collect_data_at_tracepoint): Likewise.
10179 (collect_data_at_step): Likewise.
10180
10181 2012-04-14 Yao Qi <yao@codesourcery.com>
10182
10183 Import gnulib module inttypes.
10184 * aclocal.m4, config.in, configure: Regenerated.
10185
10186 2012-04-14 Yao Qi <yao@codesourcery.com>
10187
10188 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10189 Makefile and config.status at last.
10190
10191 2012-04-13 Yao Qi <yao@codesourcery.com>
10192
10193 * tracepoint.c: Include stdint.h unconditionally.
10194
10195 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10196
10197 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10198 on BFD_HAVE_SYS_PROCFS_TYPE.
10199 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10200 * configure: Regenerate.
10201 * config.in: Likewise.
10202
10203 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10204
10205 * Makefile.in (clean): Also remove x32.c x32-linux.c
10206 x32-avx.c x32-avx-linux.c.
10207 (x32.o): New target.
10208 (x32.c): Likewise.
10209 (x32-linux.o): Likewise.
10210 (x32-linux.c): Likewise.
10211 (x32-avx.o): Likewise.
10212 (x32-avx.c): Likewise.
10213 (x32-avx-linux.o): Likewise.
10214 (x32-avx-linux.c): Likewise.
10215
10216 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10217 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10218 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10219 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10220 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10221 i386/x32-avx-linux.xml.
10222
10223 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10224 (init_registers_x32_avx_linux): Likwise.
10225 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10226 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10227
10228 2012-04-13 Pedro Alves <palves@redhat.com>
10229
10230 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10231 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10232 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10233 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10234 the sub-make.
10235
10236 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10237
10238 * linux-x86-low.c (compat_x32_clock_t): New.
10239 (compat_x32_siginfo_t): Likewise.
10240 (compat_x32_siginfo_from_siginfo): Likewise.
10241 (siginfo_from_compat_x32_siginfo): Likewise.
10242 (linux_is_elf64): Likewise.
10243 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10244 and siginfo_from_compat_x32_siginfo for x32.
10245 (x86_arch_setup): Set linux_is_elf64.
10246
10247 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10248
10249 PR gdb/13969
10250 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10251 e_machine field.
10252 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10253 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10254 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10255 compatible with process.
10256
10257 2012-04-12 Yao Qi <yao@codesourcery.com>
10258
10259 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10260 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10261 (install-only, install-info, clean): Handle sub dir gnulib.
10262 (all-lib, am--refresh): New targets.
10263 (memmem.o): Remove target.
10264 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10265 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10266 (AC_REPLACE_FUNCS): Remove memmem.
10267 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10268 (AC_OUTPUT): Generate Makefile in gnulib/.
10269 * aclocal.m4, config.in, configure: Regenerated.
10270
10271 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10272
10273 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10274
10275 2012-04-05 Pedro Alves <palves@redhat.com>
10276
10277 -Werror=strict-aliasing
10278
10279 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10280 pointer.
10281
10282 2012-04-04 Pedro Alves <palves@redhat.com>
10283
10284 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10285 (sparc_store_gregset_from_stack, sparc_store_gregset)
10286 (sparc_breakpoint_at): Fix formatting.
10287
10288 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10289
10290 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10291 are available.
10292 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10293 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10294 * config.in: Regenerate.
10295 * configure: Likewise.
10296
10297 2012-03-29 Pedro Alves <palves@redhat.com>
10298
10299 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10300 Correct ptrace arguments.
10301
10302 2012-03-28 Pedro Alves <palves@redhat.com>
10303
10304 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10305 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10306 (IA64_FR1_REGNUM): New defines.
10307 (ia64_fetch_register): New.
10308 (the_low_target): Install it.
10309 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10310 field.
10311 * linux-low.c (linux_fetch_registers): Try the
10312 the_low_target.fetch_register hook first.
10313
10314 * linux-arm-low.c (the_low_target): Adjust.
10315 * linux-bfin-low.c (the_low_target): Adjust.
10316 * linux-cris-low.c (the_low_target): Adjust.
10317 * linux-crisv32-low.c (the_low_target): Adjust.
10318 * linux-m32r-low.c (the_low_target): Adjust.
10319 * linux-m68k-low.c (the_low_target): Adjust.
10320 * linux-mips-low.c (the_low_target): Adjust.
10321 * linux-ppc-low.c (the_low_target): Adjust.
10322 * linux-s390-low.c (the_low_target): Adjust.
10323 * linux-sh-low.c (the_low_target): Adjust.
10324 * linux-sparc-low.c (the_low_target): Adjust.
10325 * linux-tic6x-low.c (the_low_target): Adjust.
10326 * linux-x86-low.c (the_low_target): Adjust.
10327 * linux-xtensa-low.c (the_low_target): Adjust.
10328
10329 2012-03-26 Pedro Alves <palves@redhat.com>
10330
10331 * server.c (handle_qxfer_libraries): Don't bail early if
10332 the_target->qxfer_libraries_svr4 is not NULL.
10333
10334 2012-03-26 Pedro Alves <palves@redhat.com>
10335
10336 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10337
10338 2012-03-23 Pedro Alves <palves@redhat.com>
10339
10340 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10341 "library-list-svr4" element's start tag when the the DSO list is
10342 empty.
10343
10344 2012-03-23 Pedro Alves <palves@redhat.com>
10345
10346 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10347 a variable whose type size is the same as the inferior's pointer
10348 size.
10349
10350 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10351
10352 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10353 struct siginfo.
10354 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10355 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10356 * linux-low.h: Include <signal.h>.
10357 (struct siginfo): Remove forward declaration.
10358 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10359 struct siginfo.
10360
10361 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10362
10363 * .gitignore: Ignore more files.
10364
10365 2012-03-19 Pedro Alves <palves@redhat.com>
10366 Jan Kratochvil <jan.kratochvil@redhat.com>
10367
10368 * server.c (cont_thread, general_thread): Add describing comments.
10369 (start_inferior): Clear `cont_thread'.
10370 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10371 of a process.
10372
10373 2012-03-15 Yao Qi <yao@codesourcery.com>
10374
10375 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10376 handling to ...
10377 (cmd_qtdp): ... here.
10378
10379 2012-03-15 Yao Qi <yao@codesourcery.com>
10380
10381 * tracepoint.c (struct tracepoint_action_ops): New.
10382 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10383 (m_tracepoint_action_download): New.
10384 (r_tracepoint_action_download): New.
10385 (x_tracepoint_action_download): New.
10386 (l_tracepoint_action_download): New.
10387 (add_tracepoint_action): Install `action->ops' according type.
10388 (download_tracepoint_1): Move code `download' function pointer
10389 of various tracepoint_action_ops.
10390
10391 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10392
10393 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10394 linux_ptrace_attach_warnings.
10395
10396 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10397
10398 * Makefile.in (linux-ptrace.o): New.
10399 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10400 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10401 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10402 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10403 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10404 of these targets.
10405 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10406
10407 2012-03-08 Yao Qi <yao@codesourcery.com>
10408 Pedro Alves <palves@redhat.com>
10409
10410 Fix PR server/13392.
10411 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10412 offset of JMP insn.
10413 * tracepoint.c (remove_tracepoint): New.
10414 (cmd_qtdp): Call remove_tracepoint when failed to install.
10415
10416 2012-03-07 Pedro Alves <palves@redhat.com>
10417
10418 * linux-low.c (get_detach_signal): New.
10419 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10420 Pass on pending signals to PTRACE_DETACH. Check the result of the
10421 ptrace call.
10422 * server.c (program_signals, program_signals_p): New.
10423 (handle_general_set): Handle QProgramSignals.
10424 * server.h (program_signals, program_signals_p): Declare.
10425
10426 2012-03-05 Pedro Alves <palves@redhat.com>
10427 Jan Kratochvil <jan.kratochvil@redhat.com>
10428
10429 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10430 New comment why.
10431
10432 2012-03-03 Yao Qi <yao@codesourcery.com>
10433
10434 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10435 agent_look_up_symbols.
10436
10437 2012-03-03 Yao Qi <yao@codesourcery.com>
10438
10439 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10440 (linux-x86-low.o): Likewise.
10441 * server.h: Remove in_process_agent_loaded.
10442 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10443 common/agent.c.
10444 Update callers.
10445
10446 2012-03-03 Yao Qi <yao@codesourcery.com>
10447
10448 * tracepoint.c (gdb_agent_capability): New global.
10449 (in_process_agent_loaded_ust): Renamed to
10450 `in_process_agent_supports_ust'.
10451 Update callers.
10452 (in_process_agent_supports_ust): Call agent_capability_check.
10453 (clear_installed_tracepoints): Assert that agent supports
10454 agent.
10455
10456 2012-03-03 Yao Qi <yao@codesourcery.com>
10457
10458 * linux-low.c (linux_supports_agent): New.
10459 (linux_target_ops): Initialize field `supports_agent' with
10460 linux_supports_agent.
10461 * target.h (struct target_ops) <supports_agent>: New.
10462 (target_supports_agent): New macro.
10463 * server.c (handle_general_set): Handle packet 'QAgent'.
10464 (handle_query): Send `QAgent+'.
10465 * Makefile.in (server.o): Depends on agent.h.
10466
10467 2012-03-03 Yao Qi <yao@codesourcery.com>
10468
10469 * Makefile.in (OBS): Add agent.o.
10470 Add new rule for agent.o.
10471 Track dependence of tracepoint.c on agent.h.
10472 * tracepoint.c (run_inferior_command_1):
10473 (run_inferior_command): Call agent_run_command.
10474 (gdb_ust_connect_sync_socket): Deleted. Move it to
10475 common/agent.c.
10476 (resume_thread, stop_thread): Likewise.
10477 (gdb_ust_socket_init): Renamed to ...
10478 (gdb_agent_socket_init): ... New.
10479 (gdb_ust_thread): Renamed to ...
10480 (gdb_agent_helper_thread): ... New.
10481 (gdb_ust_init): Move some code to ...
10482 (gdb_agent_init): ... here. New.
10483 [HAVE_UST]: Call gdb_ust_init.
10484 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10485 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10486 * config.in, configure: Regenerated.
10487
10488 2012-03-02 Pedro Alves <palves@redhat.com>
10489
10490 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10491 * linux-low.c (struct simple_pid_list): New.
10492 (stopped_pids): New a struct simple_pid_list pointer.
10493 (add_to_pid_list, pull_pid_from_list): New.
10494 (handle_extended_wait): Don't assume the first signal new children
10495 report is SIGSTOP. Adjust call to pull_pid_from_list.
10496 (linux_wait_for_lwp): Adjust.
10497
10498 2012-03-02 Yao Qi <yao@codesourcery.com>
10499
10500 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10501 debug log.
10502
10503 2012-03-02 Yao Qi <yao@codesourcery.com>
10504
10505 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10506 `stop_pc' and `tpoint'. Update caller.
10507
10508 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10509
10510 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10511 * linux-low.c (use_linux_regsets): New macro.
10512 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10513 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10514 (linux_register_in_regsets): New function.
10515 (usr_fetch_inferior_registers): Skip registers covered by
10516 regsets.
10517 (usr_store_inferior_registers): Likewise.
10518 (usr_fetch_inferior_registers): New macro.
10519 (usr_store_inferior_registers): Likewise.
10520 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10521 (linux_store_registers): Likewise.
10522 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10523 prototype.
10524 (init_registers_mips64_dsp_linux): Likewise.
10525 (init_registers_mips_linux): New macro.
10526 (init_registers_mips_dsp_linux): Likewise.
10527 (mips_dsp_num_regs): Likewise.
10528 (DSP_BASE, DSP_CONTROL): New fallback macros.
10529 (mips_base_regs): New macro.
10530 (mips_regmap): Use it. Fix the size.
10531 (mips_dsp_regmap): New variable.
10532 (mips_dsp_regset_bitmap): Likewise.
10533 (mips_arch_setup): New function.
10534 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10535 than mips_regmap.
10536 (mips_cannot_store_register): Likewise.
10537 (the_low_target): Update .arch_setup, .num_regs and .regmap
10538 initializers. Add .regset_bitmap initializer.
10539 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10540 initializer.
10541 * linux-bfin-low.c (the_low_target): Likewise.
10542 * linux-cris-low.c (the_low_target): Likewise.
10543 * linux-crisv32-low.c (the_low_target): Likewise.
10544 * linux-ia64-low.c (the_low_target): Likewise.
10545 * linux-m32r-low.c (the_low_target): Likewise.
10546 * linux-m68k-low.c (the_low_target): Likewise.
10547 * linux-ppc-low.c (the_low_target): Likewise.
10548 * linux-s390-low.c (the_low_target): Likewise.
10549 * linux-sh-low.c (the_low_target): Likewise.
10550 * linux-sparc-low.c (the_low_target): Likewise.
10551 * linux-tic6x-low.c (the_low_target): Likewise.
10552 * linux-x86-low.c (the_low_target): Likewise.
10553 * linux-xtensa-low.c (the_low_target): Likewise.
10554 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10555 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10556 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10557 srv_xmlfiles.
10558 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10559 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10560
10561 2012-02-29 Yao Qi <yao@codesourcery.com>
10562 Pedro Alves <palves@redhat.com>
10563
10564 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10565 `step_over_finished' is true.
10566
10567 2012-02-27 Pedro Alves <palves@redhat.com>
10568
10569 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10570 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10571
10572 2012-02-27 Pedro Alves <palves@redhat.com>
10573
10574 PR server/9684
10575 * linux-low.c (pid_is_stopped): New.
10576 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10577
10578 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10579
10580 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10581 of conditions.
10582
10583 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10584
10585 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10586
10587 2012-02-24 Luis Machado <lgustavo@codesourcery>
10588
10589 * server.c (handle_query): Advertise support for target-side
10590 breakpoint condition evaluation.
10591 (process_point_options): New function.
10592 (process_serial_event): When inserting a breakpoint, check for
10593 a target-side condition that should be evaluated.
10594
10595 * mem-break.c: Include regcache.h and ax.h.
10596 (point_cond_list_t): New data structure.
10597 (breakpoint) <cond_list>: New field.
10598 (find_gdb_breakpoint_at): Make non-static.
10599 (delete_gdb_breakpoint_at): Clear any target-side
10600 conditions.
10601 (clear_gdb_breakpoint_conditions): New function.
10602 (add_condition_to_breakpoint): Likewise.
10603 (add_breakpoint_condition): Likewise.
10604 (gdb_condition_true_at_breakpoint): Likewise.
10605 (gdb_breakpoint_here): Return result directly instead
10606 of going through a local variable.
10607
10608 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10609 (clear_gdb_breakpoint_conditions): Likewise.
10610 (add_breakpoint_condition): Likewise.
10611 (gdb_condition_true_at_breakpoint): Likewise.
10612
10613 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10614 (need_step_over_p): Take target-side breakpoint condition into
10615 consideration.
10616
10617 2012-02-24 Luis Machado <lgustavo@codesourcery>
10618
10619 * server.h: Include tracepoint.h.
10620 (agent_mem_read, agent_get_trace_state_variable_value,
10621 agent_set_trace_state_variable_value,
10622 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10623 get_set_tsv_func_addr): New prototypes.
10624
10625 * ax.h: New include file.
10626 * ax.c: New source file.
10627
10628 * tracepoint.c: Include ax.h.
10629 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10630 agent_expr, eval_result_type): Move to ax.h.
10631 (parse_agent_expr): Rename to ...
10632 (gdb_parse_agent_expr): ... this, make it non-static and move
10633 to ax.h.
10634 (unparse_agent_expr) Rename to ...
10635 (gdb_unparse_agent_expr): ... this, make it non-static and move
10636 to ax.h.
10637 (eval_agent_expr): Rename to ...
10638 (eval_tracepoint_agent_expr): ... this.
10639 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10640 forward declarations.
10641 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10642 (agent_get_trace_state_variable_value): New function.
10643 (agent_set_trace_state_variable_value): New function.
10644 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10645 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10646 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10647 (condition_true_at_tracepoint): Likewise.
10648 (parse_agent_expr): Rename to ...
10649 (gdb_parse_agent_expr): ... this and move to ax.c.
10650 (unparse_agent_expr): Rename to ...
10651 (gdb_unparse_agent_expr): ... this and move to ax.c.
10652 (gdb_agent_op_name): Move to ax.c.
10653 (eval_agent_expr): Rename to ...
10654 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10655 and move to ax.c.
10656 (eval_tracepoint_agent_expr): New function.
10657 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10658 non-static.
10659 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10660 ax.c.
10661 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10662 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10663 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10664 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10665 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10666 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10667 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10668 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10669 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10670 (compile_bytecodes): Remove forward declaration.
10671 (is_goto_target): Move to ax.c.
10672 (compile_bytecodes): Move to ax.c and call
10673 agent_get_trace_state_variable_value (...) and
10674 agent_set_trace_state_variable_value (...).
10675
10676 * Makefile.in: Update ax.c and IPA dependencies.
10677
10678 2012-02-24 Pedro Alves <palves@redhat.com>
10679
10680 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10681 (cmd_bigqtbuffer_circular): ... this. Only handle
10682 'QTBuffer:circular:'.
10683 (handle_tracepoint_general_set): Adjust.
10684
10685 2012-02-16 Yao Qi <yao@codesourcery.com>
10686
10687 * inferiors.c: Move code to ...
10688 * dll.c: .... here. New.
10689 * server.h: Declare clear_dlls.
10690 * Makefile.in (SFILES): Add dll.c.
10691 (OBS): Add dll.o
10692 (dll.o): New rule.
10693
10694 2012-02-11 Yao Qi <yao@codesourcery.com>
10695
10696 * server.c: (handle_monitor_command): Add a new parameter
10697 `own_buf'.
10698 (handle_query): Update caller.
10699
10700 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10701
10702 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10703 * configure, config.in: Regenerate.
10704 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10705 is not defined.
10706
10707 2012-02-02 Pedro Alves <palves@redhat.com>
10708
10709 Try SIGKILL first, then PTRACE_KILL.
10710 * linux-low.c (linux_kill_one_lwp): New.
10711 (linux_kill_one_lwp): Rename to ...
10712 (kill_one_lwp_callback): ... this. Use the new
10713 linux_kill_one_lwp.
10714
10715 2012-02-02 Pedro Alves <palves@redhat.com>
10716
10717 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10718 inferior.
10719
10720 2012-01-27 Pedro Alves <palves@redhat.com>
10721
10722 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10723 (elf_64_file_p): Make static.
10724 (linux_pid_exe_is_elf_64_file): New.
10725 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10726 Delete declarations.
10727 (linux_pid_exe_is_elf_64_file): Declare.
10728 * linux-x86-low.c (x86_arch_setup): Use
10729 linux_pid_exe_is_elf_64_file.
10730
10731 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10732
10733 * linux-low.c (linux_wait_for_event_1): Rename to ...
10734 (linux_wait_for_event): ... here and merge it with former
10735 linux_wait_for_event - new variable wait_ptid, use it.
10736 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10737
10738 2012-01-23 Pedro Alves <palves@redhat.com>
10739
10740 * server.c (main): Avoid yet another case of infinite loop while
10741 detaching/killing after a longjmp.
10742
10743 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10744
10745 Code cleanup.
10746 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10747
10748 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10749
10750 * hostio.c (handle_readlink): New function.
10751 (handle_vFile): Call it to handle "vFile:readlink" packets.
10752
10753 2012-01-20 Pedro Alves <palves@redhat.com>
10754 Ulrich Weigand <ulrich.weigand@linaro.org>
10755
10756 * server.c (handle_v_requests): Only support vAttach and vRun to
10757 start multiple processes when in extended protocol mode.
10758
10759 2012-01-17 Pedro Alves <palves@redhat.com>
10760
10761 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10762 memalign plus mprotect to allocate the scratch buffer.
10763
10764 2012-01-13 Pedro Alves <palves@redhat.com>
10765
10766 * server.c (attach_inferior): Clear `cont_thread'.
10767
10768 2012-01-13 Pedro Alves <palves@redhat.com>
10769
10770 * server.c (main): Avoid infinite loop while detaching/killing
10771 after a longjmp.
10772
10773 2012-01-09 Doug Evans <dje@google.com>
10774
10775 * server.c (start_inferior): Set last_ptid in --wrapper case.
10776
10777 2012-01-06 Yao Qi <yao@codesourcery.com>
10778
10779 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10780 defined.
10781 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10782
10783 2012-01-04 Yao Qi <yao@codesourcery.com>
10784
10785 * tracepoint.c (cmd_qtdp): Print debug message
10786 for static tracepoint.
10787
10788 2012-01-04 Yao Qi <yao@codesourcery.com>
10789
10790 * tracepoint.c (trace_vdebug): Differentiate debug message
10791 between gdbserver and IPA.
10792
10793 2012-01-03 Yao Qi <yao@codesourcery.com>
10794
10795 * tracepoint.c (tracepoint_was_hit): Don't collect for
10796 static tracepoint.
10797
10798 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10799
10800 * terminal.h: Reformat copyright header.
10801
10802 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10803
10804 * server.c (gdbserver_version): Update copyright year.
10805 * gdbreplay.c (gdbreplay_version): Likewise.
10806
10807 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10808
10809 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10810
10811 Revert:
10812 2011-12-18 Hui Zhu <teawater@gmail.com>
10813 * linux-low.c (linux_create_inferior): Save return value to ret.
10814
10815 2011-12-18 Hui Zhu <teawater@gmail.com>
10816
10817 * linux-low.c (linux_create_inferior): Save return value to ret.
10818
10819 2011-12-16 Doug Evans <dje@google.com>
10820
10821 * linux-low.c (linux_create_inferior): If stdio connection,
10822 redirect stdin from /dev/null, stdout to stderr.
10823 * remote-utils.c (remote_is_stdio): New static global.
10824 (remote_connection_is_stdio): New function.
10825 (remote_prepare): Handle stdio connection.
10826 (remote_open): Ditto.
10827 (remote_close): Don't close stdin for stdio connections.
10828 (read_prim,write_prim): New functions. Replace all calls to
10829 read/write to these.
10830 * server.c (main): Watch for "-" argument. Move call to
10831 remote_prepare before start_inferior.
10832 * server.h (STDIO_CONNECTION_NAME): New macro.
10833 (remote_connection_is_stdio): Declare.
10834
10835 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10836 in debugging output.
10837
10838 2011-12-15 Yao Qi <yao@codesourcery.com>
10839
10840 * tracepoint.c: Include sys/syscall.h.
10841 (gdb_ust_thread): Remove preprocessor conditional.
10842
10843 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10844
10845 * linux-low.c (linux_detach_one_lwp): Call
10846 the_low_target.prepare_to_resume before detaching.
10847
10848 2011-12-14 Yao Qi <yao@codesourcery.com>
10849
10850 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10851 of write.
10852
10853 2011-12-14 Yao Qi <yao@codesourcery.com>
10854
10855 * i386-low.c (i386_low_stopped_data_address): Initialize local
10856 variable `control'.
10857
10858 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10859
10860 PR remote/13492
10861
10862 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10863 DR_CONTROL unless necessary. Extend comments.
10864 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10865 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10866
10867 2011-12-13 Yao Qi <yao@codesourcery.com>
10868
10869 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10870 macros.
10871 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10872
10873 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10874
10875 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10876 Print new debug message for such case.
10877
10878 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10879
10880 Fix overlapping memcpy.
10881 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10882 the read_inferior_memory transfer.
10883 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10884 write_inferior_memory transfer.
10885 (set_fast_tracepoint_jump): New variable buf. Use it for the
10886 read_inferior_memory and write_inferior_memory transfers.
10887 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10888 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10889 Use it for the write_inferior_memory transfer.
10890 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10891 buffers.
10892
10893 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10894
10895 * linux-low.c (fetch_register, store_register): Make code
10896 consistent, fix formatting.
10897
10898 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10899
10900 * linux-low.c (usr_store_inferior_registers): Factor out code
10901 to handle individual registers into...
10902 (store_register): ... this new function.
10903
10904 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10905
10906 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10907 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10908 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10909 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10910 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10911 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10912 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10913 (srv_xmlfiles): Add new XML files.
10914
10915 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10916 and <sys/uio.h>.
10917 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10918 (init_registers_s390_linux32v1): Add prototype.
10919 (init_registers_s390_linux32v2): Likewise.
10920 (init_registers_s390_linux64v1): Likewise.
10921 (init_registers_s390_linux64v2): Likewise.
10922 (init_registers_s390x_linux64v1): Likewise.
10923 (init_registers_s390x_linux64v2): Likewise.
10924 (s390_num_regs): Increment to 52.
10925 (s390_regmap): Add orig_r2 register.
10926 (s390_num_regs_3264): Increment to 68.
10927 (s390_regmap_3264): Add orig_r2 register.
10928 (s390_collect_ptrace_register): Handle orig_r2 register.
10929 (s390_supply_ptrace_register): Likewise.
10930 (s390_fill_last_break): New function.
10931 (s390_store_last_break): Likewise.
10932 (s390_fill_system_call): New function.
10933 (s390_store_system_call): Likewise.
10934 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10935 register sets.
10936 (s390_check_regset): New function.
10937 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10938 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10939 Update target_regsets for available register sets.
10940
10941 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10942 Jan Kratochvil <jan.kratochvil@redhat.com>
10943
10944 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10945 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10946 New.
10947 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10948 * linux-low.h (struct process_info_private): New member r_debug.
10949 * server.c (handle_qxfer_libraries): Call
10950 the_target->qxfer_libraries_svr4.
10951 (handle_qxfer_libraries_svr4): New function.
10952 (qxfer_packets): New entry "libraries-svr4".
10953 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10954 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10955 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10956 PACKET_qXfer_libraries_svr4.
10957
10958 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10959
10960 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10961 PSW address/mask between 8-byte and 16-byte formats.
10962 (s390_supply_ptrace_register): Likewise.
10963 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10964 basic addressing mode bit.
10965
10966 2011-11-24 Stan Shebs <stan@codesourcery.com>
10967
10968 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10969
10970 2011-11-17 Stan Shebs <stan@codesourcery.com>
10971
10972 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10973 (tracing_start_time): New global.
10974 (tracing_stop_time): New global.
10975 (tracing_user_name): New global.
10976 (tracing_notes): New global.
10977 (tracing_stop_note): New global.
10978 (cmd_qtstart): Set traceframe_usage, start_time.
10979 (stop_tracing): Set stop_time.
10980 (cmd_qtstatus): Report additional status.
10981 (cmd_qtp): New function.
10982 (handle_tracepoint_query): Call it.
10983 (cmd_qtnotes): New function.
10984 (handle_tracepoint_general_set): Call it.
10985 (get_timestamp): Rename from tsv_get_timestamp.
10986
10987 2011-11-14 Stan Shebs <stan@codesourcery.com>
10988 Kwok Cheung Yeung <kcy@codesourcery.com>
10989
10990 * linux-x86-low.c (small_jump_insn): New.
10991 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10992 trampoline and error message, build a trampoline and issue a small
10993 jump instruction to it.
10994 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10995 trampoline and error message.
10996 (x86_get_min_fast_tracepoint_insn_len): New.
10997 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10998 * linux-low.h (struct linux_target_ops): Add arguments to
10999 install_fast_tracepoint_jump_pad operation, add new operation.
11000 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
11001 arguments.
11002 (linux_get_min_fast_tracepoint_insn_len): New function.
11003 (linux_target_op): Add new operation.
11004 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
11005 (gdb_trampoline_buffer_end): Ditto.
11006 (gdb_trampoline_buffer_error): Ditto.
11007 (struct ipa_sym_addresses): Add fields for new IPA variables.
11008 (symbol_list): Add entries for new IPA variables.
11009 (struct tracepoint): Add fields to hold the address range of the
11010 trampoline used by the tracepoint.
11011 (trampoline_buffer_head): New static variable.
11012 (trampoline_buffer_tail): Ditto.
11013 (claim_trampoline_space): New function.
11014 (have_fast_tracepoint_trampoline_buffer): New function.
11015 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
11016 structure.
11017 (install_fast_tracepoint): Ditto, also add error buffer argument.
11018 (cmd_qtminftpilen): New function.
11019 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
11020 (fast_tracepoint_from_trampoline_address): New function.
11021 (fast_tracepoint_collecting): Handle trampoline as part of jump
11022 pad space.
11023 (set_trampoline_buffer_space): New function.
11024 (initialize_tracepoint): Initialize new IPA variables.
11025 * target.h (struct target_ops): Add arguments to
11026 install_fast_tracepoint_jump_pad operation, add new
11027 get_min_fast_tracepoint_insn_len operation.
11028 (target_get_min_fast_tracepoint_insn_len): New.
11029 (install_fast_tracepoint_jump_pad): Add arguments.
11030 * server.h (IPA_BUFSIZ): Define.
11031 * linux-i386-ipa.c: Include extra header files.
11032 (initialize_fast_tracepoint_trampoline_buffer): New function.
11033 (initialize_low_tracepoint): Call it.
11034 * server.h (set_trampoline_buffer_space): Declare.
11035 (claim_trampoline_space): Ditto.
11036 (have_fast_tracepoint_trampoline_buffer): Ditto.
11037
11038 2011-11-14 Yao Qi <yao@codesourcery.com>
11039
11040 * server.c (handle_query): Handle InstallInTrace for qSupported.
11041 * tracepoint.c (add_tracepoint): Sort list.
11042 (install_tracepoint, download_tracepoint): New.
11043 (cmd_qtdp): Call them to install and download tracepoints.
11044 (sort_tracepoints): Removed.
11045 (cmd_qtstart): Update.
11046
11047 2011-11-14 Yao Qi <yao@codesourcery.com>
11048
11049 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
11050 * mem-break.h: Declare.
11051 * tracepoint.c (cmd_qtstart): Move some code to ...
11052 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
11053 New.
11054 (download_tracepoints): Move some code to ...
11055 (download_tracepoint_1): ... here. New.
11056
11057 2011-11-08 Yao Qi <yao@codesourcery.com>
11058
11059 * remote-utils.c (relocate_instruction): A comment fix.
11060
11061 2011-11-07 Joel Brobecker <brobecker@adacore.com>
11062
11063 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
11064 (i386_dr_low_get_control, i386_dr_low_get_status): Use
11065 dr_status_mirror and dr_control_mirror from debug_reg_state.
11066 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
11067 (i386_initial_stuff): Remove use of deleted globals.
11068 (i386_get_thread_context, i386_set_thread_context,
11069 i386_thread_added): Use dr_status_mirror and dr_control_mirror
11070 from debug_reg_state.
11071
11072 2011-11-05 Yao Qi <yao@codesourcery.com>
11073
11074 * tracepoint.c (gdb_collect): Loop over tracepoints of same
11075 address as TPOINT's.
11076
11077 2011-11-02 Stan Shebs <stan@codesourcery.com>
11078
11079 * tracepoint.c (agent_mem_read_string): New function.
11080 (eval_agent_expr): Call it for tracenz.
11081 * server.c (handle_query): Report support for tracenz.
11082
11083 2011-11-02 Yao Qi <yao@codesourcery.com>
11084
11085 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11086
11087 2011-11-02 Yao Qi <yao@codesourcery.com>
11088
11089 * target.h: Fix a typo in comment.
11090
11091 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11092
11093 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11094 clobber the breakpoints' shadows with fast tracepoint jumps.
11095 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11096 * target.c (write_inferior_memory): Also pass MYADDR down to
11097 check_mem_write.
11098
11099 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11100
11101 * configure.ac: Check support for personality routine.
11102 * configure: Regenerate.
11103 * config.in: Likewise.
11104 * linux-low.c: Include <sys/personality.h>.
11105 Define ADDR_NO_RANDOMIZE if necessary.
11106 (linux_create_inferior): Disable address space randomization when
11107 forking inferior, if requested.
11108 (linux_supports_disable_randomization): New function.
11109 (linux_target_ops): Install it.
11110 * server.h (disable_randomization): Declare.
11111 * server.c (disable_randomization): New global variable.
11112 (handle_general_set): Handle QDisableRandomization.
11113 (handle_query): Likewise for qSupported.
11114 (main): Support --disable-randomization and --no-disable-randomization
11115 command line arguments.
11116 * target.h (struct target_ops): Add supports_disable_randomization.
11117 (target_supports_disable_randomization): New macro.
11118
11119 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11120
11121 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11122 ifdef check.
11123 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11124 [!PT_GETDSBT] (target_loadmap): New definition.
11125 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11126 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11127 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11128 and PT_GETDSBT to LINUX_LOADMAP.
11129 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11130 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11131
11132 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11133
11134 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11135 (arm_linux_hwbp_cap): New static variable.
11136 (arm_linux_get_hwbp_cap): Replace by ...
11137 (arm_linux_init_hwbp_cap): ... this new function.
11138 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11139 (arm_linux_get_hw_watchpoint_count): Likewise.
11140 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11141 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11142 (arm_prepare_to_resume): Use perror_with_name instead of error.
11143
11144 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11145
11146 * linux-arm-low.c: Include <signal.h>.
11147 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11148 (struct arm_linux_hwbp_cap): New data type.
11149 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11150 (struct arm_linux_hw_breakpoint): New data type.
11151 (MAX_BPTS, MAX_WPTS): Define.
11152 (struct arch_process_info, struct arch_lwp_info): New data types.
11153 (arm_linux_get_hwbp_cap): New function.
11154 (arm_linux_get_hw_breakpoint_count): Likewise.
11155 (arm_linux_get_hw_watchpoint_count): Likewise.
11156 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11157 (arm_hwbp_control_initialize): Likewise.
11158 (arm_hwbp_control_is_enabled): Likewise.
11159 (arm_hwbp_control_is_initialized): Likewise.
11160 (arm_hwbp_control_disable): Likewise.
11161 (arm_linux_hw_breakpoint_equal): Likewise.
11162 (arm_linux_hw_point_initialize): Likewise.
11163 (struct update_registers_data): New data structure.
11164 (update_registers_callback: New function.
11165 (arm_insert_point): Likewise.
11166 (arm_remove_point): Likewise.
11167 (arm_stopped_by_watchpoint): Likewise.
11168 (arm_stopped_data_address): Likewise.
11169 (arm_new_process): Likewise.
11170 (arm_new_thread): Likewise.
11171 (arm_prepare_to_resume): Likewise.
11172 (the_low_target): Register arm_insert_point, arm_remove_point,
11173 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11174 arm_new_thread, and arm_prepare_to_resume.
11175
11176 2011-09-15 Stan Shebs <stan@codesourcery.com>
11177
11178 * server.h (struct emit_ops): Add compare-goto fields.
11179 * tracepoint.c (gdb_agent_op_sizes): New table.
11180 (emit_eq_goto): New function.
11181 (emit_ne_goto): New function.
11182 (emit_lt_goto): New function.
11183 (emit_le_goto): New function.
11184 (emit_gt_goto): New function.
11185 (emit_ge_goto): New function.
11186 (is_goto_target): New function.
11187 (compile_bytecodes): Recognize special cases of compare-goto
11188 combinations and call specialized emitters for them.
11189 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11190 (amd64_emit_ne_goto): New function.
11191 (amd64_emit_lt_goto): New function.
11192 (amd64_emit_le_goto): New function.
11193 (amd64_emit_gt_goto): New function.
11194 (amd64_emit_ge_goto): New function.
11195 (amd64_emit_ops): Add the new functions.
11196 (i386_emit_eq_goto): New function.
11197 (i386_emit_ne_goto): New function.
11198 (i386_emit_lt_goto): New function.
11199 (i386_emit_le_goto): New function.
11200 (i386_emit_gt_goto): New function.
11201 (i386_emit_ge_goto): New function.
11202 (i386_emit_ops): Add the new functions.
11203
11204 2011-09-08 Stan Shebs <stan@codesourcery.com>
11205
11206 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11207 (i386_emit_epilogue): Restore %ebx.
11208
11209 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11210
11211 * server.c (step_thread): Remove definition.
11212 (process_serial_event): Don't handle Hs.
11213 * server.h (step_thread): Remove declaration.
11214 * target.c (set_desired_inferior): Remove use of step_thread.
11215
11216 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11217
11218 * linux-low.c: Include linux-procfs.h.
11219 (linux_attach_lwp_1): Update comments.
11220 (linux_attach): Scan for existing threads when attaching to a
11221 process that is the tgid.
11222 * Makefile.in: Update dependencies.
11223
11224 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11225
11226 * configure.srv: Add linux-procfs.o dependencies.
11227
11228 2011-08-14 Yao Qi <yao@codesourcery.com>
11229
11230 * target.h (struct target_ops): Fix indent.
11231 * win32-low.c (win32_target_ops): Fix comment.
11232
11233 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11234 Yao Qi <yao@codesourcery.com>
11235
11236 * Makefile.in (clean): Remove tic6x-*.c files.
11237 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11238 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11239 (tic6x-c64xp-linux.c): Likewise.
11240 * configure.srv: Add support for tic6x-*-uclinux.
11241 * linux-tic6x-low.c: New.
11242 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11243
11244 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11245 Yao Qi <yao@codesourcery.com>
11246
11247 * target.h (struct target_ops): Add read_loadmap.
11248 * linux-low.c (struct target_loadseg): New type.
11249 (struct target_loadmap): New type.
11250 (linux_read_loadmap): New function.
11251 (linux_target_ops): Add linux_read_loadmap.
11252 * server.c (handle_query): Support qXfer:fdpic:read packet.
11253 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11254 to NULL.
11255
11256 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11257
11258 * win32-low.c: Include <stdint.h>.
11259
11260 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11261
11262 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11263 to the inferior here.
11264 (i386_remove_aligned_watchpoint): Ditto.
11265 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11266 fit part of the watchpoint in the debug registers.
11267 (i386_update_inferior_debug_regs): New.
11268 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11269 registers, and only update the inferior on success.
11270 (i386_low_remove_watchpoint): Ditto.
11271
11272 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11273
11274 * linux-low.c (compare_ints, unique, list_threads, show_process,
11275 linux_core_of_thread): Delete.
11276 (linux_target_ops): Change linux_core_of_thread to
11277 linux_common_core_of_thread.
11278 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11279 * utils.c (malloc_failure): Change type of argument.
11280 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11281 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11282 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11283 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11284 (IPA_OBJS): Add common-utils-ipa.o.
11285 (ptid_h, linux_osdata_h): New macros.
11286 (server_h): Add common/common-utils.h, common/xml-utils.h,
11287 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11288 common/ptid.h.
11289 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11290 ptid.o, buffer.o): New rules.
11291 (linux-low.o): Add common/linux-osdata.h as a dependency.
11292 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11293 * configure.ac: Add AC_HEADER_DIRENT check.
11294 * config.in: Regenerate.
11295 * configure: Regenerate.
11296 * remote-utils.c (xml_escape_text): Delete.
11297 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11298 buffer_xml_printf): Move to common/buffer.c.
11299 * server.c (main): Remove call to initialize_inferiors.
11300 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11301 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11302 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11303 internal_error, gdb_assert, gdb_assert_fail): Delete.
11304 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11305 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11306 common/buffer.h.
11307 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11308 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11309 initialize_inferiors): Delete.
11310
11311 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11312
11313 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11314 symbol error.
11315
11316 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11317
11318 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11319 assertion.
11320 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11321
11322 2011-05-26 Yao Qi <yao@codesourcery.com>
11323
11324 * Makefile.in (thread-db.o): Track dependence to
11325 common/gdb_thread_db.h.
11326 * thread-db.c: include gdb_thread_db.h from right place.
11327
11328 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11329
11330 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11331 __FILE__ and __LINE__ to internal_error.
11332
11333 2011-05-13 Doug Evans <dje@google.com>
11334
11335 * thread-db.c (try_thread_db_load_from_sdir): New function.
11336 (try_thread_db_load_from_dir): New function.
11337 (thread_db_load_search): Handle $sdir, ignore $pdir.
11338 Remove trying of system directories if search of
11339 libthread-db-search-path fails, that is now done via $sdir.
11340
11341 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11342
11343 * server.c (handle_query): Add EnableDisableTracepoints to the list
11344 of supported features.
11345 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11346 tracepoints.
11347 (cmd_qtenable_disable): New.
11348 (cmd_qtstart): Install tracepoints even if disabled.
11349 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11350 receiving a QTEnable or QTDisable packet.
11351 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11352 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11353 tracepoints.
11354 (gdb_probe): Skip data collection if static tracepoint is disabled.
11355
11356 2011-05-10 Doug Evans <dje@google.com>
11357
11358 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11359
11360 2011-05-04 Doug Evans <dje@google.com>
11361
11362 * linux-low.c (linux_join): Skip process lookup.
11363 * spu-low.c (spu_join): Ditto.
11364 * server.c (join_inferiors_callback): Delete.
11365 (process_serial_event): For 'D' packet (detach) call join_inferior
11366 directly.
11367
11368 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11369
11370 * README: Don't mention xscale*-*-linux*.
11371 * configure.srv (xscale*-*-linux*): Don't handle target.
11372
11373 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11374
11375 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11376 casting pointers.
11377 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11378 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11379 (i386_emit_void_call_2): Likewise.
11380
11381 2011-04-26 Yao Qi <yao@codesourcery.com>
11382
11383 * linux-low.c: Move common macros to linux-ptrace.h.
11384 Include linux-ptrace.h.
11385 * Makefile.in (linux_ptrace_h): New.
11386 (linux-low.o): Depends on linux-ptrace.h.
11387
11388 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11389
11390 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11391 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11392 (remote_prepare): New function with most of the TCP code from ...
11393 (remote_open): ... here. Detect PORT here unconditionally. Move also
11394 setting transport_is_reliable.
11395 * server.c (run_once): New variable.
11396 (gdbserver_usage): Document it.
11397 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11398 the first run if RUN_ONCE.
11399 * server.h (run_once, remote_prepare): New declarations.
11400
11401 2011-04-19 Tom Tromey <tromey@redhat.com>
11402
11403 * win32-low.c (handle_load_dll): Remove duplicate "the".
11404
11405 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11406
11407 Remove support for old Cygwin 1.5 versions.
11408 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11409 function to avoid warning.
11410 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11411 warning.
11412
11413 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11414
11415 * gdbserver/server.h (Macro _): Define it if not available.
11416
11417 2011-03-14 Michael Snyder <msnyder@vmware.com>
11418
11419 * hostio.c (handle_close): Remove unnecessary null test.
11420
11421 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11422
11423 * Makefile.in (maintainer-clean realclean distclean): Remove
11424 "make ... subdir_do" command.
11425
11426 2011-03-10 Michael Snyder <msnyder@vmware.com>
11427
11428 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11429
11430 * server.c (handle_v_run): Free alloced buffer on early return.
11431
11432 2011-03-09 Yao Qi <yao@codesourcery.com>
11433
11434 Revert:
11435 2011-03-04 Yao Qi <yao@codesourcery.com>
11436
11437 * Makefile.in: Remove GNU make feature --directory.
11438
11439 2011-03-05 Yao Qi <yao@codesourcery.com>
11440
11441 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11442 (subdir_do): New make target. Copied from gdb/Makefile.
11443 (maintainer-clean, realclean, distclean, clean): Call corresponding
11444 make targets in common/Makefile.
11445
11446 2011-02-11 Yao Qi <yao@codesourcery.com>
11447
11448 * configure.ac: Call AC_PROG_RANLIB.
11449 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11450 * configure: Regenerate.
11451
11452 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11453
11454 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11455
11456 2011-03-06 Yao Qi <yao@codesourcery.com>
11457
11458 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11459
11460 2011-03-05 Yao Qi <yao@codesourcery.com>
11461
11462 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11463 (subdir_do): New make target. Copied from gdb/Makefile.
11464 (maintainer-clean, realclean, distclean, clean): Call corresponding
11465 make targets in common/Makefile.
11466
11467 2011-03-04 Yao Qi <yao@codesourcery.com>
11468
11469 * Makefile.in: Remove GNU make feature --directory.
11470
11471 2011-03-04 Michael Snyder <msnyder@vmware.com>
11472
11473 * server.c (queue_stop_reply): Call xmalloc not malloc.
11474
11475 2011-03-02 Michael Snyder <msnyder@vmware.com>
11476
11477 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11478
11479 2011-02-28 Michael Snyder <msnyder@vmware.com>
11480
11481 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11482 (cmd_qtframe): Ditto.
11483 (cmd_qtbuffer): Ditto.
11484 (cmd_bigqtbuffer): Ditto.
11485
11486 * utils.c (decimal2str): Initialize 'width' to nine, then
11487 don't mess with it.
11488
11489 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11490
11491 * hostio.c (require_data): Free *data, not data.
11492
11493 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11494
11495 * hostio.c (require_data): Use free, not xfree.
11496
11497 2011-02-27 Michael Snyder <msnyder@vmware.com>
11498
11499 * server.c (handle_query): Discard unused value.
11500
11501 * hostio.c (require_data): Free malloc memory before returning
11502 error.
11503
11504 2011-02-26 Michael Snyder <msnyder@vmware.com>
11505
11506 * linux-low.c (list_threads): Call closedir for dirent.
11507
11508 2011-02-27 Michael Snyder <msnyder@vmware.com>
11509
11510 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11511 a case statement falls through.
11512
11513 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11514
11515 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11516 in comparison.
11517
11518 2011-02-26 Michael Snyder <msnyder@vmware.com>
11519
11520 * utils.c (decimal2str): Eliminate dead code and dead param.
11521 (pulongest): Drop dead param from call to decimal2str.
11522 (plongest): Ditto.
11523
11524 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11525
11526 Revert the following patch (not approved yet):
11527 2011-02-21 Hui Zhu <teawater@gmail.com>
11528 * tracepoint.c (tp_printf): New function.
11529 (eval_agent_expr): Handle gdb_agent_op_printf.
11530
11531 2011-02-21 Hui Zhu <teawater@gmail.com>
11532
11533 * tracepoint.c (tp_printf): New function.
11534 (eval_agent_expr): Handle gdb_agent_op_printf.
11535
11536 2011-02-18 Tom Tromey <tromey@redhat.com>
11537
11538 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11539 (tracepoint.o): Likewise.
11540 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11541 (gdb_agent_op_names): Likewise.
11542
11543 2011-02-18 Tom Tromey <tromey@redhat.com>
11544
11545 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11546 gdb_agent_op_rot>: New constants.
11547 (gdb_agent_op_names): Add pick and roll.
11548 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11549 cases.
11550
11551 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11552
11553 * aclocal.m4: Regenerated with aclocal-1.11.1.
11554
11555 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11556
11557 * server.c (handle_qxfer_traceframe_info): New.
11558 (qxfer_packets): Register "traceframe-info".
11559 (handle_query): Report support for qXfer:traceframe-info:read+.
11560 * tracepoint.c (match_blocktype): New.
11561 (traceframe_find_block_type): Rename to ...
11562 (traceframe_walk_blocks): ... this. Add callback filter argument,
11563 and use it.
11564 (traceframe_find_block_type): New, reimplemented on top of
11565 traceframe_walk_blocks.
11566 (build_traceframe_info_xml): New.
11567 (traceframe_read_info): New.
11568 * server.h (traceframe_read_info): Declare.
11569
11570 2011-02-11 Yao Qi <yao@codesourcery.com>
11571
11572 * configure.ac: Call AC_PROG_RANLIB.
11573 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11574 * configure: Regenerate.
11575
11576 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11577
11578 * server.c (gdb_read_memory): Change return semantics to allow
11579 partial transfers.
11580 (handle_search_memory_1): Adjust.
11581 (process_serial_event) <'m' packet>: Handle partial transfers.
11582 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11583
11584 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11585
11586 * regcache.c (init_register_cache): Initialize
11587 regcache->register_status.
11588 (free_register_cache): Release regcache->register_status.
11589 (regcache_cpy): Copy register_status.
11590 (registers_to_string): Print 'x's for unavailable registers.
11591 (supply_register): Mark the register's status valid or
11592 unavailable, depending on whether a buffer was passed in or not.
11593 (supply_register_zeroed): New.
11594 (supply_regblock): Mark the registers' status valid or
11595 unavailable, depending on whether a buffer was passed in or not.
11596 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11597 (struct regcache): New `register_status' field.
11598 (supply_register_zeroed): Declare.
11599 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11600 supply_register_zeroed, rather than passing a NULL buffer to
11601 supply_register.
11602 * tracepoint.c (fetch_traceframe_registers): Update comment.
11603
11604 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11605
11606 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11607 buffer explicit.
11608
11609 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11610
11611 * server.h (decode_xfer_write): Change prototype.
11612 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11613 and don't extract the annex here.
11614 * server.c (decode_xfer_read): Remove `annex' parameter,
11615 and don't extract the annex here.
11616 (decode_xfer): New.
11617 (struct qxfer): New.
11618 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11619 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11620 (handle_qxfer_statictrace): New functions, abstracted out from
11621 handle_query, and made to use the struct qxfer interface.
11622 (handle_threads_qxfer_proper): Rename to ...
11623 (handle_qxfer_threads_proper): ... this.
11624 (handle_threads_qxfer): Rename to ...
11625 (handle_qxfer_threads): ... this. Adjust.
11626 (qxfer_packets): New array.
11627 (handle_qxfer): New function.
11628 (handle_query): Use handle_qxfer.
11629
11630 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11631
11632 * gdbreplay.c: Shorten lines of >= 80 columns.
11633 * linux-low.c: Ditto.
11634 * linux-ppc-low.c: Ditto.
11635 * linux-s390-low.c: Ditto.
11636 * linux-sparc-low.c: Ditto.
11637 * linux-x86-low.c: Ditto.
11638 * linux-xtensa-low.c: Ditto.
11639 * mem-break.c: Ditto.
11640 * nto-low.c: Ditto.
11641 * regcache.h: Ditto.
11642 * remote-utils.c: Ditto.
11643 * server.c: Ditto.
11644 * server.h: Ditto.
11645 * thread-db.c: Ditto.
11646 * tracepoint.c: Ditto.
11647 * utils.c: Ditto.
11648 * win32-low.h: Ditto.
11649
11650 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11651
11652 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11653 update.
11654
11655 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11656
11657 * server.c (gdbserver_version): Update copyright year in version
11658 output.
11659 * gdbreplay.c (gdbreplay_version): Ditto.
11660
11661 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11662
11663 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11664 * linux-bfin-low.c: New file.
11665 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11666 PT_DATA_ADDR for BFIN targets.
11667 * Makefile.in (SFILES): Add linux-bfin-low.c.
11668 (clean): Remove reg-bfin.c.
11669 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11670 * README: Mention supported Blackfin targets.
11671
11672 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11673
11674 * .gitignore: New file.
11675
11676 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11677
11678 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11679
11680 2010-10-22 Jie Zhang <jie@codesourcery.com>
11681
11682 * Makefile.in: Add FLAGS_TO_PASS variable.
11683 (install): Remove dependency of install-only and recursively
11684 invoke make for install-only.
11685
11686 2010-10-04 Doug Evans <dje@google.com>
11687
11688 * Makefile.in (uninstall): Use $(DESTDIR).
11689
11690 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11691
11692 PR gdb/11842
11693
11694 * linux-x86-low.c (compat_siginfo_from_siginfo)
11695 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11696 si_code is < 0. Check for si_code == SI_TIMER before checking for
11697 si_code < 0.
11698
11699 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11700
11701 * lynx-i386-low.c: New file.
11702 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11703
11704 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11705
11706 * lynx-low.c (ptrace_request_to_str): Remove handling for
11707 request values that have been removed in LynxOS 5.x.
11708
11709 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11710
11711 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11712 <ptrace.h>
11713
11714 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11715
11716 * configure.ac: Add --enable-inprocess-agent option.
11717 * configure: Rebuilt.
11718
11719 2010-09-06 Yao Qi <yao@codesourcery.com>
11720
11721 * linux-low.c (linux_kill): Remove unused variable.
11722 (linux_stabilize_threads): Likewise.
11723 * server.c (start_inferior): Likewise.
11724 (queue_stop_reply_callback): Likewise.
11725 * tracepoint.c (do_action_at_tracepoint): Likewise.
11726
11727 2010-09-06 Yao Qi <yao@codesourcery.com>
11728
11729 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11730 on return.
11731
11732 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11733
11734 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11735
11736 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11737
11738 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11739 "$(IPA_DEPFILES)".
11740
11741 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11742
11743 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11744 gdbserver/lynx-ppc-low.c: New files.
11745 * Makefile.in (lynx_low_h): New variable.
11746 (lynx-low.o, lynx-ppc-low.o): New rules.
11747 * configure.ac: On LynxOS, link with -lnetinet.
11748 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11749 * configure: regenerate.
11750
11751 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11752
11753 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11754 * configure.ac: Add check for vasprintf and vsnprintf.
11755 * configure, config.in: Regenerate.
11756 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11757
11758 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11759
11760 * gdbreplay.c: Move include of alloca.h up, next to include of
11761 malloc.h.
11762 * server.h: Add include of malloc.h.
11763 * mem-break.c: Remove include of malloc.h.
11764 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11765
11766 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11767
11768 * Makefile.in (memmem.o): Build with -Wno-error.
11769
11770 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11771
11772 * utils.c (xsnprintf): Make non-static.
11773 * server.h: Add xsnprintf declaration.
11774 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11775 replace calls to snprintf by calls to xsnprintf throughout.
11776
11777 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11778
11779 * configure.ac: Add configure check for alloca.
11780 * configure, config.in: Regenerate.
11781 * server.h: Include alloca.h if it exists.
11782 * gdbreplay.c: Include alloca.h if it exists.
11783
11784 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11785
11786 * linux-low.c (__SIGRTMIN): Define if not already defined.
11787 (linux_create_inferior): Check for __ANDROID__ rather than
11788 __SIGRTMIN.
11789 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11790 are already deferred.
11791 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11792 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11793 stopped and already has a pending signal to report.
11794 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11795 a pending signal to report or is moving out of a jump pad.
11796 (linux_init_signals): Check for __ANDROID__ rather than
11797 __SIGRTMIN.
11798
11799 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11800
11801 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11802 debug_threads check. Avoid a linear search when not doing debug
11803 output.
11804
11805 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11806
11807 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11808 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11809 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11810 (process_event): Change local fd's type to gdb_fildes_t.
11811 (create_file_handler): Adjust prototype.
11812 (delete_file_handler): Adjust prototype.
11813 (handle_file_event): Adjust prototype. Use pfildes.
11814 (create_file_event): Adjsut prototype.
11815 * remote-utils.c (remote_desc, listen_desc): Change type to
11816 gdb_fildes_t.
11817 * server.h: New gdb_fildes_t typedef.
11818 [USE_WIN32API]: Include winsock2.h.
11819 (delete_file_handler, add_file_handler): Adjust prototypes.
11820 (pfildes): Declare.
11821 * utils.c (pfildes): New.
11822
11823 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11824
11825 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11826 * configure: Regenerate.
11827
11828 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11829
11830 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11831 (linux_done_accessing_memory): ... this.
11832 (linux_target_ops): Adjust.
11833 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11834 * nto-low.c (nto_target_ops): Adjust comment.
11835 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11836 * spu-low.c (spu_target_ops): Adjust comment.
11837 * target.h (target_ops): Rename unprepare_to_access_memory field
11838 to done_accessing_memory.
11839 (unprepare_to_access_memory): Rename to ...
11840 (done_accessing_memory): ... this.
11841
11842 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11843
11844 * linux-low.c (linux_prepare_to_access_memory): New.
11845 (linux_unprepare_to_access_memory): New.
11846 (linux_target_ops): Install them.
11847 * server.c (read_memory): Rename to ...
11848 (gdb_read_memory): ... this. Use
11849 prepare_to_access_memory/prepare_to_access_memory.
11850 (write_memory): Rename to ...
11851 (gdb_write_memory): ... this. Use
11852 prepare_to_access_memory/prepare_to_access_memory.
11853 (handle_search_memory_1): Adjust.
11854 (process_serial_event): Adjust.
11855 * target.h (struct target_ops): New fields
11856 prepare_to_access_memory and unprepare_to_access_memory.
11857 (prepare_to_access_memory, unprepare_to_access_memory): New.
11858 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11859 prepare_to_access_memory/prepare_to_access_memory.
11860 * nto-low.c (nto_target_ops): Adjust.
11861 * spu-low.c (spu_target_ops): Adjust.
11862 * win32-low.c (win32_target_ops): Adjust.
11863
11864 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11865
11866 * Makefile.in (WARN_CFLAGS): Get it from configure.
11867 (WERROR_CFLAGS): New.
11868 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11869 * configure.ac: Introduce --enable-werror, which adds -Werror to
11870 the compiler command line. Enabled by default. Disable with
11871 --disable-werror. Add -Wdeclaration-after-statement
11872 Wpointer-arith and -Wformat-nonliteral to warning flags.
11873 * configure: Regenerate.
11874
11875 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11876
11877 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11878
11879 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11880
11881 * gdbreplay.c (remote_error): New.
11882 (gdbchar): New.
11883 (expect): Use gdbchar. Check for error reading from GDB.
11884 Clarify sync error output.
11885 (play): Check for errors writing to GDB.
11886 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11887 * remote-utils.c (getpkt): Check for errors writing to the remote
11888 descriptor.
11889
11890 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11891
11892 * linux-low.c (linux_wait_1): Move non-debugging code out of
11893 `debug_threads' control.
11894
11895 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11896
11897 * linux-low.c (linux_wait_1): Don't set last_status here.
11898 * server.c (push_event, queue_stop_reply_callback): Assert we're
11899 not pushing a TARGET_WAITKIND_IGNORE event.
11900 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11901 (myresume, handle_target_event): Set the thread's last_resume_kind
11902 and last_status from the target returned status.
11903
11904 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11905
11906 PR threads/10729
11907
11908 * linux-x86-low.c (update_debug_registers_callback): New.
11909 (i386_dr_low_set_addr): Use it.
11910 (i386_dr_low_get_addr): New.
11911 (i386_dr_low_set_control): Use update_debug_registers_callback.
11912 (i386_dr_low_get_control): New.
11913 (i386_dr_low_get_status): Adjust.
11914 * linux-low.c (linux_stop_lwp): New.
11915 * linux-low.h (linux_stop_lwp): Declare.
11916
11917 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11918 argument instead of a i386_debug_reg_state.
11919 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11920 a i386_debug_reg_state.
11921 (i386_insert_aligned_watchpoint): Adjust.
11922 (i386_remove_aligned_watchpoint): Adjust.
11923 (i386_low_stopped_data_address): Read the debug registers from the
11924 inferior instead of from the mirrors.
11925 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11926 (i386_dr_low_get_addr): Declare.
11927 (i386_dr_low_get_control): Declare.
11928 (i386_dr_low_get_status): Change prototype.
11929
11930 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11931 (i386_dr_low_get_addr): New.
11932 (i386_dr_low_get_control): New.
11933 (i386_dr_low_get_status): Adjust prototype. Return
11934 dr_status_mirror.
11935 (i386_initial_stuff): Clear dr_status_mirror and
11936 dr_control_mirror.
11937 (i386_get_thread_context): Adjust.
11938 (i386_set_thread_context): Adjust.
11939 (i386_thread_added): Adjust.
11940
11941 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11942
11943 * linux-low.h (linux_thread_area): Delete declaration.
11944
11945 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11946
11947 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11948 after its termination.
11949
11950 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11951
11952 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11953 (gdb_wants_all_stopped): Delete.
11954 (linux_wait_1): Don't call them.
11955 * server.c (handle_v_cont): Tag all threads as want-stopped.
11956 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11957 stopped as "client-wants-stopped".
11958
11959 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11960
11961 * Makefile.in (signals_h): New.
11962 (server_h): Depend on it.
11963 (server.o): Don't depend on $(signals_def).
11964 (signals.o): Depend on $(signals_def).
11965
11966 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11967
11968 * Makefile.in (signals_def): New.
11969 (server_h): Append include/gdb/signals.h and signals_def.
11970 (server.o): Append signals_def.
11971
11972 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11973
11974 * server.c (handle_target_event): Use target_signal_to_host for
11975 resume_info.sig initialization.
11976 * target.h (struct thread_resume) <sig>: New comment.
11977
11978 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11979
11980 * server.c (handle_query): strcpy() the returned string from paddress()
11981 instead of sprintf().
11982 * utils.c (paddress): Return phex_nz().
11983
11984 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11985
11986 * server.c (handle_v_cont): Call mourn_inferior if process
11987 just exited.
11988 (myresume): Likewise.
11989
11990 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11991
11992 Static tracepoints, and integration with UST.
11993
11994 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11995 * mem-break.c (uninsert_all_breakpoints)
11996 (reinsert_all_breakpoints): New.
11997 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11998 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11999 (gdb_agent_ust_loaded, helper_thread_id)
12000 (gdb_agent_helper_thread_id): New macros.
12001 (struct ipa_sym_addresses): Add addr_ust_loaded,
12002 addr_helper_thread_id, addr_cmd_buf.
12003 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
12004 (in_process_agent_loaded_ust): New.
12005 (write_e_ust_not_loaded): New.
12006 (maybe_write_ipa_ust_not_loaded): New.
12007 (struct collect_static_trace_data_action): New.
12008 (enum tracepoint_type) <static_tracepoint>: New.
12009 (struct tracepoint) <handle>: Mention static tracepoints.
12010 (struct static_tracepoint_ctx): New.
12011 (CMD_BUF_SIZE): New.
12012 (add_tracepoint_action): Handle static tracepoint actions.
12013 (unprobe_marker_at): New.
12014 (clear_installed_tracepoints): Handle static tracepoints.
12015 (cmd_qtdp): Handle static tracepoints.
12016 (probe_marker_at): New.
12017 (cmd_qtstart): Handle static tracepoints.
12018 (response_tracepoint): Handle static tracepoints.
12019 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
12020 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
12021 (get_context_regcache): Handle static tracepoints.
12022 (do_action_at_tracepoint): Handle static tracepoint actions.
12023 (traceframe_find_block_type): Handle static trace data blocks.
12024 (traceframe_read_sdata): New.
12025 (download_tracepoints): Download static tracepoint actions.
12026 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
12027 (GDB_PROBE_NAME): New.
12028 (ust_ops): New.
12029 (GET_UST_SYM): New.
12030 (USTF): New.
12031 (dlsym_ust): New.
12032 (ust_marker_to_static_tracepoint): New.
12033 (gdb_probe): New.
12034 (collect_ust_data_at_tracepoint): New.
12035 (gdb_ust_probe): New.
12036 (UNIX_PATH_MAX, SOCK_DIR): New.
12037 (gdb_ust_connect_sync_socket): New.
12038 (resume_thread, stop_thread): New.
12039 (run_inferior_command): New.
12040 (init_named_socket): New.
12041 (gdb_ust_socket_init): New.
12042 (cstr_to_hexstr): New.
12043 (next_st): New.
12044 (first_marker, next_marker): New.
12045 (response_ust_marker): New.
12046 (cmd_qtfstm, cmd_qtsstm): New.
12047 (unprobe_marker_at, probe_marker_at): New.
12048 (cmd_qtstmat, gdb_ust_thread): New.
12049 (gdb_ust_init): New.
12050 (initialize_tracepoint_ftlib): Call gdb_ust_init.
12051 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
12052 (ST_REGENTRY): New.
12053 (x86_64_st_collect_regmap): New.
12054 (X86_64_NUM_ST_COLLECT_GREGS): New.
12055 (AMD64_RIP_REGNUM): New.
12056 (supply_static_tracepoint_registers): New.
12057 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
12058 (ST_REGENTRY): New.
12059 (i386_st_collect_regmap): New.
12060 (i386_NUM_ST_COLLECT_GREGS): New.
12061 (supply_static_tracepoint_registers): New.
12062 * server.c (handle_query): Handle qXfer:statictrace:read.
12063 <qSupported>: Report support for StaticTracepoints, and
12064 qXfer:statictrace:read features.
12065 * server.h (traceframe_read_sdata)
12066 (supply_static_tracepoint_registers): Declare.
12067 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
12068 (unpack_varlen_hex): Include in IPA build.
12069 * Makefile.in (ustlibs, ustinc): New.
12070 (IPA_OBJS): Add remote-utils-ipa.o.
12071 ($(IPA_LIB)): Link -ldl and -lpthread.
12072 (UST_CFLAGS): New.
12073 (IPAGENT_CFLAGS): Add UST_CFLAGS.
12074 * config.in, configure: Regenerate.
12075
12076 2010-06-20 Ian Lance Taylor <iant@google.com>
12077 Pedro Alves <pedro@codesourcery.com>
12078
12079 * linux-x86-low.c (always_true): Delete.
12080 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12081 trying to fool the compiler with always_true.
12082
12083 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12084
12085 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12086 conditions in gdbserver.
12087
12088 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12089
12090 * spu-low.c (spu_read_memory): Wrap around local store limit.
12091 (spu_write_memory): Likewise.
12092
12093 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12094
12095 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12096 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12097 LONGEST uses.
12098 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12099 uses.
12100 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12101 uses with LONGEST uses.
12102
12103 2010-06-14 Stan Shebs <stan@codesourcery.com>
12104 Pedro Alves <pedro@codesourcery.com>
12105
12106 Bytecode compiler.
12107
12108 * linux-x86-low.c: Include limits.h.
12109 (add_insns): New.
12110 (always_true): New.
12111 (EMIT_ASM): New.
12112 (EMIT_ASM32): New.
12113 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12114 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12115 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12116 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12117 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12118 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12119 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12120 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12121 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12122 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12123 (amd64_emit_void_call_2): New.
12124 (amd64_emit_ops): New.
12125 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12126 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12127 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12128 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12129 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12130 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12131 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12132 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12133 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12134 (i386_emit_stack_adjust, i386_emit_int_call_1)
12135 (i386_emit_void_call_2): New.
12136 (i386_emit_ops): New.
12137 (x86_emit_ops): New.
12138 (the_low_target): Install x86_emit_ops.
12139 * server.h (struct emit_ops): New.
12140 (get_raw_reg_func_addr): Declare.
12141 (current_insn_ptr, emit_error): Declare.
12142 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12143 (set_trace_state_variable_value): New defines.
12144 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12145 addr_get_trace_state_variable_value and
12146 addr_set_trace_state_variable_value.
12147 (symbol_list): New fields for get_raw_reg,
12148 get_trace_state_variable_value and set_trace_state_variable_value.
12149 (condfn): New typedef.
12150 (struct tracepoint): New field `compiled_cond'.
12151 (do_action_at_tracepoint): Clear compiled_cond.
12152 (get_trace_state_variable_value, set_trace_state_variable_value):
12153 Export in the IPA.
12154 (condition_true_at_tracepoint): If there's a compiled condition,
12155 run that.
12156 (current_insn_ptr, emit_error): New globals.
12157 (struct bytecode_address): New.
12158 (get_raw_reg_func_addr): New.
12159 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12160 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12161 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12162 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12163 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12164 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12165 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12166 (compile_tracepoint_condition, compile_bytecodes): New.
12167 * target.h (emit_ops): Forward declare.
12168 (struct target_ops): New field emit_ops.
12169 (target_emit_ops): New.
12170 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12171 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12172 * linux-low.c (linux_emit_ops): New.
12173 (linux_target_ops): Install it.
12174 * linux-low.h (struct linux_target_ops): New field emit_ops.
12175
12176 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12177
12178 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12179 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12180
12181 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12182 Stan Shebs <stan@codesourcery.com>
12183
12184 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12185 (all): Depend on $(extra_libraries).
12186 (install-only): Install the IPA.
12187 (IPA_OBJS, IPA_LIB): New.
12188 (clean): Remove the IPA lib.
12189 (IPAGENT_CFLAGS): New.
12190 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12191 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12192 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12193 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12194 * configure.ac: Check for atomic builtins support in the compiler.
12195 (IPA_DEPFILES, extra_libraries): Define.
12196 * configure.srv (ipa_obj): Add description.
12197 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12198 (i[34567]86-*-linux*): Set ipa_obj.
12199 (x86_64-*-linux*): Set ipa_obj.
12200 * linux-low.c (stabilizing_threads): New.
12201 (supports_fast_tracepoints): New.
12202 (linux_detach): Stabilize threads before detaching.
12203 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12204 the lwp is either not stabilizing, or is moving out of a jump pad.
12205 (linux_fast_tracepoint_collecting): New.
12206 (maybe_move_out_of_jump_pad): New.
12207 (enqueue_one_deferred_signal): New.
12208 (dequeue_one_deferred_signal): New.
12209 (linux_wait_for_event_1): If moving out of a jump pad, defer
12210 pending signals to later.
12211 (linux_stabilize_threads): New.
12212 (linux_wait_1): Check if threads need moving out of jump pads, and
12213 do it if so.
12214 (stuck_in_jump_pad_callback): New.
12215 (move_out_of_jump_pad_callback): New.
12216 (lwp_running): New.
12217 (linux_resume_one_lwp): Handle moving out of jump pads.
12218 (linux_set_resume_request): Dequeue deferred signals.
12219 (need_step_over_p): Also step over fast tracepoint jumps.
12220 (start_step_over): Also uninsert fast tracepoint jumps.
12221 (finish_step_over): Also reinsert fast tracepoint jumps.
12222 (linux_install_fast_tracepoint_jump): New.
12223 (linux_target_ops): Install linux_stabilize_threads and
12224 linux_install_fast_tracepoint_jump_pad.
12225 * linux-low.h (linux_target_ops) <get_thread_area,
12226 install_fast_tracepoint_jump_pad>: New fields.
12227 (struct lwp_info) <collecting_fast_tracepoint,
12228 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12229 (linux_get_thread_area): Declare.
12230 * linux-x86-low.c (jump_insn): New.
12231 (x86_get_thread_area): New.
12232 (append_insns): New.
12233 (push_opcode): New.
12234 (amd64_install_fast_tracepoint_jump_pad): New.
12235 (i386_install_fast_tracepoint_jump_pad): New.
12236 (x86_install_fast_tracepoint_jump_pad): New.
12237 (the_low_target): Install x86_get_thread_area and
12238 x86_install_fast_tracepoint_jump_pad.
12239 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12240 (struct fast_tracepoint_jump): New.
12241 (fast_tracepoint_jump_insn): New.
12242 (fast_tracepoint_jump_shadow): New.
12243 (find_fast_tracepoint_jump_at): New.
12244 (fast_tracepoint_jump_here): New.
12245 (delete_fast_tracepoint_jump): New.
12246 (set_fast_tracepoint_jump): New.
12247 (uninsert_fast_tracepoint_jumps_at): New.
12248 (reinsert_fast_tracepoint_jumps_at): New.
12249 (set_breakpoint_at): Use write_inferior_memory.
12250 (uninsert_raw_breakpoint): Use write_inferior_memory.
12251 (check_mem_read): Mask out fast tracepoint jumps.
12252 (check_mem_write): Mask out fast tracepoint jumps.
12253 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12254 (set_fast_tracepoint_jump): Declare.
12255 (delete_fast_tracepoint_jump)
12256 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12257 (reinsert_fast_tracepoint_jumps_at): Declare.
12258 * regcache.c: Don't compile many functions when building the
12259 in-process agent library.
12260 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12261 the register buffer in the heap.
12262 (free_register_cache): If the register buffer isn't owned by the
12263 regcache, don't free it.
12264 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12265 pre-existing register caches.
12266 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12267 type.
12268 (convert_ascii_to_int): : Constify `from' parameter type.
12269 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12270 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12271 the needed buffer in-place.
12272 (relocate_instruction): New.
12273 * server.c (handle_query) <qSymbols>: If the target supports
12274 tracepoints, give it a chance of looking up symbols. Report
12275 support for fast tracepoints.
12276 (handle_status): Stabilize threads.
12277 (process_serial_event): Adjust.
12278 * server.h (struct fast_tracepoint_jump): Forward declare.
12279 (struct process_info) <fast_tracepoint_jumps>: New field.
12280 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12281 (decode_X_packet, decode_M_packet): Adjust.
12282 (relocate_instruction): Declare.
12283 (in_process_agent_loaded): Declare.
12284 (tracepoint_look_up_symbols): Declare.
12285 (struct fast_tpoint_collect_status): Declare.
12286 (fast_tracepoint_collecting): Declare.
12287 (force_unlock_trace_buffer): Declare.
12288 (handle_tracepoint_bkpts): Declare.
12289 (initialize_low_tracepoint)
12290 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12291 * target.h (struct target_ops) <stabilize_threads,
12292 install_fast_tracepoint_jump_pad>: New fields.
12293 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12294 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12295 [HAVE_STDINT_H]: Include stdint.h.
12296 (trace_debug_1): Rename to ...
12297 (trace_vdebug): ... this.
12298 (trace_debug): Rename to ...
12299 (trace_debug_1): ... this. Add `level' parameter.
12300 (trace_debug): New.
12301 (ATTR_USED, ATTR_NOINLINE): New.
12302 (IP_AGENT_EXPORT): New.
12303 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12304 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12305 (about_to_request_buffer_space, trace_buffer_is_full)
12306 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12307 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12308 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12309 (traceframe_write_count, traceframes_created)
12310 (trace_state_variables)
12311 New renaming defines.
12312 (struct ipa_sym_addresses): New.
12313 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12314 (symbol_list): New.
12315 (ipa_sym_addrs): New.
12316 (all_tracepoint_symbols_looked_up): New.
12317 (in_process_agent_loaded): New.
12318 (write_e_ipa_not_loaded): New.
12319 (maybe_write_ipa_not_loaded): New.
12320 (tracepoint_look_up_symbols): New.
12321 (debug_threads) [IN_PROCESS_AGENT]: New.
12322 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12323 (UNKNOWN_SIDE_EFFECTS): New.
12324 (stop_tracing): New.
12325 (flush_trace_buffer): New.
12326 (stop_tracing_bkpt): New.
12327 (flush_trace_buffer_bkpt): New.
12328 (read_inferior_integer): New.
12329 (read_inferior_uinteger): New.
12330 (read_inferior_data_pointer): New.
12331 (write_inferior_data_pointer): New.
12332 (write_inferior_integer): New.
12333 (write_inferior_uinteger): New.
12334 (struct collect_static_trace_data_action): Delete.
12335 (enum tracepoint_type): New.
12336 (struct tracepoint) <type>: New field `type'.
12337 <actions_str, step_actions, step_actions_str>: Only include in
12338 GDBserver.
12339 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12340 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12341 (tracepoints): Use IP_AGENT_EXPORT.
12342 (last_tracepoint): Don't include in the IPA.
12343 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12344 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12345 (alloced_trace_state_variables): New.
12346 (trace_state_variables): Use IP_AGENT_EXPORT.
12347 (traceframe_t): Delete unused variable.
12348 (circular_trace_buffer): Don't include in the IPA.
12349 (trace_buffer_start): Delete.
12350 (struct trace_buffer_control): New.
12351 (trace_buffer_free): Delete.
12352 (struct ipa_trace_buffer_control): New.
12353 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12354 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12355 New.
12356 (trace_buffer_ctrl): New.
12357 (TRACE_BUFFER_CTRL_CURR): New.
12358 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12359 Reimplement as macros.
12360 (trace_buffer_wrap): Delete.
12361 (traceframe_write_count, traceframe_read_count)
12362 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12363 (struct tracepoint_hit_ctx) <type>: New field.
12364 (struct fast_tracepoint_ctx): New.
12365 (memory_barrier): New.
12366 (cmpxchg): New.
12367 (record_tracepoint_error): Update atomically in the IPA.
12368 (clear_inferior_trace_buffer): New.
12369 (about_to_request_buffer_space): New.
12370 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12371 updating the same buffer.
12372 (add_tracepoint): Default the tracepoint's type to trap
12373 tracepoint, and orig_size to -1.
12374 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12375 internal variables.
12376 (create_trace_state_variable): New parameter `gdb'. Handle it.
12377 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12378 (cmd_qtdp): Handle fast tracepoints.
12379 (cmd_qtdv): Adjust.
12380 (max_jump_pad_size): New.
12381 (gdb_jump_pad_head): New.
12382 (get_jump_space_head): New.
12383 (claim_jump_space): New.
12384 (sort_tracepoints): New.
12385 (MAX_JUMP_SIZE): New.
12386 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12387 IPA.
12388 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12389 support. Upload fast traceframes, and delete internal IPA
12390 breakpoints.
12391 (stop_tracing_handler): New.
12392 (flush_trace_buffer_handler): New.
12393 (cmd_qtstop): Upload fast tracepoints.
12394 (response_tracepoint): Handle fast tracepoints.
12395 (tracepoint_finished_step): Upload fast traceframes. Set the
12396 tracepoint hit context's tracepoint type.
12397 (handle_tracepoint_bkpts): New.
12398 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12399 type. Add comment about fast tracepoints.
12400 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12401 non-existing action_str field.
12402 (get_context_regcache): Handle fast tracepoints.
12403 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12404 to the regcache.
12405 (fast_tracepoint_from_jump_pad_address): New.
12406 (fast_tracepoint_from_ipa_tpoint_address): New.
12407 (collecting_t): New.
12408 (force_unlock_trace_buffer): New.
12409 (fast_tracepoint_collecting): New.
12410 (collecting): New.
12411 (gdb_collect): New.
12412 (write_inferior_data_ptr): New.
12413 (target_tp_heap): New.
12414 (target_malloc): New.
12415 (download_agent_expr): New.
12416 (UALIGN): New.
12417 (download_tracepoints): New.
12418 (download_trace_state_variables): New.
12419 (upload_fast_traceframes): New.
12420 (IPA_FIRST_TRACEFRAME): New.
12421 (IPA_NEXT_TRACEFRAME_1): New.
12422 (IPA_NEXT_TRACEFRAME): New.
12423 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12424 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12425 (gdb_jump_pad_buffer_end): New.
12426 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12427 (initialize_tracepoint): Adjust.
12428 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12429 buffer. Initialize the low module.
12430 * utils.c (PREFIX, TOOLNAME): New.
12431 (malloc_failure): Use PREFIX.
12432 (error): In the IPA, an error causes an exit.
12433 (fatal, warning): Use PREFIX.
12434 (internal_error): Use TOOLNAME.
12435 (NUMCELLS): Increase to 10.
12436 * configure, config.in: Regenerate.
12437
12438 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12439
12440 * server.c (handle_query) <qSupported>: Do two passes over the
12441 qSupported string to avoid nesting strtok.
12442
12443 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12444
12445 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12446 (CDEPS): New.
12447 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12448 -Wl,--dynamic-list.
12449 * configure: Regenerate.
12450 * proc-service.list: New.
12451
12452 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12453
12454 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12455 New comment.
12456
12457 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12458
12459 * gdbreplay.c (remote_open): Check error return from socket() call by
12460 its equality to -1 not by it being negative.
12461 * remote-utils.c (remote_open): Likewise.
12462
12463 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12464
12465 * config.h: Regenerate.
12466
12467 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12468
12469 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12470 doesn't provide PTRACE_GET_THREAD_AREA.
12471
12472 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12473
12474 * linux-m68k-low.c: Include <asm/ptrace.h>
12475 (ps_get_thread_area): Implement.
12476
12477 2010-05-03 Doug Evans <dje@google.com>
12478
12479 * event-loop.c (struct callback_event): New struct.
12480 (callback_list): New global.
12481 (append_callback_event, delete_callback_event): New functions.
12482 (process_callback): New function.
12483 (start_event_loop): Call it.
12484 * remote-utils.c (NOT_SCHEDULED): Define.
12485 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12486 moved out of readchar.
12487 (readchar): Rewrite. Call reschedule before returning.
12488 (reset_readchar): New function.
12489 (remote_close): Call it.
12490 (process_remaining, reschedule): New functions.
12491 * server.h (callback_handler_func): New typedef.
12492 (append_callback_event, delete_callback_event): Declare.
12493
12494 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12495
12496 * proc-service.c (ps_pglobal_lookup): Use
12497 thread_db_look_up_one_symbol.
12498 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12499 parameter. Use it instead of all_symbols_looked_up.
12500 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12501 field.
12502 (all_symbols_looked_up): Don't declare.
12503 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12504 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12505 field.
12506 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12507 Set all_symbols_looked_up here.
12508 (thread_db_look_up_one_symbol): New.
12509 (thread_db_get_tls_address): Adjust.
12510 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12511 thread_db object on the heap, and tentatively set it in the
12512 process structure.
12513 (thread_db_init): Don't set all_symbols_looked_up here.
12514 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12515
12516 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12517
12518 * linux-low.c (linux_kill, linux_detach): Adjust.
12519 (status_pending_p_callback): Remove redundant statement. Check
12520 for !TARGET_WAITIKIND_IGNORE, instead of
12521 TARGET_WAITKIND_STOPPED.
12522 (handle_tracepoints): Make sure LWP is locked. Adjust.
12523 (linux_wait_for_event_1): Adjust.
12524 (linux_cancel_breakpoints): New.
12525 (unsuspend_one_lwp): New.
12526 (unsuspend_all_lwps): New.
12527 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12528 (send_sigstop_callback): Change return type to int, add new
12529 `except' parameter and handle it.
12530 (suspend_and_send_sigstop_callback): New.
12531 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12532 pass them down. If SUSPEND, also increment the lwp's suspend
12533 count.
12534 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12535 (need_step_over_p): Don't consider suspended LWPs.
12536 (start_step_over): Adjust.
12537 (proceed_one_lwp): Change return type to int, add new `except'
12538 parameter and handle it.
12539 (unsuspend_and_proceed_one_lwp): New.
12540 (proceed_all_lwps): Use find_inferior instead of
12541 for_each_inferior.
12542 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12543 also decrement the suspend count of LWPs. Pass `except' down,
12544 instead of hacking its suspend count.
12545 (linux_pause_all): Add `freeze' parameter. Adjust.
12546 (linux_unpause_all): New.
12547 (linux_target_ops): Install linux_unpause_all.
12548 * server.c (handle_status): Adjust.
12549 * target.h (struct target_ops): New fields `unpause_all' and
12550 `cancel_breakpoints'. Add new parameter to `pause_all'.
12551 (pause_all): Add new `freeze' parameter.
12552 (unpause_all): New.
12553 (cancel_breakpoints): New.
12554 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12555 cancel breakpoints.
12556 (cmd_qtstart): Pause threads.
12557 (stop_tracing): Pause threads, and cancel breakpoints.
12558 * win32-low.c (win32_target_ops): Adjust.
12559
12560 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12561
12562 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12563 the inferior right away from here...
12564 (linux_wait_1): ... to here, and adjust to check the thread's
12565 last_resume_kind instead of the lwp's step or stop_expected flags.
12566
12567 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12568
12569 * README: Use consistent `GDB' and `GDBserver' spellings.
12570
12571 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12572
12573 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12574 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12575 (linux_detach_one_lwp): Assume the lwp is stopped.
12576 (any_thread_of): Delete.
12577 (linux_detach): Stop all lwps here. Don't blindly delete all
12578 breakpoints.
12579 (delete_lwp_callback): New.
12580 (linux_mourn): Delete all lwps of the process that is gone.
12581 (linux_wait_1): Don't delete the last lwp of the process here.
12582 * mem-break.h (mark_breakpoints_out): Declare.
12583 * mem-break.c (mark_breakpoints_out): New.
12584 (free_all_breakpoints): Use it.
12585 * server.c (handle_target_event): If the process is gone, mark
12586 breakpoints out.
12587 * thread-db.c (struct thread_db) <create_bp>: New field.
12588 (thread_db_enable_reporting): Fix prototype. Store a thread event
12589 breakpoint reference in the thread_db struct.
12590 (thread_db_load_search): Clear the thread_db object.
12591 (try_thread_db_load_1): Ditto.
12592 (switch_to_process): New.
12593 (disable_thread_event_reporting): Use it.
12594 (remove_thread_event_breakpoints): New.
12595 (thread_db_detach, thread_db_mourn): Use it.
12596
12597 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12598
12599 * linux-low.c (linux_enable_event_reporting): New.
12600 (linux_wait_for_event_1, handle_extended_wait): Use it.
12601
12602 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12603
12604 * linux-low.c (linux_kill_one_lwp, linux_kill)
12605 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12606 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12607 SIGSTOP even if the LWP is stopped.
12608 (send_sigstop_callback): New.
12609 (stop_all_lwps): Use send_sigstop_callback instead.
12610 (linux_resume_one_thread): Adjust.
12611 (proceed_one_lwp): Still proceed an LWP that the client has
12612 requested to stop, if we haven't reported it as stopped yet. Make
12613 sure that LWPs the client want stopped, have a pending SIGSTOP.
12614
12615 2010-04-26 Doug Evans <dje@google.com>
12616
12617 * server.c (handle_general_set): Make static.
12618
12619 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12620 Print received char after testing for error/eof instead of before.
12621 (input_interrupt): Tweak comment.
12622
12623 2010-04-23 Doug Evans <dje@google.com>
12624
12625 * server.c (start_inferior): Print inferior argv if --debug.
12626
12627 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12628
12629 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12630 * nto-x86-low.c: Include server.h
12631
12632 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12633
12634 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12635 be consistent with other sources of this directory.
12636 (init_registers_amd64): Correct name of source file of this function
12637 in the comment.
12638
12639 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12640
12641 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12642 64-bit executables.
12643
12644 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12645
12646 * win32-i386-low.c: Add 64-bit support.
12647 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12648 (init_registers_amd64): Declare.
12649 (mappings): Add 64-bit version of array.
12650 (init_windows_x86): New function.
12651 (the_low_target): Change init_arch field to init_windows_x86.
12652
12653 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12654
12655 * win32-low.c: Adapt to support also 64-bit architecture.
12656 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12657 (get_image_name): Use SIZE_T type for local variable `done'.
12658 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12659 (toolhelp_get_dll_name): Idem.
12660 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12661 Use uintptr_t typecast to avoid warning.
12662 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12663 (handle_exception): Use phex_nz to avoid warning.
12664 (win32_wait): Remove unused local variable `process'.
12665
12666 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12667
12668 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12669 `amd64-avx.o'.
12670
12671 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12672
12673 * configure.ac: Use `ws2_32' library for srv_mingw.
12674 * configure: Regenerate.
12675 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12676 * remote-utils.c: Likewise.
12677
12678 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12679
12680 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12681 if __x86_64__ is defined.
12682
12683 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12684
12685 * configure: Regenerate.
12686
12687 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12688
12689 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12690 * target.h (target_ops): New get_tib_address field.
12691 * win32-low.h (win32_thread_info): Add thread_local_base field.
12692 * win32-low.c (child_add_thread): Add tlb argument.
12693 Set thread_local_base field to TLB.
12694 (get_child_debug_event): Adapt to child_add_thread change.
12695 (win32_get_tib_address): New function.
12696 (win32_target_ops): Set get_tib_address field to
12697 win32_get_tib_address.
12698 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12699
12700 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12701
12702 * linux-low.c (linux_mourn): Also remove the process.
12703 * server.c (handle_target_event): Don't remove the process here.
12704 * nto-low.c (nto_mourn): New.
12705 (nto_target_ops): Install it.
12706 * spu-low.c (spu_mourn): New.
12707 (spu_target_ops): Install it.
12708 * win32-low.c (win32_mourn): New.
12709 (win32_target_ops): Install it.
12710
12711 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12712
12713 * server.h (buffer_xml_printf): Remove redundant `;'.
12714
12715 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12716
12717 * regcache.c (set_register_cache): Invalidate regcaches before
12718 changing the register cache layout.
12719 (regcache_invalidate_one): Allow a NULL regcache.
12720 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12721 regcaches before changing the register cache layout or the target
12722 regsets.
12723
12724 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12725
12726 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12727 variable warning on Linux/x86-64.
12728
12729 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12730
12731 GDBserver disconnected tracing support.
12732
12733 * linux-low.c (linux_remove_process): Delete.
12734 (add_lwp): Don't set last_resume_kind here.
12735 (linux_kill): Use `mourn'.
12736 (linux_detach): Use `thread_db_detach', and `mourn'.
12737 (linux_mourn): New.
12738 (linux_attach_lwp_1): Adjust comment.
12739 (linux_attach): last_resume_kind moved the thread_info; adjust.
12740 (status_pending_p_callback): Adjust.
12741 (linux_wait_for_event_1): Adjust.
12742 (count_events_callback, select_singlestep_lwp_callback)
12743 (select_event_lwp_callback, cancel_breakpoints_callback)
12744 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12745 (proceed_one_lwp): Adjust.
12746 (linux_async): Add debug output.
12747 (linux_thread_stopped): New.
12748 (linux_pause_all): New.
12749 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12750 linux_pause_all.
12751 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12752 (thread_db_free): Delete declaration.
12753 (thread_db_detach, thread_db_mourn): Declare.
12754 * thread-db.c (thread_db_init): Use thread_db_mourn.
12755 (thread_db_free): Delete, split in two.
12756 (disable_thread_event_reporting): New.
12757 (thread_db_detach): New.
12758 (thread_db_mourn): New.
12759
12760 * server.h (struct thread_info) <last_resume_kind>: New field.
12761 <attached>: Add comment.
12762 <gdb_detached>: New field.
12763 (handler_func): Change return type to int.
12764 (handle_serial_event, handle_target_event): Ditto.
12765 (gdb_connected): Declare.
12766 (tracing): Delete.
12767 (disconnected_tracing): Declare.
12768 (stop_tracing): Declare.
12769
12770 * server.c (handle_query) <qSupported>: Report support for
12771 disconnected tracing.
12772 (queue_stop_reply_callback): Account for running threads.
12773 (gdb_wants_thread_stopped): New.
12774 (gdb_wants_all_threads_stopped): New.
12775 (gdb_reattached_process): New.
12776 (handle_status): Clear the `gdb_detached' flag of all processes.
12777 In all-stop, stop all threads.
12778 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12779 (process_serial_event): If the remote connection breaks, or if an
12780 exit was forced with "monitor exit", force an event loop exit.
12781 Handle disconnected tracing on detach.
12782 (handle_serial_event): Adjust.
12783 (handle_target_event): If GDB isn't connected, forward events back
12784 to the inferior, unless the last process exited, in which case,
12785 exit gdbserver. Adjust interface.
12786
12787 * remote-utils.c (remote_open): Don't block in accept. Instead
12788 register an event loop source on the listen socket file
12789 descriptor. Refactor bits into ...
12790 (listen_desc): ... this new global.
12791 (gdb_connected): ... this new function.
12792 (enable_async_notification): ... this new function.
12793 (handle_accept_event): ... this new function.
12794 (remote_close): Clear remote_desc.
12795
12796 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12797
12798 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12799 New fields.
12800 (mourn_inferior): Define.
12801 (target_process_qsupported): Avoid the dangling else problem.
12802 (thread_stopped): Define.
12803 (pause_all): Define.
12804 (target_waitstatus_to_string): Declare.
12805 * target.c (target_waitstatus_to_string): New.
12806
12807 * tracepoint.c (tracing): Make extern.
12808 (disconnected_tracing): New.
12809 (stop_tracing): Make extern. Handle tracing stops due to GDB
12810 disconnecting.
12811 (cmd_qtdisconnected): New.
12812 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12813 (handle_tracepoint_general_set): Handle QTDisconnected.
12814
12815 * event-loop.c (event_handler_func): Change return type to int.
12816 (process_event): Bail out if the event handler wants the event
12817 loop to stop.
12818 (handle_file_event): Ditto.
12819 (start_event_loop): Bail out if the event handler wants the event
12820 loop to stop.
12821
12822 * nto-low.c (nto_target_ops): Adjust.
12823 * spu-low.c (spu_wait): Don't remove the process here.
12824 (spu_target_ops): Adjust.
12825 * win32-low.c (win32_wait): Don't remove the process here.
12826 (win32_target_ops): Adjust.
12827
12828 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12829
12830 * regcache.c (realloc_register_cache): Invalidate inferior's
12831 regcache before recreating it.
12832
12833 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12834
12835 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12836
12837 2010-04-09 Stan Shebs <stan@codesourcery.com>
12838 Pedro Alves <pedro@codesourcery.com>
12839
12840 * server.h (LONGEST): New.
12841 (struct thread_info) <while_stepping>: New field.
12842 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12843 Declare.
12844 (initialize_tracepoint, handle_tracepoint_general_set)
12845 (handle_tracepoint_query, tracepoint_finished_step)
12846 (tracepoint_was_hit, release_while_stepping_state_list):
12847 (current_traceframe): Declare.
12848 * server.c (handle_general_set): Handle tracepoint packets.
12849 (read_memory): New.
12850 (write_memory): New.
12851 (handle_search_memory_1): Use read_memory.
12852 (handle_query): Report support for conditional tracepoints, trace
12853 state variables, and tracepoint sources. Handle tracepoint
12854 queries.
12855 (main): Initialize the tracepoints module.
12856 (process_serial_event): Handle traceframe reads/writes.
12857
12858 * linux-low.c (handle_tracepoints): New.
12859 (linux_wait_1): Call it.
12860 (linux_resume_one_lwp): Handle while-stepping.
12861 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12862 (linux_target_ops): Install them.
12863 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12864 New field.
12865 * linux-x86-low.c (x86_supports_tracepoints): New.
12866 (the_low_target). Install it.
12867
12868 * mem-break.h (delete_breakpoint): Declare.
12869 * mem-break.c (delete_breakpoint): Make external.
12870
12871 * target.h (struct target_ops): Add `supports_tracepoints',
12872 `read_pc', and `write_pc' fields.
12873 (target_supports_tracepoints): Define.
12874 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12875 (phex_nz): New.
12876
12877 * regcache.h (struct regcache) <registers_owned>: New field.
12878 (init_register_cache, regcache_cpy): Declare.
12879 (regcache_read_pc, regcache_write_pc): Declare.
12880 (register_cache_size): Declare.
12881 (supply_regblock): Declare.
12882 * regcache.c (init_register_cache): New.
12883 (new_register_cache): Use it.
12884 (regcache_cpy): New.
12885 (register_cache_size): New.
12886 (supply_regblock): New.
12887 (regcache_read_pc, regcache_write_pc): New.
12888
12889 * tracepoint.c: New.
12890
12891 * Makefile.in (OBS): Add tracepoint.o.
12892 (tracepoint.o): New rule.
12893
12894 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12895
12896 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12897 (i386-mmx.o): New.
12898 (i386-mmx.c): Likewise.
12899 (i386-mmx-linux.o): Likewise.
12900 (i386-mmx-linux.c): Likewise.
12901
12902 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12903 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12904 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12905 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12906
12907 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12908 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12909 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12910
12911 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12912
12913 * Makefile.in (clean): Updated.
12914 (i386-avx.o): New.
12915 (i386-avx.c): Likewise.
12916 (i386-avx-linux.o): Likewise.
12917 (i386-avx-linux.c): Likewise.
12918 (amd64-avx.o): Likewise.
12919 (amd64-avx.c): Likewise.
12920 (amd64-avx-linux.o): Likewise.
12921 (amd64-avx-linux.c): Likewise.
12922
12923 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12924 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12925 (srv_amd64_regobj): Add amd64-avx.o.
12926 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12927 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12928 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12929 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12930 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12931 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12932 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12933
12934 * i387-fp.c: Include "i386-xstate.h".
12935 (i387_xsave): New.
12936 (i387_cache_to_xsave): Likewise.
12937 (i387_xsave_to_cache): Likewise.
12938 (x86_xcr0): Likewise.
12939
12940 * i387-fp.h (i387_cache_to_xsave): Likewise.
12941 (i387_xsave_to_cache): Likewise.
12942 (x86_xcr0): Likewise.
12943
12944 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12945 * linux-crisv32-low.c (target_regsets): Likewise.
12946 * linux-m68k-low.c (target_regsets): Likewise.
12947 * linux-mips-low.c (target_regsets): Likewise.
12948 * linux-ppc-low.c (target_regsets): Likewise.
12949 * linux-s390-low.c (target_regsets): Likewise.
12950 * linux-sh-low.c (target_regsets): Likewise.
12951 * linux-sparc-low.c (target_regsets): Likewise.
12952 * linux-xtensa-low.c (target_regsets): Likewise.
12953
12954 * linux-low.c: Include <sys/uio.h>.
12955 (regsets_fetch_inferior_registers): Support nt_type.
12956 (regsets_store_inferior_registers): Likewise.
12957 (linux_process_qsupported): New.
12958 (linux_target_ops): Add linux_process_qsupported.
12959
12960 * linux-low.h (regset_info): Add nt_type.
12961 (linux_target_ops): Add process_qsupported.
12962
12963 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12964 and <sys/uio.h>.
12965 (init_registers_i386_avx_linux): New.
12966 (init_registers_amd64_avx_linux): Likewise.
12967 (xmltarget_i386_linux_no_xml): Likewise.
12968 (xmltarget_amd64_linux_no_xml): Likewise.
12969 (PTRACE_GETREGSET): Likewise.
12970 (PTRACE_SETREGSET): Likewise.
12971 (x86_fill_xstateregset): Likewise.
12972 (x86_store_xstateregset): Likewise.
12973 (use_xml): Likewise.
12974 (x86_linux_update_xmltarget): Likewise.
12975 (x86_linux_process_qsupported): Likewise.
12976 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12977 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12978 init_registers_i386_linux here. Call
12979 x86_linux_update_xmltarget.
12980 (the_low_target): Add x86_linux_process_qsupported.
12981
12982 * server.c (handle_query): Call target_process_qsupported.
12983
12984 * target.h (target_ops): Add process_qsupported.
12985 (target_process_qsupported): New.
12986
12987 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12988
12989 * inferiors.c (add_thread): Set last_status kind to
12990 TARGET_WAITKIND_IGNORE.
12991 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12992 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12993 (linux_wait_1): Move `thread' local definition to block that uses
12994 it. Don't NULL initialize `event_child'.
12995 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12996 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12997 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12998
12999 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13000
13001 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
13002 an extended waitstatus, or by a watchpoint.
13003 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
13004 thread was stepping or has been stopped by a watchpoint.
13005
13006 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13007
13008 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
13009 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
13010 of another, then delete the previous, and validate all
13011 breakpoints.
13012 (validate_inserted_breakpoint): New.
13013 (delete_disabled_breakpoints): New.
13014 (validate_breakpoints): New.
13015 (check_mem_read): Validate breakpoints before trusting their
13016 shadow. Delete disabled breakpoints.
13017 (check_mem_write): Validate breakpoints before trusting they
13018 should be inserted. Delete disabled breakpoints.
13019 * mem-break.h (validate_breakpoints):
13020 * server.c (handle_query): Validate breakpoints when we see a
13021 qSymbol query.
13022
13023 2010-04-01 Pedro Alves <pedro@codesourcery.com>
13024
13025 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
13026 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
13027 if we could tell there's a GDB breakpoint at stop_pc.
13028 (need_step_over_p): Don't do a step over if we find a GDB
13029 breakpoint at the resume PC.
13030
13031 * mem-break.c (struct raw_breakpoint): New.
13032 (enum bkpt_type): New type `gdb_breakpoint'.
13033 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
13034 fields. New field `raw'.
13035 (find_raw_breakpoint_at): New.
13036 (set_raw_breakpoint_at): Handle refcounting. Create a raw
13037 breakpoint instead.
13038 (set_breakpoint_at): Adjust.
13039 (delete_raw_breakpoint): New.
13040 (release_breakpoint): New.
13041 (delete_breakpoint): Rename to...
13042 (delete_breakpoint_1): ... this. Add proc parameter. Use
13043 release_breakpoint. Return ENOENT.
13044 (delete_breakpoint): Reimplement.
13045 (find_breakpoint_at): Delete.
13046 (find_gdb_breakpoint_at): New.
13047 (delete_breakpoint_at): Delete.
13048 (set_gdb_breakpoint_at): New.
13049 (delete_gdb_breakpoint_at): New.
13050 (gdb_breakpoint_here): New.
13051 (set_reinsert_breakpoint): Use release_breakpoint.
13052 (uninsert_breakpoint): Rename to ...
13053 (uninsert_raw_breakpoint): ... this.
13054 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
13055 (reinsert_raw_breakpoint): Change parameter type to
13056 raw_breakpoint.
13057 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
13058 instead.
13059 (check_breakpoints): Adjust. Use release_breakpoint.
13060 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
13061 (breakpoint_inserted_here): Ditto.
13062 (check_mem_read): Adjust to iterate over raw breakpoints instead.
13063 Don't trust the breakpoint's shadow if it is not inserted.
13064 (check_mem_write): Adjust to iterate over raw breakpoints instead.
13065 (delete_all_breakpoints): Adjust.
13066 (free_all_breakpoints): Mark all breakpoints as uninserted, and
13067 use delete_breakpoint_1.
13068
13069 * mem-break.h (breakpoints_supported): Delete declaration.
13070 (set_gdb_breakpoint_at): Declare.
13071 (gdb_breakpoint_here): Declare.
13072 (delete_breakpoint_at): Delete.
13073 (delete_gdb_breakpoint_at): Declare.
13074
13075 * server.h (struct raw_breakpoint): Forward declare.
13076 (struct process_info): New field `raw_breakpoints'.
13077
13078 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13079 breakpoints.
13080
13081 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13082
13083 * linux-low.c (status_pending_p_callback): Fix comment.
13084 (linux_wait_for_event_1): Move most of the internal breakpoint
13085 handling from here...
13086 (linux_wait_1): ... to here.
13087 (count_events_callback): New.
13088 (select_singlestep_lwp_callback): New.
13089 (select_event_lwp_callback): New.
13090 (cancel_breakpoints_callback): New.
13091 (select_event_lwp): New.
13092 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13093 priority to all LWPs that have had events that should be reported
13094 to the client. Cancel breakpoints when about to reporting the
13095 event to the client, not while stopping lwps. No longer cancel
13096 finished single-steps here.
13097 (cancel_finished_single_step): Delete.
13098 (cancel_finished_single_steps): Delete.
13099
13100 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13101
13102 * mem-break.c (enum bkpt_type): New.
13103 (struct breakpoint): New field `type'.
13104 (set_breakpoint_at): Change return type to struct breakpoint
13105 pointer. Set type to `other_breakpoint' by default.
13106 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13107 in the breakpoint list.
13108 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13109 (reinsert_breakpoint): Rename to ...
13110 (reinsert_raw_breakpoint): ... this.
13111 (reinsert_breakpoints_at): Adjust.
13112 * mem-break.h (struct breakpoint): Declare.
13113 (set_breakpoint_at): Change return type to struct breakpoint
13114 pointer.
13115
13116 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13117
13118 * server.c (handle_query): Assign, not compare.
13119
13120 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13121
13122 Teach linux gdbserver to step-over-breakpoints.
13123
13124 * linux-low.c (can_hardware_single_step): New.
13125 (supports_breakpoints): New.
13126 (handle_extended_wait): If stopping threads, read the stop pc of
13127 the new cloned LWP.
13128 (get_pc): New.
13129 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13130 low target doesn't support retrieving the PC.
13131 (add_lwp): Set last_resume_kind to resume_continue.
13132 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13133 (linux_attach): Don't clear stop_expected. Set the lwp's
13134 last_resume_kind to resume_stop.
13135 (linux_detach_one_lwp): Don't check for removed breakpoints.
13136 (check_removed_breakpoint): Delete.
13137 (status_pending_p): Rename to ...
13138 (status_pending_p_callback): ... this. Don't check for removed
13139 breakpoints. Don't consider threads that are stopped from GDB's
13140 perspective.
13141 (linux_wait_for_lwp): Always read the stop_pc here.
13142 (cancel_breakpoint): New.
13143 (step_over_bkpt): New global.
13144 (linux_wait_for_event_1): Implement stepping over breakpoints.
13145 (gdb_wants_lwp_stopped): New.
13146 (gdb_wants_all_stopped): New.
13147 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13148 single-step traps here. Store the thread's last reported target
13149 wait status.
13150 (send_sigstop): Don't clear stop_expected. Always set it,
13151 instead.
13152 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13153 (cancel_finished_single_step): New.
13154 (cancel_finished_single_steps): New.
13155 (wait_for_sigstop): Don't cancel finished single-step traps here.
13156 (linux_resume_one_lwp): Don't check for removed breakpoints.
13157 Don't set `step' on non-hardware step archs.
13158 (linux_set_resume_request): Ignore resume_stop requests if already
13159 stopping or stopped. Set the lwp's last_resume_kind.
13160 (resume_status_pending_p): Don't check for removed breakpoints.
13161 (need_step_over_p): New.
13162 (start_step_over): New.
13163 (finish_step_over): New.
13164 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13165 requests. Clear the thread's last reported target waitstatus.
13166 Don't use the `suspended' flag. Don't consider pending breakpoints.
13167 (linux_resume): Start a step-over if necessary.
13168 (proceed_one_lwp): New.
13169 (proceed_all_lwps): New.
13170 (unstop_all_lwps): New.
13171 * linux-low.h (struct lwp_info): Rewrite comment for the
13172 `suspended' flag. Add the `stop_pc' field. Delete the
13173 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13174 Add `'last_resume_kind' and `need_step_over' fields.
13175 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13176 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13177 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13178 (set_raw_breakpoint_at): New.
13179 (set_breakpoint_at): Rewrite to use it.
13180 (reinsert_breakpoint_handler): Delete.
13181 (set_reinsert_breakpoint): New.
13182 (reinsert_breakpoint_by_bp): Delete.
13183 (delete_reinsert_breakpoints): New.
13184 (uninsert_breakpoint): Rewrite.
13185 (uninsert_breakpoints_at): New.
13186 (reinsert_breakpoint): Rewrite.
13187 (reinsert_breakpoints_at): New.
13188 (check_breakpoints): Rewrite.
13189 (breakpoint_here): New.
13190 (breakpoint_inserted_here): New.
13191 (check_mem_read): Adjust.
13192 * mem-break.h (breakpoints_supported, breakpoint_here)
13193 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13194 (reinsert_breakpoint_by_bp): Delete declaration.
13195 (delete_reinsert_breakpoints): Declare.
13196 (reinsert_breakpoint): Delete declaration.
13197 (reinsert_breakpoints_at): Declare.
13198 (uninsert_breakpoint): Delete declaration.
13199 (uninsert_breakpoints_at): Declare.
13200 (check_breakpoints): Adjust prototype.
13201 * server.h: Adjust include order.
13202 (struct thread_info): Declare here. Add a `last_status' field.
13203
13204 2010-03-23 Michael Snyder <msnyder@vmware.com>
13205
13206 * server.c (crc32): New function.
13207 (handle_query): Add handling for 'qCRC:' request.
13208
13209 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13210
13211 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13212 lwp had been stopped by a watchpoint.
13213
13214 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13215
13216 * server.h (internal_error): Declare.
13217 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13218 * utils.c (internal_error): New function.
13219
13220 2010-03-15 Andreas Schwab <schwab@redhat.com>
13221
13222 * configure.srv: Fix typo setting srv_regobj.
13223
13224 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13225
13226 * linux-low.c (fetch_register): Avoid passing a non string literal
13227 format to `error'.
13228 (usr_store_inferior_registers): Ditto.
13229
13230 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13231
13232 * linux-low.c (linux_write_memory): Bail out early if peeking
13233 memory failed.
13234
13235 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13236
13237 * linux-low.h (struct lwp_info): New fields
13238 `stopped_by_watchpoint' and `stopped_data_address'.
13239 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13240 here, and cache them in the lwp object.
13241 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13242 directly.
13243 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13244 field.
13245 (linux_stopped_by_watchpoint): Rewrite.
13246 (linux_stopped_data_address): Rewrite.
13247
13248 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13249
13250 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13251 switching the current inferior, not before.
13252
13253 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13254
13255 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13256 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13257 i386-linux.c and amd64-linux.c.
13258 (reg-i386.o): Removed.
13259 (reg-i386.c): Likewise.
13260 (reg-i386-linux.o): Likewise.
13261 (reg-i386-linux.c): Likewise.
13262 (reg-x86-64.o): Likewise.
13263 (reg-x86-64.c): Likewise.
13264 (reg-x86-64-linux.o): Likewise.
13265 (reg-x86-64-linux.c): Likewise.
13266 (i386.o): New.
13267 (i386.c): Likewise.
13268 (i386-linux.o): Likewise.
13269 (i386-linux.c): Likewise.
13270 (amd64.o): Likewise.
13271 (amd64.c): Likewise.
13272 (amd64-linux.o): Likewise.
13273 (amd64-linux.c): Likewise.
13274
13275 * configure.srv (srv_i386_regobj): New.
13276 (srv_i386_linux_regobj): Likewise.
13277 (srv_amd64_regobj): Likewise.
13278 (srv_amd64_linux_regobj): Likewise.
13279 (srv_i386_32bit_xmlfiles): Likewise.
13280 (srv_i386_64bit_xmlfiles): Likewise.
13281 (srv_i386_xmlfiles): Likewise.
13282 (srv_amd64_xmlfiles): Likewise.
13283 (srv_i386_linux_xmlfiles): Likewise.
13284 (srv_amd64_linux_xmlfiles): Likewise.
13285 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13286 srv_xmlfiles to $srv_i386_xmlfiles.
13287 (i[34567]86-*-mingw32ce*): Likewise.
13288 (i[34567]86-*-mingw*): Likewise.
13289 (i[34567]86-*-nto*): Likewise.
13290 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13291 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13292 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13293 (x86_64-*-linux*): Likewise.
13294
13295 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13296 (init_registers_amd64_linux): New.
13297 (x86_arch_setup): Replace init_registers_x86_64_linux with
13298 init_registers_amd64_linux.
13299
13300 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13301
13302 * configure.ac: Check for libdl. If it is not available link against
13303 static libthread_db.
13304 * configure: Regenerate.
13305
13306 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13307
13308 PR9605
13309
13310 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13311 handing a read watchpoint.
13312 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13313
13314 2010-02-12 Doug Evans <dje@google.com>
13315
13316 * linux-low.c (linux_supports_tracefork_flag): Document.
13317 (linux_look_up_symbols): Add comment.
13318
13319 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13320
13321 * regcache.c (supply_register): Clear regcache if buf is NULL.
13322
13323 2010-02-02 Nicolas Roche <roche@sourceware.org>
13324 Joel Brobecker <brobecker@adacore.com>
13325
13326 * inferiors.c (find_inferior): Add function documentation.
13327 (unloaded_dll): Handle the case where the unloaded dll has not
13328 been previously registered in the dll list.
13329
13330 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13331
13332 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13333 (thumb2_breakpoint): New.
13334 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13335
13336 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13337
13338 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13339 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13340 breakpoints.
13341
13342 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13343
13344 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13345
13346 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13347
13348 * linux-s390-low.c (s390_collect_ptrace_register)
13349 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13350
13351 2010-01-21 Doug Evans <dje@google.com>
13352
13353 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13354 (PTRACE_ARG4_TYPE): New macro.
13355 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13356 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13357 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13358 (usr_store_inferior_registers): Ditto.
13359 (linux_read_memory, linux_write_memory): Ditto.
13360 (linux_test_for_tracefork): Ditto.
13361
13362 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13363 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13364
13365 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13366
13367 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13368 target.
13369
13370 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13371
13372 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13373 prototype to take a regcache. Adjust.
13374
13375 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13376
13377 * regcache.h (struct thread_info): Forward declare.
13378 (struct regcache): New.
13379 (new_register_cache): Adjust prototype.
13380 (get_thread_regcache): Declare.
13381 (free_register_cache): Adjust prototype.
13382 (registers_to_string, registers_from_string): Ditto.
13383 (supply_register, supply_register_by_name, collect_register)
13384 (collect_register_as_string, collect_register_by_name): Ditto.
13385 * regcache.c (struct inferior_regcache_data): Delete.
13386 (get_regcache): Rename to ...
13387 (get_thread_regcache): ... this. Adjust. Switch inferior before
13388 fetching registers.
13389 (regcache_invalidate_one): Adjust.
13390 (regcache_invalidate): Fix prototype.
13391 (new_register_cache): Return the new register cache.
13392 (free_register_cache): Change prototype.
13393 (realloc_register_cache): Adjust.
13394 (registers_to_string): Change prototype to take a regcache. Adjust.
13395 (registers_from_string): Ditto.
13396 (register_data): Ditto.
13397 (supply_register): Ditto.
13398 (supply_register_by_name): Ditto.
13399 (collect_register): Ditto.
13400 (collect_register_as_string): Ditto.
13401 (collect_register_by_name): Ditto.
13402 * server.c (process_serial_event): Adjust.
13403 * linux-low.h (regset_fill_func, regset_store_func): Change
13404 prototype.
13405 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13406 Change prototype.
13407 * linux-low.c (get_stop_pc): Adjust.
13408 (check_removed_breakpoint): Adjust.
13409 (linux_wait_for_event): Adjust.
13410 (linux_resume_one_lwp): Adjust.
13411 (fetch_register): Add regcache parameter. Adjust.
13412 (usr_store_inferior_registers): Ditto.
13413 (regsets_fetch_inferior_registers): Ditto.
13414 (regsets_store_inferior_registers): Ditto.
13415 (linux_fetch_registers, linux_store_registers): Ditto.
13416 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13417 regcache. Adjust.
13418 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13419 Ditto.
13420 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13421 prototype to take a regcache.
13422 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13423 * remote-utils.c (convert_ascii_to_int, outreg)
13424 (prepare_resume_reply): Change prototype to take a regcache.
13425 Adjust.
13426 * target.h (struct target_ops) <fetch_registers, store_registers>:
13427 Change prototype to take a regcache.
13428 (fetch_inferior_registers, store_inferior_registers): Change
13429 prototype to take a regcache. Adjust.
13430 * proc-service.c (ps_lgetregs): Adjust.
13431 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13432 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13433 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13434 take a regcache. Adjust.
13435 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13436 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13437 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13438 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13439 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13440 (cris_cannot_fetch_register):
13441 (cris_breakpoint_at): Change prototype to take a regcache.
13442 Adjust.
13443 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13444 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13445 to take a regcache. Adjust.
13446 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13447 Adjust.
13448 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13449 take a regcache. Adjust.
13450 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13451 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13452 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13453 * linux-mips-low.c (mips_get_pc):
13454 (mips_set_pc): Change prototype to take a regcache. Adjust.
13455 (mips_reinsert_addr): Adjust.
13456 (mips_collect_register): Change prototype to take a regcache.
13457 Adjust.
13458 (mips_supply_register):
13459 (mips_collect_register_32bit, mips_supply_register_32bit)
13460 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13461 (mips_store_fpregset): Ditto.
13462 * linux-ppc-low.c (ppc_supply_ptrace_register)
13463 (ppc_supply_ptrace_register): Ditto.
13464 (parse_spufs_run): Adjust.
13465 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13466 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13467 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13468 take a regcache. Adjust.
13469 * linux-s390-low.c (s390_collect_ptrace_register)
13470 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13471 (s390_set_pc): Change prototype to take a regcache. Adjust.
13472 (s390_arch_setup): Adjust.
13473 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13474 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13475 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13476 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13477 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13478 regcache. Adjust.
13479 (sparc_breakpoint_at): Adjust.
13480 * linux-xtensa-low.c (xtensa_fill_gregset):
13481 (xtensa_store_gregset):
13482 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13483 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13484 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13485 prototype to take a regcache. Adjust.
13486 * win32-arm-low.c (arm_fetch_inferior_register)
13487 (arm_store_inferior_register): Change prototype to take a
13488 regcache. Adjust.
13489 * win32-i386-low.c (i386_fetch_inferior_register)
13490 (i386_store_inferior_register): Change prototype to take a
13491 regcache. Adjust.
13492 * win32-low.c (child_fetch_inferior_registers)
13493 (child_store_inferior_registers): Change prototype to take a
13494 regcache. Adjust.
13495 (win32_wait): Adjust.
13496 (win32_fetch_inferior_registers): Change prototype to take a
13497 regcache. Adjust.
13498 (win32_store_inferior_registers): Adjust.
13499 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13500 store_inferior_register>: Change prototype to take a regcache.
13501
13502 2010-01-20 Doug Evans <dje@google.com>
13503
13504 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13505 #ifdef.
13506 (linux_wait_for_event1, linux_init_signals): Ditto.
13507 (W_STOPCODE): Provide definition if missing.
13508
13509 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13510
13511 * linux-low.c (linux_core_of_thread): New.
13512 (compare_ints, show_process, list_threads): New.
13513 (linux_qxfer_osdata): Report threads and cores.
13514 (linux_target_op): Register linux_core_of_thread.
13515 * remote-utils.c (prepare_resume_reply): Report the core.
13516 (buffer_xml_printf): Support %d specifier.
13517 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13518 New.
13519 (handle_query): Handle qXfer:threads. Announce availability
13520 thereof.
13521 * target.h (struct target_ops): New field core_of_thread.
13522
13523 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13524
13525 * Makefile.in (clean): Remove new generated files.
13526 (reg-s390.o, reg-s390.c): Remove rules.
13527 (reg-s390x.o, reg-s390x.c): Likewise.
13528 (s390-linux32.o, s390-linux32.c): Add rules.
13529 (s390-linux64.o, s390-linux64.c): Likewise.
13530 (s390x-linux64.o, s390x-linux64.c): Likewise.
13531 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13532 * linux-s390-low.c: Include <elf.h>.
13533 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13534 (init_registers_s390): Remove prototype.
13535 (init_registers_s390x): Likewise.
13536 (init_registers_s390_linux32): Add prototype.
13537 (init_registers_s390_linux64): Likewise.
13538 (init_registers_s390x_linux64): Likewise.
13539 (s390_num_regs_3264): New define.
13540 (s390_regmap_3264): New global variable.
13541 (s390_cannot_fetch_register): Remove obsolete check.
13542 (s390_cannot_store_register): Likewise.
13543 (s390_collect_ptrace_register): Handle upper/lower register halves.
13544 (s390_supply_ptrace_register): Likewise.
13545 (s390_fill_gregset): Update to register number changes.
13546 (s390_get_hwcap): New routine.
13547 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13548 Install appropriate regmap and register set.
13549
13550 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13551
13552 * server.c (gdbserver_version): Update copyright year to 2010.
13553 * gdbreplay.c (gdbreplay_version): Likewise.
13554
13555 2009-12-28 Doug Evans <dje@google.com>
13556
13557 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13558 elf/external.h. Include <elf.h> instead but only if necessary.
13559
13560 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13561
13562 * linux-low.c (linux_remove_process): Remove `detaching'
13563 parameter. Don't release/detach from thread_db here.
13564 (linux_kill): Release/detach from thread_db here, ...
13565 (linux_detach): ... and here, before actually detaching.
13566 (linux_wait_1): ... and here, when a process exits.
13567 * thread-db.c (any_thread_of): New.
13568 (thread_db_free): Switch the current inferior to a thread of the
13569 passed in process.
13570
13571 2009-12-21 Doug Evans <dje@google.com>
13572
13573 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13574
13575 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13576 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13577 warning ifndef __NR_tkill. Move setting of errno there too.
13578 Delete unnecessary resetting of errno after syscall.
13579 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13580
13581 * configure.ac: Check for dladdr.
13582 * config.in: Regenerate.
13583 * configure: Regenerate.
13584 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13585 (try_thread_db_load): Update.
13586
13587 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13588
13589 2009-12-18 Doug Evans <dje@google.com>
13590
13591 * event-loop.c: Include unistd.h if it exists.
13592
13593 * linux-low.c (my_waitpid): Move definition away from being in
13594 between linux_tracefork_child/linux_test_for_tracefork.
13595
13596 * gdb_proc_service.h (psaddr_t): Fix type.
13597 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13598 signature to match glibc.
13599
13600 2009-12-16 Doug Evans <dje@google.com>
13601
13602 * linux-low.c (linux_read_memory): Fix argument to read.
13603
13604 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13605
13606 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13607 events, don't leave current_inferior pointing at null.
13608
13609 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13610
13611 * win32-low.c (LOG): Delete.
13612 (OUTMSG): Output to stderr.
13613 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13614 on compile time LOG macro.
13615 (win32_wait): Fix debug output.
13616
13617 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13618
13619 * win32-low.c (win32_add_one_solib): If the dll name is
13620 "ntdll.dll", prepend the system directory to the dll path.
13621
13622 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13623
13624 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13625
13626 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13627 Vladimir Prus <vladimir@codesourcery.com>
13628
13629 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13630 * configure.ac: Check for __mcoldfire__ and set
13631 gdb_cv_m68k_is_coldfire.
13632 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13633 reg-cf.o and reg-m68k.o.
13634 * configure: Regenerated.
13635
13636 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13637
13638 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13639 Pass it to thread_db_free.
13640 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13641 proper `detaching' argument to linux_remove_process.
13642 * linux-low.h (thread_db_free): Add `detaching' parameter.
13643 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13644 to thread_db_free.
13645 (thread_db_free): Add `detaching' parameter. Only
13646 call td_ta_clear_event if detaching from process.
13647
13648 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13649
13650 * thread-db.c (thread_db_free): Fix typo.
13651
13652 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13653
13654 PR gdb/10838
13655 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13656
13657 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13658
13659 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13660 with an i686 compiler.
13661 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13662 needed.
13663 * configure: Rebuilt.
13664
13665 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13666
13667 PR gdb/10783
13668
13669 * server.c (handle_search_memory_1): Correct read_addr initialization
13670 in loop for searching subsequent chunks.
13671
13672 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13673
13674 * configure.ac: New --with-libthread-db option.
13675 * thread-db.c: Allow direct dependence on libthread_db.
13676 (thread_db_free): Adjust.
13677 * config.in: Regenerate.
13678 * configure: Likewise.
13679
13680 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13681
13682 PR gdb/10757
13683 * thread-db.c (attach_thread): New function.
13684 (maybe_attach_thread): Return success/failure.
13685 (find_new_threads_callback): Adjust.
13686 (thread_db_find_new_threads): Loop until no new threads.
13687
13688 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13689
13690 * proc-service.c (ps_lgetregs): Formatting.
13691
13692 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13693
13694 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13695 * configure.ac: Adjust.
13696 * linux-low.h (struct process_info_private): Move members to struct
13697 thread_db.
13698 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13699 * linux-low.c (linux_remove_process): Adjust.
13700 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13701 * server.c (handle_query): Move code ...
13702 (handle_monitor_command): ... here. New function.
13703 * target.h (struct target_ops): New member.
13704 * thread-db.c (struct thread_db): New.
13705 (libthread_db_search_path): New variable.
13706 (thread_db_create_event, thread_db_enable_reporting)
13707 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13708 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13709 (try_thread_db_load_1, dladdr_to_soname): New functions.
13710 (try_thread_db_load, thread_db_load_search): New functions.
13711 (thread_db_init): Search for libthread_db.
13712 (thread_db_free): New function.
13713 (thread_db_handle_monitor_command): Likewise.
13714 * config.in: Regenerate.
13715 * configure: Regenerate.
13716
13717 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13718
13719 * spu-low.c (spu_kill): Wait for inferior to terminate.
13720 Call clear_inferiors.
13721 (spu_detach): Call clear_inferiors.
13722
13723 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13724
13725 * aclocal.m4: Regenerate.
13726 * config.in: Likewise.
13727 * configure: Likewise.
13728
13729 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13730
13731 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13732 (parse_spufs_run): New function.
13733 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13734 (ppc_breakpoint_at): Handle SPU breakpoints.
13735
13736 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13737
13738 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13739 (SPUFS_MAGIC): Define.
13740 (spu_enumerate_spu_ids): New function.
13741 (linux_qxfer_spu): New function.
13742 (linux_target_ops): Install linux_qxfer_spu.
13743
13744 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13745
13746 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13747 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13748 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13749 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13750 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13751 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13752 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13753 (init_registers_powerpc_cell32l): Add prototype.
13754 (init_registers_powerpc_cell64l): Likewise.
13755 (ppc_arch_setup): Detect Cell/B.E. architecture.
13756
13757 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13758
13759 * Makefile.in (datarootdir): New variable.
13760
13761 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13762
13763 * linux-low.c (linux_write_memory): Update debugging output.
13764 * Makefile.in (clean): Add new descriptions.
13765 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13766 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13767 * configure.srv: Add new files for arm*-*-linux*.
13768 * linux-arm-low.c: Add new declarations.
13769 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13770 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13771 (HWCAP_VFPv3D16): New.
13772 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13773 instead of __IWMMXT__.
13774 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13775 (arm_arch_setup): New.
13776 (target_regsets): Remove #ifdef. Add VFP regset.
13777 (the_low_target): Use arm_arch_setup.
13778
13779 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13780
13781 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13782 the main thread again.
13783
13784 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13785
13786 Adding Neutrino gdbserver.
13787 * configure: Regenerated.
13788 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13789 * configure.srv (i[34567]86-*-nto*): New target.
13790 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13791 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13792 (nto_comctrl) [__QNX__]: New function.
13793 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13794
13795 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13796
13797 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13798 srv_tgtobj.
13799
13800 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13801 Pedro Alves <pedro@codesourcery.com>
13802
13803 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13804 don't support CONTEXT_EXTENDED_REGISTERS.
13805 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13806 (the_low_target): Install them.
13807 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13808 failing with ERROR_PIPE_NOT_CONNECTED.
13809
13810 2009-06-30 Doug Evans <dje@google.com>
13811 Pierre Muller <muller@ics.u-strasbg.fr>
13812
13813 Add h/w watchpoint support to x86-linux, win32-i386.
13814 * Makefile.in (SFILES): Add i386-low.c
13815 (i386_low_h): Define.
13816 (i386-low.o): Add dependencies.
13817 (linux-x86-low.o): Add i386-low.h dependency.
13818 (win32-i386-low.o): Ditto.
13819 * i386-low.c: New file.
13820 * i386-low.h: New file.
13821 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13822 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13823 * linux-low.c (linux_add_process): Initialize arch_private.
13824 (linux_remove_process): Free arch_private.
13825 (add_lwp): Initialize arch_private.
13826 (delete_lwp): Free arch_private.
13827 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13828 provided.
13829 * linux-low.h (process_info_private): New member arch_private.
13830 (lwp_info): New member arch_private.
13831 (linux_target_ops): New members new_process, new_thread,
13832 prepare_to_resume.
13833 (ptid_of): New macro.
13834 * linux-x86-low.c: Include stddef.h, i386-low.h.
13835 (arch_process_info): New struct.
13836 (arch_lwp_info): New struct.
13837 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13838 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13839 (i386_dr_low_get_status): New function.
13840 (x86_insert_point, x86_remove_point): New functions.
13841 (x86_stopped_by_watchpoint): New function.
13842 (x86_stopped_data_address): New function.
13843 (x86_linux_new_process, x86_linux_new_thread): New functions.
13844 (x86_linux_prepare_to_resume): New function.
13845 (the_low_target): Add entries for insert_point, remove_point,
13846 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13847 prepare_to_resume.
13848 * server.c (debug_hw_points): New global.
13849 (monitor_show_help): Document set debug-hw-points.
13850 (handle_query): Process "set debug-hw-points".
13851 * server.h (debug_hw_points): Declare.
13852 (paddress): Declare.
13853 * utils.c (NUMCELLS, CELLSIZE): New macros.
13854 (get_sell, xsnprintf, paddress): New functions.
13855 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13856 remove_point, stopped_by_watchpoint, stopped_data_address.
13857 * win32-i386-low.c: Include i386-low.h.
13858 (debug_reg_state): Replaces dr.
13859 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13860 (i386_dr_low_get_status): New function.
13861 (i386_insert_point, i386_remove_point): New functions.
13862 (i386_stopped_by_watchpoint): New function.
13863 (i386_stopped_data_address): New function.
13864 (i386_initial_stuff): Update.
13865 (get_thread_context,set_thread_context,i386_thread_added): Update.
13866 (the_low_target): Add entries for insert_point,
13867 remove_point, stopped_by_watchpoint, stopped_data_address.
13868 * win32-low.c (win32_insert_watchpoint): New function.
13869 (win32_remove_watchpoint): New function.
13870 (win32_stopped_by_watchpoint): New function.
13871 (win32_stopped_data_address): New function.
13872 (win32_target_ops): Add entries for insert_watchpoint,
13873 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13874 * win32-low.h (win32_target_ops): New members insert_point,
13875 remove_point, stopped_by_watchpoint, stopped_data_address.
13876
13877 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13878
13879 * server.c (process_serial_event): Re-return unsupported, not
13880 error, if the type isn't recognized. Re-allow supporting only
13881 insert or remove packets. Also call require_running for
13882 breakpoints. Add missing break statement to default case. Tidy.
13883 * target.h (struct target_ops): Rename insert_watchpoint to
13884 insert_point, and remove_watchpoint to remove_point.
13885
13886 * linux-low.h (struct linux_target_ops): Likewise.
13887 * linux-low.c (linux_insert_watchpoint): Rename to ...
13888 (linux_insert_point): ... this. Adjust.
13889 (linux_remove_watchpoint): Rename to ...
13890 (linux_remove_point): ... this. Adjust.
13891 (linux_target_ops): Adjust.
13892 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13893 (cris_insert_point): ... this.
13894 (cris_remove_watchpoint): Rename to ...
13895 (cris_remove_point): ... this.
13896 (the_low_target): Adjust.
13897
13898 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13899
13900 * server.c (handle_v_kill): Pass signal_pid to
13901 kill_inferior if multi_process is zero.
13902
13903 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13904
13905 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13906 * target.h (target_ops): Comment for *_watchpoint to make it clear
13907 the functions can get types '0' and '1'.
13908
13909 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13910
13911 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13912 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13913 * regcache.c (get_regcache): Likewise.
13914 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13915 * win32-low.c (child_fetch_inferior_registers): Remove check for
13916 regno 0.
13917
13918 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13919 Pedro Alves <pedro@codesourcery.com>
13920
13921 * target.h (struct target_ops) <supports_multi_process>: New
13922 callback.
13923 (target_supports_multi_process): New.
13924 * server.c (handle_query): Even if GDB reports support, only
13925 enable multi-process if the target also supports it. Report
13926 multi-process support only if the target backend supports it.
13927 * linux-low.c (linux_supports_multi_process): New function.
13928 (linux_target_ops): Install it as target_supports_multi_process
13929 callback.
13930
13931 2009-05-24 Doug Evans <dje@google.com>
13932
13933 Global renaming of find_thread_pid to find_thread_ptid.
13934 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13935 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13936 All callers updated.
13937
13938 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13939 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13940 directly.
13941
13942 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13943 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13944 (linux_resume_one_lwp): Ditto.
13945
13946 2009-05-23 Doug Evans <dje@google.com>
13947
13948 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13949 from struct inferior_list_entry * to struct lwp_info *.
13950 All callers updated.
13951
13952 2009-05-13 Doug Evans <dje@google.com>
13953
13954 * linux-x86-low.c: Don't include assert.h.
13955 (x86_siginfo_fixup): Use fatal, not assert.
13956 (x86_arch_setup): Fix comment.
13957
13958 2009-05-12 Doug Evans <dje@google.com>
13959
13960 Biarch support for i386/amd64 gdbserver.
13961 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13962 Add linux-x86-low.c.
13963 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13964 (linux-x86-low.o): Add.
13965 * linux-x86-64-low.c: Delete.
13966 * linux-i386-low.c: Delete.
13967 * linux-x86-low.c: New file.
13968 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13969 linux-x86-low.o.
13970 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13971 linux-x86-low.o.
13972 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13973 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13974 (linux_child_pid_to_exec_file): New function.
13975 (elf_64_header_p, elf_64_file_p): New functions.
13976 (siginfo_fixup): New function.
13977 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13978 give target a chance to convert layout.
13979 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13980 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13981
13982 2009-05-07 Doug Evans <dje@google.com>
13983
13984 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13985 (regsets_store_inferior_registers): Ditto.
13986
13987 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13988
13989 PR server/10048
13990
13991 * linux-low.c (must_set_ptrace_flags): Delete.
13992 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13993 of the global.
13994 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13995 `lwp->must_set_ptrace_flags' instead.
13996 (linux_wait_for_event_1): Set ptrace options here.
13997 (linux_wait_1): ... not here.
13998
13999 2009-04-30 Doug Evans <dje@google.com>
14000
14001 * inferiors.c (started_inferior_callback): New function.
14002 (attached_inferior_callback): New function.
14003 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
14004 * server.c (print_started_pid, print_attached_pid): New functions.
14005 (detach_or_kill_for_exit): New function.
14006 (main): Call it instead of for_each_inferior (kill_inferior_callback).
14007 * server.h (have_started_inferiors_p): Declare.
14008 (have_attached_inferiors_p): Declare.
14009
14010 * inferiors.c (remove_process): Fix memory leak, free process.
14011 * linux-low.c (linux_remove_process): New function.
14012 (linux_kill): Call it instead of remove_process.
14013 (linux_detach, linux_wait_1): Ditto.
14014
14015 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
14016
14017 * configure.srv: Add x86 Windows CE target.
14018
14019 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14020
14021 * inferiors.c (get_thread_process): Make global.
14022 * server.h (get_thread_process): Add prototype.
14023 * thread-db.c (find_one_thread): Use get_thread_process
14024 instead of current_process.
14025 (thread_db_get_tls_address): Do not crash if called when
14026 thread layer is not yet initialized.
14027
14028 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
14029
14030 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
14031 * spu-low.c (current_tid): Rename to ...
14032 (current_ptid): ... this.
14033 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
14034 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
14035 ptid_get_lwp (current_ptid) instead of current_tid.
14036 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
14037 instead of current_tid. Use find_process_pid to verify pid
14038 argument is valid. Pass proper argument to remove_process.
14039 (spu_thread_alive): Compare current_ptid instead of current_tid.
14040 (spu_resume): Likewise.
14041
14042 2009-04-02 Pedro Alves <pedro@codesourcery.com>
14043
14044 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
14045 variable.
14046
14047 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14048
14049 Implement the multiprocess extensions, and add linux multiprocess
14050 support.
14051
14052 * server.h (ULONGEST): Declare.
14053 (struct ptid, ptid_t): New.
14054 (minus_one_ptid, null_ptid): Declare.
14055 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14056 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
14057 (struct inferior_list_entry): Change `id' type from unsigned from
14058 to ptid_t.
14059 (struct sym_cache, struct breakpoint, struct
14060 process_info_private): Forward declare.
14061 (struct process_info): Declare.
14062 (current_process): Declare.
14063 (all_processes): Declare.
14064 (initialize_inferiors): Declare.
14065 (add_thread): Adjust to use ptid_t.
14066 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
14067 (add_process, remove_process, find_thread_pid): Declare.
14068 (find_inferior_id): Adjust to use ptid_t.
14069 (cont_thread, general_thread, step_thread): Change type to ptid_t.
14070 (multi_process): Declare.
14071 (push_event): Adjust to use ptid_t.
14072 (read_ptid, write_ptid): Declare.
14073 (prepare_resume_reply): Adjust to use ptid_t.
14074 (clear_symbol_cache): Declare.
14075 * inferiors.c (all_processes): New.
14076 (null_ptid, minus_one_ptid): New.
14077 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14078 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14079 (add_thread): Change unsigned long to ptid. Remove gdb_id
14080 parameter. Adjust.
14081 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14082 (gdb_id_to_thread): Rename to ...
14083 (find_thread_pid): ... this. Change unsigned long to ptid.
14084 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14085 (loaded_dll, pull_pid_from_list): Adjust.
14086 (add_process, remove_process, find_process_pid)
14087 (get_thread_process, current_process, initialize_inferiors): New.
14088 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14089 (struct target_waitstatus) <related_pid>: Ditto.
14090 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14091 return type to int.
14092 (struct target_ops) <join>: Add `pid' argument.
14093 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14094 (struct target_ops) <wait>: Add `ptid' field. Change return type
14095 to ptid.
14096 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14097 (mywait): Add `ptid' argument. Change return type to ptid_t.
14098 (target_pid_to_str): Declare.
14099 * target.c (set_desired_inferior): Adjust to use ptids.
14100 (mywait): Add new `ptid' argument. Adjust.
14101 (target_pid_to_str): New.
14102 * mem-break.h (free_all_breakpoints): Declare.
14103 * mem-break.c (breakpoints): Delelete.
14104 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14105 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14106 to use per-process breakpoint list.
14107 (free_all_breakpoints): New.
14108 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14109 (symbol_cache, all_symbols_looked_up): Delete.
14110 (hexchars): New.
14111 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14112 read_ptid): New.
14113 (prepare_resume_reply): Change ptid argument's type from unsigned
14114 long to ptid_t. Adjust. Implement W;process and X;process.
14115 (free_sym_cache, clear_symbol_cache): New.
14116 (look_up_one_symbol): Adjust to per-process symbol cache. *
14117 * server.c (cont_thread, general_thread, step_thread): Change type
14118 to ptid_t.
14119 (attached): Delete.
14120 (multi_process): New.
14121 (last_ptid): Change type to ptid_t.
14122 (struct vstop_notif) <ptid>: Change type to ptid_t.
14123 (queue_stop_reply, push_event): Change `ptid' argument's type to
14124 ptid_t.
14125 (discard_queued_stop_replies): Add `pid' argument.
14126 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14127 changes. Don't reference the `attached' global.
14128 (attach_inferior): Adjust to mywait interface changes.
14129 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14130 features. Handle and report "multiprocess+". Handle
14131 "qAttached:PID".
14132 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14133 changes.
14134 (handle_v_kill): New.
14135 (handle_v_stopped): Adjust to use target_pid_to_str.
14136 (handle_v_requests): Allow multiple attaches and runs when
14137 multiprocess extensions are in effect. Handle "vKill".
14138 (myresume): Adjust to use ptids.
14139 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14140 (handle_status): Adjust to discard_queued_stop_replies interface
14141 change.
14142 (first_thread_of, kill_inferior_callback)
14143 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14144 (main): Call initialize_inferiors. Adjust to use ptids, killing
14145 and detaching from all inferiors. Handle multiprocess packet
14146 variants.
14147 * linux-low.h: Include gdb_proc_service.h.
14148 (struct process_info_private): New.
14149 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14150 <lwpid_of>: Use ptid_get_lwp.
14151 (get_lwp_thread): Adjust.
14152 (struct lwp_info): Add `dead' member.
14153 (find_lwp_pid): Declare.
14154 * linux-low.c (thread_db_active): Delete.
14155 (new_inferior): Adjust comment.
14156 (inferior_pid): Delete.
14157 (linux_add_process): New.
14158 (handle_extended_wait): Adjust.
14159 (add_lwp): Change unsigned long to ptid.
14160 (linux_create_inferior): Add process to processes table. Adjust
14161 to use ptids. Don't set new_inferior here.
14162 (linux_attach_lwp): Rename to ...
14163 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14164 it. Adjust to use ptids.
14165 (linux_attach_lwp): New.
14166 (linux_attach): Add process to processes table. Don't set
14167 new_inferior here.
14168 (struct counter): New.
14169 (second_thread_of_pid_p, last_thread_of_process_p): New.
14170 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14171 multiple processes.
14172 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14173 processes. Remove process from process table.
14174 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14175 to multiple processes.
14176 (any_thread_of): New.
14177 (linux_detach): Add `pid' argument, and handle it. Remove process
14178 from processes table.
14179 (linux_join): Add `pid' argument. Handle it.
14180 (linux_thread_alive): Change unsighed long argument to ptid_t.
14181 Consider dead lwps as not being alive.
14182 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14183 threads we're not interested in.
14184 (same_lwp, find_lwp_pid): New.
14185 (linux_wait_for_lwp): Change `pid' argument's type from int to
14186 ptid_t. Adjust.
14187 (linux_wait_for_event): Rename to ...
14188 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14189 from int to ptid_t. Adjust.
14190 (linux_wait_for_event): New.
14191 (linux_wait_1): Add `ptid' argument. Change return type to
14192 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14193 that exit from the process table.
14194 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14195 Adjust.
14196 (mark_lwp_dead): New.
14197 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14198 stopping all threads, mark its main lwp as dead.
14199 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14200 ptids.
14201 (fetch_register, usr_store_inferior_registers)
14202 (regsets_fetch_inferior_registers)
14203 (regsets_store_inferior_registers, linux_read_memory)
14204 (linux_write_memory): Inline `inferior_pid'.
14205 (linux_look_up_symbols): Adjust to use per-process
14206 `thread_db_active'.
14207 (linux_request_interrupt): Adjust to use ptids.
14208 (linux_read_auxv): Inline `inferior_pid'.
14209 (initialize_low): Don't reference thread_db_active.
14210 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14211 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14212 (ps_getpid): Return the pid of the current inferior.
14213 * thread-db.c (proc_handle, thread_agent): Delete.
14214 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14215 per-process data.
14216 (find_one_thread): Change argument type to ptid_t. Adjust to
14217 per-process data.
14218 (maybe_attach_thread): Adjust to per-process data and ptids.
14219 (thread_db_find_new_threads): Ditto.
14220 (thread_db_init): Ditto.
14221 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14222 processes table. Adjust to use ptids.
14223 (spu_kill, spu_detach): Adjust interface. Remove process from
14224 processes table.
14225 (spu_join, spu_thread_alive): Adjust interface.
14226 (spu_wait): Adjust interface. Remove process from processes
14227 table. Adjust to use ptids.
14228 * win32-low.c (current_inferior_tid): Delete.
14229 (current_inferior_ptid): New.
14230 (debug_event_ptid): New.
14231 (thread_rec): Take a ptid. Adjust.
14232 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14233 (child_delete_thread): Ditto.
14234 (do_initial_child_stuff): Add `attached' argument. Add process to
14235 processes table.
14236 (child_fetch_inferior_registers, child_store_inferior_registers):
14237 Adjust.
14238 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14239 (win32_attach): Pass 1 to do_initial_child_stuff.
14240 (win32_kill): Adjust interface. Remove process from processes
14241 table.
14242 (win32_detach): Ditto.
14243 (win32_join): Adjust interface.
14244 (win32_thread_alive): Take a ptid.
14245 (win32_resume): Adjust to use ptids.
14246 (get_child_debug_event): Ditto.
14247 (win32_wait): Adjust interface. Remove exiting process from
14248 processes table.
14249
14250 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14251
14252 Non-stop mode support.
14253
14254 * server.h (non_stop): Declare.
14255 (gdb_client_data, handler_func): Declare.
14256 (delete_file_handler, add_file_handler, start_event_loop):
14257 Declare.
14258 (handle_serial_event, handle_target_event, push_event)
14259 (putpkt_notif): Declare.
14260 * target.h (enum resume_kind): New.
14261 (struct thread_resume): Replace `step' field by `kind' field.
14262 (TARGET_WNOHANG): Define.
14263 (struct target_ops) <wait>: Add `options' argument.
14264 <supports_non_stop, async, start_non_stop>: New fields.
14265 (target_supports_non_stop, target_async): New.
14266 (start_non_stop): Declare.
14267 (mywait): Add `options' argument.
14268 * target.c (mywait): Add `options' argument. Print child exit
14269 notifications here.
14270 (start_non_stop): New.
14271 * server.c (non_stop, own_buf, mem_buf): New globals.
14272 (struct vstop_notif): New.
14273 (notif_queue): New global.
14274 (queue_stop_reply, push_event, discard_queued_stop_replies)
14275 (send_next_stop_reply): New.
14276 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14277 interface changes.
14278 (attach_inferior): In non-stop mode, don't wait for the target
14279 here.
14280 (handle_general_set): Handle QNonStop.
14281 (handle_query): When handling qC, return the current general
14282 thread, instead of the first thread of the list.
14283 (handle_query): If the backend supports non-stop mode, include
14284 QNonStop+ in the qSupported query response.
14285 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14286 and non-stop mode.
14287 (handle_v_attach, handle_v_run): Handle non-stop mode.
14288 (handle_v_stopped): New.
14289 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14290 (myresume): Adjust to use resume_kind. Handle non-stop.
14291 (queue_stop_reply_callback): New.
14292 (handle_status): Handle non-stop mode.
14293 (main): Clear non_stop flag on reconnection. Use the event-loop.
14294 Refactor serial protocol handling from here ...
14295 (process_serial_event): ... to this new function. When GDB
14296 selects any thread, select one here. In non-stop mode, wait until
14297 GDB acks all pending events before exiting.
14298 (handle_serial_event, handle_target_event): New.
14299 * remote-utils.c (remote_open): Install remote_desc in the event
14300 loop.
14301 (remote_close): Remove remote_desc from the event loop.
14302 (putpkt_binary): Rename to...
14303 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14304 (putpkt_binary): New as wrapper around putpkt_binary_1.
14305 (putpkt_notif): New.
14306 (prepare_resume_reply): In non-stop mode, don't change the
14307 general_thread.
14308 * event-loop.c: New.
14309 * Makefile.in (OBJ): Add event-loop.o.
14310 (event-loop.o): New rule.
14311
14312 * linux-low.h (pid_of): Moved here.
14313 (lwpid_of): New.
14314 (get_lwp_thread): Use lwpid_of.
14315 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14316 * linux-low.c (pid_of): Delete.
14317 (inferior_pid): Use lwpid_of.
14318 (linux_event_pipe): New.
14319 (target_is_async_p): New.
14320 (delete_lwp): New.
14321 (handle_extended_wait): Use lwpid_of.
14322 (add_lwp): Don't set lwpid field.
14323 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14324 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14325 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14326 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14327 first. Adjust to linux_wait_for_event interface changes. Use
14328 lwpid_of.
14329 (linux_detach): Don't delete the main lwp here.
14330 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14331 (status_pending_p): Don't consider explicitly suspended lwps.
14332 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14333 pointer. Add OPTIONS argument. Change return type to int. Use
14334 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14335 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14336 pointer. Add status pointer argument. Return a pid instead of a
14337 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14338 changes. In non-stop mode, don't switch to a random thread.
14339 (linux_wait): Rename to...
14340 (linux_wait_1): ... this. Add target_options argument, and handle
14341 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14342 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14343 clean exit and signal exit code. Don't stop all threads in
14344 non-stop mode. In all-stop mode, only stop all threads when
14345 reporting a stop to GDB. Handle explicit thread stop requests.
14346 (async_file_flush, async_file_mark): New.
14347 (linux_wait): New.
14348 (send_sigstop): Use lwpid_of.
14349 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14350 interface changes. In non-stop mode, don't switch to a random
14351 thread.
14352 (linux_resume_one_lwp): Use lwpid_of.
14353 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14354 (linux_resume_one_thread): ... this. Handle resume_stop. In
14355 non-stop mode, don't look for pending flag in all threads.
14356 (resume_status_pending_p): Don't consider explicitly suspended
14357 threads.
14358 (my_waitpid): Reimplement. Emulate __WALL.
14359 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14360 Use lwpid_of.
14361 (sigchld_handler, linux_supports_non_stop, linux_async)
14362 (linux_start_non_stop): New.
14363 (linux_target_ops): Register linux_supports_non_stop, linux_async
14364 and linux_start_non_stop.
14365 (initialize_low): Install SIGCHLD handler.
14366 * thread-db.c (thread_db_create_event, find_one_thread)
14367 (thread_db_get_tls_address): Use lwpid_of.
14368 * win32-low.c (win32_detach): Adjust to use resume_kind.
14369 (win32_wait): Add `options' argument.
14370 * spu-low.c (spu_resume): Adjust to use resume_kind.
14371 (spu_wait): Add `options' argument.
14372
14373 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14374
14375 Decouple target code from remote protocol.
14376
14377 * target.h (enum target_waitkind): New.
14378 (struct target_waitstatus): New.
14379 (struct target_ops) <wait>: Return an unsigned long. Take a
14380 target_waitstatus pointer instead of a char pointer.
14381 (mywait): Likewise.
14382 * target.c (mywait): Change prototype to return an unsigned long.
14383 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14384 * server.h (thread_from_wait, old_thread_from_wait): Delete
14385 declarations.
14386 (prepare_resume_reply): Change prototype to take a
14387 target_waitstatus.
14388 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14389 (last_status, last_ptid): New.
14390 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14391 pid instead of a signal.
14392 (attach_inferior): Remove "status" and "signal" parameters.
14393 Adjust.
14394 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14395 not as an address.
14396 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14397 (handle_v_requests, myresume): Remove "status" and "signal"
14398 parameters. Adjust.
14399 (handle_status): New.
14400 (main): Delete local `status'. Adjust.
14401 * remote-utils.c: Include target.h.
14402 (prepare_resume_reply): Change prototype to take a
14403 target_waitstatus. Adjust.
14404
14405 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14406 interface.
14407 * spu-low.c (spu_wait): Adjust.
14408 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14409 Delete.
14410 (win32_wait): Adjust.
14411
14412 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14413
14414 * target.h (struct thread_resume): Delete leave_stopped member.
14415 (struct target_ops): Add a `n' argument to the `resume' callback.
14416 * server.c (start_inferior): Adjust.
14417 (handle_v_cont, myresume): Adjust.
14418 * linux-low.c (check_removed_breakpoint): Adjust to resume
14419 interface change, and to removed leave_stopped field.
14420 (resume_ptr): Delete.
14421 (struct thread_resume_array): New.
14422 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14423 resume interface change.
14424 (linux_continue_one_thread, linux_queue_one_thread)
14425 (resume_status_pending_p): Check if the resume field is NULL
14426 instead of checking the leave_stopped member.
14427 (linux_resume): Adjust to the target resume interface change.
14428 * spu-low.c (spu_resume): Adjust to the target resume interface
14429 change.
14430 * win32-low.c (win32_detach, win32_resume): Ditto.
14431
14432 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14433
14434 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14435 flag.
14436 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14437 pending.
14438 (linux_continue_one_thread): Only preserve the stepping flag if
14439 there's a pending breakpoint.
14440
14441 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14442
14443 * server.c (main): After the inferior having exited, call
14444 remote_close before exiting gdbserver.
14445
14446 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14447
14448 Fix size of FPSCR in Power 7 processors.
14449 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14450 (PPC_FEATURE_HAS_DFP): New #define.
14451 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14452 size of the FPSCR.
14453
14454 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14455
14456 * server.c (handle_query) Whitespace and formatting.
14457
14458 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14459
14460 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14461 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14462 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14463 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14464 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14465 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14466 Makefile.in, configure.ac: Fix whitespace throughout.
14467 * configure: Regenerate.
14468
14469 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14470
14471 * inferiors.c (find_inferior): Make it safe for the callback
14472 function to delete the currently iterated inferior.
14473
14474 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14475
14476 * Makefile.in (linuw_low_h): Move higher.
14477 (thread-db.o): Depend on $(linux_low_h).
14478
14479 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14480
14481 Rename "process" to "lwp" throughout.
14482
14483 * linux-low.c (all_processes): Rename to...
14484 (all_lwps): ... this.
14485 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14486 (add_process): Rename to ...
14487 (add_lwp): ... this. Adjust.
14488 (linux_create_inferior): Adjust.
14489 (linux_attach_lwp): Adjust.
14490 (linux_attach): Adjust.
14491 (linux_kill_one_process): Rename to ...
14492 (linux_kill_one_lwp): ... this. Adjust.
14493 (linux_kill): Adjust.
14494 (linux_detach_one_process): Rename to ...
14495 (linux_detach_one_lwp): ... this. Adjust.
14496 (linux_detach): Adjust.
14497 (check_removed_breakpoint): Adjust.
14498 (status_pending_p): Adjust.
14499 (linux_wait_for_process): Rename to ...
14500 (linux_wait_for_lwp): ... this. Adjust.
14501 (linux_wait_for_event): Adjust.
14502 (send_sigstop): Adjust.
14503 (wait_for_sigstop): Adjust.
14504 (stop_all_processes): Rename to ...
14505 (stop_all_lwps): ... this.
14506 (linux_resume_one_process): Rename to ...
14507 (linux_resume_one_lwp): ... this. Adjust.
14508 (linux_set_resume_request, linux_continue_one_thread)
14509 (linux_queue_one_thread, resume_status_pending_p)
14510 (usr_store_inferior_registers, regsets_store_inferior_registers)
14511 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14512 Adjust.
14513 * linux-low.h (get_process): Rename to ...
14514 (get_lwp): ... this. Adjust.
14515 (get_thread_process): Rename to ...
14516 (get_thread_lwp): ... this. Adjust.
14517 (get_process_thread): Rename to ...
14518 (get_lwp_thread): ... this. Adjust.
14519 (struct process_info): Rename to ...
14520 (struct lwp_info): ... this.
14521 (all_processes): Rename to ...
14522 (all_lwps): ... this.
14523 * proc-service.c (ps_lgetregs): Adjust.
14524 * thread-db.c (thread_db_create_event, find_one_thread)
14525 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14526
14527 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14528
14529 * server.c (handle_query): Handle "qAttached".
14530
14531 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14532
14533 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14534 GPLv3, update license URL.
14535
14536 2009-03-01 Doug Evans <dje@google.com>
14537
14538 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14539 (server_h): Add gdb_signals.h.
14540 (signals.o): Update.
14541 * server.h (target_signal_from_host,target_signal_to_host_p)
14542 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14543
14544 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14545
14546 * remote-utils.c (getpkt): Also generate remote-debug
14547 information if noack_mode is set.
14548
14549 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14550
14551 * server.c (handle_query): Report qXfer:siginfo:read and
14552 qXfer:siginfo:write as supported and handle them.
14553 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14554 * linux-low.c (linux_xfer_siginfo): New.
14555 (linux_target_ops): Set it.
14556
14557 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14558
14559 * server.c (gdbserver_usage): Mention --remote-debug.
14560 (main): Accept '--remote-debug' switch.
14561
14562 2009-01-18 Doug Evans <dje@google.com>
14563
14564 * regcache.c (new_register_cache): No need to check result of xcalloc.
14565 * server.c (handle_search_memory): Back out calls to xmalloc,
14566 result is checked and error is returned to user upon failure.
14567 (handle_query): Ditto. Add more checks for result of malloc.
14568 (handle_v_cont): Check result of malloc, report error back to
14569 user upon failure.
14570 (handle_v_run): Ditto. Call freeargv.
14571 * server.h (freeargv): Declare.
14572 * utils.c (freeargv): New fn.
14573
14574 2009-01-15 Doug Evans <dje@google.com>
14575
14576 * gdbreplay.c (perror_with_name): Make arg const char *.
14577 * server.h (target_signal_to_name): Make return type const char *.
14578 * thread-db.c (thread_db_err_str): Make return type const char *.
14579 * utils.c (perror_with_name): Make arg const char *.
14580
14581 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14582
14583 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14584 when handling a EXIT_PROCESS_DEBUG_EVENT.
14585
14586 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14587
14588 * gdbreplay.c (gdbreplay_version): Update copyright year.
14589 * server.c (gdbserver_version): Likewise.
14590
14591 2009-01-05 Doug Evans <dje@google.com>
14592
14593 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14594 (handle_extended_wait): Improve comment.
14595
14596 2008-12-13 Doug Evans <dje@google.com>
14597
14598 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14599 * server.h (ATTR_MALLOC): New macro.
14600 (xmalloc,xcalloc,xstrdup): Declare.
14601 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14602 * inferiors.c: Ditto.
14603 * linux-low.c: Ditto.
14604 * mem-break.c: Ditto.
14605 * regcache.c: Ditto.
14606 * remote-utils.c: Ditto.
14607 * server.c: Ditto.
14608 * target.c: Ditto.
14609 * win32-low.c: Ditto.
14610
14611 2008-12-12 Doug Evans <dje@google.com>
14612
14613 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14614 in debugging printf.
14615
14616 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14617
14618 2008-12-09 Doug Evans <dje@google.com>
14619
14620 * linux-low.h (struct process_info): Delete member tid, unused.
14621 * thread-db.c (find_one_thread): Update.
14622 (maybe_attach_thread): Update.
14623
14624 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14625
14626 * target.h (struct target_ops): Add qxfer_osdata member.
14627 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14628 and dirent.h.
14629 (linux_qxfer_osdata): New functions.
14630 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14631 callback.
14632 * server.c (handle_query): Handle "qXfer:osdata:read:".
14633 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14634 (buffer_xml_printf): New functions.
14635 * server.h (struct buffer): New.
14636 (buffer_grow_str, buffer_grow_str0): New macros.
14637 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14638 (buffer_xml_printf): Declare.
14639
14640 2008-11-24 Doug Evans <dje@google.com>
14641
14642 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14643
14644 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14645
14646 * server.c (handle_v_run): Always use the supplied argument list.
14647
14648 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14649
14650 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14651 (xtensa_regmap_table): Add entry for scompare1.
14652
14653 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14654
14655 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14656 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14657 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14658 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14659 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14660 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14661 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14662 XML target descriptions.
14663 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14664 when inferior is running on an ISA 2.05 or later processor. Add
14665 special case to return offset for full 64-bit slot of FPSCR when
14666 in 32-bits.
14667
14668 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14669
14670 * Makefile.in (SFILES, clean): Added sparc64 files.
14671 (reg-sparc64.o, reg-sparc64.c): New.
14672 * configure.srv (sparc*-*-linux*): New configuration.
14673 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14674 syscall arguments for SPARC.
14675 (regsets_store_inferior_registers): Likewise.
14676 * linux-sparc-low.c: New file.
14677
14678 2008-10-21 Doug Evans <dje@google.com>
14679
14680 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14681 (READLINE_DIR,READLINE_DEP): Delete.
14682 (INTERNAL_CFLAGS): Update.
14683 (LINTFLAGS): Update.
14684
14685 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14686
14687 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14688 whole argv from the last run, not just argv[0].
14689
14690 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14691
14692 * regcache.c (new_register_cache): Return NULL if the register
14693 cache size isn't known yet.
14694 (free_register_cache): Avoid dereferencing a NULL regcache.
14695
14696 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14697
14698 * configure.srv: Merge MIPS and MIPS64.
14699
14700 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14701
14702 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14703
14704 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14705
14706 * Makefile.in: Add required vsx dependencies.
14707
14708 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14709 Declare init_registers_powerpc_vsx32l.
14710 Declare init_registers_powerpc_vsx64l.
14711 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14712 (ppc_arch_setup): Check for VSX in hwcap.
14713 (ppc_fill_vsxregset): New function.
14714 (ppc_store_vsxregset): New function.
14715 Add new VSX entry in regset_info target_regsets.
14716
14717 * configure.srv: Add new VSX dependencies.
14718
14719 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14720
14721 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14722 (remote_open): Set or clear transport_is_reliable.
14723 (putpkt_binary): Don't expect acks in noack mode.
14724 (getpkt): Don't send ack/nac in noack mode.
14725 * server.c (handle_general_set): Handle QStartNoAckMode.
14726 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14727 qSupported.
14728 (main): Reset noack_mode on every connection.
14729 * server.h (noack_mode): Declare.
14730
14731 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14732
14733 * Makefile.in (GDBREPLAY_OBS): New variable.
14734 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14735
14736 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14737 Daniel Jacobowitz <dan@codesourcery.com>
14738
14739 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14740 (usr_store_inferior_registers): Likewise.
14741 (regsets_store_inferior_registers): Likewise.
14742
14743 2008-07-31 Rolf Jansen <rj@surtec.com>
14744 Pedro Alves <pedro@codesourcery.com>
14745
14746 * configure.ac: Check for memmem declaration.
14747 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14748 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14749 (disable_packet_qfThreadInfo): Unconditionally compile.
14750 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14751 * configure, config.in: Regenerate.
14752
14753 2008-07-28 Doug Kwan <dougkwan@google.com>
14754
14755 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14756 (linux_write_memory): Remove declaration of errno.
14757
14758 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14759
14760 * linux-low.c (handle_extended_wait): Do not use "status"
14761 variable uninitialized.
14762
14763 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14764
14765 * server.c (handle_v_attach): Inhibit reporting dll changes.
14766
14767 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14768
14769 * remote-utils.c (prepare_resume_reply): If requested, don't
14770 output "thread:TID" in the T stop reply.
14771
14772 * server.c (disable_packet_vCont, disable_packet_Tthread)
14773 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14774 (handle_query): If requested, disable support for qC, qfThreadInfo
14775 and qsThreadInfo.
14776 (handle_v_requests): If requested, disable support for vCont.
14777 (gdbserver_show_disableable): New.
14778 (main): Handle --disable-packet and --disable-packet=LIST.
14779
14780 * server.h (disable_packet_vCont, disable_packet_Tthread)
14781 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14782
14783 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14784
14785 * server.c (gdbserver_usage): Mention --version.
14786
14787 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14788
14789 * Makefile.in (gdbreplay.o): New rule.
14790
14791 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14792
14793 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14794 message, not gdbserver.
14795
14796 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14797 Nathan Sidwell <nathan@codesourcery.com>
14798 Joseph Myers <joseph@codesourcery.com>
14799
14800 * acinclude.m4: Include ../../config/acx.m4.
14801 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14802 * configure, config.in: Regenerate.
14803 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14804 * server.c (gdbserver_version): Print PKGVERSION.
14805 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14806 (main): Adjust gdbserver_usage calls.
14807 * gdbreplay.c (version, host_name): Add declarations.
14808 (gdbreplay_version, gdbreplay_usage): New.
14809 (main): Accept --version and --help options.
14810
14811 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14812
14813 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14814 (arm_breakpoint_at): Handle Thumb.
14815 (the_low_target): Add comment.
14816
14817 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14818
14819 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14820
14821 2008-05-09 Doug Evans <dje@google.com>
14822
14823 * server.h (decode_search_memory_packet): Declare.
14824 * remote-utils.c (decode_search_memory_packet): New fn.
14825 * server.c (handle_search_memory_1): New fn.
14826 (handle_search_memory): New fn.
14827 (handle_query): Process qSearch:memory packets.
14828
14829 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14830
14831 * regcache.c (registers_length): Remove.
14832 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14833 full register packet.
14834 * regcache.h (registers_length): Remove prototype.
14835 * server.h (PBUFSIZ): Define to 16384.
14836
14837 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14838
14839 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14840 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14841 powerpc-64l.o, and powerpc-altivec64l.o.
14842 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14843 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14844 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14845 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14846 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14847 to srv_xmlfiles.
14848
14849 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14850 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14851 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14852 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14853 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14854 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14855 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14856 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14857 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14858 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14859 (clean): Update.
14860
14861 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14862 (init_registers_powerpc_32l): ... this new prototype.
14863 (init_registers_powerpc_32): Remove, replace by ...
14864 (init_registers_powerpc_altivec32l): ... this new prototype.
14865 (init_registers_powerpc_e500): Remove, replace by ...
14866 (init_registers_powerpc_e500l): ... this new prototype.
14867 (init_registers_ppc64): Remove, replace by ...
14868 (init_registers_powerpc_64l): ... this new prototype.
14869 (init_registers_powerpc_64): Remove, replace by ...
14870 (init_registers_powerpc_altivec64l): ... this new prototype.
14871 (ppc_num_regs): Set to 73.
14872 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14873 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14874 (ppc_cannot_store_register): Handle orig_r3 and trap.
14875 (ppc_arch_setup): Update init_registers_... calls.
14876 (ppc_fill_gregset): Handle orig_r3 and trap.
14877
14878 * inferiors.c (clear_inferiors): Reset current_inferior.
14879
14880 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14881
14882 * acinclude.m4: Add override.m4.
14883 * configure: Regenerate.
14884
14885 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14886
14887 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14888 initial call to init_register_ppc64.
14889
14890 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14891
14892 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14893 single powerpc*-*-linux* case.
14894 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14895
14896 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14897
14898 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14899 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14900 from reg_xmlfiles.
14901 * linux-ppc-low.c: Include <elf.h>.
14902 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14903 (ppc_hwcap): New global variable.
14904 (ppc_regmap): Remove __SPE__ #ifdef sections.
14905 (ppc_regmap_e500): New global variable.
14906 (ppc_cannot_store_register): Update __SPE__ special case.
14907 (ppc_get_hwcap): New function.
14908 (ppc_arch_setup): Use it to determine whether inferior supports
14909 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14910 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14911 Do not access registers if target does not support AltiVec.
14912 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14913 Do not access registers if target does not support SPE.
14914 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14915
14916 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14917
14918 * linux-low.c (disabled_regsets, num_regsets): New.
14919 (use_regsets_p): Delete.
14920 (linux_wait_for_process): Clear disabled_regsets.
14921 (regsets_fetch_inferior_registers): Check and set it.
14922 (regsets_store_inferior_registers): Likewise.
14923 (linux_fetch_registers, linux_store_registers): Do not use
14924 use_regsets_p.
14925 (initialize_low): Allocate disabled_regsets.
14926
14927 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14928
14929 * Makefile.in (LIBOBJS): New.
14930 (OBS): Use LIBOBJS.
14931 (memmem.o): New rule.
14932 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14933 * configure: Regenerated.
14934
14935 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14936
14937 * server.c (handle_query): Never return "unsupported" for
14938 qXfer:features:read queries.
14939
14940 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14941
14942 * server.c (get_features_xml): Fix inverted condition.
14943 (handle_query): Always support qXfer:feature:read.
14944
14945 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14946
14947 * server.c (wrapper_argv): New.
14948 (start_inferior): Handle wrapper_argv. If set, expect an extra
14949 trap.
14950 (gdbserver_usage): Document --wrapper.
14951 (main): Parse --wrapper.
14952
14953 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14954
14955 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14956 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14957 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14958 (ppc_set_pc): Likewise.
14959 (ppc_arch_setup): New function.
14960 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14961 of collect_register.
14962 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14963
14964 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14965
14966 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14967 instead of linux-ppc64-low.o.
14968 * linux-ppc64-low.c: Remove file.
14969 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14970 (linux-ppc64-low.o): Remove rule.
14971
14972 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14973 (init_registers_powerpc_64): Likewise.
14974 (ppc_regmap): Conditionally define depending on __powerpc64__.
14975 (ppc_cannot_store_register): Do not special-case "fpscr" when
14976 compiled on __powerpc64__.
14977 (ppc_collect_ptrace_register): New function.
14978 (ppc_supply_ptrace_register): New function.
14979 (ppc_breakpoint): Change type to "unsigned int".
14980 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14981 (the_low_target): Conditionally provide initializers for the
14982 arch_setup member depending on __powerpc64__. Install
14983 collect_ptrace_register and supply_ptrace_register members.
14984
14985 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14986
14987 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14988 * server.c (gdbserver_xmltarget): Define.
14989 (get_features_xml): Use it to replace "target.xml" and arch_string.
14990
14991 * configure.srv: Remove srv_xmltarget. Add XML files that were
14992 mentioned there to srv_xmlfiles instead. Remove conditional tests
14993 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14994 srv_xmlfiles and srv_regobj to include all possible choices.
14995 * configure.ac (srv_xmltarget): Remove.
14996 (srv_xmlfiles): Do not add "target.xml".
14997 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14998 checks for supplementary target information.
14999 * configure: Regenerate.
15000 * Makefile.in (XML_TARGET): Remove.
15001 (target.xml): Remove rule.
15002 (clean): Do not clean up target.xml.
15003 (.PRECIOUS): Do not mention target.xml.
15004
15005 * target.h (struct target_ops): Remove arch_string member.
15006 * linux-low.c (linux_arch_string): Remove.
15007 (linux_target_ops): Remove arch_string initializer.
15008 * linux-low.h (struct linux_target_ops): Remove arch_string member.
15009 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
15010 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
15011 * spu-low.c (spu_arch_string): Remove.
15012 (spu_target_ops): Remove arch_string initializer.
15013 * win32-low.c (win32_arch_string): Remove.
15014 (win32_target_ops): Remove arch_string initializer.
15015 * win32-low.h (struct win32_target_ops): Remove arch_string member.
15016 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
15017 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
15018
15019 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15020
15021 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
15022 by collect_ptrace_register and supply_ptrace_register hooks.
15023 * linux-low.c (fetch_register): Use supply_ptrace_register callback
15024 instead of checking for the_low_target.left_pad_xfer.
15025 (usr_store_inferior_registers): Use collect_ptrace_register callback
15026 instead of checking for the_low_target.left_pad_xfer.
15027
15028 * linux-s390-low.c (s390_collect_ptrace_register): New function.
15029 (s390_supply_ptrace_register): Likewise.
15030 (s390_fill_gregset): Call s390_collect_ptrace_register.
15031 (the_low_target): Update.
15032
15033 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
15034 (ppc_supply_ptrace_register): Likewise.
15035 (the_low_target): Update.
15036
15037 * linux-i386-low.c (the_low_target): Update.
15038 * linux-x86-64-low.c (the_low_target): Update.
15039
15040 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15041
15042 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
15043 reg-s390.o and reg-s390x.o.
15044
15045 * linux-low.c (new_inferior): New global variable.
15046 (linux_create_inferior, linux_attach): Set it.
15047 (linux_wait_for_process): Call the_low_target.arch_setup after the
15048 target has stopped for the first time.
15049 (initialize_low): Do not call the_low_target.arch_setup.
15050
15051 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
15052 (s390_set_pc): Likewise.
15053 (s390_arch_setup): New function.
15054 (the_low_target): Use s390_arch_setup as arch_setup routine.
15055
15056 * regcache.c (realloc_register_cache): New function.
15057 (set_register_cache): Call it for each existing regcache.
15058
15059 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
15060
15061 * server.h (init_registers): Remove prototype.
15062
15063 * linux-low.h (struct linux_target_ops): Add arch_setup field.
15064 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
15065 instead of init_registers ().
15066 * linux-arm-low.c (init_registers_arm): Add prototype.
15067 (init_registers_arm_with_iwmmxt): Likewise.
15068 (the_low_target): Add initializer for arch_setup field.
15069 * linux-cris-low.c (init_registers_cris): Add prototype.
15070 (the_low_target): Add initializer for arch_setup field.
15071 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
15072 (the_low_target): Add initializer for arch_setup field.
15073 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
15074 (the_low_target): Add initializer for arch_setup field.
15075 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15076 (the_low_target): Add initializer for arch_setup field.
15077 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15078 (the_low_target): Add initializer for arch_setup field.
15079 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15080 (the_low_target): Add initializer for arch_setup field.
15081 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15082 (init_registers_mips64_linux): Likewise.
15083 (the_low_target): Add initializer for arch_setup field.
15084 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15085 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15086 (the_low_target): Add initializer for arch_setup field.
15087 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15088 (init_registers_powerpc_64): Likewise.
15089 (the_low_target): Add initializer for arch_setup field.
15090 * linux-s390-low.c (init_registers_s390): Add prototype.
15091 (init_registers_s390x): Likewise.
15092 (the_low_target): Add initializer for arch_setup field.
15093 * linux-sh-low.c (init_registers_sh): Add prototype.
15094 (the_low_target): Add initializer for arch_setup field.
15095 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15096 (the_low_target): Add initializer for arch_setup field.
15097 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15098 (the_low_target): Add initializer for arch_setup field.
15099
15100 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15101 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15102 instead of init_registers ().
15103 * win32-arm-low.c (init_registers_arm): Add prototype.
15104 (the_low_target): Add initializer for arch_setup field.
15105 * win32-i386-low.c (init_registers_i386): Add prototype.
15106 (the_low_target): Add initializer for arch_setup field.
15107
15108 * spu-low.c (init_registers_spu): Add prototype.
15109 (initialize_low): Call initialie_registers_spu () instead of
15110 initialize_registers ().
15111
15112 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15113
15114 * server.c (handle_v_requests): When handling the vRun and vAttach
15115 packets, if already debugging a process, don't kill it. Return an
15116 error instead.
15117
15118 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15119
15120 * server.c (handle_query): Correct length check.
15121
15122 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15123
15124 * win32-low.c (do_initial_child_stuff): Add process handle
15125 parameter. Set current_process_handle and current_process_id from the
15126 parameters. Clear globals.
15127 (win32_create_inferior): Don't set current_process_handle and
15128 current_process_id here. Instead pass them on the call to
15129 do_initial_child_stuff.
15130 (win32_attach): Likewise.
15131 (win32_clear_inferiors): New.
15132 (win32_kill): Don't close the current process handle or the
15133 current thread handle here. Instead call win32_clear_inferiors.
15134 (win32_detach): Don't open a new handle to the process. Call
15135 win32_clear_inferiors.
15136 (win32_join): Don't rely on current_process_handle; open a new
15137 handle using the process id.
15138 (win32_wait): Call win32_clear_inferiors when the inferior process
15139 has exited.
15140
15141 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15142
15143 * server.c (monitor_show_help): Add "exit".
15144
15145 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15146
15147 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15148 (clean): Add reg-xtensa.c.
15149 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15150 * configure.srv (xtensa*-*-linux*) New target.
15151 * linux-xtensa-low.c: New.
15152 * xtensa-xtregs.c: New.
15153
15154 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15155
15156 * hostio.c: Don't include errno.h.
15157 (errno_to_fileio_errno): Move to hostio-errno.
15158 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15159 error number outputting to the target->hostio_last_error callback.
15160 (hostio_packet_error): Use FILEIO_EINVAL directly.
15161 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15162 calls to hostio_error.
15163 * hostio-errno.c: New.
15164 * server.h (hostio_last_error_from_errno): Declare.
15165 * target.h (target_ops): Add hostio_last_error member.
15166 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15167 as hostio_last_error handler.
15168 * spu-low.c (spu_target_ops): Likewise.
15169 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15170 (wince_hostio_last_error): New functions.
15171 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15172 as hostio_last_error handler.
15173 (win32_target_ops) [!_WIN32_WCE]: Register
15174 hostio_last_error_from_errno as hostio_last_error handler.
15175 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15176 (hostio-errno.o): New rule.
15177 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15178 * configure.srv (srv_hostio_err_objs): New variable. Default to
15179 hostio-errno.o.
15180 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15181 * configure: Regenerate.
15182
15183 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15184
15185 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15186 (linux_kill, linux_detach): Clean up the process list.
15187 * remote-utils.c (remote_open): Improve port number parsing.
15188 (putpkt_binary, input_interrupt): Only send interrupts if the target
15189 is running.
15190 * server.c (extended_protocol): Make static.
15191 (attached): Define earlier.
15192 (exit_requested, response_needed, program_argv): New variables.
15193 (target_running): New.
15194 (start_inferior): Clear attached here.
15195 (attach_inferior): Set attached here.
15196 (require_running): Define.
15197 (handle_query): Use require_running and target_running. Implement
15198 "monitor exit".
15199 (handle_v_attach, handle_v_run): New.
15200 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15201 (gdbserver_usage): Update.
15202 (main): Redo argument parsing. Handle --debug and --multi. Handle
15203 --attach along with other options or after the port. Save
15204 program_argv. Support no initial program. Resynchronize
15205 communication with GDB after an error. Handle "monitor exit".
15206 Use require_running and target_running. Always allow the extended
15207 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15208 restart in extended mode.
15209 * README: Refer to the GDB manual. Update --attach usage.
15210
15211 2007-12-20 Andreas Schwab <schwab@suse.de>
15212
15213 * linux-low.c (STACK_SIZE): Define.
15214 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15215 (linux_test_for_tracefork): Likewise.
15216
15217 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15218
15219 * linux-low.c (linux_wait_for_event): Update messages. Do not
15220 reinsert auto-delete breakpoints.
15221 * mem-break.c (struct breakpoint): Change return type of handler to
15222 int.
15223 (set_breakpoint_at): Update handler type.
15224 (reinsert_breakpoint_handler): Return 1 instead of calling
15225 delete_breakpoint.
15226 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15227 setting a new one.
15228 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15229 * mem-break.h (set_breakpoint_at): Update handler type.
15230 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15231 * win32-low.c (auto_delete_breakpoint): New.
15232 (get_child_debug_event): Use it.
15233
15234 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15235
15236 * configure.ac: Check for pread and pwrite.
15237 * hostio.c (handle_pread): Fall back to lseek and read.
15238 (handle_pwrite): Fall back to lseek and write.
15239 * config.in, configure: Regenerated.
15240
15241 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15242
15243 * server.c (myresume): Add own_buf argument.
15244 (main): Update calls.
15245
15246 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15247
15248 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15249 * remote-utils.c (remote_open): Do not call disable_async_io.
15250 (block_async_io): Delete.
15251 (unblock_async_io): Make static.
15252 (initialize_async_io): New.
15253 * server.c (handle_v_cont): Handle async I/O here.
15254 (myresume): Likewise. Move other common resume tasks here...
15255 (main): ... from here. Call initialize_async_io. Disable async
15256 I/O before the main loop.
15257 * server.h (initialize_async_io): Declare.
15258 (block_async_io, unblock_async_io): Delete prototypes.
15259 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15260
15261 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15262
15263 * remote-utils.c (readchar): Allow binary data in received messages.
15264
15265 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15266
15267 * win32-low.c (attaching): New global.
15268 (win32_create_inferior): Clear the `attaching' global.
15269 (win32_attach): Set the `attaching' global.
15270 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15271 attaching. Only set a breakpoint at the entry point if not
15272 attaching.
15273
15274 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15275
15276 * server.c (main): Don't report dll events on the initial
15277 connection on attaches.
15278
15279 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15280
15281 * server.c (main): Relax numerical bases supported for the pid of
15282 the --attach command line argument.
15283
15284 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15285
15286 * win32-low.c (win32_attach): Call OpenProcess before
15287 DebugActiveProcess, not after. Add last error output to error
15288 call.
15289
15290 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15291
15292 * win32-low.c (win32_get_thread_context)
15293 (win32_set_thread_context): New functions.
15294 (thread_rec): Use win32_get_thread_context.
15295 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15296 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15297 field.
15298
15299 2007-12-03 Leo Zayas
15300 Pedro Alves <pedro_alves@portugalmail.pt>
15301
15302 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15303 global variables.
15304 (child_add_thread): Minor cleanup.
15305 (child_continue): Resume artificially suspended threads before
15306 calling ContinueDebugEvent.
15307 (suspend_one_thread): New.
15308 (fake_breakpoint_event): New.
15309 (get_child_debug_event): Change return type to int. Check here if
15310 gdb sent an interrupt request. If a soft interrupt was requested,
15311 fake a breakpoint event. Return 0 if there is no event to handle,
15312 and 1 otherwise.
15313 (win32_wait): Don't check here if gdb sent an interrupt request.
15314 Ensure there is a valid event to handle.
15315 (win32_request_interrupt): Add soft interruption method as last
15316 resort.
15317
15318 2007-12-03 Leo Zayas
15319 Pedro Alves <pedro_alves@portugalmail.pt>
15320
15321 * win32-low.h (win32_thread_info): Add descriptions to the
15322 structure members. Replace `suspend_count' counter by a
15323 `suspended' flag.
15324 * win32-low.c (thread_rec): Update condition of when to get the
15325 context from the inferior. Rely on ContextFlags being set if it
15326 has already been retrieved. Only suspend the inferior thread if
15327 we haven't already. Warn if that fails.
15328 (continue_one_thread): s/suspend_count/suspended/. Only call
15329 ResumeThread once. Warn if that fails.
15330
15331 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15332
15333 * win32-low.c (win32_wait): Don't read from the inferior when it
15334 has already exited.
15335
15336 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15337
15338 * Makefile.in (win32_low_h): New variable.
15339 (win32-low.o): Add dependency on $(win32_low_h).
15340 (win32-arm-low.o, win32-i386-low.o): New rules.
15341
15342 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15343
15344 * hostio.c: Correct copyright year.
15345
15346 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15347
15348 * Makefile.in (OBS): Add hostio.o.
15349 (hostio.o): New rule.
15350 * server.h (handle_vFile): Declare.
15351 * hostio.c: New file.
15352 * server.c (handle_v_requests): Take packet_len and new_packet_len
15353 for binary packets. Call handle_vFile.
15354 (main): Update call to handle_v_requests.
15355
15356 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15357
15358 * linux-low.c: Include <sched.h>.
15359
15360 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15361
15362 * linux-low.c (linux_tracefork_grandchild): New.
15363 (linux_tracefork_child): Use clone.
15364 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15365
15366 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15367
15368 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15369
15370 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15371
15372 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15373
15374 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15375
15376 * inferiors.c (change_inferior_id): Delete.
15377 (add_pid_to_list, pull_pid_from_list): New.
15378 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15379 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15380 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15381 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15382 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15383 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15384 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15385 (using_threads): Always set to 1.
15386 (handle_extended_wait): New.
15387 (add_process): Do not set TID.
15388 (linux_create_inferior): Set must_set_ptrace_flags.
15389 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15390 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15391 (linux_thread_alive): Rename TID argument to LWPID.
15392 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15393 (linux_wait_for_event): Do not use TID or check using_threads. Update
15394 call to dead_thread_notify. Call handle_extended_wait.
15395 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15396 (send_sigstop): Delete sigstop_sent.
15397 (wait_for_sigstop): Avoid TID.
15398 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15399 (linux_test_for_tracefork): New.
15400 (linux_lookup_signals): Use thread_db_active and
15401 linux_supports_tracefork_flag.
15402 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15403 * linux-low.h (get_process_thread): Avoid TID.
15404 (struct process_ifo): Move thread_known and tid to the end. Remove
15405 sigstop_sent.
15406 (linux_attach_lwp, thread_db_init): Update prototypes.
15407 * server.h (change_inferior_id): Delete prototype.
15408 (add_pid_to_list, pull_pid_from_list): New prototypes.
15409 * thread-db.c (thread_db_use_events): New.
15410 (find_first_thread): Rename to...
15411 (find_one_thread): ...this. Update callers and messages. Do not
15412 call fatal. Check thread_db_use_events. Do not call
15413 change_inferior_id or new_thread_notify.
15414 (maybe_attach_thread): Update. Do not call new_thread_notify.
15415 (thread_db_init): Set thread_db_use_events. Check use_events.
15416 * utils.c (fatal, warning): Correct message prefix.
15417
15418 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15419
15420 * Makefile.in (clean): Remove new files.
15421 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15422 (powerpc-64.o, powerpc-64.c): New rules.
15423 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15424 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15425 with SPE.
15426 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15427 SPE targets.
15428 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15429 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15430 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15431 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15432 (target_regsets): Add AltiVec and SPE register sets.
15433 * configure.ac: Check for AltiVec and SPE.
15434 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15435 (ppc_fill_vrregset, ppc_store_vrregset): New.
15436 (target_regsets): Add AltiVec register set.
15437 * configure: Regenerated.
15438
15439 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15440
15441 * linux-low.c (O_LARGEFILE): Define.
15442 (linux_read_memory): Use /proc/PID/mem.
15443 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15444 * configure, config.in: Regenerated.
15445
15446 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15447
15448 * linux-low.c (linux_wait_for_event): Do not pass signals while
15449 single-stepping.
15450
15451 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15452
15453 * win32-low.c (create_process): New.
15454 (win32_create_inferior): Use create_process instead of
15455 CreateProcess. If create_process failed retry appending an ".exe"
15456 suffix. Store the GetLastError result immediatelly after
15457 create_process calls and use it on the call to error.
15458
15459 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15460
15461 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15462
15463 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15464
15465 * configure.ac: Switch license to GPLv3.
15466
15467 2007-08-01 Michael Snyder <msnyder@access-company.com>
15468
15469 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15470
15471 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15472
15473 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15474 typedef.
15475 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15476 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15477 CloseToolhelp32Snapshot.
15478 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15479 CloseToolhelp32Snapshot.
15480
15481 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15482
15483 * server.c (main): Check for inferior exit before main loop.
15484
15485 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15486
15487 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15488 instead of on tmp_desc.
15489
15490 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15491 Daniel Jacobowitz <dan@codesourcery.com>
15492
15493 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15494 (add_thread): Minor cleanups.
15495 (clear_inferiors): Move lower in the file. Clear the DLL
15496 list.
15497 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15498 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15499 (xml_escape_text): New.
15500 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15501 for qSupported.
15502 (handle_v_cont): Report errors.
15503 (gdbserver_version): Update.
15504 (main): Correct size of own_buf. Do not report initial DLL events.
15505 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15506 (unloaded_dll, xml_escape_text): New.
15507 * win32-low.c (enum target_waitkind): Update comments.
15508 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15509 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15510 (win32_EnumProcessModules, win32_GetModuleInformation)
15511 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15512 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15513 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15514 (win32_Module32First, win32_Module32Next, load_toolhelp)
15515 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15516 (get_child_debug_event): Handle DLL events.
15517 (win32_wait): Likewise.
15518
15519 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15520
15521 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15522 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15523
15524 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15525
15526 * win32-low.c (handle_output_debug_string): Ignore event if not
15527 waiting.
15528
15529 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15530
15531 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15532
15533 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15534
15535 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15536
15537 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15538
15539 * inferiors.c (change_inferior_id): Add comment.
15540 * linux-low.c (check_removed_breakpoint): Add an early
15541 prototype. Improve debug output.
15542 (linux_attach): Doc update.
15543 (linux_detach_one_process, linux_detach): Clean up before releasing
15544 each process.
15545 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15546 * linux-low.h (struct process_info): Doc improvement.
15547 * mem-break.c (delete_all_breakpoints): New.
15548 * mem-break.h (delete_all_breakpoints): New prototype.
15549 * thread-db.c (find_first_thread): New.
15550 (thread_db_create_event): Call it instead of
15551 thread_db_find_new_threads. Clean up unused variables.
15552 (maybe_attach_thread): Remove first thread handling.
15553 (thread_db_find_new_threads): Use find_first_thread.
15554 (thread_db_get_tls_address): Likewise.
15555
15556 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15557
15558 * thread-db.c (thread_db_find_new_threads): Add prototype.
15559 (thread_db_create_event): Check for the main thread before adding
15560 a new thread.
15561 (maybe_attach_thread): Only enable event reporting if TID == 0.
15562 (thread_db_get_tls_address): Check for new threads.
15563
15564 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15565
15566 * linux-low.c (linux_create_inferior): Try execv before execvp.
15567 * spu-low.c (spu_create_inferior): Likewise.
15568
15569 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15570
15571 * linux-low.c (linux_create_inferior): Change execv to execvp.
15572 * spu-low.c (spu_create_inferior): Likewies.
15573
15574 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15575
15576 * Makefile.in (clean): Clean new files instead of deleted ones.
15577 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15578 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15579 rules.
15580 * configure.srv: Specify XML files and new regformats for MIPS and
15581 MIPS64 GNU/Linux.
15582 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15583 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15584 an entry for the restart register.
15585 (mips_cannot_fetch_register, mips_cannot_store_register)
15586 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15587 register names to match the XML descriptions.
15588 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15589 restart register instead of $0.
15590
15591 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15592 Markus Deuling <deuling@de.ibm.com>
15593
15594 * remote-utils.c (decode_xfer_write): New function.
15595 * server.h (decode_xfer_write): Add prototype.
15596 * server.c (handle_query): Add PACKET_LEN argument. Support
15597 qXfer:spu:read and qXfer:spu:write packets.
15598 (main): Pass packet_len to handle_query.
15599 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15600 * target.h (target_ops): Add qxfer_spu.
15601
15602 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15603
15604 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15605 accessing non-seekable spufs files.
15606
15607 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15608
15609 * server.c (handle_query): Add reply for qC packet.
15610
15611 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15612 Leo Zayas <lerele@champenstudios@com>
15613
15614 * server.h (check_remote_input_interrupt_request): New function.
15615 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15616 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15617 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15618 (check_remote_input_interrupt_request): New function.
15619 * server.h (check_remote_input_interrupt_request): Declare.
15620 * win32-low.c (winapi_DebugBreakProcess,
15621 winapi_GenerateConsoleCtrlEvent): New typedefs.
15622 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15623 to 250 ms.
15624 (win32_wait): Check for remote interrupt request
15625 with check_remote_input_interrupt_request.
15626 (win32_request_interrupt): New function.
15627 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15628
15629 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15630
15631 * win32-low.c (debug_registers_changed,
15632 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15633 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15634 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15635 (thread_rec): Get context using the low target.
15636 (child_add_thread): Call thread_added on the low target,
15637 which does the same thing.
15638 (regptr): Delete.
15639 (do_initial_child_stuff): Remove debug registers references.
15640 Set context using the low target. Resume threads after
15641 setting the contexts.
15642 (child_continue): Remove dead variable. Remove debug
15643 registers references.
15644 (child_fetch_inferior_registers): Go through the low target.
15645 (do_child_store_inferior_registers): Remove.
15646 (child_store_inferior_registers): Go through the low target.
15647 (win32_resume): Remove debug registers references.
15648 Set context using the low target.
15649 (handle_exception): Change return type to void. Don't record
15650 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15651 first chance exception.
15652 (get_child_debug_event): Change return type to void. Remove
15653 goto loop. Always return after waiting for debug event.
15654 (win32_wait): Convert to switch statement. Handle spurious
15655 events.
15656
15657 * win32-i386-low.c (debug_registers_changed,
15658 debug_registers_used): New.
15659 (initial_stuff): Rename to ...
15660 (i386_initial_stuff): ... this. Clear debug registers
15661 state variables.
15662 (store_debug_registers): Delete.
15663 (i386_get_thread_context): New.
15664 (load_debug_registers): Delete.
15665 (i386_set_thread_context): New.
15666 (i386_thread_added): New.
15667 (single_step): Rename to ...
15668 (i386_single_step): ... this.
15669 (do_fetch_inferior_registers): Rename to ...
15670 (i386_fetch_inferior_register): ... this.
15671 (i386_store_inferior_register): New.
15672 (the_low_target): Adapt to new interface.
15673
15674 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15675 (arm_get_thread_context): New.
15676 (arm_set_thread_context): New.
15677 (regptr): New.
15678 (do_fetch_inferior_registers): Rename to ...
15679 (arm_fetch_inferior_register): ... this.
15680 (arm_store_inferior_register): New.
15681 (arm_wince_breakpoint): Reimplement as unsigned long.
15682 (arm_wince_breakpoint_len): Define.
15683 (the_low_target): Adapt to new interface.
15684
15685 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15686 load_debug_registers. Add get_thread_context, set_thread_context,
15687 thread_added and store_inferior_register. Rename
15688 fetch_inferior_registers to fetch_inferior_register.
15689 (regptr): Remove declaration.
15690
15691 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15692
15693 * linux-low.c (linux_detach): Change return type to int. Return 0.
15694 * spu-low.c (spu_detach): Likewise.
15695
15696 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15697
15698 * target.h (target_ops): Change return type of detach to int.
15699 Add join.
15700 (join_inferior): New.
15701 * server.c (main): Don't skip detach support on mingw32.
15702 If the inferior doesn't support detaching return error.
15703 Call join_inferior instead of using waitpid.
15704 * linux-low.c (linux_join): New.
15705 (linux_target_op): Add linux_join.
15706 * spu-low.c (spu_join): New.
15707 (spu_target_ops): Add spu_join.
15708 * win32-low.c (win32_detach): Adapt to new interface.
15709 Reopen current_process_handle before detaching. Issue a child
15710 resume before detaching.
15711 (win32_join): New.
15712 (win32_target_op): Add win32_join.
15713
15714 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15715
15716 * win32-low.c (win32-attach): Fix return value.
15717 * target.h (target_ops): Describe ATTACH return values.
15718
15719 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15720
15721 * win32-low.c (GETPROCADDRESS): Define.
15722 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15723 (winapi_DebugSetProcessKillOnExit): Likewise.
15724 (win32_create_inferior): Force usage of ansi CreateProcessA.
15725 (win32_attach): Use GETPROCADDRESS.
15726 (win32_detach): Likewise.
15727
15728 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15729
15730 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15731
15732 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15733
15734 * win32-low.c: Commit leftover changes from 2007-03-29.
15735
15736 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15737
15738 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15739 fields short instead of int. Add explicit padding.
15740 (i387_cache_to_fsave): Remove unnecessary casts.
15741 (i387_fsave_to_cache): Doc fix.
15742 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15743
15744 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15745
15746 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15747 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15748
15749 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15750
15751 * configure.srv (arm*-*-mingw32ce*): Move near the other
15752 arm targets.
15753
15754 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15755
15756 * configure.ac: Add errno checking.
15757 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15758 sys/file.h and malloc.h.
15759 (AC_CHECK_DECLS): Add perror.
15760 (srv_mingwce): Handle.
15761 * configure.srv (i[34567]86-*-cygwin*): Add
15762 win32-i386-low.o to srv_tgtobj.
15763 (i[34567]86-*-mingw*): Likewise.
15764 (arm*-*-mingw32ce*): Add case.
15765 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15766 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15767 [__MINGW32CE__] (strerror): New function.
15768 [__MINGW32CE__] (errno): Define to GetLastError.
15769 [__MINGW32CE__] (COUNTOF): New macro.
15770 (remote_open): Remove extra close call.
15771 * mem-break.c (delete_breakpoint_at): New function.
15772 * mem-break.h (delete_breakpoint_at): Declare.
15773 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15774 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15775 [USE_WIN32API] (read, write): Add char* casts.
15776 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15777 * server.h: Include wincecompat.h on Windows CE.
15778 [HAVE_ERRNO_H]: Check.
15779 (perror): Declare if not declared.
15780 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15781 (perror_with_name): Remove errno declaration.
15782 * wincecompat.h: New.
15783 * wincecompat.c: New.
15784 * win32-low.h: New.
15785 * win32-arm-low.c: New.
15786 * win32-i386-low.c: New.
15787 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15788 (OUTMSG2): Make it safe.
15789 (_T): New macro.
15790 (COUNTOF): New macro.
15791 (NUM_REGS): Get it from the low target.
15792 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15793 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15794 (thread_rec): Let low target handle debug registers.
15795 (child_add_thread): Likewise.
15796 (child_init_thread_list): Likewise.
15797 (continue_one_thread): Likewise.
15798 (regptr): New.
15799 (do_child_fetch_inferior_registers): Move to ...
15800 * win32-i386-low.c: ... here, and rename to ...
15801 (do_fetch_inferior_registers): ... this.
15802 * win32-low.c (child_fetch_inferior_registers):
15803 Go through the low target.
15804 (do_child_store_inferior_registers): Use regptr.
15805 (strwinerror): New function.
15806 (win32_create_inferior): Handle Windows CE.
15807 Use strwinerror instead of strerror on Windows error
15808 codes. Add program to the error output.
15809 Don't close the main thread handle on Windows CE.
15810 (win32_attach): Use coredll.dll on Windows CE.
15811 (win32_kill): Close current process and current
15812 thread handles.
15813 (win32_detach): Use coredll.dll on Windows CE.
15814 (win32_resume): Let low target handle debug registers, and
15815 step request.
15816 (handle_exception): Add/Remove initial breakpoint. Avoid
15817 non-existant WSTOPSIG on Windows CE.
15818 (win32_read_inferior_memory): Cast to remove warning.
15819 (win32_arch_string): Go through the low target.
15820 (initialize_low): Call set_breakpoint_data with the low
15821 target's breakpoint.
15822 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15823 FOP_REGNUM, mappings): Move to ...
15824 * win32-i386-low.c: ... here.
15825 * win32-low.c (win32_thread_info): Move to ...
15826 * win32-low.h: ... here.
15827 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15828 win32-arm-low.c and wincecompat.c.
15829 (all:): Add $EXEEXT.
15830 (install-only:): Likewise.
15831 (gdbserver:): Likewise.
15832 (gdbreplay:): Likewise.
15833 * config.in: Regenerate.
15834 * configure: Regenerate.
15835
15836 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15837
15838 * win32-low.c: Rename typedef thread_info to
15839 win32_thread_info throughout.
15840
15841 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15842
15843 * win32-i386-low.c: Rename to ...
15844 * win32-low.c: ... this.
15845 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15846 * Makefile.in: Likewise.
15847
15848 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15849
15850 * remote-utils.c (monitor_output): Constify msg parameter.
15851 * server.h (monitor_output): Likewise.
15852 * win32-i386-low.c (handle_output_debug_string): New.
15853 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15854 handle_output_debug_string.
15855 (get_child_debug_event): Likewise.
15856
15857 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15858
15859 * server.c (main): Correct strtoul check.
15860
15861 2007-03-27 Jon Ringle <jon@ringle.org>
15862
15863 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15864
15865 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15866
15867 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15868
15869 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15870
15871 * terminal.h: Check HAVE_SGTTY_H.
15872
15873 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15874
15875 * remote-utils.c (remote_open): Print out the assigned port number.
15876
15877 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15878
15879 * remote-utils.c (monitor_output): New function.
15880 * server.c (debug_threads): Define here.
15881 (monitor_show_help): New function.
15882 (handle_query): Handle qRcmd.
15883 (main): Do not handle 'd' packet.
15884 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15885 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15886 of debug_threads.
15887
15888 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15889
15890 * Makefile.in (EXEEXT): New.
15891 (clean): Use $(EXEEXT).
15892
15893 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15894
15895 * target.h (target_ops): Rename send_signal to request_interrupt,
15896 and remove enum target_signal parameter.
15897 * linux-low.c (linux_request_interrupt): Rename from
15898 linux_send_signal, and always send SIGINT.
15899 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15900 and always send SIGINT.
15901 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15902 of send_signal.
15903 (input_interrupt): Likewise.
15904
15905 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15906
15907 * server.c (get_features_xml): Check if target implemented
15908 arch_string.
15909 * win32-i386-low.c (win32_arch_string): New.
15910 (win32_target_ops): Add win32_arch_string as arch_string member.
15911
15912 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15913
15914 * spu-low.c (spu_arch_string): New.
15915 (spu_target_ops): Add spu_arch_string.
15916
15917 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15918
15919 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15920 * configure.ac: Do not check for terminal.h.
15921 * configure, config.in: Regenerated.
15922
15923 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15924
15925 * Makefile.in (OBS): Add $(XML_BUILTIN).
15926 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15927 (clean): Update.
15928 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15929 (arm-with-iwmmxt.c): New.
15930 * config.in, configure: Regenerate.
15931 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15932 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15933 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15934 (arm*-*-linux*): Add iWMMXt and regset support.
15935 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15936 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15937 (arm_store_wmmxregset, target_regsets): New.
15938 * server.c (get_features_xml): Take annex argument. Check builtin
15939 XML documents.
15940 (handle_query): Handle multiple annexes.
15941
15942 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15943
15944 * remote-utils.c [USE_WIN32API] (read, write): Define.
15945 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15946 write.
15947
15948 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15949
15950 * linux-i386-low.c (the_low_target): Set arch_string.
15951 * linux-x86-64-low.c (the_low_target): Likewise.
15952 * linux-low.c (linux_arch_string): New.
15953 (linux_target_ops): Add it.
15954 * linux-low.h (struct linux_target_ops): Add arch_string.
15955 * server.c (write_qxfer_response): Use const void * for DATA.
15956 (get_features_xml): New.
15957 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15958 * target.h (struct target_ops): Add arch_string method.
15959
15960 2007-01-03 Denis Pilat <denis.pilat@st.com>
15961 Daniel Jacobowitz <dan@codesourcery.com>
15962
15963 * linux-low.c (linux_kill): Handle being called with no threads.
15964 * win32-i386-low.c (win32_kill): Likewise.
15965 (get_child_debug_event): Clear current_process_handle.
15966
15967 2006-12-30 Denis PILAT <denis.pilat@st.com>
15968 Daniel Jacobowitz <dan@codesourcery.com>
15969
15970 * remote-utils.c (remote_open): Check the type of specified
15971 serial port devices before opening them.
15972 * server.c (main): Kill the inferior if an error occurs during
15973 the first remote_open.
15974
15975 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15976
15977 * README: Update supported targets.
15978
15979 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15980
15981 * Makefile.in (clean): Remove reg-mips64.c.
15982 (reg-mips64.c, reg-mips64.o): New rules.
15983 * configure.srv: Handle mips64. Include regset support for mips.
15984 * linux-mips-low.c (union mips_register): New.
15985 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15986 (mips_breakpoint, mips_breakpoint_at): Use int.
15987 (mips_collect_register, mips_supply_register)
15988 (mips_collect_register_32bit, mips_supply_register_32bit)
15989 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15990 (mips_store_fpregset, target_regsets): New.
15991 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15992
15993 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15994
15995 * configure.srv: Add target "spu*-*-*".
15996 * Makefile.in (clean): Remove reg-spu.c.
15997 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15998 * spu-low.c: New file.
15999
16000 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16001
16002 * configure.ac: Correct td_thr_tls_get_addr test.
16003 * configure: Regenerated.
16004
16005 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
16006
16007 * linux-low.c (linux_wait_for_event): Reformat. Use the
16008 pass_signals array.
16009 * remote-utils.c (decode_address_to_semicolon): New.
16010 * server.c (pass_signals, handle_general_set): New.
16011 (handle_query): Mention QPassSignals for qSupported.
16012 (main): Call handle_general_set.
16013 * server.h (pass_signals, decode_address_to_semicolon): New.
16014
16015 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
16016
16017 * server.c (handle_query): Correct error handling for read_auxv.
16018
16019 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
16020
16021 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
16022 and srv_linux_thread_db to yes.
16023 * linux-s390-low.c (s390_fill_gregset): New function.
16024 (target_regsets): Define data structure.
16025
16026 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
16027
16028 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
16029 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
16030 * config.in, configure: Regenerated.
16031 * inferiors.c (gdb_id_to_thread): New function.
16032 (gdb_id_to_thread_id): Use it.
16033 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
16034 * linux-low.h (struct process_info): Add th member.
16035 (thread_db_get_tls_address): New prototype.
16036 * remote-utils.c (decode_address): Make non-static.
16037 * server.c (handle_query): Handle qGetTLSAddr.
16038 * server.h (gdb_id_to_thread, decode_address): New prototypes.
16039 * target.h (struct target_ops): Add get_tls_address.
16040 * thread-db.c (maybe_attach_thread): Save the thread handle.
16041 (thread_db_get_tls_address): New.
16042
16043 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
16044
16045 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
16046 (linux_resume_one_process): Take a siginfo_t *. Update all
16047 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
16048 (struct pending_signals): Add a siginfo_t.
16049 (linux_wait_for_process): Always set last_status.
16050 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
16051 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
16052 * linux-low.h (struct process_info): Add last_status.
16053
16054 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
16055
16056 * remote-utils.c (try_rle): New function.
16057 (putpkt_binary): Use it.
16058
16059 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
16060
16061 * Makefile.in (clean): Clean reg-x86-64-linux.c.
16062 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
16063 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
16064 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
16065 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
16066 point registers.
16067
16068 2006-08-08 Richard Sandiford <richard@codesourcery.com>
16069
16070 * server.c (terminal_fd): New variable.
16071 (old_foreground_pgrp): Likewise.
16072 (restore_old_foreground_pgrp): New function.
16073 (start_inferior): Record the terminal file descriptor in terminal_fd
16074 and its original foreground group in old_foreground_pgrp. Register
16075 restore_old_foreground_pgrp with atexit().
16076
16077 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16078
16079 * server.c (handle_query): Correct qPart to qXfer.
16080
16081 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16082
16083 * configure.ac: Check for more headers which are missing on
16084 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16085 * configure.srv: Add Cygwin and mingw32.
16086 * remote-utils.c: Don't include headers unconditionally which
16087 are missing on mingw32. Include <winsock.h> for mingw32.
16088 (remote_open): Adjust for mingw32 support. Flush
16089 standard error after writing to it.
16090 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16091 (unblock_async_io, enable_async_io, disable_async_io)
16092 (readchar, getpkt): Update for Winsock support.
16093 (prepare_resume_reply): Expect a protocol signal number.
16094 * server.c: Disable <sys/wait.h> on mingw32.
16095 (start_inferior): Adjust for mingw32 support. Flush
16096 standard error after writing to it.
16097 (attach_inferior): Likewise. Use protocol signal
16098 numbers.
16099 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16100 and names.
16101 * win32-i386-low.c: New file.
16102 * Makefile.in (XM_CLIBS): Set.
16103 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16104 (win32-i386-low.o): New dependency rule.
16105 * linux-low.c (linux_wait): Use target signal numbers.
16106 * target.h (struct target_ops): Doc fix.
16107 * server.h (target_signal_to_name): New prototype.
16108 * gdbreplay.c: Don't include headers unconditionally which
16109 are missing on mingw32. Include <winsock.h> for mingw32.
16110 (remote_close, remote_open): Adjust for Winsock support.
16111 * configure, config.in: Regenerated.
16112
16113 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16114
16115 * server.c (decode_xfer_read, write_qxfer_response): New.
16116 (handle_query): Take a packet length argument. Handle
16117 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16118 the qSupported response.
16119 (main): Update call to handle_query.
16120
16121 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16122
16123 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16124 (putpkt_binary): Renamed from putpkt and adjusted for binary
16125 data.
16126 (putpkt): New wrapper for putpkt_binary.
16127 (readchar): Don't mask off the high bit.
16128 (decode_X_packet): New function.
16129 * server.c (main): Call putpkt_binary if a handler sets the packet
16130 length. Save the length of the incoming packet. Handle 'X'.
16131 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16132
16133 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16134
16135 * server.c (handle_query): Handle qSupported.
16136
16137 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16138
16139 * remote-utils.c (all_symbols_looked_up): New variable.
16140 (look_up_one_symbol): Check it.
16141 * server.h (look_up_one_symbol): New declaration.
16142 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16143
16144 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16145
16146 * Makefile.in (linux-arm-low.o): Update dependencies.
16147 * linux-arm-low.c: Include "gdb_proc_service.h".
16148 (PTRACE_GET_THREAD_AREA): Define.
16149 (ps_get_thread_area): New function.
16150
16151 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16152
16153 * configure.srv (m68k*-*-uclinux*): New target.
16154 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16155 (linux_resume_one_process): Remove extraneous cast.
16156 (linux_read_offsets): New.
16157 (linux_target_op): Add linux_read_offsets on mmuless systems.
16158 * server.c (handle_query): Add qOffsets logic.
16159 * target.h (struct target_ops): Add read_offsets.
16160
16161 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16162
16163 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16164 (PTRACE_GET_THREAD_AREA): Define.
16165 (ps_get_thread_area): New function.
16166 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16167 (linux-x86-64-low.o): Update.
16168
16169 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16170
16171 * configure.ac: Remove checks for prfpregset_t.
16172 * gdb_proc_service.h: New file.
16173 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16174 new "gdb_proc_service.h".
16175 * proc-service.c: Likewise.
16176 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16177 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16178 * Makefile.in (gdb_proc_service_h): Updated.
16179 * configure, config.in: Regenerated.
16180
16181 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16182
16183 * remote-utils.c (prepare_resume_reply): Move declaration
16184 of gdb_id_from_wait to the top of the block.
16185
16186 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16187
16188 * linux-low.c (regsets_store_inferior_registers): Read the regset
16189 from the target before filling it.
16190
16191 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16192
16193 * server.c (attach_inferior): Return SIGTRAP for a successful
16194 attach.
16195
16196 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16197
16198 * Makefile.in (OBS): Add version.o.
16199 (STAGESTUFF): Delete.
16200 (version.o): Add dependencies.
16201 (version.c): Replace rule.
16202 (clean): Remove version.c.
16203 * server.c (gdbserver_version): New.
16204 (gdbserver_usage): Use printf.
16205 (main): Handle --version and --help.
16206 * server.h (version, host_name): Add declarations.
16207
16208 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16209
16210 * linux-arm-low.c:
16211 * linux-arm-low.c:
16212 * inferiors.c:
16213 * i387-fp.h:
16214 * i387-fp.c:
16215 * gdbreplay.c:
16216 * regcache.c:
16217 * proc-service.c:
16218 * mem-break.h:
16219 * mem-break.c:
16220 * linux-x86-64-low.c:
16221 * linux-sh-low.c:
16222 * linux-s390-low.c:
16223 * linux-ppc64-low.c:
16224 * linux-ppc-low.c:
16225 * linux-mips-low.c:
16226 * linux-m68k-low.c:
16227 * linux-m32r-low.c:
16228 * linux-low.h:
16229 * linux-low.c:
16230 * linux-ia64-low.c:
16231 * linux-i386-low.c:
16232 * linux-crisv32-low.c:
16233 * thread-db.c:
16234 * terminal.h:
16235 * target.h:
16236 * target.c:
16237 * server.h:
16238 * server.c:
16239 * remote-utils.c:
16240 * regcache.h:
16241 * utils.c:
16242 * Makefile.in:
16243 * configure.ac:
16244 * gdbserver.1: Add (C) after Copyright. Update the FSF
16245 address.
16246
16247 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16248
16249 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16250 (arm_breakpoint_at): Recognize both breakpoints.
16251 (the_low_target): Use the correct breakpoint instruction.
16252
16253 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16254
16255 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16256 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16257 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16258 (the_low_target): Update.
16259
16260 2005-10-25 Andreas Schwab <schwab@suse.de>
16261
16262 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16263
16264 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16265 (ia64_num_regs): Reduce to 462.
16266
16267 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16268
16269 * acinclude.m4: Correct quoting.
16270 * aclocal.m4: Regenerated.
16271
16272 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16273 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16274 (thread_db_init): Call thread_db_err_str.
16275 * configure.ac: Check for TD_VERSION.
16276 * config.in, configure: Regenerated.
16277
16278 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16279
16280 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16281
16282 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16283
16284 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16285 is not available. Define HAVE_PTRACE_GETREGS if it is.
16286 * config.in, configure: Regenerated.
16287 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16288 * linux-i386-low.c, linux-m68k-low.c: Update to use
16289 HAVE_PTRACE_GETREGS.
16290 * linux-low.c (regsets_fetch_inferior_registers)
16291 (regsets_store_inferior_registers): Only return 0 if we processed
16292 GENERAL_REGS.
16293 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16294 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16295
16296 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16297
16298 * inferiors.c (struct thread_info): Add gdb_id.
16299 (add_thread): Add gdb_id argument.
16300 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16301 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16302 calls to add_thread.
16303 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16304 * server.c (handle_query): Use thread_to_gdb_id.
16305 (handle_v_cont, main): Use gdb_id_to_thread_id.
16306 * server.h (add_thread): Update prototype.
16307 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16308 prototypes.
16309
16310 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16311
16312 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16313 left-padded registers.
16314 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16315 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16316
16317 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16318
16319 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16320 * configure: Regenerate.
16321 * config.in: Regenerate.
16322 * server.h (NEED_DECLARATION_STRERROR):
16323 Replace with !HAVE_DECL_STRERROR.
16324
16325 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16326
16327 * linux-low.c (linux_wait, linux_send_signal): Don't test
16328 an unsigned long variable for > 0 if it could be MAX_ULONG.
16329 * server.c (myresume): Likewise.
16330 * target.c (set_desired_inferior): Likewise.
16331
16332 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16333
16334 * configure.ac: Simplify and improve check for socklen_t.
16335 * configure, config.in: Regenerate.
16336
16337 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16338
16339 * acconfig.h: Remove.
16340 * configure.ac: Add a test for socklen_t. Use three-argument
16341 AC_DEFINE throughout.
16342 * config.in: Regenerated using autoheader 2.59.
16343 * configure: Regenerated.
16344
16345 * gdbreplay.c (socklen_t): Provide a default.
16346 (remote_open): Use socklen_t.
16347 * remote-utils.c (socklen_t): Provide a default.
16348 (remote_open): Use socklen_t.
16349 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16350 unsigned char.
16351
16352 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16353 char for buffers.
16354 * linux-low.c (linux_read_memory, linux_write_memory)
16355 (linux_read_auxv): Likewise.
16356 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16357 (check_mem_write): Likewise.
16358 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16359 Likewise.
16360 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16361 (registers_from_string, register_data): Likewise.
16362 * server.c (handle_query, main): Likewise.
16363 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16364 (decode_M_packet): Likewise.
16365 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16366 * target.h (struct target_ops): Update read_memory, write_memory,
16367 and read_auxv.
16368 (read_inferior_memory, write_inferior_memory): Update.
16369 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16370 to unsigned char *.
16371 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16372 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16373 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16374 linux-s390-low.c, linux-sh-low.c: Update for changes in
16375 read_inferior_memory and the_low_target->breakpoint.
16376
16377 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16378
16379 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16380 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16381 * configure.srv: Add powerpc64-*-linux*.
16382 * linux-ppc64-low.c: New file.
16383
16384 2005-05-23 Orjan Friberg <orjanf@axis.com>
16385
16386 * linux-cris-low.c: New file with support for CRIS.
16387 * linux-crisv32-low.c: Ditto for CRISv32.
16388 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16389 (clean): Add reg-cris.c and reg-crisv32.c.
16390 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16391 reg-crisv32.o, and reg-crisv32.c to make rules.
16392 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16393 recognized targets.
16394
16395 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16396
16397 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16398 of sizeof (PTRACE_XFER_TYPE).
16399 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16400
16401 2005-05-12 Orjan Friberg <orjanf@axis.com>
16402
16403 * target.h (struct target_ops): Add insert_watchpoint,
16404 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16405 pointers for hardware watchpoint support.
16406 * linux-low.h (struct linux_target_ops): Ditto.
16407 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16408 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16409 to linux_target_ops.
16410 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16411 reply packet.
16412 * server.c (main): Recognize 'Z' and 'z' packets.
16413
16414 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16415
16416 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16417 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16418 (the_low_target): Add new members.
16419
16420 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16421
16422 * proc-service.c (ps_lgetregs): Search all_processes instead of
16423 all_threads.
16424
16425 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16426
16427 * server.c (start_inferior): Change return type to int.
16428 (attach_inferior): Change sigptr to int *.
16429 (handle_v_cont, handle_v_requests): Change signal to int *.
16430 (main): Change signal to int.
16431
16432 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16433
16434 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16435 * configure.srv: Add m32r*-*-linux*.
16436 * linux-m32r-low.c: New file.
16437
16438 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16439
16440 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16441
16442 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16443
16444 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16445 Take unsigned long arguments for PIDs.
16446 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16447 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16448 (wait_for_sigstop, linux_resume_one_process)
16449 (regsets_fetch_inferior_registers, linux_send_signal)
16450 (linux_read_auxv): Likewise. Update the types of variables holding
16451 PIDs. Update format string specifiers.
16452 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16453 * remote-utils.c (prepare_resume_reply): Likewise.
16454 * server.c (cont_thread, general_thread, step_thread)
16455 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16456 unsigned long.
16457 (handle_query): Update format specifiers.
16458 (handle_v_cont, main): Use strtoul for thread IDs.
16459 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16460 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16461 (general_thread, step_thread, thread_from_wait)
16462 (old_thread_from_wait): Update.
16463 * target.h (struct thread_resume): Use unsigned long for THREAD.
16464 (struct target_ops): Use unsigned long for arguments to attach and
16465 thread_alive.
16466
16467 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16468
16469 * acinclude.m4: Include bfd/bfd.m4 directly.
16470 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16471 <agriffis@toolchain.org>.
16472 * aclocal.m4, configure: Regenerated.
16473
16474 2005-01-07 Andrew Cagney <cagney@gnu.org>
16475
16476 * configure.ac: Rename configure.in, require autoconf 2.59.
16477 * configure: Re-generate.
16478
16479 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16480
16481 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16482 LIBS when finished.
16483 * aclocal.m4: Regenerated.
16484 * configure: Regenerated.
16485
16486 2004-11-21 Andreas Schwab <schwab@suse.de>
16487
16488 * linux-m68k-low.c (m68k_num_gregs): Define.
16489 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16490 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16491 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16492 (m68k_breakpoint_at): New. Add to the_low_target.
16493
16494 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16495 srv_linux_thread_db to yes.
16496
16497 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16498
16499 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16500 (ARCH_SET_FS): Likewise.
16501 (ARCH_GET_FS): Likewise.
16502 (ARCH_GET_GS): Likewise.
16503
16504 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16505
16506 * linux-i386-low.c (ps_get_thread_area): New.
16507 * linux-x86-64-low.c (ps_get_thread_area): New.
16508 * linux-low.c: Include <sys/syscall.h>.
16509 (linux_kill_one_process): Don't kill the first thread here.
16510 (linux_kill): Kill the first thread here.
16511 (kill_lwp): New function.
16512 (send_sigstop, linux_send_signal): Use it.
16513 * proc-service.c: Clean up #ifdefs.
16514 (fpregset_info): Delete.
16515 (ps_lgetregs): Update and enable implementation.
16516 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16517 implementations.
16518 * remote-utils.c (struct sym_cache, symbol_cache): New.
16519 (input_interrupt): Print a clearer message.
16520 (async_io_enabled): New variable.
16521 (enable_async_io, disable_async_io): Use it. Update comments.
16522 (look_up_one_symbol): Use the symbol cache.
16523 * thread-db.c (thread_db_look_up_symbols): New function.
16524 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16525
16526 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16527
16528 * configure.in: Test for -rdynamic.
16529 * configure: Regenerated.
16530 * Makefile (INTERNAL_LDFLAGS): New.
16531 (gdbserver, gdbreplay): Use it.
16532
16533 2004-09-02 Andrew Cagney <cagney@gnu.org>
16534
16535 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16536
16537 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16538
16539 * linux-low.c (linux_wait): Clear all_processes list also.
16540
16541 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16542
16543 * linux-low.c: Include <errno.h>. Remove extern declaration of
16544 errno.
16545
16546 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16547
16548 * gdbreplay.c, server.h, utils.c: Update copyright years.
16549
16550 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16551
16552 * server.c (main): Print child status or termination signal from
16553 variable 'signal', not 'sig'.
16554
16555 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16556
16557 * linux-low.c (linux_read_memory): Change return type to
16558 int. Check for and return error from ptrace().
16559 * target.c (read_inferior_memory): Change return type to int. Pass
16560 back return status from the_target->read_memory().
16561 * target.h (struct target_ops): Adapt *read_memory() prototype.
16562 Update comment.
16563 (read_inferior_memory): Adapt prototype.
16564 * server.c (main): Return an error packet if
16565 read_inferior_memory() returns an error.
16566
16567 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16568
16569 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16570 Unify with other clean targets.
16571
16572 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16573
16574 * server.c (handle_v_cont): Call set_desired_inferior.
16575
16576 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16577
16578 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16579
16580 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16581
16582 * linux-low.c (linux_wait): Unblock async I/O.
16583 (linux_resume): Block and enable async I/O.
16584 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16585 * server.h (block_async_io, unblock_async_io): Add prototypes.
16586
16587 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16588
16589 * remote-utils.c (remote_open): Print a status notice after
16590 opening a TCP port.
16591 * server.c (attach_inferior): Print a status notice after
16592 attaching.
16593
16594 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16595
16596 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16597
16598 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16599
16600 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16601 error packet.
16602 * server.c, target.h: Update copyright years.
16603
16604 2004-02-25 Roland McGrath <roland@redhat.com>
16605
16606 * target.h (struct target_ops): New member `read_auxv'.
16607 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16608 * linux-low.c (linux_read_auxv): New function.
16609 (linux_target_ops): Initialize `read_auxv' member to that.
16610
16611 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16612
16613 Committed by Jim Blandy <jimb@redhat.com>.
16614
16615 * linux-s390-low.c (s390_num_regs): Update.
16616 (s390_regmap): Remove control registers. Use __s390x__ predefine
16617 instead of GPR_SIZE to distiguish s390 and s390x targets.
16618
16619 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16620
16621 * linux-low.c: Update copyright year.
16622 (check_removed_breakpoint): Clear pending_is_breakpoint.
16623 (linux_set_resume_request, linux_queue_one_thread)
16624 (resume_status_pending_p): New functions.
16625 (linux_continue_one_thread): Use process->resume.
16626 (linux_resume): Only resume threads if there are no pending events.
16627 * linux-low.h (struct process_info): Add resume request
16628 pointer.
16629
16630 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16631
16632 * regcache.c (new_register_cache): Clear the allocated register
16633 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16634
16635 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16636
16637 * linux-low.c (linux_resume): Take a struct thread_resume *
16638 argument.
16639 (linux_wait): Update call.
16640 (resume_ptr): New static variable.
16641 (linux_continue_one_thread): Renamed from
16642 linux_continue_one_process. Use resume_ptr.
16643 (linux_resume): Use linux_continue_one_thread.
16644 * server.c (handle_v_cont, handle_v_requests): New functions.
16645 (myresume): New function.
16646 (main): Handle 'v' case.
16647 * target.h (struct thread_resume): New type.
16648 (struct target_ops): Change argument of "resume" to struct
16649 thread_resume *.
16650 (myresume): Delete macro.
16651
16652 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16653
16654 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16655 (uninstall): Support DESTDIR.
16656
16657 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16658
16659 * configure.srv: Add xscale*linux copy of arm*linux entry.
16660
16661 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16662
16663 * linux-arm-low.c (arm_reinsert_addr): New function.
16664 (the_low_target): Add arm_reinsert_addr.
16665
16666 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16667
16668 * mem-break.c: Remove whitespace at end of file.
16669
16670 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16671
16672 * configure.in: Check whether we need to prototype strerror.
16673 * server.h: Optionally prototype strerror.
16674 * gdbreplay.c (perror_with_name): Use strerror.
16675 * linux-low.c (linux_attach_lwp): Use strerror.
16676 * utils.c (perror_with_name): Use strerror.
16677 * config.in, configure: Regenerated.
16678
16679 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16680
16681 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16682 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16683
16684 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16685
16686 * Makefile.in (SFILES): Update.
16687 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16688 low-sun3.c: Remove files.
16689
16690 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16691
16692 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16693 (linux_detach_one_process, linux_detach): New functions.
16694 (linux_target_ops): Add linux_detach.
16695 * server.c (main): Handle 'D' packet.
16696 * target.h (struct target_ops): Add "detach" member.
16697 (detach_inferior): Define.
16698
16699 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16700
16701 From Kelley Cook <kelleycook@wideopenwest.com>:
16702 * configure.srv: Accept i[34567]86 variants.
16703
16704 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16705
16706 * linux-low.c (linux_wait_for_event): Correct comment typos.
16707 (linux_resume_one_process): Call check_removed_breakpoint.
16708 (linux_send_signal): New function.
16709 (linux_target_ops): Add linux_send_signal.
16710 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16711 of kill.
16712 * target.h (struct target_ops): Add send_signal.
16713
16714 2003-05-29 Jim Blandy <jimb@redhat.com>
16715
16716 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16717 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16718 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16719 away part of the register's value.
16720
16721 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16722
16723 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16724 (linux_wait_for_event, linux_init_signals): Likewise.
16725
16726 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16727
16728 * configure.in: Check for stdlib.h.
16729 * configure: Regenerated.
16730 * config.in: Regenerated.
16731
16732 2003-01-04 Andreas Schwab <schwab@suse.de>
16733
16734 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16735
16736 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16737
16738 * Makefile.in: Remove obsolete code.
16739
16740 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16741
16742 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16743 defined(PT_FPR0_HI).
16744
16745 2002-11-17 Stuart Hughes <seh@zee2.com>
16746
16747 * linux-arm-low.c (arm_num_regs): Increase.
16748 (arm_regmap): Include status register.
16749
16750 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16751
16752 * linux-low.c (register_addr): Remove incorrect -1 check.
16753
16754 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16755
16756 * linux-low.c (linux_create_inferior): Call setpgid. Return
16757 the new PID.
16758 (unstopped_p, linux_signal_pid): Remove.
16759 (linux_target_ops): Remove linux_signal_pid.
16760 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16761 global instead of target method.
16762 * target.h (struct target_ops): Remove signal_pid. Update comment
16763 for create_inferior.
16764 * server.c (signal_pid): New variable.
16765 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16766 gdbserver. Set the child to be the foreground process group.
16767 (attach_inferior): Set signal_pid.
16768
16769 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16770
16771 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16772
16773 2002-08-20 Jim Blandy <jimb@redhat.com>
16774
16775 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16776 default for this.
16777
16778 2002-08-01 Andrew Cagney <cagney@redhat.com>
16779
16780 * Makefile.in: Make chill references obsolete.
16781
16782 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16783
16784 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16785 * configure: Regenerate.
16786 * config.in: Regenerate.
16787
16788 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16789
16790 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16791 (perror_with_name, remote_close, remote_open, expect, play): Static.
16792
16793 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16794
16795 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16796 byte offsets instead of an array of indexes.
16797 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16798
16799 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16800
16801 * regcache.c: Add comment.
16802
16803 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16804
16805 * thread-db.c: New file.
16806 * proc-service.c: New file.
16807 * acinclude.m4: New file.
16808 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16809 proc-service.o, and thread-db.o.
16810 (linux-low.o): Add USE_THREAD_DB.
16811 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16812 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16813 * aclocal.m4: Regenerated.
16814 * config.in: Regenerated.
16815 * configure: Regenerated.
16816 * configure.in: Check for proc_service.h, sys/procfs.h,
16817 thread_db.h, and linux/elf.h headrs.
16818 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16819 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16820 Check for -lthread_db and thread support.
16821 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16822 PowerPC, and SuperH.
16823 * i387-fp.c: Constify arguments.
16824 * i387-fp.h: Likewise.
16825 * inferiors.c: (struct thread_info): Renamed from
16826 `struct inferior_info'. Remove PID member. Use generic inferior
16827 list header. All uses updated.
16828 (inferiors, signal_pid): Removed.
16829 (all_threads): New variable.
16830 (get_thread): Define.
16831 (add_inferior_to_list): New function.
16832 (for_each_inferior): New function.
16833 (change_inferior_id): New function.
16834 (add_inferior): Removed.
16835 (remove_inferior): New function.
16836 (add_thread): New function.
16837 (free_one_thread): New function.
16838 (remove_thread): New function.
16839 (clear_inferiors): Use for_each_inferior and free_one_thread.
16840 (find_inferior): New function.
16841 (find_inferior_id): New function.
16842 (inferior_target_data): Update argument type.
16843 (set_inferior_target_data): Likewise.
16844 (inferior_regcache_data): Likewise.
16845 (set_inferior_regcache_data): Likewise.
16846 * linux-low.c (linux_bp_reinsert): Remove.
16847 (all_processes, stopping_threads, using_thrads)
16848 (struct pending_signals, debug_threads, pid_of): New.
16849 (inferior_pid): Replace with macro.
16850 (struct inferior_linux_data): Remove.
16851 (get_stop_pc, add_process): New functions.
16852 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16853 Use add_process and add_thread.
16854 (linux_attach_lwp): New function, based on old linux_attach. Use
16855 add_process and add_thread. Set stop_expected for new threads.
16856 (linux_attach): New function.
16857 (linux_kill_one_process): New function.
16858 (linux_kill): Kill all LWPs.
16859 (linux_thread_alive): Use find_inferior_id.
16860 (check_removed_breakpoints, status_pending_p): New functions.
16861 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16862 Update. Use WNOHANG. Wait for cloned processes also. Update process
16863 struct for the found process.
16864 (linux_wait_for_event): New function.
16865 (linux_wait): Use it. Support LWPs.
16866 (send_sigstop, wait_for_sigstop, stop_all_processes)
16867 (linux_resume_one_process, linux_continue_one_process): New functions.
16868 (linux_resume): Support LWPs.
16869 (REGISTER_RAW_SIZE): Remove.
16870 (fetch_register): Use register_size instead. Call supply_register.
16871 (usr_store_inferior_registers): Likewise. Call collect_register.
16872 Fix recursive case.
16873 (regsets_fetch_inferior_registers): Improve error message.
16874 (regsets_store_inferior_registers): Add debugging.
16875 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16876 (unstopped_p, linux_signal_pid): New functions.
16877 (linux_target_ops): Add linux_signal_pid.
16878 (linux_init_signals): New function.
16879 (initialize_low): Call it. Initialize using_threads.
16880 * regcache.c (inferior_regcache_data): Add valid
16881 flag.
16882 (get_regcache): Fetch registers lazily. Add fetch argument
16883 and update all callers.
16884 (regcache_invalidate_one, regcache_invalidate): New
16885 functions.
16886 (new_register_cache): Renamed from create_register_cache.
16887 Return the new regcache.
16888 (free_register_cache): Change argument to a void *.
16889 (registers_to_string, registers_from_string): Call get_regcache
16890 with fetch flag set.
16891 (register_data): Make static. Pass fetch flag to get_regcache.
16892 (supply_register): Call get_regcache with fetch flag clear.
16893 (collect_register): Call get_regcache with fetch flag set.
16894 (collect_register_as_string): New function.
16895 * regcache.h: Update.
16896 * remote-utils.c (putpkt): Flush after debug output and use
16897 stderr.
16898 Handle input interrupts while waiting for an ACK.
16899 (input_interrupt): Use signal_pid method.
16900 (getpkt): Flush after debug output and use stderr.
16901 (outreg): Use collect_register_as_string.
16902 (new_thread_notify, dead_thread_notify): New functions.
16903 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16904 and general_thread.
16905 (look_up_one_symbol): Flush after debug output.
16906 * server.c (step_thread, server_waiting): New variables.
16907 (start_inferior): Don't use signal_pid. Update call to mywait.
16908 (attach_inferior): Update call to mywait.
16909 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16910 (main): Don't fetch/store registers explicitly. Use
16911 set_desired_inferior. Support proposed ``Hs'' packet. Update
16912 calls to mywait.
16913 * server.h: Update.
16914 (struct inferior_list, struct_inferior_list_entry): New.
16915 * target.c (set_desired_inferior): New.
16916 (write_inferior_memory): Constify.
16917 (mywait): New function.
16918 * target.h: Update.
16919 (struct target_ops): New signal_pid method.
16920 (mywait): Removed macro, added prototype.
16921
16922 * linux-low.h (regset_func): Removed.
16923 (regset_fill_func, regset_store_func): New.
16924 (enum regset_type): New.
16925 (struct regset_info): Add type field. Use new operation types.
16926 (struct linux_target_ops): stop_pc renamed to get_pc.
16927 Add decr_pc_after_break and breakpoint_at.
16928 (get_process, get_thread_proess, get_process_thread)
16929 (strut process_info, all_processes, linux_attach_lwp)
16930 (thread_db_init): New.
16931
16932 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16933 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16934 (the_low_target): Add new members.
16935 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16936 (i386_store_fpxregset): Constify.
16937 (target_regsets): Add new kind identifier.
16938 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16939 (i386_set_pc): Add debugging.
16940 (i386_breakpoint_at): New function.
16941 (the_low_target): Add new members.
16942 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16943 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16944 (mips_breakpoint_at): New.
16945 (the_low_target): Add new members.
16946 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16947 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16948 (the_low_target): Add new members.
16949 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16950 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16951 (the_low_target): Add new members.
16952 * linux-x86-64-low.c (target_regsets): Add new kind
16953 identifier.
16954
16955 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16956
16957 From Martin Pool <mbp@samba.org>:
16958 * server.c (gdbserver_usage): New function.
16959 (main): Call it.
16960
16961 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16962
16963 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16964 stop_at -> stop_pc.
16965
16966 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16967
16968 * Makefile.in: Remove obsolete code.
16969
16970 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16971
16972 * linux-low.c (regsets_fetch_inferior_registers),
16973 (regsets_store_inferior_registers): Removed cast to int from
16974 ptrace() calls.
16975 * regcache.h: Added declaration of struct inferior_info.
16976
16977 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16978
16979 * inferiors.c (struct inferior_info): Add regcache_data.
16980 (add_inferior): Call create_register_cache.
16981 (clear_inferiors): Call free_register_cache.
16982 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16983 * regcache.c (struct inferior_regcache_data): New.
16984 (registers): Remove.
16985 (get_regcache): New function.
16986 (create_register_cache, free_register_cache): New functions.
16987 (set_register_cache): Don't initialize the register cache here.
16988 (registers_to_string, registers_from_string, register_data): Call
16989 get_regcache.
16990 * regcache.h: Add prototypes.
16991 * server.h: Likewise.
16992
16993 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16994
16995 * mem-break.c: New file.
16996 * mem-break.h: New file.
16997 * Makefile.in: Add mem-break.o rule; update server.h
16998 dependencies.
16999 * inferiors.c (struct inferior_info): Add target_data
17000 member.
17001 (clear_inferiors): Free target_data member if set.
17002 (inferior_target_data, set_inferior_target_data): New functions.
17003 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
17004 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
17005 * linux-low.c (linux_bp_reinsert): New variable.
17006 (struct inferior_linux_data): New.
17007 (linux_create_inferior): Use set_inferior_target_data.
17008 (linux_attach): Likewise. Call add_inferior.
17009 (linux_wait_for_one_inferior): New function.
17010 (linux_wait): Call it.
17011 (linux_write_memory): Add const.
17012 (initialize_low): Call set_breakpoint_data.
17013 * linux-low.h (struct linux_target_ops): Add breakpoint
17014 handling members.
17015 * server.c (attach_inferior): Remove extra add_inferior
17016 call.
17017 * server.h: Include mem-break.h. Update inferior.c
17018 prototypes.
17019 * target.c (read_inferior_memory)
17020 (write_inferior_memory): New functions.
17021 * target.h (read_inferior_memory)
17022 (write_inferior_memory): Change macros to prototypes.
17023 (struct target_ops): Update comments. Add const to write_memory
17024 definition.
17025
17026 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
17027
17028 * linux-low.c (usr_store_inferior_registers): Support
17029 registers which are allowed to fail to store.
17030 * linux-low.h (linux_target_ops): Likewise.
17031 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
17032 (ppc_cannot_store_register): FPSCR may not be storable.
17033
17034 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17035
17036 * server.h: Include <string.h> if HAVE_STRING_H.
17037 * ChangeLog: Correct paths in last ChangeLog entry.
17038
17039 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17040
17041 * linux-low.h: Remove obsolete prototypes.
17042 (struct linux_target_ops): New.
17043 (extern the_low_target): New.
17044 * linux-low.c (num_regs, regmap): Remove declarations.
17045 (register_addr): Use the_low_target explicitly.
17046 (fetch_register): Likewise.
17047 (usr_fetch_inferior_registers): Likewise.
17048 (usr_store_inferior_registers): Likewise.
17049 * linux-arm-low.c (num_regs): Remove.
17050 (arm_num_regs): Define.
17051 (arm_regmap): Renamed from regmap, made static.
17052 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
17053 made static.
17054 (arm_cannot_store_register): Renamed from cannot_store_register,
17055 made static.
17056 (the_low_target): New.
17057 * linux-i386-low.c (num_regs): Remove.
17058 (i386_num_regs): Define.
17059 (i386_regmap): Renamed from regmap, made static.
17060 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
17061 made static.
17062 (i386_cannot_store_register): Renamed from cannot_store_register,
17063 made static.
17064 (the_low_target): New.
17065 * linux-ia64-low.c (num_regs): Remove.
17066 (ia64_num_regs): Define.
17067 (ia64_regmap): Renamed from regmap, made static.
17068 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
17069 made static.
17070 (ia64_cannot_store_register): Renamed from cannot_store_register,
17071 made static.
17072 (the_low_target): New.
17073 * linux-m68k-low.c (num_regs): Remove.
17074 (m68k_num_regs): Define.
17075 (m68k_regmap): Renamed from regmap, made static.
17076 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17077 made static.
17078 (m68k_cannot_store_register): Renamed from cannot_store_register,
17079 made static.
17080 (the_low_target): New.
17081 * linux-mips-low.c (num_regs): Remove.
17082 (mips_num_regs): Define.
17083 (mips_regmap): Renamed from regmap, made static.
17084 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17085 made static.
17086 (mips_cannot_store_register): Renamed from cannot_store_register,
17087 made static.
17088 (the_low_target): New.
17089 * linux-ppc-low.c (num_regs): Remove.
17090 (ppc_num_regs): Define.
17091 (ppc_regmap): Renamed from regmap, made static.
17092 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17093 made static.
17094 (ppc_cannot_store_register): Renamed from cannot_store_register,
17095 made static.
17096 (the_low_target): New.
17097 * linux-s390-low.c (num_regs): Remove.
17098 (s390_num_regs): Define.
17099 (s390_regmap): Renamed from regmap, made static.
17100 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17101 made static.
17102 (s390_cannot_store_register): Renamed from cannot_store_register,
17103 made static.
17104 (the_low_target): New.
17105 * linux-sh-low.c (num_regs): Remove.
17106 (sh_num_regs): Define.
17107 (sh_regmap): Renamed from regmap, made static.
17108 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17109 made static.
17110 (sh_cannot_store_register): Renamed from cannot_store_register,
17111 made static.
17112 (the_low_target): New.
17113 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17114 (the_low_target): New.
17115
17116 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17117
17118 * Makefile.in: Add stamp-h target.
17119 * configure.in: Create stamp-h.
17120 * configure: Regenerated.
17121
17122 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17123
17124 * inferiors.c: New file.
17125 * target.c: New file.
17126 * target.h: New file.
17127 * Makefile.in: Add target.o and inferiors.o. Update
17128 dependencies.
17129 * linux-low.c (inferior_pid): New static variable,
17130 moved from server.c.
17131 (linux_create_inferior): Renamed from create_inferior.
17132 Call add_inferior. Return 0 on success instead of a PID.
17133 (linux_attach): Renamed from myattach.
17134 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17135 (linux_thread_alive): Renamed from mythread_alive.
17136 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17137 child dies.
17138 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17139 (regsets_store_inferior_registers): Correct error message.
17140 Add missing ``return 0''.
17141 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17142 (linux_store_registers): Renamed from store_inferior_registers.
17143 (linux_read_memory): Renamed from read_inferior_memory.
17144 (linux_write_memory): Renamed from write_inferior_memory.
17145 (linux_target_ops): New structure.
17146 (initialize_low): Call set_target_ops ().
17147 * remote-utils.c (unhexify): New function.
17148 (hexify): New function.
17149 (input_interrupt): Send signals to ``signal_pid''.
17150 * server.c (inferior_pid): Remove.
17151 (start_inferior): Update create_inferior call.
17152 (attach_inferior): Call add_inferior.
17153 (handle_query): New function.
17154 (main): Call handle_query for `q' packets.
17155 * server.h: Include "target.h". Remove obsolete prototypes.
17156 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17157
17158 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17159
17160 * Makefile.in: Add WARN_CFLAGS. Update configury
17161 dependencies.
17162 * configure.in: Check for <string.h>
17163 * configure: Regenerate.
17164 * config.in: Regenerate.
17165 * gdbreplay.c: Include needed system headers.
17166 (remote_open): Remove strchr prototype.
17167 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17168 * regcache.c (supply_register): Change buf argument to const void *.
17169 (supply_register_by_name): Likewise.
17170 (collect_register): Change buf argument to void *.
17171 (collect_register_by_name): Likewise.
17172 * regcache.h: Add missing prototypes.
17173 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17174 * server.c (handle_query): New function.
17175 (attached): New static variable, moved out of main.
17176 (main): Quiet longjmp clobber warnings.
17177 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17178 * utils.c (error): Remove NORETURN.
17179 (fatal): Likewise.
This page took 0.427947 seconds and 4 git commands to generate.