[PowerPC] Include nat/linux-ptrace.h in native targets
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2018-10-31 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
2
3 * linux-ppc-low.c: Include nat/linux-ptrace.h.
4
5 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
6
7 * configure.srv (ipa_ppc_linux_regobj): Add
8 powerpc-isa207-htm-vsx32l-ipa.o and
9 powerpc-isa207-htm-vsx64l-ipa.o.
10 (powerpc*-*-linux*): Add powerpc-isa207-htm-vsx32l.o and
11 powerpc-isa207-htm-vsx64l.o to srv_regobj. Add
12 rs6000/power-htm-spr.xml, rs6000/power-htm-core.xml,
13 rs6000/power64-htm-core.xml, rs6000/power-htm-fpu.xml,
14 rs6000/power-htm-altivec.xml, rs6000/power-htm-vsx.xml,
15 rs6000/power-htm-ppr.xml, rs6000/power-htm-dscr.xml,
16 rs6000/power-htm-tar.xml, rs6000/powerpc-isa207-htm-vsx32l.xml,
17 and rs6000/powerpc-isa207-htm-vsx64l.xml to srv_xmlfiles.
18 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
19 <PPC_TDESC_ISA207_HTM_VSX>: New enum value.
20 (init_registers_powerpc_isa207_htm_vsx32l)
21 (init_registers_powerpc_isa207_htm_vsx64l): Declare.
22 * linux-ppc-low.c (ppc_fill_tm_sprregset, ppc_store_tm_sprregset)
23 (ppc_store_tm_cgprregset, ppc_store_tm_cfprregset)
24 (ppc_store_tm_cvrregset, ppc_store_tm_cvsxregset)
25 (ppc_store_tm_cpprregset, ppc_store_tm_cdscrregset)
26 (ppc_store_tm_ctarregset): New functions.
27 (ppc_regsets): Add entries for HTM regsets.
28 (ppc_arch_setup): Set htm in features struct when needed. Set
29 sizes for the HTM regsets.
30 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_HTM_VSX.
31 (initialize_low_arch): Call
32 init_registers_powerpc_isa207_htm_vsx32l and
33 init_registers_powerpc_isa207_htm_vsx64l.
34 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
35 PPC_TDESC_ISA207_HTM_VSX.
36 (initialize_low_tracepoint): Call
37 init_registers_powerpc_isa207_htm_vsx32l and
38 init_registers_powerpc_isa207_htm_vsx64l.
39
40 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
41
42 * configure.srv (powerpc*-*-linux*): Add rs6000/power-ebb.xml and
43 rs6000/power-linux-pmu.xml to srv_xmlfiles.
44 * linux-ppc-low.c (ppc_store_ebbregset, ppc_fill_pmuregset)
45 (ppc_store_pmuregset): New functions.
46 (ppc_regsets): Add entries for ebb and pmu regsets.
47 (ppc_arch_setup): Set isa207 in features struct if the ebb and
48 pmu regsets are available. Set sizes for these regsets.
49
50 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
51
52 * configure.srv (ipa_ppc_linux_regobj): Add
53 powerpc-isa207-vsx64l-ipa.o and powerpc-isa207-vsx32l-ipa.o.
54 (powerpc*-*-linux*): Add powerpc-isa207-vsx32l.o and
55 powerpc-isa207-vsx64l.o to srv_regobj, add rs6000/power-tar.xml,
56 rs6000/powerpc-isa207-vsx32l.xml, and
57 rs6000/powerpc-isa207-vsx64l.xml to srv_xmlfiles.
58 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
59 <PPC_TDESC_ISA207_VSX>: New enum value.
60 (init_registers_powerpc_isa207_vsx32l): Declare.
61 (init_registers_powerpc_isa207_vsx64l): Declare.
62 * linux-ppc-low.c (ppc_fill_tarregset): New function.
63 (ppc_store_tarregset): New function.
64 (ppc_regsets): Add entry for the TAR regset.
65 (ppc_arch_setup): Set isa207 in features struct when needed. Set
66 size for the TAR regsets.
67 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA207_VSX.
68 (initialize_low_arch): Call init_registers_powerpc_isa207_vsx32l
69 and init_registers_powerpc_isa207_vsx64l.
70 * linux-ppc-ipa.c (get_ipa_tdesc): Handle PPC_TDESC_ISA207_VSX.
71 (initialize_low_tracepoint): Call
72 init_registers_powerpc_isa207_vsx32l and
73 init_registers_powerpc_isa207_vsx64l.
74
75 2018-10-26 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
76 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
77
78 * configure.srv (ipa_ppc_linux_regobj): Add
79 powerpc-isa205-ppr-dscr-vsx32l-ipa.o and
80 powerpc-isa205-ppr-dscr-vsx64l-ipa.o.
81 (powerpc*-*-linux*): Add powerpc-isa205-ppr-dscr-vsx32l.o and
82 powerpc-isa205-ppr-dscr-vsx64l.o to srv_regobj, add
83 rs6000/power-dscr.xml, rs6000/power-ppr.xml,
84 rs6000/powerpc-isa205-ppr-dscr-vsx32l.xml and
85 rs6000/powerpc-isa205-ppr-dscr-vsx64l.xml to srv_xmlfiles.
86 * linux-ppc-tdesc-init.h (enum ppc_linux_tdesc)
87 <PPC_TDESC_ISA205_PPR_DSCR_VSX>: New enum value.
88 (init_registers_powerpc_isa205_ppr_dscr_vsx32l)
89 (init_registers_powerpc_isa205_ppr_dscr_vsx64l): Declare.
90 * linux-ppc-low.c: Include "elf/common.h" and <sys/uio.h>.
91 (ppc_hwcap): Add comment.
92 (ppc_hwcap2): New global.
93 (ppc_check_regset, ppc_fill_pprregset, ppc_store_pprregset)
94 (ppc_fill_dscrregset, ppc_store_dscrregset): New functions.
95 (ppc_regsets): Add entries for the DSCR and PPR regsets.
96 (ppc_arch_setup): Get AT_HWCAP2. Set ppr_dscr in features struct
97 when needed. Set sizes for the the DSCR and PPR regsets.
98 (ppc_get_ipa_tdesc_idx): Return PPC_TDESC_ISA205_PPR_DSCR_VSX.
99 (initialize_low_arch): Call
100 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
101 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
102 * linux-ppc-ipa.c (get_ipa_tdesc): Handle
103 PPC_TDESC_ISA205_PPR_DSCR_VSX.
104 (initialize_low_tracepoint): Call
105 init_registers_powerpc_isa205_ppr_dscr_vsx32l and
106 init_registers_powerpc_isa205_ppr_dscr_vsx64l.
107
108 2018-10-26 Pedro Franco de Carvalho <pedromfc@linux.ibm.com>
109
110 * linux-ppc-low.c (ppc_fill_vrregset): Remove memset calls.
111
112 2018-10-10 Sergio Durigan Junior <sergiodj@redhat.com>
113 Simon Marchi <simark@simark.ca>
114
115 * acinclude.m4: Include "../selftest.m4".
116 * configure: Regenerate.
117 * configure.ac: Use "GDB_AC_SELFTEST".
118 * configure.srv: Use "$enable_unittests" instead of
119 "$development" when checking whether unit tests have been
120 enabled.
121 * server.c (captured_main): Update message informing that
122 selftests have been disabled.
123
124 2018-10-04 Tom Tromey <tom@tromey.com>
125
126 * configure: Rebuild.
127
128 2018-10-04 Tom Tromey <tom@tromey.com>
129
130 * server.c (handle_status): Rename inner "thread".
131 (process_serial_event): Declare "res" in 'm' case.
132 * linux-low.c (last_thread_of_process_p, find_lwp_pid)
133 (iterate_over_lwps): Rename inner "thread".
134 (linux_qxfer_libraries_svr4): Rename inner "len".
135 * gdbthread.h (find_thread_in_random): Rename inner "thread".
136
137 2018-10-01 Gary Benson <gbenson@redhat.com>
138
139 * gdb_proc_service.h: Moved common code to
140 common/gdb_proc_service.h.
141
142 2018-10-01 Gary Benson <gbenson@redhat.com>
143
144 * gdb_proc_service.h: Synchronize comments and whitespace with
145 GDB's version of this file.
146
147 2018-09-25 Tom Tromey <tom@tromey.com>
148
149 * configure: Rebuild.
150 * configure.ac (WARN_CFLAGS): Don't remove -Wmissing-prototypes.
151
152 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
153
154 * Makefile.in (gdbserver$(EXEEXT)): Sort OBS.
155 (gdbreplay$(EXEEXT)): Sort GDBREPLAY_OBS.
156 ($(IPA_LIB)): Sort IPA_OBJS.
157
158 2018-09-16 Simon Marchi <simon.marchi@polymtl.ca>
159
160 * Makefile.in: Remove references to $(ADD_DEPS).
161
162 2018-09-16 Tom Tromey <tom@tromey.com>
163
164 * remote-utils.c (remote_open): Use GNU style for metasyntactic
165 variables.
166 * gdbreplay.c (gdbreplay_usage): Use GNU style for metasyntactic
167 variables.
168
169 2018-09-05 Tom Tromey <tom@tromey.com>
170
171 * configure: Rebuild.
172
173 2018-08-28 Simon Marchi <simon.marchi@polymtl.ca>
174
175 PR build/23399
176 * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
177
178 2018-08-27 Tom Tromey <tom@tromey.com>
179
180 PR build/23087:
181 * configure: Rebuild.
182
183 2018-08-27 Tom Tromey <tom@tromey.com>
184
185 * linux-s390-low.c (s390_emit_ext, s390_emit_litpool)
186 (s390_emit_const, s390_emit_reg, s390_emit_zero_ext)
187 (s390_emit_stack_adjust, s390_emit_set_r2, s390x_emit_ext)
188 (s390x_emit_const, s390x_emit_reg, s390x_emit_zero_ext)
189 (s390x_emit_stack_adjust): Add casts to unsigned char.
190
191 2018-08-22 Simon Marchi <simon.marchi@ericsson.com>
192
193 PR gdb/23374
194 PR gdb/23375
195 * server.h (struct client_state) <disable_randomization>:
196 Initialize to 1.
197
198 2018-07-22 Simon Marchi <simon.marchi@polymtl.ca>
199
200 * linux-mips-low.c (mips_collect_ptrace_register): Remove unused
201 variable.
202 (mips_supply_ptrace_register): Likewise.
203
204 2018-07-22 Tom Tromey <tom@tromey.com>
205
206 * configure: Rebuild.
207
208 2018-07-22 Tom Tromey <tom@tromey.com>
209
210 * win32-low.c (win32_create_inferior): Remove unused variables.
211 * gdbreplay.c (remote_open): Remove unused variable.
212 * remote-utils.c (remote_prepare): Remove unused variable.
213 * x86-tdesc.h (X86_TDESC_H): Define.
214 (amd64_expedite_regs): Define conditionally.
215 (i386_expedite_regs): Mark ATTRIBUTE_UNUSED.
216 * linux-x86-tdesc.c (i386_tdescs): Move inside #if.
217 * remote-utils.c (readchar): Remove unused variable.
218
219 2018-07-13 Pedro Alves <palves@redhat.com>
220
221 * linux-low.c (linux_kill): Change parameter to process_info
222 pointer instead of pid. Adjust.
223 * lynx-low.c (lynx_kill): Likewise.
224 * nto-low.c (nto_kill): Likewise.
225 * spu-low.c (spu_kill): Likewise.
226 * win32-low.c (win32_kill): Likewise.
227 * server.c (handle_v_kill, kill_inferior_callback)
228 (detach_or_kill_for_exit): Adjust.
229 * target.c (kill_inferior): Change parameter to process_info
230 pointer instead of pid. Adjust.
231 * target.h (struct target_ops) <kill>: Change parameter to
232 process_info pointer instead of pid. Adjust all implementations
233 and callers.
234 (kill_inferior): Likewise.
235
236 2018-07-13 Pedro Alves <palves@redhat.com>
237
238 * linux-low.c (linux_detach, linux_join): Change parameter to
239 process_info pointer instead of pid. Adjust.
240 * lynx-low.c (lynx_detach, lynx_join): Likewise.
241 * nto-low.c (nto_detach): Likewise.
242 * spu-low.c (spu_detach, spu_join): Likewise.
243 * win32-low.c (win32_detach, win32_join): Likewise.
244 * server.c (handle_detach, detach_or_kill_for_exit): Adjust.
245 * target.h (struct target_ops) <detach, join>: Change parameter to
246 process_info pointer instead of pid. Adjust all implementations
247 and callers.
248 (detach_inferior, join_inferior): Rename 'pid' parameter to
249 'proc'.
250
251 2018-07-11 Sergio Durigan Junior <sergiodj@redhat.com>
252 Jan Kratochvil <jan.kratochvil@redhat.com>
253 Paul Fertser <fercerpav@gmail.com>
254 Tsutomu Seki <sekiriki@gmail.com>
255
256 * Makefile.in (SFILES): Add '$(srcdir)/common/netstuff.c'.
257 (OBS): Add 'common/netstuff.o'.
258 (GDBREPLAY_OBS): Likewise.
259 * gdbreplay.c: Include 'wspiapi.h' and 'netstuff.h'.
260 (remote_open): Implement support for IPv6
261 connections.
262 * remote-utils.c: Include 'netstuff.h', 'filestuff.h'
263 and 'wspiapi.h'.
264 (handle_accept_event): Accept connections from IPv6 sources.
265 (remote_prepare): Handle IPv6-style hostnames; implement
266 support for IPv6 connections.
267 (remote_open): Implement support for printing connections from
268 IPv6 sources.
269
270 2018-07-11 Pedro Alves <palves@redhat.com>
271
272 PR gdb/23377
273 * mem-break.c (any_persistent_commands): Add process_info
274 parameter and use it instead of relying on the current process.
275 Change return type to bool.
276 * mem-break.h (any_persistent_commands): Add process_info
277 parameter and change return type to bool.
278 * server.c (handle_detach): Remove require_running_or_return call.
279 Look up the process_info for the process we're about to detach.
280 If not found, return back error to GDB. Adjust
281 any_persistent_commands call to pass down a process pointer.
282
283 2018-07-11 Pedro Alves <palves@redhat.com>
284
285 * i387-fp.c (i387_cache_to_fsave, cache_to_fxsave)
286 (i387_cache_to_xsave): Use regcache_raw_get_unsigned_by_name
287 instead of collect_register_by_name.
288 * regcache.c (regcache_raw_get_unsigned_by_name): New.
289 * regcache.h (regcache_raw_get_unsigned_by_name): New.
290
291 2018-07-04 Vyacheslav Barinov <v.barinov@samsung.com>
292 Pedro Alves <palves@redhat.com>
293
294 * linux-low.c (initialize_low): Call linux_proc_init_warnings.
295
296 2018-07-03 Tom Tromey <tom@tromey.com>
297
298 * linux-low.c: Update.
299 * lynx-low.c: Update.
300 * mem-break.c: Update.
301 * nto-low.c: Update.
302 * remote-utils.c: Update.
303 * server.c: Update.
304 * spu-low.c: Update.
305 * target.c: Update.
306 * win32-low.c: Update.
307
308 2018-07-03 Tom Tromey <tom@tromey.com>
309
310 * server.c: Update.
311
312 2018-07-03 Tom Tromey <tom@tromey.com>
313
314 * linux-low.c: Update.
315
316 2018-07-03 Tom Tromey <tom@tromey.com>
317
318 * target.c: Update.
319
320 2018-07-03 Tom Tromey <tom@tromey.com>
321
322 * linux-low.c: Update.
323 * linux-mips-low.c: Update.
324 * lynx-low.c: Update.
325 * nto-low.c: Update.
326 * remote-utils.c: Update.
327 * server.c: Update.
328 * spu-low.c: Update.
329 * target.c: Update.
330 * thread-db.c: Update.
331
332 2018-07-03 Tom Tromey <tom@tromey.com>
333
334 * linux-low.c: Update.
335 * linux-mips-low.c: Update.
336 * lynx-low.c: Update.
337 * mem-break.c: Update.
338 * nto-low.c: Update.
339 * remote-utils.c: Update.
340 * server.c: Update.
341 * spu-low.c: Update.
342 * target.c: Update.
343 * tracepoint.c: Update.
344
345 2018-07-03 Tom Tromey <tom@tromey.com>
346
347 * linux-low.c: Update.
348 * linux-ppc-low.c: Update.
349 * linux-x86-low.c: Update.
350 * proc-service.c: Update.
351 * server.c: Update.
352 * spu-low.c: Update.
353 * thread-db.c: Update.
354 * win32-low.c: Update.
355
356 2018-07-03 Tom Tromey <tom@tromey.com>
357
358 * linux-low.c: Update.
359 * lynx-low.c: Update.
360 * nto-low.c: Update.
361 * remote-utils.c: Update.
362 * spu-low.c: Update.
363 * thread-db.c: Update.
364 * win32-low.c: Update.
365
366 2018-06-29 Joel Brobecker <brobecker@adacore.com>
367
368 * linux-x86-tdesc.c (amd64_linux_read_description): Add missing
369 parameter in call to 'amd64_create_target_description'.
370
371 2018-06-28 Jan Kratochvil <jan.kratochvil@redhat.com>
372
373 * x86-tdesc.h: Remove executable permission flag.
374
375 2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
376
377 * configure.ac: Remove AC_PREREQ, add missing quoting.
378 * configure: Re-generate.
379 * config.in: Re-generate.
380 * aclocal.m4: Re-generate.
381
382 2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
383
384 * tracepoint.h (current_traceframe): Remove declaration.
385
386 2018-06-18 Alan Hayward <alan.hayward@arm.com>
387
388 * linux-aarch64-low.c (is_sve_tdesc): New function.
389 (aarch64_sve_regs_copy_to_regcache): Likewise.
390 (aarch64_sve_regs_copy_from_regcache): Likewise.
391 (aarch64_regs_info): Add SVE checks.
392 (initialize_low_arch): Initialize SVE.
393
394 2018-06-18 Alan Hayward <alan.hayward@arm.com>
395
396 * Makefile.in: Add aarch64-sve-linux-ptrace.c.
397
398 2018-06-11 Alan Hayward <alan.hayward@arm.com>
399
400 * linux-aarch64-ipa.c (get_ipa_tdesc): Add null VQ param.
401 (initialize_low_tracepoint): Likewise
402 * linux-aarch64-low.c (aarch64_arch_setup): Get VQ.
403 * linux-aarch64-tdesc-selftest.c (aarch64_tdesc_test): Add null VQ
404 param.
405 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add VQ
406 checks.
407 * linux-aarch64-tdesc.h (aarch64_linux_read_description): Add VQ.
408
409 2018-06-11 Alan Hayward <alan.hayward@arm.com>
410
411 * server.h (PBUFSIZ): Increase size
412
413 2018-06-11 Alan Hayward <alan.hayward@arm.com>
414
415 * regcache.c (regcache::raw_compare): New function.
416 * regcache.h (regcache::raw_compare): New declaration.
417
418 2018-06-11 Alan Hayward <alan.hayward@arm.com>
419
420 * regcache.c (new_register_cache): Use new.
421 (free_register_cache): Use delete.
422 (register_data): Use const.
423 (supply_register): Move body inside regcache.
424 (regcache::raw_supply): New override function.
425 (collect_register): Move body inside regcache.
426 (regcache::raw_collect): New override function.
427 (regcache::get_register_status): New override function.
428 * regcache.h (struct regcache): Inherit from reg_buffer_common.
429
430 2018-06-09 Tom Tromey <tom@tromey.com>
431
432 * event-loop.c (gdb_event, gdb_event_p): Remove typedefs. Don't
433 declare queue.
434 (event_queue): Use std::queue.
435 (gdb_event_xfree): Remove.
436 (initialize_event_loop, process_event, wait_for_event): Update.
437
438 2018-06-08 Stan Cox <scox@redhat.com>
439
440 * win32-low.c (win32_create_inferior): last_ptid and last_status
441 moved to client_state.
442
443 2018-06-08 Pedro Alves <palves@redhat.com>
444
445 * Makefile.in (GDBREPLAY_OBS): Add common/cleanups.o,
446 common/common-exceptions.o, common/common-utils.o,
447 common/errors.o, common/print-utils.o and utils.o.
448 * gdbreplay.c: Include "common-defs.h" instead of the two
449 'config.h's here. Don't include stdio.h, errno.h, stdlib.h,
450 string.h or alloca.h.
451 (perror_with_name): Delete.
452 (remote_open): Use xstrdup instead of strdup.
453 (main): Rename to ...
454 (captured_main): ... this.
455 (main): New.
456
457 2018-06-08 Tom Tromey <tom@tromey.com>
458
459 * linux-low.c (linux_low_read_btrace): Update.
460
461 2018-06-04 Stan Cox <scox@redhat.com>
462
463 * server.h (struct client_state): New.
464 * server.c (cont_thread, general_thread, multi_process)
465 (report_fork_events, report_vfork_events, report_exec_events)
466 (report_thread_events, swbreak_feature, hwbreak_feature)
467 (vCont_supported, disable_randomization, pass_signals)
468 (program_signals, program_signals_p, last_status, last_ptid, own_buf):
469 Moved to client_state.
470 * remote-utils.c (remote_debug, noack_mode)
471 (transport_is_reliable): Moved to client_state.
472 * tracepoint.c (current_traceframe): Moved to client_state.
473
474 Update all callers.
475 * server.c, remote-utils.c, tracepoint.c, fork-child.c,
476 linux-low.c, remote-utils.h, target.c: Use client_state.
477
478 2018-05-31 Alan Hayward <alan.hayward@arm.com>
479
480 * configure.srv: Add new c/h file.
481
482 2018-05-31 Alan Hayward <alan.hayward@arm.com>
483
484 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add
485 null VQ.
486
487 2018-05-25 Maciej W. Rozycki <macro@mips.com>
488
489 * gdb.arch/mips-fpregset-core.exp: New test.
490 * gdb.arch/mips-fpregset-core.c: New test source.
491
492 2018-05-23 Erik Kurzinger <ekurzinger@nvidia.com>
493
494 PR server/23198
495 * hostio.c (require_int): Do not report overflow for integers
496 between 0xfffffff and 0x7fffffff.
497
498 2018-05-22 Maciej W. Rozycki <macro@mips.com>
499
500 * linux-mips-low.c [HAVE_PTRACE_GETREGS] (mips_collect_register)
501 (mips_supply_register): Move outside HAVE_PTRACE_GETREGS.
502 (mips_collect_ptrace_register, mips_supply_ptrace_register): New
503 functions.
504 (the_low_target): Wire them.
505
506 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
507
508 * linux-ppc-low.c (ppc_fill_vrregset): Add vscr_offset variable.
509 Set vscr_offset to 0 in little-endian mode and 12 in big-endian
510 mode. Call collect_register_by_name with vscr using
511 vscr_offset. Zero-pad vscr and vrsave fields in collector buffer.
512 (ppc_store_vrregset): Add and set vscr_offset variable as in
513 ppc_fill_vrregset. Call supply_register_by_name with vscr using
514 vscr_offset.
515
516 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
517
518 * linux-ppc-low.c (SIZEOF_VSXREGS, SIZEOF_VRREGS): Remove.
519 (ppc_arch_setup): Change SIZEOF_VRREGS and SIZEOF_VSXREGS to
520 PPC_LINUX_SIZEOF_VRREGSET and PPC_LINUX_SIZEOF_VSXREGSET.
521
522 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
523
524 * linux-ppc-low.c (ppc_fill_vsxregset): Remove ppc_hwcap check.
525 (ppc_store_vsxregset): Likewise.
526 (ppc_fill_vrregset): Likewise.
527 (ppc_store_vrregset): Likewise.
528 (ppc_fill_evrregset): Likewise.
529 (ppc_store_evrregset): Likewise.
530 (ppc_regsets): Set VSX/VR/EVR regset sizes to 0.
531 (ppc_arch_setup): Iterate through ppc_regsets and set sizes when
532 needed.
533
534 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
535
536 * linux-ppc-low.c (ppc_arch_setup): Remove code for getting the
537 wordsize of the inferior. Call ppc_linux_target_wordsize.
538
539 2018-05-22 Pedro Franco de Carvalho <pedromfc@linux.vnet.ibm.com>
540
541 * configure.srv (srv_tgtobj): Add arch/ppc-linux-common.o.
542 * Makefile.in (SFILES): Add arch/ppc-linux-common.c.
543 * linux-ppc-tdesc.h: Rename to linux-ppc-tdesc-init.h.
544 * linux-ppc-tdesc-init.h (tdesc_powerpc_32l, tdesc_powerpc_64l)
545 (tdesc_powerpc_altivec32l, tdesc_powerpc_altivec64l)
546 (tdesc_powerpc_cell32l, tdesc_powerpc_cell64l)
547 (tdesc_powerpc_vsx32l, tdesc_powerpc_vsx64l)
548 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_64l)
549 (tdesc_powerpc_isa205_altivec32l, tdesc_powerpc_isa205_altivec64l)
550 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_isa205_vsx64l)
551 (tdesc_powerpc_e500l): Remove.
552 * linux-ppc-ipa.c: Include arch/ppc-linux-tdesc.h and
553 linux-ppc-tdesc-init.h. Don't include linux-ppc-tdesc.h.
554 * linux-ppc-low.c: Include arch/ppc-linux-common.h,
555 arch/ppc-linux-tdesc.h, and linux-ppc-tdesc-init.h. Don't include
556 linux-ppc-tdesc.h.
557 (ppc_arch_setup): Remove target description matching code. Fill a
558 ppc_linux_features struct and call ppc_linux_match_description
559 with it.
560
561 2018-05-22 Maciej W. Rozycki <macro@mips.com>
562
563 * linux-mips-low.c (mips_cannot_fetch_register): Return 1 if the
564 width of the requested register exceeds the width of the
565 `ptrace' data type.
566 (mips_cannot_store_register): Likewise.
567
568 2018-05-21 Maciej W. Rozycki <macro@mips.com>
569
570 * linux-mips-low.c (mips_fetch_register): New function. Update
571 preceding comment.
572 (mips_store_gregset): Supply 0 rather than $restart for $zero.
573 (the_low_target): Wire `mips_fetch_register'.
574
575 2018-05-10 Joel Brobecker <brobecker@adacore.com>
576
577 * lynx-i386-low.c (LYNXOS_178): New macro.
578 [LYNXOS_178] (usr_fcontext_t): Provide a definition that matches
579 the layout on LynxOS-178.
580 (lynx_i386_fill_fpregset, lynx_i386_store_fpregset): Do not
581 handle floating point registers that are not supported by
582 LynxOS-178.
583
584 2018-05-10 Tom Tromey <tom@tromey.com>
585
586 * configure: Rebuild.
587
588 2018-05-10 Joel Brobecker <brobecker@adacore.com>
589
590 PR server/23158:
591 * tdesc.h (init_target_desc) <expedite_regs>: New parameter.
592 * tdesc.c (init_target_desc) <expedite_regs>: New parameter.
593 Use it to set the expedite_regs field in the given tdesc.
594 * x86-tdesc.h: New file.
595 * linux-aarch64-tdesc.c (aarch64_linux_read_description):
596 Adjust following the addition of the new expedite_regs parameter
597 to init_target_desc.
598 * linux-tic6x-low.c (tic6x_read_description): Likewise.
599 * linux-x86-tdesc.c: #include "x86-tdesc.h".
600 (i386_linux_read_description, amd64_linux_read_description):
601 Adjust following the addition of the new expedite_regs parameter
602 to init_target_desc.
603 * lynx-i386-low.c: #include "x86-tdesc.h".
604 (lynx_i386_arch_setup): Adjust following the addition of the new
605 expedite_regs parameter to init_target_desc.
606 * nto-x86-low.c: #include "x86-tdesc.h".
607 (nto_x86_arch_setup): Adjust following the addition of the new
608 expedite_regs parameter to init_target_desc.
609 * win32-i386-low.c: #include "x86-tdesc.h".
610 (i386_arch_setup): Adjust following the addition of the new
611 expedite_regs parameter to init_target_desc.
612
613 2018-05-10 Joel Brobecker <brobecker@adacore.com>
614
615 PR server/23158:
616 * win32-low.c (win32_create_inferior): Add call to my_wait
617 setting last_status global.
618
619 2018-05-10 Joel Brobecker <brobecker@adacore.com>
620
621 PR server/23158:
622 * win32-low.c (create_process): Only call gdb_tilde_expand if
623 inferior_cwd is not NULL.
624
625 2018-05-08 Andrew Burgess <andrew.burgess@embecosm.com>
626
627 * i387-fp.c (i387_cache_to_xsave): Only write x87 control
628 registers to the cache if their values have changed.
629 (i387_xsave_to_cache): Provide default values for x87 control
630 registers when these features are available, but disabled.
631 * regcache.c (supply_register_by_name_zeroed): New function.
632 * regcache.h (supply_register_by_name_zeroed): Declare new
633 function.
634
635 2018-05-07 Tom Tromey <tom@tromey.com>
636
637 * configure: Rebuild.
638
639 2018-05-04 Tom Tromey <tom@tromey.com>
640
641 * configure: Rebuild.
642
643 2018-05-04 Jan Kratochvil <jan.kratochvil@redhat.com>
644 Pedro Alves <palves@redhat.com>
645
646 * linux-aarch64-low.c (aarch64_stopped_data_address):
647 Likewise.
648
649 2018-04-27 Tom Tromey <tom@tromey.com>
650
651 * configure: Rebuild.
652
653 2018-04-23 Tom Tromey <tom@tromey.com>
654
655 * configure: Rebuild.
656
657 2018-04-19 Simon Marchi <simon.marchi@ericsson.com>
658
659 * Makefile.in (depcomp): Add "..".
660 (all_deps_files): New and use it.
661
662 2018-04-18 Alan Hayward <alan.hayward@arm.com>
663
664 * configure.srv (aarch64*-*-linux*): Don't include xml.
665 (i[34567]86-*-cygwin*): Likewise.
666 (i[34567]86-*-linux*): Likewise.
667 (i[34567]86-*-lynxos*): Likewise.
668 (i[34567]86-*-mingw32ce*): Likewise.
669 (i[34567]86-*-mingw*): Likewise.
670 (i[34567]86-*-nto*): Likewise.
671 (tic6x-*-uclinux): Likewise.
672 (x86_64-*-linux*): Likewise.
673 (x86_64-*-mingw*): Likewise.
674 (x86_64-*-cygwin*): Likewise.
675
676 2018-04-18 Alan Hayward <alan.hayward@arm.com>
677
678 * tdesc.c: Remove xml parameter.
679
680 2018-04-18 Alan Hayward <alan.hayward@arm.com>
681
682 * server.c (get_features_xml): Remove cast.
683 * tdesc.c (void target_desc::accept): Fill in function.
684 (tdesc_get_features_xml): Remove old xml creation.
685 (print_xml_feature::visit_pre): Add xml vistor.
686 * tdesc.h (struct target_desc): Make xmltarget mutable.
687 (tdesc_get_features_xml): Remove declaration.
688
689 2018-04-18 Alan Hayward <alan.hayward@arm.com>
690
691 * tdesc.c (tdesc_architecture_name): Add new function.
692 (tdesc_osabi_name): Likewise.
693 (tdesc_get_features_xml): Use new functions.
694
695 2018-04-18 Alan Hayward <alan.hayward@arm.com>
696
697 * tdesc.c (tdesc_create_flags): Remove.
698 (tdesc_add_flag): Likewise.
699 (tdesc_named_type): Likewise.
700 (tdesc_create_union): Likewise.
701 (tdesc_create_struct): Likewise.
702 (tdesc_create_vector): Likewise.
703 (tdesc_add_bitfield): Likewise.
704 (tdesc_add_field): Likewise.
705 (tdesc_set_struct_size): Likewise.
706
707 2018-04-18 Alan Hayward <alan.hayward@arm.com>
708
709 * tdesc.c (~target_desc): Remove implictly deleted items.
710 (init_target_desc): Iterate all features.
711 (tdesc_get_features_xml): Use vector.
712 (tdesc_create_feature): Create feature.
713 * tdesc.h (tdesc_feature) Remove
714 (target_desc): Add features.
715
716 2018-04-18 Alan Hayward <alan.hayward@arm.com>
717
718 * Makefile.in: Add common/tdesc.c
719 * tdesc.c (init_target_desc): init all reg_defs from register
720 vector.
721 (tdesc_create_reg): Create tdesc_reg.
722 * tdesc.h (tdesc_feature): Add register vector.
723
724 2018-03-30 Simon Marchi <simon.marchi@polymtl.ca>
725
726 * tdesc.h (struct target_desc) <features>: Change type to
727 std::vector<std::string>.
728 * tdesc.c (target_desc::~target_desc): Adjust to std::vector
729 changes.
730 (tdesc_get_features_xml): Likewise.
731 (tdesc_create_feature): Likewise.
732
733 2018-03-26 Alan Hayward <alan.hayward@arm.com>
734
735 * regcache.c (find_register_by_number): Return a ref.
736 (find_regno): Use references.
737 (register_size): Likewise.
738 (register_data): Likewise.
739 * tdesc.c (target_desc::~target_desc): Remove free calls.
740 (target_desc::operator==): Use std::vector compare.
741 (init_target_desc): Use reference.
742 (tdesc_create_reg): Use reg constructors.
743 * tdesc.h (struct target_desc): Replace pointer with object.
744
745 2018-03-23 Alan Hayward <alan.hayward@arm.com>
746
747 * regcache.c (find_register_by_number): Make static.
748 (find_regno): Use find_register_by_number
749 * regcache.h (struct reg): Remove declaration.
750
751 2018-03-23 Alan Hayward <alan.hayward@arm.com>
752
753 * tdesc.c (target_desc::~target_desc): Move to here.
754 (target_desc::operator==): Likewise.
755 * tdesc.h (target_desc::~target_desc): Move from here.
756 (target_desc::operator==): Likewise.
757
758 2018-03-22 Andreas Arnez <arnez@linux.vnet.ibm.com>
759
760 * linux-s390-low.c (s390_get_wordsize): Correct brace style.
761
762 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
763
764 * linux-s390-ipa.c (get_ipa_tdesc): Add handling for
765 S390_TDESC_GS.
766 * linux-s390-low.c (s390_get_ipa_tdesc_idx): Likewise.
767 (initialize_low_tracepoint): Call init_registers_s390x_gs_linux64
768 and init_registers_s390_gs_linux64.
769
770 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
771
772 * linux-s390-low.c (s390_fill_gs): Remove function.
773 (s390_fill_gsbc): Remove function.
774 (s390_regsets): Set fill functions for the guarded storage regsets
775 to NULL.
776
777 2018-03-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
778
779 * linux-s390-low.c (s390_get_hwcap): Replace tdesc parameter by
780 the word size. Add comment.
781 (s390_get_wordsize): New function.
782 (s390_arch_setup): No longer select a temporary tdesc to fetch the
783 pswm with it. Instead, use s390_get_wordsize to determine the
784 word size first and derive the correct tdesc from that directly.
785
786 2018-03-16 Simon Marchi <simon.marchi@polymtl.ca>
787
788 * Makefile.in: Include silent-rules.mk.
789 (srcdir, abs_top_srcdir, abs_srcdir, VPATH): Move up.
790 (COMPILE): Add ECHO_CXX.
791 (gdbserver$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
792 (gdbreplay$(EXEEXT)): Add SILENCE and ECHO_CXXLD.
793 ($(IPA_LIB)): Add SILENCE and ECHO_CXXLD.
794 (version-generated.c): Add ECHO_GEN.
795 (stamp-xml): Add SILENCE and ECHO_GEN_XML_BUILTIN_GENERATED.
796 (IPAGENT_COMPILE): Add ECHO_CXX.
797 (%-generated.c): Add ECHO_REGDAT.
798
799 2018-03-14 Tom Tromey <tom@tromey.com>
800
801 PR cli/14977:
802 * ax.c (ax_printf): Special case for NULL.
803
804 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
805
806 * linux-low.c (linux_qxfer_libraries_svr4): Use
807 xml_escape_text_append.
808
809 2018-03-08 Simon Marchi <simon.marchi@polymtl.ca>
810
811 * linux-low.c (linux_qxfer_libraries_svr4): Use std::string.
812
813 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
814
815 * server.c (handle_general_set): Remove unnecessary xstrdup.
816
817 2018-03-02 Simon Marchi <simon.marchi@polymtl.ca>
818
819 * server.c (parse_debug_format_options): Adjust to
820 delim_string_to_char_ptr_vec changes.
821 * thread-db.c (thread_db_load_search): Adjust to
822 dirnames_to_char_ptr_vec changes.
823
824 2018-03-01 Markus Metzger <markus.t.metzger@intel.com>
825
826 * target.h (target_enable_btrace, target_disable_btrace)
827 (target_read_btrace, target_read_btrace_conf): Turn macro into
828 inline function. Throw error if target method is not defined.
829 * server.c (handle_qxfer_btrace handle_qxfer_btrace_conf): Remove
830 check for btrace target method. Be prepared to handle exceptions
831 from btrace target methods.
832
833 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
834
835 * server.c (captured_main): Change order of error message printed
836 when the current working directory cannot be found.
837
838 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
839
840 * server.c: Include "filenames.h" and "pathstuff.h".
841 (program_name): Delete variable.
842 (program_path): New anonymous class.
843 (get_exec_wrapper): Use "program_path" instead of
844 "program_name".
845 (handle_v_run): Likewise.
846 (captured_main): Likewise.
847 (process_serial_event): Likewise.
848
849 2018-02-28 Sergio Durigan Junior <sergiodj@redhat.com>
850
851 * Makefile.in (SFILES): Add "$(srcdir)/common/pathstuff.c".
852 (OBJS): Add "pathstuff.o".
853 * server.c (current_directory): New global variable.
854 (captured_main): Initialize "current_directory".
855
856 2018-02-26 Alan Hayward <alan.hayward@arm.com>
857
858 * tdesc.c: Use common/tdesc.h.
859 * tdesc.h: Likewise.
860
861 2018-02-20 Alan Hayward <alan.hayward@arm.com>
862 Simon Marchi <simon.marchi@ericsson.com>
863
864 * Makefile.in: Switch order of make rules.
865
866 2018-02-19 Alan Hayward <alan.hayward@arm.com>
867
868 * Makefile.in: Add common directory in build.
869 * configure.ac: Add common reference.
870 * configure: Regenerate.
871
872 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
873
874 * linux-low.c (linux_target_ops): Remove linux_supports_btrace.
875 * nto-low.c (nto_target_ops): Remove NULL for supports_btrace.
876 * spu-low.c (spu_target_ops): Likewise.
877 * win32-low.c (win32_target_ops): Likewise.
878 * server.c (supported_btrace_packets): Report packets unconditionally.
879 * target.h (target_ops) <supports_btrace>: Remove.
880 (target_supports_btrace): Remove.
881
882 2018-02-09 Markus Metzger <markus.t.metzger@intel.com>
883
884 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt)
885 (handle_btrace_disable): Change return type to void. Use exceptions
886 to report errors.
887 (handle_btrace_general_set): Catch exception and copy message to
888 return message.
889
890 2018-02-08 Tom Tromey <tom@tromey.com>
891
892 * linux-low.c (install_software_single_step_breakpoints): Use
893 make_scoped_restore.
894 * inferiors.c (make_cleanup_restore_current_thread): Remove.
895 (do_restore_current_thread_cleanup): Remove.
896 * gdbthread.h (make_cleanup_restore_current_thread): Don't
897 declare.
898
899 2018-02-08 Tom Tromey <tom@tromey.com>
900
901 * mem-break.c (set_raw_breakpoint_at): Use
902 gdb::unique_xmalloc_ptr.
903
904 2018-01-30 Pedro Alves <palves@redhat.com>
905
906 PR gdb/13211
907 * target.c (target_terminal::terminal_state): Rename to ...
908 (target_terminal::m_terminal_state): ... this.
909
910 2018-01-19 James Clarke <jrtc27@jrtc27.com>
911
912 * linux-low.c (handle_extended_wait): Surround call to
913 thread_db_notice_clone with #ifdef USE_THREAD_DB.
914
915 2018-01-17 Simon Marchi <simon.marchi@ericsson.com>
916
917 * linux-low.c (attach_proc_task_lwp_callback): Adjust to
918 linux_ptrace_attach_fail_reason_string now returning an
919 std::string.
920 (linux_attach): Likewise.
921 * thread-db.c (attach_thread): Likewise.
922
923 2018-01-17 Eldar Abusalimov <eldar.abusalimov@jetbrains.com>
924
925 PR gdb/21559
926 * configure.ac: Include <sys/types.h> prior to <sys/user.h> when
927 checking for fs_base/gs_base fields in struct user_regs_struct.
928 * configure: Regenerate.
929
930 2018-01-16 Yao Qi <yao.qi@linaro.org>
931
932 PR gdb/18749
933 * linux-low.c (fetch_register): Call supply_register instead of
934 error.
935
936 2018-01-08 Yao Qi <yao.qi@linaro.org>
937 Simon Marchi <simon.marchi@ericsson.com>
938
939 * Makefile.in (OBS): Remove selftest.o.
940 * configure.ac: Set srv_selftest_objs if $development is true.
941 (GDBSERVER_DEPFILES): Append $srv_selftest_objs.
942 * configure: Re-generated.
943 * server.c (captured_main): Wrap variable selftest_filter with
944 GDB_SELF_TEST.
945
946 2018-01-07 Simon Marchi <simon.marchi@polymtl.ca>
947
948 * server.c (parse_debug_format_options): Return std::string.
949 (handle_monitor_command, captured_main): Adjust.
950
951 2018-01-05 Pedro Alves <palves@redhat.com>
952
953 PR gdb/18653
954 * server.c (captured_main): Pass quiet=false to
955 save_original_signals_state.
956
957 2018-01-01 Joel Brobecker <brobecker@adacore.com>
958
959 * gdbreplay.c (gdbreplay_version): Update copyright year in
960 version message.
961 * server.c (gdbserver_version): Likewise.
962
963 2017-12-08 Tom Tromey <tom@tromey.com>
964
965 * ax.c (ax_printf): Update.
966
967 2017-12-07 Yao Qi <yao.qi@linaro.org>
968
969 * linux-aarch64-ipa.c (initialize_low_tracepoint): Call
970 aarch64_linux_read_description.
971 * linux-amd64-ipa.c (idx2mask): New array.
972 (get_ipa_tdesc): Move idx2mask out.
973 (initialize_low_tracepoint): Initialize target descriptions.
974 * linux-i386-ipa.c (idx2mask): New array.
975 (get_ipa_tdesc): Move idx2mask out.
976 (initialize_low_tracepoint): Initialize target descriptions.
977
978 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
979
980 * tdesc.c (struct tdesc_type): Change return type.
981 (tdesc_add_flag): Change parameter type.
982 (tdesc_add_bitfield): Likewise.
983 (tdesc_add_field): Likewise.
984 (tdesc_set_struct_size): Likewise.
985
986 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
987
988 * regcache.c (registers_to_string): Remove unused variable.
989
990 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
991
992 * inferiors.c (for_each_inferior_with_data): Remove.
993 * inferiors.h (for_each_inferior_with_data): Remove.
994 * server.c (handle_qxfer_threads_worker): Change parameter type.
995 (handle_qxfer_threads_proper): Use for_each_thread.
996
997 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
998
999 * inferiors.c (for_each_inferior): Remove.
1000 (clear_inferiors): Use for_each_thread.
1001 * inferiors.h (for_each_inferior): Remove.
1002 * linux-low.c (linux_wait_for_event_filtered): Use
1003 for_each_thread.
1004 (linux_stabilize_threads): Likewise.
1005 * regcache.c (regcache_release): Likewise.
1006 * server.c (gdb_wants_all_threads_stopped): Likewise.
1007 (clear_pending_status_callback): Remove.
1008 (handle_status): Use for_each_thread.
1009 (captured_main): Likewise.
1010 * win32-low.c (child_init_thread_list): Likewise.
1011 (win32_clear_inferiors): Likewise.
1012 (fake_breakpoint_event): Likewise.
1013
1014 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1015
1016 * inferiors.h (find_inferior): Remove.
1017 * inferiors.c (find_inferior): Remove.
1018
1019 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1020
1021 * linux-low.c (resume_status_pending_p): Update comment.
1022 (need_step_over_p): Update comment.
1023
1024 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1025
1026 * linux-low.c (proceed_one_lwp): Return void, change parameter
1027 type.
1028 (unsuspend_and_proceed_one_lwp): Likewise.
1029 (proceed_all_lwps): Use for_each_thread.
1030 (unstop_all_lwps): Likewise.
1031
1032 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1033
1034 * linux-low.c (linux_resume_one_thread): Return void, take
1035 parameter directly.
1036 (linux_resume): Use for_each_thread.
1037
1038 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1039
1040 * linux-low.c (send_sigstop_callback): Return void, change
1041 parameter type. Rename to...
1042 (send_sigstop): ... this.
1043 (suspend_and_send_sigstop_callback): Return void, change parameter
1044 type. Rename to...
1045 (suspend_and_send_sigstop): ... this.
1046 (stop_all_lwps): Use for_each_thread.
1047
1048 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1049
1050 * linux-low.c (lwp_running): Return bool, remove unused
1051 argument.
1052 (linux_stabilize_threads): Use find_thread.
1053
1054 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1055
1056 * linux-low.c (select_singlestep_lwp_callback): Remove.
1057 (count_events_callback): Remove.
1058 (select_event_lwp_callback): Remove.
1059 (select_event_lwp): Use find_thread/for_each_thread.
1060
1061 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1062
1063 * linux-low.c (not_stopped_callback): Return bool, take filter
1064 argument directly.
1065 (linux_wait_for_event_filtered): Use find_thread.
1066 (linux_wait_1): Likewise.
1067
1068 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1069
1070 * linux-low.c (same_lwp): Remove.
1071 (find_lwp_pid): Use find_thread.
1072
1073 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1074
1075 * linux-low.c (delete_lwp_callback): Remove.
1076 (linux_mourn): Use for_each_thread.
1077
1078 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1079
1080 * linux-low.c (linux_detach_lwp_callback): Return void, remove
1081 args parameter, don't check for pid.
1082 (linux_detach): Use for_each_thread.
1083
1084 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1085
1086 * linux-low.c (struct counter): Remove.
1087 (second_thread_of_pid_p): Remove.
1088 (last_thread_of_process_p): Use find_thread.
1089
1090 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1091
1092 * inferiors.c (find_inferior_in_random): Remove.
1093 * inferiors.h (find_inferior_in_random): Remove.
1094 * linux-low.c (status_pending_p_callback): Return bool, accept
1095 parameter ptid directly.
1096 (linux_wait_for_event_filtered): Use find_thread_in_random.
1097 (linux_wait_1): Likewise.
1098
1099 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1100
1101 * inferiors.c (find_inferior_id): Remove.
1102 (find_thread_ptid): Move implemention from find_inferior_id to
1103 here.
1104 * inferiors.h (find_inferior_id): Remove.
1105 * server.c (handle_status): Use find_thread_ptid.
1106 (process_serial_event): Likewise.
1107 * thread-db.c (find_one_thread): Likewise.
1108 (thread_db_thread_handle): Likewise.
1109 * win32-low.c (thread_rec): Likewise.
1110 (child_delete_thread): Likewise.
1111 (win32_thread_alive): Likewise.
1112 (get_child_debug_event): Likewise.
1113
1114 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1115
1116 * linux-mips-low.c (update_watch_registers_callback): Return
1117 void, remove pid_p parameter, don't check for pid.
1118 (mips_insert_point, mips_remove_point): Use for_each_thread.
1119
1120 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1121
1122 * lynx.low (lynx_delete_thread_callback): Remove.
1123 (lynx_mourn): Use for_each_thread.
1124
1125 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
1126
1127 * regcache.c (regcache_invalidate_one): Remove.
1128 (regcache_invalidate_pid): use for_each_thread.
1129
1130 2017-11-26 Tom Tromey <tom@tromey.com>
1131
1132 * linux-low.c (linux_create_inferior): Update.
1133
1134 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1135
1136 * spu-low.c (spu_create_inferior): Fix typo in argument name.
1137
1138 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1139
1140 * configure.srv: Add linux-aarch64-tdesc-selftest.o.
1141 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1142 * linux-aarch64-tdesc-selftest.c: New file.
1143 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1144
1145 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1146
1147 * configure.srv: Add new file.
1148 * linux-aarch64-low.c (initialize_low_arch): Call init func.
1149 * linux-aarch64-tdesc-selftest.c: New file.
1150 * linux-aarch64-tdesc.h (initialize_low_tdesc): New declaration.
1151
1152 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1153
1154 * linux-aarch64-ipa.c (initialize_low_tracepoint): Remove init.
1155 * linux-aarch64-low.c (initialize_low_arch): Remove init.
1156 * linux-aarch64-tdesc.c (aarch64_linux_read_description): Add init.
1157
1158 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1159
1160 * configure.srv: Add new files.
1161 * linux-aarch64-ipa.c (get_ipa_tdesc): Call
1162 aarch64_linux_read_description.
1163 * linux-aarch64-low.c (aarch64_linux_read_description):
1164 Merge with aarch64_arch_setup.
1165 (aarch64_arch_setup): Call aarch64_linux_read_description.
1166 * linux-aarch64-tdesc.c: New file.
1167 * linux-aarch64-tdesc.h: New file.
1168
1169 2017-11-24 Yao Qi <yao.qi@linaro.org>
1170
1171 * configure.srv: Set $srv_regobj for tic6x-linux.
1172 * linux-tic6x-low.c: Include "arch/tic6x.h" and "tdesc.h".
1173 (tic6x_read_description): Move some code to tic6x_arch_setup.
1174 (tic6x_tdesc_test): New function.
1175 (initialize_low_arch): Call selftests::register_test.
1176
1177 2017-11-22 Yao Qi <yao.qi@linaro.org>
1178
1179 * remote-utils.c (prepare_resume_reply): Use memcpy.
1180
1181 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1182
1183 * linux-low.c (kill_one_lwp_callback): Return void, take
1184 argument directly, don't filter on pid.
1185 (linux_kill): Use for_each_thread.
1186
1187 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1188
1189 * linux-low.c (need_step_over_p): Return bool, remove dummy
1190 argument.
1191 (linux_resume, proceed_all_lwps): Use find_thread.
1192
1193 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1194
1195 * linux-low.c (resume_status_pending_p): Return bool, remove
1196 flag_p argument.
1197 (linux_resume): Use find_thread.
1198
1199 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1200
1201 * linux-low.c (struct thread_resume_array): Remove.
1202 (linux_set_resume_request): Return void, take arguments
1203 directly.
1204 (linux_resume): Use for_each_thread.
1205
1206 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1207
1208 * linux-low.c (stuck_in_jump_pad_callback): Change prototype,
1209 return bool, remove data argument.
1210 (linux_stabilize_threads): Use find_thread.
1211
1212 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1213
1214 * linux-low.c (unsuspend_one_lwp): Remove.
1215 (unsuspend_all_lwps): Use for_each_thread, inline code from
1216 unsuspend_one_lwp.
1217
1218 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1219
1220 * gdbthread.h (find_thread): Add overload with ptid_t filter.
1221 * linux-low.c (struct iterate_over_lwps_args): Remove.
1222 (iterate_over_lwps_filter): Remove.
1223 (iterate_over_lwps): Use find_thread.
1224
1225 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1226
1227 * linux-low.c (reset_lwp_ptrace_options_callback): Remove.
1228 (linux_handle_new_gdb_connection): Use for_each_thread, inline
1229 code from reset_lwp_ptrace_options_callback.
1230
1231 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1232
1233 * linux-arm-low.c (struct update_registers_data): Remove.
1234 (update_registers_callback): Return void, take arguments
1235 directly, don't check thread's pid.
1236 (arm_insert_point, arm_remove_point): Use for_each_thread.
1237
1238 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1239
1240 * win32-low.c (continue_one_thread): Return void, take argument
1241 directly.
1242 (child_continue): Use for_each_thread.
1243
1244 2017-11-19 Simon Marchi <simon.marchi@ericsson.com>
1245
1246 * win32-i386-low.c (update_debug_registers_callback): Rename
1247 to ...
1248 (update_debug_registers): ... this, return void, remove pid_p arg.
1249 (x86_dr_low_set_addr, x86_dr_low_set_control): Use for_each_thread.
1250
1251 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
1252
1253 * inferiors.h (struct process_info): Add constructor, initialize
1254 fields..
1255 <syscalls_to_catch>: Change type to std::vector<int>.
1256 * inferiors.c (add_process): Allocate process_info with new.
1257 (remove_process): Free process_info with delete.
1258 * linux-low.c (handle_extended_wait): Adjust.
1259 (gdb_catching_syscalls_p, gdb_catch_this_syscall_p): Adjust.
1260 * server.c (handle_general_set): Adjust.
1261
1262 2017-11-16 Pedro Alves <palves@redhat.com>
1263
1264 * remote-utils.c (remote_close): Block SIGIO signals instead of
1265 uninstalling the SIGIO handler.
1266
1267 2017-11-16 Alan Hayward <alan.hayward@arm.com>
1268
1269 * tdesc.c (tdesc_get_features_xml): Allow null osabi.
1270
1271 2017-11-16 Yao Qi <yao.qi@linaro.org>
1272
1273 * linux-tic6x-low.c (tic6x_fill_gregset): Cast buf.
1274 (tic6x_store_gregset): Likewise.
1275 (tic6x_usrregs_info): Move it up.
1276
1277 2017-11-15 Alan Hayward <alan.hayward@arm.com>
1278
1279 * Makefile.in: Update arch rules.
1280 * configure.srv: Explicitly mark arch/ files.
1281
1282 2017-11-13 Andreas Schwab <schwab@suse.de>
1283
1284 * linux-m68k-low.c (m68k_supports_hardware_single_step): New
1285 function.
1286 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1287
1288 2017-11-06 Pedro Alves <palves@redhat.com>
1289
1290 * config.in, configure: Regenerate.
1291
1292 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1293
1294 * target.c (struct thread_search): Remove.
1295 (thread_search_callback): Remove.
1296 (prepare_to_access_memory): Use for_each_thread instead of
1297 find_inferior. Inline code from thread_search_callback.
1298
1299 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1300
1301 * server.c (struct visit_actioned_threads_data): Remove.
1302 (visit_actioned_threads): Change prototype to take arguments
1303 directly.
1304 (resume): Use find_thread instead of find_inferior.
1305
1306 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
1307
1308 * server.c (queue_stop_reply_callback): Change prototype, return
1309 void.
1310 (find_status_pending_thread_callback): Remove.
1311 (handle_status): Replace find_inferior with find_thread and
1312 for_each_thread.
1313
1314 2017-10-25 Alan Hayward <alan.hayward@arm.com>
1315
1316 * linux-aarch64-low.c (aarch64_fill_gregset): Replace defines
1317 with REGNO.
1318 (aarch64_store_gregset): Likewise.
1319 (aarch64_fill_fpregset): Likewise.
1320 (aarch64_store_fpregset): Likewise.
1321
1322 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
1323
1324 * gdbthread.h (find_thread, for_each_thread): New functions.
1325 * inferiors.c (thread_of_pid): Remove.
1326 (find_any_thread_of_pid): Use find_thread.
1327 * linux-low.c (num_lwps): Use for_each_thread.
1328
1329 2017-10-17 Yao Qi <yao.qi@linaro.org>
1330
1331 * Makefile.in: Remove one rule.
1332 * configure.srv: Rename aarch64-insn.o with arch/aarch64-insn.o.
1333
1334 2017-10-17 Yao Qi <yao.qi@linaro.org>
1335
1336 * configure.srv: Rename arm-linux.o with arch/arm-linux.o.
1337 Rename arm-get-next-pcs.o with arch/arm-get-next-pcs.o.
1338
1339 2017-10-17 Yao Qi <yao.qi@linaro.org>
1340
1341 * configure.srv: Rename arm.o with arch/arm.o.
1342
1343 2017-10-17 Yao Qi <yao.qi@linaro.org>
1344
1345 * Makefile.in (CONFIG_SRC_SUBDIR): New variable.
1346 (clean): Remove .o files in CONFIG_SRC_SUBDIR.
1347 (distclean): Remove DEPDIR in CONFIG_SRC_SUBDIR.
1348 (arch-i386.o, arch-amd64.o): Remove rules.
1349 (arch/%.o): New rule.
1350 Update POSTCOMPILE and COMPILE.pre.
1351 * configure.ac: Invoke AC_CONFIG_COMMANDS.
1352 * configure: Re-generated.
1353 * configure.srv: Replace arch-i386.o with arch/i386.o.
1354 Replace arch-amd64.o with arch/amd64.o.
1355
1356 2017-10-16 Yao Qi <yao.qi@linaro.org>
1357
1358 * configure: Regenerated.
1359
1360 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1361
1362 * inferiors.h: (struct inferior_list): Remove.
1363 (struct inferior_list_entry); Remove.
1364 (add_inferior_to_list, clear_inferior_list, one_inferior_p,
1365 A_I_NEXT, ALL_INFERIORS_TYPE, ALL_INFERIORS, remove_inferior,
1366 get_first_inferior): Remove.
1367 (for_each_inferior, for_each_inferior_with_data, find_inferior,
1368 find_inferior_id, find_inferior_in_random): Change signature.
1369 * inferiors.c (all_threads): Change type to
1370 std::list<thread_info *>.
1371 (get_thread): Remove macro.
1372 (find_inferior, find_inferior_id): Change signature, implement
1373 using find_thread.
1374 (find_inferior_in_random): Change signature, implement using
1375 find_thread_in_random.
1376 (for_each_inferior, for_each_inferior_with_data): Change
1377 signature, implement using for_each_thread.
1378 (add_inferior_to_list, remove_inferior): Remove.
1379 (add_thread, get_first_thread, thread_of_pid,
1380 find_any_thread_of_pid, free_one_thread, remove_thread): Update.
1381 (get_first_inferior, one_inferior_p, clear_inferior_list):
1382 Remove.
1383 (clear_inferiors, get_thread_process): Update.
1384 * gdbthread.h: Include <list>.
1385 (struct thread_info) <entry>: Remove field.
1386 <id>: New field.
1387 (all_threads): Change type to std::list<thread_info *>.
1388 (get_first_inferior): Add doc.
1389 (find_thread, for_each_thread, find_thread_in_random): New
1390 functions.
1391 (current_ptid, pid_of, ptid_of, lwpid_of): Update.
1392 * linux-arm-low.c (update_registers_callback): Update.
1393 * linux-low.c (second_thread_of_pid_p): Update.
1394 (kill_one_lwp_callback, linux_detach_lwp_callback,
1395 delete_lwp_callback, status_pending_p_callback, same_lwp,
1396 find_lwp_pid, num_lwps, iterate_over_lwps_filter,
1397 iterate_over_lwps, not_stopped_callback,
1398 resume_stopped_resumed_lwps, count_events_callback,
1399 select_singlestep_lwp_callback, select_event_lwp_callback,
1400 unsuspend_one_lwp, linux_wait_1, send_sigstop_callback,
1401 suspend_and_send_sigstop_callback, wait_for_sigstop,
1402 stuck_in_jump_pad_callback, move_out_of_jump_pad_callback,
1403 lwp_running, linux_set_resume_request, resume_status_pending_p,
1404 need_step_over_p, start_step_over, linux_resume_one_thread,
1405 proceed_one_lwp, unsuspend_and_proceed_one_lwp,
1406 reset_lwp_ptrace_options_callback): Update.
1407 * linux-mips-low.c (update_watch_registers_callback): Update.
1408 * regcache.c (regcache_invalidate_one, regcache_invalidate):
1409 Update.
1410 (free_register_cache_thread_one): Remove.
1411 (regcache_release): Update.
1412 * server.c (handle_btrace_enable_bts, handle_btrace_enable_pt,
1413 handle_qxfer_threads_worker): Update.
1414 (handle_query): Update, use list iterator.
1415 (visit_actioned_threads, handle_pending_status,
1416 queue_stop_reply_callback, gdb_wants_all_threads_stopped,
1417 clear_pending_status_callback, set_pending_status_callback,
1418 find_status_pending_thread_callback, handle_status,
1419 process_serial_event): Update.
1420 * target.c (thread_search_callback): Update.
1421 * thread-db.c (thread_db_get_tls_address): Update.
1422 * tracepoint.c (tracepoint_finished_step, tracepoint_was_hit):
1423 Update.
1424 * win32-i386-low.c (update_debug_registers_callback): Update.
1425 * win32-low.c (delete_thread_info, child_delete_thread,
1426 continue_one_thread, suspend_one_thread,
1427 get_child_debug_event): Adjust.
1428
1429 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1430
1431 * gdbthread.h (ptid_of, pid_of, lwpid_of): New functions.
1432 * inferiors.h: Include <list>.
1433 (struct process_info) <entry>: Remove field.
1434 <pid>: New field.
1435 (pid_of): Change macro to function.
1436 (ptid_of, lwpid_of): Remove macro.
1437 (all_processes): Change type to std::list<process_info *>.
1438 (ALL_PROCESSES): Remove macro.
1439 (for_each_process, find_process): New function.
1440 * inferiors.c (all_processes): Change type to
1441 std::list<process_info *>.
1442 (find_thread_process): Adjust.
1443 (add_process): Likewise.
1444 (remove_process): Likewise.
1445 (find_process_pid): Likewise.
1446 (get_first_process): Likewise.
1447 (started_inferior_callback): Remove.
1448 (have_started_inferiors_p): Adjust.
1449 (attached_inferior_callback): Remove.
1450 (have_attached_inferiors_p): Adjust.
1451 * linux-low.c (check_zombie_leaders): Likewise.
1452 * linux-x86-low.c (x86_arch_setup_process_callback): Remove.
1453 (x86_linux_update_xmltarget): Adjust.
1454 * server.c (handle_query): Likewise.
1455 (gdb_reattached_process): Remove.
1456 (handle_status): Adjust.
1457 (kill_inferior_callback): Likewise.
1458 (detach_or_kill_inferior): Remove.
1459 (print_started_pid): Likewise.
1460 (print_attached_pid): Likewise.
1461 (detach_or_kill_for_exit): Update.
1462 (process_serial_event): Likewise.
1463 * linux-arm-low.c (arm_new_fork): Likewise.
1464
1465 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
1466
1467 * dll.h: Include <list>.
1468 (struct dll_info): Add constructor.
1469 <entry>: Remove field.
1470 (all_dlls): Change type to std::list<dll_info>.
1471 * dll.c: Include <algorithm>.
1472 (get_dll): Remove macro.
1473 (all_dlls): Change type to std::list<dll_info *>.
1474 (free_one_dll): Remove.
1475 (match_dll): Likewise.
1476 (loaded_dll): Adjust.
1477 (unloaded_dll): Adjust to all_dlls type change, use
1478 std::find_if. Inline code from match_dll.
1479 (clear_dlls): Adjust to all_dlls type change.
1480 * server.c (emit_dll_description): Remove.
1481 (handle_qxfer_libraries): Adjust to all_dlls type change,
1482 integrate emit_dll_description's functionality.
1483
1484 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1485
1486 * linux-low.h (struct linux_target_ops) <delete_process>: New
1487 field.
1488 * linux-low.c (linux_mourn): Call the_low_target.delete_process.
1489 * linux-aarch64-low.c (aarch64_linux_delete_process): New.
1490 (struct linux_target_ops): Add delete_process callback.
1491 * linux-arm-low.c (arm_delete_process): New.
1492 (struct linux_target_ops): Add delete_process callback.
1493 * linux-bfin-low.c (struct linux_target_ops): Likewise.
1494 * linux-crisv32-low.c (struct linux_target_ops): Likewise.
1495 * linux-m32r-low.c (struct linux_target_ops): Likewise.
1496 * linux-mips-low.c (mips_linux_delete_process): New.
1497 (struct linux_target_ops): Add delete_process callback.
1498 * linux-ppc-low.c (struct linux_target_ops): Likewise.
1499 * linux-s390-low.c (struct linux_target_ops): Likewise.
1500 * linux-sh-low.c (struct linux_target_ops): Likewise.
1501 * linux-tic6x-low.c (struct linux_target_ops): Likewise.
1502 * linux-tile-low.c (struct linux_target_ops): Likewise.
1503 * linux-x86-low.c (x86_linux_delete_process): New.
1504 (struct linux_target_ops): Add delete_process callback.
1505 * linux-xtensa-low.c (struct linux_target_ops): Likewise.
1506
1507 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
1508
1509 * linux-aarch64-low.c (the_low_target): Add thread delete
1510 callback.
1511 * linux-arm-low.c (arm_delete_thread): New function.
1512 (the_low_target): Add thread delete callback.
1513 * linux-bfin-low.c (the_low_target): Likewise.
1514 * linux-crisv32-low.c (the_low_target): Likewise.
1515 * linux-low.c (delete_lwp): Invoke delete_thread callback if
1516 set.
1517 * linux-low.h (struct linux_target_ops) <delete_thread>: New
1518 field.
1519 * linux-m32r-low.c (the_low_target): Add thread delete callback.
1520 * linux-mips-low.c (mips_linux_delete_thread): New function.
1521 (the_low_target): Add thread delete callback.
1522 * linux-ppc-low.c (the_low_target): Likewise.
1523 * linux-s390-low.c (the_low_target): Likewise.
1524 * linux-sh-low.c (the_low_target): Likewise.
1525 * linux-tic6x-low.c (the_low_target): Likewise.
1526 * linux-tile-low.c (the_low_target): Likewise.
1527 * linux-x86-low.c (the_low_target): Likewise.
1528 * linux-xtensa-low.c (the_low_target): Likewise.
1529
1530 2017-10-06 Yuanhui Zhang <asmwarrior@gmail.com>
1531
1532 * win32-low.c: Include "common-inferior.h".
1533
1534 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1535
1536 * inferiors.c (set_inferior_cwd): New function.
1537 * server.c (handle_general_set): Handle QSetWorkingDir packet.
1538 (handle_query): Inform that QSetWorkingDir is supported.
1539 * win32-low.c (create_process): Pass the inferior's cwd to
1540 CreateProcess.
1541
1542 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1543
1544 * inferiors.c (current_inferior_cwd): New global variable.
1545 (get_inferior_cwd): New function.
1546 * inferiors.h (struct process_info) <cwd>: New field.
1547
1548 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
1549
1550 * Makefile.in (SFILES): Add $(srcdir)/common/gdb_tilde_expand.c.
1551 (OBS): Add gdb_tilde_expand.o.
1552
1553 2017-10-02 Simon Marchi <simon.marchi@ericsson.com>
1554
1555 * lynx-i386-low.c (lynx_i386_arch_setup): Call init_target_desc.
1556 * nto-x86-low.c (nto_x86_arch_setup): Likewise.
1557
1558 2017-09-29 Pedro Alves <palves@redhat.com>
1559
1560 * ax.c (gdb_parse_agent_expr): Constify.
1561 * ax.h (gdb_parse_agent_expr): Constify.
1562 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
1563 Constify.
1564 * mem-break.h (add_breakpoint_condition, add_breakpoint_commands): Constify.
1565 * remote-utils.c (hex_or_minus_one, read_ptid): Constify.
1566 * remote-utils.h (read_ptid): Constify.
1567 * server.c (handle_qxfer_exec_file, handle_query, handle_v_cont)
1568 (process_point_options, process_serial_event): Constify.
1569 * tracepoint.c (add_tracepoint_action, cmd_qtdp, cmd_qtdpsrc)
1570 (cmd_qtdv, cmd_qtenable_disable, cmd_qtro, cmd_qtframe, cmd_qtp)
1571 (cmd_qtbuffer): Constify.
1572
1573 2017-09-29 Pedro Alves <palves@redhat.com>
1574
1575 * proc-service.c (ps_pdread): Return PS_ERR if reading memory
1576 fails.
1577
1578 2017-09-29 Pedro Alves <palves@redhat.com>
1579
1580 * linux-low.c (handle_extended_wait): Pass parent thread instead
1581 of process to thread_db_notice_clone.
1582 * linux-low.h (thread_db_notice_clone): Replace parent process
1583 parameter with parent thread parameter.
1584 * thread-db.c (find_one_thread): Add comment.
1585 (thread_db_notice_clone): Replace parent process parameter with
1586 parent thread parameter. Temporarily switch to the parent thread.
1587
1588 2017-09-26 Sergio Durigan Junior <sergiodj@redhat.com>
1589
1590 * gdbthread.h: Include "common-gdbthread.h".
1591 * inferiors.c (switch_to_thread): Use "gdb_assert" instead of
1592 "if" when validating the ptid.
1593 * remote-utils.c: Include "gdbthread.h".
1594 (prepare_resume_reply): Use "switch_to_thread".
1595 * target.c (done_accessing_memory): Likewise.
1596
1597 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
1598
1599 * configure.srv (s390*-*-linux*): Add s390-gs-linux64.o and
1600 s390x-gs-linux64.o to srv_regobj. Add s390-gs-linux64.xml,
1601 s390x-gs-linux64.xml, s390-gs.xml, and s390-gsbc.xml to
1602 srv_xmlfiles. Add s390-gs-linux64-ipa.o and
1603 s390x-gs-linux64-ipa.o to ipa_obj.
1604 * linux-s390-low.c (HWCAP_S390_GS): New define.
1605 (s390_fill_gs, s390_store_gs, s390_fill_gsbc, s390_store_gsbc):
1606 New functions.
1607 (s390_regsets): Add regsets for NT_S390_GS_CB and NT_S390_GS_BC.
1608 (s390_arch_setup): Check for guarded-storage support and choose
1609 appropriate tdesc.
1610 (initialize_low_arch): Invoke init_registers_s390_gs_linux64 and
1611 init_registers_s390x_gs_linux64.
1612 * linux-s390-tdesc.h (enum s390_linux_tdesc) <S390_TDESC_GS>: New
1613 enum value.
1614 (init_registers_s390x_gs_linux64, tdesc_s390x_gs_linux64)
1615 (init_registers_s390_gs_linux64, tdesc_s390_gs_linux64): Declare.
1616
1617 2017-09-22 Simon Marchi <simon.marchi@ericsson.com>
1618
1619 * win32-i386-low.c (i386_arch_setup): Call init_target_desc.
1620
1621 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1622
1623 * linux-low.h (struct lwp_info): Add new field, thread_handle.
1624 (thread_db_thread_handle): Declare.
1625 * linux-low.c (linux_target_ops): Initialize thread_handle.
1626 * server.c (handle_qxfer_threads_worker): Add support for
1627 "handle" attribute.
1628 * target.h (struct target_ops): Add new function pointer,
1629 thread_handle.
1630 (target_thread_handle): Define.
1631 * thread-db.c (find_one_thread, attach_thread): Set thread_handle
1632 field in lwp.
1633 (thread_db_thread_handle): New function.
1634
1635 2017-09-21 Kevin Buettner <kevinb@redhat.com>
1636
1637 * linux-low.c (handle_extended_wait): Call thread_db_notice_clone().
1638 * linux-low.h (thread_db_notice_clone): Declare.
1639 * thread-db.c (thread_db_notice_clone): New function.
1640
1641 2017-09-21 Pedro Alves <palves@redhat.com>
1642
1643 * server.c (gdb_read_memory, handle_status, process_serial_event)
1644 (handle_serial_event, handle_target_event): Adjust to
1645 set_desired_thread prototype change.
1646 * target.c (set_desired_thread): Remove 'use_general' parameter
1647 and adjust.
1648 * target.h (set_desired_thread): Remove 'use_general' parameter.
1649
1650 2017-09-20 Tom Tromey <tom@tromey.com>
1651
1652 * target.c (target_terminal::terminal_state): Define.
1653 (target_terminal::init): Rename from target_terminal_init.
1654 (target_terminal::inferior): Rename from
1655 target_terminal_inferior.
1656 (target_terminal::ours): Rename from target_terminal_ours.
1657 (target_terminal::ours_for_output, target_terminal::info): New.
1658
1659 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1660
1661 * server.c (accumulate_file_name_length): Remove.
1662 (emit_dll_description): Adjust to std::string change.
1663 (handle_qxfer_libraries): Use std::string to hold document.
1664
1665 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1666
1667 * linux-low.c (linux_qxfer_libraries_svr4): Adjust to change of
1668 return type of xml_escape_text.
1669 * server.c (emit_dll_description): Likewise.
1670
1671 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
1672
1673 * server.c (captured_main): Accept argument for --selftest.
1674 Update run_tests call.
1675 * linux-x86-tdesc-selftest.c (initialize_low_tdesc): Add names
1676 when registering selftests.
1677
1678 2017-09-16 Sergio Durigan Junior <sergiodj@redhat.com>
1679
1680 * regcache.c (get_thread_regcache): Update code to use "std::vector"
1681 instead of "VEC" for "target_desc.reg_defs".
1682 (regcache_cpy): Likewise.
1683 (registers_to_string): Likewise.
1684 (registers_from_string): Likewise.
1685 (find_regno): Likewise.
1686 (supply_regblock): Likewise.
1687 (regcache_raw_read_unsigned): Likewise.
1688 * tdesc.c (init_target_desc): Likewise.
1689 (tdesc_create_reg): Likewise.
1690 * tdesc.h: Remove declaration of "tdesc_reg_p". Include <vector>.
1691 (struct target_desc) <reg_defs>: Convert to "std::vector".
1692 (target_desc): Do not initialize "reg_defs".
1693 (~target_desc): Update code to use "std::vector" instead of "VEC"
1694 for "target_desc.reg_defs".
1695 (operator==): Likewise.
1696
1697 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1698
1699 * inferiors.h (thread_to_gdb_id): Remove.
1700 * inferiors.c (thread_to_gdb_id): Remove.
1701 * server.c (handle_qxfer_threads_worker, handle_query): Adjust.
1702 * lynx-low.c (lynx_resume, lynx_wait_1, lynx_fetch_registers,
1703 lynx_store_registers, lynx_read_memory, lynx_write_memory):
1704 Likewise.
1705 * nto-low.c (nto_fetch_registers, nto_store_registers,
1706 nto_stopped_by_watchpoint, nto_stopped_data_address): Likewise.
1707
1708 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1709
1710 * inferiors.h (gdb_id_to_thread_id): Remove.
1711 * inferiors.c (gdb_id_to_thread_id): Remove.
1712 * server.c (process_serial_event): Adjust to gdb_id_to_thread_id
1713 removal. Move pid declaration closer to where it's used.
1714
1715 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1716
1717 * server.c (handle_detach): New function.
1718 (process_serial_event): Move code out, call handle_detach.
1719
1720 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1721
1722 * server.c (require_running): Rename to ...
1723 (require_running_or_return): ... this ...
1724 (require_running_or_break): ... and this.
1725 (handle_query, process_serial_event): Adjust.
1726
1727 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1728
1729 * linux-low.c (linux_set_resume_request): Remove unused
1730 variables.
1731
1732 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
1733
1734 * server.c (first_thread_of): Remove.
1735 (process_serial_event): Replace usage of first_thread_of with
1736 find_any_thread_of_pid.
1737 * tracepoint.c (same_process_p): Remove.
1738 (gdb_agent_about_to_close): Replace usage of same_process_p with
1739 find_any_thread_of_pid.
1740 * linux-x86-low.c (same_process_callback): Remove.
1741 (x86_arch_setup_process_callback): Replace usage of
1742 same_process_callback with find_any_thread_of_pid.
1743 * thread-db.c (any_thread_of): Remove.
1744 (switch_to_process): Replace usage of any_thread_of with
1745 find_any_thread_of_pid.
1746 * inferiors.c (thread_pid_matches_callback): Remove.
1747 (find_thread_process): Adjust to use find_any_thread_of_pid.
1748
1749 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1750
1751 * regcache.c (get_thread_regcache): Guard calls to "memset"
1752 with "!VEC_empty".
1753
1754 2017-09-10 Sergio Durigan Junior <sergiodj@redhat.com>
1755
1756 * linux-low.c (handle_extended_wait): Use
1757 "allocate_target_description" instead of "XNEW".
1758 * linux-x86-low.c (initialize_low_arch): Likewise.
1759
1760 2017-09-05 Yao Qi <yao.qi@linaro.org>
1761
1762 * configure.srv (srv_i386_regobj): Remove.
1763 (srv_amd64_regobj): Remove.
1764 (srv_regobj): Set it to "" for x86 non-linux targets.
1765 * linux-x86-tdesc.c (i386_linux_read_description):
1766 * lynx-i386-low.c: Include x86-xstate.h and arch/i386.h.
1767 (init_registers_i386): Remove the declaration.
1768 (tdesc_i386): Remove the declaration.
1769 (lynx_i386_arch_setup): Call i386_create_target_description.
1770 * nto-x86-low.c: Likewise.
1771 * win32-i386-low.c [__x86_64__]: include arch/amd64.h.
1772 [!__x86_64__]: include arch/i386.h.
1773 (i386_arch_setup) [__x86_64__]: Call amd64_create_target_description.
1774
1775 2017-09-05 Yao Qi <yao.qi@linaro.org>
1776
1777 * configure.srv (srv_amd64_linux_xmlfiles): Remove
1778 i386/amd64-XXX-linux from it.
1779
1780 2017-09-05 Yao Qi <yao.qi@linaro.org>
1781
1782 * configure.srv: Empty srv_amd64_linux_regobj if $development is
1783 false.
1784 (ipa_amd64_linux_regobj): Remove.
1785 (ipa_x32_linux_regobj): Remove.
1786
1787 2017-09-05 Yao Qi <yao.qi@linaro.org>
1788
1789 * Makefile.in (arch-amd64.o): New rule.
1790 * configure.srv: Append arch-amd64.o.
1791 * linux-amd64-ipa.c: Include common/x86-xstate.h.
1792 (get_ipa_tdesc): Call amd64_linux_read_description.
1793 (initialize_low_tracepoint): Don't call init_registers_x32_XXX
1794 and init_registers_amd64_XXX.
1795 * linux-x86-low.c (x86_linux_read_description): Call
1796 amd64_linux_read_description.
1797 (x86_get_ipa_tdesc_idx): Call amd64_get_ipa_tdesc_idx.
1798 (initialize_low_arch): Don't call init_registers_x32_XXX and
1799 init_registers_amd64_XXX.
1800 * linux-x86-tdesc-selftest.c: Declare init_registers_amd64_XXX
1801 and tdesc_amd64_XXX.
1802 [__x86_64__] (amd64_tdesc_test): New function.
1803 (initialize_low_tdesc) [__x86_64__]: Call init_registers_x32_XXX
1804 and init_registers_amd64_XXX.
1805 * linux-x86-tdesc.c: Include arch/amd64.h.
1806 (xcr0_to_tdesc_idx): New function.
1807 (i386_linux_read_description): New function.
1808 (amd64_get_ipa_tdesc_idx): New function.
1809 * linux-x86-tdesc.h (amd64_get_ipa_tdesc_idx): Declare.
1810 (amd64_get_ipa_tdesc): Declare.
1811
1812 2017-09-05 Yao Qi <yao.qi@linaro.org>
1813
1814 * configure.srv (srv_i386_linux_xmlfiles): Remove
1815 i386/i386-XXX-linux.xml from it.
1816
1817 2017-09-05 Yao Qi <yao.qi@linaro.org>
1818
1819 * configure.srv: Set srv_i386_linux_regobj empty if $development
1820 is false.
1821 * linux-i386-ipa.c (initialize_low_tracepoint): Don't call
1822 initialize_low_tdesc.
1823 * linux-x86-low.c (initialize_low_arch): Wrap initialize_low_tdesc
1824 with #if initialize_low_tdesc.
1825 * linux-x86-tdesc-selftest.c: New file.
1826 * linux-x86-tdesc.c: Move code to linux-x86-tdesc-selftest.c.
1827
1828 2017-09-05 Yao Qi <yao.qi@linaro.org>
1829
1830 * Makefile.in (arch-i386.o): New rule.
1831 * configure.srv (i[34567]86-*-linux*): Add arch-i386.o.
1832 (x86_64-*-linux*): Likewise.
1833 * linux-x86-tdesc.c: Don't include ../features/i386/32bit-XXX.c,
1834 include arch/i386.h.
1835 (i386_linux_read_description): Remove code and call
1836 i386_create_target_description.
1837 * tdesc.c (allocate_target_description): New function.
1838 * tdesc.h (set_tdesc_architecture): Remove declaration.
1839 (set_tdesc_osabi): Likewise.
1840
1841 2017-09-05 Yao Qi <yao.qi@linaro.org>
1842
1843 * linux-x86-tdesc.c: Don't include <inttypes.h>.
1844 (i386_linux_read_description) [!IN_PROCESS_AGENT]: Call
1845 set_tdesc_architecture and set_tdesc_osabi. Remove code setting
1846 .xmltarget.
1847 * server.c (get_features_xml): Call tdesc_get_features_xml.
1848 * tdesc.c (set_tdesc_architecture): New function.
1849 (set_tdesc_osabi): New function.
1850 (tdesc_get_features_xml): New function.
1851 (tdesc_create_feature): Add an argument.
1852 * tdesc.h (struct target_desc) <features>: New field.
1853 <arch, osabi>: New field.
1854 (~target_desc): xfree features, arch, and osabi.
1855 (target_desc::oerator==): Don't compare .xmltarget.
1856 [!IN_PROCESS_AGENT] (set_tdesc_architecture): Declare.
1857 (set_tdesc_osabi): Likewise.
1858 (tdesc_get_features_xml): Likewise.
1859
1860 2017-09-05 Yao Qi <yao.qi@linaro.org>
1861
1862 * linux-x86-tdesc.c: Include selftest.h.
1863 (i386_tdesc_test): New function.
1864 (initialize_low_tdesc): Call selftests::register_test.
1865 * tdesc.h: Include regdef.h.
1866 (target_desc): Override operator == and !=.
1867
1868 2017-09-05 Yao Qi <yao.qi@linaro.org>
1869
1870 * configure.srv (srv_tgtobj): Append linux-x86-tdesc.o.
1871 (ipa_obj): Likewise.
1872 * linux-i386-ipa.c: Include common/x86-xstate.h
1873 (get_ipa_tdesc): Call i386_linux_read_description.
1874 (initialize_low_tracepoint): Don't call init_registers_XXX
1875 functions, call initialize_low_tdesc instead.
1876 * linux-x86-low.c (x86_linux_read_description): Call
1877 i386_linux_read_description.
1878 (initialize_low_arch): Don't call init_registers_i386_XXX
1879 functions, call initialize_low_tdesc.
1880 * linux-x86-tdesc.c: New file.
1881 * linux-x86-tdesc.h (x86_linux_tdesc): New X86_TDESC_LAST.
1882 (i386_get_ipa_tdesc_idx): Declare.
1883 (i386_get_ipa_tdesc): Declare.
1884 (initialize_low_tdesc): Declare.
1885
1886 2017-09-05 Yao Qi <yao.qi@linaro.org>
1887
1888 * linux-x86-low.c (x86_get_ipa_tdesc_idx): Use X86_TDESC_MMX
1889 instead of 0.
1890
1891 2017-09-05 Yao Qi <yao.qi@linaro.org>
1892
1893 * Makefile.in (IPA_OBJS): Add vec-ipa.o
1894 * regcache.c (get_thread_regcache): Use VEC_length.
1895 (init_register_cache): Likewise.
1896 (regcache_cpy): Likewise.
1897 (registers_to_string): Iterate reg_defs via VEC_iterate.
1898 (find_regno): Likewise.
1899 (find_register_by_number): Use VEC_index.
1900 (register_size): Call find_register_by_number.
1901 (register_data): Call find_register_by_number.
1902 (supply_regblock): Use VEC_length.
1903 (regcache_raw_read_unsigned): Likewise.
1904 * tdesc.c (init_target_desc): Iterate reg_defs via
1905 VEC_iterate.
1906 (default_description): Update initializer.
1907 (copy_target_description): Don't update field num_registers.
1908 * tdesc.h (struct target_desc) <reg_defs>: Change it to VEC.
1909 <num_registers>: Remove.
1910
1911 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
1912
1913 * Makefile.in (.SECONDARY): Define target.
1914
1915 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
1916
1917 * linux-low.c (linux_wait_1): Adjust.
1918 * server.c (queue_stop_reply_callback): Adjust.
1919
1920 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
1921
1922 * server.c (handle_general_set): Handle QEnvironmentHexEncoded,
1923 QEnvironmentUnset and QEnvironmentReset packets.
1924 (handle_query): Inform remote that QEnvironmentHexEncoded,
1925 QEnvironmentUnset and QEnvironmentReset are supported.
1926
1927 2017-08-25 Simon Marchi <simon.marchi@ericsson.com>
1928
1929 * inferiors.h (inferior_target_data): Rename to ...
1930 (thread_target_data): ... this.
1931 (inferior_regcache_data): Rename to ...
1932 (thread_regcache_data): ... this.
1933 (set_inferior_regcache_data): Rename to ...
1934 (set_thread_regcache_data): ... this.
1935 * inferiors.c (inferior_target_data): Rename to ...
1936 (thread_target_data): ... this.
1937 (inferior_regcache_data): Rename to ...
1938 (thread_regcache_data): ... this.
1939 (set_inferior_regcache_data): Rename to ...
1940 (set_thread_regcache_data): ... this.
1941 (free_one_thread): Update.
1942 * linux-low.h (get_thread_lwp): Update.
1943 * regcache.c (get_thread_regcache): Update.
1944 (regcache_invalidate_thread): Update.
1945 (free_register_cache_thread): Update.
1946 * win32-i386-low.c (update_debug_registers_callback): Update.
1947 (win32_get_current_dr): Update.
1948 * win32-low.c (thread_rec): Update.
1949 (delete_thread_info): Update.
1950 (continue_one_thread): Update.
1951 (suspend_one_thread): Update.
1952
1953 2017-08-24 Simon Marchi <simon.marchi@ericsson.com>
1954
1955 * inferiors.c (set_inferior_target_data): Remove.
1956 * inferiors.h (set_inferior_target_data): Remove.
1957
1958 2017-08-18 Yao Qi <yao.qi@linaro.org>
1959
1960 * Makefile.in (OBS): Add selftest.o.
1961 * configure.ac: AC_DEFINE GDB_SELF_TEST if $development.
1962 * configure, config.in: Re-generated.
1963 * server.c: Include common/sefltest.h.
1964 (captured_main): Handle option --selftest.
1965
1966 2017-08-09 Yao Qi <yao.qi@linaro.org>
1967
1968 * configure.srv (srv_i386_regobj): Remove i386-avx.o,
1969 i386-avx-avx512.o, i386-avx-mpx-avx512-pku.o, i386-mpx.o,
1970 i386-avx-mpx.o and i386-mmx.o.
1971 (srv_amd64_regobj): Remove amd64-avx.o, amd64-avx-avx512.o,
1972 amd64-avx-mpx-avx512-pku.o, amd64-mpx.o and amd64-avx-mpx.o.
1973 (srv_i386_xmlfiles): Remove i386/i386-avx.xml,
1974 i386/i386-avx-avx512.xml, i386/i386-avx-mpx-avx512-pku.xml,
1975 i386/i386-mpx.xml, i386/i386-avx-mpx.xml and i386/i386-mmx.xml.
1976 (srv_amd64_xmlfile):i386/amd64-avx.xml, i386/amd64-avx-avx512.xml,
1977 i386/amd64-avx-mpx-avx512-pku.xml, i386/amd64-mpx.xml,
1978 i386/amd64-avx-mpx.xml.
1979
1980 2017-08-09 Yao Qi <yao.qi@linaro.org>
1981
1982 * configure.srv (srv_amd64_regobj): Remove x32.o, x32-avx.o
1983 and x32-avx-avx512.o.
1984 (srv_amd64_xmlfiles): Remove i386/x32.xml, i386/x32-avx.xml
1985 i386/x32-avx-avx512.xml.
1986
1987 2017-07-26 Simon Marchi <simon.marchi@ericsson.com>
1988
1989 * tracepoint.h (enum class fast_tpoint_collect_result): New
1990 enumeration.
1991 (fast_tracepoint_collecting): Change return type to
1992 fast_tpoint_collect_result.
1993 * tracepoint.c (fast_tracepoint_collecting): Likewise.
1994 * linux-low.h: Include tracepoint.h.
1995 (struct lwp_info) <collecting_fast_tracepoint>: Change type to
1996 fast_tpoint_collect_result.
1997 * linux-low.c (handle_tracepoints): Adjust.
1998 (linux_fast_tracepoint_collecting): Change return type to
1999 fast_tpoint_collect_result.
2000 (maybe_move_out_of_jump_pad, linux_wait_for_event_filtered,
2001 linux_wait_1, stuck_in_jump_pad_callback,
2002 lwp_signal_can_be_delivered, linux_resume_one_lwp_throw,
2003 proceed_one_lwp): Adjust to type change.
2004
2005 2017-07-10 Yao Qi <yao.qi@linaro.org>
2006
2007 * linux-x86-low.c (x86_linux_read_description): Re-indent the code.
2008
2009 2017-06-29 Yao Qi <yao.qi@linaro.org>
2010
2011 * tdesc.h (struct target_desc) [IN_PROCESS_AGENT] <expedite_regs>:
2012 Remove.
2013 [IN_PROCESS_AGENT] <xmltarget>: Likewise.
2014
2015 2017-06-20 Simon Marchi <simon.marchi@ericsson.com>
2016
2017 * Makefile.in (IPA_OBJS): Sort and format one item per line.
2018
2019 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
2020
2021 * linux-low.c (linux_create_inferior): Adjust code to access the
2022 environment information via 'gdb_environ' class.
2023 * lynx-low.c (lynx_create_inferior): Likewise.
2024 * server.c (our_environ): Make it an instance of 'gdb_environ'.
2025 (get_environ): Return a pointer to 'our_environ'.
2026 (captured_main): Initialize 'our_environ'.
2027 * server.h (get_environ): Adjust prototype.
2028 * spu-low.c (spu_create_inferior): Adjust code to access the
2029 environment information via 'gdb_environ' class.
2030
2031 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2032
2033 * linux-low.c (linux_read_memory, linux_write_memory): Remove
2034 usage of "register" keyword.
2035
2036 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2037
2038 * configure: Re-generate.
2039
2040 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2041
2042 * configure: Re-generate.
2043
2044 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
2045
2046 * Makefile.in (COMPILE.pre): Add "-x c++".
2047
2048 2017-06-09 Sergio Durigan Junior <sergiodj@redhat.com>
2049
2050 * fork-child.c: Conditionally include <signal.h>.
2051
2052 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2053
2054 * server.c (handle_general_set): Handle new packet
2055 "QStartupWithShell".
2056 (handle_query): Add "QStartupWithShell" to the list of supported
2057 packets.
2058 (gdbserver_usage): Add help text explaining the
2059 new "--startup-with-shell" and "--no-startup-with-shell" CLI
2060 options.
2061 (captured_main): Recognize and act upon the presence of the new
2062 CLI options.
2063
2064 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2065 Pedro Alves <palves@redhat.com>
2066
2067 * Makefile.in (SFILES): Add "nat/fork-inferior.o".
2068 * configure: Regenerate.
2069 * configure.srv (srv_linux_obj): Add "fork-child.o" and
2070 "fork-inferior.o".
2071 (i[34567]86-*-lynxos*): Likewise.
2072 (spu*-*-*): Likewise.
2073 * fork-child.c: New file.
2074 * linux-low.c: Include "common-inferior.h", "nat/fork-inferior.h"
2075 and "environ.h".
2076 (linux_ptrace_fun): New function.
2077 (linux_create_inferior): Adjust function prototype to reflect
2078 change on "target.h". Adjust function code to use
2079 "fork_inferior".
2080 (linux_request_interrupt): Delete "signal_pid".
2081 * lynx-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2082 (lynx_ptrace_fun): New function.
2083 (lynx_create_inferior): Adjust function prototype to reflect
2084 change on "target.h". Adjust function code to use
2085 "fork_inferior".
2086 * nto-low.c (nto_create_inferior): Adjust function prototype and
2087 code to reflect change on "target.h". Update comments.
2088 * server.c: Include "common-inferior.h", "nat/fork-inferior.h",
2089 "common-terminal.h" and "environ.h".
2090 (terminal_fd): Moved to fork-child.c.
2091 (old_foreground_pgrp): Likewise.
2092 (restore_old_foreground_pgrp): Likewise.
2093 (last_status): Make it global.
2094 (last_ptid): Likewise.
2095 (our_environ): New variable.
2096 (startup_with_shell): Likewise.
2097 (program_name): Likewise.
2098 (program_argv): Rename to...
2099 (program_args): ...this.
2100 (wrapper_argv): New variable.
2101 (start_inferior): Delete function.
2102 (get_exec_wrapper): New function.
2103 (get_exec_file): Likewise.
2104 (get_environ): Likewise.
2105 (prefork_hook): Likewise.
2106 (post_fork_inferior): Likewise.
2107 (postfork_hook): Likewise.
2108 (postfork_child_hook): Likewise.
2109 (handle_v_run): Update code to deal with arguments coming from the
2110 remote host. Update calls from "start_inferior" to
2111 "create_inferior".
2112 (captured_main): Likewise. Initialize environment variable. Call
2113 "have_job_control".
2114 * server.h (post_fork_inferior): New prototype.
2115 (get_environ): Likewise.
2116 (last_status): Declare.
2117 (last_ptid): Likewise.
2118 (signal_pid): Likewise.
2119 * spu-low.c: Include "common-inferior.h" and "nat/fork-inferior.h".
2120 (spu_ptrace_fun): New function.
2121 (spu_create_inferior): Adjust function prototype to reflect change
2122 on "target.h". Adjust function code to use "fork_inferior".
2123 * target.c (target_terminal_init): New function.
2124 (target_terminal_inferior): Likewise.
2125 (target_terminal_ours): Likewise.
2126 * target.h: Include <vector>.
2127 (struct target_ops) <create_inferior>: Update prototype.
2128 (create_inferior): Update macro.
2129 * utils.c (gdb_flush_out_err): New function.
2130 * win32-low.c (win32_create_inferior): Adjust function prototype
2131 and code to reflect change on "target.h".
2132
2133 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2134
2135 * inferiors.c (switch_to_thread): New function.
2136
2137 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
2138
2139 * Makefile.in (SFILE): Add "common/job-control.c".
2140 (OBS): Add "job-control.o".
2141
2142 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
2143
2144 * Makefile: Remove "@host_makefile_frag@".
2145
2146 2017-05-05 Pedro Alves <palves@redhat.com>
2147
2148 * configure: Regenerate.
2149
2150 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
2151
2152 * configure: Regenerate.
2153
2154 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
2155
2156 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Adjust to
2157 software_single_step change of return type to
2158 std::vector<CORE_ADDR>.
2159 * linux-low.c (install_software_single_step_breakpoints):
2160 Likewise.
2161 * linux-low.h (install_software_single_step_breakpoints):
2162 Likewise.
2163
2164 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2165
2166 * remote-utils.c: Include "gdb_termios.h" instead of
2167 "terminal.h".
2168 * terminal.h: Delete file.
2169
2170 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
2171
2172 * server.c: Include <vector>.
2173 <program_argv, wrapper_argv>: Convert to std::vector.
2174 (start_inferior): Rewrite function to use C++.
2175 (handle_v_run): Likewise. Update code that calculates the argv
2176 based on the vRun packet; use C++.
2177 (captured_main): Likewise.
2178
2179 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
2180
2181 * server.c (handle_v_cont): Initialize thread_resume::thread
2182 with null_ptid.
2183
2184 2017-04-05 Pedro Alves <palves@redhat.com>
2185
2186 * configure: Regenerate.
2187
2188 2017-04-05 Pedro Alves <palves@redhat.com>
2189
2190 * gdbreplay.c (sync_error): Constify.
2191 * linux-x86-low.c (push_opcode): Constify.
2192
2193 2017-04-05 Pedro Alves <palves@redhat.com>
2194
2195 * win32-low.c (get_child_debug_event)
2196 <CREATE_PROCESS_DEBUG_EVENT>: Don't report TARGET_WAITKIND_EXECD.
2197 Report TARGET_WAITKIND_SPURIOUS instead.
2198
2199 2017-04-05 Pedro Alves <palves@redhat.com>
2200
2201 * remote-utils.c (remote_prepare, remote_open): Constify.
2202 * remote-utils.h (remote_prepare, remote_open): Constify.
2203 * server.c (captured_main): Constify 'port' handling.
2204
2205 2017-04-04 Simon Marchi <simon.marchi@ericsson.com>
2206
2207 * Makefile.in (clean): Clear .deps.
2208
2209 2017-03-31 Simon Marchi <simon.marchi@polymtl.ca>
2210
2211 * .gitignore: Remove generated files, replace with wildcard.
2212 * (clean): Replace removal of generated files with wildcard.
2213 (version.c): Replace with...
2214 (version-generated.c): ...this.
2215 (xml-builtin.c): Replace with...
2216 (xml-builtin-generated.c): ...this.
2217 (%-ipa.o: %-generated.c, %.o: %-generated.c): New rules.
2218 (%.c: *regformats*): Replace with...
2219 (%-generated.c: *regformats*): ...this.
2220
2221 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2222
2223 * linux-xtensa-low.c (regnum::R_THREADPTR): New enum member.
2224 (xtensa_fill_gregset): Call collect_register_by_name for
2225 threadptr register.
2226 (xtensa_store_gregset): Call supply_register_by_name for
2227 threadptr register.
2228
2229 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
2230
2231 * linux-xtensa-low.c (xtensa_fill_gregset): Call collect_register
2232 for all registers in a0_regnum..a0_regnum + C0_NREGS range.
2233 (xtensa_store_gregset): Call supply_register for all registers in
2234 a0_regnum..a0_regnum + C0_NREGS range.
2235
2236 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2237
2238 * Makefile.in (%-ipa.o: %-ipa.c): New rule.
2239 (ax-ipa.o: ax.c): Remove.
2240 (linux-i386-ipa.o: linux-i386-ipa.c): Remove.
2241 (linux-amd64-ipa.o: linux-amd64-ipa.c): Remove.
2242 (linux-aarch64-ipa.o: linux-aarch64-ipa.c): Remove.
2243 (linux-s390-ipa.o: linux-s390-ipa.c): Remove.
2244 (linux-ppc-ipa.o: linux-ppc-ipa.c): Remove.
2245
2246 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2247
2248 * Makefile.in (%-ipa.o: ../common/%.c): New rule.
2249 (print-utils-ipa.o: ../common/print-utils.c): Remove.
2250 (rsp-low-ipa.o: ../common/rsp-low.c): Remove.
2251 (errors-ipa.o: ../common/errors.c): Remove.
2252 (format-ipa.o: ../common/format.c): Remove.
2253 (common-utils-ipa.o: ../common/common-utils.c): Remove.
2254
2255 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2256
2257 * Makefile.in (%-ipa.o: %.c): New rule.
2258 (tracepoint-ipa.o: tracepoint.c): Remove.
2259 (utils-ipa.o: utils.c): Remove.
2260 (remote-utils-ipa.o: remote-utils.c): Remove.
2261 (regcache-ipa.o: regcache.c): Remove.
2262 (i386-linux-ipa.o: i386-linux.c): Remove.
2263 (i386-mmx-linux-ipa.o: i386-mmx-linux.c): Remove.
2264 (i386-avx-linux-ipa.o: i386-avx-linux.c): Remove.
2265 (i386-mpx-linux-ipa.o: i386-mpx-linux.c): Remove.
2266 (i386-avx-mpx-linux-ipa.o: i386-avx-mpx-linux.c): Remove.
2267 (i386-avx-avx512-linux-ipa.o: i386-avx-avx512-linux.c): Remove.
2268 (i386-avx-mpx-avx512-pku-linux-ipa.o: i386-avx-mpx-avx512-pku-linux.c): Remove.
2269 (amd64-linux-ipa.o: amd64-linux.c): Remove.
2270 (amd64-avx-linux-ipa.o: amd64-avx-linux.c): Remove.
2271 (amd64-mpx-linux-ipa.o: amd64-mpx-linux.c): Remove.
2272 (amd64-avx-mpx-linux-ipa.o: amd64-avx-mpx-linux.c): Remove.
2273 (amd64-avx-avx512-linux-ipa.o: amd64-avx-avx512-linux.c): Remove.
2274 (amd64-avx-mpx-avx512-pku-linux-ipa.o: amd64-avx-mpx-avx512-pku-linux.c): Remove.
2275 (aarch64-ipa.o: aarch64.c): Remove.
2276 (s390-linux32-ipa.o: s390-linux32.c): Remove.
2277 (s390-linux32v1-ipa.o: s390-linux32v1.c): Remove.
2278 (s390-linux32v2-ipa.o: s390-linux32v2.c): Remove.
2279 (s390-linux64-ipa.o: s390-linux64.c): Remove.
2280 (s390-linux64v1-ipa.o: s390-linux64v1.c): Remove.
2281 (s390-linux64v2-ipa.o: s390-linux64v2.c): Remove.
2282 (s390-te-linux64-ipa.o: s390-te-linux64.c): Remove.
2283 (s390-vx-linux64-ipa.o: s390-vx-linux64.c): Remove.
2284 (s390-tevx-linux64-ipa.o: s390-tevx-linux64.c): Remove.
2285 (s390x-linux64-ipa.o: s390x-linux64.c): Remove.
2286 (s390x-linux64v1-ipa.o: s390x-linux64v1.c): Remove.
2287 (s390x-linux64v2-ipa.o: s390x-linux64v2.c): Remove.
2288 (s390x-te-linux64-ipa.o: s390x-te-linux64.c): Remove.
2289 (s390x-vx-linux64-ipa.o: s390x-vx-linux64.c): Remove.
2290 (s390x-tevx-linux64-ipa.o: s390x-tevx-linux64.c): Remove.
2291 (powerpc-32l-ipa.o: powerpc-32l.c): Remove.
2292 (powerpc-altivec32l-ipa.o: powerpc-altivec32l.c): Remove.
2293 (powerpc-cell32l-ipa.o: powerpc-cell32l.c): Remove.
2294 (powerpc-vsx32l-ipa.o: powerpc-vsx32l.c): Remove.
2295 (powerpc-isa205-32l-ipa.o: powerpc-isa205-32l.c): Remove.
2296 (powerpc-isa205-altivec32l-ipa.o: powerpc-isa205-altivec32l.c): Remove.
2297 (powerpc-isa205-vsx32l-ipa.o: powerpc-isa205-vsx32l.c): Remove.
2298 (powerpc-e500l-ipa.o: powerpc-e500l.c): Remove.
2299 (powerpc-64l-ipa.o: powerpc-64l.c): Remove.
2300 (powerpc-altivec64l-ipa.o: powerpc-altivec64l.c): Remove.
2301 (powerpc-cell64l-ipa.o: powerpc-cell64l.c): Remove.
2302 (powerpc-vsx64l-ipa.o: powerpc-vsx64l.c): Remove.
2303 (powerpc-isa205-64l-ipa.o: powerpc-isa205-64l.c): Remove.
2304 (powerpc-isa205-altivec64l-ipa.o: powerpc-isa205-altivec64l.c): Remove.
2305 (powerpc-isa205-vsx64l-ipa.o: powerpc-isa205-vsx64l.c): Remove.
2306 (tdesc-ipa.o: tdesc.c): Remove.
2307 (x32-linux-ipa.o: x32-linux.c): Remove.
2308 (x32-avx-linux-ipa.o: x32-avx-linux.c): Remove.
2309 (x32-avx512-linux-ipa.o: x32-avx512-linux.c): Remove.
2310
2311 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2312
2313 * Makefile.in (%.o: ../arch/%.c): New rule.
2314 (arm.o: ../arch/arm.c): Remove.
2315 (arm-linux.o: ../arch/arm-linux.c): Remove.
2316 (arm-get-next-pcs.o: ../arch/arm-get-next-pcs.c): Remove.
2317 (aarch64-insn.o: ../arch/aarch64-insn.c): Remove.
2318
2319 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2320
2321 * Makefile.in (%.o: ../nat/%.c): New rule.
2322 (x86-dregs.o: ../nat/x86-dregs.c): Remove.
2323 (amd64-linux-siginfo.o: ../nat/amd64-linux-siginfo.c): Remove.
2324 (linux-btrace.o: ../nat/linux-btrace.c): Remove.
2325 (linux-osdata.o: ../nat/linux-osdata.c): Remove.
2326 (linux-procfs.o: ../nat/linux-procfs.c): Remove.
2327 (linux-ptrace.o: ../nat/linux-ptrace.c): Remove.
2328 (linux-waitpid.o: ../nat/linux-waitpid.c): Remove.
2329 (mips-linux-watch.o: ../nat/mips-linux-watch.c): Remove.
2330 (ppc-linux.o: ../nat/ppc-linux.c): Remove.
2331 (linux-personality.o: ../nat/linux-personality.c): Remove.
2332 (aarch64-linux-hw-point.o: ../nat/aarch64-linux-hw-point.c): Remove.
2333 (aarch64-linux.o: ../nat/aarch64-linux.c): Remove.
2334 (x86-linux.o: ../nat/x86-linux.c): Remove.
2335 (x86-linux-dregs.o: ../nat/x86-linux-dregs.c): Remove.
2336 (linux-namespaces.o: ../nat/linux-namespaces.c): Remove.
2337
2338 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2339
2340 * Makefile.in (%.o: ../common/%.c): New rule.
2341 (signals.o: ../common/signals.c): Remove.
2342 (print-utils.o: ../common/print-utils.c): Remove.
2343 (rsp-low.o: ../common/rsp-low.c): Remove.
2344 (common-utils.o: ../common/common-utils.c): Remove.
2345 (posix-strerror.o: ../common/posix-strerror.c): Remove.
2346 (mingw-strerror.o: ../common/mingw-strerror.c): Remove.
2347 (vec.o: ../common/vec.c): Remove.
2348 (gdb_vecs.o: ../common/gdb_vecs.c): Remove.
2349 (xml-utils.o: ../common/xml-utils.c): Remove.
2350 (ptid.o: ../common/ptid.c): Remove.
2351 (buffer.o: ../common/buffer.c): Remove.
2352 (format.o: ../common/format.c): Remove.
2353 (filestuff.o: ../common/filestuff.c): Remove.
2354 (agent.o: ../common/agent.c): Remove.
2355 (errors.o: ../common/errors.c): Remove.
2356 (environ.o: ../common/environ.c): Remove.
2357 (common-debug.o: ../common/common-debug.c): Remove.
2358 (cleanups.o: ../common/cleanups.c): Remove.
2359 (common-exceptions.o: ../common/common-exceptions.c): Remove.
2360 (fileio.o: ../common/fileio.c): Remove.
2361 (common-regcache.o: ../common/common-regcache.c): Remove.
2362 (signals-state-save-restore.o: ../common/signals-state-save-restore.c): Remove.
2363 (new-op.o: ../common/new-op.c): Remove.
2364 (btrace-common.o: ../common/btrace-common.c): Remove.
2365
2366 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2367
2368 * Makefile.in (%.o: ../target/%.c): New rule.
2369 (waitstatus.o: ../target/waitstatus.c): Remove.
2370
2371 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
2372
2373 * Makefile.in
2374 (%.c: ../regformats/%.dat,
2375 (%.c: ../regformats/arm/%.dat,
2376 (%.c: ../regformats/i386/%.dat,
2377 (%.c: ../regformats/rs6000/%.dat): New rules.
2378 (aarch64.c): Remove.
2379 (reg-arm.c): Remove.
2380 (arm-with-iwmmxt.c): Remove.
2381 (arm-with-vfpv2.c): Remove.
2382 (arm-with-vfpv3.c): Remove.
2383 (arm-with-neon.c): Remove.
2384 (reg-bfin.c): Remove.
2385 (reg-cris.c): Remove.
2386 (reg-crisv32.c): Remove.
2387 (i386.c): Remove.
2388 (i386-linux.c): Remove.
2389 (i386-avx.c): Remove.
2390 (i386-avx-linux.c): Remove.
2391 (i386-avx-avx512.c): Remove.
2392 (i386-avx-avx512-linux.c): Remove.
2393 (i386-mpx.c): Remove.
2394 (i386-mpx-linux.c): Remove.
2395 (i386-avx-mpx-avx512-pku.c): Remove.
2396 (i386-avx-mpx-avx512-pku-linux.c): Remove.
2397 (i386-avx-mpx.c): Remove.
2398 (i386-avx-mpx-linux.c): Remove.
2399 (i386-mmx.c): Remove.
2400 (i386-mmx-linux.c): Remove.
2401 (reg-ia64.c): Remove.
2402 (reg-m32r.c): Remove.
2403 (reg-m68k.c): Remove.
2404 (reg-cf.c): Remove.
2405 (mips-linux.c): Remove.
2406 (mips-dsp-linux.c): Remove.
2407 (mips64-linux.c): Remove.
2408 (mips64-dsp-linux.c): Remove.
2409 (nios2-linux.c): Remove.
2410 (powerpc-32.c): Remove.
2411 (powerpc-32l.c): Remove.
2412 (powerpc-altivec32l.c): Remove.
2413 (powerpc-cell32l.c): Remove.
2414 (powerpc-vsx32l.c): Remove.
2415 (powerpc-isa205-32l.c): Remove.
2416 (powerpc-isa205-altivec32l.c): Remove.
2417 (powerpc-isa205-vsx32l.c): Remove.
2418 (powerpc-e500l.c): Remove.
2419 (powerpc-64l.c): Remove.
2420 (powerpc-altivec64l.c): Remove.
2421 (powerpc-cell64l.c): Remove.
2422 (powerpc-vsx64l.c): Remove.
2423 (powerpc-isa205-64l.c): Remove.
2424 (powerpc-isa205-altivec64l.c): Remove.
2425 (powerpc-isa205-vsx64l.c): Remove.
2426 (s390-linux32.c): Remove.
2427 (s390-linux32v1.c): Remove.
2428 (s390-linux32v2.c): Remove.
2429 (s390-linux64.c): Remove.
2430 (s390-linux64v1.c): Remove.
2431 (s390-linux64v2.c): Remove.
2432 (s390-te-linux64.c): Remove.
2433 (s390-vx-linux64.c): Remove.
2434 (s390-tevx-linux64.c): Remove.
2435 (s390x-linux64.c): Remove.
2436 (s390x-linux64v1.c): Remove.
2437 (s390x-linux64v2.c): Remove.
2438 (s390x-te-linux64.c): Remove.
2439 (s390x-vx-linux64.c): Remove.
2440 (s390x-tevx-linux64.c): Remove.
2441 (tic6x-c64xp-linux.c): Remove.
2442 (tic6x-c64x-linux.c): Remove.
2443 (tic6x-c62x-linux.c): Remove.
2444 (reg-sh.c): Remove.
2445 (reg-sparc64.c): Remove.
2446 (reg-spu.c): Remove.
2447 (amd64.c): Remove.
2448 (amd64-linux.c): Remove.
2449 (amd64-avx.c): Remove.
2450 (amd64-avx-linux.c): Remove.
2451 (amd64-avx-avx512.c): Remove.
2452 (amd64-avx-avx512-linux.c): Remove.
2453 (amd64-mpx.c): Remove.
2454 (amd64-mpx-linux.c): Remove.
2455 (amd64-avx-mpx-avx512-pku.c): Remove.
2456 (amd64-avx-mpx-avx512-pku-linux.c): Remove.
2457 (amd64-avx-mpx.c): Remove.
2458 (amd64-avx-mpx-linux.c): Remove.
2459 (x32.c): Remove.
2460 (x32-linux.c): Remove.
2461 (x32-avx.c): Remove.
2462 (x32-avx-linux.c): Remove.
2463 (x32-avx-avx512.c): Remove.
2464 (x32-avx-avx512-linux.c): Remove.
2465 (reg-xtensa.c): Remove.
2466 (reg-tilegx.c): Remove.
2467 (reg-tilegx32.c): Remove.
2468
2469 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
2470
2471 * Makefile.in (SFILES): Add "common/environ.c".
2472 (OBJS): Add "common/environ.h".
2473
2474 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
2475
2476 * configure.ac: Check if the fs_base and gs_base members of
2477 `struct user_regs_struct' exist.
2478 * config.in: Regenerated.
2479 * configure: Likewise.
2480
2481 2017-01-09 Antoine Tremblay <antoine.tremblay@ericsson.com>
2482
2483 * linux-aarch32-low.c (arm_breakpoint_kind_from_pc): Use
2484 target_read_memory.
2485 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer): Likewise.
2486 (get_next_pcs_syscall_next_pc): Likewise.
2487
2488 2016-12-23 Luis Machado <lgustavo@codesourcery.com>
2489
2490 * win32-i386-low.c: Fix incorrect reference to a couple source files.
2491 * nto-x86-low.c: Likewise.
2492
2493 2016-11-30 Simon Marchi <simon.marchi@polymtl.ca>
2494
2495 * Makefile.in: Include disable-implicit-rules.mk.
2496
2497 2016-11-23 Pedro Alves <palves@redhat.com>
2498
2499 * debug.c: Include <chrono> instead of "gdb_sys_time.h".
2500 (debug_vprintf): Use std::chrono::steady_clock instead of
2501 gettimeofday. Use '.' instead of ':'.
2502 * tracepoint.c: Include <chrono> instead of "gdb_sys_time.h".
2503 (get_timestamp): Use std::chrono::steady_clock instead of
2504 gettimeofday.
2505
2506 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2507
2508 * Makefile.in: Fix whitespace formatting.
2509
2510 2016-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2511
2512 * Makefile.in (SFILES, OBS): Flatten list and order
2513 alphabetically.
2514
2515 2016-11-23 Pedro Alves <palves@redhat.com>
2516
2517 * event-loop.c (handle_file_event): Use warning.
2518 * linux-low.c (linux_resume_one_lwp_throw): Use warning.
2519 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2520 Use warning.
2521
2522 2016-11-23 Pedro Alves <palves@redhat.com>
2523
2524 * linux-low.c (check_zombie_leaders): Use debug_printf for debug
2525 output.
2526 * notif.c (handle_notif_ack, notif_event_enque): Likewise.
2527 * remote-utils.c (putpkt_binary_1, readchar, getpkt): Use
2528 debug_printf and debug_flush for debug output.
2529 * server.c (handle_general_set): Likewise.
2530 * thread-db.c (try_thread_db_load): Use debug_printf for debug
2531 output.
2532
2533 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2534
2535 * Makefile.in (.c.o): Replace rule with ...
2536 (%.o: %.c): ... this one.
2537
2538 2016-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2539
2540 * Makefile.in: Remove @GMAKE_TRUE@ prefixes and removes lines
2541 prefixed with @GMAKE_FALSE@. Update comment related to non-GNU
2542 make.
2543 * configure.ac: Remove checks for the make program.
2544 * configure: Re-generate.
2545
2546 2016-10-28 Pedro Alves <palves@redhat.com>
2547
2548 * Makefile.in (CXX_DIALECT): Get from configure.
2549 (COMPILE.pre, CC_LD): Append $(CXX_DIALECT).
2550 * acinclude.m4: Include ../ax_cxx_compile_stdcxx.m4.
2551 * configure.ac: Call AX_CXX_COMPILE_STDCXX.
2552 * config.in: Regenerate.
2553 * configure: Regenerate.
2554
2555 2016-10-27 Yao Qi <yao.qi@linaro.org>
2556
2557 * linux-low.c (linux_supports_range_stepping): Return true if
2558 can_software_single_step return true.
2559
2560 2016-10-27 Yao Qi <yao.qi@linaro.org>
2561
2562 * inferiors.c (find_inferior_in_random): New function.
2563 * inferiors.h (find_inferior_in_random): Declare.
2564 * linux-low.c (linux_wait_for_event_filtered): Call
2565 find_inferior_in_random instead of find_inferior.
2566
2567 2016-10-27 Yao Qi <yao.qi@linaro.org>
2568
2569 * linux-low.c (linux_wait_1): If single-step breakpoints are
2570 inserted, remove them.
2571
2572 2016-10-26 Pedro Alves <palves@redhat.com>
2573
2574 * linux-low.c (handle_extended_wait): Link parent/child fork
2575 threads.
2576 (linux_wait_1): Unlink them.
2577 (linux_set_resume_request): Ignore resume requests for
2578 already-resumed and unhandled fork child threads.
2579 * linux-low.h (struct lwp_info) <fork_relative>: New field.
2580 * server.c (in_queued_stop_replies_ptid, in_queued_stop_replies):
2581 New functions.
2582 (handle_v_requests) <vCont>: Don't call require_running.
2583 * server.h (in_queued_stop_replies): New declaration.
2584
2585 2016-10-24 Yao Qi <yao.qi@linaro.org>
2586
2587 PR server/20733
2588 * linux-aarch64-low.c (append_insns): Cast the return value to
2589 'uint32_t *'.
2590
2591 2016-10-10 Yao Qi <yao.qi@linaro.org>
2592
2593 * linux-aarch32-low.c (enum arm_breakpoint_kinds): Remove.
2594
2595 2016-10-06 Sergio Durigan Junior <sergiodj@redhat.com>
2596
2597 * target.c (target_supports_multi_process): New function, moved
2598 from...
2599 * target.h (target_supports_multi_process): ... here. Remove
2600 macro.
2601
2602 2016-10-05 Tom Tromey <tom@tromey.com>
2603
2604 PR remote/20655:
2605 * tracepoint.c (handle_tracepoint_bkpts): Check
2606 ipa_error_tracepoint, not ipa_stopping_tracepoint.
2607
2608 2016-10-05 Yao Qi <yao.qi@linaro.org>
2609
2610 * configure.srv: Update the path of arm-*.xml files.
2611
2612 2016-10-05 Terry Guo <terry.guo@arm.com>
2613 Yao Qi <yao.qi@linaro.org>
2614
2615 * Makefile.in: Adjust the path of rules.
2616 * configure.srv: Update the path of xml files.
2617 * regformats/arm-with-iwmmxt.dat: Regenerated.
2618 * regformats/arm-with-neon.dat: Likewise.
2619 * regformats/arm-with-vfpv2.dat: Likewise.
2620 * regformats/arm-with-vfpv3.dat Likewise.
2621
2622 2016-09-30 Yao Qi <yao.qi@linaro.org>
2623
2624 PR gdbserver/20627
2625 * target.c (target_stop_and_wait): Don't call
2626 target_continue_no_signal, use resume_stop instead.
2627
2628 2016-09-26 Yao Qi <yao.qi@linaro.org>
2629
2630 * linux-low.c (linux_wait_1): Call debug_exit.
2631
2632 2016-09-23 Pedro Alves <palves@redhat.com>
2633
2634 * Makefile.in (SFILES): Add common/new-op.c.
2635 (OBS): Add common/new-op.o.
2636 (new-op.o): New rule.
2637
2638 2016-09-21 Simon Marchi <simon.marchi@ericsson.com>
2639
2640 * .gitinore: Ignore more files.
2641
2642 2016-09-21 Yao Qi <yao.qi@linaro.org>
2643
2644 * linux-aarch32-low.c (arm_fill_gregset): Keep bits 20 to
2645 23.
2646
2647 2016-09-19 Sergio Durigan Junior <sergiodj@redhat.com>
2648
2649 * server.c (start_inferior): Call target_mourn_inferior instead of
2650 mourn_inferior; pass ptid_t argument to it.
2651 (resume): Likewise.
2652 (handle_target_event): Likewise.
2653 * target.c (target_mourn_inferior): New function.
2654 * target.h (mourn_inferior): Delete macro.
2655
2656 2016-09-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
2657
2658 * linux-low.c (lwp_is_stepping): New function.
2659
2660 2016-09-06 Carl Love <cel@us.ibm.com>
2661
2662 * server.c (start_inferior): Fixed comment, requested comment change
2663 didn't get updated correctly. Removed reference to ptrace () call as
2664 it is only true on Linux systems.
2665
2666 2016-09-06 Carl Love <cel@us.ibm.com>
2667
2668 * server.c (start_inferior): Do not call
2669 function target_post_create_inferior () if the
2670 inferior process has already exited.
2671
2672 2016-09-05 Pedro Alves <palves@redhat.com>
2673
2674 * Makefile.in (COMPILER, COMPILER_CFLAGS): Remove.
2675 (COMPILE.pre, CC_LD): Use CXX directly.
2676 (INTERNAL_CFLAGS_BASE): Use CXXFLAGS directly.
2677 * acinclude.m4: Don't include build-with-cxx.m4.
2678 * configure.ac: Remove GDB_AC_BUILD_WITH_CXX call.
2679 * configure: Regenerate.
2680
2681 2016-09-02 Akash Trehan <akash.trehan123@gmail.com>
2682
2683 PR gdb/19495
2684 * remote-utils.c (relocate_instruction): Remove redundant strcpy()
2685 call writing data to own_buf.
2686
2687 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2688
2689 * target.c (mywait): Call target_wait instead of
2690 the_target->wait.
2691 (target_wait): New function.
2692
2693 2016-09-01 Sergio Durigan Junior <sergiodj@redhat.com>
2694
2695 * server.c (start_inferior): New variable 'ptid'. Replace calls
2696 to the_target->resume by target_continue{,_no_signal}, depending
2697 on the case.
2698 * target.c (target_stop_and_wait): Call target_continue_no_signal
2699 instead of the_target->resume.
2700 (target_continue): New function.
2701
2702 2016-08-31 Antoine Tremblay <antoine.tremblay@ericsson.com>
2703
2704 * linux-low.c (linux_wait_1): Move event switch after unsuspend_lwps.
2705
2706 2016-08-25 Adhemerval Zanella <adhemerval.zanella@linaro.org>
2707
2708 PR server/20491
2709 * gdb_proc_service.h (ps_get_thread_area): Remove const from struct
2710 ps_prochandle.
2711 * linux-aarch64-low.c (ps_get_thread_area): Likewise.
2712 * linux-arm-low.c (ps_get_thread_area): Likewise.
2713 * linux-crisv32-low.c (ps_get_thread_area): Likewise.
2714 * linux-m68k-low.c (ps_get_thread_area): Likewise.
2715 * linux-mips-low.c (ps_get_thread_area): Likewise.
2716 * linux-nios2-low.c (ps_get_thread_area): Likewise.
2717 * linux-tic6x-low.c (ps_get_thread_area): Likewise.
2718 * linux-x86-low.c (ps_get_thread_area): Likewise.
2719 * linux-xtensa-low.c (ps_get_thread_area): Likewise.
2720
2721 2016-08-19 Pedro Alves <palves@redhat.com>
2722
2723 * linux-x86-low.c (amd64_emit_call): Emit missing call opcode.
2724
2725 2016-08-19 Pedro Alves <palves@redhat.com>
2726
2727 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Fix
2728 comment. Use memcpy instead of casting through unsigned long.
2729
2730 2016-08-19 Pedro Alves <palves@redhat.com>
2731
2732 * linux-amd64-ipa.c (alloc_jump_pad_buffer) [__ILP32__]: Try
2733 allocating around 0x80000000.
2734
2735 2016-08-19 Pedro Alves <palves@redhat.com>
2736
2737 PR gdb/20415
2738 * Makefile.in (x32-linux-ipa.o, x32-avx-linux-ipa.o)
2739 (x32-avx512-linux-ipa.o): New rules.
2740 * configure.ac (x86_64-*-linux*): New x32 check.
2741 * configure.srv (ipa_x32_linux_regobj): New.
2742 (x86_64-*-linux*): Use $ipa_x32_linux_regobj if building for x32.
2743 * linux-amd64-ipa.c (get_ipa_tdesc) [__ILP32__]: Return x32
2744 descriptions.
2745 (initialize_low_tracepoint) [__ILP32__]: Initialize x32
2746 descriptions.
2747 * configure: Regenerate.
2748
2749 2016-08-09 Pedro Alves <palves@redhat.com>
2750
2751 PR gdb/18653
2752 * Makefile.in (OBS): Add signals-state-save-restore.o.
2753 (signals-state-save-restore.o): New rule.
2754 * config.in: Regenerate.
2755 * configure: Regenerate.
2756 * linux-low.c: Include "signals-state-save-restore.h".
2757 (linux_create_inferior): Call
2758 restore_original_signals_state.
2759 * server.c: Include "dispositions-save-restore.h".
2760 (captured_main): Call save_original_signals_state.
2761
2762 2016-08-05 Pedro Alves <palves@redhat.com>
2763
2764 * configure: Regenerate.
2765
2766 2016-08-04 Yao Qi <yao.qi@linaro.org>
2767
2768 * linux-low.c (regsets_fetch_inferior_registers): Check
2769 errno is ESRCH or not.
2770
2771 2016-08-02 Yao Qi <yao.qi@linaro.org>
2772
2773 * thread-db.c (struct thread_db) <td_ta_event_getmsg_p>: Remove.
2774 <td_ta_set_event_p, td_ta_event_addr_p>: Remove.
2775 (thread_db_load_search): Update.
2776 (try_thread_db_load_1): Don't look for td_ta_event_addr,
2777 td_ta_set_event and td_ta_event_getmsg.
2778
2779 2016-07-26 Pedro Alves <palves@redhat.com>
2780
2781 PR server/20414
2782 * linux-x86-low.c (x86_get_pc, x86_set_pc): Use uint64_t instead
2783 of unsigned long for 64-bit registers and use uint32_t instead of
2784 unsigned int for 32-bit registers.
2785
2786 2016-07-26 Pedro Alves <palves@redhat.com>
2787
2788 * linux-x86-low.c (x86_siginfo_fixup): Rename 'native' parameter
2789 to 'ptrace'.
2790
2791 2016-07-21 Tom Tromey <tom@tromey.com>
2792
2793 * configure: Rebuild.
2794
2795 2016-07-21 Yao Qi <yao.qi@linaro.org>
2796
2797 * mem-break.c (find_gdb_breakpoint): Cast bp to
2798 'struct gdb_breakpoint *' rather than 'gdb_breakpoint *'.
2799
2800 2016-07-21 Yao Qi <yao.qi@linaro.org>
2801
2802 * server.c (handle_v_requests): Support s and S actions
2803 if target_supports_software_single_step return true.
2804
2805 2016-07-21 Yao Qi <yao.qi@linaro.org>
2806
2807 * linux-low.c (resume_stopped_resumed_lwps): If resume request
2808 is resume_step, call maybe_hw_step.
2809 (linux_wait_1): Stop all threads, remove reinsert breakpoints,
2810 and unstop them.
2811 (linux_resume_one_lwp_throw): Don't assert the thread has reinsert
2812 breakpoints or not.
2813 (proceed_one_lwp): If resume request is resume_step, install
2814 reinsert breakpoints and call maybe_hw_step.
2815
2816 2016-07-21 Yao Qi <yao.qi@linaro.org>
2817
2818 * linux-low.c (proceed_one_lwp): Declare.
2819 (linux_resume_one_thread): Remove local variable 'step'.
2820 Lift code enqueue signal. Call proceed_one_lwp instead of
2821 linux_resume_one_lwp.
2822
2823 2016-07-21 Yao Qi <yao.qi@linaro.org>
2824
2825 * linux-low.c (linux_resume_one_thread): Call
2826 enqueue_pending_signal.
2827
2828 2016-07-21 Yao Qi <yao.qi@linaro.org>
2829
2830 * gdbthread.h (make_cleanup_restore_current_thread): Declare.
2831 * inferiors.c (do_restore_current_thread_cleanup): New function.
2832 (make_cleanup_restore_current_thread): Likewise.
2833 * linux-low.c (install_software_single_step_breakpoints): Call
2834 make_cleanup_restore_current_thread. Switch current_thread to
2835 thread.
2836
2837 2016-07-21 Yao Qi <yao.qi@linaro.org>
2838
2839 * mem-break.c (struct reinsert_breakpoint) <ptid>: New field.
2840 (set_reinsert_breakpoint): New parameter ptid. Callers updated.
2841 (clone_one_breakpoint): Likewise.
2842 (delete_reinsert_breakpoints): Change parameter to thread.
2843 Callers updated.
2844 (has_reinsert_breakpoints): Likewise.
2845 (uninsert_reinsert_breakpoints): Likewise.
2846 (reinsert_reinsert_breakpoints): Likewise.
2847 * mem-break.h (set_reinsert_breakpoint): Update declaration.
2848 (delete_reinsert_breakpoints): Likewise.
2849 (reinsert_reinsert_breakpoints): Likewise.
2850 (uninsert_reinsert_breakpoints): Likewise.
2851 (has_reinsert_breakpoints): Likewise.
2852
2853 2016-07-21 Yao Qi <yao.qi@linaro.org>
2854
2855 * inferiors.c (get_thread_process): Make parameter const.
2856 * inferiors.h (get_thread_process): Update declaration.
2857 * mem-break.c (clone_all_breakpoints): Remove all parameters.
2858 Add new parameters child_thread and parent_thread. Callers
2859 updated.
2860 * mem-break.h (clone_all_breakpoints): Update declaration.
2861
2862 2016-07-21 Yao Qi <yao.qi@linaro.org>
2863
2864 * mem-break.c (struct breakpoint) <cond_list>: Remove.
2865 <command_list, handler>: Remove.
2866 (struct gdb_breakpoint): New.
2867 (struct other_breakpoint): New.
2868 (struct reinsert_breakpoint): New.
2869 (is_gdb_breakpoint): New function.
2870 (any_persistent_commands): Update command_list if
2871 is_gdb_breakpoint returns true.
2872 (set_breakpoint): Create breakpoints according to their types.
2873 (find_gdb_breakpoint): Return 'struct gdb_breakpoint *'.
2874 (set_gdb_breakpoint_1): Likewise.
2875 (set_gdb_breakpoint): Likewise.
2876 (clear_breakpoint_conditions): Change parameter type to
2877 'struct gdb_breakpoint *'.
2878 (clear_breakpoint_commands): Likewise.
2879 (clear_breakpoint_conditions_and_commands): Likewise.
2880 (add_condition_to_breakpoint): Likewise.
2881 (add_breakpoint_condition): Likewise.
2882 (add_commands_to_breakpoint): Likewise.
2883 (check_breakpoints): Check other_breakpoint.
2884 (clone_one_breakpoint): Clone breakpopint according to its type.
2885 * mem-break.h (struct gdb_breakpoint): Declare.
2886 (set_gdb_breakpoint): Update declaration.
2887 (clear_breakpoint_conditions_and_commands): Likewise.
2888 (add_breakpoint_condition): Likewise.
2889 (add_breakpoint_commands): Likewise.
2890 * server.c (process_point_options): Change parameter type to
2891 'struct gdb_breakpoint *'.
2892
2893 2016-07-21 Yao Qi <yao.qi@linaro.org>
2894
2895 * mem-break.c (set_breakpoint_at): Rename it to ...
2896 (set_breakpoint_type_at): ... it.
2897 (set_breakpoint_at): Call set_breakpoint_type_at.
2898 (set_reinsert_breakpoint): Call set_breakpoint_type_at.
2899 * mem-break.h (set_breakpoint_at): Update comments.
2900
2901 2016-07-12 Chung-Lin Tang <cltang@codesourcery.com>
2902
2903 * linux-nios2-low.c (nios2_fill_gregset): Add type cast
2904 to buf parameter.
2905 (nios2_store_gregset): Likewise.
2906
2907 2016-07-01 Pedro Alves <palves@redhat.com>
2908 Antoine Tremblay <antoine.tremblay@ericsson.com>
2909
2910 * linux-low.c: Change interface to take the target lwp_info
2911 pointer directly and return void. Handle detaching from a zombie
2912 thread.
2913 (linux_detach_lwp_callback): New function.
2914 (linux_detach): Detach from the leader thread after detaching from
2915 the clone threads.
2916
2917 2016-06-28 Yao Qi <yao.qi@linaro.org>
2918
2919 * linux-aarch64-low.c (aarch64_ftrace_insn_reloc_b): Use int64_t
2920 for variable new_offset.
2921 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
2922 (aarch64_ftrace_insn_reloc_cb): Likewise.
2923 (aarch64_ftrace_insn_reloc_tb): Likewise.
2924 (aarch64_install_fast_tracepoint_jump_pad): Likewise. Use
2925 PRIx64 instead of PRIx32.
2926
2927 2016-06-28 Yao Qi <yao.qi@linaro.org>
2928
2929 * linux-arm-low.c (arm_get_syscall_trapinfo): New function.
2930 (the_low_target): Install arm_get_syscall_trapinfo.
2931
2932 2016-06-28 Yao Qi <yao.qi@linaro.org>
2933
2934 * linux-aarch64-low.c (aarch64_get_syscall_trapinfo): New
2935 function.
2936 (the_low_target): Install aarch64_get_syscall_trapinfo.
2937
2938 2016-06-28 Yao Qi <yao.qi@linaro.org>
2939
2940 * linux-low.c (get_syscall_trapinfo): Remove parameter sysret.
2941 Callers updated.
2942 * linux-low.h (struct linux_target_ops) <get_syscall_trapinfo>:
2943 Remove parameter sysno.
2944 * linux-x86-low.c (x86_get_syscall_trapinfo): Remove parameter
2945 sysret.
2946
2947 2016-06-21 Andreas Arnez <arnez@linux.vnet.ibm.com>
2948
2949 * linux-s390-low.c (s390_emit_eq_goto): Mark function static.
2950 (s390_emit_ne_goto): Likewise.
2951 (s390_emit_lt_goto): Likewise.
2952 (s390_emit_le_goto): Likewise.
2953 (s390_emit_gt_goto): Likewise.
2954 (s390_emit_ge_goto): Likewise.
2955 (s390x_emit_eq_goto): Likewise.
2956 (s390x_emit_ne_goto): Likewise.
2957 (s390x_emit_lt_goto): Likewise.
2958 (s390x_emit_le_goto): Likewise.
2959 (s390x_emit_gt_goto): Likewise.
2960 (s390x_emit_ge_goto): Likewise.
2961 (s390_emit_ops_impl): Mark variable static.
2962 (s390x_emit_ops): Likewise.
2963
2964 2016-06-17 Yao Qi <yao.qi@linaro.org>
2965
2966 * linux-low.c (handle_extended_wait): Call
2967 uninsert_reinsert_breakpoints for the parent process. Remove
2968 reinsert breakpoints from the child process. Reinsert them to
2969 the parent process when vfork is done.
2970 * mem-break.c (uninsert_reinsert_breakpoints): New function.
2971 (reinsert_reinsert_breakpoints): New function.
2972 * mem-break.h (uninsert_reinsert_breakpoints): Declare
2973 (reinsert_reinsert_breakpoints): Declare.
2974
2975 2016-06-17 Yao Qi <yao.qi@linaro.org>
2976
2977 * linux-low.c (handle_extended_wait): If the parent is doing
2978 step-over, remove the reinsert breakpoints from the forked child.
2979
2980 2016-06-17 Yao Qi <yao.qi@linaro.org>
2981
2982 * linux-low.c (unsuspend_all_lwps): Declare.
2983 (linux_low_filter_event): If thread exited, call finish_step_over.
2984 If step-over is finished, unsuspend other threads.
2985
2986 2016-06-17 Yao Qi <yao.qi@linaro.org>
2987
2988 * linux-low.c (linux_resume_one_lwp_throw): Assert
2989 has_reinsert_breakpoints returns false.
2990 * mem-break.c (delete_disabled_breakpoints): Assert
2991 bp type isn't reinsert_breakpoint.
2992
2993 2016-06-17 Yao Qi <yao.qi@linaro.org>
2994
2995 * linux-low.c (maybe_hw_step): New function.
2996 (linux_resume_one_lwp_throw): Call maybe_hw_step.
2997 (finish_step_over): Switch current_thread to lwp temporarily,
2998 and assert has_reinsert_breakpoints returns true.
2999 (proceed_one_lwp): Call maybe_hw_step.
3000 * mem-break.c (has_reinsert_breakpoints): New function.
3001 * mem-break.h (has_reinsert_breakpoints): Declare.
3002
3003 2016-06-02 Jon Turney <jon.turney@dronecode.org.uk>
3004
3005 * win32-low.c (win32_create_inferior): Add pointer casts for C++.
3006
3007 2016-05-17 Yao Qi <yao.qi@linaro.org>
3008
3009 * linux-low.c (linux_stabilize_threads): Call unsuspend_all_lwps
3010 instead of find_inferior.
3011
3012 2016-05-05 Yao Qi <yao.qi@linaro.org>
3013
3014 * linux-arm-low.c (get_next_pcs_read_memory_unsigned_integer):
3015 Initialize res to zero.
3016
3017 2016-05-05 Yao Qi <yao.qi@linaro.org>
3018
3019 * linux-arm-low.c (arm_sigreturn_next_pc): Change type of cpsr
3020 to uint32_t.
3021
3022 2016-05-04 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
3023
3024 * spu-low.c (fetch_ppc_register): Cast PowerPC-Linux-specific value
3025 used as first ptrace argument to PTRACE_TYPE_ARG1 for C++.
3026 (fetch_ppc_memory_1, store_ppc_memory_1): Likewise.
3027
3028 2016-04-28 Par Olsson <par.olsson@windriver.com>
3029 Simon Marchi <simon.marchi@ericsson.com>
3030
3031 * tracepoint.c (write_inferior_int8): New function.
3032 (cmd_qtenable_disable): Write enable flag using
3033 write_inferior_int8.
3034
3035 2016-04-25 Yao Qi <yao.qi@linaro.org>
3036
3037 * linux-low.c (lwp_signal_can_be_delivered): Adjust.
3038 (need_step_over_p): Return zero if the LWP has pending signals
3039 can be delivered on software single step target.
3040
3041 2016-04-25 Yao Qi <yao.qi@linaro.org>
3042
3043 * linux-low.c (reinsert_raw_breakpoint): If bp->inserted is true
3044 return instead of error.
3045
3046 2016-04-22 Yao Qi <yao.qi@linaro.org>
3047
3048 * linux-aarch32-low.c (arm_store_gregset): Clear CPSR bits 20
3049 to 23.
3050
3051 2016-04-22 Yao Qi <yao.qi@linaro.org>
3052
3053 * linux-low.c (lwp_signal_can_be_delivered): Don't deliver
3054 signal when stepping over breakpoint with software single
3055 step.
3056
3057 2016-04-21 Pedro Alves <palves@redhat.com>
3058
3059 * linux-s390-low.c (s390_collect_ptrace_register)
3060 (s390_supply_ptrace_register, s390_get_hwcap): Use gdb_byte * and
3061 add casts.
3062 (s390_check_regset): Use void * instead of gdb_byte *.
3063
3064 2016-04-20 Pedro Alves <palves@redhat.com>
3065
3066 * configure: Renegerate.
3067
3068 2016-04-20 Yao Qi <yao.qi@linaro.org>
3069
3070 * linux-aarch32-low.c: Include "arch/arm-linux.h".
3071 (arm_fill_gregset): Use ARM_CPSR_GREGNUM rather than magic
3072 number 16.
3073 (arm_store_gregset): Likewise.
3074
3075 2016-04-16 Walfred Tedeschi <walfred.tedeschi@intel.com>
3076
3077 * Makefile.in (clean): Add removal for i386-avx-mpx.c,
3078 i386-avx-mpx-linux.c, amd64-avx-mpx.c and amd64-avx-mpx-linux.c.
3079 (i386-avx-mpx.c, i386-avx-mpx-linux.c, amd64-avx-mpx.c)
3080 (amd64-avx-mpx-linux.c): New rules.
3081 (amd64-avx-mpx-linux-ipa.o, i386-avx-mpx-linux-ipa.o): New rule.
3082 * configure.srv (srv_i386_regobj): Add i386-avx-mpx.o.
3083 (srv_i386_linux_regobj): Add i386-avx-mpx-linux.o.
3084 (srv_amd64_regobj): Add amd64-avx-mpx.o.
3085 (srv_amd64_linux_regobj): Add amd64-avx-mpx-linux.o.
3086 (srv_i386_xmlfiles): Add i386/i386-avx-mpx.xml.
3087 (srv_amd64_xmlfiles): Add i386/amd64-avx-mpx.xml.
3088 (srv_i386_linux_xmlfiles): Add i386/i386-avx-mpx-linux.xml.
3089 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-mpx-linux.xml.
3090 (ipa_i386_linux_regobj): Add i386-avx-mpx-linux-ipa.o.
3091 (ipa_amd64_linux_regobj): Add amd64-avx-mpx-linux-ipa.o.
3092 * linux-x86-low.c (x86_linux_read_description): Add case for
3093 X86_XSTATE_AVX_MPX_MASK.
3094 (x86_get_ipa_tdesc_idx): Add cases for avx_mpx.
3095 (initialize_low_arch): Call init_registers_amd64_avx_mpx_linux and
3096 init_registers_i386_avx_mpx_linux.
3097 * linux-i386-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3098 (initialize_low_tracepoint): Call
3099 init_registers_i386_avx_mpx_linux.
3100 * linux-amd64-ipa.c (get_ipa_tdesc): Add case for avx_mpx.
3101 (initialize_low_tracepoint): Call
3102 init_registers_amd64_avx_mpx_linux.
3103 * linux-x86-tdesc.h (X86_TDESC_AVX_MPX): New enum value.
3104 (init_registers_amd64_avx_mpx_linux, tdesc_amd64_avx_mpx_linux)
3105 (init_registers_i386_avx_mpx_linux, tdesc_i386_avx_mpx_linux): New
3106 declarations.
3107
3108 2016-04-18 Pedro Alves <palves@redhat.com>
3109
3110 * configure: Regenerate.
3111
3112 2016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
3113
3114 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
3115 (aarch64_emit_sub): Likewise.
3116
3117 2016-04-12 Pedro Alves <palves@redhat.com>
3118
3119 * utils.c (prepare_to_throw_exception): Delete.
3120
3121 2016-04-05 Simon Marchi <simon.marchi@ericsson.com>
3122
3123 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
3124
3125 2016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
3126
3127 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
3128
3129 2016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
3130
3131 * linux-aarch64-ipa.c: Add <elf.h> include.
3132 * linux-ppc-ipa.c: Add <elf.h> include.
3133 * linux-s390-ipa.c: Add <elf.h> include.
3134
3135 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3136
3137 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
3138 (get_raw_reg_ptr): Likewise.
3139 (get_trace_state_variable_value_ptr): Likewise.
3140 (set_trace_state_variable_value_ptr): Likewise.
3141 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
3142 char *.
3143
3144 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3145 Marcin Kościelnicki <koriakin@0x04.net>
3146
3147 PR/17221
3148 * linux-ppc-low.c (emit_insns): New function.
3149 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
3150 (ppc_emit_prologue): New function.
3151 (ppc_emit_epilogue): New function.
3152 (ppc_emit_add): New function.
3153 (ppc_emit_sub): New function.
3154 (ppc_emit_mul): New function.
3155 (ppc_emit_lsh): New function.
3156 (ppc_emit_rsh_signed): New function.
3157 (ppc_emit_rsh_unsigned): New function.
3158 (ppc_emit_ext): New function.
3159 (ppc_emit_zero_ext): New function.
3160 (ppc_emit_log_not): New function.
3161 (ppc_emit_bit_and): New function.
3162 (ppc_emit_bit_or): New function.
3163 (ppc_emit_bit_xor): New function.
3164 (ppc_emit_bit_not): New function.
3165 (ppc_emit_equal): New function.
3166 (ppc_emit_less_signed): New function.
3167 (ppc_emit_less_unsigned): New function.
3168 (ppc_emit_ref): New function.
3169 (ppc_emit_const): New function.
3170 (ppc_emit_reg): New function.
3171 (ppc_emit_pop): New function.
3172 (ppc_emit_stack_flush): New function.
3173 (ppc_emit_swap): New function.
3174 (ppc_emit_stack_adjust): New function.
3175 (ppc_emit_call): New function.
3176 (ppc_emit_int_call_1): New function.
3177 (ppc_emit_void_call_2): New function.
3178 (ppc_emit_if_goto): New function.
3179 (ppc_emit_goto): New function.
3180 (ppc_emit_eq_goto): New function.
3181 (ppc_emit_ne_goto): New function.
3182 (ppc_emit_lt_goto): New function.
3183 (ppc_emit_le_goto): New function.
3184 (ppc_emit_gt_goto): New function.
3185 (ppc_emit_ge_goto): New function.
3186 (ppc_write_goto_address): New function.
3187 (ppc_emit_ops_impl): New static variable.
3188 (ppc64v1_emit_prologue): New function.
3189 (ppc64v2_emit_prologue): New function.
3190 (ppc64_emit_epilogue): New function.
3191 (ppc64_emit_add): New function.
3192 (ppc64_emit_sub): New function.
3193 (ppc64_emit_mul): New function.
3194 (ppc64_emit_lsh): New function.
3195 (ppc64_emit_rsh_signed): New function.
3196 (ppc64_emit_rsh_unsigned): New function.
3197 (ppc64_emit_ext): New function.
3198 (ppc64_emit_zero_ext): New function.
3199 (ppc64_emit_log_not): New function.
3200 (ppc64_emit_bit_and): New function.
3201 (ppc64_emit_bit_or): New function.
3202 (ppc64_emit_bit_xor): New function.
3203 (ppc64_emit_bit_not): New function.
3204 (ppc64_emit_equal): New function.
3205 (ppc64_emit_less_signed): New function.
3206 (ppc64_emit_less_unsigned): New function.
3207 (ppc64_emit_ref): New function.
3208 (ppc64_emit_const): New function.
3209 (ppc64v1_emit_reg): New function.
3210 (ppc64v2_emit_reg): New function.
3211 (ppc64_emit_pop): New function.
3212 (ppc64_emit_stack_flush): New function.
3213 (ppc64_emit_swap): New function.
3214 (ppc64v1_emit_call): New function.
3215 (ppc64v2_emit_call): New function.
3216 (ppc64v1_emit_int_call_1): New function.
3217 (ppc64v2_emit_int_call_1): New function.
3218 (ppc64v1_emit_void_call_2): New function.
3219 (ppc64v2_emit_void_call_2): New function.
3220 (ppc64_emit_if_goto): New function.
3221 (ppc64_emit_eq_goto): New function.
3222 (ppc64_emit_ne_goto): New function.
3223 (ppc64_emit_lt_goto): New function.
3224 (ppc64_emit_le_goto): New function.
3225 (ppc64_emit_gt_goto): New function.
3226 (ppc64_emit_ge_goto): New function.
3227 (ppc64v1_emit_ops_impl): New static variable.
3228 (ppc64v2_emit_ops_impl): New static variable.
3229 (ppc_emit_ops): New function.
3230 (linux_low_target): Wire in ppc_emit_ops.
3231
3232 2016-03-31 Wei-cheng Wang <cole945@gmail.com>
3233 Marcin Kościelnicki <koriakin@0x04.net>
3234
3235 PR/17221
3236 * Makefile.in: Add powerpc-*-ipa.o
3237 * configure.srv: Add ipa_obj for powerpc*-linux.
3238 * linux-ppc-ipa.c: New file.
3239 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
3240 includes.
3241 (PPC_FIELD): New macro.
3242 (PPC_SEXT): New macro.
3243 (PPC_OP6): New macro.
3244 (PPC_BO): New macro.
3245 (PPC_LI): New macro.
3246 (PPC_BD): New macro.
3247 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
3248 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
3249 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
3250 (ppc_get_thread_area): New function.
3251 (is_elfv2_inferior): New function.
3252 (gen_ds_form): New function.
3253 (GEN_STD): New macro.
3254 (GEN_STDU): New macro.
3255 (GEN_LD): New macro.
3256 (GEN_LDU): New macro.
3257 (gen_d_form): New function.
3258 (GEN_ADDI): New macro.
3259 (GEN_ADDIS): New macro.
3260 (GEN_LI): New macro.
3261 (GEN_LIS): New macro.
3262 (GEN_ORI): New macro.
3263 (GEN_ORIS): New macro.
3264 (GEN_LWZ): New macro.
3265 (GEN_STW): New macro.
3266 (GEN_STWU): New macro.
3267 (gen_xfx_form): New function.
3268 (GEN_MFSPR): New macro.
3269 (GEN_MTSPR): New macro.
3270 (GEN_MFCR): New macro.
3271 (GEN_MTCR): New macro.
3272 (GEN_SYNC): New macro.
3273 (GEN_LWSYNC): New macro.
3274 (gen_x_form): New function.
3275 (GEN_OR): New macro.
3276 (GEN_MR): New macro.
3277 (GEN_LWARX): New macro.
3278 (GEN_STWCX): New macro.
3279 (GEN_CMPW): New macro.
3280 (gen_md_form): New function.
3281 (GEN_RLDICL): New macro.
3282 (GEN_RLDICR): New macro.
3283 (gen_i_form): New function.
3284 (GEN_B): New macro.
3285 (GEN_BL): New macro.
3286 (gen_b_form): New function.
3287 (GEN_BNE): New macro.
3288 (GEN_LOAD): New macro.
3289 (GEN_STORE): New macro.
3290 (gen_limm): New function.
3291 (gen_atomic_xchg): New function.
3292 (gen_call): New function.
3293 (ppc_relocate_instruction): New function.
3294 (ppc_install_fast_tracepoint_jump_pad): New function.
3295 (ppc_get_min_fast_tracepoint_insn_len): New function.
3296 (ppc_get_ipa_tdesc_idx): New function.
3297 (the_low_target): Wire in the new functions.
3298 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
3299 tdescs.
3300 * linux-ppc-tdesc.h: New file.
3301
3302 2016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
3303
3304 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3305 (alloc_jump_pad_buffer): New function.
3306 * linux-amd64-ipa.c: Add <sys/mman.h> include.
3307 (alloc_jump_pad_buffer): New function.
3308 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
3309 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
3310 (alloc_jump_pad_buffer): New function.
3311 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
3312 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
3313 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
3314 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
3315
3316 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3317
3318 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
3319 * linux-amd64-ipa.c: Likewise.
3320 * linux-i386-ipa.c: Likewise.
3321 * linux-s390-ipa.c: Likewise.
3322 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
3323 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
3324 set_trace_state_variable_value_ptr.
3325 (struct ipa_sym_addresses): Likewise.
3326 (symbol_list): Likewise.
3327 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
3328 accessing gdb_collect directly.
3329 (gdb_collect_ptr_type): New typedef.
3330 (get_raw_reg_ptr_type): New typedef.
3331 (get_trace_state_variable_value_ptr_type): New typedef.
3332 (set_trace_state_variable_value_ptr_type): New typedef.
3333 (gdb_collect_ptr): New global.
3334 (get_raw_reg_ptr): New global.
3335 (get_trace_state_variable_value_ptr): New global.
3336 (set_trace_state_variable_value_ptr): New global.
3337 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
3338 accessing get_raw_reg directly.
3339 (get_get_tsv_func_addr): Likewise for
3340 get_trace_state_variable_value_ptr.
3341 (get_set_tsv_func_addr): Likewise for
3342 set_trace_state_variable_value_ptr.
3343 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
3344
3345 2016-03-30 Simon Marchi <simon.marchi@ericsson.com>
3346
3347 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
3348
3349 2016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
3350
3351 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
3352 packets.
3353 (relocate_instruction): Remove own_buf.
3354 * server.c (own_buf): Make global.
3355 (handle_v_requests): Make global.
3356 * server.h (own_buf): New declaration.
3357 (handle_v_requests): New prototype.
3358
3359 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3360
3361 PR 18377
3362 * linux-s390-low.c (add_insns): New function.
3363 (s390_emit_prologue): New function.
3364 (s390_emit_epilogue): New function.
3365 (s390_emit_add): New function.
3366 (s390_emit_sub): New function.
3367 (s390_emit_mul): New function.
3368 (s390_emit_lsh): New function.
3369 (s390_emit_rsh_signed): New function.
3370 (s390_emit_rsh_unsigned): New function.
3371 (s390_emit_ext): New function.
3372 (s390_emit_log_not): New function.
3373 (s390_emit_bit_and): New function.
3374 (s390_emit_bit_or): New function.
3375 (s390_emit_bit_xor): New function.
3376 (s390_emit_bit_not): New function.
3377 (s390_emit_equal): New function.
3378 (s390_emit_less_signed): New function.
3379 (s390_emit_less_unsigned): New function.
3380 (s390_emit_ref): New function.
3381 (s390_emit_if_goto): New function.
3382 (s390_emit_goto): New function.
3383 (s390_write_goto_address): New function.
3384 (s390_emit_litpool): New function.
3385 (s390_emit_const): New function.
3386 (s390_emit_call): New function.
3387 (s390_emit_reg): New function.
3388 (s390_emit_pop): New function.
3389 (s390_emit_stack_flush): New function.
3390 (s390_emit_zero_ext): New function.
3391 (s390_emit_swap): New function.
3392 (s390_emit_stack_adjust): New function.
3393 (s390_emit_set_r2): New function.
3394 (s390_emit_int_call_1): New function.
3395 (s390_emit_void_call_2): New function.
3396 (s390_emit_eq_goto): New function.
3397 (s390_emit_ne_goto): New function.
3398 (s390_emit_lt_goto): New function.
3399 (s390_emit_le_goto): New function.
3400 (s390_emit_gt_goto): New function.
3401 (s390_emit_ge_goto): New function.
3402 (s390x_emit_prologue): New function.
3403 (s390x_emit_epilogue): New function.
3404 (s390x_emit_add): New function.
3405 (s390x_emit_sub): New function.
3406 (s390x_emit_mul): New function.
3407 (s390x_emit_lsh): New function.
3408 (s390x_emit_rsh_signed): New function.
3409 (s390x_emit_rsh_unsigned): New function.
3410 (s390x_emit_ext): New function.
3411 (s390x_emit_log_not): New function.
3412 (s390x_emit_bit_and): New function.
3413 (s390x_emit_bit_or): New function.
3414 (s390x_emit_bit_xor): New function.
3415 (s390x_emit_bit_not): New function.
3416 (s390x_emit_equal): New function.
3417 (s390x_emit_less_signed): New function.
3418 (s390x_emit_less_unsigned): New function.
3419 (s390x_emit_ref): New function.
3420 (s390x_emit_if_goto): New function.
3421 (s390x_emit_const): New function.
3422 (s390x_emit_call): New function.
3423 (s390x_emit_reg): New function.
3424 (s390x_emit_pop): New function.
3425 (s390x_emit_stack_flush): New function.
3426 (s390x_emit_zero_ext): New function.
3427 (s390x_emit_swap): New function.
3428 (s390x_emit_stack_adjust): New function.
3429 (s390x_emit_int_call_1): New function.
3430 (s390x_emit_void_call_2): New function.
3431 (s390x_emit_eq_goto): New function.
3432 (s390x_emit_ne_goto): New function.
3433 (s390x_emit_lt_goto): New function.
3434 (s390x_emit_le_goto): New function.
3435 (s390x_emit_gt_goto): New function.
3436 (s390x_emit_ge_goto): New function.
3437 (s390_emit_ops): New function.
3438 (struct linux_target_ops): Fill in emit_ops hook.
3439
3440 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3441
3442 PR 18377
3443 * Makefile.in: Add s390 IPA files.
3444 * configure.srv: Build IPA for s390.
3445 * linux-s390-ipa.c: New file.
3446 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
3447 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
3448 (tdesc_s390_linux32): Likewise.
3449 (init_registers_s390_linux32v1): Likewise.
3450 (tdesc_s390_linux32v1): Likewise.
3451 (init_registers_s390_linux32v2): Likewise.
3452 (tdesc_s390_linux32v2): Likewise.
3453 (init_registers_s390_linux64): Likewise.
3454 (tdesc_s390_linux64): Likewise.
3455 (init_registers_s390_linux64v1): Likewise.
3456 (tdesc_s390_linux64v1): Likewise.
3457 (init_registers_s390_linux64v2): Likewise.
3458 (tdesc_s390_linux64v2): Likewise.
3459 (init_registers_s390_te_linux64): Likewise.
3460 (tdesc_s390_te_linux64): Likewise.
3461 (init_registers_s390_vx_linux64): Likewise.
3462 (tdesc_s390_vx_linux64): Likewise.
3463 (init_registers_s390_tevx_linux64): Likewise.
3464 (tdesc_s390_tevx_linux64): Likewise.
3465 (init_registers_s390x_linux64): Likewise.
3466 (tdesc_s390x_linux64): Likewise.
3467 (init_registers_s390x_linux64v1): Likewise.
3468 (tdesc_s390x_linux64v1): Likewise.
3469 (init_registers_s390x_linux64v2): Likewise.
3470 (tdesc_s390x_linux64v2): Likewise.
3471 (init_registers_s390x_te_linux64): Likewise.
3472 (tdesc_s390x_te_linux64): Likewise.
3473 (init_registers_s390x_vx_linux64): Likewise.
3474 (tdesc_s390x_vx_linux64): Likewise.
3475 (init_registers_s390x_tevx_linux64): Likewise.
3476 (tdesc_s390x_tevx_linux64): Likewise.
3477 (have_hwcap_s390_vx): New static variable.
3478 (s390_arch_setup): Fill have_hwcap_s390_vx.
3479 (s390_get_thread_area): New function.
3480 (s390_ft_entry_gpr_esa): New const.
3481 (s390_ft_entry_gpr_zarch): New const.
3482 (s390_ft_entry_misc): New const.
3483 (s390_ft_entry_fr): New const.
3484 (s390_ft_entry_vr): New const.
3485 (s390_ft_main_31): New const.
3486 (s390_ft_main_64): New const.
3487 (s390_ft_exit_fr): New const.
3488 (s390_ft_exit_vr): New const.
3489 (s390_ft_exit_misc): New const.
3490 (s390_ft_exit_gpr_esa): New const.
3491 (s390_ft_exit_gpr_zarch): New const.
3492 (append_insns): New function.
3493 (s390_relocate_instruction): New function.
3494 (s390_install_fast_tracepoint_jump_pad): New function.
3495 (s390_get_min_fast_tracepoint_insn_len): New function.
3496 (s390_get_ipa_tdesc_idx): New function.
3497 (struct linux_target_ops): Wire in the above functions.
3498 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
3499 * linux-s390-tdesc.h: New file.
3500
3501 2016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
3502
3503 * linux-s390-low.c (s390_supports_tracepoints): New function.
3504 (struct linux_target_ops): Fill supports_tracepoints hook.
3505
3506 2016-03-18 Yao Qi <yao.qi@linaro.org>
3507
3508 * linux-low.c (lwp_signal_can_be_delivered): New function.
3509 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
3510
3511 2016-03-18 Yao Qi <yao.qi@linaro.org>
3512
3513 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
3514 0 if signal is enqueued. Remove 'signal' from one debugging
3515 message. Move one debugging message to some lines below.
3516 Remove code setting 'signal' to 0.
3517
3518 2016-03-18 Yao Qi <yao.qi@linaro.org>
3519
3520 * linux-low.c (linux_low_filter_event): Remove redundant
3521 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
3522
3523 2016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
3524
3525 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
3526 (struct linux_target_ops): Wire in the above.
3527
3528 2016-03-03 Yao Qi <yao.qi@linaro.org>
3529
3530 * linux-low.c: Update comments to start_step_over.
3531
3532 2016-03-03 Yao Qi <yao.qi@linaro.org>
3533
3534 PR server/19736
3535 * linux-low.c (handle_extended_wait): Set child suspended
3536 if event_lwp->bp_reinsert isn't zero.
3537
3538 2016-03-02 Yao Qi <yao.qi@linaro.org>
3539
3540 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
3541 enqueue_pending_signal.
3542
3543 2016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
3544
3545 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
3546 is actually loaded.
3547
3548 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3549
3550 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
3551 (s390_regmap_3264) [!__s390x__]: New global.
3552 (s390_collect_ptrace_register): Skip map entries containing -1.
3553 (s390_supply_ptrace_register): Ditto.
3554 (s390_fill_gprs_high): New function.
3555 (s390_store_gprs_high): New function.
3556 (s390_regsets): Add NT_S390_HIGH_GPRS.
3557 (s390_get_hwcap): Enable on 31-bit.
3558 (have_hwcap_s390_high_gprs): Enable on 31-bit.
3559 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
3560 Detect NT_S390_HIGH_GPRS.
3561 (s390_usrregs_info_3264): Enable on 31-bit.
3562 (s390_regs_info): Enable regs_info_3264 on 31-bit.
3563 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
3564
3565 2016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
3566
3567 PR gdb/13808
3568 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
3569 * configure.srv: Ditto.
3570 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
3571 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
3572 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
3573 (init_registers_amd64_linux): Remove prototype.
3574 (tdesc_amd64_linux): Remove declaration.
3575 (get_ipa_tdesc): New function.
3576 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3577 initialize remaining tdescs.
3578 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
3579 (init_registers_i386_linux): Remove prototype.
3580 (tdesc_i386_linux): Remove declaration.
3581 (get_ipa_tdesc): New function.
3582 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
3583 initialize remaining tdescs.
3584 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
3585 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
3586 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
3587 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
3588 (x86_get_ipa_tdesc_idx): New function.
3589 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
3590 * linux-x86-tdesc.h: New file.
3591 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
3592 (target_get_ipa_tdesc_idx): New macro.
3593 * tracepoint.c (ipa_tdesc_idx): New macro.
3594 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
3595 (symbol_list): Add ipa_tdesc_idx.
3596 (cmd_qtstart): Write ipa_tdesc_idx in the target.
3597 (ipa_tdesc): Remove.
3598 (ipa_tdesc_idx): New variable.
3599 (get_context_regcache): Use get_ipa_tdesc.
3600 (gdb_collect): Ditto.
3601 (gdb_probe): Ditto.
3602 * tracepoint.h (get_ipa_tdesc): New prototype.
3603 (ipa_tdesc): Remove.
3604
3605 2016-02-24 Pedro Alves <palves@redhat.com>
3606
3607 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
3608 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
3609 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
3610 Factor out common code between the USE_SIGTRAP_SIGINFO and
3611 !USE_SIGTRAP_SIGINFO blocks.
3612 (linux_low_filter_event): Call save_stop_reason instead of
3613 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
3614 Update comments.
3615 (linux_wait_1): Update comments.
3616
3617 2016-02-24 Wei-cheng Wang <cole945@gmail.com>
3618
3619 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
3620 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
3621 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
3622 ppc_insert_point, ppc_remove_point.
3623
3624 2016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
3625
3626 * linux-s390-low.c (s390_supports_z_point_type): New function.
3627 (struct linux_target_ops): Wire s390_supports_z_point_type in.
3628
3629 2016-02-16 Yao Qi <yao.qi@linaro.org>
3630
3631 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
3632 PC. Get pc from regcache_read_pc.
3633
3634 2016-02-12 Yao Qi <yao.qi@linaro.org>
3635
3636 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
3637 or linux_get_pc_32bit.
3638 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
3639
3640 2016-02-12 Yao Qi <yao.qi@linaro.org>
3641
3642 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
3643 arm_linux_get_next_pcs_fixup.
3644
3645 2016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
3646
3647 * tracepoint.c (x_tracepoint_action_download): Change
3648 write_inferior_data_ptr to write_inferior_data_pointer.
3649 (cmd_qtstart): Likewise.
3650 (write_inferior_data_ptr): Remove.
3651 (download_agent_expr): Change write_inferior_data_ptr to
3652 write_inferior_data_pointer.
3653 (download_tracepoint_1): Likewise.
3654 (download_tracepoint): Likewise.
3655 (download_trace_state_variables): Likewise.
3656
3657 2016-02-11 Wei-cheng Wang <cole945@gmail.com>
3658 Marcin Kościelnicki <koriakin@0x04.net>
3659
3660 * tracepoint.c (struct tracepoint_action_ops): Remove.
3661 (struct tracepoint_action): Remove ops.
3662 (m_tracepoint_action_download, r_tracepoint_action_download)
3663 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
3664 size and offset accordingly.
3665 (m_tracepoint_action_ops, r_tracepoint_action_ops)
3666 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
3667 (tracepoint_action_send, tracepoint_action_download): New functions.
3668 Helpers for trace action handlers.
3669 (add_tracepoint_action): Remove setup actions ops.
3670 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
3671
3672 2016-02-10 Yao Qi <yao.qi@linaro.org>
3673
3674 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
3675
3676 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3677
3678 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
3679 to AC_OUTPUT.
3680 * configure: Regenerate.
3681
3682 2016-02-09 Simon Marchi <simon.marchi@ericsson.com>
3683
3684 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
3685 void * to gdb_byte *.
3686 * linux-low.c (siginfo_fixup): Likewise.
3687 (linux_xfer_siginfo): Likewise.
3688 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
3689 Likewise.
3690 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
3691
3692 2016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
3693
3694 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
3695 to srv_tgtobj.
3696 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
3697 to srv_tgtobj.
3698 * linux-x86-low.c [__x86_64__]: Include
3699 "nat/amd64-linux-siginfo.h".
3700 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
3701 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
3702 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
3703 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
3704 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
3705 (cpt_si_fd, si_timerid, si_overrun): Move from
3706 nat/amd64-linux-siginfo.c.
3707 * Makefile.in (amd64-linux-siginfo.o:): New rule.
3708
3709 2016-01-28 Simon Marchi <simon.marchi@ericsson.com>
3710
3711 * server.c (skip_to_semicolon): Remove.
3712 (process_point_options): Use strchrnul instead of
3713 skip_to_semicolon.
3714
3715 2016-01-26 Yao Qi <yao.qi@linaro.org>
3716
3717 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
3718 * linux-low.c (install_software_single_step_breakpoints): Don't
3719 call regcache_read_pc.
3720 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
3721 argument pc.
3722
3723 2016-01-26 Yao Qi <yao.qi@linaro.org>
3724
3725 * linux-low.c (install_software_single_step_breakpoints): Call
3726 regcache_read_pc instead of get_pc.
3727
3728 2016-01-26 Yao Qi <yao.qi@linaro.org>
3729
3730 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
3731 (unblock_async_io): Rename to ...
3732 (block_unblock_async_io): ... it. New function.
3733 (enable_async_io): Don't install SIGIO handler. Unblock it
3734 instead.
3735 (disable_async_io): Don't ignore SIGIO. Block it instead.
3736 (initialize_async_io): Install SIGIO handler. Don't call
3737 unblock_async_io.
3738
3739 2016-01-26 Yao Qi <yao.qi@linaro.org>
3740
3741 * remote-utils.c (getpkt): If the buffer isn't empty, and the
3742 first character is '\003', call *the_target->request_interrupt.
3743
3744 2016-01-25 Yao Qi <yao.qi@linaro.org>
3745
3746 * remote-utils.c (new_thread_notify): Remove.
3747 (dead_thread_notify): Likewise.
3748 * remote-utils.h (new_thread_notify): Remove declaration.
3749 (dead_thread_notify): Likewise.
3750
3751 2016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
3752
3753 * gdb.trace/pending.exp: Fix expected message on continue.
3754
3755 2016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
3756
3757 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
3758 it works properly on big-endian machines where sizeof (CORE_ADDR)
3759 != sizeof (void *).
3760
3761 2016-01-21 Pedro Alves <palves@redhat.com>
3762
3763 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
3764 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
3765 * configure: Regenerate.
3766
3767 2016-01-21 Yao Qi <yao.qi@linaro.org>
3768
3769 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
3770 is_thumb and set it according to CPSR saved on the stack.
3771 (get_next_pcs_syscall_next_pc): Pass is_thumb to
3772 arm_sigreturn_next_pc.
3773
3774 2016-01-18 Yao Qi <yao.qi@linaro.org>
3775
3776 * linux-low.c (linux_set_pc_64bit): New function.
3777 (linux_get_pc_64bit): New function.
3778 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
3779 Declare.
3780 * linux-sparc-low.c (debug_threads): Remove declaration.
3781 (sparc_get_pc): Remove.
3782 (the_low_target): Use linux_get_pc_64bit instead of
3783 sparc_get_pc.
3784 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
3785 (the_low_target): Use linux_get_pc_64bit and
3786 linux_set_pc_64bit.
3787
3788 2016-01-18 Yao Qi <yao.qi@linaro.org>
3789
3790 * linux-arm-low.c (debug_threads): Remove declaration.
3791 (arm_get_pc, arm_set_pc): Remove.
3792 (the_low_target): Use linux_get_pc_32bit and
3793 linux_set_pc_32bit.
3794 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
3795 (the_low_target): Use linux_get_pc_32bit and
3796 linux_set_pc_32bit.
3797 * linux-cris-low.c (debug_threads): Remove declaration.
3798 (cris_get_pc, cris_set_pc,): Remove.
3799 (the_low_target): Use linux_get_pc_32bit and
3800 linux_set_pc_32bit.
3801 * linux-crisv32-low.c (debug_threads): Remove declaration.
3802 (cris_get_pc, cris_set_pc): Remove.
3803 (the_low_target): Use linux_get_pc_32bit and
3804 linux_set_pc_32bit.
3805 * linux-low.c: Include inttypes.h.
3806 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
3807 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
3808 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
3809 (the_low_target): Use linux_get_pc_32bit and
3810 linux_set_pc_32bit.
3811 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
3812 (the_low_target): Use linux_get_pc_32bit and
3813 linux_set_pc_32bit.
3814 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
3815 (the_low_target): Use linux_get_pc_32bit and
3816 linux_set_pc_32bit.
3817 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
3818 (the_low_target): Use linux_get_pc_32bit and
3819 linux_set_pc_32bit.
3820 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
3821 (the_low_target): Use linux_get_pc_32bit and
3822 linux_set_pc_32bit.
3823
3824 2016-01-18 Gary Benson <gbenson@redhat.com>
3825
3826 * configure.ac (AC_FUNC_FORK): New check.
3827 * config.in: Regenerate.
3828 * configure: Likewise.
3829
3830 2016-01-14 Yao Qi <yao.qi@linaro.org>
3831
3832 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
3833 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
3834 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
3835 arm_get_next_pcs_ctor.
3836
3837 2016-01-12 Josh Stone <jistone@redhat.com>
3838 Philippe Waroquiers <philippe.waroquiers@skynet.be>
3839
3840 * inferiors.h: Include "gdb_vecs.h".
3841 (struct process_info): Add syscalls_to_catch.
3842 * inferiors.c (remove_process): Free syscalls_to_catch.
3843 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
3844 syscall_return stops.
3845 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
3846 * server.c (handle_general_set): Handle QCatchSyscalls.
3847 (handle_query): Report support for QCatchSyscalls.
3848 * target.h (struct target_ops): Add supports_catch_syscall.
3849 (target_supports_catch_syscall): New macro.
3850 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
3851 (struct lwp_info): Add syscall_state.
3852 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
3853 Maintain syscall_state and syscalls_to_catch across exec.
3854 (get_syscall_trapinfo): New function, proxy to the_low_target.
3855 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
3856 (linux_low_filter_event): Toggle syscall_state entry/return for
3857 syscall traps, and set it ignored for all others.
3858 (gdb_catching_syscalls_p): New function.
3859 (gdb_catch_this_syscall_p): New function.
3860 (linux_wait_1): Handle SYSCALL_SIGTRAP.
3861 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
3862 (linux_supports_catch_syscall): New function.
3863 (linux_target_ops): Install it.
3864 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
3865 (the_low_target): Install it.
3866
3867 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3868
3869 * acinclude.m4: Include new ../warning.m4 file.
3870 * configure: Regenerated.
3871 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
3872
3873 2016-01-12 Mike Frysinger <vapier@gentoo.org>
3874
3875 * ax.c (is_goto_target): Mark static.
3876 * linux-low.c (register_addr): Likewise.
3877 (linux_fetch_registers, linux_store_registers): Likewise.
3878 * mem-break.c (any_persistent_commands): Fix old prototype.
3879 (add_commands_to_breakpoint): Mark static.
3880 * regcache.c (find_register_by_name): Delete unused func.
3881 * remote-utils.c (hex_or_minus_one): Mark static.
3882 * server.c (monitor_show_help): Mark static.
3883 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
3884 handle_v_requests): Likewise.
3885
3886 2016-01-12 Pedro Alves <palves@redhat.com>
3887
3888 Remove use of the registered trademark symbol throughout.
3889
3890 2016-01-08 Yao Qi <yao.qi@linaro.org>
3891
3892 * remote-utils.c (getpkt): If c is '\003', call target hook
3893 request_interrupt.
3894
3895 2016-01-06 Yao Qi <yao.qi@linaro.org>
3896
3897 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
3898 linux-aarch32-low.c.
3899 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3900 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3901 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3902 (thumb2_breakpoint): Declare.
3903 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
3904 linux-aarch32-low.h.
3905 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3906 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
3907 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
3908
3909 2016-01-01 Joel Brobecker <brobecker@adacore.com>
3910
3911 * gdbreplay.c (gdbreplay_version): Change copyright year in
3912 version message.
3913 * server.c (gdbserver_version): Likewise.
3914
3915 2015-12-28 Patrick Palka <patrick@parcs.ath.cx>
3916
3917 * server.c (crc32_table): Delete.
3918 (crc32): Use libiberty's xcrc32 function.
3919
3920 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3921
3922 * lynx-low.c (lynx_delete_thread_callback): New function.
3923 (lynx_mourn): Properly delete our process and all of its
3924 threads. Remove call to clear_inferiors.
3925
3926 2015-12-22 Joel Brobecker <brobecker@adacore.com>
3927
3928 * target.c (thread_search_callback): Add check that
3929 the thread_stopped target callback is not NULL before
3930 calling it.
3931
3932 2015-12-21 Yao Qi <yao.qi@linaro.org>
3933
3934 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
3935 arm breakpoint.
3936
3937 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3938
3939 * server.c (handle_query): Call target_supports_software_single_step.
3940
3941 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3942
3943 * linux-low.c (single_step): New function.
3944 (linux_resume_one_lwp_throw): Call single_step.
3945 (start_step_over): Likewise.
3946
3947 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3948
3949 * Makefile.in (SFILES): Append arch/arm-linux.c,
3950 arch/arm-get-next-pcs.c.
3951 (arm-linux.o): New rule.
3952 (arm-get-next-pcs.o): New rule.
3953 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
3954 arm-linux.o.
3955 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
3956 to linux-aarch32-low.c.
3957 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3958 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3959 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3960 (thumb2_breakpoint_len): Likewise.
3961 (arm_is_thumb_mode): Make non-static.
3962 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
3963 from linux-aarch32-low.c.
3964 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
3965 (arm_breakpoint_len, thumb_breakpoint): Likewise.
3966 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
3967 (thumb2_breakpoint_len): Likewise.
3968 (arm_is_thumb_mode): New declaration.
3969 * linux-arm-low.c: Include arch/arm-linux.h
3970 aarch/arm-get-next-pcs.h, sys/syscall.h.
3971 (get_next_pcs_ops): New struct.
3972 (get_next_pcs_addr_bits_remove): New function.
3973 (get_next_pcs_is_thumb): New function.
3974 (get_next_pcs_read_memory_unsigned_integer): Likewise.
3975 (arm_sigreturn_next_pc): Likewise.
3976 (get_next_pcs_syscall_next_pc): Likewise.
3977 (arm_gdbserver_get_next_pcs): Likewise.
3978 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
3979 Initialize.
3980 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
3981 * server.h: Include gdb_vecs.h.
3982
3983 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3984
3985 * Makefile.in (SFILES): Append common/common-regcache.c.
3986 (OBS): Append common-regcache.o.
3987 (common-regcache.o): New rule.
3988 * regcache.c (init_register_cache): Initialize cache to
3989 REG_UNAVAILABLE.
3990 (regcache_raw_read_unsigned): New function.
3991 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
3992 register_status enum.
3993
3994 2015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
3995
3996 * linux-aarch64-low.c (the_low_targets): Rename
3997 breakpoint_reinsert_addr to get_next_pcs.
3998 * linux-arm-low.c (the_low_targets): Likewise.
3999 * linux-bfin-low.c (the_low_targets): Likewise.
4000 * linux-cris-low.c (the_low_targets): Likewise.
4001 * linux-crisv32-low.c (the_low_targets): Likewise.
4002 * linux-low.c (can_software_single_step): Likewise.
4003 (install_software_single_step_breakpoints): New function.
4004 (start_step_over): Use install_software_single_step_breakpoints.
4005 * linux-low.h: New CORE_ADDR vector.
4006 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
4007 get_next_pcs.
4008 * linux-mips-low.c (the_low_targets): Likewise.
4009 * linux-nios2-low.c (the_low_targets): Likewise.
4010 * linux-sparc-low.c (the_low_targets): Likewise.
4011
4012 2015-12-17 Pedro Alves <palves@redhat.com>
4013
4014 * linux-low.c (linux_kill_one_lwp): Remove references to
4015 LinuxThreads.
4016 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
4017 to 'kill'.
4018 (linux_init_signals): Delete.
4019 (initialize_low): Adjust.
4020 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
4021
4022 2015-12-16 Pedro Alves <palves@redhat.com>
4023
4024 * configure.ac (compiler warning flags): When testing a
4025 -Wno-foo option, check whether -Wfoo works instead.
4026 * configure: Regenerate.
4027
4028 2015-12-11 Don Breazeal <donb@codesourcery.com>
4029
4030 * server.c (process_serial_event): Don't exit from gdbserver
4031 in remote mode if there are still active inferiors.
4032
4033 2015-12-11 Yao Qi <yao.qi@linaro.org>
4034
4035 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
4036 arm_breakpoint_at if the process is 32-bit.
4037
4038 2015-12-11 Yao Qi <yao.qi@linaro.org>
4039
4040 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
4041 arm breakpoint.
4042
4043 2015-12-07 Yao Qi <yao.qi@linaro.org>
4044
4045 * configure.srv: Append arm.o to srv_tgtobj for
4046 aarch64*-*-linux* target.
4047 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
4048 from linux-arm-low.c.
4049 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
4050 (arm_breakpoint_len, thumb_breakpoint): Likewise.
4051 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
4052 (thumb2_breakpoint_len): Likewise.
4053 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
4054 (arm_breakpoint_kinds): Likewise.
4055 (arm_breakpoint_kind_from_pc): Likewise.
4056 (arm_sw_breakpoint_from_kind): Likewise.
4057 (arm_breakpoint_kind_from_current_state): Likewise.
4058 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
4059 (arm_sw_breakpoint_from_kind): Declare.
4060 (arm_breakpoint_kind_from_current_state): Declare.
4061 (arm_breakpoint_at): Declare.
4062 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
4063 arm_sw_breakpoint_from_kind if process is 32-bit.
4064 (aarch64_breakpoint_kind_from_pc): New function.
4065 (aarch64_breakpoint_kind_from_current_state): New function.
4066 (the_low_target): Initialize fields breakpoint_kind_from_pc
4067 and breakpoint_kind_from_current_state.
4068 * linux-arm-low.c (arm_breakpoint_kinds): Move to
4069 linux-aarch32-low.c.
4070 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
4071 (arm_breakpoint, arm_breakpoint_len): Likewise.
4072 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
4073 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
4074 (arm_is_thumb_mode): Likewise.
4075 (arm_breakpoint_at): Likewise.
4076 (arm_breakpoint_kind_from_pc): Likewise.
4077 (arm_sw_breakpoint_from_kind): Likewise.
4078 (arm_breakpoint_kind_from_current_state): Likewise.
4079
4080 Revert:
4081 2015-08-04 Yao Qi <yao.qi@linaro.org>
4082
4083 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
4084 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
4085 * server.c (extended_protocol): Remove "static".
4086 * server.h (extended_protocol): Declare it.
4087
4088 2015-12-04 Josh Stone <jistone@redhat.com>
4089
4090 * target.h (struct target_ops) <arch_setup>: Rename to ...
4091 (struct target_ops) <post_create_inferior>: ... this.
4092 (target_arch_setup): Rename to ...
4093 (target_post_create_inferior): ... this, calling post_create_inferior.
4094 * server.c (start_inferior): Update target_arch_setup calls to
4095 target_post_create_inferior.
4096 * linux-low.c (linux_low_ptrace_options): Forward declare.
4097 (linux_arch_setup): Update its comment for general use.
4098 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
4099 (struct linux_target_ops): Use linux_post_create_inferior.
4100 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
4101 to post_create_inferior.
4102 * nto-low.c (struct nto_target_ops): Likewise.
4103 * spu-low.c (struct spu_target_ops): Likewise.
4104 * win32-low.c (struct win32_target_ops): Likewise.
4105
4106 2015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
4107
4108 * linux-arm-low.c: Remove duplicate arch/arm.h include.
4109
4110 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4111
4112 * linux-arm-low.c (arm_reinsert_addr): Remove function.
4113 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
4114 * linux-cris-low.c (cris_reinsert_addr> Remove function.
4115 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4116 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
4117 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4118 * linux-mips-low.c (mips_reinsert_addr): Remove function.
4119 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4120 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
4121 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4122 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
4123 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
4124
4125 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4126
4127 * linux-low.c (linux_look_up_symbols): Don't call
4128 linux_supports_traceclone.
4129 * linux-low.h (thread_db_init): Remove use_events argument.
4130 * thread-db.c (thread_db_use_event): Remove global variable.
4131 (struct thread_db) <td_thr_event_enable_p>: Remove field.
4132 (struct thread_db) <td_create_bp>: Remove field.
4133 (thread_db_create_event): Remove function.
4134 (thread_db_enable_reporting): Likewise.
4135 (find_one_thread): Don't check for thread_db_use_events.
4136 (attach_thread): Likewise.
4137 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
4138 (try_thread_db_load_1): Don't check for thread_db_use_events.
4139 (thread_db_init): Remove use_events argument and thread events
4140 handling.
4141 (remove_thread_event_breakpoints): Remove function.
4142 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
4143
4144 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4145
4146 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
4147 New function.
4148 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4149 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
4150 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4151 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
4152 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
4153 Initialize.
4154 * linux-crisv32-low.c (cris_supports_hardware_single_step):
4155 New function.
4156 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4157 * linux-low.c (can_hardware_single_step): Use
4158 supports_hardware_single_step.
4159 (can_software_single_step): New function.
4160 (start_step_over): Call can_software_single_step.
4161 (linux_supports_hardware_single_step): New function.
4162 (struct target_ops) <supports_software_single_step>: Initialize.
4163 * linux-low.h (struct linux_target_ops)
4164 <supports_hardware_single_step>: Initialize.
4165 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
4166 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4167 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
4168 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
4169 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
4170 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4171 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
4172 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4173 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
4174 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
4175 Initialize.
4176 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
4177 (struct linux_target_ops) <tile_supports_hardware_single_step>:
4178 Initialize.
4179 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
4180 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4181 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
4182 New function.
4183 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
4184 * target.h (struct target_ops): <supports_software_single_step>:
4185 New field.
4186 (target_supports_software_single_step): New macro.
4187
4188 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4189
4190 * linux-low.c (linux_wait_1): Fix pc advance condition.
4191 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
4192 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
4193
4194 2015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
4195
4196 * linux-arm-low.c (arm_is_thumb_mode): New function.
4197 (arm_breakpoint_at): Use arm_is_thumb_mode.
4198 (arm_breakpoint_kind_from_current_state): New function.
4199 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
4200 Initialize.
4201 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
4202 (linux_breakpoint_kind_from_current_state): New function.
4203 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
4204 * linux-low.h (struct linux_target_ops)
4205 <breakpoint_kind_from_current_state>: New field.
4206 * target.h (struct target_ops): Likewise.
4207 (target_breakpoint_kind_from_current_state): New macro.
4208
4209 2015-11-30 Pedro Alves <palves@redhat.com>
4210
4211 * linux-low.c (linux_resume): Wake up the event loop before
4212 returning.
4213
4214 2015-11-30 Pedro Alves <palves@redhat.com>
4215
4216 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
4217 check.
4218 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
4219 to -1.
4220 * target.c (struct thread_search): New structure.
4221 (thread_search_callback): New function.
4222 (prev_general_thread): New global.
4223 (prepare_to_access_memory, done_accessing_memory): New functions.
4224 * target.h (prepare_to_access_memory, done_accessing_memory):
4225 Replace macros with function declarations.
4226
4227 2015-11-30 Pedro Alves <palves@redhat.com>
4228
4229 PR 14618
4230 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
4231 report TARGET_WAITKIND_NO_RESUMED.
4232 * remote-utils.c (prepare_resume_reply): Handle
4233 TARGET_WAITKIND_NO_RESUMED.
4234 * server.c (report_no_resumed): New global.
4235 (handle_query) <qSupported>: Handle "no-resumed+". Report
4236 "no-resumed+" support.
4237 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
4238 return error if the client doesn't support no-resumed events.
4239 (push_stop_notification): New function.
4240 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
4241 events if the client supports them.
4242
4243 2015-11-30 Pedro Alves <palves@redhat.com>
4244
4245 * linux-low.c (thread_still_has_status_pending_p): Don't check
4246 vCont;t here.
4247 (lwp_resumed): New function.
4248 (status_pending_p_callback): Return early if the LWP is not
4249 supposed to be resumed.
4250
4251 2015-11-30 Pedro Alves <palves@redhat.com>
4252
4253 * linux-low.c (handle_extended_wait): Assert that the LWP's
4254 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
4255 thread create events, leave the new child's status pending.
4256 (linux_low_filter_event): If GDB wants to hear about thread exit
4257 events, leave the LWP marked dead and don't delete it.
4258 (linux_wait_for_event_filtered): Don't check for thread exit.
4259 (filter_exit_event): New function.
4260 (linux_wait_1): Use it, when returning an exit event.
4261 (linux_resume_one_lwp_throw): Assert that the LWP's
4262 waitstatus is TARGET_WAITKIND_IGNORE.
4263 * remote-utils.c (prepare_resume_reply): Handle
4264 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
4265 * server.c (report_thread_events): New global.
4266 (handle_general_set): Handle QThreadEvents.
4267 (handle_query) <qSupported>: Handle and report QThreadEvents+;
4268 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
4269 TARGET_WAITKIND_THREAD_EXITED.
4270 * server.h (report_thread_events): Declare.
4271
4272 2015-11-30 Pedro Alves <palves@redhat.com>
4273
4274 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
4275 the thread's last_resume_kind was resume_stop.
4276
4277 2015-11-30 Pedro Alves <palves@redhat.com>
4278
4279 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
4280 before returning.
4281
4282 2015-11-30 Pedro Alves <palves@redhat.com>
4283
4284 * server.c (handle_v_requests): Handle vCtrlC.
4285
4286 2015-11-30 Pedro Alves <palves@redhat.com>
4287
4288 * gdbthread.h (find_any_thread_of_pid): Declare.
4289 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
4290 functions.
4291 * server.c (handle_query): If current_thread is NULL, look for
4292 another thread of the selected process.
4293
4294 2015-11-26 Daniel Colascione <dancol@dancol.org>
4295 Simon Marchi <simon.marchi@ericsson.com>
4296
4297 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
4298 * server.c (handle_qxfer_threads_worker): Refactor to include thread
4299 name in reply.
4300 * target.h (struct target_ops) <thread_name>: New field.
4301 (target_thread_name): New macro.
4302
4303 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4304
4305 * regcache.h (regcache_invalidate_pid): Add declaration.
4306 * regcache.c (regcache_invalidate_pid): New function, extracted
4307 from regcache_invalidate.
4308 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
4309 Add trivial documentation comment.
4310 * lynx-low.c: Use regcache_invalidate_pid instead of
4311 regcache_invalidate.
4312
4313 2015-11-23 Joel Brobecker <brobecker@adacore.com>
4314
4315 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
4316 and Elf64_auxv_t if the target is Android.
4317
4318 2015-11-22 Doug Evans <xdje42@gmail.com>
4319
4320 * target.h: #include <sys/types.h>.
4321
4322 2015-11-19 Pedro Alves <palves@redhat.com>
4323
4324 * linux-low.c (linux_process_qsupported): Change prototype.
4325 Adjust.
4326 * linux-low.h (struct linux_target_ops) <process_qsupported>:
4327 Change prototype.
4328 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
4329 and adjust to loop over all features.
4330 * server.c (handle_query) <qSupported>: Adjust to call
4331 target_process_qsupported once, passing it a vector of unprocessed
4332 features.
4333 * target.h (struct target_ops) <process_qsupported>: Change
4334 prototype.
4335 (target_process_qsupported): Adjust.
4336
4337 2015-11-19 Pedro Alves <palves@redhat.com>
4338
4339 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4340 mode.
4341 * configure: Regenerate.
4342
4343 2015-11-19 Pedro Alves <palves@redhat.com>
4344
4345 * configure: Regenerate.
4346
4347 2015-11-19 Yao Qi <yao.qi@linaro.org>
4348
4349 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
4350 type to uint32_t.
4351
4352 2015-11-19 Yao Qi <yao.qi@linaro.org>
4353
4354 * linux-aarch64-low.c (enum aarch64_operand_type): New.
4355 (struct aarch64_operand): Move enum out.
4356
4357 2015-11-19 Yao Qi <yao.qi@linaro.org>
4358
4359 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4360 struct user_fpsimd_state *.
4361 (aarch64_store_fpregset): Likewise.
4362
4363 2015-11-19 Yao Qi <yao.qi@linaro.org>
4364
4365 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
4366 struct user_pt_regs *.
4367 (aarch64_store_gregset): Likewise.
4368
4369 2015-11-18 Pedro Alves <palves@redhat.com>
4370
4371 * Makefile.in (all_object_files): Add $IPA_OBJS.
4372
4373 2015-11-17 Pedro Alves <palves@redhat.com>
4374
4375 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4376 GDB_SIGNAL_0 and gdb_signal_to_string.
4377
4378 2015-11-17 Pedro Alves <palves@redhat.com>
4379
4380 * win32-low.c (handle_output_debug_string): Remove parameter.
4381 (win32_kill): Remove our_status local and adjust call to
4382 handle_output_debug_string.
4383 (get_child_debug_event): Adjust call to
4384 handle_output_debug_string.
4385
4386 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4387
4388 * linux-mips-low.c (mips_fill_gregset): Add cast.
4389 (mips_store_gregset): Likewise.
4390 (mips_fill_fpregset): Likewise.
4391 (mips_store_fpregset): Likewise.
4392
4393 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4394
4395 * linux-mips-low.c (mips_add_watchpoint): Rename private to
4396 priv.
4397
4398 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4399
4400 * linux-mips-low.c (mips_linux_new_thread): Change type of
4401 watch_type to enum target_hw_bp_type.
4402
4403 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4404
4405 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
4406 Change return type to arm_hwbp_type.
4407
4408 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4409
4410 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
4411 (arm_store_gregset): Likewise.
4412 * linux-arm-low.c (arm_get_hwcap): Likewise.
4413 (arm_read_description): Likewise.
4414
4415 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4416
4417 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
4418
4419 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4420
4421 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
4422 (ppc_fill_vsxregset): Likewise.
4423 (ppc_store_vsxregset): Likewise.
4424 (ppc_fill_vrregset): Likewise.
4425 (ppc_store_vrregset): Likewise.
4426 (ppc_fill_evrregset): Likewise.
4427 (ppc_store_evrregset): Likewise.
4428
4429 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
4430
4431 * linux-ppc-low.c (ppc_usrregs_info): Remove
4432 forward-declaration.
4433 (ppc_arch_setup): Move lower in file.
4434
4435 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
4436
4437 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
4438 (ps_pdwrite): Likewise.
4439
4440 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
4441
4442 * linux-arm-low.c (arm_new_thread): Move pointer dereference
4443 to after assert checks.
4444
4445 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
4446
4447 * proc-service.c (ps_pdread): Add/adjust casts.
4448 (ps_pdwrite): Add/adjust casts.
4449
4450 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4451
4452 * server.c (handle_search_memory_1): Cast return value of
4453 memmem.
4454
4455 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
4456
4457 * server.c (write_qxfer_response): Change type of data to
4458 gdb_byte *.
4459
4460 2015-10-29 Pedro Alves <palves@redhat.com>
4461
4462 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
4463
4464 2015-10-29 Pedro Alves <palves@redhat.com>
4465
4466 * tracepoint.c (clear_installed_tracepoints): Add casts.
4467
4468 2015-10-29 Pedro Alves <palves@redhat.com>
4469
4470 * server.c (handle_v_cont, process_serial_event): Add enum
4471 gdb_signal casts to signal parsing code.
4472
4473 2015-10-29 Pedro Alves <palves@redhat.com>
4474
4475 * linux-low.h (NULL_REGSET): Define.
4476 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4477 * linux-arm-low.c (arm_regsets): Likewise.
4478 * linux-crisv32-low.c (cris_regsets): Likewise.
4479 * linux-m68k-low.c (m68k_regsets): Likewise.
4480 * linux-mips-low.c (mips_regsets): Likewise.
4481 * linux-nios2-low.c (nios2_regsets): Likewise.
4482 * linux-ppc-low.c (ppc_regsets): Likewise.
4483 * linux-s390-low.c (s390_regsets): Likewise.
4484 * linux-sh-low.c (sh_regsets): Likewise.
4485 * linux-sparc-low.c (sparc_regsets): Likewise.
4486 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4487 * linux-tile-low.c (tile_regsets): Likewise.
4488 * linux-x86-low.c (x86_regsets): Likewise.
4489 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4490
4491 2015-10-29 Pedro Alves <palves@redhat.com>
4492
4493 * linux-low.h (NULL_REGSET): Define.
4494 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
4495 * linux-arm-low.c (arm_regsets): Likewise.
4496 * linux-crisv32-low.c (cris_regsets): Likewise.
4497 * linux-m68k-low.c (m68k_regsets): Likewise.
4498 * linux-mips-low.c (mips_regsets): Likewise.
4499 * linux-nios2-low.c (nios2_regsets): Likewise.
4500 * linux-ppc-low.c (ppc_regsets): Likewise.
4501 * linux-s390-low.c (s390_regsets): Likewise.
4502 * linux-sh-low.c (sh_regsets): Likewise.
4503 * linux-sparc-low.c (sparc_regsets): Likewise.
4504 * linux-tic6x-low.c (tic6x_regsets): Likewise.
4505 * linux-tile-low.c (tile_regsets): Likewise.
4506 * linux-x86-low.c (x86_regsets): Likewise.
4507 * linux-xtensa-low.c (xtensa_regsets): Likewise.
4508
4509 2015-10-26 Doug Evans <dje@google.com>
4510
4511 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
4512
4513 2015-10-26 Doug Evans <dje@google.com>
4514
4515 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
4516
4517 2015-10-26 Doug Evans <dje@google.com>
4518
4519 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
4520 for debug_printf.
4521 (attach_thread, find_new_threads_callback): Ditto.
4522
4523 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4524
4525 * mem-break.h (set_breakpoint_data): Remove.
4526
4527 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4528
4529 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
4530 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4531 (initialize_low): Remove set_breakpoint_data call.
4532 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
4533 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
4534 (initialize_low): Remove set_breakpoint_data call.
4535 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
4536 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
4537 (initialize_low): Remove set_breakpoint_data call.
4538
4539 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
4540
4541 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
4542 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
4543 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
4544 * target.h (target_breakpoint_kind_from_pc): New macro.
4545
4546 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
4547
4548 * linux-low.c (default_breakpoint_kind_from_pc): New function.
4549 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
4550 the default breakpoint kind.
4551
4552 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4553
4554 * linux-arm-low.c (arm_supports_z_point_type): Add software
4555 breakpoint support.
4556
4557 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4558
4559 * linux-arm-low.c: Refactor breakpoint definitions.
4560 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
4561 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
4562
4563 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4564
4565 * Makefile.in: Add arm.c/o.
4566 * configure.srv: Likewise.
4567 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
4568 (arm_breakpoint_kind_from_pc): New function.
4569 (arm_sw_breakpoint_from_kind): Return proper kind.
4570 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
4571
4572 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4573
4574 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
4575 removal.
4576 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
4577 (struct raw_breakpoint) <size>: Remove.
4578 (struct raw_breakpoint) <kind>: Add.
4579 (bp_size): New function.
4580 (bp_opcode): Likewise.
4581 (find_raw_breakpoint_at): Adjust for kind.
4582 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
4583 (remove_memory_breakpoint): Adjust for kind call bp_size.
4584 (set_raw_breakpoint_at): Adjust for kind.
4585 (set_breakpoint): Likewise.
4586 (set_breakpoint_at): Call breakpoint_kind_from_pc.
4587 (delete_raw_breakpoint): Adjust for kind.
4588 (delete_breakpoint): Likewise.
4589 (find_gdb_breakpoint): Likewise.
4590 (set_gdb_breakpoint_1): Likewise.
4591 (set_gdb_breakpoint): Likewise.
4592 (delete_gdb_breakpoint_1): Likewise.
4593 (delete_gdb_breakpoint): Likewise.
4594 (uninsert_raw_breakpoint): Likewise.
4595 (reinsert_raw_breakpoint): Likewise.
4596 (set_breakpoint_data): Remove.
4597 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
4598 (check_mem_read): Adjust for kind call bp_size.
4599 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
4600 (clone_one_breakpoint): Adjust for kind.
4601 * mem-break.h (set_gdb_breakpoint): Likewise.
4602 (delete_gdb_breakpoint): Likewise.
4603 * server.c (process_serial_event): Likewise.
4604
4605 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4606
4607 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
4608 (struct linux_target_ops) <breakpoint>: Remove.
4609 (struct linux_target_ops) <breakpoint_len>: Remove.
4610 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4611 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4612 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
4613 (arm_sw_breakpoint_from_kind): New function.
4614 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
4615 (struct linux_target_ops) <breakpoint>: Remove.
4616 (struct linux_target_ops) <breakpoint_len>: Remove.
4617 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4618 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4619 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
4620 (struct linux_target_ops) <breakpoint>: Remove.
4621 (struct linux_target_ops) <breakpoint_len>: Remove.
4622 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4623 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4624 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
4625 (struct linux_target_ops) <breakpoint>: Remove.
4626 (struct linux_target_ops) <breakpoint_len>: Remove.
4627 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4628 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4629 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
4630 and sw_breakpoint_from_kind to increment the pc.
4631 (linux_breakpoint_kind_from_pc): New function.
4632 (linux_sw_breakpoint_from_kind): New function.
4633 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
4634 (initialize_low): Call breakpoint_kind_from_pc and
4635 sw_breakpoint_from_kind to replace breakpoint_data/len.
4636 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
4637 New field.
4638 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
4639 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
4640 (struct linux_target_ops) <breakpoint>: Remove.
4641 (struct linux_target_ops) <breakpoint_len>: Remove.
4642 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4643 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4644 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
4645 (struct linux_target_ops) <breakpoint>: Remove.
4646 (struct linux_target_ops) <breakpoint_len>: Remove.
4647 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4648 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4649 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
4650 (struct linux_target_ops) <breakpoint>: Remove.
4651 (struct linux_target_ops) <breakpoint_len>: Remove.
4652 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4653 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4654 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
4655 (struct linux_target_ops) <breakpoint>: Remove.
4656 (struct linux_target_ops) <breakpoint_len>: Remove.
4657 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4658 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4659 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
4660 (struct linux_target_ops) <breakpoint>: Remove.
4661 (struct linux_target_ops) <breakpoint_len>: Remove.
4662 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4663 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4664 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
4665 (struct linux_target_ops) <breakpoint>: Remove.
4666 (struct linux_target_ops) <breakpoint_len>: Remove.
4667 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4668 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4669 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
4670 (struct linux_target_ops) <breakpoint>: Remove.
4671 (struct linux_target_ops) <breakpoint_len>: Remove.
4672 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4673 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4674 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
4675 (struct linux_target_ops) <breakpoint>: Remove.
4676 (struct linux_target_ops) <breakpoint_len>: Remove.
4677 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4678 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4679 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
4680 (struct linux_target_ops) <breakpoint>: Remove.
4681 (struct linux_target_ops) <breakpoint_len>: Remove.
4682 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4683 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4684 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
4685 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
4686 (struct linux_target_ops) <breakpoint>: Remove.
4687 (struct linux_target_ops) <breakpoint_len>: Remove.
4688 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
4689 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
4690 * linux-xtensa-low.c (xtensa_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
4696 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
4697
4698 * linux-cris-low.c (cris_get_pc): Remove void arg.
4699
4700 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4701
4702 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
4703 variable name.
4704
4705 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
4706
4707 * inferiors.c (thread_pid_matches_callback): New function.
4708 (find_thread_process): New function.
4709 (remove_thread): Reset current_thread.
4710 (remove_process): Assert threads have been removed first.
4711
4712 2015-10-15 Yao Qi <yao.qi@linaro.org>
4713
4714 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
4715 if it is 3.
4716 (aarch64_remove_point): Likewise.
4717 * regcache.c (regcache_register_size): New function.
4718
4719 2015-10-12 Yao Qi <yao.qi@linaro.org>
4720
4721 * linux-aarch64-low.c: Update all callers as emit_load_store
4722 is renamed to aarch64_emit_load_store.
4723
4724 2015-10-12 Yao Qi <yao.qi@linaro.org>
4725
4726 * linux-aarch64-low.c: Update all callers of function renaming
4727 from emit_insn to aarch64_emit_insn.
4728
4729 2015-10-12 Yao Qi <yao.qi@linaro.org>
4730
4731 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
4732 arch/aarch64-insn.h.
4733 (struct aarch64_memory_operand): Likewise.
4734 (ENCODE): Likewise.
4735 (emit_insn): Move to arch/aarch64-insn.c.
4736 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
4737 (emit_load_store): Move to arch/aarch64-insn.c.
4738 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
4739 (can_encode_int32): Remove.
4740
4741 2015-10-12 Yao Qi <yao.qi@linaro.org>
4742
4743 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4744 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
4745 (aarch64_relocate_instruction): Likewise.
4746 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
4747 (struct aarch64_insn_visitor): Likewise.
4748
4749 2015-10-12 Yao Qi <yao.qi@linaro.org>
4750
4751 * linux-aarch64-low.c (struct aarch64_insn_data): New.
4752 (struct aarch64_insn_visitor): New.
4753 (struct aarch64_insn_relocation_data): New.
4754 (aarch64_ftrace_insn_reloc_b): New function.
4755 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
4756 (aarch64_ftrace_insn_reloc_cb): Likewise.
4757 (aarch64_ftrace_insn_reloc_tb): Likewise.
4758 (aarch64_ftrace_insn_reloc_adr): Likewise.
4759 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
4760 (aarch64_ftrace_insn_reloc_others): Likewise.
4761 (visitor): New.
4762 (aarch64_relocate_instruction): Use visitor.
4763
4764 2015-10-12 Yao Qi <yao.qi@linaro.org>
4765
4766 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
4767 int. Add argument buf.
4768 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
4769 aarch64_relocate_instruction.
4770
4771 2015-10-12 Yao Qi <yao.qi@linaro.org>
4772
4773 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
4774 argument insn. Remove local variable insn. Don't call
4775 target_read_uint32.
4776 (aarch64_install_fast_tracepoint_jump_pad): Call
4777 target_read_uint32.
4778
4779 2015-09-30 Yao Qi <yao.qi@linaro.org>
4780
4781 * linux-aarch64-low.c (emit_movk): Shorten a long line.
4782 (emit_load_store_pair): Likewise.
4783
4784 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4785
4786 * dll.c (match_dll): Add cast(s).
4787 (unloaded_dll): Likewise.
4788 * linux-low.c (second_thread_of_pid_p): Likewise.
4789 (delete_lwp_callback): Likewise.
4790 (count_events_callback): Likewise.
4791 (select_event_lwp_callback): Likewise.
4792 (linux_set_resume_request): Likewise.
4793 * server.c (accumulate_file_name_length): Likewise.
4794 (emit_dll_description): Likewise.
4795 (handle_qxfer_threads_worker): Likewise.
4796 (visit_actioned_threads): Likewise.
4797 * thread-db.c (any_thread_of): Likewise.
4798 * tracepoint.c (same_process_p): Likewise.
4799 (match_blocktype): Likewise.
4800 (build_traceframe_info_xml): Likewise.
4801
4802 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
4803
4804 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4805 assignment.
4806 (gdb_unparse_agent_expr): Likewise.
4807 * hostio.c (require_data): Likewise.
4808 (handle_pread): Likewise.
4809 * linux-low.c (disable_regset): Likewise.
4810 (fetch_register): Likewise.
4811 (store_register): Likewise.
4812 (get_dynamic): Likewise.
4813 (linux_qxfer_libraries_svr4): Likewise.
4814 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
4815 (set_fast_tracepoint_jump): Likewise.
4816 (uninsert_fast_tracepoint_jumps_at): Likewise.
4817 (reinsert_fast_tracepoint_jumps_at): Likewise.
4818 (validate_inserted_breakpoint): Likewise.
4819 (clone_agent_expr): Likewise.
4820 * regcache.c (init_register_cache): Likewise.
4821 * remote-utils.c (putpkt_binary_1): Likewise.
4822 (decode_M_packet): Likewise.
4823 (decode_X_packet): Likewise.
4824 (look_up_one_symbol): Likewise.
4825 (relocate_instruction): Likewise.
4826 (monitor_output): Likewise.
4827 * server.c (handle_search_memory): Likewise.
4828 (handle_qxfer_exec_file): Likewise.
4829 (handle_qxfer_libraries): Likewise.
4830 (handle_qxfer): Likewise.
4831 (handle_query): Likewise.
4832 (handle_v_cont): Likewise.
4833 (handle_v_run): Likewise.
4834 (captured_main): Likewise.
4835 * target.c (write_inferior_memory): Likewise.
4836 * thread-db.c (try_thread_db_load_from_dir): Likewise.
4837 * tracepoint.c (init_trace_buffer): Likewise.
4838 (add_tracepoint_action): Likewise.
4839 (add_traceframe): Likewise.
4840 (add_traceframe_block): Likewise.
4841 (cmd_qtdpsrc): Likewise.
4842 (cmd_qtdv): Likewise.
4843 (cmd_qtstatus): Likewise.
4844 (response_source): Likewise.
4845 (response_tsv): Likewise.
4846 (cmd_qtnotes): Likewise.
4847 (gdb_collect): Likewise.
4848 (initialize_tracepoint): Likewise.
4849
4850 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4851
4852 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4853 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
4854 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
4855 <NOP>: New.
4856 (enum aarch64_condition_codes): New enum.
4857 (w0): New static global.
4858 (fp): Likewise.
4859 (lr): Likewise.
4860 (struct aarch64_memory_operand) <type>: New
4861 MEMORY_OPERAND_POSTINDEX type.
4862 (postindex_memory_operand): New helper function.
4863 (emit_ret): New function.
4864 (emit_load_store_pair): New function, factored out of emit_stp
4865 with support for MEMORY_OPERAND_POSTINDEX.
4866 (emit_stp): Rewrite using emit_load_store_pair.
4867 (emit_ldp): New function.
4868 (emit_load_store): Likewise.
4869 (emit_ldr): Mention post-index instruction in comment.
4870 (emit_ldrh): New function.
4871 (emit_ldrb): New function.
4872 (emit_ldrsw): Mention post-index instruction in comment.
4873 (emit_str): Likewise.
4874 (emit_subs): New function.
4875 (emit_cmp): Likewise.
4876 (emit_and): Likewise.
4877 (emit_orr): Likewise.
4878 (emit_orn): Likewise.
4879 (emit_eor): Likewise.
4880 (emit_mvn): Likewise.
4881 (emit_lslv): Likewise.
4882 (emit_lsrv): Likewise.
4883 (emit_asrv): Likewise.
4884 (emit_mul): Likewise.
4885 (emit_sbfm): Likewise.
4886 (emit_sbfx): Likewise.
4887 (emit_ubfm): Likewise.
4888 (emit_ubfx): Likewise.
4889 (emit_csinc): Likewise.
4890 (emit_cset): Likewise.
4891 (emit_nop): Likewise.
4892 (emit_ops_insns): New helper function.
4893 (emit_pop): Likewise.
4894 (emit_push): Likewise.
4895 (aarch64_emit_prologue): New function.
4896 (aarch64_emit_epilogue): Likewise.
4897 (aarch64_emit_add): Likewise.
4898 (aarch64_emit_sub): Likewise.
4899 (aarch64_emit_mul): Likewise.
4900 (aarch64_emit_lsh): Likewise.
4901 (aarch64_emit_rsh_signed): Likewise.
4902 (aarch64_emit_rsh_unsigned): Likewise.
4903 (aarch64_emit_ext): Likewise.
4904 (aarch64_emit_log_not): Likewise.
4905 (aarch64_emit_bit_and): Likewise.
4906 (aarch64_emit_bit_or): Likewise.
4907 (aarch64_emit_bit_xor): Likewise.
4908 (aarch64_emit_bit_not): Likewise.
4909 (aarch64_emit_equal): Likewise.
4910 (aarch64_emit_less_signed): Likewise.
4911 (aarch64_emit_less_unsigned): Likewise.
4912 (aarch64_emit_ref): Likewise.
4913 (aarch64_emit_if_goto): Likewise.
4914 (aarch64_emit_goto): Likewise.
4915 (aarch64_write_goto_address): Likewise.
4916 (aarch64_emit_const): Likewise.
4917 (aarch64_emit_call): Likewise.
4918 (aarch64_emit_reg): Likewise.
4919 (aarch64_emit_pop): Likewise.
4920 (aarch64_emit_stack_flush): Likewise.
4921 (aarch64_emit_zero_ext): Likewise.
4922 (aarch64_emit_swap): Likewise.
4923 (aarch64_emit_stack_adjust): Likewise.
4924 (aarch64_emit_int_call_1): Likewise.
4925 (aarch64_emit_void_call_2): Likewise.
4926 (aarch64_emit_eq_goto): Likewise.
4927 (aarch64_emit_ne_goto): Likewise.
4928 (aarch64_emit_lt_goto): Likewise.
4929 (aarch64_emit_le_goto): Likewise.
4930 (aarch64_emit_gt_goto): Likewise.
4931 (aarch64_emit_ge_got): Likewise.
4932 (aarch64_emit_ops_impl): New static global variable.
4933 (aarch64_emit_ops): New target function, return
4934 &aarch64_emit_ops_impl.
4935 (struct linux_target_ops): Install it.
4936
4937 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
4938
4939 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
4940 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
4941 aarch64-ipa.o.
4942 * linux-aarch64-ipa.c: New file.
4943 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
4944 and endian.h.
4945 (aarch64_get_thread_area): New target method.
4946 (extract_signed_bitfield): New helper function.
4947 (aarch64_decode_ldr_literal): New function.
4948 (enum aarch64_opcodes): New enum.
4949 (struct aarch64_register): New struct.
4950 (struct aarch64_operand): New struct.
4951 (x0): New static global.
4952 (x1): Likewise.
4953 (x2): Likewise.
4954 (x3): Likewise.
4955 (x4): Likewise.
4956 (w2): Likewise.
4957 (ip0): Likewise.
4958 (sp): Likewise.
4959 (xzr): Likewise.
4960 (aarch64_register): New helper function.
4961 (register_operand): Likewise.
4962 (immediate_operand): Likewise.
4963 (struct aarch64_memory_operand): New struct.
4964 (offset_memory_operand): New helper function.
4965 (preindex_memory_operand): Likewise.
4966 (enum aarch64_system_control_registers): New enum.
4967 (ENCODE): New macro.
4968 (emit_insn): New helper function.
4969 (emit_b): New function.
4970 (emit_bcond): Likewise.
4971 (emit_cb): Likewise.
4972 (emit_tb): Likewise.
4973 (emit_blr): Likewise.
4974 (emit_stp): Likewise.
4975 (emit_ldp_q_offset): Likewise.
4976 (emit_stp_q_offset): Likewise.
4977 (emit_load_store): Likewise.
4978 (emit_ldr): Likewise.
4979 (emit_ldrsw): Likewise.
4980 (emit_str): Likewise.
4981 (emit_ldaxr): Likewise.
4982 (emit_stxr): Likewise.
4983 (emit_stlr): Likewise.
4984 (emit_data_processing_reg): Likewise.
4985 (emit_data_processing): Likewise.
4986 (emit_add): Likewise.
4987 (emit_sub): Likewise.
4988 (emit_mov): Likewise.
4989 (emit_movk): Likewise.
4990 (emit_mov_addr): Likewise.
4991 (emit_mrs): Likewise.
4992 (emit_msr): Likewise.
4993 (emit_sevl): Likewise.
4994 (emit_wfe): Likewise.
4995 (append_insns): Likewise.
4996 (can_encode_int32_in): New helper function.
4997 (aarch64_relocate_instruction): New function.
4998 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
4999 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
5000 (struct linux_target_ops): Install aarch64_get_thread_area,
5001 aarch64_install_fast_tracepoint_jump_pad and
5002 aarch64_get_min_fast_tracepoint_insn_len.
5003
5004 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
5005
5006 * Makefile.in (aarch64-insn.o): New rule.
5007 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
5008
5009 2015-09-21 Yao Qi <yao.qi@linaro.org>
5010
5011 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
5012
5013 2015-09-21 Yao Qi <yao.qi@linaro.org>
5014
5015 * tracepoint.c (max_jump_pad_size): Remove.
5016
5017 2015-09-18 Yao Qi <yao.qi@linaro.org>
5018
5019 * linux-aarch64-low.c: Don't include sys/uio.h.
5020 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
5021
5022 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
5023
5024 * tracepoint.c (eval_result_type): Change prototype.
5025 (condition_true_at_tracepoint): Fix argument to compiled_cond.
5026
5027 2015-09-15 Pedro Alves <palves@redhat.com>
5028
5029 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
5030 Check whether to report exec events instead of checking whether
5031 multiprocess is enabled.
5032
5033 2015-09-15 Pedro Alves <palves@redhat.com>
5034
5035 PR remote/18965
5036 * remote-utils.c (prepare_resume_reply): Merge
5037 TARGET_WAITKIND_VFORK_DONE switch case with the
5038 TARGET_WAITKIND_FORKED case.
5039
5040 2015-09-15 Yao Qi <yao.qi@linaro.org>
5041
5042 * server.c (handle_query): Check string comparison using
5043 "else if" instead of "if".
5044
5045 2015-09-15 Yao Qi <yao.qi@linaro.org>
5046
5047 * server.c (vCont_supported): New global variable.
5048 (handle_query): Set vCont_supported to 1 if "vContSupported+"
5049 matches. Append ";vContSupported+" to own_buf.
5050 (handle_v_requests): Append ";s;S" to own_buf if target supports
5051 hardware single step or vCont_supported is false.
5052 (capture_main): Set vCont_supported to zero.
5053
5054 2015-09-15 Yao Qi <yao.qi@linaro.org>
5055
5056 * linux-low.c (linux_supports_conditional_breakpoints): Rename
5057 it to ...
5058 (linux_supports_hardware_single_step): ... New function.
5059 (linux_target_ops): Update.
5060 * lynx-low.c (lynx_target_ops): Set field
5061 supports_hardware_single_step to target_can_do_hardware_single_step.
5062 * nto-low.c (nto_target_ops): Likewise.
5063 * spu-low.c (spu_target_ops): Likewise.
5064 * win32-low.c (win32_target_ops): Likewise.
5065 * target.c (target_can_do_hardware_single_step): New function.
5066 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5067 Remove. <supports_hardware_single_step>: New field.
5068 (target_supports_conditional_breakpoints): Remove.
5069 (target_supports_hardware_single_step): New macro.
5070 (target_can_do_hardware_single_step): Declare.
5071 * server.c (handle_query): Use target_supports_hardware_single_step
5072 instead of target_supports_conditional_breakpoints.
5073
5074 2015-09-15 Yao Qi <yao.qi@linaro.org>
5075
5076 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
5077 function.
5078 (struct linux_target_ops the_low_target): Install
5079 aarch64_linux_siginfo_fixup.
5080
5081 2015-09-11 Don Breazeal <donb@codesourcery.com>
5082 Luis Machado <lgustavo@codesourcery.com>
5083
5084 * linux-low.c (linux_mourn): Static declaration.
5085 (linux_arch_setup): Move in front of
5086 handle_extended_wait.
5087 (linux_arch_setup_thread): New function.
5088 (handle_extended_wait): Handle exec events. Call
5089 linux_arch_setup_thread. Make event_lwp argument a
5090 pointer-to-a-pointer.
5091 (check_zombie_leaders): Do not check stopped threads.
5092 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
5093 (linux_low_filter_event): Add lwp and thread for exec'ing
5094 non-leader thread if leader thread has been deleted.
5095 Refactor code into linux_arch_setup_thread and call it.
5096 Pass child lwp pointer by reference to handle_extended_wait.
5097 (linux_wait_for_event_filtered): Update comment.
5098 (linux_wait_1): Prevent clobbering exec event status.
5099 (linux_supports_exec_events): New function.
5100 (linux_target_ops) <supports_exec_events>: Initialize new member.
5101 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
5102 new member.
5103 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
5104 * server.c (report_exec_events): New global variable.
5105 (handle_query): Handle qSupported query for exec-events feature.
5106 (captured_main): Initialize report_exec_events.
5107 * server.h (report_exec_events): Declare new global variable.
5108 * target.h (struct target_ops) <supports_exec_events>: New
5109 member.
5110 (target_supports_exec_events): New macro.
5111 * win32-low.c (win32_target_ops) <supports_exec_events>:
5112 Initialize new member.
5113
5114 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
5115
5116 * linux-low.c (linux_low_enable_btrace): Remove.
5117 (linux_target_ops): Replace linux_low_enable_btrace with
5118 linux_enable_btrace.
5119
5120 2015-09-03 Yao Qi <yao.qi@linaro.org>
5121
5122 * linux-aarch64-low.c (aarch64_insert_point): Call
5123 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
5124 returns true.
5125
5126 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
5127
5128 * linux-low.c (check_stopped_by_breakpoint): Use
5129 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
5130
5131 2015-08-27 Pedro Alves <palves@redhat.com>
5132
5133 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
5134
5135 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
5136
5137 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
5138 the XNEW-family equivalent.
5139 (compile_bytecodes): Likewise.
5140 * dll.c (loaded_dll): Likewise.
5141 * event-loop.c (append_callback_event): Likewise.
5142 (create_file_handler): Likewise.
5143 (create_file_event): Likewise.
5144 * hostio.c (handle_open): Likewise.
5145 * inferiors.c (add_thread): Likewise.
5146 (add_process): Likewise.
5147 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
5148 * linux-arm-low.c (arm_new_process): Likewise.
5149 (arm_new_thread): Likewise.
5150 * linux-low.c (add_to_pid_list): Likewise.
5151 (linux_add_process): Likewise.
5152 (handle_extended_wait): Likewise.
5153 (add_lwp): Likewise.
5154 (enqueue_one_deferred_signal): Likewise.
5155 (enqueue_pending_signal): Likewise.
5156 (linux_resume_one_lwp_throw): Likewise.
5157 (linux_resume_one_thread): Likewise.
5158 (linux_read_memory): Likewise.
5159 (linux_write_memory): Likewise.
5160 * linux-mips-low.c (mips_linux_new_process): Likewise.
5161 (mips_linux_new_thread): Likewise.
5162 (mips_add_watchpoint): Likewise.
5163 * linux-x86-low.c (initialize_low_arch): Likewise.
5164 * lynx-low.c (lynx_add_process): Likewise.
5165 * mem-break.c (set_raw_breakpoint_at): Likewise.
5166 (set_breakpoint): Likewise.
5167 (add_condition_to_breakpoint): Likewise.
5168 (add_commands_to_breakpoint): Likewise.
5169 (clone_agent_expr): Likewise.
5170 (clone_one_breakpoint): Likewise.
5171 * regcache.c (new_register_cache): Likewise.
5172 * remote-utils.c (look_up_one_symbol): Likewise.
5173 * server.c (queue_stop_reply): Likewise.
5174 (start_inferior): Likewise.
5175 (queue_stop_reply_callback): Likewise.
5176 (handle_target_event): Likewise.
5177 * spu-low.c (fetch_ppc_memory): Likewise.
5178 (store_ppc_memory): Likewise.
5179 * target.c (set_target_ops): Likewise.
5180 * thread-db.c (thread_db_load_search): Likewise.
5181 (try_thread_db_load_1): Likewise.
5182 * tracepoint.c (add_tracepoint): Likewise.
5183 (add_tracepoint_action): Likewise.
5184 (create_trace_state_variable): Likewise.
5185 (cmd_qtdpsrc): Likewise.
5186 (cmd_qtro): Likewise.
5187 (add_while_stepping_state): Likewise.
5188 * win32-low.c (child_add_thread): Likewise.
5189 (get_image_name): Likewise.
5190
5191 2015-08-25 Yao Qi <yao.qi@linaro.org>
5192
5193 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
5194
5195 2015-08-25 Yao Qi <yao.qi@linaro.org>
5196
5197 * Makefile.in (aarch64-linux.o): New rule.
5198 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
5199 srv_tgtobj.
5200 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
5201 (aarch64_init_debug_reg_state): Make it extern.
5202 (aarch64_linux_prepare_to_resume): Remove.
5203
5204 2015-08-25 Yao Qi <yao.qi@linaro.org>
5205
5206 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
5207 lwp_arch_private_info and ptid_of_lwp.
5208
5209 2015-08-25 Yao Qi <yao.qi@linaro.org>
5210
5211 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
5212 Find proc_info by find_process_pid. All callers updated.
5213
5214 2015-08-25 Yao Qi <yao.qi@linaro.org>
5215
5216 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
5217 Remove.
5218 (debug_reg_change_callback): Remove.
5219 (aarch64_notify_debug_reg_change): Remove.
5220
5221 2015-08-25 Yao Qi <yao.qi@linaro.org>
5222
5223 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
5224 Call current_lwp_ptid.
5225
5226 2015-08-25 Yao Qi <yao.qi@linaro.org>
5227
5228 * linux-aarch64-low.c (debug_reg_change_callback): Use
5229 debug_printf.
5230
5231 2015-08-25 Yao Qi <yao.qi@linaro.org>
5232
5233 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
5234
5235 2015-08-25 Yao Qi <yao.qi@linaro.org>
5236
5237 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
5238
5239 2015-08-25 Yao Qi <yao.qi@linaro.org>
5240
5241 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
5242 the code.
5243
5244 2015-08-25 Yao Qi <yao.qi@linaro.org>
5245
5246 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
5247 Remove.
5248 (debug_reg_change_callback): Remove argument entry and add argument
5249 lwp. Remove local variable thread. Don't print thread id in the
5250 debugging output. Don't check whether pid of thread equals to pid.
5251 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
5252 iterate_over_lwps instead find_inferior.
5253
5254 2015-08-24 Pedro Alves <palves@redhat.com>
5255
5256 * inferiors.c (get_first_process): New function.
5257 * inferiors.h (get_first_process): New declaration.
5258 * remote-utils.c (read_ptid): Default to the first process in the
5259 list, instead of to the current thread's process.
5260
5261 2015-08-24 Pedro Alves <palves@redhat.com>
5262
5263 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
5264 * event-loop.c: Likewise.
5265 * remote-utils.c: Likewise.
5266 * tracepoint.c: Likewise.
5267
5268 2015-08-24 Pedro Alves <palves@redhat.com>
5269
5270 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
5271 ptid_get_lwp.
5272
5273 2015-08-21 Pedro Alves <palves@redhat.com>
5274
5275 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
5276 instead of literal 1.
5277
5278 2015-08-21 Pedro Alves <palves@redhat.com>
5279
5280 * tdesc.c (default_description): Explicitly zero-initialize.
5281
5282 2015-08-21 Pedro Alves <palves@redhat.com>
5283
5284 PR gdb/18749
5285 * inferiors.c (remove_thread): Discard any pending stop reply for
5286 this thread.
5287 * server.c (remove_all_on_match_pid): Rename to ...
5288 (remove_all_on_match_ptid): ... this. Work with a filter ptid
5289 instead of a pid.
5290 (discard_queued_stop_replies): Change parameter to a ptid. Now
5291 extern.
5292 (handle_v_kill, kill_inferior_callback, captured_main)
5293 (process_serial_event): Adjust.
5294 * server.h (discard_queued_stop_replies): Declare.
5295
5296 2015-08-21 Pedro Alves <palves@redhat.com>
5297
5298 * linux-low.c (wait_for_sigstop): Always switch to no thread
5299 selected if the previously current thread dies.
5300 * lynx-low.c (lynx_request_interrupt): Use the first thread's
5301 process instead of the current thread's.
5302 * remote-utils.c (input_interrupt): Don't check if there's no
5303 current thread.
5304 * server.c (gdb_read_memory, gdb_write_memory): If setting the
5305 current thread to the general thread fails, error out.
5306 (handle_qxfer_auxv, handle_qxfer_libraries)
5307 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
5308 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
5309 (handle_query): Check if there's a thread selected instead of
5310 checking whether there's any thread in the thread list.
5311 (handle_qxfer_threads, handle_qxfer_btrace)
5312 (handle_qxfer_btrace_conf): Don't error out early if there's no
5313 thread in the thread list.
5314 (handle_v_cont, myresume): Don't set the current thread to the
5315 continue thread.
5316 (process_serial_event) <Hg handling>: Also set thread_id if the
5317 previous general thread is still alive.
5318 (process_serial_event) <g/G handling>: If setting the current
5319 thread to the general thread fails, error out.
5320 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
5321 thread's lwp instead of the current thread's.
5322 * target.c (set_desired_thread): If the desired thread was not
5323 found, leave the current thread pointing to NULL. Return an int
5324 (boolean) indicating success.
5325 * target.h (set_desired_thread): Change return type to int.
5326
5327 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
5328
5329 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
5330 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
5331 #includes.
5332 (ps_get_thread_area): New function.
5333
5334 2015-08-19 Gary Benson <gbenson@redhat.com>
5335
5336 * hostio.c (handle_pread): Do not attempt to read more data
5337 than hostio_reply_with_data can fit in a packet.
5338
5339 2015-08-18 Joel Brobecker <brobecker@adacore.com>
5340
5341 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
5342
5343 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
5344
5345 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
5346
5347 2015-08-06 Pedro Alves <palves@redhat.com>
5348
5349 * tracepoint.c (expr_eval_result): Now an int.
5350
5351 2015-08-06 Pedro Alves <palves@redhat.com>
5352
5353 * gdbthread.h (struct regcache): Forward declare.
5354 (struct thread_info) <regcache_data>: Now a struct regcache
5355 pointer.
5356 * inferiors.c (inferior_regcache_data)
5357 (set_inferior_regcache_data): Now work with struct regcache
5358 pointers.
5359 * inferiors.h (struct regcache): Forward declare.
5360 (inferior_regcache_data, set_inferior_regcache_data): Now work
5361 with struct regcache pointers.
5362 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
5363 (free_register_cache_thread): Remove struct regcache pointer
5364 casts.
5365
5366 2015-08-06 Pedro Alves <palves@redhat.com>
5367
5368 * server.c (captured_main): On error, print the exception message
5369 to stderr, and if run_once is set, throw a quit.
5370
5371 2015-08-06 Pedro Alves <palves@redhat.com>
5372
5373 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
5374 the current thread.
5375
5376 2015-08-06 Pedro Alves <palves@redhat.com>
5377
5378 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
5379 reading beyond the passed in buffer length.
5380
5381 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
5382
5383 * tracepoint.c (symbol_list) <required>: Remove.
5384
5385 2015-08-06 Pedro Alves <palves@redhat.com>
5386
5387 * linux-low.c (handle_extended_wait): Set the fork child's suspend
5388 count if stopping and suspending threads.
5389 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
5390 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
5391 (linux_detach): Complete an ongoing step-over.
5392 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
5393 throughout.
5394 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
5395 (linux_wait_1): If passing a signal to the inferior after
5396 finishing a step-over, unsuspend and re-resume all lwps. If we
5397 see a single-step event but the thread should be continuing, don't
5398 pass the trap to gdb.
5399 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
5400 internal_error instead of gdb_assert.
5401 (enqueue_pending_signal): New function.
5402 (check_ptrace_stopped_lwp_gone): Add debug output.
5403 (start_step_over): Use internal_error instead of gdb_assert.
5404 (complete_ongoing_step_over): New function.
5405 (linux_resume_one_thread): Don't resume a suspended thread.
5406 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
5407 it stepping.
5408
5409 2015-08-06 Pedro Alves <palves@redhat.com>
5410
5411 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
5412 (linux_thread_alive): Use lwp_is_marked_dead.
5413 (extended_event_reported): Delete.
5414 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
5415 instead of extended_event_reported.
5416 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
5417 as well.
5418 (lwp_is_marked_dead): New function.
5419 (lwp_running): Use lwp_is_marked_dead.
5420 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
5421 comment.
5422
5423 2015-08-06 Pedro Alves <palves@redhat.com>
5424
5425 * linux-low.c (linux_wait_1): Move fork event output out of the
5426 !report_to_gdb check. Pass event_child->waitstatus to
5427 target_waitstatus_to_string instead of ourstatus.
5428
5429 2015-08-04 Yao Qi <yao.qi@linaro.org>
5430
5431 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
5432 if current_thread is 32 bit.
5433
5434 2015-08-04 Yao Qi <yao.qi@linaro.org>
5435
5436 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
5437 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
5438 * server.c (extended_protocol): Remove "static".
5439 * server.h (extended_protocol): Declare it.
5440
5441 2015-08-04 Yao Qi <yao.qi@linaro.org>
5442
5443 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
5444 both aarch64 and aarch32.
5445 (aarch64_set_pc): Likewise.
5446
5447 2015-08-04 Yao Qi <yao.qi@linaro.org>
5448
5449 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
5450 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
5451 arm-with-neon.xml to srv_xmlfiles.
5452 * linux-aarch64-low.c: Include linux-aarch32-low.h.
5453 (is_64bit_tdesc): New function.
5454 (aarch64_linux_read_description): New function.
5455 (aarch64_arch_setup): Call aarch64_linux_read_description.
5456 (regs_info): Rename to regs_info_aarch64.
5457 (aarch64_regs_info): Return right regs_info.
5458 (initialize_low_arch): Call initialize_low_arch_aarch32.
5459
5460 2015-08-04 Yao Qi <yao.qi@linaro.org>
5461
5462 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
5463 * linux-aarch32-low.c: New file.
5464 * linux-aarch32-low.h: New file.
5465 * linux-arm-low.c (arm_fill_gregset): Move it to
5466 linux-aarch32-low.c.
5467 (arm_store_gregset): Likewise.
5468 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
5469 (arm_store_vfpregset): Call arm_store_vfpregset_num.
5470 (arm_arch_setup): Check if PTRACE_GETREGSET works.
5471 (regs_info): Rename to regs_info_arm.
5472 (arm_regs_info): Return regs_info_aarch32 if
5473 have_ptrace_getregset is 1 and target description is
5474 arm_with_neon or arm_with_vfpv3.
5475 (initialize_low_arch): Don't call init_registers_arm_with_neon.
5476 Call initialize_low_arch_aarch32 instead.
5477
5478 2015-08-04 Yao Qi <yao.qi@linaro.org>
5479
5480 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
5481 * linux-low.c: ... here.
5482 * linux-low.h (have_ptrace_getregset): Declare it.
5483
5484 2015-08-04 Pedro Alves <palves@redhat.com>
5485
5486 * thread-db.c (struct thread_db): Use new typedefs.
5487 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
5488 CHK calls.
5489 (disable_thread_event_reporting): Cast result of dlsym to
5490 destination function pointer type.
5491 (thread_db_mourn): Use td_ta_delete_ftype.
5492
5493 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
5494
5495 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
5496 arch variant.
5497 (CDX_BREAKPOINT): Define for R2.
5498 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
5499 (the_low_target): Add comments.
5500
5501 2015-07-30 Yao Qi <yao.qi@linaro.org>
5502
5503 * linux-arm-low.c (arm_hwcap): Remove it.
5504 (arm_read_description): New local variable arm_hwcap. Don't
5505 set arm_hwcap to zero.
5506
5507 2015-07-30 Yao Qi <yao.qi@linaro.org>
5508
5509 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
5510 Use regcache->tdesc instead.
5511 (arm_store_wmmxregset): Likewise.
5512 (arm_fill_vfpregset): Likewise.
5513 (arm_store_vfpregset): Likewise.
5514
5515 2015-07-30 Yao Qi <yao.qi@linaro.org>
5516
5517 * linux-arm-low.c: Include arch/arm.h.
5518 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
5519 (arm_store_gregset): Likewise.
5520
5521 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
5522
5523 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
5524 ptrace's 4th parameter.
5525
5526 2015-07-27 Yao Qi <yao.qi@linaro.org>
5527
5528 * configure.srv (case aarch64*-*-linux*): Don't set
5529 srv_linux_usrregs.
5530
5531 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
5532
5533 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
5534 sys/ptrace.h.
5535 * linux-arm-low.c: Likewise.
5536 * linux-cris-low.c: Likewise.
5537 * linux-crisv32-low.c: Likewise.
5538 * linux-low.c: Likewise.
5539 * linux-m68k-low.c: Likewise.
5540 * linux-mips-low.c: Likewise.
5541 * linux-nios2-low.c: Likewise.
5542 * linux-s390-low.c: Likewise.
5543 * linux-sparc-low.c: Likewise.
5544 * linux-tic6x-low.c: Likewise.
5545 * linux-tile-low.c: Likewise.
5546 * linux-x86-low.c: Likewise.
5547
5548 2015-07-24 Pedro Alves <palves@redhat.com>
5549
5550 * config.in: Regenerate.
5551 * configure: Regenerate.
5552
5553 2015-07-24 Pedro Alves <palves@redhat.com>
5554
5555 * acinclude.m4: Include ../ptrace.m4.
5556 * configure.ac: Call GDB_AC_PTRACE.
5557 * config.in, configure: Regenerate.
5558
5559 2015-07-24 Yao Qi <yao.qi@linaro.org>
5560
5561 * linux-low.c (linux_create_inferior): Remove setting to
5562 proc->priv->new_inferior.
5563 (linux_attach): Likewise.
5564 (linux_low_filter_event): Likewise.
5565 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
5566
5567 2015-07-24 Yao Qi <yao.qi@linaro.org>
5568
5569 * linux-low.c (linux_arch_setup): New function.
5570 (linux_low_filter_event): If proc->tdesc is NULL and
5571 proc->attached is true, call the_low_target.arch_setup.
5572 Otherwise, keep status pending, and return.
5573 (linux_resume_one_lwp_throw): Don't call get_pc if
5574 thread->while_stepping isn't NULL. Don't call
5575 get_thread_regcache if proc->tdesc is NULL.
5576 (need_step_over_p): Return 0 if proc->tdesc is NULL.
5577 (linux_target_ops): Install arch_setup.
5578 * server.c (start_inferior): Call the_target->arch_setup.
5579 * target.h (struct target_ops) <arch_setup>: New field.
5580 (target_arch_setup): New marco.
5581 * lynx-low.c (lynx_target_ops): Update.
5582 * nto-low.c (nto_target_ops): Update.
5583 * spu-low.c (spu_target_ops): Update.
5584 * win32-low.c (win32_target_ops): Update.
5585
5586 2015-07-24 Yao Qi <yao.qi@linaro.org>
5587
5588 * linux-low.c (linux_add_process): Don't set
5589 proc->priv->new_inferior.
5590 (linux_create_inferior): Set proc->priv->new_inferior to 1.
5591 (linux_attach): Likewise.
5592
5593 2015-07-24 Yao Qi <yao.qi@linaro.org>
5594
5595 * server.c (start_inferior): Code refactor.
5596
5597 2015-07-24 Yao Qi <yao.qi@linaro.org>
5598
5599 * server.c (process_serial_event): Set general_thread.
5600
5601 2015-07-21 Yao Qi <yao.qi@linaro.org>
5602
5603 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
5604 aarch64_linux_get_debug_reg_capacity.
5605
5606 2015-07-17 Yao Qi <yao.qi@linaro.org>
5607
5608 * Makefile.in (aarch64-linux-hw-point.o): New rule.
5609 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
5610 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
5611 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
5612 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
5613 (AARCH64_HWP_ALIGNMENT): Likewise.
5614 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
5615 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
5616 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
5617 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
5618 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
5619 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
5620 (struct aarch64_debug_reg_state): Likewise.
5621 (struct arch_lwp_info): Likewise.
5622 (aarch64_align_watchpoint): Likewise.
5623 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
5624 (aarch64_watchpoint_length): Likewise.
5625 (aarch64_point_encode_ctrl_reg): Likewise
5626 (aarch64_point_is_aligned): Likewise.
5627 (aarch64_align_watchpoint): Likewise.
5628 (aarch64_linux_set_debug_regs):
5629 (aarch64_dr_state_insert_one_point): Likewise.
5630 (aarch64_dr_state_remove_one_point): Likewise.
5631 (aarch64_handle_breakpoint): Likewise.
5632 (aarch64_handle_aligned_watchpoint): Likewise.
5633 (aarch64_handle_unaligned_watchpoint): Likewise.
5634 (aarch64_handle_watchpoint): Likewise.
5635
5636 2015-07-17 Yao Qi <yao.qi@linaro.org>
5637
5638 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
5639 and don't aarch64_get_debug_reg_state. All callers update.
5640 (aarch64_handle_aligned_watchpoint): Likewise.
5641 (aarch64_handle_unaligned_watchpoint): Likewise.
5642 (aarch64_handle_watchpoint): Likewise.
5643 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
5644 (aarch64_remove_point): Likewise.
5645
5646 2015-07-17 Yao Qi <yao.qi@linaro.org>
5647
5648 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
5649 debug_printf.
5650 (aarch64_handle_unaligned_watchpoint): Likewise.
5651
5652 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5653
5654 Revert the previous 3 commits:
5655 Move gdb_regex* to common/
5656 Move linux_find_memory_regions_full & co.
5657 gdbserver build-id attribute generator
5658
5659 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5660 Jan Kratochvil <jan.kratochvil@redhat.com>
5661
5662 gdbserver build-id attribute generator.
5663 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
5664 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
5665 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
5666 (find_phdr): New.
5667 (get_dynamic): Use find_pdhr to traverse program headers.
5668 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
5669 (compare_mapping_entry_range, struct find_memory_region_callback_data)
5670 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
5671 (get_hex_build_id): New.
5672 (linux_qxfer_libraries_svr4): Add optional build-id attribute
5673 to reply XML document.
5674
5675 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5676 Jan Kratochvil <jan.kratochvil@redhat.com>
5677
5678 * target.c: Include target/target-utils.h and fcntl.h.
5679 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
5680 (target_fileio_read_stralloc): New functions.
5681
5682 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
5683
5684 * Makefile.in (OBS): Add gdb_regex.o.
5685 (gdb_regex.o): New.
5686 * config.in: Rebuilt.
5687 * configure: Rebuilt.
5688
5689 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
5690 Jan Kratochvil <jan.kratochvil@redhat.com>
5691
5692 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
5693 * Makefile.in (OBS): Add target-utils.o.
5694 (linux-maps.o, target-utils.o): New.
5695 * configure.srv (srv_linux_obj): Add linux-maps.o.
5696
5697 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
5698
5699 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
5700 function, return 1.
5701 (the_low_target): Install it.
5702
5703 2015-07-14 Pedro Alves <palves@redhat.com>
5704
5705 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
5706 Instead, ignore ECHILD, and throw an error for other errnos.
5707
5708 2015-07-10 Pedro Alves <palves@redhat.com>
5709
5710 * event-loop.c (struct callback_event) <data>: Change type to
5711 gdb_client_data instance instead of gdb_client_data pointer.
5712 (append_callback_event): Adjust.
5713
5714 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
5715
5716 * linux-aarch64-low.c: Add comments for each linux_target_ops
5717 method. Remove comments already covered in target_ops and
5718 linux_target_ops definitions.
5719 (the_low_target): Add comments for each unimplemented method.
5720
5721 2015-07-09 Yao Qi <yao.qi@linaro.org>
5722
5723 * linux-aarch64-low.c (aarch64_regmap): Remove.
5724 (aarch64_usrregs_info): Remove.
5725 (regs_info): Set field usrregs to NULL.
5726
5727 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
5728
5729 * linux-low.c: Include "rsp-low.h"
5730 (linux_low_encode_pt_config, linux_low_encode_raw): New.
5731 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
5732 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
5733 (handle_btrace_enable_pt): New.
5734 (handle_btrace_general_set): Support "pt".
5735 (handle_btrace_conf_general_set): Support "pt:size".
5736
5737 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5738
5739 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
5740 Z_PACKET_SW_BP.
5741
5742 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
5743
5744 * linux-aarch64-low.c: Remove comment about endianness.
5745 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
5746 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
5747 memcmp.
5748
5749 2015-06-24 Gary Benson <gbenson@redhat.com>
5750
5751 * linux-i386-ipa.c (stdint.h): Do not include.
5752 * lynx-i386-low.c (stdint.h): Likewise.
5753 * lynx-ppc-low.c (stdint.h): Likewise.
5754 * mem-break.c (stdint.h): Likewise.
5755 * thread-db.c (stdint.h): Likewise.
5756 * tracepoint.c (stdint.h): Likewise.
5757 * win32-low.c (stdint.h): Likewise.
5758
5759 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
5760
5761 * server.c (write_qxfer_response): Update call to
5762 remote_escape_output.
5763
5764 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
5765 Jan Kratochvil <jan.kratochvil@redhat.com>
5766
5767 Merge multiple hex conversions.
5768 * gdbreplay.c (tohex): Rename to 'fromhex'.
5769 (logchar): Use fromhex.
5770
5771 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
5772
5773 * server.c (handle_qxfer_libraries): Set `version' attribute for
5774 <library-list>.
5775
5776 2015-06-10 Gary Benson <gbenson@redhat.com>
5777
5778 * target.h (struct target_ops) <multifs_open>: New field.
5779 <multifs_unlink>: Likewise.
5780 <multifs_readlink>: Likewise.
5781 * linux-low.c (nat/linux-namespaces.h): New include.
5782 (linux_target_ops): Initialize the_target->multifs_open,
5783 the_target->multifs_unlink and the_target->multifs_readlink.
5784 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
5785 * hostio.c (hostio_fs_pid): New static variable.
5786 (hostio_handle_new_gdb_connection): New function.
5787 (handle_setfs): Likewise.
5788 (handle_open): Use the_target->multifs_open as appropriate.
5789 (handle_unlink): Use the_target->multifs_unlink as appropriate.
5790 (handle_readlink): Use the_target->multifs_readlink as
5791 appropriate.
5792 (handle_vFile): Handle vFile:setfs packets.
5793 * server.c (handle_query): Call hostio_handle_new_gdb_connection
5794 after target_handle_new_gdb_connection.
5795
5796 2015-06-10 Gary Benson <gbenson@redhat.com>
5797
5798 * configure.ac (AC_CHECK_FUNCS): Add setns.
5799 * config.in: Regenerate.
5800 * configure: Likewise.
5801 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
5802 (linux-namespaces.o): New rule.
5803 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
5804
5805 2015-06-09 Gary Benson <gbenson@redhat.com>
5806
5807 * hostio.c (handle_open): Process mode argument with
5808 fileio_to_host_mode.
5809
5810 2015-06-01 Yao Qi <yao.qi@linaro.org>
5811
5812 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
5813 * linux-x86-low.c: Likewise.
5814
5815 2015-05-28 Don Breazeal <donb@codesourcery.com>
5816
5817 * linux-low.c (handle_extended_wait): Initialize
5818 thread_info.last_resume_kind for new fork children.
5819
5820 2015-05-15 Pedro Alves <palves@redhat.com>
5821
5822 * target.h (target_handle_new_gdb_connection): Rewrite using if
5823 wrapped in do/while.
5824
5825 2015-05-14 Joel Brobecker <brobecker@adacore.com>
5826
5827 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
5828 * configure, config.in: Regenerate.
5829 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
5830 Declare typedef.
5831
5832 2015-05-12 Don Breazeal <donb@codesourcery.com>
5833
5834 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
5835 PTRACE_EVENT_VFORK_DONE.
5836 (linux_low_ptrace_options, extended_event_reported): Add vfork
5837 events.
5838 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
5839 and "vforkdone" for RSP 'T' Stop Reply Packet.
5840 * server.h (report_vfork_events): Declare
5841 global variable.
5842
5843 2015-05-12 Don Breazeal <donb@codesourcery.com>
5844
5845 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
5846 (the_low_target) <new_fork>: Initialize new member.
5847 * linux-arm-low.c (arm_new_fork): New function.
5848 (the_low_target) <new_fork>: Initialize new member.
5849 * linux-low.c (handle_extended_wait): Call new target function
5850 new_fork.
5851 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
5852 * linux-mips-low.c (mips_add_watchpoint): New function
5853 extracted from mips_insert_point.
5854 (the_low_target) <new_fork>: Initialize new member.
5855 (mips_linux_new_fork): New function.
5856 (mips_insert_point): Call mips_add_watchpoint.
5857 * linux-x86-low.c (x86_linux_new_fork): New function.
5858 (the_low_target) <new_fork>: Initialize new member.
5859
5860 2015-05-12 Don Breazeal <donb@codesourcery.com>
5861
5862 * linux-low.c (handle_extended_wait): Implement return value,
5863 rename argument 'event_child' to 'event_lwp', handle
5864 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
5865 (linux_low_ptrace_options): New function.
5866 (linux_low_filter_event): Call linux_low_ptrace_options,
5867 use different argument fo linux_enable_event_reporting,
5868 use return value from handle_extended_wait.
5869 (extended_event_reported): New function.
5870 (linux_wait_1): Call extended_event_reported and set
5871 status to report fork events.
5872 (linux_write_memory): Add pid to debug message.
5873 (reset_lwp_ptrace_options_callback): New function.
5874 (linux_handle_new_gdb_connection): New function.
5875 (linux_target_ops): Initialize new structure member.
5876 * linux-low.h (struct lwp_info) <waitstatus>: New member.
5877 * lynx-low.c: Initialize new structure member.
5878 * remote-utils.c (prepare_resume_reply): Implement stop reason
5879 "fork" for "T" stop message.
5880 * server.c (handle_query): Call handle_new_gdb_connection.
5881 * server.h (report_fork_events): Declare global flag.
5882 * target.h (struct target_ops) <handle_new_gdb_connection>:
5883 New member.
5884 (target_handle_new_gdb_connection): New macro.
5885 * win32-low.c: Initialize new structure member.
5886
5887 2015-05-12 Don Breazeal <donb@codesourcery.com>
5888
5889 * mem-break.c (APPEND_TO_LIST): Define macro.
5890 (clone_agent_expr): New function.
5891 (clone_one_breakpoint): New function.
5892 (clone_all_breakpoints): New function.
5893 * mem-break.h: Declare new functions.
5894
5895 2015-05-12 Don Breazeal <donb@codesourcery.com>
5896
5897 * linux-low.c (linux_supports_fork_events): New function.
5898 (linux_supports_vfork_events): New function.
5899 (linux_target_ops): Initialize new structure members.
5900 (initialize_low): Call linux_check_ptrace_features.
5901 * lynx-low.c (lynx_target_ops): Initialize new structure
5902 members.
5903 * server.c (report_fork_events, report_vfork_events):
5904 New global flags.
5905 (handle_query): Add new features to qSupported packet and
5906 response.
5907 (captured_main): Initialize new global variables.
5908 * target.h (struct target_ops) <supports_fork_events>:
5909 New member.
5910 <supports_vfork_events>: New member.
5911 (target_supports_fork_events): New macro.
5912 (target_supports_vfork_events): New macro.
5913 * win32-low.c (win32_target_ops): Initialize new structure
5914 members.
5915
5916 2015-05-12 Gary Benson <gbenson@redhat.com>
5917
5918 * server.c (handle_qxfer_exec_file): Use current process
5919 if annex is empty.
5920
5921 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
5922
5923 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
5924 Remove HAVE_PTRACE_GETREGS conditionals.
5925 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
5926 instead of PTRACE_GETREGS and PTRACE_SETREGS.
5927
5928 2015-05-08 Yao Qi <yao.qi@linaro.org>
5929
5930 * linux-low.c (linux_supports_conditional_breakpoints): New
5931 function.
5932 (linux_target_ops): Install new target method.
5933 * lynx-low.c (lynx_target_ops): Install NULL hook for
5934 supports_conditional_breakpoints.
5935 * nto-low.c (nto_target_ops): Likewise.
5936 * spu-low.c (spu_target_ops): Likewise.
5937 * win32-low.c (win32_target_ops): Likewise.
5938 * server.c (handle_query): Check
5939 target_supports_conditional_breakpoints.
5940 * target.h (struct target_ops) <supports_conditional_breakpoints>:
5941 New field.
5942 (target_supports_conditional_breakpoints): New macro.
5943
5944 2015-05-06 Pedro Alves <palves@redhat.com>
5945
5946 PR server/18081
5947 * server.c (start_inferior): If the process exits, mourn it.
5948
5949 2015-04-21 Gary Benson <gbenson@redhat.com>
5950
5951 * hostio.c (fileio_open_flags_to_host): Factored out to
5952 fileio_to_host_openflags in common/fileio.c. Single use
5953 updated.
5954
5955 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5956
5957 * linux-xtensa-low.c (xtensa_fill_gregset)
5958 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
5959 XCHAL_HAVE_LOOP.
5960
5961 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
5962
5963 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
5964 (regs_info): Replace usrregs pointer with NULL.
5965
5966 2015-04-17 Gary Benson <gbenson@redhat.com>
5967
5968 * target.h (struct target_ops) <pid_to_exec_file>: New field.
5969 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
5970 * server.c (handle_qxfer_exec_file): New function.
5971 (qxfer_packets): Add exec-file entry.
5972 (handle_query): Report qXfer:exec-file:read as supported packet.
5973
5974 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
5975
5976 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
5977
5978 2015-04-09 Gary Benson <gbenson@redhat.com>
5979
5980 * hostio-errno.c (errno_to_fileio_error): Remove function.
5981 Update caller to use remote_fileio_to_fio_error.
5982
5983 2015-04-09 Yao Qi <yao.qi@linaro.org>
5984
5985 * linux-low.c (linux_insert_point): Call
5986 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
5987 (linux_remove_point): Call remove_memory_breakpoint if type is
5988 raw_bkpt_type_sw.
5989 * linux-x86-low.c (x86_insert_point): Don't call
5990 insert_memory_breakpoint.
5991 (x86_remove_point): Don't call remove_memory_breakpoint.
5992
5993 2015-04-01 Pedro Alves <palves@redhat.com>
5994 Cleber Rosa <crosa@redhat.com>
5995
5996 * server.c (gdbserver_usage): Reorganize and extend the usage
5997 message.
5998
5999 2015-03-24 Pedro Alves <palves@redhat.com>
6000
6001 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
6002 output. Also dump TRAP_TRACE.
6003 (linux_low_filter_event): In debug output, distinguish a
6004 resume_stop SIGSTOP from a delayed SIGSTOP.
6005
6006 2015-03-24 Gary Benson <gbenson@redhat.com>
6007
6008 * linux-x86-low.c (x86_linux_new_thread): Moved to
6009 nat/x86-linux.c.
6010 (x86_linux_prepare_to_resume): Likewise.
6011
6012 2015-03-24 Gary Benson <gbenson@redhat.com>
6013
6014 * Makefile.in (x86-linux-dregs.o): New rule.
6015 * configure.srv: Add x86-linux-dregs.o to relevant targets.
6016 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
6017 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
6018 (x86_linux_dr_get): Likewise.
6019 (x86_linux_dr_set): Likewise.
6020 (update_debug_registers_callback): Likewise.
6021 (x86_linux_dr_set_addr): Likewise.
6022 (x86_linux_dr_get_addr): Likewise.
6023 (x86_linux_dr_set_control): Likewise.
6024 (x86_linux_dr_get_control): Likewise.
6025 (x86_linux_dr_get_status): Likewise.
6026 (x86_linux_update_debug_registers): Likewise.
6027
6028 2015-03-24 Gary Benson <gbenson@redhat.com>
6029
6030 * linux-x86-low.c (x86_linux_update_debug_registers):
6031 New function, factored out from...
6032 (x86_linux_prepare_to_resume): ...this.
6033
6034 2015-03-24 Gary Benson <gbenson@redhat.com>
6035
6036 * linux-x86-low.c (x86_linux_dr_get): Update comments.
6037 (x86_linux_dr_set): Likewise.
6038 (update_debug_registers_callback): Likewise.
6039 (x86_linux_dr_set_addr): Likewise.
6040 (x86_linux_dr_get_addr): Likewise.
6041 (x86_linux_dr_set_control): Likewise.
6042 (x86_linux_dr_get_control): Likewise.
6043 (x86_linux_dr_get_status): Likewise.
6044 (x86_linux_prepare_to_resume): Likewise.
6045
6046 2015-03-24 Gary Benson <gbenson@redhat.com>
6047
6048 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
6049 Use perror_with_name. Pass string through gettext.
6050 (x86_linux_dr_set): Likewise.
6051
6052 2015-03-24 Gary Benson <gbenson@redhat.com>
6053
6054 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
6055 (x86_linux_dr_set_addr): ...this.
6056 (x86_dr_low_get_addr): Rename to...
6057 (x86_linux_dr_get_addr): ...this.
6058 (x86_dr_low_set_control): Rename to...
6059 (x86_linux_dr_set_control): ...this.
6060 (x86_dr_low_get_control): Rename to...
6061 (x86_linux_dr_get_control): ...this.
6062 (x86_dr_low_get_status): Rename to...
6063 (x86_linux_dr_get_status): ...this.
6064 (x86_dr_low): Update with new function names.
6065
6066 2015-03-24 Gary Benson <gbenson@redhat.com>
6067
6068 * Makefile.in (x86-linux.o): New rule.
6069 * configure.srv: Add x86-linux.o to relevant targets.
6070 * linux-low.c (lwp_set_arch_private_info): New function.
6071 (lwp_arch_private_info): Likewise.
6072 * linux-x86-low.c: Include nat/x86-linux.h.
6073 (arch_lwp_info): Removed structure.
6074 (update_debug_registers_callback):
6075 Use lwp_set_debug_registers_changed.
6076 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
6077 and lwp_set_debug_registers_changed.
6078 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
6079
6080 2015-03-24 Gary Benson <gbenson@redhat.com>
6081
6082 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
6083 * linux-arm-low.c (arm_new_thread): Likewise.
6084 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
6085 * linux-mips-low.c (mips_linux_new_thread): Likewise.
6086 * linux-x86-low.c (x86_linux_new_thread): Likewise.
6087 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
6088
6089 2015-03-24 Gary Benson <gbenson@redhat.com>
6090
6091 * linux-low.c (ptid_of_lwp): New function.
6092 (lwp_is_stopped): Likewise.
6093 (lwp_stop_reason): Likewise.
6094 * linux-x86-low.c (update_debug_registers_callback):
6095 Use lwp_is_stopped.
6096 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
6097 lwp_stop_reason.
6098
6099 2015-03-24 Gary Benson <gbenson@redhat.com>
6100
6101 * linux-low.h (linux_stop_lwp): Remove declaration.
6102
6103 2015-03-24 Gary Benson <gbenson@redhat.com>
6104
6105 * linux-low.h: Include nat/linux-nat.h.
6106 * linux-low.c (iterate_over_lwps_args): New structure.
6107 (iterate_over_lwps_filter): New function.
6108 (iterate_over_lwps): Likewise.
6109 * linux-x86-low.c (update_debug_registers_callback):
6110 Update signature to what iterate_over_lwps expects.
6111 Remove PID check that iterate_over_lwps now performs.
6112 (x86_dr_low_set_addr): Use iterate_over_lwps.
6113 (x86_dr_low_set_control): Likewise.
6114
6115 2015-03-24 Gary Benson <gbenson@redhat.com>
6116
6117 * linux-x86-low.c (x86_debug_reg_state): New function.
6118 (x86_linux_prepare_to_resume): Use the above.
6119
6120 2015-03-24 Gary Benson <gbenson@redhat.com>
6121
6122 * linux-low.c (current_lwp_ptid): New function.
6123 * linux-x86-low.c: Include nat/linux-nat.h.
6124 (x86_dr_low_get_addr): Use current_lwp_ptid.
6125 (x86_dr_low_get_control): Likewise.
6126 (x86_dr_low_get_status): Likewise.
6127
6128 2015-03-20 Pedro Alves <palves@redhat.com>
6129
6130 * tracepoint.c (cmd_qtstatus): Make "str" const.
6131
6132 2015-03-20 Pedro Alves <palves@redhat.com>
6133
6134 * server.c (handle_general_set): Make "req_str" const.
6135
6136 2015-03-19 Pedro Alves <palves@redhat.com>
6137
6138 * linux-low.c (linux_resume_one_lwp): Rename to ...
6139 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
6140 instead call perror_with_name.
6141 (check_ptrace_stopped_lwp_gone): New function.
6142 (linux_resume_one_lwp): Reimplement as wrapper around
6143 linux_resume_one_lwp_throw that swallows errors if the LWP is
6144 gone.
6145
6146 2015-03-19 Pedro Alves <palves@redhat.com>
6147
6148 * linux-low.c (count_events_callback, select_event_lwp_callback):
6149 No longer check whether the thread has resume_stop as last resume
6150 kind.
6151
6152 2015-03-19 Pedro Alves <palves@redhat.com>
6153
6154 * linux-low.c (count_events_callback, select_event_lwp_callback):
6155 Use the lwp's status_pending_p field, not the thread's.
6156
6157 2015-03-19 Pedro Alves <palves@redhat.com>
6158
6159 * linux-low.c (select_event_lwp_callback): Update comments to
6160 no longer mention SIGTRAP.
6161
6162 2015-03-18 Gary Benson <gbenson@redhat.com>
6163
6164 * server.c (handle_query): Do not report vFile:fstat as supported.
6165
6166 2015-03-11 Gary Benson <gbenson@redhat.com>
6167
6168 * hostio.c (sys/types.h): New include.
6169 (sys/stat.h): Likewise.
6170 (common-remote-fileio.h): Likewise.
6171 (handle_fstat): New function.
6172 (handle_vFile): Handle vFile:fstat packets.
6173
6174 2015-03-11 Gary Benson <gbenson@redhat.com>
6175
6176 * configure.ac (AC_CHECK_MEMBERS): Add checks for
6177 struct stat.st_blocks and struct stat.st_blksize.
6178 * configure: Regenerate.
6179 * config.in: Likewise.
6180 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
6181 (OBS): Add common-remote-fileio.o.
6182 (common-remote-fileio.o): New rule.
6183
6184 2015-03-09 Pedro Alves <palves@redhat.com>
6185
6186 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
6187 'struct sockaddr' pointer in 'accept' call.
6188
6189 2015-03-09 Pedro Alves <palves@redhat.com>
6190
6191 Revert:
6192 2015-03-07 Pedro Alves <palves@redhat.com>
6193 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6194 or <winsock2.h> here. Instead include "gdb_socket.h".
6195 (remote_open): Use union gdb_sockaddr_u.
6196 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6197 or <winsock2.h> here. Instead include "gdb_socket.h".
6198 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6199 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6200 or <sys/un.h>.
6201 (init_named_socket, gdb_agent_helper_thread): Use union
6202 gdb_sockaddr_u.
6203
6204 2015-03-07 Pedro Alves <palves@redhat.com>
6205
6206 * configure.ac (build_warnings): Move
6207 -Wdeclaration-after-statement to the C-specific set.
6208 * configure: Regenerate.
6209
6210 2015-03-07 Pedro Alves <palves@redhat.com>
6211
6212 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
6213 or <winsock2.h> here. Instead include "gdb_socket.h".
6214 (remote_open): Use union gdb_sockaddr_u.
6215 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
6216 or <winsock2.h> here. Instead include "gdb_socket.h".
6217 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
6218 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
6219 or <sys/un.h>.
6220 (init_named_socket, gdb_agent_helper_thread): Use union
6221 gdb_sockaddr_u.
6222
6223 2015-03-07 Pedro Alves <palves@redhat.com>
6224
6225 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
6226 instead.
6227
6228 2015-03-06 Yao Qi <yao.qi@linaro.org>
6229
6230 * linux-aarch64-low.c (aarch64_insert_point): Use
6231 show_debug_regs as a boolean.
6232 (aarch64_remove_point): Likewise.
6233
6234 2015-03-05 Pedro Alves <palves@redhat.com>
6235
6236 * lynx-low.c (lynx_target_ops): Install NULL hooks for
6237 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
6238 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
6239 * nto-low.c (nto_target_ops): Likewise.
6240 * spu-low.c (spu_target_ops): Likewise.
6241 * win32-low.c (win32_target_ops): Likewise.
6242
6243 2015-03-04 Pedro Alves <palves@redhat.com>
6244
6245 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
6246 Decide whether a breakpoint triggered based on the SIGTRAP's
6247 siginfo.si_code.
6248 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
6249 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
6250 (linux_low_filter_event): Check for breakpoints before checking
6251 watchpoints.
6252 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
6253 siginfo.si_code.
6254 (linux_stopped_by_sw_breakpoint)
6255 (linux_supports_stopped_by_sw_breakpoint)
6256 (linux_stopped_by_hw_breakpoint)
6257 (linux_supports_stopped_by_hw_breakpoint): New functions.
6258 (linux_target_ops): Install new target methods.
6259
6260 2015-03-04 Pedro Alves <palves@redhat.com>
6261
6262 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
6263 * server.c (swbreak_feature, hwbreak_feature): New globals.
6264 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
6265 (captured_main): Clear swbreak_feature and hwbreak_feature.
6266 * server.h (swbreak_feature, hwbreak_feature): Declare.
6267 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
6268 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
6269 supports_stopped_by_hw_breakpoint>: New fields.
6270 (target_supports_stopped_by_sw_breakpoint)
6271 (target_stopped_by_sw_breakpoint)
6272 (target_supports_stopped_by_hw_breakpoint)
6273 (target_stopped_by_hw_breakpoint): Declare.
6274
6275 2015-03-04 Pedro Alves <palves@redhat.com>
6276
6277 enum lwp_stop_reason -> enum target_stop_reason
6278 * linux-low.c (check_stopped_by_breakpoint): Adjust.
6279 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
6280 (linux_wait_1, stuck_in_jump_pad_callback)
6281 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
6282 (linux_stopped_by_watchpoint):
6283 * linux-low.h (enum lwp_stop_reason): Delete.
6284 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
6285 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6286
6287 2015-03-04 Yao Qi <yao.qi@linaro.org>
6288
6289 * Makefile.in (SFILES): Add linux-aarch64-low.c.
6290
6291 2015-03-03 Gary Benson <gbenson@redhat.com>
6292
6293 * hostio.c (handle_vFile): Fix prefix lengths.
6294
6295 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
6296
6297 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
6298 ptr_bits.
6299
6300 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
6301
6302 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
6303 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
6304 (clean): Add "rm -f" for above C files.
6305 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
6306 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
6307 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
6308 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
6309 * linux-s390-low.c (HWCAP_S390_VX): New macro.
6310 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
6311 (init_registers_s390x_vx_linux64)
6312 (init_registers_s390x_tevx_linux64)
6313 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
6314 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
6315 declarations.
6316 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
6317 (s390_store_vxrs_high): New functions.
6318 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
6319 NT_S390_VXRS_HIGH.
6320 (s390_arch_setup): Add logic for selecting one of the new target
6321 descriptions. Activate the new vector regsets if applicable.
6322 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
6323 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
6324 and init_registers_s390x_tevx_linux64.
6325
6326 2015-03-01 Pedro Alves <palves@redhat.com>
6327
6328 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
6329 parameter.
6330
6331 2015-02-27 Pedro Alves <palves@redhat.com>
6332
6333 * linux-x86-low.c (u_debugreg_offset): New function.
6334 (x86_linux_dr_get, x86_linux_dr_set): Use it.
6335
6336 2015-02-27 Pedro Alves <palves@redhat.com>
6337
6338 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
6339 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
6340 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
6341 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
6342 (ps_lsetfpregs, ps_getpid)
6343 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
6344 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
6345 (ps_lsetxregs, ps_plog): Declare.
6346
6347 2015-02-27 Pedro Alves <palves@redhat.com>
6348
6349 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
6350 IP_AGENT_EXPORT_FUNC.
6351 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
6352 IP_AGENT_EXPORT_FUNC.
6353 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
6354 (IP_AGENT_EXPORT): Delete.
6355 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6356 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6357 (gdb_trampoline_buffer_error, collecting, gdb_collect)
6358 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
6359 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
6360 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
6361 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
6362 (traceframe_read_count, traceframe_write_count)
6363 (traceframes_created, trace_state_variables, get_raw_reg)
6364 (get_trace_state_variable_value, set_trace_state_variable_value)
6365 (ust_loaded, helper_thread_id, cmd_buf): Use
6366 IPA_SYM_EXPORTED_NAME.
6367 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
6368 (tracepoints) Use IP_AGENT_EXPORT_VAR.
6369 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
6370 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6371 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
6372 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
6373 EXTERN_C_PUSH/EXTERN_C_POP.
6374 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
6375 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
6376 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6377 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
6378 (traceframe_write_count, traceframe_read_count)
6379 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
6380 (about_to_request_buffer_space, get_trace_state_variable_value)
6381 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
6382 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
6383 EXTERN_C_PUSH/EXTERN_C_POP.
6384 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
6385 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
6386 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
6387 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
6388 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
6389 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
6390 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
6391 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
6392 Define.
6393 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
6394 (IP_AGENT_EXPORT_VAR_DECL): Define.
6395 (tracing): Declare.
6396 (gdb_agent_get_raw_reg): Declare.
6397
6398 2015-02-27 Tom Tromey <tromey@redhat.com>
6399 Pedro Alves <palves@redhat.com>
6400
6401 Rename symbols whose names are reserved C++ keywords throughout.
6402
6403 2015-02-27 Pedro Alves <palves@redhat.com>
6404
6405 * Makefile.in (COMPILER): New, get it from autoconf.
6406 (CXX): Get from autoconf instead.
6407 (COMPILE.pre): Use COMPILER.
6408 (CC-LD): Rename to ...
6409 (CC_LD): ... this. Use COMPILER.
6410 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
6411 (CXX_FOR_TARGET): Default to g++ instead of gcc.
6412 * acinclude.m4: Include build-with-cxx.m4.
6413 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
6414 Disable -Werror by default if building in C++ mode.
6415 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
6416 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
6417 the C++ compiler. Save/restore CXXFLAGS too.
6418 * configure: Regenerate.
6419
6420 2015-02-27 Pedro Alves <palves@redhat.com>
6421
6422 * acinclude.m4: Include libiberty.m4.
6423 * configure.ac: Call libiberty_INIT.
6424 * config.in, configure: Regenerate.
6425
6426 2015-02-26 Pedro Alves <palves@redhat.com>
6427
6428 * linux-low.c (linux_wait_1): When incrementing the PC past a
6429 program breakpoint always use the_low_target.breakpoint_len as
6430 increment, rather than the maximum between that and
6431 the_low_target.decr_pc_after_break.
6432
6433 2015-02-23 Pedro Alves <palves@redhat.com>
6434
6435 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
6436 thread was doing a step-over; always adjust the PC if
6437 we stepped over a permanent breakpoint.
6438 (linux_wait_1): If we stepped over breakpoint that was on top of a
6439 permanent breakpoint, manually advance the PC past it.
6440
6441 2015-02-23 Pedro Alves <palves@redhat.com>
6442
6443 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
6444 modes.
6445 (x86_fill_gregset, x86_store_gregset): Use it when handling
6446 $orig_eax.
6447
6448 2015-02-20 Pedro Alves <palves@redhat.com>
6449
6450 * thread-db.c: Include "nat/linux-procfs.h".
6451 (thread_db_init): Skip listing new threads if the kernel supports
6452 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
6453
6454 2015-02-20 Pedro Alves <palves@redhat.com>
6455
6456 * linux-low.c (status_pending_p_callback): Use ptid_match.
6457
6458 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
6459
6460 PR breakpoints/16812
6461 * linux-low.c (wstatus_maybe_breakpoint): Remove.
6462 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
6463 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
6464
6465 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
6466
6467 PR breakpoints/15956
6468 * tracepoint.c (cmd_qtinit): Add check for current_thread.
6469
6470 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6471
6472 * linux-low.c (linux_low_btrace_conf): Print size.
6473 * server.c (handle_btrace_conf_general_set): New.
6474 (hanle_general_set): Call handle_btrace_conf_general_set.
6475 (handle_query): Report Qbtrace-conf:bts:size as supported.
6476
6477 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6478
6479 * linux-low.c (linux_low_enable_btrace): Update parameters.
6480 (linux_low_btrace_conf): New.
6481 (linux_target_ops)<to_btrace_conf>: Initialize.
6482 * server.c (current_btrace_conf): New.
6483 (handle_btrace_enable): Rename to ...
6484 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
6485 to target_enable_btrace. Update comment. Update users.
6486 (handle_qxfer_btrace_conf): New.
6487 (qxfer_packets): Add btrace-conf entry.
6488 (handle_query): Report qXfer:btrace-conf:read as supported packet.
6489 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
6490 (target_ops)<read_btrace_conf>: New.
6491 (target_enable_btrace): Update parameters.
6492 (target_read_btrace_conf): New.
6493
6494 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6495
6496 * server.c (handle_btrace_general_set): Remove call to
6497 target_supports_btrace.
6498 (supported_btrace_packets): New.
6499 (handle_query): Call supported_btrace_packets.
6500 * target.h: include btrace-common.h.
6501 (btrace_target_info): Removed.
6502 (supports_btrace, target_supports_btrace): Update parameters.
6503
6504 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
6505
6506 * Makefile.in (SFILES): Add common/btrace-common.c.
6507 (OBS): Add common/btrace-common.o.
6508 (btrace-common.o): Add build rules.
6509 * linux-low: Include btrace-common.h.
6510 (linux_low_read_btrace): Use struct btrace_data. Call
6511 btrace_data_init and btrace_data_fini.
6512
6513 2015-02-06 Pedro Alves <palves@redhat.com>
6514
6515 * thread-db.c (find_new_threads_callback): Add debug output.
6516
6517 2015-02-04 Pedro Alves <palves@redhat.com>
6518
6519 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
6520 (resume_stopped_resumed_lwps): New function.
6521 (linux_wait_for_event_filtered): Use it.
6522
6523 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6524
6525 * Makefile.in (SFILES): Add linux-personality.c.
6526 (linux-personality.o): New rule.
6527 * configure.srv (srv_linux_obj): Add linux-personality.o to the
6528 list of objects to be built.
6529 * linux-low.c: Include nat/linux-personality.h.
6530 (linux_create_inferior): Remove code to disable address space
6531 randomization (moved to ../nat/linux-personality.c). Create
6532 cleanup to disable address space randomization.
6533
6534 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
6535
6536 * Makefile.in (posix-strerror.o): New rule.
6537 (mingw-strerror.o): Likewise.
6538 * configure: Regenerated.
6539 * configure.ac: Source file ../common/common.host. Initialize new
6540 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
6541
6542 2015-01-14 Yao Qi <yao@codesourcery.com>
6543
6544 * Makefile.in (SFILES): Add nat/ppc-linux.c.
6545 (ppc-linux.o): New rule.
6546 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
6547 * configure.ac: AC_CHECK_FUNCS(getauxval).
6548 * config.in: Re-generated.
6549 * configure: Re-generated.
6550 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
6551 ppc64_64bit_inferior_p
6552
6553 2015-01-14 Yao Qi <yao@codesourcery.com>
6554
6555 * linux-ppc-low.c: Include "nat/ppc-linux.h".
6556 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
6557 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
6558 (PT_ORIG_R3, PT_TRAP): Likewise.
6559 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
6560 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
6561 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
6562
6563 2015-01-10 Joel Brobecker <brobecker@adacore.com>
6564
6565 * i387-fp.c (i387_cache_to_xsave): In look over
6566 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
6567 zmmh_low_space field by use of zmmh_high_space.
6568
6569 2015-01-09 Pedro Alves <palves@redhat.com>
6570
6571 * linux-low.c (step_over_bkpt): Move higher up in the file.
6572 (handle_extended_wait): Don't store the stop_pc here.
6573 (get_stop_pc): Adjust comments and rename to ...
6574 (check_stopped_by_breakpoint): ... this. Record whether the LWP
6575 stopped for a software breakpoint or hardware breakpoint.
6576 (thread_still_has_status_pending_p): New function.
6577 (status_pending_p_callback): Use
6578 thread_still_has_status_pending_p. If the event is no longer
6579 interesting, resume the LWP.
6580 (handle_tracepoints): Add assert.
6581 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
6582 (wstatus_maybe_breakpoint): New function.
6583 (cancel_breakpoint): Delete function.
6584 (check_stopped_by_watchpoint): New function, factored out from
6585 linux_low_filter_event.
6586 (lp_status_maybe_breakpoint): Delete function.
6587 (linux_low_filter_event): Remove filter_ptid argument.
6588 Leave thread group exits pending here. Store the LWP's stop PC.
6589 Always leave events pending.
6590 (linux_wait_for_event_filtered): Pull all events out of the
6591 kernel, and leave them all pending.
6592 (count_events_callback, select_event_lwp_callback): Consider all
6593 events.
6594 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
6595 (select_event_lwp): Only give preference to the stepping LWP in
6596 all-stop mode. Adjust comments.
6597 (ignore_event): New function.
6598 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
6599 references to cancel_breakpoints. Adjust to renames. Also give
6600 equal priority to all LWPs that have had events in non-stop mode.
6601 If reporting a software breakpoint event, unadjust the LWP's PC.
6602 (linux_wait): If linux_wait_1 returned an ignored event, retry.
6603 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
6604 Adjust.
6605 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
6606 (resume_status_pending_p): Use thread_still_has_status_pending_p.
6607 (linux_stopped_by_watchpoint): Adjust.
6608 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
6609 * linux-low.h (enum lwp_stop_reason): New.
6610 (struct lwp_info) <stop_pc>: Adjust comment.
6611 <stopped_by_watchpoint>: Delete field.
6612 <stop_reason>: New field.
6613 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
6614 * mem-break.c (software_breakpoint_inserted_here)
6615 (hardware_breakpoint_inserted_here): New function.
6616 * mem-break.h (software_breakpoint_inserted_here)
6617 (hardware_breakpoint_inserted_here): Declare.
6618 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
6619 (cancel_breakpoints): Delete.
6620 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
6621 (upload_fast_traceframes): Remove references to
6622 cancel_breakpoints.
6623
6624 2015-01-09 Pedro Alves <palves@redhat.com>
6625
6626 * thread-db.c (find_new_threads_callback): Ignore thread if the
6627 kernel thread ID is -1.
6628
6629 2015-01-09 Pedro Alves <palves@redhat.com>
6630
6631 * linux-low.c (linux_attach_fail_reason_string): Move to
6632 nat/linux-ptrace.c, and rename.
6633 (linux_attach_lwp): Update comment.
6634 (attach_proc_task_lwp_callback): New function.
6635 (linux_attach): Adjust to rename and use
6636 linux_proc_attach_tgid_threads.
6637 (linux_attach_fail_reason_string): Delete declaration.
6638
6639 2015-01-01 Joel Brobecker <brobecker@adacore.com>
6640
6641 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
6642 * server.c (gdbserver_version): Likewise.
6643
6644 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
6645
6646 * remote-utils.c: Include ctype.h.
6647 (input_interrupt): Explicitly handle the case when the char
6648 received is the NUL byte. Improve the printing of non-ASCII
6649 characters.
6650
6651 2014-12-16 Joel Brobecker <brobecker@adacore.com>
6652
6653 * linux-low.c (linux_low_filter_event): Update call to
6654 linux_enable_event_reporting following the addition of
6655 a new parameter to that function.
6656
6657 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
6658
6659 PR server/17457
6660 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
6661 (AARCH64_FPCR_REGNO): Likewise.
6662 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
6663 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
6664 (aarch64_store_fpregset): Likewise.
6665
6666 2014-12-15 Joel Brobecker <brobecker@adacore.com>
6667
6668 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
6669 Remove FIXME comment about assumption about N.
6670
6671 2014-12-13 Joel Brobecker <brobecker@adacore.com>
6672
6673 * configure.ac: If large-file support is disabled in GDBserver,
6674 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
6675 * configure: Regenerate.
6676
6677 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6678
6679 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
6680 warning upon ENODATA from ptrace.
6681 * linux-s390-low.c (s390_store_tdb): New.
6682 (s390_regsets): Add regset for NT_S390_TDB.
6683
6684 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6685
6686 * linux-low.c (regsets_store_inferior_registers): Skip regsets
6687 without a fill_function.
6688 * linux-s390-low.c (s390_fill_last_break): Remove.
6689 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
6690 (s390_arch_setup): Use regset's size instead of fill_function for
6691 loop end condition.
6692
6693 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6694
6695 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
6696 the regset's store function when ptrace returned an error.
6697 * regcache.c (get_thread_regcache): Invalidate register cache
6698 before fetching inferior's registers.
6699
6700 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
6701
6702 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
6703 while-loop as for-loop.
6704 (regsets_store_inferior_registers): Likewise.
6705
6706 2014-11-28 Yao Qi <yao@codesourcery.com>
6707
6708 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
6709 * config.in, configure: Re-generate.
6710 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
6711 is defined.
6712
6713 2014-11-21 Yao Qi <yao@codesourcery.com>
6714
6715 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
6716 (AC_CHECK_HEADERS): Remove malloc.h.
6717 * configure: Re-generated.
6718 * config.in: Re-generated.
6719 * server.h: Don't include alloca.h and malloc.h.
6720 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
6721 Don't include malloc.h.
6722
6723 2014-11-17 Joel Brobecker <brobecker@adacore.com>
6724
6725 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
6726 corresponding ERRNO check in same block.
6727
6728 2014-11-12 Pedro Alves <palves@redhat.com>
6729
6730 * server.c (cont_thread): Update comment.
6731 (start_inferior, attach_inferior): No longer clear cont_thread.
6732 (handle_v_cont): No longer set cont_thread.
6733 (captured_main): Clear cont_thread each time a GDB connects.
6734
6735 2014-11-12 Pedro Alves <palves@redhat.com>
6736
6737 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
6738 thread, and don't resume all threads if the Hc thread has exited.
6739
6740 2014-11-12 Pedro Alves <palves@redhat.com>
6741
6742 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
6743 the process group instead of to a specific LWP.
6744
6745 2014-10-15 Pedro Alves <palves@redhat.com>
6746
6747 PR server/17487
6748 * win32-arm-low.c (arm_set_thread_context): Remove current_event
6749 parameter.
6750 (arm_set_thread_context): Delete.
6751 (the_low_target): Adjust.
6752 * win32-i386-low.c (debug_registers_changed)
6753 (debug_registers_used): Delete.
6754 (update_debug_registers_callback): New function.
6755 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
6756 needing to update their debug registers.
6757 (win32_get_current_dr): New function.
6758 (x86_dr_low_get_addr, x86_dr_low_get_control)
6759 (x86_dr_low_get_status): Fetch the debug register from the thread
6760 record's context.
6761 (i386_initial_stuff): Adjust.
6762 (i386_get_thread_context): Remove current_event parameter. Don't
6763 clear debug_registers_changed nor copy DR values to
6764 debug_reg_state.
6765 (i386_set_thread_context): Delete.
6766 (i386_prepare_to_resume): New function.
6767 (i386_thread_added): Mark the thread as needing to update irs
6768 debug registers.
6769 (the_low_target): Remove i386_set_thread_context and install
6770 i386_prepare_to_resume.
6771 * win32-low.c (win32_get_thread_context): Adjust.
6772 (win32_set_thread_context): Use SetThreadContext
6773 directly.
6774 (win32_prepare_to_resume): New function.
6775 (win32_require_context): New function, factored out from ...
6776 (thread_rec): ... this.
6777 (continue_one_thread): Call win32_prepare_to_resume on each thread
6778 we're about to continue.
6779 (win32_resume): Call win32_prepare_to_resume on the event thread.
6780 * win32-low.h (struct win32_thread_info)
6781 <debug_registers_changed>: New field.
6782 (struct win32_target_ops): Change prototype of set_thread_context,
6783 delete set_thread_context and add prepare_to_resume.
6784 (win32_require_context): New declaration.
6785
6786 2014-10-08 Gary Benson <gbenson@redhat.com>
6787
6788 * server.h: Do not include common-exceptions.h.
6789
6790 2014-10-08 Gary Benson <gbenson@redhat.com>
6791
6792 * server.h: Do not include cleanups.h.
6793
6794 2014-09-30 James Hogan <james.hogan@imgtec.com>
6795
6796 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
6797 mips64-dsp-linux.c.
6798
6799 2014-09-23 Yao Qi <yao@codesourcery.com>
6800
6801 * linux-low.c (lp_status_maybe_breakpoint): New function.
6802 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
6803 (count_events_callback): Likewise.
6804 (select_event_lwp_callback): Likewise.
6805 (cancel_breakpoints_callback): Likewise.
6806
6807 2014-09-19 Don Breazeal <donb@codesourcery.com>
6808
6809 * linux-low.c (handle_extended_wait): Call
6810 linux_ptrace_get_extended_event.
6811 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
6812 linux_is_extended_waitstatus.
6813
6814 2014-09-16 Joel Brobecker <brobecker@adacore.com>
6815
6816 * Makefile.in (CPPFLAGS): Define.
6817 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
6818 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
6819
6820 2014-09-16 Gary Benson <gbenson@redhat.com>
6821
6822 * inferiors.h (current_inferior): Renamed as...
6823 (current_thread): New variable. All uses updated.
6824 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
6825 (maybe_move_out_of_jump_pad): Likewise.
6826 (cancel_breakpoint): Likewise.
6827 (linux_low_filter_event): Likewise.
6828 (wait_for_sigstop): Likewise.
6829 (linux_resume_one_lwp): Likewise.
6830 (need_step_over_p): Likewise.
6831 (start_step_over): Likewise.
6832 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
6833 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
6834 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
6835 and save_inferior as saved_thread.
6836 * regcache.c (get_thread_regcache): Renamed saved_inferior as
6837 saved_thread.
6838 (regcache_invalidate_thread): Likewise.
6839 * remote-utils.c (prepare_resume_reply): Likewise.
6840 * thread-db.c (thread_db_get_tls_address): Likewise.
6841 (disable_thread_event_reporting): Likewise.
6842 (remove_thread_event_breakpoints): Likewise.
6843 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
6844 as saved_thread.
6845 * target.h (set_desired_inferior): Renamed as...
6846 (set_desired_thread): New declaration. All uses updated.
6847 * server.c (myresume): Updated comment to reference thread instead
6848 of inferior.
6849 (handle_serial_event): Likewise.
6850 (handle_target_event): Likewise.
6851
6852 2014-09-12 Tom Tromey <tromey@redhat.com>
6853 Gary Benson <gbenson@redhat.com>
6854
6855 * regcache.h: Include common-regcache.h.
6856 (regcache_read_pc): Don't declare.
6857 * regcache.c (get_thread_regcache_for_ptid): New function.
6858
6859 2014-09-11 Tom Tromey <tromey@redhat.com>
6860 Gary Benson <gbenson@redhat.com>
6861
6862 * symbol.c: New file.
6863 * Makefile.in (SFILES): Add symbol.c.
6864 (OBS): Add symbol.o.
6865
6866 2014-09-11 Gary Benson <gbenson@redhat.com>
6867
6868 * target.c (target_stop_ptid, target_continue_ptid): New
6869 functions.
6870
6871 2014-09-11 Tom Tromey <tromey@redhat.com>
6872 Gary Benson <gbenson@redhat.com>
6873
6874 * target.h: Include target/target.h.
6875 * target.c (target_read_memory, target_read_uint32)
6876 (target_write_memory): New functions.
6877
6878 2014-09-11 Gary Benson <gbenson@redhat.com>
6879
6880 * server.h (debug_hw_points): Don't declare.
6881 * server.c (debug_hw_points): Don't define. Replace all uses
6882 with show_debug_regs.
6883 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
6884 all uses with show_debug_regs.
6885
6886 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
6887
6888 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
6889 endianness into account.
6890 (ppc_supply_ptrace_register): Likewise.
6891
6892 2014-09-03 James Hogan <james.hogan@imgtec.com>
6893
6894 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
6895 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
6896
6897 2014-09-03 Gary Benson <gbenson@redhat.com>
6898
6899 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
6900 ALL_DEBUG_ADDRESS_REGISTERS.
6901
6902 2014-09-02 Gary Benson <gbenson@redhat.com>
6903
6904 * i386-low.h: Renamed as...
6905 * x86-low.h: New file. All type, function and variable name
6906 prefixes changed from "i386_" to "x86_". All references updated.
6907 * i386-low.c: Renamed as...
6908 * x86-low.c: New file. All type, function and variable name
6909 prefixes changed from "i386_" to "x86_". All references updated.
6910
6911 2014-09-02 Gary Benson <gbenson@redhat.com>
6912
6913 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
6914 (x86_linux_new_thread): Likewise.
6915
6916 2014-08-29 Gary Benson <gbenson@redhat.com>
6917
6918 * server.h (setjmp.h): Do not include.
6919 (toplevel): Do not declare.
6920 (common-exceptions.h): Include.
6921 (cleanups.h): Likewise.
6922 * server.c (toplevel): Do not define.
6923 (exit_code): New static global.
6924 (detach_or_kill_for_exit_cleanup): New function.
6925 (main): New function. Original main renamed to...
6926 (captured_main): New function.
6927 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
6928
6929 2014-08-29 Gary Benson <gbenson@redhat.com>
6930
6931 * Makefile.in (SFILES): Add common/common-exceptions.c.
6932 (OBS): Add common-exceptions.o.
6933 (common-exceptions.o): New rule.
6934 * utils.c (prepare_to_throw_exception): New function.
6935
6936 2014-08-29 Gary Benson <gbenson@redhat.com>
6937
6938 * config.in: Regenerate.
6939 * configure: Likewise.
6940
6941 2014-08-29 Gary Benson <gbenson@redhat.com>
6942
6943 * Makefile.in (SFILES): Add common/cleanups.c.
6944 (OBS): cleanups.o.
6945 (cleanups.o): New rule.
6946
6947 2014-08-29 Gary Benson <gbenson@redhat.com>
6948
6949 * utils.c (internal_vwarning): New function.
6950
6951 2014-08-28 Gary Benson <gbenson@redhat.com>
6952
6953 * utils.h (fatal): Remove declaration.
6954 * utils.c (fatal): Remove function.
6955
6956 2014-08-28 Gary Benson <gbenson@redhat.com>
6957
6958 * tracepoint.c (gdb_agent_init): Replace fatal with
6959 perror_with_name.
6960 (initialize_tracepoint): Likewise.
6961
6962 2014-08-28 Gary Benson <gbenson@redhat.com>
6963
6964 * remote-utils.c (remote_prepare): Replace fatal with error.
6965
6966 2014-08-28 Gary Benson <gbenson@redhat.com>
6967
6968 * linux-low.c (linux_async): Replace fatal with warning.
6969 Tidy up and return.
6970 (linux_start_non_stop): Return -1 if linux_async failed.
6971
6972 2014-08-28 Gary Benson <gbenson@redhat.com>
6973
6974 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
6975 gdb_assert.
6976 (i386_dr_low_get_addr): Remove vague comment.
6977 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
6978 gdb_assert.
6979
6980 2014-08-28 Gary Benson <gbenson@redhat.com>
6981
6982 * inferiors.c (get_thread_process): Replace check with gdb_assert.
6983 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
6984 internal_error.
6985 (linux_resume_one_lwp): Likewise.
6986 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
6987 gdb_assert.
6988 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
6989 with internal_error.
6990 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
6991 (init_register_cache): Replace fatal with gdb_assert_not_reached.
6992 (find_register_by_name): Replace fatal with internal_error.
6993 (find_regno): Likewise.
6994 * tdesc.c (init_target_desc): Replace check with gdb_assert.
6995 * thread-db.c (thread_db_create_event): Likewise.
6996 (thread_db_load_search): Likewise.
6997 (try_thread_db_load_1): Likewise.
6998 * tracepoint.c (get_jump_space_head): Replace fatal with
6999 internal_error.
7000 (claim_trampoline_space): Likewise.
7001 (have_fast_tracepoint_trampoline_buffer): Likewise.
7002 (cmd_qtstart): Likewise.
7003 (stop_tracing): Likewise.
7004 (fast_tracepoint_collecting): Likewise.
7005 (target_malloc): Likewise.
7006 (download_tracepoint): Likewise.
7007 (download_trace_state_variables): Replace check with gdb_assert.
7008 (upload_fast_traceframes): Replace fatal with internal_error.
7009
7010 2014-08-19 Tom Tromey <tromey@redhat.com>
7011 Gary Benson <gbenson@redhat.com>
7012
7013 * Makefile.in (SFILES): Add common/common-debug.c.
7014 (OBS): Add common-debug.o.
7015 (common-debug.o): New rule.
7016 * debug.h (debug_printf): Don't declare.
7017 * debug.c (debug_printf): Renamed and rewritten as...
7018 (debug_vprintf): New function.
7019
7020 2014-08-19 Gary Benson <gbenson@redhat.com>
7021
7022 * utils.h: Do not include print-utils.h.
7023
7024 2014-08-19 Tom Tromey <tromey@redhat.com>
7025 Gary Benson <gbenson@redhat.com>
7026
7027 * server.h: Add static assertion.
7028 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
7029
7030 2014-08-19 Tom Tromey <tromey@redhat.com>
7031 Gary Benson <gbenson@redhat.com>
7032
7033 * Makefile.in (SFILES): Add common/errors.c.
7034 (OBS): Add errors.o.
7035 (IPA_OBS): Add errors-ipa.o.
7036 (errors.o): New rule.
7037 (errors-ipa.o): Likewise.
7038 * utils.h (perror_with_name, error, warning): Don't declare.
7039 * utils.c (warning): Renamed and rewritten as...
7040 (vwarning): New function.
7041 (error): Renamed and rewritten as...
7042 (verror): New function.
7043 (internal_error): Renamed and rewritten as...
7044 (internal_verror): New function.
7045
7046 2014-08-07 Gary Benson <gbenson@redhat.com>
7047
7048 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
7049 * configure: Regenerate.
7050 * config.in: Likewise.
7051 * server.h: Do not include errno.h.
7052 * event-loop.c: Likewise.
7053 * hostio-errno.c: Likewise.
7054 * linux-low.c: Likewise.
7055 * remote-utils.c: Likewise.
7056 * spu-low.c: Likewise.
7057 * utils.c: Likewise.
7058 * gdbreplay.c: Unconditionally include errno.h.
7059
7060 2014-08-07 Gary Benson <gbenson@redhat.com>
7061
7062 * server.h: Do not include string.h.
7063 * event-loop.c: Likewise.
7064 * linux-low.c: Likewise.
7065 * regcache.c: Likewise.
7066 * remote-utils.c: Likewise.
7067 * spu-low.c: Likewise.
7068 * utils.c: Likewise.
7069
7070 2014-08-07 Gary Benson <gbenson@redhat.com>
7071
7072 * server.h: Do not include gdb_assert.h.
7073
7074 2014-08-07 Gary Benson <gbenson@redhat.com>
7075
7076 * server.h: Do not include common-utils.h.
7077
7078 2014-08-07 Gary Benson <gbenson@redhat.com>
7079
7080 * server.h: Do not include ptid.h.
7081 * notif.h: Likewise.
7082
7083 2014-08-07 Gary Benson <gbenson@redhat.com>
7084
7085 * server.h: Do not include gdb_locale.h.
7086
7087 2014-08-07 Gary Benson <gbenson@redhat.com>
7088
7089 * server.h: Do not include gdb/signals.h.
7090 * win32-low.c: Likewise.
7091
7092 2014-08-07 Gary Benson <gbenson@redhat.com>
7093
7094 * server.h: Do not include pathmax.h.
7095
7096 2014-08-07 Gary Benson <gbenson@redhat.com>
7097
7098 * server.h: Do not include libiberty.h.
7099 * linux-bfin-low.c: Likewise.
7100
7101 2014-08-07 Gary Benson <gbenson@redhat.com>
7102
7103 * server.h: Do not include ansidecl.h.
7104
7105 2014-08-07 Gary Benson <gbenson@redhat.com>
7106
7107 * linux-x86-low.c: Do not include stddef.h.
7108 * lynx-ppc-low.c: Likewise.
7109 * tracepoint.c: Likewise.
7110
7111 2014-08-07 Gary Benson <gbenson@redhat.com>
7112
7113 * server.h: Do not include stdarg.h.
7114 * nto-low.c: Likewise.
7115
7116 2014-08-07 Gary Benson <gbenson@redhat.com>
7117
7118 * server.h: Do not include stdlib.h.
7119 * inferiors.c: Likewise.
7120 * linux-low.c: Likewise.
7121 * regcache.c: Likewise.
7122 * spu-low.c: Likewise.
7123 * tracepoint.c: Likewise.
7124 * utils.c: Likewise.
7125
7126 2014-08-07 Gary Benson <gbenson@redhat.com>
7127
7128 * server.h: Do not include stdio.h.
7129 * linux-low.c: Likewise.
7130 * remote-utils.c: Likewise.
7131 * spu-low.c: Likewise.
7132 * utils.c: Likewise.
7133 * wincecompat.c: Likewise.
7134
7135 2014-08-06 Gary Benson <gbenson@redhat.com>
7136
7137 * regcache.c (init_register_cache): Move conditionals inside if.
7138
7139 2014-08-06 Gary Benson <gbenson@redhat.com>
7140
7141 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
7142
7143 2014-07-31 Gary Benson <gbenson@redhat.com>
7144
7145 * ax.h: Do not include server.h.
7146 * gdbthread.h: Likewise.
7147 * lynx-low.h: Likewise.
7148 * notif.h: Likewise.
7149
7150 2014-07-30 Gary Benson <gbenson@redhat.com>
7151
7152 * server.h: Include common-defs.h.
7153 Do not include config.h or build-gnulib-gdbserver/config.h.
7154
7155 2014-07-30 Gary Benson <gbenson@redhat.com>
7156
7157 * hostio-errno.c: Move server.h to top of includes list.
7158 * inferiors.c: Likewise.
7159 * linux-x86-low.c: Likewise.
7160 * notif.c: Include server.h.
7161
7162 2014-07-24 Tom Tromey <tromey@redhat.com>
7163 Gary Benson <gbenson@redhat.com>
7164
7165 * server.h (CORE_ADDR): Now unsigned.
7166
7167 2014-07-16 Pedro Alves <palves@redhat.com>
7168
7169 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
7170
7171 2014-07-15 Pedro Alves <palves@redhat.com>
7172
7173 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
7174 copy.
7175
7176 2014-07-11 Pedro Alves <palves@redhat.com>
7177
7178 * linux-low.c (kill_wait_lwp): New function, based on
7179 kill_one_lwp_callback, but use my_waitpid directly.
7180 (kill_one_lwp_callback, linux_kill): Use it.
7181
7182 2014-06-23 Pedro Alves <palves@redhat.com>
7183
7184 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
7185 before setting DR0..DR3.
7186
7187 2014-06-20 Gary Benson <gbenson@redhat.com>
7188
7189 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
7190 * configure: Regenerated.
7191 * config.in: Likewise.
7192
7193 2014-06-20 Gary Benson <gbenson@redhat.com>
7194
7195 * Makefile.in (SFILES): Update locations for files moved
7196 from common to nat.
7197 (object file files): Reordered.
7198
7199 2014-06-20 Gary Benson <gbenson@redhat.com>
7200
7201 * i386-low.h (i386_dr_low_can_set_addr): Removed.
7202 (i386_dr_low_set_addr): Likewise.
7203 (i386_dr_low_get_addr): Likewise.
7204 (i386_dr_low_can_set_control): Likewise.
7205 (i386_dr_low_set_control): Likewise.
7206 (i386_dr_low_get_control): Likewise.
7207 (i386_dr_low_get_status): Likewise.
7208 (i386_get_debug_register_length): Likewise.
7209 * linux-x86-low.c (i386_dr_low_set_addr):
7210 Changed signature. Made static.
7211 (i386_dr_low_get_addr): Likewise.
7212 (i386_dr_low_set_control): Likewise.
7213 (i386_dr_low_get_control): Likewise.
7214 (i386_dr_low_get_status): Likewise.
7215 (i386_dr_low): New global variable.
7216 * win32-i386-low.c (i386_dr_low_set_addr):
7217 Changed signature. Made static.
7218 (i386_dr_low_get_addr): Likewise.
7219 (i386_dr_low_set_control): Likewise.
7220 (i386_dr_low_get_control): Likewise.
7221 (i386_dr_low_get_status): Likewise.
7222 (i386_dr_low): New global variable.
7223
7224 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
7225
7226 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
7227 * Makefile.in (AR, AR_FLAGS): Define.
7228 * configure: Regenerate.
7229
7230 2014-06-19 Gary Benson <gbenson@redhat.com>
7231
7232 * Makefile.in (i386-dregs.o): New rule.
7233 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
7234 * i386-low.c (target.h): Remove include.
7235 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
7236 (DR_CONTROL_SHIFT): Likewise.
7237 (DR_CONTROL_SIZE): Likewise.
7238 (DR_RW_EXECUTE): Likewise.
7239 (DR_RW_WRITE): Likewise.
7240 (DR_RW_READ): Likewise.
7241 (DR_RW_IORW): Likewise.
7242 (DR_LEN_1): Likewise.
7243 (DR_LEN_2): Likewise.
7244 (DR_LEN_4): Likewise.
7245 (DR_LEN_8): Likewise.
7246 (DR_LOCAL_ENABLE_SHIFT): Likewise.
7247 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
7248 (DR_ENABLE_SIZE): Likewise.
7249 (DR_LOCAL_SLOWDOWN): Likewise.
7250 (DR_GLOBAL_SLOWDOWN): Likewise.
7251 (DR_CONTROL_RESERVED): Likewise.
7252 (I386_DR_CONTROL_MASK): Likewise.
7253 (I386_DR_VACANT): Likewise.
7254 (I386_DR_LOCAL_ENABLE): Likewise.
7255 (I386_DR_GLOBAL_ENABLE): Likewise.
7256 (I386_DR_DISABLE): Likewise.
7257 (I386_DR_SET_RW_LEN): Likewise.
7258 (I386_DR_GET_RW_LEN): Likewise.
7259 (I386_DR_WATCH_HIT): Likewise.
7260 (i386_wp_op_t): Likewise.
7261 (i386_show_dr): Likewise.
7262 (i386_length_and_rw_bits): Likewise.
7263 (i386_insert_aligned_watchpoint): Likewise.
7264 (i386_remove_aligned_watchpoint): Likewise.
7265 (i386_handle_nonaligned_watchpoint): Likewise.
7266 i386_update_inferior_debug_regs(): Likewise.
7267 (i386_dr_insert_watchpoint): Likewise.
7268 (i386_dr_remove_watchpoint): Likewise.
7269 (i386_dr_region_ok_for_watchpoint): Likewise.
7270 (i386_dr_stopped_data_address): Likewise.
7271 (i386_dr_stopped_by_watchpoint): Likewise.
7272
7273 2014-06-19 Gary Benson <gbenson@redhat.com>
7274
7275 * i386-low.c (i386_dr_show): Renamed to
7276 i386_show_dr and made static. All uses updated.
7277 (i386_dr_length_and_rw_bits): Renamed to
7278 i386_length_and_rw_bits and made static.
7279 All uses updated.
7280 (i386_dr_insert_aligned_watchpoint): Renamed to
7281 i386_insert_aligned_watchpoint and made static.
7282 All uses updated.
7283 (i386_dr_remove_aligned_watchpoint): Renamed to
7284 i386_remove_aligned_watchpoint and made static.
7285 All uses updated.
7286 (i386_dr_update_inferior_debug_regs): Renamed to
7287 i386_update_inferior_debug_regs and made static.
7288 All uses updated.
7289
7290 2014-06-18 Gary Benson <gbenson@redhat.com>
7291
7292 * i386-low.h (i386_dr_low_can_set_addr): New macro.
7293 (i386_dr_low_can_set_control): Likewise.
7294 (i386_get_debug_register_length): Likewise.
7295 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
7296 (i386_dr_low_can_set_control): Likewise.
7297 (i386_get_debug_register_length): Likewise.
7298
7299 2014-06-17 Gary Benson <gbenson@redhat.com>
7300
7301 * i386-low.h (i386-dregs.h): New include.
7302 (DR_FIRSTADDR): Now in i386-dregs.h.
7303 (DR_LASTADDR): Likewise.
7304 (DR_NADDR): Likewise.
7305 (DR_STATUS): Likewise.
7306 (DR_CONTROL): Likewise.
7307 (i386_debug_reg_state): Likewise.
7308 (i386_dr_insert_watchpoint): Likewise.
7309 (i386_dr_remove_watchpoint): Likewise.
7310 (i386_dr_region_ok_for_watchpoint): Likewise.
7311 (i386_dr_stopped_data_address): Likewise.
7312 (i386_dr_stopped_by_watchpoint): Likewise.
7313 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
7314
7315 2014-06-18 Gary Benson <gbenson@redhat.com>
7316
7317 * i386-low.h (i386_low_insert_watchpoint): Renamed to
7318 i386_dr_insert_watchpoint.
7319 (i386_low_remove_watchpoint): Renamed to
7320 i386_dr_remove_watchpoint.
7321 (i386_low_region_ok_for_watchpoint): Renamed to
7322 i386_dr_region_ok_for_watchpoint.
7323 (i386_low_stopped_data_address): Renamed to
7324 i386_dr_stopped_data_address.
7325 (i386_low_stopped_by_watchpoint): Renamed to
7326 i386_dr_stopped_by_watchpoint.
7327 * i386-low.c (i386_show_dr): Renamed to
7328 i386_dr_show and made nonstatic. All uses updated.
7329 (i386_length_and_rw_bits): Renamed to
7330 i386_dr_length_and_rw_bits and made nonstatic.
7331 All uses updated.
7332 (i386_insert_aligned_watchpoint): Renamed to
7333 i386_dr_insert_aligned_watchpoint and made nonstatic.
7334 All uses updated.
7335 (i386_remove_aligned_watchpoint): Renamed to
7336 i386_dr_remove_aligned_watchpoint and made nonstatic.
7337 All uses updated.
7338 (i386_update_inferior_debug_regs): Renamed to
7339 i386_dr_update_inferior_debug_regs and made nonstatic.
7340 All uses updated.
7341 (i386_low_insert_watchpoint): Renamed to
7342 i386_dr_insert_watchpoint. All uses updated.
7343 (i386_low_remove_watchpoint): Renamed to
7344 i386_dr_remove_watchpoint. All uses updated.
7345 (i386_low_region_ok_for_watchpoint): Renamed to
7346 i386_dr_region_ok_for_watchpoint. All uses updated.
7347 (i386_low_stopped_data_address): Renamed to
7348 i386_dr_stopped_data_address. All uses updated.
7349 (i386_low_stopped_by_watchpoint): Renamed to
7350 i386_dr_stopped_by_watchpoint. All uses updated.
7351
7352 2014-06-18 Gary Benson <gbenson@redhat.com>
7353
7354 * i386-low.c (i386_dr_low_can_set_addr): New macro.
7355 (i386_dr_low_can_set_control): Likewise.
7356 (i386_insert_aligned_watchpoint): New check.
7357
7358 2014-06-18 Gary Benson <gbenson@redhat.com>
7359
7360 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
7361 Renamed to state.
7362
7363 2014-06-18 Gary Benson <gbenson@redhat.com>
7364
7365 * i386-low.c (i386_length_and_rw_bits): Use internal_error
7366 instead of fatal and error.
7367 (i386_handle_nonaligned_watchpoint): Likewise.
7368
7369 2014-06-18 Gary Benson <gbenson@redhat.com>
7370
7371 * i386-low.c (i386_get_debug_register_length): New macro.
7372 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
7373 (i386_show_dr): Use debug_printf instead of fprintf. Use
7374 phex to format values.
7375
7376 2014-06-18 Gary Benson <gbenson@redhat.com>
7377
7378 * i386-low.h: Comment changes.
7379 * i386-low.c: Likewise.
7380
7381 2014-06-18 Gary Benson <gbenson@redhat.com>
7382
7383 * i386-low.c: Whitespace changes.
7384
7385 2014-06-12 Tom Tromey <tromey@redhat.com>
7386
7387 * utils.c (freeargv): Remove.
7388
7389 2014-06-12 Tom Tromey <tromey@redhat.com>
7390
7391 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
7392 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
7393 (parse_debug_format_options): Likewise.
7394 (gdbserver_usage): Likewise.
7395 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
7396 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
7397 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
7398 against libiberty.
7399 ($(LIBGNU)): Depend on libiberty.
7400 (all-lib): Recurse into all subdirs.
7401 (install-only): Invoke "install" target in subdirs.
7402 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
7403 targets.
7404 * configure: Rebuild.
7405 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
7406 for vasprintf, vsnprintf, or gettimeofday.
7407 * configure.srv: Don't add safe-ctype.o or lbasename.o to
7408 srv_tgtobj.
7409
7410 2014-06-05 Joel Brobecker <brobecker@adacore.com>
7411
7412 * development.sh: Delete.
7413 * Makefile.in (config.status): Adjust dependency on development.sh.
7414 * configure.ac: Adjust development.sh source call.
7415 * configure: Regenerate.
7416
7417 2014-06-02 Pedro Alves <palves@redhat.com>
7418
7419 * ax.c (gdb_free_agent_expr): New function.
7420 * ax.h (gdb_free_agent_expr): New declaration.
7421 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
7422 list.
7423 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
7424 static.
7425 (clear_breakpoint_conditions_and_commands): New function.
7426 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
7427 (clear_breakpoint_conditions_and_commands): New declaration.
7428
7429 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
7430
7431 * linux-aarch64-low.c (asm/ptrace.h): Include.
7432
7433 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
7434
7435 Fix TLS access for -static -pthread.
7436 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
7437 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
7438 (thread_db_load_search, try_thread_db_load_1): Initialize it.
7439
7440 2014-05-20 Pedro Alves <palves@redhat.com>
7441
7442 * linux-aarch64-low.c (aarch64_insert_point)
7443 (aarch64_remove_point): No longer check whether the type is
7444 supported here. Adjust to new interface.
7445 (the_low_target): Install aarch64_supports_z_point_type as
7446 supports_z_point_type method.
7447 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
7448 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
7449 instead of a Z packet char. Adjust.
7450 (arm_supports_z_point_type): New function.
7451 (arm_insert_point, arm_remove_point): Adjust to new interface.
7452 (the_low_target): Install arm_supports_z_point_type.
7453 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
7454 (cris_insert_point, cris_remove_point): Adjust to new interface.
7455 Don't check whether the type is supported here.
7456 (the_low_target): Install cris_supports_z_point_type.
7457 * linux-low.c (linux_supports_z_point_type): New function.
7458 (linux_insert_point, linux_remove_point): Adjust to new interface.
7459 * linux-low.h (struct linux_target_ops) <insert_point,
7460 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
7461 raw_breakpoint pointer parameter.
7462 <supports_z_point_type>: New method.
7463 * linux-mips-low.c (mips_supports_z_point_type): New function.
7464 (mips_insert_point, mips_remove_point): Adjust to new interface.
7465 Use mips_supports_z_point_type.
7466 (the_low_target): Install mips_supports_z_point_type.
7467 * linux-ppc-low.c (the_low_target): Install NULL as
7468 supports_z_point_type method.
7469 * linux-s390-low.c (the_low_target): Install NULL as
7470 supports_z_point_type method.
7471 * linux-sparc-low.c (the_low_target): Install NULL as
7472 supports_z_point_type method.
7473 * linux-x86-low.c (x86_supports_z_point_type): New function.
7474 (x86_insert_point): Adjust to new insert_point interface. Use
7475 insert_memory_breakpoint. Adjust to new
7476 i386_low_insert_watchpoint interface.
7477 (x86_remove_point): Adjust to remove_point interface. Use
7478 remove_memory_breakpoint. Adjust to new
7479 i386_low_remove_watchpoint interface.
7480 (the_low_target): Install x86_supports_z_point_type.
7481 * lynx-low.c (lynx_target_ops): Install NULL as
7482 supports_z_point_type callback.
7483 * nto-low.c (nto_supports_z_point_type): New.
7484 (nto_insert_point, nto_remove_point): Adjust to new interface.
7485 (nto_target_ops): Install nto_supports_z_point_type.
7486 * mem-break.c: Adjust intro comment.
7487 (struct raw_breakpoint) <raw_type, size>: New fields.
7488 <inserted>: Update comment.
7489 <shlib_disabled>: Delete field.
7490 (enum bkpt_type) <gdb_breakpoint>: Delete value.
7491 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
7492 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
7493 (raw_bkpt_type_to_target_hw_bp_type): New function.
7494 (find_enabled_raw_code_breakpoint_at): New function.
7495 (find_raw_breakpoint_at): New type and size parameters. Use them.
7496 (insert_memory_breakpoint): New function, based off
7497 set_raw_breakpoint_at.
7498 (remove_memory_breakpoint): New function.
7499 (set_raw_breakpoint_at): Reimplement.
7500 (set_breakpoint): New, based on set_breakpoint_at.
7501 (set_breakpoint_at): Reimplement.
7502 (delete_raw_breakpoint): Go through the_target->remove_point
7503 instead of assuming memory breakpoints.
7504 (find_gdb_breakpoint_at): Delete.
7505 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
7506 (find_gdb_breakpoint): New function.
7507 (set_gdb_breakpoint_at): Delete.
7508 (z_type_supported): New function.
7509 (set_gdb_breakpoint_1): New function, loosely based off
7510 set_gdb_breakpoint_at.
7511 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
7512 (delete_gdb_breakpoint_at): Delete.
7513 (delete_gdb_breakpoint_1): New function, loosely based off
7514 delete_gdb_breakpoint_at.
7515 (delete_gdb_breakpoint): New function.
7516 (clear_gdb_breakpoint_conditions): Rename to ...
7517 (clear_breakpoint_conditions): ... this. Don't handle a NULL
7518 breakpoint.
7519 (add_condition_to_breakpoint): Make static.
7520 (add_breakpoint_condition): Take a struct breakpoint pointer
7521 instead of an address. Adjust.
7522 (gdb_condition_true_at_breakpoint): Rename to ...
7523 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
7524 z_type parameter.
7525 (gdb_condition_true_at_breakpoint): Reimplement.
7526 (add_breakpoint_commands): Take a struct breakpoint pointer
7527 instead of an address. Adjust.
7528 (gdb_no_commands_at_breakpoint): Rename to ...
7529 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
7530 parameter. Return true if no breakpoint was found. Change debug
7531 output.
7532 (gdb_no_commands_at_breakpoint): Reimplement.
7533 (run_breakpoint_commands): Rename to ...
7534 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
7535 and change return type to boolean.
7536 (run_breakpoint_commands): New function.
7537 (gdb_breakpoint_here): Also check for Z1 breakpoints.
7538 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
7539 breakpoint. Go through the_target->remove_point instead of
7540 assuming memory breakpoint.
7541 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
7542 software and hardware breakpoints.
7543 (reinsert_raw_breakpoint): Go through the_target->insert_point
7544 instead of assuming memory breakpoint.
7545 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
7546 software and hardware breakpoints.
7547 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
7548 Check both software and hardware breakpoints.
7549 (validate_inserted_breakpoint): Assert the breakpoint is a
7550 software breakpoint. Set the inserted flag to -1 instead of
7551 setting shlib_disabled.
7552 (delete_disabled_breakpoints): Adjust.
7553 (validate_breakpoints): Only validate software breakpoints.
7554 Adjust to inserted flag change.
7555 (check_mem_read, check_mem_write): Skip breakpoint types other
7556 than software breakpoints. Adjust to inserted flag change.
7557 * mem-break.h (enum raw_bkpt_type): New enum.
7558 (raw_breakpoint, struct process_info): Forward declare.
7559 (Z_packet_to_target_hw_bp_type): Delete declaration.
7560 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
7561 (set_gdb_breakpoint, delete_gdb_breakpoint)
7562 (clear_breakpoint_conditions): New declarations.
7563 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
7564 (breakpoint_inserted_here): Update comment.
7565 (add_breakpoint_condition, add_breakpoint_commands): Replace
7566 address parameter with a breakpoint pointer parameter.
7567 (gdb_breakpoint_here): Update comment.
7568 (delete_gdb_breakpoint_at): Delete.
7569 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
7570 * server.c (process_point_options): Take a struct breakpoint
7571 pointer instead of an address. Adjust.
7572 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
7573 delete_gdb_breakpoint.
7574 * spu-low.c (spu_target_ops): Install NULL as
7575 supports_z_point_type method.
7576 * target.h: Include mem-break.h.
7577 (struct target_ops) <prepare_to_access_memory>: Update comment.
7578 <supports_z_point_type>: New field.
7579 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7580 instead of a char. Also take a raw breakpoint pointer.
7581 * win32-arm-low.c (the_low_target): Install NULL as
7582 supports_z_point_type.
7583 * win32-i386-low.c (i386_supports_z_point_type): New function.
7584 (i386_insert_point, i386_remove_point): Adjust to new interface.
7585 (the_low_target): Install i386_supports_z_point_type.
7586 * win32-low.c (win32_supports_z_point_type): New function.
7587 (win32_insert_point, win32_remove_point): Adjust to new interface.
7588 (win32_target_ops): Install win32_supports_z_point_type.
7589 * win32-low.h (struct win32_target_ops):
7590 <supports_z_point_type>: New method.
7591 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
7592 instead of a char. Also take a raw breakpoint pointer.
7593
7594 2014-05-20 Pedro Alves <palves@redhat.com>
7595
7596 * mem-break.h: Include break-common.h.
7597 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7598 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
7599 (Z_packet_to_target_hw_bp_type): New declaration.
7600 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
7601 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
7602 (Z_PACKET_ACCESS_WP): Delete macros.
7603 (Z_packet_to_hw_type): Delete function.
7604 * i386-low.h: Don't include break-common.h here.
7605 (Z_packet_to_hw_type): Delete declaration.
7606 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
7607 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7608 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
7609 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
7610 * linux-aarch64-low.c: Don't include break-common.h here.
7611 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
7612 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
7613 (Z_packet_to_target_hw_bp_type): Delete function.
7614 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
7615 function.
7616 (mips_insert_point, mips_remove_point): Use
7617 Z_packet_to_target_hw_bp_type.
7618
7619 2014-05-20 Pedro Alves <palves@redhat.com>
7620
7621 * linux-aarch64-low.c: Include break-common.h.
7622 (enum target_point_type): Delete.
7623 (Z_packet_to_point_type): Rename to ...
7624 (Z_packet_to_target_hw_bp_type): ... this, and return a
7625 target_hw_bp_type instead.
7626 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
7627 instead of an enum target_point_type.
7628 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
7629 breakpoint type.
7630 (aarch64_dr_state_insert_one_point)
7631 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
7632 (aarch64_handle_aligned_watchpoint)
7633 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
7634 Take an enum target_hw_bp_type instead of an enum
7635 target_point_type.
7636 (aarch64_supports_z_point_type): New function.
7637 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
7638 use Z_packet_to_target_hw_bp_type.
7639
7640 2014-05-20 Joel Brobecker <brobecker@adacore.com>
7641
7642 * configure.ac: Only use -Werror by default when DEVELOPMENT
7643 is true.
7644 * configure: Regenerate.
7645
7646 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
7647
7648 Fix gdbserver qGetTLSAddr for x86_64 -m32.
7649 * linux-x86-low.c (X86_64_USER_REGS): New.
7650 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
7651
7652 2014-04-28 Yao Qi <yao@codesourcery.com>
7653
7654 * Makefile.in (i386-avx512.c): Fix the typo of generated file
7655 name.
7656
7657 2014-04-25 Pedro Alves <palves@redhat.com>
7658
7659 PR server/16255
7660 * linux-low.c (linux_attach_fail_reason_string): New function.
7661 (linux_attach_lwp): Delete.
7662 (linux_attach_lwp_1): Rename to ...
7663 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
7664 argument. Remove "initial" parameter. Return int instead of
7665 void. Don't error or warn here.
7666 (linux_attach): Adjust to call linux_attach_lwp. Call error on
7667 failure to attach to the tgid. Call warning when failing to
7668 attach to an lwp.
7669 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
7670 argument. Remove "initial" parameter. Return int instead of
7671 void. Don't error or warn here.
7672 (linux_attach_fail_reason_string): New declaration.
7673 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
7674 interface change. Use linux_attach_fail_reason_string.
7675
7676 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
7677 Walfred Tedeschi <walfred.tedeschi@intel.com>
7678
7679 * Makefile.in: Added rules to handle new files
7680 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
7681 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
7682 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
7683 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
7684 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
7685 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
7686 x32-avx512-linux.o.
7687 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
7688 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
7689 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
7690 i386/x32-avx512.xml.
7691 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
7692 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
7693 i386/x32-avx512-linux.xml.
7694 * i387-fp.c (num_avx512_k_registers): New constant for number
7695 of K registers.
7696 (num_avx512_zmmh_low_registers): New constant for number of
7697 lower ZMM registers (0-15).
7698 (num_avx512_zmmh_high_registers): New constant for number of
7699 higher ZMM registers (16-31).
7700 (num_avx512_ymmh_registers): New contant for number of higher
7701 YMM registers (ymm16-31 added by avx521 on x86_64).
7702 (num_avx512_xmm_registers): New constant for number of higher
7703 XMM registers (xmm16-31 added by AVX512 on x86_64).
7704 (struct i387_xsave): Add space for AVX512 registers.
7705 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
7706 Add code to handle AVX512 registers.
7707 (i387_xsave_to_cache): Add code to handle AVX512 registers.
7708 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
7709 prototypei from generated file.
7710 (tdesc_amd64_avx512_linux): Likewise.
7711 (init_registers_x32_avx512_linux): Likewise.
7712 (tdesc_x32_avx512_linux): Likewise.
7713 (init_registers_i386_avx512_linux): Likewise.
7714 (tdesc_i386_avx512_linux): Likewise.
7715 (x86_64_regmap): Add AVX512 registers.
7716 (x86_linux_read_description): Add code to handle AVX512 XSTATE
7717 mask.
7718 (initialize_low_arch): Add code to initialize AVX512 registers.
7719
7720 2014-04-23 Pedro Alves <palves@redhat.com>
7721
7722 * mem-break.c (find_gdb_breakpoint_at): Make static.
7723 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
7724
7725 2014-04-23 Pedro Alves <palves@redhat.com>
7726
7727 * i386-low.c: Don't include break-common.h here.
7728 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7729 prototype to take target_hw_bp_type as argument instead of a Z
7730 packet char.
7731 * i386-low.h: Include break-common.h here.
7732 (Z_packet_to_hw_type): Declare.
7733 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
7734 prototypes.
7735 * linux-x86-low.c (x86_insert_point): Convert the packet number to
7736 a target_hw_bp_type before calling i386_low_insert_watchpoint.
7737 (x86_remove_point): Convert the packet number to a
7738 target_hw_bp_type before calling i386_low_remove_watchpoint.
7739 * win32-i386-low.c (i386_insert_point): Convert the packet number
7740 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
7741 (i386_remove_point): Convert the packet number to a
7742 target_hw_bp_type before calling i386_low_remove_watchpoint.
7743
7744 2014-04-23 Pedro Alves <palves@redhat.com>
7745
7746 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
7747
7748 2014-04-10 Pedro Alves <palves@redhat.com>
7749
7750 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
7751 Check if the condition or command is NULL before checking if the
7752 breakpoint is known. On success, return true.
7753 * mem-break.h (add_breakpoint_condition): Document return.
7754 (add_breakpoint_commands): Add describing comment.
7755 * server.c (skip_to_semicolon): New function.
7756 (process_point_options): Use it.
7757
7758 2014-04-09 Pedro Alves <palves@redhat.com>
7759
7760 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
7761 to lwpid_of.
7762
7763 2014-02-27 Pedro Alves <palves@redhat.com>
7764
7765 PR 12702
7766 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
7767 macros.
7768 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
7769 output.
7770 (last_thread_of_process_p): Take a PID argument instead of a
7771 thread pointer.
7772 (linux_wait_for_lwp): Delete.
7773 (num_lwps, check_zombie_leaders, not_stopped_callback): New
7774 functions.
7775 (linux_low_filter_event): New function, party factored out from
7776 linux_wait_for_event.
7777 (linux_wait_for_event): Rename to ...
7778 (linux_wait_for_event_filtered): ... this. Add new filter ptid
7779 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
7780 sigsuspend. Check for zombie leaders.
7781 (linux_wait_for_event): Reimplement as wrapper around
7782 linux_wait_for_event_filtered.
7783 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
7784 a normal or signal exit is seen, it's the whole process exiting.
7785 (wait_for_sigstop): No longer a for_each_inferior callback.
7786 Rewrite on top of linux_wait_for_event_filtered.
7787 (stop_all_lwps): Call wait_for_sigstop directly.
7788 * server.c (resume, handle_target_event): Handle
7789 TARGET_WAITKIND_NO_RESUMED.
7790
7791 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7792
7793 * win32-low.c (psapi_get_dll_name,
7794 * win32_CreateToolhelp32Snapshot): Delete.
7795 (win32_CreateToolhelp32Snapshot, win32_Module32First)
7796 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
7797 Delete.
7798 (handle_load_dll): Add function description.
7799 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
7800
7801 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7802
7803 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
7804 Add comment.
7805 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
7806 base address when calling win32_add_one_solib.
7807 (handle_load_dll): Delete local variable load_addr.
7808 Remove 0x1000 offset applied to DLL base address when calling
7809 win32_add_one_solib.
7810 (handle_unload_dll): Add comment.
7811
7812 2014-02-26 Joel Brobecker <brobecker@adacore.com>
7813
7814 * win32-low.c (win32_add_all_dlls): Renames
7815 win32_ensure_ntdll_loaded. Rewrite function documentation.
7816 Adjust implementation to always load all DLLs.
7817 Add 0x1000 offset to DLL base address when calling
7818 win32_add_one_solib.
7819 (child_initialization_done): New static global.
7820 (do_initial_child_stuff): Set child_initialization_done to
7821 zero during child initialization, and 1 after. Replace call
7822 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
7823 Add comment.
7824 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
7825 (handle_unload_dll): Add function documentation.
7826 (get_child_debug_event): Ignore load and unload DLL events
7827 during child initialization.
7828
7829 2014-02-20 Doug Evans <dje@google.com>
7830
7831 Remove global all_lwps.
7832 * inferiors.h (ptid_of): Move here from linux-low.h.
7833 (pid_of, lwpid_of): Ditto.
7834 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
7835 parameter is a struct thread_info * now.
7836 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
7837 directly. Pass &all_threads to find_inferior instead of &all_lwps.
7838 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
7839 directly.
7840 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
7841 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
7842 * linux-arm-low.c (update_registers_callback): Update, "entry"
7843 parameter is a struct thread_info * now.
7844 Fetch lwpid from current_inferior directly.
7845 (arm_insert_point): Pass &all_threads to find_inferior instead of
7846 &all_lwps.
7847 (arm_remove_point): Ditto.
7848 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
7849 (arm_prepare_to_resume): Fetch pid from thread.
7850 (arm_read_description): Fetch lwpid from current_inferior directly.
7851 * linux-low.c (all_lwps): Delete.
7852 (delete_lwp): Delete call to remove_inferior.
7853 (handle_extended_wait): Fetch lwpid from thread.
7854 (add_lwp): Don't set lwp->entry.id. Remove call to
7855 add_inferior_to_list.
7856 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
7857 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
7858 (kill_one_lwp_callback): Ditto.
7859 (linux_kill): Don't dereference NULL pointer.
7860 Fetch ptid,lwpid from thread.
7861 (get_detach_signal): Fetch ptid from thread.
7862 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
7863 Simplify call to regcache_invalidate_thread.
7864 (delete_lwp_callback): Update, "entry" parameter is a
7865 struct thread_info * now. Fetch pid from thread.
7866 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
7867 (status_pending_p_callback): Update, "entry" parameter is a
7868 struct thread_info * now. Fetch ptid from thread.
7869 (find_lwp_pid): Update, "entry" parameter is a
7870 struct thread_info * now.
7871 (linux_wait_for_lwp): Fetch pid from thread.
7872 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
7873 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
7874 (enqueue_one_deferred_signal): Fetch lwpid from thread.
7875 (dequeue_one_deferred_signal): Ditto.
7876 (cancel_breakpoint): Fetch ptid from current_inferior.
7877 (linux_wait_for_event): Pass &all_threads to find_inferior,
7878 not &all_lwps. Fetch ptid, lwpid from thread.
7879 (count_events_callback): Update, "entry" parameter is a
7880 struct thread_info * now.
7881 (select_singlestep_lwp_callback): Ditto.
7882 (select_event_lwp_callback): Ditto.
7883 (cancel_breakpoints_callback): Ditto.
7884 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
7885 not &all_lwps.
7886 (select_event_lwp): Ditto. Fetch ptid from event_thread.
7887 (unsuspend_one_lwp): Update, "entry" parameter is a
7888 struct thread_info * now.
7889 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
7890 not &all_lwps.
7891 (linux_stabilize_threads): Ditto. And for for_each_inferior.
7892 Fetch lwpid from thread, not lwp.
7893 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
7894 Pass &all_threads to find_inferior, not &all_lwps.
7895 (send_sigstop): Fetch lwpid from thread, not lwp.
7896 (send_sigstop_callback): Update, "entry" parameter is a
7897 struct thread_info * now.
7898 (suspend_and_send_sigstop_callback): Ditto.
7899 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
7900 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
7901 struct thread_info * now.
7902 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
7903 from thread, lwp.
7904 (lwp_running): Update, "entry" parameter is a
7905 struct thread_info * now.
7906 (stop_all_lwps): Fetch ptid from thread.
7907 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
7908 (linux_resume_one_lwp): Fetch lwpid from thread.
7909 (linux_set_resume_request): Update, "entry" parameter is a
7910 struct thread_info * now. Fetch pid, lwpid from thread.
7911 (resume_status_pending_p): Update, "entry" parameter is a
7912 struct thread_info * now.
7913 (need_step_over_p): Ditto. Fetch lwpid from thread.
7914 (start_step_over): Fetch lwpid from thread.
7915 (linux_resume_one_thread): Update, "entry" parameter is a
7916 struct thread_info * now. Fetch lwpid from thread.
7917 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
7918 (proceed_one_lwp): Update, "entry" parameter is a
7919 struct thread_info * now. Fetch lwpid from thread.
7920 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
7921 struct thread_info * now.
7922 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
7923 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
7924 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
7925 directly.
7926 (regsets_store_inferior_registers): Ditto.
7927 (fetch_register, store_register): Ditto.
7928 (linux_read_memory, linux_write_memory): Ditto.
7929 (linux_request_interrupt): Ditto.
7930 (linux_read_auxv): Ditto.
7931 (linux_xfer_siginfo): Ditto.
7932 (linux_qxfer_spu): Ditto.
7933 (linux_qxfer_libraries_svr4): Ditto.
7934 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
7935 moved to inferiors.h.
7936 (get_lwp): Delete.
7937 (get_thread_lwp): Update.
7938 (struct lwp_info): Delete member "entry". Simplify comment for
7939 member "thread".
7940 (all_lwps): Delete.
7941 * linux-mips-low.c (mips_read_description): Fetch lwpid from
7942 current_inferior directly.
7943 (update_watch_registers_callback): Update, "entry" parameter is a
7944 struct thread_info * now. Fetch pid from thread.
7945 (mips_linux_prepare_to_resume): Fetch ptid from thread.
7946 (mips_insert_point): Fetch lwpid from current_inferior.
7947 Pass &all_threads to find_inferior, not &all_lwps.
7948 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
7949 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
7950 directly.
7951 (mips_stopped_data_address): Ditto.
7952 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
7953 directly.
7954 * linux-tile-low.c (tile_arch_setup): Ditto.
7955 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
7956 (update_debug_registers_callback): Update, "entry" parameter is a
7957 struct thread_info * now. Fetch pid from thread.
7958 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
7959 Pass &all_threads to find_inferior, not &all_lwps.
7960 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
7961 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
7962 Pass &all_threads to find_inferior, not &all_lwps.
7963 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
7964 (i386_dr_low_get_status): Ditto.
7965 (x86_linux_prepare_to_resume): Fetch ptid from thread.
7966 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
7967 (x86_linux_read_description): Ditto.
7968 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
7969
7970 2014-02-20 Doug Evans <dje@google.com>
7971
7972 * inferiors.c (get_first_inferior): Fix buglet.
7973
7974 2014-02-19 Doug Evans <dje@google.com>
7975
7976 * gdbthread.h (add_thread): Change result type to struct thread_info *.
7977 * inferiors.c (add_thread): Change result type to struct thread_info *.
7978 All callers updated.
7979 (add_lwp): Call add_thread here instead of in callers.
7980 All callers updated.
7981 * linux-low.h (get_lwp_thread): Rewrite.
7982 (struct lwp_info): New member "thread".
7983
7984 2014-02-19 Doug Evans <dje@google.com>
7985
7986 * linux-low.c (add_lwp): Change result to struct lwp_info *.
7987 All callers updated.
7988
7989 2014-02-19 Doug Evans <dje@google.com>
7990
7991 * inferiors.c (add_thread): Fix whitespace.
7992
7993 2014-02-19 Doug Evans <dje@google.com>
7994
7995 * dll.c (clear_dlls): Replace accessing list implemention details
7996 with API function.
7997 * gdbthread.h (get_first_thread): Declare.
7998 * inferiors.c (for_each_inferior_with_data): New function.
7999 (get_first_thread): New function.
8000 (find_thread_ptid): Simplify.
8001 (get_first_inferior): New function.
8002 (clear_list): Delete.
8003 (one_inferior_p): New function.
8004 (clear_inferior_list): New function.
8005 (clear_inferiors): Update.
8006 * inferiors.h (for_each_inferior_with_data): Declare.
8007 (clear_inferior_list): Declare.
8008 (one_inferior_p): Declare.
8009 (get_first_inferior): Declare.
8010 * linux-low.c (linux_wait_for_event): Replace accessing list
8011 implemention details with API function.
8012 * server.c (target_running): Ditto.
8013 (accumulate_file_name_length): New function.
8014 (emit_dll_description): New function.
8015 (handle_qxfer_libraries): Replace accessing list implemention
8016 details with API function.
8017 (handle_qxfer_threads_worker): New function.
8018 (handle_qxfer_threads_proper): Replace accessing list implemention
8019 details with API function.
8020 (handle_query): Ditto.
8021 (visit_actioned_threads_callback_ftype): New typedef.
8022 (visit_actioned_threads_data): New struct.
8023 (visit_actioned_threads): Rewrite to be find_inferior callback.
8024 (resume): Call find_inferior.
8025 (handle_status): Replace accessing list implemention
8026 details with API function.
8027 (process_serial_event): Replace accessing list implemention details
8028 with API function.
8029 * target.c (set_desired_inferior): Replace accessing list implemention
8030 details with API function.
8031 * tracepoint.c (same_process_p): New function.
8032 (gdb_agent_about_to_close): Replace accessing list implemention
8033 details with API function.
8034 * win32-low.c (child_delete_thread): Replace accessing list
8035 implemention details with API function.
8036 (match_dll_by_basename): New function.
8037 (dll_is_loaded_by_basename): New function.
8038 (win32_ensure_ntdll_loaded): Replace accessing list implemention
8039 details call to dll_is_loaded_by_basename.
8040
8041 2014-02-19 Doug Evans <dje@google.com>
8042
8043 * dll.h (struct dll_info): Add comment.
8044 * gdbthread.h (struct thread_info): Add comment.
8045 (current_ptid): Simplify.
8046 * inferiors.c (add_process): Update.
8047 (remove_process): Update.
8048 * inferiors.h (struct process_info): Rename member "head" to "entry".
8049 * linux-low.c (delete_lwp): Update.
8050 (add_lwp): Update.
8051 (last_thread_of_process_p): Update.
8052 (kill_one_lwp_callback, linux_kill): Update.
8053 (status_pending_p_callback): Update.
8054 (wait_for_sigstop): Update. Simplify read of ptid.
8055 (start_step_over): Update.
8056 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
8057 (get_lwp_thread): Update.
8058 (struct lwp_info): Rename member "head" to "entry".
8059 * regcache.h (inferior_list_entry): Delete.
8060 * server.c (kill_inferior_callback): Update.
8061 (detach_or_kill_inferior_callback): Update.
8062 (print_started_pid): Update.
8063 (print_attached_pid): Update.
8064 (process_serial_event): Simplify read of ptid.
8065 * thread-db.c (thread_db_create_event): Update.
8066 (thread_db_get_tls_address): Update.
8067 * win32-low.c (current_inferior_ptid): Simplify.
8068
8069 2014-02-19 Tom Tromey <tromey@redhat.com>
8070
8071 * target.h (struct target_ops) <supports_btrace>: Add target_ops
8072 argument.
8073 (target_supports_btrace): Update.
8074
8075 2014-02-14 Yao Qi <yao@codesourcery.com>
8076
8077 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
8078 (rsp-low-ipa.o): New target.
8079
8080 2014-02-12 Tom Tromey <tromey@redhat.com>
8081
8082 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
8083 convert_ascii_to_int.
8084 * regcache.c (registers_to_string): Likewise.
8085 * remote-utils.c (decode_M_packet): Likewise.
8086 * server.c (process_serial_event): Likewise.
8087
8088 2014-02-12 Tom Tromey <tromey@redhat.com>
8089
8090 * server.c (handle_query, handle_v_run): Use hex2bin, not
8091 unhexify.
8092 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
8093
8094 2014-02-12 Tom Tromey <tromey@redhat.com>
8095
8096 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
8097 convert_int_to_ascii.
8098 * regcache.c (registers_to_string, collect_register_as_string):
8099 Likewise.
8100 * remote-utils.c (look_up_one_symbol, relocate_instruction):
8101 Likewise.
8102 * server.c (process_serial_event): Likewise.
8103 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
8104 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
8105
8106 2014-02-12 Tom Tromey <tromey@redhat.com>
8107
8108 * remote-utils.c (look_up_one_symbol, monitor_output): Use
8109 bin2hex, not hexify.
8110 * tracepoint.c (cmd_qtstatus): Likewise.
8111
8112 2014-02-12 Tom Tromey <tromey@redhat.com>
8113
8114 * remote-utils.c (monitor_output): Pass explicit length to
8115 hexify.
8116
8117 2014-02-12 Tom Tromey <tromey@redhat.com>
8118
8119 * tracepoint.c: Include rsp-low.h.
8120 * server.c: Include rsp-low.h.
8121 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
8122 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
8123 declare.
8124 * remote-utils.c: Include rsp-low.h.
8125 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
8126 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
8127 (convert_int_to_ascii, convert_ascii_to_int): Move to
8128 common/rsp-low.c.
8129 * regcache.c: Include rsp-low.h.
8130 * ax.c: Include rsp-low.h.
8131 * Makefile.in (SFILES): Add common/rsp-low.c.
8132 (OBS): Add rsp-low.o.
8133 (rsp-low.o): New target.
8134
8135 2014-02-12 Tom Tromey <tromey@redhat.com>
8136
8137 * utils.h (pulongest, plongest, phex_nz): Don't declare.
8138 Include print-utils.h.
8139 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
8140 (plongest, thirty_two, phex_nz): Remove.
8141 * Makefile.in (SFILES): Add common/print-utils.c.
8142 (OBS): Add print-utils.o.
8143 (print-utils-ipa.o): New target.
8144 (print-utils.o): New target.
8145 (IPA_OBJS): Add print-utils-ipa.o.
8146
8147 2014-02-06 Tom Tromey <tromey@redhat.com>
8148
8149 * Makefile.in (SFILES): Fix indentation.
8150
8151 2014-02-05 Doug Evans <dje@google.com>
8152
8153 * linux-low.c (linux_wait_for_event): Improve comment.
8154 (linux_wait_1): Keep current_inferior in sync with event_child.
8155
8156 2014-01-22 Doug Evans <dje@google.com>
8157
8158 * gdbthread.h (gdb_id_to_thread): Delete, unused.
8159
8160 2014-01-22 Doug Evans <dje@google.com>
8161
8162 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
8163 * configure: Regenerate.
8164 * config.in: Regenerate.
8165 * Makefile.in (SFILES): Add debug.c.
8166 (OBS): Add debug.o.
8167 * debug.c: New file.
8168 * debug.h: New file.
8169 * linux-aarch64-low.c (*): Update all debugging printfs to use
8170 debug_printf instead of fprintf.
8171 * linux-arm-low.c (*): Ditto.
8172 * linux-cris-low.c (*): Ditto.
8173 * linux-crisv32-low.c (*): Ditto.
8174 * linux-m32r-low.c (*): Ditto.
8175 * linux-sparc-low.c (*): Ditto.
8176 * linux-x86.c (*): Ditto.
8177 * linux-low.c (*): Ditto.
8178 (linux_wait_1): Add calls to debug_enter, debug_exit.
8179 (linux_wait): Remove redundant debugging printf.
8180 (stop_all_lwps): Add calls to debug_enter, debug_exit.
8181 (linux_resume, unstop_all_lwps): Ditto.
8182 * mem-break.c (*): Update all debugging printfs to use
8183 debug_printf instead of fprintf.
8184 * remote-utils.c (*): Ditto.
8185 * thread-db.c (*): Ditto.
8186 * server.c #include <ctype.h>, "gdb_vecs.h".
8187 (debug_threads): Moved to debug.c.
8188 (*): Update all debugging printfs to use debug_printf instead of
8189 fprintf.
8190 (start_inferior): Replace call to fflush with call to debug_flush.
8191 (monitor_show_help): Mention set debug-format.
8192 (parse_debug_format_options): New function.
8193 (handle_monitor_command): Handle "monitor set debug-format".
8194 (gdbserver_usage): Mention --debug-format.
8195 (main): Parse --debug-format.
8196 * server.h (debug_threads): Declaration moved to debug.h.
8197 #include "debug.h".
8198 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
8199 trace_debug_1 that uses debug_printf.
8200 (tracepoint_look_up_symbols): Update all debugging printfs to use
8201 debug_printf instead of fprintf.
8202
8203 2014-01-20 Baruch Siach <baruch@tkos.co.il>
8204
8205 * linux-xtensa-low.c: Include asm/ptrace.h instead of
8206 sys/ptrace.h.
8207
8208 2014-01-17 Pedro Alves <palves@redhat.com>
8209
8210 PR build/16445
8211 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
8212 defined after including gdb_proc_service.h.
8213
8214 2014-01-16 Doug Evans <dje@google.com>
8215
8216 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
8217 (match_dll): Use it.
8218
8219 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
8220
8221 * target.h (target_ops) <read_btrace>: Change parameters and
8222 return type to allow error reporting.
8223 * server.c (handle_qxfer_btrace): Support delta reads. Pass
8224 trace reading errors on.
8225 * linux-low.c (linux_low_read_btrace): Pass trace reading
8226 errors on.
8227 (linux_low_disable_btrace): New.
8228
8229 2014-01-15 Doug Evans <dje@google.com>
8230
8231 * inferiors.c (thread_id_to_gdb_id): Delete.
8232 * inferiors.h (thread_id_to_gdb_id): Delete.
8233
8234 2014-01-13 Eli Zaretskii <eliz@gnu.org>
8235
8236 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
8237 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
8238 versions.
8239
8240 2014-01-08 Pedro Alves <palves@redhat.com>
8241
8242 * server.c (handle_status): Don't discard previous queued stop
8243 replies or thread's pending status here.
8244 (main) <disconnection>: Do it here instead.
8245
8246 2014-01-08 Pedro Alves <palves@redhat.com>
8247
8248 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
8249 * server.c (visit_actioned_threads, handle_pending_status): New
8250 function.
8251 (handle_v_cont): Factor out parts to ...
8252 (resume): ... this new function. If in all-stop, and a thread
8253 being resumed has a pending status, report it without actually
8254 resuming.
8255 (myresume): Adjust to use the new 'resume' function.
8256 (clear_pending_status_callback, set_pending_status_callback)
8257 (find_status_pending_thread_callback): New functions.
8258 (handle_status): Handle the case of multiple threads having
8259 interesting statuses to report. Report threads' real last signal
8260 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
8261 with an interesting thread to report the status for, instead of
8262 always reporting the status of the first thread.
8263
8264 2014-01-01 Joel Brobecker <brobecker@adacore.com>
8265
8266 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
8267 * gdbreplay.c (gdbreplay_version): Likewise.
8268
8269 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
8270
8271 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
8272 iov.iov_len with the real length in use.
8273
8274 2013-12-13 Joel Brobecker <brobecker@adacore.com>
8275
8276 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
8277 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
8278 for all targets that use win32-low.c.
8279 * win32-low.c (win32_ensure_ntdll_loaded): New function.
8280 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
8281
8282 2013-12-13 Pedro Alves <palves@redhat.com>
8283
8284 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
8285 if equal to TARGET_WAITKIND_LOADED.
8286 * win32-low.c (cached_status): New static global.
8287 (win32_wait): Add declaration.
8288 (do_initial_child_stuff): Flush all initial pending debug events
8289 up to the initial breakpoint.
8290 (win32_wait): If CACHED_STATUS was set, return that instead
8291 of doing a real wait. Remove the code resuming the execution
8292 of the inferior after receiving a TARGET_WAITKIND_LOADED event
8293 during the initial phase. Also remove the code changing
8294 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
8295 TARGET_WAITKIND_STOPPED.
8296
8297 2013-12-11 Yao Qi <yao@codesourcery.com>
8298
8299 * notif.c (handle_notif_ack): Return 0 if no notification
8300 matches.
8301
8302 2013-11-20 Doug Evans <dje@google.com>
8303
8304 * linux-low.c (linux_set_resume_request): Fix comment.
8305
8306 2013-11-20 Doug Evans <dje@google.com>
8307
8308 * linux-low.c (resume_status_pending_p): Tweak comment.
8309
8310 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
8311
8312 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
8313 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
8314 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
8315 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
8316 (srv_amd64_regobj): Add amd64-mpx.o.
8317 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
8318 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
8319 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
8320 * i387-fp.c (num_pl_bnd_register) Added constant.
8321 (num_pl_bnd_cfg_registers) Added constant.
8322 (struct i387_xsave) Added reserved area and MPX fields.
8323 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
8324 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
8325 function.
8326 (tdesc_i386_mpx_linux): Add MPX amd64 target.
8327 (init_registers_amd64_mpx_linux): Declare new function.
8328 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
8329 (x86_64_regmap): Add MPX registers.
8330 (x86_linux_read_description): Add MPX case.
8331 (initialize_low_arch): Initialize MPX targets.
8332
8333 2013-11-18 Tom Tromey <tromey@redhat.com>
8334
8335 * configure: Rebuild.
8336 * configure.ac: Don't check for stdlib.h.
8337 * gdbreplay.c: Unconditionally include stdlib.h.
8338
8339 2013-11-18 Tom Tromey <tromey@redhat.com>
8340
8341 * config.in: Rebuild.
8342 * configure: Rebuild.
8343 * configure.ac: Don't use AC_HEADER_DIRENT.
8344
8345 2013-11-18 Tom Tromey <tromey@redhat.com>
8346
8347 * server.h: Don't check HAVE_STRING_H.
8348 * gdbreplay.c: Don't check HAVE_STRING_H.
8349 * configure: Rebuild.
8350
8351 2013-11-18 Tom Tromey <tromey@redhat.com>
8352
8353 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
8354 LIBGNU.
8355
8356 2013-11-08 Tom Tromey <tromey@redhat.com>
8357
8358 * configure, config.in: Rebuild.
8359 * configure.ac: Remove unused configury.
8360
8361 2013-11-08 Tom Tromey <tromey@redhat.com>
8362
8363 * acinclude.m4: Include common.m4, codeset.m4.
8364 * configure, config.in: Rebuild.
8365 * configure.ac: Use GDB_AC_COMMON.
8366
8367 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
8368
8369 * linux-s390-low.c (HWCAP_S390_TE): New define.
8370 (s390_arch_setup): Consider the TE field in the HWCAP for
8371 determining 'have_regset_tdb'.
8372
8373 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
8374
8375 PR gdb/16014
8376 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
8377 call to sizeof.
8378
8379 2013-10-02 Pedro Alves <palves@redhat.com>
8380
8381 * server.c (process_serial_event): Don't output "GDBserver
8382 exiting" if GDB is connected through stdio.
8383 * target.c (mywait): Likewise, be silent if GDB is connected
8384 through stdio.
8385
8386 2013-10-01 Joel Brobecker <brobecker@adacore.com>
8387
8388 * lynx-low.c (lynx_add_threads_after_attach): New function.
8389 (lynx_attach): Remove call to add_thread. Add call to
8390 lynx_add_threads_after_attach instead.
8391
8392 2013-09-28 Mike Frysinger <vapier@gentoo.org>
8393
8394 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
8395 * config.in, configure: Regenerated.
8396
8397 2013-09-18 Yao Qi <yao@codesourcery.com>
8398
8399 PR server/15959
8400 * server.c (start_inferior): Clear 'resume_info'.
8401
8402 2013-09-16 Jiong Wang <jiwang@tilera.com>
8403
8404 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
8405 for each register.
8406
8407 2013-09-16 Jiong Wang <jiwang@tilera.com>
8408
8409 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
8410 linux-tile-low.o to srv_tgtobj.
8411
8412 2013-09-16 Will Newton <will.newton@linaro.org>
8413
8414 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
8415 out regs.
8416
8417 2013-09-06 Pedro Alves <palves@redhat.com>
8418
8419 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
8420 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
8421 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
8422 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
8423 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
8424 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
8425
8426 2013-09-06 Pedro Alves <palves@redhat.com>
8427
8428 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
8429 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
8430
8431 2013-09-06 Pedro Alves <palves@redhat.com>
8432
8433 * linux-amd64-ipa.c: Include tracepoint.h.
8434 * linux-i386-ipa.c: Include tracepoint.h.
8435
8436 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8437
8438 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
8439 (ps_get_thread_area): New function.
8440
8441 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
8442
8443 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
8444 (initialize_low_arch): Call init_registers_crisv32 rather than
8445 init_register_crisv32.
8446
8447 2013-09-05 Pedro Alves <palves@redhat.com>
8448
8449 * server.h (handle_vFile, hostio_last_error_from_errno): Move
8450 to ...
8451 * hostio.h: ... this new file.
8452 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
8453 win32-low.c: Include hostio.h.
8454
8455 2013-09-05 Pedro Alves <palves@redhat.com>
8456
8457 * server.h (gdb_client_data, handler_func, callback_handler_func)
8458 (delete_file_handler, add_file_handler, append_callback_event)
8459 (delete_callback_event, start_event_loop, initialize_event_loop):
8460 Move to event-loop.h and include it.
8461 * event-loop.h: New file.
8462
8463 2013-09-05 Pedro Alves <palves@redhat.com>
8464
8465 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
8466 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
8467 (loaded_dll, unloaded_dll): Move to ...
8468 * dll.h: ... this new file.
8469 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
8470
8471 2013-09-05 Pedro Alves <palves@redhat.com>
8472
8473 * server.h (current_process, get_thread_process, all_processes)
8474 (add_inferior_to_list, for_each_inferior, current_inferior)
8475 (remove_inferior, add_process, remove_process, find_process_pid)
8476 (have_started_inferiors_p, have_attached_inferiors_p)
8477 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
8478 (clear_inferiors, find_inferior, find_inferior_id)
8479 (inferior_target_data, set_inferior_target_data)
8480 (inferior_regcache_data, set_inferior_regcache_data): Move to
8481 inferiors.h, and include it.
8482 * inferiors.h: New file.
8483
8484 2013-09-05 Pedro Alves <palves@redhat.com>
8485
8486 * server.h (struct emit_ops, current_insn_ptr, emit_error):
8487 Move ...
8488 * ax.h: ... here.
8489
8490 2013-09-05 Pedro Alves <palves@redhat.com>
8491
8492 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
8493 tracepoint.h.
8494 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
8495 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
8496 (handle_tracepoint_general_set, handle_tracepoint_query)
8497 (tracepoint_finished_step, tracepoint_was_hit)
8498 (release_while_stepping_state_list, current_traceframe)
8499 (in_readonly_region, traceframe_read_mem)
8500 (fetch_traceframe_registers, traceframe_read_sdata)
8501 (traceframe_read_info, struct fast_tpoint_collect_status)
8502 (fast_tracepoint_collecting, force_unlock_trace_buffer)
8503 (handle_tracepoit_bkpts, initialize_low_tracepoint)
8504 (supply_fast_tracepoint_registers)
8505 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
8506 (ipa_tdesc, claim_trampoline_space)
8507 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
8508 (agent_mem_read, agent_get_trace_state_variable_value)
8509 (agent_set_trace_state_variable_value, agent_tsv_read)
8510 (agent_mem_read_string, get_raw_reg_func_addr)
8511 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
8512 * tracepoint.h: ... this new file.
8513
8514 2013-09-05 Pedro Alves <palves@redhat.com>
8515
8516 * server.h (perror_with_name, error, fatal, warning, paddress)
8517 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
8518 include it.
8519 * utils.h: New file.
8520
8521 2013-09-05 Pedro Alves <palves@redhat.com>
8522
8523 * server.h (remote_debug, noack_mode, transport_is_reliable)
8524 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
8525 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
8526 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
8527 (write_enn, initialize_async_io, enable_async_io)
8528 (disable_async_io, check_remote_input_interrupt_request)
8529 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
8530 (dead_thread_notify, prepare_resume_reply)
8531 (decode_address_to_semicolon, decode_address, decode_m_packet)
8532 (decode_M_packet, decode_X_packet, decode_xfer_write)
8533 (decode_search_memory_packet, unhexify, hexify)
8534 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
8535 (look_up_one_symbol, relocate_instruction)
8536 (monitor_output): Move to remote-utils.h, and include it.
8537 * remote-utils.h: New file.
8538
8539 2013-09-05 Pedro Alves <palves@redhat.com>
8540
8541 * server.h (_): Delete.
8542
8543 2013-09-02 Pedro Alves <palves@redhat.com>
8544
8545 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
8546 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
8547 allocated.
8548 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
8549
8550 2013-09-02 Pierre Muller <muller@sourceware.org>
8551
8552 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
8553 or WriteProcessMemory complete successfully and handle
8554 ERROR_PARTIAL_COPY error.
8555
8556 2013-09-02 Pedro Alves <palves@redhat.com>
8557
8558 * server.c (gdb_read_memory): Return -1 on traceframe memory read
8559 error instead of EIO.
8560
8561 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8562
8563 PR server/15604
8564 * linux-low.c: Include filestuff.h.
8565 (linux_create_inferior) <pid == 0>: Call close_most_fds.
8566 * lynx-low.c: Include filestuff.h.
8567 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
8568 * server.c: Include filestuff.h.
8569 (main): Call notice_open_fds.
8570 * spu-low.c: Include filestuff.h.
8571 (spu_create_inferior) <pid == 0>: Call close_most_fds.
8572
8573 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
8574
8575 * Makefile.in: Explain why ../target and ../nat are not
8576 listed as include file search paths.
8577 (linux-waitpid.o): New object file rule.
8578 * configure.srv (srv_native_linux_obj): New variable.
8579 Replace all occurrences of linux native object files with
8580 $srv_native_linux_obj.
8581 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
8582 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
8583 (linux_enable_event_reporting): Remove declaration.
8584 (my_waitpid): Moved to common/linux-waitpid.c.
8585 (linux_wait_for_event): Pass ptid when calling
8586 linux_enable_event_reporting.
8587 (linux_supports_tracefork_flag): Remove.
8588 (linux_enable_event_reporting): Likewise.
8589 (linux_tracefork_grandchild): Remove.
8590 (STACK_SIZE): Moved to common/linux-ptrace.c.
8591 (linux_tracefork_child): Remove.
8592 (linux_test_for_tracefork): Remove.
8593 (linux_look_up_symbols): Call linux_supports_traceclone.
8594 (initialize_low): Remove call to linux_test_for_tracefork.
8595 * linux-low.h (PTRACE_TYPE_ARG3): Move to
8596 common/linux-ptrace.h.
8597 (PTRACE_TYPE_ARG4): Likewise.
8598 Include linux-ptrace.h.
8599
8600 2013-08-21 Pedro Alves <palves@redhat.com>
8601
8602 * config.in: Renegerate.
8603
8604 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
8605
8606 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
8607 (SFILES): Remove $(srcdir)/common/target-common.c and
8608 add $(srcdir)/target/waitstatus.c.
8609 (OBS): Remove target-common.o and add waitstatus.o.
8610 (server_h): Remove $(srcdir)/../common/target-common.h and
8611 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
8612 and $(srcdir)/../target/waitstatus.h.
8613 (target-common.o): Remove.
8614 (waitstatus.o): New target object file.
8615 * target.h: Do not include target-common.h and
8616 include target/resume.h, target/wait.h and
8617 target/waitstatus.h.
8618
8619 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
8620
8621 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8622 to PTRACE_TYPE_ARG3.
8623 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
8624 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
8625 PTRACE_TYPE_ARG4.
8626 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
8627 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
8628
8629 2013-07-27 Jie Zhang <jie@codesourcery.com>
8630 Daniel Jacobowitz <dan@codesourcery.com>
8631 Yao Qi <yao@codesourcery.com>
8632
8633 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
8634 (mips-linux-watch.o): New rule.
8635 (mips_linux_watch_h): New variable.
8636 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
8637 srv_tgtobj.
8638 * linux-mips-low.c: Include mips-linux-watch.h.
8639 (struct arch_process_info, struct arch_lwp_info): New.
8640 (update_watch_registers_callback): New function.
8641 (mips_linux_new_process, mips_linux_new_thread) New functions.
8642 (mips_linux_prepare_to_resume, mips_insert_point): New
8643 functions.
8644 (mips_remove_point, mips_stopped_by_watchpoint): New
8645 functions.
8646 (rsp_bp_type_to_target_hw_bp_type): New function.
8647 (mips_stopped_data_address): New function.
8648 (the_low_target): Add watchpoint support functions.
8649
8650 2013-07-27 Yao Qi <yao@codesourcery.com>
8651
8652 * i386-low.c: Include break-common.h.
8653 (enum target_hw_bp_type): Remove.
8654
8655 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
8656
8657 * Makefile.in (SFILES): /common/target-common.c.
8658 (OBS): Add target-common.o.
8659 (server_h): Add $(srcdir)/../common/target-common.h.
8660 (target-common.o): New target.
8661 * server.c (queue_stop_reply_callback): Free
8662 status string after use.
8663 * target.c (target_waitstatus_to_string): Remove.
8664 * target.h: Include target-common.h.
8665 (resume_kind): Likewise.
8666 (target_waitkind): Likewise.
8667 (target_waitstatus): Likewise.
8668 (TARGET_WNOHANG): Likewise.
8669
8670 2013-07-04 Yao Qi <yao@codesourcery.com>
8671
8672 * Makefile.in (host_alias): Use @host_noncanonical@.
8673 (target_alias): Use @target_noncanonical@.
8674 * configure.ac: Use ACX_NONCANONICAL_TARGET and
8675 ACX_NONCANONICAL_HOST.
8676 * configure: Regenerated.
8677
8678 Revert:
8679 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8680
8681 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8682 * configure: Rebuild.
8683 * Makefile.in (version_host, version_target): Get from configure.
8684 (version.c): Use $(version_host) and $(version_target).
8685
8686 2013-07-03 Pedro Alves <palves@redhat.com>
8687
8688 * Makefile.in (config.status): Depend on development.sh.
8689 * acinclude.m4: Include libmcheck.m4.
8690 * configure: Regenerate.
8691
8692 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8693
8694 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
8695 attribute inside the parentheses.
8696 (winapi_DebugSetProcessKillOnExit): Ditto.
8697 (winapi_DebugBreakProcess): Ditto.
8698 (winapi_GenerateConsoleCtrlEvent): Ditto.
8699
8700 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
8701
8702 * notif.h (notif_event): Add a dummy member to avoid compiler
8703 errors.
8704
8705 2013-07-01 Pedro Alves <palves@redhat.com>
8706
8707 * hostio.c (HOSTIO_PATH_MAX): Define.
8708 (require_filename, handle_open, handle_unlink, handle_readlink):
8709 Use it.
8710
8711 2013-07-01 Pedro Alves <palves@redhat.com>
8712
8713 * server.h: Include "pathmax.h".
8714 * linux-low.c: Don't include sys/param.h.
8715 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
8716 MAXPATHLEN.
8717 * win32-low.c: Don't include sys/param.h.
8718 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
8719
8720 2013-07-01 Pedro Alves <palves@redhat.com>
8721
8722 * event-loop.c: Don't check HAVE_UNISTD_H before including
8723 <unistd.h>.
8724 * gdbreplay.c: Likewise.
8725 * remote-utils.c: Likewise.
8726 * server.c: Likewise.
8727 * configure.ac: Don't check for unistd.h.
8728 * configure: Regenerate.
8729
8730 2013-06-28 Tom Tromey <tromey@redhat.com>
8731
8732 * Makefile.in (version.c): Use version.in, not
8733 common/version.in.
8734
8735 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
8736
8737 * configure.ac (version_host, version_target): Set and AC_SUBST them.
8738 * configure: Rebuild.
8739 * Makefile.in (version_host, version_target): Get from configure.
8740 (version.c): Use $(version_host) and $(version_target).
8741
8742 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8743
8744 Fix trace-status to output user name without trailing colon.
8745 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
8746
8747 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
8748
8749 Fix trace-status to output proper start-time and stop-time.
8750 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
8751 output start time and stop time in hex as gdb expects.
8752
8753 2013-06-26 Pedro Alves <pedro@codesourcery.com>
8754
8755 * tracepoint.c (build_traceframe_info_xml): Output trace state
8756 variables present in the trace buffer.
8757
8758 2013-06-24 Tom Tromey <tromey@redhat.com>
8759
8760 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
8761 create-version.sh.
8762 (version.o): Remove.
8763 * gdbreplay.c: Include version.h.
8764 (version, host_name): Don't declare.
8765 * server.h: Include version.h.
8766 (version, host_name): Don't declare.
8767
8768 2013-06-12 Pedro Alves <palves@redhat.com>
8769
8770 * linux-x86-low.c (linux_is_elf64): Delete global.
8771 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
8772 with local linux_pid_exe_is_elf_64_file use.
8773
8774 2013-06-11 Pedro Alves <palves@redhat.com>
8775
8776 * linux-low.c (regset_disabled, disable_regset): New functions.
8777 (regsets_fetch_inferior_registers)
8778 (regsets_store_inferior_registers): Use them.
8779 (initialize_regsets_info); Don't allocate the disabled_regsets
8780 array here.
8781 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
8782 comment.
8783
8784 2013-06-11 Pedro Alves <palves@redhat.com>
8785
8786 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
8787 xmalloc.
8788
8789 2013-06-11 Pedro Alves <palves@redhat.com>
8790
8791 * linux-x86-low.c (initialize_low_arch): Call
8792 init_registers_x32_avx_linux.
8793
8794 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
8795
8796 Fix compatibility with Android Bionic.
8797 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
8798 it is not empty.
8799
8800 2013-06-07 Pedro Alves <palves@redhat.com>
8801
8802 PR server/14823
8803 * Makefile.in (OBS): Add tdesc.o.
8804 (IPA_OBJS): Add tdesc-ipa.o.
8805 (tdesc-ipa.o): New rule.
8806 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
8807 interface.
8808 * linux-low.c (new_inferior): Delete.
8809 (disabled_regsets, num_regsets): Delete.
8810 (linux_add_process): Adjust to set the new per-process
8811 new_inferior flag.
8812 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
8813 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
8814 was a stop. When calling arch_setup, switch the current inferior
8815 to the thread that got an event.
8816 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
8817 (regsets_fetch_inferior_registers)
8818 (regsets_store_inferior_registers): New regsets_info parameter.
8819 Adjust to use it.
8820 (linux_register_in_regsets): New regs_info parameter. Adjust to
8821 use it.
8822 (register_addr, fetch_register, store_register): New usrregs_info
8823 parameter. Adjust to use it.
8824 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
8825 parameter regs_info. Adjust to use it.
8826 (linux_fetch_registers): Get the current inferior's regs_info, and
8827 adjust to use it.
8828 (linux_store_registers): Ditto.
8829 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
8830 (initialize_low): Don't initialize the target_regsets here. Call
8831 initialize_low_arch.
8832 * linux-low.h (target_regsets): Delete declaration.
8833 (struct regsets_info): New.
8834 (struct usrregs_info): New.
8835 (struct regs_info): New.
8836 (struct process_info_private) <new_inferior>: New field.
8837 (struct linux_target_ops): Delete the num_regs, regmap, and
8838 regset_bitmap fields. New field regs_info.
8839 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
8840 * i387-fp.c (num_xmm_registers): Delete.
8841 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
8842 calls to new interface.
8843 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
8844 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
8845 Infer the number of xmm registers from the regcache's target
8846 description.
8847 * i387-fp.h (num_xmm_registers): Delete.
8848 * inferiors.c (add_thread): Don't install the thread's regcache
8849 here.
8850 * proc-service.c (gregset_info): Fetch the current inferior's
8851 regs_info. Adjust to use it.
8852 * regcache.c: Include tdesc.h.
8853 (register_bytes, reg_defs, num_registers)
8854 (gdbserver_expedite_regs): Delete.
8855 (get_thread_regcache): If the thread doesn't have a regcache yet,
8856 create one, instead of aborting gdbserver.
8857 (regcache_invalidate_one): Rename to ...
8858 (regcache_invalidate_thread): ... this.
8859 (regcache_invalidate_one): New.
8860 (regcache_invalidate): Only invalidate registers of the current
8861 process.
8862 (init_register_cache): Add target_desc parameter, and use it.
8863 (new_register_cache): Ditto. Assert the target description has a
8864 non zero registers_size.
8865 (regcache_cpy): Add assertions. Adjust.
8866 (realloc_register_cache, set_register_cache): Delete.
8867 (registers_to_string, registers_from_string): Adjust.
8868 (find_register_by_name, find_regno, find_register_by_number)
8869 (register_cache_size): Add target_desc parameter, and use it.
8870 (free_register_cache_thread, free_register_cache_thread_one)
8871 (regcache_release, register_cache_size): New.
8872 (register_size): Add target_desc parameter, and use it.
8873 (register_data, supply_register, supply_register_zeroed)
8874 (supply_regblock, supply_register_by_name, collect_register)
8875 (collect_register_as_string, collect_register_by_name): Adjust.
8876 * regcache.h (struct target_desc): Forward declare.
8877 (struct regcache) <tdesc>: New field.
8878 (init_register_cache, new_register_cache): Add target_desc
8879 parameter.
8880 (regcache_invalidate_thread): Declare.
8881 (regcache_invalidate_one): Delete declaration.
8882 (regcache_release): Declare.
8883 (find_register_by_number, register_cache_size, register_size)
8884 (find_regno): Add target_desc parameter.
8885 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
8886 declarations.
8887 * remote-utils.c: Include tdesc.h.
8888 (outreg, prepare_resume_reply): Adjust.
8889 * server.c: Include tdesc.h.
8890 (gdbserver_xmltarget): Delete declaration.
8891 (get_features_xml, process_serial_event): Adjust.
8892 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
8893 declare.
8894 (struct process_info) <tdesc>: New field.
8895 (ipa_tdesc): Declare.
8896 * tdesc.c: New file.
8897 * tdesc.h: New file.
8898 * tracepoint.c: Include tdesc.h.
8899 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
8900 (get_context_regcache): Adjust to pass ipa_tdesc down.
8901 (do_action_at_tracepoint): Adjust to get the register cache size
8902 from the context regcache's description.
8903 (traceframe_walk_blocks): Adjust to get the register cache size
8904 from the current trace frame's description.
8905 (traceframe_get_pc): Adjust to get current trace frame's
8906 description and pass it down.
8907 (gdb_collect): Adjust to get the register cache size from the
8908 IPA's description.
8909 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
8910 (gdbserver_xmltarget): Delete.
8911 (initialize_low_tracepoint): Set the ipa's target description.
8912 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
8913 (initialize_low_tracepoint): Set the ipa's target description.
8914 * linux-x86-low.c: Include tdesc.h.
8915 [__x86_64__] (is_64bit_tdesc): New.
8916 (ps_get_thread_area, x86_get_thread_area): Use it.
8917 (i386_cannot_store_register): Rename to ...
8918 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
8919 (i386_cannot_fetch_register): Rename to ...
8920 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
8921 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
8922 to new interface.
8923 (target_regsets): Rename to ...
8924 (x86_regsets): ... this.
8925 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
8926 interface.
8927 (x86_siginfo_fixup): Use is_64bit_tdesc.
8928 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
8929 (tdesc_x32_avx_linux, tdesc_x32_linux)
8930 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
8931 Declare.
8932 (x86_linux_update_xmltarget): Delete.
8933 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
8934 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
8935 (AMD64_LINUX_USER64_CS): New.
8936 (x86_linux_read_description): New, based on
8937 x86_linux_update_xmltarget.
8938 (same_process_callback): New.
8939 (x86_arch_setup_process_callback): New.
8940 (x86_linux_update_xmltarget): New.
8941 (x86_regsets_info): New.
8942 (amd64_linux_regs_info): New.
8943 (i386_linux_usrregs_info): New.
8944 (i386_linux_regs_info): New.
8945 (x86_linux_regs_info): New.
8946 (x86_arch_setup): Reimplement.
8947 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
8948 (x86_emit_ops): Ditto.
8949 (the_low_target): Adjust. Install x86_linux_regs_info,
8950 x86_cannot_fetch_register, and x86_cannot_store_register.
8951 (initialize_low_arch): New.
8952 * linux-ia64-low.c (tdesc_ia64): Declare.
8953 (ia64_fetch_register): Adjust.
8954 (ia64_usrregs_info, regs_info): New globals.
8955 (ia64_regs_info): New function.
8956 (the_low_target): Adjust.
8957 (initialize_low_arch): New function.
8958 * linux-sparc-low.c (tdesc_sparc64): Declare.
8959 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
8960 Adjust.
8961 (sparc_arch_setup): New function.
8962 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
8963 (the_low_target): Adjust.
8964 (initialize_low_arch): New function.
8965 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
8966 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
8967 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
8968 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
8969 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
8970 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
8971 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
8972 (tdesc_powerpc_isa205_vsx64l): Declare.
8973 (ppc_cannot_store_register, ppc_collect_ptrace_register)
8974 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
8975 (ppc_set_pc, ppc_get_hwcap): Adjust.
8976 (ppc_usrregs_info): Forward declare.
8977 (!__powerpc64__) ppc_regmap_adjusted: New global.
8978 (ppc_arch_setup): Adjust to the current process'es target
8979 description.
8980 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
8981 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
8982 (ppc_store_evrregset): Adjust.
8983 (target_regsets): Rename to ...
8984 (ppc_regsets): ... this, and make static.
8985 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
8986 (ppc_regs_info): New function.
8987 (the_low_target): Adjust.
8988 (initialize_low_arch): New function.
8989 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
8990 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
8991 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
8992 (tdesc_s390x_linux64v2): Declare.
8993 (s390_collect_ptrace_register, s390_supply_ptrace_register)
8994 (s390_fill_gregset, s390_store_last_break): Adjust.
8995 (target_regsets): Rename to ...
8996 (s390_regsets): ... this, and make static.
8997 (s390_get_pc, s390_set_pc): Adjust.
8998 (s390_get_hwcap): New target_desc parameter, and use it.
8999 [__s390x__] (have_hwcap_s390_high_gprs): New global.
9000 (s390_arch_setup): Adjust to set the current process'es target
9001 description. Don't adjust the regmap.
9002 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
9003 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
9004 (regs_info_3264): New globals.
9005 (s390_regs_info): New function.
9006 (the_low_target): Adjust.
9007 (initialize_low_arch): New function.
9008 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
9009 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
9010 [__mips64] (init_registers_mips_linux)
9011 (init_registers_mips_dsp_linux): Delete defines.
9012 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
9013 (have_dsp): New global.
9014 (mips_read_description): New, based on mips_arch_setup.
9015 (mips_arch_setup): Reimplement.
9016 (get_usrregs_info): New function.
9017 (mips_cannot_fetch_register, mips_cannot_store_register)
9018 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
9019 (mips_fill_fpregset, mips_store_fpregset): Adjust.
9020 (target_regsets): Rename to ...
9021 (mips_regsets): ... this, and make static.
9022 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
9023 (dsp_regs_info, regs_info): New globals.
9024 (mips_regs_info): New function.
9025 (the_low_target): Adjust.
9026 (initialize_low_arch): New function.
9027 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
9028 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
9029 Declare.
9030 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
9031 (arm_read_description): New, with bits factored from
9032 arm_arch_setup.
9033 (arm_arch_setup): Reimplement.
9034 (target_regsets): Rename to ...
9035 (arm_regsets): ... this, and make static.
9036 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
9037 (arm_regs_info): New function.
9038 (the_low_target): Adjust.
9039 (initialize_low_arch): New function.
9040 * linux-m68k-low.c (tdesc_m68k): Declare.
9041 (target_regsets): Rename to ...
9042 (m68k_regsets): ... this, and make static.
9043 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
9044 (m68k_regs_info): New function.
9045 (m68k_arch_setup): New function.
9046 (the_low_target): Adjust.
9047 (initialize_low_arch): New function.
9048 * linux-sh-low.c (tdesc_sharch): Declare.
9049 (target_regsets): Rename to ...
9050 (sh_regsets): ... this, and make static.
9051 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
9052 (sh_regs_info, sh_arch_setup): New functions.
9053 (the_low_target): Adjust.
9054 (initialize_low_arch): New function.
9055 * linux-bfin-low.c (tdesc_bfin): Declare.
9056 (bfin_arch_setup): New function.
9057 (bfin_usrregs_info, regs_info): New globals.
9058 (bfin_regs_info): New function.
9059 (the_low_target): Adjust.
9060 (initialize_low_arch): New function.
9061 * linux-cris-low.c (tdesc_cris): Declare.
9062 (cris_arch_setup): New function.
9063 (cris_usrregs_info, regs_info): New globals.
9064 (cris_regs_info): New function.
9065 (the_low_target): Adjust.
9066 (initialize_low_arch): New function.
9067 * linux-cris-low.c (tdesc_crisv32): Declare.
9068 (cris_arch_setup): New function.
9069 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
9070 (cris_regs_info): New function.
9071 (the_low_target): Adjust.
9072 (initialize_low_arch): New function.
9073 * linux-m32r-low.c (tdesc_m32r): Declare.
9074 (m32r_arch_setup): New function.
9075 (m32r_usrregs_info, regs_info): New globals.
9076 (m32r_regs_info): Adjust.
9077 (initialize_low_arch): New function.
9078 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
9079 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
9080 (tic6x_usrregs_info): Forward declare.
9081 (tic6x_read_description): New function, based on ...
9082 (tic6x_arch_setup): ... this. Reimplement.
9083 (target_regsets): Rename to ...
9084 (tic6x_regsets): ... this, and make static.
9085 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
9086 (tic6x_regs_info): New function.
9087 (the_low_target): Adjust.
9088 (initialize_low_arch): New function.
9089 * linux-xtensa-low.c (tdesc_xtensa): Declare.
9090 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
9091 (target_regsets): Rename to ...
9092 (xtensa_regsets): ... this, and make static.
9093 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
9094 globals.
9095 (xtensa_arch_setup, xtensa_regs_info): New functions.
9096 (the_low_target): Adjust.
9097 (initialize_low_arch): New function.
9098 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
9099 (nios2_arch_setup): Set the current process'es tdesc.
9100 (target_regsets): Rename to ...
9101 (nios2_regsets): ... this.
9102 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
9103 (nios2_regs_info): New function.
9104 (the_low_target): Adjust.
9105 (initialize_low_arch): New function.
9106 * linux-aarch64-low.c (tdesc_aarch64): Declare.
9107 (aarch64_arch_setup): Set the current process'es tdesc.
9108 (target_regsets): Rename to ...
9109 (aarch64_regsets): ... this.
9110 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
9111 (aarch64_regs_info): New function.
9112 (the_low_target): Adjust.
9113 (initialize_low_arch): New function.
9114 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
9115 globals.
9116 (target_regsets): Rename to ...
9117 (tile_regsets): ... this.
9118 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
9119 (tile_regs_info): New function.
9120 (tile_arch_setup): Set the current process'es tdesc.
9121 (the_low_target): Adjust.
9122 (initialize_low_arch): New function.
9123 * spu-low.c (tdesc_spu): Declare.
9124 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
9125 * win32-arm-low.c (tdesc_arm): Declare.
9126 (arm_arch_setup): New function.
9127 (the_low_target): Install arm_arch_setup instead of
9128 init_registers_arm.
9129 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
9130 (init_windows_x86): Rename to ...
9131 (i386_arch_setup): ... this. Set `win32_tdesc'.
9132 (the_low_target): Adjust.
9133 * win32-low.c (win32_tdesc): New global.
9134 (child_add_thread): Don't create the thread cache here.
9135 (do_initial_child_stuff): Set the new process'es tdesc.
9136 * win32-low.h (struct target_desc): Forward declare.
9137 (win32_tdesc): Declare.
9138 * lynx-i386-low.c (tdesc_i386): Declare global.
9139 (lynx_i386_arch_setup): Set `lynx_tdesc'.
9140 * lynx-low.c (lynx_tdesc): New global.
9141 (lynx_add_process): Set the new process'es tdesc.
9142 * lynx-low.h (struct target_desc): Forward declare.
9143 (lynx_tdesc): Declare global.
9144 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
9145 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
9146 * nto-low.c (nto_tdesc): New global.
9147 (do_attach): Set the new process'es tdesc.
9148 * nto-low.h (struct target_desc): Forward declare.
9149 (nto_tdesc): Declare.
9150 * nto-x86-low.c (tdesc_i386): Declare.
9151 (nto_x86_arch_setup): Set `nto_tdesc'.
9152
9153 2013-06-04 Gary Benson <gbenson@redhat.com>
9154
9155 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
9156 to qSupported response when appropriate.
9157 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
9158 with nonzero-length annex.
9159 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
9160 arguments supplied in annex.
9161
9162 2013-05-31 Doug Evans <dje@google.com>
9163
9164 PR server/15594
9165 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
9166 64 bits in 64-cross-32 environment.
9167
9168 2013-05-28 Pedro Alves <palves@redhat.com>
9169
9170 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
9171 (aarch64-without-fpu.c): Delete rule.
9172 * configure.srv (aarch64*-*-linux*): Remove references to
9173 aarch64-without-fpu.o and aarch64-without-fpu.xml.
9174 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
9175 declaration.
9176
9177 2013-05-24 Pedro Alves <palves@redhat.com>
9178
9179 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
9180 instead of strchr/decode_address. Error if the range isn't split
9181 with a ','. Don't assume there's be a ':' in the action.
9182
9183 2013-05-23 Yao Qi <yao@codesourcery.com>
9184 Pedro Alves <palves@redhat.com>
9185
9186 * linux-low.c (lwp_in_step_range): New function.
9187 (linux_wait_1): If the thread was range stepping and stopped
9188 outside the stepping range, report the stop to GDB. Otherwise,
9189 continue stepping. Add range stepping debug output.
9190 (linux_set_resume_request): Copy the step range from the resume
9191 request to the lwp.
9192 (linux_supports_range_stepping): New.
9193 (linux_target_ops) <supports_range_stepping>: Set to
9194 linux_supports_range_stepping.
9195 * linux-low.h (struct linux_target_ops)
9196 <supports_range_stepping>: New field.
9197 (struct lwp_info) <step_range_start, step_range_end>: New fields.
9198 * linux-x86-low.c (x86_supports_range_stepping): New.
9199 (the_low_target) <supports_range_stepping>: Set to
9200 x86_supports_range_stepping.
9201 * server.c (handle_v_cont): Handle 'r' action.
9202 (handle_v_requests): Append ";r" if the target supports range
9203 stepping.
9204 * target.h (struct thread_resume) <step_range_start,
9205 step_range_end>: New fields.
9206 (struct target_ops) <supports_range_stepping>:
9207 New field.
9208 (target_supports_range_stepping): New macro.
9209
9210 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9211
9212 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
9213 confusion in comment.
9214
9215 2013-05-17 Joel Brobecker <brobecker@adacore.com>
9216
9217 * lynx-low.c (struct process_info_private): New type.
9218 (lynx_add_process): New function.
9219 (lynx_create_inferior, lynx_attach): Replace calls to
9220 add_process by calls to lynx_add_process.
9221 (lynx_resume): If PTID is null, then try using
9222 current_process()->private->last_wait_event_ptid.
9223 Add comments.
9224 (lynx_clear_inferiors): Delete. The contents of that function
9225 has been inlined in lynx_mourn;
9226 (lynx_wait_1): Save the ptid in the process's private data.
9227 (lynx_mourn): Free the process' private data. Replace call
9228 to lynx_clear_inferiors by call to clear_inferiors.
9229
9230 2013-05-17 Yao Qi <yao@codesourcery.com>
9231
9232 * i386-low.c (i386_length_and_rw_bits): Move the comment to
9233 the right place.
9234
9235 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
9236
9237 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
9238 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
9239 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
9240 PT_TEXT_END_ADDR guards. Update comments.
9241 (linux_target_op) <read_offsets>: Conditionally define to
9242 linux_read_offsets if the target is UCLIBC and if it defines
9243 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
9244
9245 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
9246 Andrew Jenner <andrew@codesourcery.com>
9247
9248 * Makefile.in (SFILES): Add linux-nios2-low.c.
9249 (clean): Add action to delete nios2-linux.c.
9250 (nios2-linux.c): New rule.
9251 * configure.srv: Add nios2*-*-linux*.
9252 * linux-nios2-low.c: New.
9253
9254 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
9255
9256 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
9257
9258 2013-04-25 Hui Zhu <hui@codesourcery.com>
9259
9260 PR gdb/15186
9261 * ax.c (ax_printf): Add fflush.
9262
9263 2013-04-22 Tom Tromey <tromey@redhat.com>
9264
9265 * Makefile.in (SFILES): Add filestuff.c.
9266 (OBS): Add filestuff.o.
9267 (filestuff.o): New target.
9268 * config.in, configure: Rebuild.
9269 * configure.ac: Check for fdwalk, pipe2.
9270
9271 2013-04-17 Pedro Alves <palves@redhat.com>
9272
9273 * configure.ac (USE_THREAD_DB): Delete variable.
9274 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
9275 Don't AC_SUBST USE_THREAD_DB.
9276 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
9277 * config.in, configure: Regenerate.
9278
9279 2013-04-16 Pedro Alves <palves@redhat.com>
9280
9281 * linux-low.h (struct lwp_info) <thread_known>: Move under
9282 the USE_THREAD_DB #ifdef.
9283
9284 2013-04-16 Pedro Alves <palves@redhat.com>
9285
9286 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
9287 (linux-low.o): Delete rule.
9288 * linux-low.h: Always include "gdb_thread_db.h" instead of
9289 conditionally including thread_db.h.
9290 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
9291 HAVE_THREAD_DB_H.
9292
9293 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9294
9295 * Makefile.in (install-only): Fix make install regression.
9296
9297 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
9298
9299 Convert man pages to texinfo, new gdbinit.5 texinfo page.
9300 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
9301 installation.
9302 * gdbserver.1: Remove.
9303
9304 2013-03-22 Pedro Alves <palves@redhat.com>
9305
9306 * linux-low.c (handle_extended_wait): Don't call
9307 linux_enable_event_reporting.
9308
9309 2013-03-15 Tony Theodore <tonyt@logyst.com>
9310
9311 PR build/9098:
9312 * Makefile.in (SHELL): Use @SHELL@.
9313
9314 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
9315
9316 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
9317 compiler warning.
9318
9319 2013-03-13 Joel Brobecker <brobecker@adacore.com>
9320
9321 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
9322 Remove extraneous NULL element.
9323
9324 2013-03-13 Yao Qi <yao@codesourcery.com>
9325
9326 * tracepoint.c (traceframe_read_tsv): Look for the last matched
9327 'V' block in trace frame.
9328
9329 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9330
9331 * target.h (struct target_ops): Add btrace ops.
9332 (target_supports_btrace): New macro.
9333 (target_enable_btrace): New macro.
9334 (target_disable_btrace): New macro.
9335 (target_read_btrace): New macro.
9336 * gdbthread.h (struct thread_info): Add btrace field.
9337 * server.c: Include btrace-common.h.
9338 (handle_btrace_general_set): New function.
9339 (handle_btrace_enable): New function.
9340 (handle_btrace_disable): New function.
9341 (handle_general_set): Call handle_btrace_general_set.
9342 (handle_qxfer_btrace): New function.
9343 (struct qxfer qxfer_packets[]): Add btrace entry.
9344 * inferiors.c (remove_thread): Disable btrace.
9345 * linux-low: Include linux-btrace.h.
9346 (linux_low_enable_btrace): New function.
9347 (linux_low_read_btrace): New function.
9348 (linux_target_ops): Add btrace ops.
9349 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
9350 Add srv_linux_btrace=yes.
9351 (x86_64-*-linux*): Add linux-btrace.o.
9352 Add srv_linux_btrace=yes.
9353 * configure.ac: Define HAVE_LINUX_BTRACE.
9354 * config.in: Regenerated.
9355 * configure: Regenerated.
9356
9357 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9358
9359 * server.c (handle_qxfer): Preserve error message if -3 is
9360 returned.
9361 (qxfer): Document the -3 return value.
9362
9363 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
9364
9365 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
9366 (linux_btrace_h): New variable.
9367 (linux-btrace.o): New rule.
9368
9369 2013-03-08 Stan Shebs <stan@codesourcery.com>
9370 Hafiz Abid Qadeer <abidh@codesourcery.com>
9371
9372 * tracepoint.c (trace_buffer_size): New global.
9373 (DEFAULT_TRACE_BUFFER_SIZE): New define.
9374 (init_trace_buffer): Change to one-argument function. Allocate
9375 trace buffer memory.
9376 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
9377 handle QTBuffer:size packet.
9378 (cmd_bigqtbuffer_size): New function.
9379 (initialize_tracepoint): Call init_trace_buffer with
9380 DEFAULT_TRACE_BUFFER_SIZE.
9381 * server.c (handle_query): Add QTBuffer:size in the
9382 supported packets.
9383
9384 2013-03-07 Yao Qi <yao@codesourcery.com>
9385
9386 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
9387 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
9388 of -1.
9389 (cmd_qtsp): Adjust condition. Do post increment.
9390 Set cur_action and cur_step_action back to 0.
9391
9392 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
9393
9394 PR server/15236
9395 * linux-low.c (linux_write_memory): Return early success if LEN is
9396 zero.
9397
9398 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
9399
9400 * configure.srv: Add x86_64-*-cygwin* as target.
9401
9402 2013-02-28 Tom Tromey <tromey@redhat.com>
9403
9404 * configure.ac: Invoke AC_SYS_LARGEFILE.
9405 * configure, config.in: Rebuild.
9406
9407 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
9408
9409 * win32-low.c: Throughout, fix format strings and casts of
9410 printf-like functions to avoid type related warnings on all
9411 platforms.
9412 (get_child_debug_event): Print dwDebugEventCode as hex since
9413 that's how it's usually documented.
9414
9415 2013-02-28 Yao Qi <yao@codesourcery.com>
9416
9417 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
9418 pulongest.
9419
9420 2013-02-27 Jiong Wang <jiwang@tilera.com>
9421
9422 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
9423 (reg-tilegx32.c): New rule.
9424 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
9425 * linux-tile-low.c (tile_arch_setup): New function. Invoke
9426 different register info initializer according to elf class.
9427 (init_registers_tilgx32): New function. The tilegx32 register info
9428 initializer.
9429 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
9430 (tile_store_gregset): Likewise.
9431
9432 2013-02-27 Yao Qi <yao@codesourcery.com>
9433
9434 * server.c (process_point_options): Print debug message when
9435 debug_threads is true.
9436
9437 2013-02-26 Yao Qi <yao@codesourcery.com>
9438
9439 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
9440
9441 2013-02-19 Pedro Alves <palves@redhat.com>
9442 Kai Tietz <ktietz@redhat.com>
9443
9444 PR gdb/15161
9445
9446 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
9447 instead of strtoul to extract address from packet.
9448 (process_serial_event) <'z'>: Likewise.
9449
9450 2013-02-18 Yao Qi <yao@codesourcery.com>
9451
9452 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
9453
9454 2013-02-14 Pedro Alves <palves@redhat.com>
9455
9456 Plug memory leak.
9457
9458 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
9459 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
9460
9461 2013-02-14 Pedro Alves <palves@redhat.com>
9462
9463 * tracepoint.c (cmd_qtdpsrc): Use savestring.
9464
9465 2013-02-14 Pedro Alves <palves@redhat.com>
9466
9467 * tracepoint.c (save_string): Delete.
9468 (add_tracepoint_action): Use savestring instead of save_string.
9469
9470 2013-02-12 Pedro Alves <palves@redhat.com>
9471
9472 * linux-xtensa-low.c: Ditto.
9473 * xtensa-xtregs.c: Ditto.
9474
9475 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
9476
9477 * thread-db.c (thread_db_get_tls_address): NULL pointer check
9478 thread_db.
9479
9480 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9481
9482 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
9483 aarch64_num_wp_regs and aarch64_num_bp_regs to
9484 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
9485
9486 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
9487
9488 * linux-aarch64-low.c (ps_get_thread_area): Replace
9489 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
9490
9491 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
9492 Marcus Shawcroft <marcus.shawcroft@arm.com>
9493 Nigel Stephens <nigel.stephens@arm.com>
9494 Yufeng Zhang <yufeng.zhang@arm.com>
9495
9496 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
9497 (aarch64.c, aarch64-without-fpu.c): New targets.
9498 * configure.srv (aarch64*-*-linux*): New.
9499 * linux-aarch64-low.c: New file.
9500
9501 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
9502
9503 * linux-low.c (handle_extended_wait, linux_create_inferior)
9504 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
9505 (dequeue_one_deferred_signal, linux_resume_one_thread)
9506 (fetch_register, linux_write_memory, linux_enable_event_reporting)
9507 (linux_tracefork_grandchild, linux_test_for_tracefork)
9508 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
9509 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
9510 where the argument is 0.
9511
9512 2013-01-25 Yao Qi <yao@codesourcery.com>
9513
9514 * event-loop.c: Include "queue.h".
9515 (gdb_event_p): New typedef.
9516 (struct gdb_event) <next_event>: Remove.
9517 (event_queue): Change to QUEUE(gdb_event_p).
9518 (async_queue_event): Remove.
9519 (gdb_event_xfree): New.
9520 (initialize_event_loop): New.
9521 (process_event): Use API from QUEUE.
9522 (wait_for_event): Likewise.
9523 * server.c (main): Call initialize_event_loop.
9524 * server.h (initialize_event_loop): Declare.
9525
9526 2013-01-18 Yao Qi <yao@codesourcery.com>
9527
9528 * ax.h (struct eval_agent_expr_context): New.
9529 (gdb_eval_agent_expr): Update declaration.
9530 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
9531 TFRAME. Add new argument CTX.
9532 * server.h (struct eval_agent_expr_context): Declare.
9533 (agent_mem_read, agent_tsv_read): Update declaration.
9534 (agent_mem_read_string): Likewise.
9535 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
9536 (add_traceframe_block): Add new argument TPOINT.
9537 Increase TPOINT->traceframe_usage.
9538 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
9539 eval_tracepoint_agent_expr.
9540 (condition_true_at_tracepoint): Likewise.
9541 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
9542 (agent_mem_read_string, agent_tsv_read): Likewise.
9543
9544 2013-01-16 Yao Qi <yao@codesourcery.com>
9545
9546 * linux-low.c (linux_resume_one_lwp): Don't check
9547 'lwp->bp_reinsert != 0'.
9548
9549 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9550 Pedro Alves <palves@redhat.com>
9551
9552 * lynx-low.c (ptrace_request_to_str): Define a temporary
9553 macro and use it to simplify this function's implementation.
9554
9555 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9556
9557 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
9558 sets errno.
9559
9560 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9561
9562 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
9563
9564 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9565
9566 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
9567
9568 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9569
9570 * lynx-low.c (lynx_resume): Use the resume_info parameter
9571 to determine the ptid for the lynx_ptrace call, unless
9572 it is equal to minus_one_ptid, in which case we use the
9573 ptid of the current_inferior.
9574 (lynx_wait_1): After having received a thread create/exit
9575 event, resume the inferior's execution using the signaling
9576 thread's ptid, rather than the old ptid.
9577
9578 2013-01-07 Joel Brobecker <brobecker@adacore.com>
9579
9580 * lynx-low.c (lynx_resume): Delete variable ret.
9581
9582 2013-01-01 Joel Brobecker <brobecker@adacore.com>
9583
9584 * gdbreplay.c (gdbreplay_version): Update copyright year.
9585 * server.c (gdbserver_version): Likewise.
9586
9587 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9588
9589 * lynx-low.c (lynx_wait_1): Add debug trace before adding
9590 new thread.
9591
9592 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9593
9594 * lynx-low.c (ptrace_request_to_str): Add handling for
9595 PTRACE_GETTRACESIG.
9596
9597 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9598
9599 * lynx-low.c (lynx_attach): Delete variable new_process.
9600
9601 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9602
9603 * lynx-low.c (lynx_create_inferior): Delete variable
9604 new_process.
9605
9606 2012-12-17 Joel Brobecker <brobecker@adacore.com>
9607
9608 * lynx-low.c (ptrace_request_to_str): Do not handle
9609 PTRACE_GETTHREADLIST if this macro does not exist.
9610
9611 2012-12-15 Yao Qi <yao@codesourcery.com>
9612
9613 * Makefile.in (OBS): Add notif.o.
9614 * notif.c, notif.h: New.
9615 * server.c: Include "notif.h".
9616 (struct vstop_notif) <next>: Remove.
9617 <base>: New field.
9618 (queue_stop_reply): Update.
9619 (push_event, send_next_stop_reply): Remove.
9620 (discard_queued_stop_replies): Update.
9621 (notif_stop): New variable.
9622 (handle_v_stopped): Remove.
9623 (handle_v_requests): Don't call handle_v_stopped. Call
9624 handle_ack_notif instead.
9625 (queue_stop_reply_callback): Call notif_event_enque instead
9626 of queue_stop_reply.
9627 (handle_status): Don't call send_next_stop_reply, call
9628 notif_write_event instead.
9629 (kill_inferior_callback): Likewise.
9630 (detach_or_kill_inferior_callback): Likewise.
9631 (main): Call initialize_notif.
9632 (process_serial_event): Call QUEUE_is_empty.
9633 (handle_target_event): Call notif_push instead of push event.
9634 * server.h (push_event): Remove declaration.
9635
9636 2012-12-10 Tom Tromey <tromey@redhat.com>
9637
9638 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
9639 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
9640 macros.
9641 (.c.o): Rewrite.
9642 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
9643 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
9644 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
9645 (amd64-linux-ipa.o, ax.o): Rewrite.
9646 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
9647 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
9648 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
9649 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
9650 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
9651 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
9652 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
9653 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
9654 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
9655 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
9656 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
9657 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
9658 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
9659 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
9660 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
9661 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
9662 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
9663 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
9664 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
9665 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
9666 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
9667 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
9668 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
9669 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
9670 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
9671 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
9672 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
9673 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
9674 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
9675 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
9676 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
9677 (reg-tilegx.o): Remove.
9678 (all_object_files): New macro.
9679 Include .deps files.
9680 * aclocal.m4, configure: Rebuild.
9681 * acinclude.m4: Include depstand.m4, lead-dot.m4.
9682 * configure.ac: Invoke ZW_CREATE_DEPDIR,
9683 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
9684
9685 2012-12-05 Tom Tromey <tromey@redhat.com>
9686
9687 PR gdb/14917:
9688 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
9689
9690 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
9691
9692 * configure.ac: Check for linux/perf_event.h.
9693 * config.in: Regenerated.
9694 * configure: Regenerated.
9695
9696 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
9697
9698 * hostio.c (handle_readlink): Decrease buffer size
9699 parameter passed to readlink by one byte.
9700
9701 2012-11-26 Yao Qi <yao@codesourcery.com>
9702
9703 * configure.ac (build_warnings): Append '-Wempty-body'.
9704 * configure: Regenerated.
9705 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
9706 body.
9707
9708 2012-11-15 Pierre Muller <muller@sourceware.org>
9709
9710 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
9711 * config.in: Regenerate.
9712 * configure: Regenerate.
9713 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
9714 Use "gdb_wait.h" header instead of <sys/wait.h> header.
9715 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9716 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
9717 header.
9718 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
9719 instead of <sys/wait.h> header.
9720 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
9721
9722 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
9723
9724 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
9725 (various make rules): Remove -DGDBSERVER
9726
9727 2012-11-09 Yao Qi <yao@codesourcery.com>
9728
9729 * spu-low.c (current_ptid): Move it to ..
9730 * gdbthread.h: ... here. New.
9731 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
9732 * server.c (myresume, process_serial_event): Likewise.
9733 * thread-db.c (thread_db_find_new_threads): Likewise.
9734 * tracepoint.c (run_inferior_command): Likewise.
9735
9736 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
9737
9738 * server.c (handle_search_memory_1): Include access length in
9739 warning message.
9740
9741 2012-09-05 Michael Brandt <michael.brandt@axis.com>
9742
9743 * linux-crisv32-low.c: Fix compile errors.
9744
9745 2012-09-04 Yao Qi <yao@codesourcery.com>
9746
9747 * tracepoint.c (cmd_qtsv): Adjust debug message.
9748 Don't check CUR_TPOINT.
9749
9750 2012-08-28 Yao Qi <yao@codesourcery.com>
9751
9752 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
9753 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
9754 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
9755 Remove declarations of xmalloc, xreallloc, xstrdup and
9756 freeargv.
9757 * Makefile.in (libiberty_h): New.
9758 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
9759 (linux-bfin-low.o): Append dependency 'libiberty.h'.
9760
9761 2012-08-23 Yao Qi <yao@codesourcery.com>
9762
9763 * server.h: Remove declaration of 'xsnprintf'.
9764
9765 2012-08-22 Keith Seitz <keiths@redhat.com>
9766
9767 * server.h: Include build-gnulib-gbserver/config.h.
9768 * gdbreplay.c: Likewise.
9769
9770 2012-08-08 Doug Evans <dje@google.com>
9771
9772 * Makefile.in (SFILES): Add gdb_vecs.c.
9773 (OBS): Add gdb_vecs.o.
9774 (gdb_vecs_h, host_defs_h): New variables.
9775 (thread-db.o): Add $(gdb_vecs_h) dependency.
9776 (gdb_vecs.o): New rule.
9777 * thread-db.c: #include "gdb_vecs.h".
9778 (thread_db_load_search): Use a vector to iterate over path elements.
9779 Handle text appearing after "$pdir".
9780
9781 * configure.ac: Add check for strstr.
9782 * config.in: Regenerate.
9783 * configure: Regenerate.
9784
9785 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
9786
9787 * hostio.c (handle_pread): If pread fails, fall back to attempting
9788 lseek/read.
9789 (handle_pwrite): Likewise for pwrite.
9790
9791 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
9792
9793 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
9794 between unsupported TYPE and unimplementable ADDR/LEN combination.
9795 (arm_insert_point): Act on new return value.
9796
9797 2012-07-31 Pedro Alves <palves@redhat.com>
9798
9799 * server.c (process_point_options): Only skip tokens if we find
9800 one that is unrecognized. Don't treat 'X' specially while
9801 skipping unrecognized tokens.
9802
9803 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
9804
9805 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
9806 to 4-byte-align HW breakpoint addresses for Thumb.
9807
9808 2012-07-27 Yao Qi <yao@codesourcery.com>
9809
9810 PR remote/14161.
9811
9812 * server.h: Declare gdb_agent_about_to_close.
9813 * target.c (kill_inferior): Include "agent.h".
9814 New. Send command 'kill'.
9815 * target.h (kill_inferior): Removed macro.
9816 * tracepoint.c (gdb_agent_about_to_close): New.
9817 (gdb_agent_helper_thread): Handle command 'close'.
9818 Wait endlessly until the inferior stops.
9819 Install gdb_agent_remove_socket to atexit hook.
9820 (agent_socket_name): New static variable.
9821 (gdb_agent_socket_init): Replace local variable 'name' with
9822 'agent_socket_name'.
9823 (gdb_agent_remove_socket): New.
9824
9825 2012-07-27 Yao Qi <yao@codesourcery.com>
9826
9827 * server.c (process_point_options): Stop at 'X' when parsing.
9828
9829 2012-07-19 Michael Eager <eager@eagercon.com>
9830
9831 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
9832 to hw_execute.
9833 * linux-x86-low.c (x86_insert_point, x86_remove_point):
9834 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
9835 hardware breakpoint.
9836
9837 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
9838
9839 * gdbserver/linux-low.c (initialize_low): Call
9840 linux_ptrace_init_warnings.
9841
9842 2012-07-02 Doug Evans <dje@google.com>
9843
9844 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
9845 pointer to int.
9846
9847 2012-07-02 Stan Shebs <stan@codesourcery.com>
9848
9849 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
9850 (ax.o): Add it to build rule.
9851 (ax-ipa.o): Ditto.
9852 (OBS): Add format.o.
9853 (IPA_OBS): Add format.o.
9854 * server.c (handle_query): Claim support for breakpoint commands.
9855 (process_point_options): Add command case.
9856 (process_serial_event): Leave running if there are printfs in
9857 effect.
9858 * mem-break.h (any_persistent_commands): Declare.
9859 (add_breakpoint_commands): Declare.
9860 (gdb_no_commands_at_breakpoint): Declare.
9861 (run_breakpoint_commands): Declare.
9862 * mem-break.c (struct point_command_list): New struct.
9863 (struct breakpoint): New field command_list.
9864 (any_persistent_commands): New function.
9865 (add_commands_to_breakpoint): New function.
9866 (add_breakpoint_commands): New function.
9867 (gdb_no_commands_at_breakpoint): New function.
9868 (run_breakpoint_commands): New function.
9869 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
9870 locally.
9871 * ax.c: Include format.h.
9872 (ax_printf): New function.
9873 (gdb_eval_agent_expr): Add printf opcode.
9874
9875 2012-06-13 Yao Qi <yao@codesourcery.com>
9876
9877 * server.c (start_inferior): Remove duplicated writes to fields
9878 'last_resume_kind' and 'last_status' of 'current_inferior'.
9879
9880 2012-06-12 Yao Qi <yao@codesourcery.com>
9881 Pedro Alves <palves@redhat.com>
9882
9883 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
9884 comment.
9885 * server.c (handle_v_cont): Extend comment.
9886
9887 2012-06-11 Yao Qi <yao@codesourcery.com>
9888
9889 * linux-low.c (linux_attach): Add 'static'.
9890
9891 2012-06-06 Yao Qi <yao@codesourcery.com>
9892
9893 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
9894
9895 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9896
9897 Fix gcc -flto compilation warning.
9898 * server.c (main): Make variable multi_mode and attach volatile.
9899
9900 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9901
9902 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
9903 if the platform doesn't know about it.
9904
9905 2012-05-30 Jeff Kenton <jkenton@tilera.com>
9906
9907 * Makefile.in (SFILES): Add linux-tile-low.c.
9908 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
9909 * configure.srv: Handle tilegx-*-linux*.
9910 * linux-tile-low.c: New file.
9911
9912 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9913
9914 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
9915
9916 2012-05-24 Pedro Alves <palves@redhat.com>
9917
9918 PR gdb/7205
9919
9920 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
9921
9922 2012-05-24 Pedro Alves <palves@redhat.com>
9923
9924 PR gdb/7205
9925
9926 Replace target_signal with gdb_signal throughout.
9927
9928 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
9929
9930 * linux-low.c (linux_store_registers): Avoid the copying sequence
9931 when no data has been retrieved by ptrace.
9932
9933 2012-05-22 Will Deacon <will.deacon@arm.com>
9934
9935 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
9936 Include asm/ptrace.h.
9937 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
9938 already defined.
9939
9940 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
9941
9942 * linux-low.c (linux_store_registers): Don't re-retrieve data
9943 with ptrace that has already been obtained from /proc. Always
9944 copy any data retrieved with ptrace to the buffer supplied.
9945
9946 2012-05-11 Yao Qi <yao@codesourcery.com>
9947 Pedro Alves <palves@redhat.com>
9948
9949 * linux-low.c (enum stopping_threads_kind): New.
9950 (stopping_threads): Change type to `enum stopping_threads_kind'.
9951 (handle_extended_wait): If stopping and suspending threads, leave
9952 the new_lwp suspended too.
9953 (linux_wait_for_event): Adjust.
9954 (stop_all_lwps): Set `stopping_threads' to
9955 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
9956 whether we're suspending threads or just stopping them. Assert no
9957 recursion happens.
9958
9959 2012-04-29 Yao Qi <yao@codesourcery.com>
9960
9961 * server.h: Move some code to ...
9962 * gdbthread.h: ... here. New.
9963 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
9964 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
9965 (nto-low.o, win32-low.o): Likewise.
9966 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
9967 * regcache.c, remote-utils.c, server.c: Likewise.
9968 * target.c, tracepoint.c, win32-low.c: Likewise.
9969
9970 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
9971
9972 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
9973 (PTRACE_ARG4_TYPE): Likewise.
9974 (PTRACE_XFER_TYPE): Likewise.
9975 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
9976 ptrace to PTRACE_ARG3_TYPE.
9977 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
9978 (PTRACE_ARG4_TYPE): Likewise.
9979 (PTRACE_XFER_TYPE): Likewise.
9980 (linux_detach_one_lwp): Cast fourth argument of
9981 ptrace to long then PTRACE_ARG4_TYPE.
9982 (regsets_fetch_inferior_registers): Cast third argument of
9983 ptrace to long then PTRACE_ARG3_TYPE.
9984 (regsets_store_inferior_registers): Likewise.
9985
9986 2012-04-20 Pedro Alves <palves@redhat.com>
9987
9988 * configure: Regenerate.
9989
9990 2012-04-19 Pedro Alves <palves@redhat.com>
9991
9992 * Makefile.in (GNULIB_BUILDDIR): New.
9993 (LIBGNU, INCGNU, GNULIB_H): Adjust.
9994 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
9995 (all, install-only, uninstall, clean-info, all-lib, clean): No
9996 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
9997 (maintainer-clean realclean distclean): Use subdir_do.
9998 (subdir_do): New.
9999 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
10000 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
10001 * acinclude.m4: Include acx_configure_dir.m4.
10002 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
10003 calls. Call AC_PROG_RANLIB. Configure gnulib using
10004 ACX_CONFIGURE_DIR.
10005 (GNULIB): New.
10006 (GNULIB_STDINT_H): Adjust.
10007 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
10008 * gdbreplay.c: Include build-gnulib/config.h.
10009 * server.h: Likewise.
10010 * aclocal.m4: Regenerate.
10011 * config.in: Regenerate.
10012 * configure: Regenerate.
10013
10014 2012-04-19 Pedro Alves <palves@redhat.com>
10015
10016 * Makefile.in (LIBGNU, INCGNU): Adjust.
10017 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
10018 (all, install-only, uninstall, clean-info, all-lib, clean)
10019 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
10020 * configure.ac: Adjust AC_OUTPUT output.
10021 * aclocal.m4: Regenerate.
10022 * configure: Regenerate.
10023
10024 2012-04-19 Pedro Alves <palves@redhat.com>
10025
10026 * Makefile.in (generated_files): New.
10027 (server_h): Remove the explicit dependency on config.h, and depend
10028 on $generated_files.
10029
10030 2012-04-19 Pedro Alves <palves@redhat.com>
10031
10032 * Makefile.in (INCGNU): Add -Ignulib.
10033
10034 2012-04-19 Pedro Alves <palves@redhat.com>
10035
10036 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
10037 (INCGNU): ... this, and spell out -I here.
10038 (GNULIB_LIB): Rename to ...
10039 (LIBGNU): ... this.
10040 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
10041
10042 2012-04-19 Pedro Alves <palves@redhat.com>
10043
10044 * config.in: Regenerate.
10045
10046 2012-04-19 Pedro Alves <palves@redhat.com>
10047
10048 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
10049 * server.h (memmem): Remove declaration.
10050 * config.in: Regenerate.
10051 * configure: Regenerate.
10052
10053 2012-04-19 Yao Qi <yao@codesourcery.com>
10054
10055 * Makefile.in (SFILES): Add common/vec.c.
10056 (OBS): Add vec.o.
10057 (vec.o): New rule.
10058
10059 2012-04-19 Yao Qi <yao@codesourcery.com>
10060
10061 * remote-utils.c (prepare_resume_reply): Replace with macro
10062 target_core_of_thread.
10063 * server.c (handle_qxfer_threads_proper): Likewise.
10064 * target.h (traget_core_of_thread): New macro.
10065
10066 2012-04-18 Pedro Alves <palves@redhat.com>
10067
10068 * aclocal.m4: Regenerate.
10069 * configure: Regenerate.
10070
10071 2012-04-16 Yao Qi <yao@codesourcery.com>
10072
10073 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
10074 duplicated on address.
10075
10076 2012-04-16 Yao Qi <yao@codesourcery.com>
10077
10078 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
10079 (struct tracepoint_action_ops) <send>: New field.
10080 (m_tracepoint_action_send, r_tracepoint_action_send): New.
10081 (agent_expr_send, x_tracepoint_action_send): New.
10082 (l_tracepoint_action_send): New.
10083 (cmd_qtdp): Download and install tracepoint
10084 according to `use_agent'.
10085 (run_inferior_command): Add one more parameter `len'.
10086 Update callers.
10087 (tracepoint_send_agent): New.
10088 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
10089
10090 2012-04-16 Yao Qi <yao@codesourcery.com>
10091
10092 * tracepoint.c (download_tracepoints): Moved to ...
10093 (cmd_qtstart): ... here.
10094
10095 2012-04-14 Yao Qi <yao@codesourcery.com>
10096
10097 * tracepoint.c: Include inttypes.h.
10098 (struct collect_memory_action): Use sized types.
10099 (struct tracepoint): Likewise.
10100 (cmd_qtdp, stop_tracing): Update print specifiers.
10101 (cmd_qtp, response_tracepoint): Likewise.
10102 (collect_data_at_tracepoint): Likewise.
10103 (collect_data_at_step): Likewise.
10104
10105 2012-04-14 Yao Qi <yao@codesourcery.com>
10106
10107 Import gnulib module inttypes.
10108 * aclocal.m4, config.in, configure: Regenerated.
10109
10110 2012-04-14 Yao Qi <yao@codesourcery.com>
10111
10112 * Makefile.in (maintainer-clean, realclean, distclean): Remove
10113 Makefile and config.status at last.
10114
10115 2012-04-13 Yao Qi <yao@codesourcery.com>
10116
10117 * tracepoint.c: Include stdint.h unconditionally.
10118
10119 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10120
10121 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
10122 on BFD_HAVE_SYS_PROCFS_TYPE.
10123 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
10124 * configure: Regenerate.
10125 * config.in: Likewise.
10126
10127 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
10128
10129 * Makefile.in (clean): Also remove x32.c x32-linux.c
10130 x32-avx.c x32-avx-linux.c.
10131 (x32.o): New target.
10132 (x32.c): Likewise.
10133 (x32-linux.o): Likewise.
10134 (x32-linux.c): Likewise.
10135 (x32-avx.o): Likewise.
10136 (x32-avx.c): Likewise.
10137 (x32-avx-linux.o): Likewise.
10138 (x32-avx-linux.c): Likewise.
10139
10140 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
10141 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
10142 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
10143 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
10144 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
10145 i386/x32-avx-linux.xml.
10146
10147 * linux-x86-low.c (init_registers_x32_linux): New prototype.
10148 (init_registers_x32_avx_linux): Likwise.
10149 (x86_linux_update_xmltarget): Call init_registers_x32_linux
10150 or init_registers_x32_avx_linux if linux_is_elf64 is false.
10151
10152 2012-04-13 Pedro Alves <palves@redhat.com>
10153
10154 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
10155 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
10156 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
10157 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
10158 the sub-make.
10159
10160 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10161
10162 * linux-x86-low.c (compat_x32_clock_t): New.
10163 (compat_x32_siginfo_t): Likewise.
10164 (compat_x32_siginfo_from_siginfo): Likewise.
10165 (siginfo_from_compat_x32_siginfo): Likewise.
10166 (linux_is_elf64): Likewise.
10167 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
10168 and siginfo_from_compat_x32_siginfo for x32.
10169 (x86_arch_setup): Set linux_is_elf64.
10170
10171 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
10172
10173 PR gdb/13969
10174 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
10175 e_machine field.
10176 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
10177 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
10178 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
10179 compatible with process.
10180
10181 2012-04-12 Yao Qi <yao@codesourcery.com>
10182
10183 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
10184 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
10185 (install-only, install-info, clean): Handle sub dir gnulib.
10186 (all-lib, am--refresh): New targets.
10187 (memmem.o): Remove target.
10188 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
10189 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
10190 (AC_REPLACE_FUNCS): Remove memmem.
10191 Invoke gl_INIT and AM_INIT_AUTOMAKE.
10192 (AC_OUTPUT): Generate Makefile in gnulib/.
10193 * aclocal.m4, config.in, configure: Regenerated.
10194
10195 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
10196
10197 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
10198
10199 2012-04-05 Pedro Alves <palves@redhat.com>
10200
10201 -Werror=strict-aliasing
10202
10203 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
10204 pointer.
10205
10206 2012-04-04 Pedro Alves <palves@redhat.com>
10207
10208 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10209 (sparc_store_gregset_from_stack, sparc_store_gregset)
10210 (sparc_breakpoint_at): Fix formatting.
10211
10212 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
10213
10214 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
10215 are available.
10216 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
10217 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
10218 * config.in: Regenerate.
10219 * configure: Likewise.
10220
10221 2012-03-29 Pedro Alves <palves@redhat.com>
10222
10223 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
10224 Correct ptrace arguments.
10225
10226 2012-03-28 Pedro Alves <palves@redhat.com>
10227
10228 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
10229 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
10230 (IA64_FR1_REGNUM): New defines.
10231 (ia64_fetch_register): New.
10232 (the_low_target): Install it.
10233 * linux-low.h (struct linux_target_ops) <fetch_register>: New
10234 field.
10235 * linux-low.c (linux_fetch_registers): Try the
10236 the_low_target.fetch_register hook first.
10237
10238 * linux-arm-low.c (the_low_target): Adjust.
10239 * linux-bfin-low.c (the_low_target): Adjust.
10240 * linux-cris-low.c (the_low_target): Adjust.
10241 * linux-crisv32-low.c (the_low_target): Adjust.
10242 * linux-m32r-low.c (the_low_target): Adjust.
10243 * linux-m68k-low.c (the_low_target): Adjust.
10244 * linux-mips-low.c (the_low_target): Adjust.
10245 * linux-ppc-low.c (the_low_target): Adjust.
10246 * linux-s390-low.c (the_low_target): Adjust.
10247 * linux-sh-low.c (the_low_target): Adjust.
10248 * linux-sparc-low.c (the_low_target): Adjust.
10249 * linux-tic6x-low.c (the_low_target): Adjust.
10250 * linux-x86-low.c (the_low_target): Adjust.
10251 * linux-xtensa-low.c (the_low_target): Adjust.
10252
10253 2012-03-26 Pedro Alves <palves@redhat.com>
10254
10255 * server.c (handle_qxfer_libraries): Don't bail early if
10256 the_target->qxfer_libraries_svr4 is not NULL.
10257
10258 2012-03-26 Pedro Alves <palves@redhat.com>
10259
10260 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
10261
10262 2012-03-23 Pedro Alves <palves@redhat.com>
10263
10264 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
10265 "library-list-svr4" element's start tag when the the DSO list is
10266 empty.
10267
10268 2012-03-23 Pedro Alves <palves@redhat.com>
10269
10270 * linux-low.c (read_one_ptr): Read the inferior's pointer through
10271 a variable whose type size is the same as the inferior's pointer
10272 size.
10273
10274 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
10275
10276 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
10277 struct siginfo.
10278 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
10279 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
10280 * linux-low.h: Include <signal.h>.
10281 (struct siginfo): Remove forward declaration.
10282 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
10283 struct siginfo.
10284
10285 2012-03-21 Mike Frysinger <vapier@gentoo.org>
10286
10287 * .gitignore: Ignore more files.
10288
10289 2012-03-19 Pedro Alves <palves@redhat.com>
10290 Jan Kratochvil <jan.kratochvil@redhat.com>
10291
10292 * server.c (cont_thread, general_thread): Add describing comments.
10293 (start_inferior): Clear `cont_thread'.
10294 (handle_v_cont): Don't set `cont_thread' if resuming all threads
10295 of a process.
10296
10297 2012-03-15 Yao Qi <yao@codesourcery.com>
10298
10299 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
10300 handling to ...
10301 (cmd_qtdp): ... here.
10302
10303 2012-03-15 Yao Qi <yao@codesourcery.com>
10304
10305 * tracepoint.c (struct tracepoint_action_ops): New.
10306 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
10307 (m_tracepoint_action_download): New.
10308 (r_tracepoint_action_download): New.
10309 (x_tracepoint_action_download): New.
10310 (l_tracepoint_action_download): New.
10311 (add_tracepoint_action): Install `action->ops' according type.
10312 (download_tracepoint_1): Move code `download' function pointer
10313 of various tracepoint_action_ops.
10314
10315 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10316
10317 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
10318 linux_ptrace_attach_warnings.
10319
10320 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
10321
10322 * Makefile.in (linux-ptrace.o): New.
10323 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
10324 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
10325 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
10326 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
10327 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
10328 of these targets.
10329 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
10330
10331 2012-03-08 Yao Qi <yao@codesourcery.com>
10332 Pedro Alves <palves@redhat.com>
10333
10334 Fix PR server/13392.
10335 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
10336 offset of JMP insn.
10337 * tracepoint.c (remove_tracepoint): New.
10338 (cmd_qtdp): Call remove_tracepoint when failed to install.
10339
10340 2012-03-07 Pedro Alves <palves@redhat.com>
10341
10342 * linux-low.c (get_detach_signal): New.
10343 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
10344 Pass on pending signals to PTRACE_DETACH. Check the result of the
10345 ptrace call.
10346 * server.c (program_signals, program_signals_p): New.
10347 (handle_general_set): Handle QProgramSignals.
10348 * server.h (program_signals, program_signals_p): Declare.
10349
10350 2012-03-05 Pedro Alves <palves@redhat.com>
10351 Jan Kratochvil <jan.kratochvil@redhat.com>
10352
10353 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
10354 New comment why.
10355
10356 2012-03-03 Yao Qi <yao@codesourcery.com>
10357
10358 * tracepoint.c (tracepoint_look_up_symbols): Update call to
10359 agent_look_up_symbols.
10360
10361 2012-03-03 Yao Qi <yao@codesourcery.com>
10362
10363 * Makefile.in (linux-low.o): Keep dependence on agent.h.
10364 (linux-x86-low.o): Likewise.
10365 * server.h: Remove in_process_agent_loaded.
10366 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
10367 common/agent.c.
10368 Update callers.
10369
10370 2012-03-03 Yao Qi <yao@codesourcery.com>
10371
10372 * tracepoint.c (gdb_agent_capability): New global.
10373 (in_process_agent_loaded_ust): Renamed to
10374 `in_process_agent_supports_ust'.
10375 Update callers.
10376 (in_process_agent_supports_ust): Call agent_capability_check.
10377 (clear_installed_tracepoints): Assert that agent supports
10378 agent.
10379
10380 2012-03-03 Yao Qi <yao@codesourcery.com>
10381
10382 * linux-low.c (linux_supports_agent): New.
10383 (linux_target_ops): Initialize field `supports_agent' with
10384 linux_supports_agent.
10385 * target.h (struct target_ops) <supports_agent>: New.
10386 (target_supports_agent): New macro.
10387 * server.c (handle_general_set): Handle packet 'QAgent'.
10388 (handle_query): Send `QAgent+'.
10389 * Makefile.in (server.o): Depends on agent.h.
10390
10391 2012-03-03 Yao Qi <yao@codesourcery.com>
10392
10393 * Makefile.in (OBS): Add agent.o.
10394 Add new rule for agent.o.
10395 Track dependence of tracepoint.c on agent.h.
10396 * tracepoint.c (run_inferior_command_1):
10397 (run_inferior_command): Call agent_run_command.
10398 (gdb_ust_connect_sync_socket): Deleted. Move it to
10399 common/agent.c.
10400 (resume_thread, stop_thread): Likewise.
10401 (gdb_ust_socket_init): Renamed to ...
10402 (gdb_agent_socket_init): ... New.
10403 (gdb_ust_thread): Renamed to ...
10404 (gdb_agent_helper_thread): ... New.
10405 (gdb_ust_init): Move some code to ...
10406 (gdb_agent_init): ... here. New.
10407 [HAVE_UST]: Call gdb_ust_init.
10408 (initialize_tracepoint_ftlib): Call gdb_agent_init.
10409 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
10410 * config.in, configure: Regenerated.
10411
10412 2012-03-02 Pedro Alves <palves@redhat.com>
10413
10414 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
10415 * linux-low.c (struct simple_pid_list): New.
10416 (stopped_pids): New a struct simple_pid_list pointer.
10417 (add_to_pid_list, pull_pid_from_list): New.
10418 (handle_extended_wait): Don't assume the first signal new children
10419 report is SIGSTOP. Adjust call to pull_pid_from_list.
10420 (linux_wait_for_lwp): Adjust.
10421
10422 2012-03-02 Yao Qi <yao@codesourcery.com>
10423
10424 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
10425 debug log.
10426
10427 2012-03-02 Yao Qi <yao@codesourcery.com>
10428
10429 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
10430 `stop_pc' and `tpoint'. Update caller.
10431
10432 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
10433
10434 * linux-low.h (linux_target_ops): Add regset_bitmap member.
10435 * linux-low.c (use_linux_regsets): New macro.
10436 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
10437 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
10438 (linux_register_in_regsets): New function.
10439 (usr_fetch_inferior_registers): Skip registers covered by
10440 regsets.
10441 (usr_store_inferior_registers): Likewise.
10442 (usr_fetch_inferior_registers): New macro.
10443 (usr_store_inferior_registers): Likewise.
10444 (linux_fetch_registers): Handle mixed regset/non-regset targets.
10445 (linux_store_registers): Likewise.
10446 * linux-mips-low.c (init_registers_mips_dsp_linux): New
10447 prototype.
10448 (init_registers_mips64_dsp_linux): Likewise.
10449 (init_registers_mips_linux): New macro.
10450 (init_registers_mips_dsp_linux): Likewise.
10451 (mips_dsp_num_regs): Likewise.
10452 (DSP_BASE, DSP_CONTROL): New fallback macros.
10453 (mips_base_regs): New macro.
10454 (mips_regmap): Use it. Fix the size.
10455 (mips_dsp_regmap): New variable.
10456 (mips_dsp_regset_bitmap): Likewise.
10457 (mips_arch_setup): New function.
10458 (mips_cannot_fetch_register): Use the_low_target.regmap rather
10459 than mips_regmap.
10460 (mips_cannot_store_register): Likewise.
10461 (the_low_target): Update .arch_setup, .num_regs and .regmap
10462 initializers. Add .regset_bitmap initializer.
10463 * linux-arm-low.c (the_low_target): Add .regset_bitmap
10464 initializer.
10465 * linux-bfin-low.c (the_low_target): Likewise.
10466 * linux-cris-low.c (the_low_target): Likewise.
10467 * linux-crisv32-low.c (the_low_target): Likewise.
10468 * linux-ia64-low.c (the_low_target): Likewise.
10469 * linux-m32r-low.c (the_low_target): Likewise.
10470 * linux-m68k-low.c (the_low_target): Likewise.
10471 * linux-ppc-low.c (the_low_target): Likewise.
10472 * linux-s390-low.c (the_low_target): Likewise.
10473 * linux-sh-low.c (the_low_target): Likewise.
10474 * linux-sparc-low.c (the_low_target): Likewise.
10475 * linux-tic6x-low.c (the_low_target): Likewise.
10476 * linux-x86-low.c (the_low_target): Likewise.
10477 * linux-xtensa-low.c (the_low_target): Likewise.
10478 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
10479 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
10480 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
10481 srv_xmlfiles.
10482 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
10483 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
10484
10485 2012-02-29 Yao Qi <yao@codesourcery.com>
10486 Pedro Alves <palves@redhat.com>
10487
10488 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
10489 `step_over_finished' is true.
10490
10491 2012-02-27 Pedro Alves <palves@redhat.com>
10492
10493 * linux-low.c (pid_is_stopped): Delete, moved to common/.
10494 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
10495
10496 2012-02-27 Pedro Alves <palves@redhat.com>
10497
10498 PR server/9684
10499 * linux-low.c (pid_is_stopped): New.
10500 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
10501
10502 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
10503
10504 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
10505 of conditions.
10506
10507 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
10508
10509 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
10510
10511 2012-02-24 Luis Machado <lgustavo@codesourcery>
10512
10513 * server.c (handle_query): Advertise support for target-side
10514 breakpoint condition evaluation.
10515 (process_point_options): New function.
10516 (process_serial_event): When inserting a breakpoint, check for
10517 a target-side condition that should be evaluated.
10518
10519 * mem-break.c: Include regcache.h and ax.h.
10520 (point_cond_list_t): New data structure.
10521 (breakpoint) <cond_list>: New field.
10522 (find_gdb_breakpoint_at): Make non-static.
10523 (delete_gdb_breakpoint_at): Clear any target-side
10524 conditions.
10525 (clear_gdb_breakpoint_conditions): New function.
10526 (add_condition_to_breakpoint): Likewise.
10527 (add_breakpoint_condition): Likewise.
10528 (gdb_condition_true_at_breakpoint): Likewise.
10529 (gdb_breakpoint_here): Return result directly instead
10530 of going through a local variable.
10531
10532 * mem-break.h (find_gdb_breakpoint_at): New prototype.
10533 (clear_gdb_breakpoint_conditions): Likewise.
10534 (add_breakpoint_condition): Likewise.
10535 (gdb_condition_true_at_breakpoint): Likewise.
10536
10537 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
10538 (need_step_over_p): Take target-side breakpoint condition into
10539 consideration.
10540
10541 2012-02-24 Luis Machado <lgustavo@codesourcery>
10542
10543 * server.h: Include tracepoint.h.
10544 (agent_mem_read, agent_get_trace_state_variable_value,
10545 agent_set_trace_state_variable_value,
10546 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
10547 get_set_tsv_func_addr): New prototypes.
10548
10549 * ax.h: New include file.
10550 * ax.c: New source file.
10551
10552 * tracepoint.c: Include ax.h.
10553 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
10554 agent_expr, eval_result_type): Move to ax.h.
10555 (parse_agent_expr): Rename to ...
10556 (gdb_parse_agent_expr): ... this, make it non-static and move
10557 to ax.h.
10558 (unparse_agent_expr) Rename to ...
10559 (gdb_unparse_agent_expr): ... this, make it non-static and move
10560 to ax.h.
10561 (eval_agent_expr): Rename to ...
10562 (eval_tracepoint_agent_expr): ... this.
10563 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
10564 forward declarations.
10565 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
10566 (agent_get_trace_state_variable_value): New function.
10567 (agent_set_trace_state_variable_value): New function.
10568 (cmd_qtdp): Call gdb_parse_agent_expr (...).
10569 (response_tracepoint): Call gdb_unparse_agent_expr (...).
10570 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
10571 (condition_true_at_tracepoint): Likewise.
10572 (parse_agent_expr): Rename to ...
10573 (gdb_parse_agent_expr): ... this and move to ax.c.
10574 (unparse_agent_expr): Rename to ...
10575 (gdb_unparse_agent_expr): ... this and move to ax.c.
10576 (gdb_agent_op_name): Move to ax.c.
10577 (eval_agent_expr): Rename to ...
10578 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
10579 and move to ax.c.
10580 (eval_tracepoint_agent_expr): New function.
10581 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
10582 non-static.
10583 (current_insn_ptr, emit_error, struct bytecode_address): Move to
10584 ax.c.
10585 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
10586 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
10587 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
10588 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
10589 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
10590 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
10591 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
10592 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
10593 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
10594 (compile_bytecodes): Remove forward declaration.
10595 (is_goto_target): Move to ax.c.
10596 (compile_bytecodes): Move to ax.c and call
10597 agent_get_trace_state_variable_value (...) and
10598 agent_set_trace_state_variable_value (...).
10599
10600 * Makefile.in: Update ax.c and IPA dependencies.
10601
10602 2012-02-24 Pedro Alves <palves@redhat.com>
10603
10604 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
10605 (cmd_bigqtbuffer_circular): ... this. Only handle
10606 'QTBuffer:circular:'.
10607 (handle_tracepoint_general_set): Adjust.
10608
10609 2012-02-16 Yao Qi <yao@codesourcery.com>
10610
10611 * inferiors.c: Move code to ...
10612 * dll.c: .... here. New.
10613 * server.h: Declare clear_dlls.
10614 * Makefile.in (SFILES): Add dll.c.
10615 (OBS): Add dll.o
10616 (dll.o): New rule.
10617
10618 2012-02-11 Yao Qi <yao@codesourcery.com>
10619
10620 * server.c: (handle_monitor_command): Add a new parameter
10621 `own_buf'.
10622 (handle_query): Update caller.
10623
10624 2012-02-09 Joel Brobecker <brobecker@adacore.com>
10625
10626 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
10627 * configure, config.in: Regenerate.
10628 * hostio.c: Provide an alternate implementation if HAVE_READLINK
10629 is not defined.
10630
10631 2012-02-02 Pedro Alves <palves@redhat.com>
10632
10633 Try SIGKILL first, then PTRACE_KILL.
10634 * linux-low.c (linux_kill_one_lwp): New.
10635 (linux_kill_one_lwp): Rename to ...
10636 (kill_one_lwp_callback): ... this. Use the new
10637 linux_kill_one_lwp.
10638
10639 2012-02-02 Pedro Alves <palves@redhat.com>
10640
10641 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
10642 inferior.
10643
10644 2012-01-27 Pedro Alves <palves@redhat.com>
10645
10646 * linux-low.c (linux_child_pid_to_exec_file): Delete.
10647 (elf_64_file_p): Make static.
10648 (linux_pid_exe_is_elf_64_file): New.
10649 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
10650 Delete declarations.
10651 (linux_pid_exe_is_elf_64_file): Declare.
10652 * linux-x86-low.c (x86_arch_setup): Use
10653 linux_pid_exe_is_elf_64_file.
10654
10655 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
10656
10657 * linux-low.c (linux_wait_for_event_1): Rename to ...
10658 (linux_wait_for_event): ... here and merge it with former
10659 linux_wait_for_event - new variable wait_ptid, use it.
10660 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
10661
10662 2012-01-23 Pedro Alves <palves@redhat.com>
10663
10664 * server.c (main): Avoid yet another case of infinite loop while
10665 detaching/killing after a longjmp.
10666
10667 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
10668
10669 Code cleanup.
10670 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
10671
10672 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
10673
10674 * hostio.c (handle_readlink): New function.
10675 (handle_vFile): Call it to handle "vFile:readlink" packets.
10676
10677 2012-01-20 Pedro Alves <palves@redhat.com>
10678 Ulrich Weigand <ulrich.weigand@linaro.org>
10679
10680 * server.c (handle_v_requests): Only support vAttach and vRun to
10681 start multiple processes when in extended protocol mode.
10682
10683 2012-01-17 Pedro Alves <palves@redhat.com>
10684
10685 * tracepoint.c (initialize_tracepoint): Use mmap instead of
10686 memalign plus mprotect to allocate the scratch buffer.
10687
10688 2012-01-13 Pedro Alves <palves@redhat.com>
10689
10690 * server.c (attach_inferior): Clear `cont_thread'.
10691
10692 2012-01-13 Pedro Alves <palves@redhat.com>
10693
10694 * server.c (main): Avoid infinite loop while detaching/killing
10695 after a longjmp.
10696
10697 2012-01-09 Doug Evans <dje@google.com>
10698
10699 * server.c (start_inferior): Set last_ptid in --wrapper case.
10700
10701 2012-01-06 Yao Qi <yao@codesourcery.com>
10702
10703 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
10704 defined.
10705 [IN_PROCESS_AGENT] (debug_agent): New global variable.
10706
10707 2012-01-04 Yao Qi <yao@codesourcery.com>
10708
10709 * tracepoint.c (cmd_qtdp): Print debug message
10710 for static tracepoint.
10711
10712 2012-01-04 Yao Qi <yao@codesourcery.com>
10713
10714 * tracepoint.c (trace_vdebug): Differentiate debug message
10715 between gdbserver and IPA.
10716
10717 2012-01-03 Yao Qi <yao@codesourcery.com>
10718
10719 * tracepoint.c (tracepoint_was_hit): Don't collect for
10720 static tracepoint.
10721
10722 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10723
10724 * terminal.h: Reformat copyright header.
10725
10726 2012-01-02 Joel Brobecker <brobecker@adacore.com>
10727
10728 * server.c (gdbserver_version): Update copyright year.
10729 * gdbreplay.c (gdbreplay_version): Likewise.
10730
10731 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
10732
10733 * linux-low.c (linux_create_inferior): Put empty if clause for write.
10734
10735 Revert:
10736 2011-12-18 Hui Zhu <teawater@gmail.com>
10737 * linux-low.c (linux_create_inferior): Save return value to ret.
10738
10739 2011-12-18 Hui Zhu <teawater@gmail.com>
10740
10741 * linux-low.c (linux_create_inferior): Save return value to ret.
10742
10743 2011-12-16 Doug Evans <dje@google.com>
10744
10745 * linux-low.c (linux_create_inferior): If stdio connection,
10746 redirect stdin from /dev/null, stdout to stderr.
10747 * remote-utils.c (remote_is_stdio): New static global.
10748 (remote_connection_is_stdio): New function.
10749 (remote_prepare): Handle stdio connection.
10750 (remote_open): Ditto.
10751 (remote_close): Don't close stdin for stdio connections.
10752 (read_prim,write_prim): New functions. Replace all calls to
10753 read/write to these.
10754 * server.c (main): Watch for "-" argument. Move call to
10755 remote_prepare before start_inferior.
10756 * server.h (STDIO_CONNECTION_NAME): New macro.
10757 (remote_connection_is_stdio): Declare.
10758
10759 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
10760 in debugging output.
10761
10762 2011-12-15 Yao Qi <yao@codesourcery.com>
10763
10764 * tracepoint.c: Include sys/syscall.h.
10765 (gdb_ust_thread): Remove preprocessor conditional.
10766
10767 2011-12-14 Pedro Alves <pedro@codesourcery.com>
10768
10769 * linux-low.c (linux_detach_one_lwp): Call
10770 the_low_target.prepare_to_resume before detaching.
10771
10772 2011-12-14 Yao Qi <yao@codesourcery.com>
10773
10774 * tracepoint.c (gdb_ust_thread): Don't ignore return value
10775 of write.
10776
10777 2011-12-14 Yao Qi <yao@codesourcery.com>
10778
10779 * i386-low.c (i386_low_stopped_data_address): Initialize local
10780 variable `control'.
10781
10782 2011-12-13 Pedro Alves <pedro@codesourcery.com>
10783
10784 PR remote/13492
10785
10786 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
10787 DR_CONTROL unless necessary. Extend comments.
10788 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
10789 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
10790
10791 2011-12-13 Yao Qi <yao@codesourcery.com>
10792
10793 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
10794 macros.
10795 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
10796
10797 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
10798
10799 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
10800 Print new debug message for such case.
10801
10802 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
10803
10804 Fix overlapping memcpy.
10805 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
10806 the read_inferior_memory transfer.
10807 (delete_fast_tracepoint_jump): New variable buf. Use it for the
10808 write_inferior_memory transfer.
10809 (set_fast_tracepoint_jump): New variable buf. Use it for the
10810 read_inferior_memory and write_inferior_memory transfers.
10811 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
10812 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
10813 Use it for the write_inferior_memory transfer.
10814 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
10815 buffers.
10816
10817 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10818
10819 * linux-low.c (fetch_register, store_register): Make code
10820 consistent, fix formatting.
10821
10822 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
10823
10824 * linux-low.c (usr_store_inferior_registers): Factor out code
10825 to handle individual registers into...
10826 (store_register): ... this new function.
10827
10828 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
10829
10830 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
10831 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
10832 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
10833 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
10834 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
10835 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
10836 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
10837 (srv_xmlfiles): Add new XML files.
10838
10839 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
10840 and <sys/uio.h>.
10841 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
10842 (init_registers_s390_linux32v1): Add prototype.
10843 (init_registers_s390_linux32v2): Likewise.
10844 (init_registers_s390_linux64v1): Likewise.
10845 (init_registers_s390_linux64v2): Likewise.
10846 (init_registers_s390x_linux64v1): Likewise.
10847 (init_registers_s390x_linux64v2): Likewise.
10848 (s390_num_regs): Increment to 52.
10849 (s390_regmap): Add orig_r2 register.
10850 (s390_num_regs_3264): Increment to 68.
10851 (s390_regmap_3264): Add orig_r2 register.
10852 (s390_collect_ptrace_register): Handle orig_r2 register.
10853 (s390_supply_ptrace_register): Likewise.
10854 (s390_fill_last_break): New function.
10855 (s390_store_last_break): Likewise.
10856 (s390_fill_system_call): New function.
10857 (s390_store_system_call): Likewise.
10858 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
10859 register sets.
10860 (s390_check_regset): New function.
10861 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
10862 NT_S390_SYSTEM_CALL regsets and use appropriate description.
10863 Update target_regsets for available register sets.
10864
10865 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
10866 Jan Kratochvil <jan.kratochvil@redhat.com>
10867
10868 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
10869 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
10870 New.
10871 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
10872 * linux-low.h (struct process_info_private): New member r_debug.
10873 * server.c (handle_qxfer_libraries): Call
10874 the_target->qxfer_libraries_svr4.
10875 (handle_qxfer_libraries_svr4): New function.
10876 (qxfer_packets): New entry "libraries-svr4".
10877 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
10878 * target.h (struct target_ops): New member qxfer_libraries_svr4.
10879 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
10880 PACKET_qXfer_libraries_svr4.
10881
10882 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
10883
10884 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
10885 PSW address/mask between 8-byte and 16-byte formats.
10886 (s390_supply_ptrace_register): Likewise.
10887 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
10888 basic addressing mode bit.
10889
10890 2011-11-24 Stan Shebs <stan@codesourcery.com>
10891
10892 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
10893
10894 2011-11-17 Stan Shebs <stan@codesourcery.com>
10895
10896 * tracepoint.c (struct tracepoint): New field traceframe_usage.
10897 (tracing_start_time): New global.
10898 (tracing_stop_time): New global.
10899 (tracing_user_name): New global.
10900 (tracing_notes): New global.
10901 (tracing_stop_note): New global.
10902 (cmd_qtstart): Set traceframe_usage, start_time.
10903 (stop_tracing): Set stop_time.
10904 (cmd_qtstatus): Report additional status.
10905 (cmd_qtp): New function.
10906 (handle_tracepoint_query): Call it.
10907 (cmd_qtnotes): New function.
10908 (handle_tracepoint_general_set): Call it.
10909 (get_timestamp): Rename from tsv_get_timestamp.
10910
10911 2011-11-14 Stan Shebs <stan@codesourcery.com>
10912 Kwok Cheung Yeung <kcy@codesourcery.com>
10913
10914 * linux-x86-low.c (small_jump_insn): New.
10915 (i386_install_fast_tracepoint_jump_pad): Add arguments for
10916 trampoline and error message, build a trampoline and issue a small
10917 jump instruction to it.
10918 (x86_install_fast_tracepoint_jump_pad): Add arguments for
10919 trampoline and error message.
10920 (x86_get_min_fast_tracepoint_insn_len): New.
10921 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
10922 * linux-low.h (struct linux_target_ops): Add arguments to
10923 install_fast_tracepoint_jump_pad operation, add new operation.
10924 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
10925 arguments.
10926 (linux_get_min_fast_tracepoint_insn_len): New function.
10927 (linux_target_op): Add new operation.
10928 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
10929 (gdb_trampoline_buffer_end): Ditto.
10930 (gdb_trampoline_buffer_error): Ditto.
10931 (struct ipa_sym_addresses): Add fields for new IPA variables.
10932 (symbol_list): Add entries for new IPA variables.
10933 (struct tracepoint): Add fields to hold the address range of the
10934 trampoline used by the tracepoint.
10935 (trampoline_buffer_head): New static variable.
10936 (trampoline_buffer_tail): Ditto.
10937 (claim_trampoline_space): New function.
10938 (have_fast_tracepoint_trampoline_buffer): New function.
10939 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
10940 structure.
10941 (install_fast_tracepoint): Ditto, also add error buffer argument.
10942 (cmd_qtminftpilen): New function.
10943 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
10944 (fast_tracepoint_from_trampoline_address): New function.
10945 (fast_tracepoint_collecting): Handle trampoline as part of jump
10946 pad space.
10947 (set_trampoline_buffer_space): New function.
10948 (initialize_tracepoint): Initialize new IPA variables.
10949 * target.h (struct target_ops): Add arguments to
10950 install_fast_tracepoint_jump_pad operation, add new
10951 get_min_fast_tracepoint_insn_len operation.
10952 (target_get_min_fast_tracepoint_insn_len): New.
10953 (install_fast_tracepoint_jump_pad): Add arguments.
10954 * server.h (IPA_BUFSIZ): Define.
10955 * linux-i386-ipa.c: Include extra header files.
10956 (initialize_fast_tracepoint_trampoline_buffer): New function.
10957 (initialize_low_tracepoint): Call it.
10958 * server.h (set_trampoline_buffer_space): Declare.
10959 (claim_trampoline_space): Ditto.
10960 (have_fast_tracepoint_trampoline_buffer): Ditto.
10961
10962 2011-11-14 Yao Qi <yao@codesourcery.com>
10963
10964 * server.c (handle_query): Handle InstallInTrace for qSupported.
10965 * tracepoint.c (add_tracepoint): Sort list.
10966 (install_tracepoint, download_tracepoint): New.
10967 (cmd_qtdp): Call them to install and download tracepoints.
10968 (sort_tracepoints): Removed.
10969 (cmd_qtstart): Update.
10970
10971 2011-11-14 Yao Qi <yao@codesourcery.com>
10972
10973 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
10974 * mem-break.h: Declare.
10975 * tracepoint.c (cmd_qtstart): Move some code to ...
10976 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
10977 New.
10978 (download_tracepoints): Move some code to ...
10979 (download_tracepoint_1): ... here. New.
10980
10981 2011-11-08 Yao Qi <yao@codesourcery.com>
10982
10983 * remote-utils.c (relocate_instruction): A comment fix.
10984
10985 2011-11-07 Joel Brobecker <brobecker@adacore.com>
10986
10987 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
10988 (i386_dr_low_get_control, i386_dr_low_get_status): Use
10989 dr_status_mirror and dr_control_mirror from debug_reg_state.
10990 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
10991 (i386_initial_stuff): Remove use of deleted globals.
10992 (i386_get_thread_context, i386_set_thread_context,
10993 i386_thread_added): Use dr_status_mirror and dr_control_mirror
10994 from debug_reg_state.
10995
10996 2011-11-05 Yao Qi <yao@codesourcery.com>
10997
10998 * tracepoint.c (gdb_collect): Loop over tracepoints of same
10999 address as TPOINT's.
11000
11001 2011-11-02 Stan Shebs <stan@codesourcery.com>
11002
11003 * tracepoint.c (agent_mem_read_string): New function.
11004 (eval_agent_expr): Call it for tracenz.
11005 * server.c (handle_query): Report support for tracenz.
11006
11007 2011-11-02 Yao Qi <yao@codesourcery.com>
11008
11009 * tracepoint.c (cmd_qtstart): Remove unused local variables.
11010
11011 2011-11-02 Yao Qi <yao@codesourcery.com>
11012
11013 * target.h: Fix a typo in comment.
11014
11015 2011-10-31 Pedro Alves <pedro@codesourcery.com>
11016
11017 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
11018 clobber the breakpoints' shadows with fast tracepoint jumps.
11019 * mem-break.h (check_mem_write): Add `myaddr' parameter.
11020 * target.c (write_inferior_memory): Also pass MYADDR down to
11021 check_mem_write.
11022
11023 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
11024
11025 * configure.ac: Check support for personality routine.
11026 * configure: Regenerate.
11027 * config.in: Likewise.
11028 * linux-low.c: Include <sys/personality.h>.
11029 Define ADDR_NO_RANDOMIZE if necessary.
11030 (linux_create_inferior): Disable address space randomization when
11031 forking inferior, if requested.
11032 (linux_supports_disable_randomization): New function.
11033 (linux_target_ops): Install it.
11034 * server.h (disable_randomization): Declare.
11035 * server.c (disable_randomization): New global variable.
11036 (handle_general_set): Handle QDisableRandomization.
11037 (handle_query): Likewise for qSupported.
11038 (main): Support --disable-randomization and --no-disable-randomization
11039 command line arguments.
11040 * target.h (struct target_ops): Add supports_disable_randomization.
11041 (target_supports_disable_randomization): New macro.
11042
11043 2011-09-29 Mike Frysinger <vapier@gentoo.org>
11044
11045 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
11046 ifdef check.
11047 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
11048 [!PT_GETDSBT] (target_loadmap): New definition.
11049 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
11050 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
11051 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
11052 and PT_GETDSBT to LINUX_LOADMAP.
11053 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
11054 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
11055
11056 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11057
11058 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
11059 (arm_linux_hwbp_cap): New static variable.
11060 (arm_linux_get_hwbp_cap): Replace by ...
11061 (arm_linux_init_hwbp_cap): ... this new function.
11062 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
11063 (arm_linux_get_hw_watchpoint_count): Likewise.
11064 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11065 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
11066 (arm_prepare_to_resume): Use perror_with_name instead of error.
11067
11068 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
11069
11070 * linux-arm-low.c: Include <signal.h>.
11071 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
11072 (struct arm_linux_hwbp_cap): New data type.
11073 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
11074 (struct arm_linux_hw_breakpoint): New data type.
11075 (MAX_BPTS, MAX_WPTS): Define.
11076 (struct arch_process_info, struct arch_lwp_info): New data types.
11077 (arm_linux_get_hwbp_cap): New function.
11078 (arm_linux_get_hw_breakpoint_count): Likewise.
11079 (arm_linux_get_hw_watchpoint_count): Likewise.
11080 (arm_linux_get_hw_watchpoint_max_length): Likewise.
11081 (arm_hwbp_control_initialize): Likewise.
11082 (arm_hwbp_control_is_enabled): Likewise.
11083 (arm_hwbp_control_is_initialized): Likewise.
11084 (arm_hwbp_control_disable): Likewise.
11085 (arm_linux_hw_breakpoint_equal): Likewise.
11086 (arm_linux_hw_point_initialize): Likewise.
11087 (struct update_registers_data): New data structure.
11088 (update_registers_callback: New function.
11089 (arm_insert_point): Likewise.
11090 (arm_remove_point): Likewise.
11091 (arm_stopped_by_watchpoint): Likewise.
11092 (arm_stopped_data_address): Likewise.
11093 (arm_new_process): Likewise.
11094 (arm_new_thread): Likewise.
11095 (arm_prepare_to_resume): Likewise.
11096 (the_low_target): Register arm_insert_point, arm_remove_point,
11097 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
11098 arm_new_thread, and arm_prepare_to_resume.
11099
11100 2011-09-15 Stan Shebs <stan@codesourcery.com>
11101
11102 * server.h (struct emit_ops): Add compare-goto fields.
11103 * tracepoint.c (gdb_agent_op_sizes): New table.
11104 (emit_eq_goto): New function.
11105 (emit_ne_goto): New function.
11106 (emit_lt_goto): New function.
11107 (emit_le_goto): New function.
11108 (emit_gt_goto): New function.
11109 (emit_ge_goto): New function.
11110 (is_goto_target): New function.
11111 (compile_bytecodes): Recognize special cases of compare-goto
11112 combinations and call specialized emitters for them.
11113 * linux-x86-low.c (amd64_emit_eq_goto): New function.
11114 (amd64_emit_ne_goto): New function.
11115 (amd64_emit_lt_goto): New function.
11116 (amd64_emit_le_goto): New function.
11117 (amd64_emit_gt_goto): New function.
11118 (amd64_emit_ge_goto): New function.
11119 (amd64_emit_ops): Add the new functions.
11120 (i386_emit_eq_goto): New function.
11121 (i386_emit_ne_goto): New function.
11122 (i386_emit_lt_goto): New function.
11123 (i386_emit_le_goto): New function.
11124 (i386_emit_gt_goto): New function.
11125 (i386_emit_ge_goto): New function.
11126 (i386_emit_ops): Add the new functions.
11127
11128 2011-09-08 Stan Shebs <stan@codesourcery.com>
11129
11130 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
11131 (i386_emit_epilogue): Restore %ebx.
11132
11133 2011-08-31 Jie Zhang <jzhang918@gmail.com>
11134
11135 * server.c (step_thread): Remove definition.
11136 (process_serial_event): Don't handle Hs.
11137 * server.h (step_thread): Remove declaration.
11138 * target.c (set_desired_inferior): Remove use of step_thread.
11139
11140 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11141
11142 * linux-low.c: Include linux-procfs.h.
11143 (linux_attach_lwp_1): Update comments.
11144 (linux_attach): Scan for existing threads when attaching to a
11145 process that is the tgid.
11146 * Makefile.in: Update dependencies.
11147
11148 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
11149
11150 * configure.srv: Add linux-procfs.o dependencies.
11151
11152 2011-08-14 Yao Qi <yao@codesourcery.com>
11153
11154 * target.h (struct target_ops): Fix indent.
11155 * win32-low.c (win32_target_ops): Fix comment.
11156
11157 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
11158 Yao Qi <yao@codesourcery.com>
11159
11160 * Makefile.in (clean): Remove tic6x-*.c files.
11161 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
11162 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
11163 (tic6x-c64xp-linux.c): Likewise.
11164 * configure.srv: Add support for tic6x-*-uclinux.
11165 * linux-tic6x-low.c: New.
11166 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
11167
11168 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
11169 Yao Qi <yao@codesourcery.com>
11170
11171 * target.h (struct target_ops): Add read_loadmap.
11172 * linux-low.c (struct target_loadseg): New type.
11173 (struct target_loadmap): New type.
11174 (linux_read_loadmap): New function.
11175 (linux_target_ops): Add linux_read_loadmap.
11176 * server.c (handle_query): Support qXfer:fdpic:read packet.
11177 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
11178 to NULL.
11179
11180 2011-08-05 Eli Zaretskii <eliz@gnu.org>
11181
11182 * win32-low.c: Include <stdint.h>.
11183
11184 2011-07-22 Pedro Alves <pedro@codesourcery.com>
11185
11186 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
11187 to the inferior here.
11188 (i386_remove_aligned_watchpoint): Ditto.
11189 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
11190 fit part of the watchpoint in the debug registers.
11191 (i386_update_inferior_debug_regs): New.
11192 (i386_low_insert_watchpoint): Work on a local mirror of the debug
11193 registers, and only update the inferior on success.
11194 (i386_low_remove_watchpoint): Ditto.
11195
11196 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
11197
11198 * linux-low.c (compare_ints, unique, list_threads, show_process,
11199 linux_core_of_thread): Delete.
11200 (linux_target_ops): Change linux_core_of_thread to
11201 linux_common_core_of_thread.
11202 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
11203 * utils.c (malloc_failure): Change type of argument.
11204 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
11205 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
11206 common/linux-osdata.c, common/ptid.c and common/buffer.c.
11207 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
11208 (IPA_OBJS): Add common-utils-ipa.o.
11209 (ptid_h, linux_osdata_h): New macros.
11210 (server_h): Add common/common-utils.h, common/xml-utils.h,
11211 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
11212 common/ptid.h.
11213 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
11214 ptid.o, buffer.o): New rules.
11215 (linux-low.o): Add common/linux-osdata.h as a dependency.
11216 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
11217 * configure.ac: Add AC_HEADER_DIRENT check.
11218 * config.in: Regenerate.
11219 * configure: Regenerate.
11220 * remote-utils.c (xml_escape_text): Delete.
11221 (buffer_grow, buffer_free, buffer_init, buffer_finish,
11222 buffer_xml_printf): Move to common/buffer.c.
11223 * server.c (main): Remove call to initialize_inferiors.
11224 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
11225 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
11226 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
11227 internal_error, gdb_assert, gdb_assert_fail): Delete.
11228 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
11229 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
11230 common/buffer.h.
11231 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
11232 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
11233 initialize_inferiors): Delete.
11234
11235 2011-07-20 Pedro Alves <pedro@codesourcery.com>
11236
11237 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
11238 symbol error.
11239
11240 2011-05-31 Pedro Alves <pedro@codesourcery.com>
11241
11242 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
11243 assertion.
11244 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
11245
11246 2011-05-26 Yao Qi <yao@codesourcery.com>
11247
11248 * Makefile.in (thread-db.o): Track dependence to
11249 common/gdb_thread_db.h.
11250 * thread-db.c: include gdb_thread_db.h from right place.
11251
11252 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
11253
11254 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
11255 __FILE__ and __LINE__ to internal_error.
11256
11257 2011-05-13 Doug Evans <dje@google.com>
11258
11259 * thread-db.c (try_thread_db_load_from_sdir): New function.
11260 (try_thread_db_load_from_dir): New function.
11261 (thread_db_load_search): Handle $sdir, ignore $pdir.
11262 Remove trying of system directories if search of
11263 libthread-db-search-path fails, that is now done via $sdir.
11264
11265 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
11266
11267 * server.c (handle_query): Add EnableDisableTracepoints to the list
11268 of supported features.
11269 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
11270 tracepoints.
11271 (cmd_qtenable_disable): New.
11272 (cmd_qtstart): Install tracepoints even if disabled.
11273 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
11274 receiving a QTEnable or QTDisable packet.
11275 (gdb_collect): Skip data collection if fast tracepoint is disabled.
11276 (ust_marker_to_static_tracepoint): Do not ignore disabled static
11277 tracepoints.
11278 (gdb_probe): Skip data collection if static tracepoint is disabled.
11279
11280 2011-05-10 Doug Evans <dje@google.com>
11281
11282 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
11283
11284 2011-05-04 Doug Evans <dje@google.com>
11285
11286 * linux-low.c (linux_join): Skip process lookup.
11287 * spu-low.c (spu_join): Ditto.
11288 * server.c (join_inferiors_callback): Delete.
11289 (process_serial_event): For 'D' packet (detach) call join_inferior
11290 directly.
11291
11292 2011-05-04 Joseph Myers <joseph@codesourcery.com>
11293
11294 * README: Don't mention xscale*-*-linux*.
11295 * configure.srv (xscale*-*-linux*): Don't handle target.
11296
11297 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
11298
11299 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
11300 casting pointers.
11301 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
11302 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
11303 (i386_emit_void_call_2): Likewise.
11304
11305 2011-04-26 Yao Qi <yao@codesourcery.com>
11306
11307 * linux-low.c: Move common macros to linux-ptrace.h.
11308 Include linux-ptrace.h.
11309 * Makefile.in (linux_ptrace_h): New.
11310 (linux-low.o): Depends on linux-ptrace.h.
11311
11312 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
11313
11314 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
11315 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
11316 (remote_prepare): New function with most of the TCP code from ...
11317 (remote_open): ... here. Detect PORT here unconditionally. Move also
11318 setting transport_is_reliable.
11319 * server.c (run_once): New variable.
11320 (gdbserver_usage): Document it.
11321 (main): Set run_once for `--once'. Call remote_prepare. Exit after
11322 the first run if RUN_ONCE.
11323 * server.h (run_once, remote_prepare): New declarations.
11324
11325 2011-04-19 Tom Tromey <tromey@redhat.com>
11326
11327 * win32-low.c (handle_load_dll): Remove duplicate "the".
11328
11329 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
11330
11331 Remove support for old Cygwin 1.5 versions.
11332 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
11333 function to avoid warning.
11334 (win32_add_one_solib): Use cygwin_conv_path function to avoid
11335 warning.
11336
11337 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
11338
11339 * gdbserver/server.h (Macro _): Define it if not available.
11340
11341 2011-03-14 Michael Snyder <msnyder@vmware.com>
11342
11343 * hostio.c (handle_close): Remove unnecessary null test.
11344
11345 2011-03-10 Joel Brobecker <brobecker@adacore.com>
11346
11347 * Makefile.in (maintainer-clean realclean distclean): Remove
11348 "make ... subdir_do" command.
11349
11350 2011-03-10 Michael Snyder <msnyder@vmware.com>
11351
11352 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
11353
11354 * server.c (handle_v_run): Free alloced buffer on early return.
11355
11356 2011-03-09 Yao Qi <yao@codesourcery.com>
11357
11358 Revert:
11359 2011-03-04 Yao Qi <yao@codesourcery.com>
11360
11361 * Makefile.in: Remove GNU make feature --directory.
11362
11363 2011-03-05 Yao Qi <yao@codesourcery.com>
11364
11365 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11366 (subdir_do): New make target. Copied from gdb/Makefile.
11367 (maintainer-clean, realclean, distclean, clean): Call corresponding
11368 make targets in common/Makefile.
11369
11370 2011-02-11 Yao Qi <yao@codesourcery.com>
11371
11372 * configure.ac: Call AC_PROG_RANLIB.
11373 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11374 * configure: Regenerate.
11375
11376 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
11377
11378 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
11379
11380 2011-03-06 Yao Qi <yao@codesourcery.com>
11381
11382 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
11383
11384 2011-03-05 Yao Qi <yao@codesourcery.com>
11385
11386 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
11387 (subdir_do): New make target. Copied from gdb/Makefile.
11388 (maintainer-clean, realclean, distclean, clean): Call corresponding
11389 make targets in common/Makefile.
11390
11391 2011-03-04 Yao Qi <yao@codesourcery.com>
11392
11393 * Makefile.in: Remove GNU make feature --directory.
11394
11395 2011-03-04 Michael Snyder <msnyder@vmware.com>
11396
11397 * server.c (queue_stop_reply): Call xmalloc not malloc.
11398
11399 2011-03-02 Michael Snyder <msnyder@vmware.com>
11400
11401 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
11402
11403 2011-02-28 Michael Snyder <msnyder@vmware.com>
11404
11405 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
11406 (cmd_qtframe): Ditto.
11407 (cmd_qtbuffer): Ditto.
11408 (cmd_bigqtbuffer): Ditto.
11409
11410 * utils.c (decimal2str): Initialize 'width' to nine, then
11411 don't mess with it.
11412
11413 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11414
11415 * hostio.c (require_data): Free *data, not data.
11416
11417 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
11418
11419 * hostio.c (require_data): Use free, not xfree.
11420
11421 2011-02-27 Michael Snyder <msnyder@vmware.com>
11422
11423 * server.c (handle_query): Discard unused value.
11424
11425 * hostio.c (require_data): Free malloc memory before returning
11426 error.
11427
11428 2011-02-26 Michael Snyder <msnyder@vmware.com>
11429
11430 * linux-low.c (list_threads): Call closedir for dirent.
11431
11432 2011-02-27 Michael Snyder <msnyder@vmware.com>
11433
11434 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
11435 a case statement falls through.
11436
11437 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
11438
11439 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
11440 in comparison.
11441
11442 2011-02-26 Michael Snyder <msnyder@vmware.com>
11443
11444 * utils.c (decimal2str): Eliminate dead code and dead param.
11445 (pulongest): Drop dead param from call to decimal2str.
11446 (plongest): Ditto.
11447
11448 2011-02-24 Joel Brobecker <brobecker@adacore.com>
11449
11450 Revert the following patch (not approved yet):
11451 2011-02-21 Hui Zhu <teawater@gmail.com>
11452 * tracepoint.c (tp_printf): New function.
11453 (eval_agent_expr): Handle gdb_agent_op_printf.
11454
11455 2011-02-21 Hui Zhu <teawater@gmail.com>
11456
11457 * tracepoint.c (tp_printf): New function.
11458 (eval_agent_expr): Handle gdb_agent_op_printf.
11459
11460 2011-02-18 Tom Tromey <tromey@redhat.com>
11461
11462 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
11463 (tracepoint.o): Likewise.
11464 * tracepoint.c (enum gdb_agent_op): Use ax.def.
11465 (gdb_agent_op_names): Likewise.
11466
11467 2011-02-18 Tom Tromey <tromey@redhat.com>
11468
11469 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
11470 gdb_agent_op_rot>: New constants.
11471 (gdb_agent_op_names): Add pick and roll.
11472 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
11473 cases.
11474
11475 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
11476
11477 * aclocal.m4: Regenerated with aclocal-1.11.1.
11478
11479 2011-02-14 Pedro Alves <pedro@codesourcery.com>
11480
11481 * server.c (handle_qxfer_traceframe_info): New.
11482 (qxfer_packets): Register "traceframe-info".
11483 (handle_query): Report support for qXfer:traceframe-info:read+.
11484 * tracepoint.c (match_blocktype): New.
11485 (traceframe_find_block_type): Rename to ...
11486 (traceframe_walk_blocks): ... this. Add callback filter argument,
11487 and use it.
11488 (traceframe_find_block_type): New, reimplemented on top of
11489 traceframe_walk_blocks.
11490 (build_traceframe_info_xml): New.
11491 (traceframe_read_info): New.
11492 * server.h (traceframe_read_info): Declare.
11493
11494 2011-02-11 Yao Qi <yao@codesourcery.com>
11495
11496 * configure.ac: Call AC_PROG_RANLIB.
11497 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
11498 * configure: Regenerate.
11499
11500 2011-02-07 Pedro Alves <pedro@codesourcery.com>
11501
11502 * server.c (gdb_read_memory): Change return semantics to allow
11503 partial transfers.
11504 (handle_search_memory_1): Adjust.
11505 (process_serial_event) <'m' packet>: Handle partial transfers.
11506 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
11507
11508 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11509
11510 * regcache.c (init_register_cache): Initialize
11511 regcache->register_status.
11512 (free_register_cache): Release regcache->register_status.
11513 (regcache_cpy): Copy register_status.
11514 (registers_to_string): Print 'x's for unavailable registers.
11515 (supply_register): Mark the register's status valid or
11516 unavailable, depending on whether a buffer was passed in or not.
11517 (supply_register_zeroed): New.
11518 (supply_regblock): Mark the registers' status valid or
11519 unavailable, depending on whether a buffer was passed in or not.
11520 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
11521 (struct regcache): New `register_status' field.
11522 (supply_register_zeroed): Declare.
11523 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
11524 supply_register_zeroed, rather than passing a NULL buffer to
11525 supply_register.
11526 * tracepoint.c (fetch_traceframe_registers): Update comment.
11527
11528 2011-01-28 Pedro Alves <pedro@codesourcery.com>
11529
11530 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
11531 buffer explicit.
11532
11533 2011-01-25 Pedro Alves <pedro@codesourcery.com>
11534
11535 * server.h (decode_xfer_write): Change prototype.
11536 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
11537 and don't extract the annex here.
11538 * server.c (decode_xfer_read): Remove `annex' parameter,
11539 and don't extract the annex here.
11540 (decode_xfer): New.
11541 (struct qxfer): New.
11542 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
11543 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
11544 (handle_qxfer_statictrace): New functions, abstracted out from
11545 handle_query, and made to use the struct qxfer interface.
11546 (handle_threads_qxfer_proper): Rename to ...
11547 (handle_qxfer_threads_proper): ... this.
11548 (handle_threads_qxfer): Rename to ...
11549 (handle_qxfer_threads): ... this. Adjust.
11550 (qxfer_packets): New array.
11551 (handle_qxfer): New function.
11552 (handle_query): Use handle_qxfer.
11553
11554 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
11555
11556 * gdbreplay.c: Shorten lines of >= 80 columns.
11557 * linux-low.c: Ditto.
11558 * linux-ppc-low.c: Ditto.
11559 * linux-s390-low.c: Ditto.
11560 * linux-sparc-low.c: Ditto.
11561 * linux-x86-low.c: Ditto.
11562 * linux-xtensa-low.c: Ditto.
11563 * mem-break.c: Ditto.
11564 * nto-low.c: Ditto.
11565 * regcache.h: Ditto.
11566 * remote-utils.c: Ditto.
11567 * server.c: Ditto.
11568 * server.h: Ditto.
11569 * thread-db.c: Ditto.
11570 * tracepoint.c: Ditto.
11571 * utils.c: Ditto.
11572 * win32-low.h: Ditto.
11573
11574 2011-01-05 Joel Brobecker <brobecker@adacore.com>
11575
11576 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
11577 update.
11578
11579 2011-01-01 Joel Brobecker <brobecker@adacore.com>
11580
11581 * server.c (gdbserver_version): Update copyright year in version
11582 output.
11583 * gdbreplay.c (gdbreplay_version): Ditto.
11584
11585 2010-12-29 Jie Zhang <jie.zhang@analog.com>
11586
11587 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
11588 * linux-bfin-low.c: New file.
11589 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
11590 PT_DATA_ADDR for BFIN targets.
11591 * Makefile.in (SFILES): Add linux-bfin-low.c.
11592 (clean): Remove reg-bfin.c.
11593 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
11594 * README: Mention supported Blackfin targets.
11595
11596 2010-12-23 Mike Frysinger <vapier@gentoo.org>
11597
11598 * .gitignore: New file.
11599
11600 2010-11-16 Mike Frysinger <vapier@gentoo.org>
11601
11602 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
11603
11604 2010-10-22 Jie Zhang <jie@codesourcery.com>
11605
11606 * Makefile.in: Add FLAGS_TO_PASS variable.
11607 (install): Remove dependency of install-only and recursively
11608 invoke make for install-only.
11609
11610 2010-10-04 Doug Evans <dje@google.com>
11611
11612 * Makefile.in (uninstall): Use $(DESTDIR).
11613
11614 2010-09-24 Pedro Alves <pedro@codesourcery.com>
11615
11616 PR gdb/11842
11617
11618 * linux-x86-low.c (compat_siginfo_from_siginfo)
11619 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
11620 si_code is < 0. Check for si_code == SI_TIMER before checking for
11621 si_code < 0.
11622
11623 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11624
11625 * lynx-i386-low.c: New file.
11626 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
11627
11628 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11629
11630 * lynx-low.c (ptrace_request_to_str): Remove handling for
11631 request values that have been removed in LynxOS 5.x.
11632
11633 2010-09-13 Joel Brobecker <brobecker@adacore.com>
11634
11635 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
11636 <ptrace.h>
11637
11638 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
11639
11640 * configure.ac: Add --enable-inprocess-agent option.
11641 * configure: Rebuilt.
11642
11643 2010-09-06 Yao Qi <yao@codesourcery.com>
11644
11645 * linux-low.c (linux_kill): Remove unused variable.
11646 (linux_stabilize_threads): Likewise.
11647 * server.c (start_inferior): Likewise.
11648 (queue_stop_reply_callback): Likewise.
11649 * tracepoint.c (do_action_at_tracepoint): Likewise.
11650
11651 2010-09-06 Yao Qi <yao@codesourcery.com>
11652
11653 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
11654 on return.
11655
11656 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
11657
11658 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
11659
11660 2010-09-06 Pedro Alves <pedro@codesourcery.com>
11661
11662 * Makefile.in (install-only): Replace $IPA_DEPFILES with
11663 "$(IPA_DEPFILES)".
11664
11665 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11666
11667 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
11668 gdbserver/lynx-ppc-low.c: New files.
11669 * Makefile.in (lynx_low_h): New variable.
11670 (lynx-low.o, lynx-ppc-low.o): New rules.
11671 * configure.ac: On LynxOS, link with -lnetinet.
11672 * configure.srv: Add handling of powerpc-*-lynxos* targets.
11673 * configure: regenerate.
11674
11675 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11676
11677 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
11678 * configure.ac: Add check for vasprintf and vsnprintf.
11679 * configure, config.in: Regenerate.
11680 * server.h (vasprintf, vsnprintf): Add conditional declarations.
11681
11682 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11683
11684 * gdbreplay.c: Move include of alloca.h up, next to include of
11685 malloc.h.
11686 * server.h: Add include of malloc.h.
11687 * mem-break.c: Remove include of malloc.h.
11688 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
11689
11690 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11691
11692 * Makefile.in (memmem.o): Build with -Wno-error.
11693
11694 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11695
11696 * utils.c (xsnprintf): Make non-static.
11697 * server.h: Add xsnprintf declaration.
11698 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
11699 replace calls to snprintf by calls to xsnprintf throughout.
11700
11701 2010-09-01 Joel Brobecker <brobecker@adacore.com>
11702
11703 * configure.ac: Add configure check for alloca.
11704 * configure, config.in: Regenerate.
11705 * server.h: Include alloca.h if it exists.
11706 * gdbreplay.c: Include alloca.h if it exists.
11707
11708 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11709
11710 * linux-low.c (__SIGRTMIN): Define if not already defined.
11711 (linux_create_inferior): Check for __ANDROID__ rather than
11712 __SIGRTMIN.
11713 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
11714 are already deferred.
11715 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
11716 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
11717 stopped and already has a pending signal to report.
11718 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
11719 a pending signal to report or is moving out of a jump pad.
11720 (linux_init_signals): Check for __ANDROID__ rather than
11721 __SIGRTMIN.
11722
11723 2010-08-28 Pedro Alves <pedro@codesourcery.com>
11724
11725 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
11726 debug_threads check. Avoid a linear search when not doing debug
11727 output.
11728
11729 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11730
11731 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
11732 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
11733 (struct file_handler) <fd>: Change type to gdb_fildes_t.
11734 (process_event): Change local fd's type to gdb_fildes_t.
11735 (create_file_handler): Adjust prototype.
11736 (delete_file_handler): Adjust prototype.
11737 (handle_file_event): Adjust prototype. Use pfildes.
11738 (create_file_event): Adjsut prototype.
11739 * remote-utils.c (remote_desc, listen_desc): Change type to
11740 gdb_fildes_t.
11741 * server.h: New gdb_fildes_t typedef.
11742 [USE_WIN32API]: Include winsock2.h.
11743 (delete_file_handler, add_file_handler): Adjust prototypes.
11744 (pfildes): Declare.
11745 * utils.c (pfildes): New.
11746
11747 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11748
11749 * configure.ac (build_warnings): Add -Wno-char-subscripts.
11750 * configure: Regenerate.
11751
11752 2010-08-27 Pedro Alves <pedro@codesourcery.com>
11753
11754 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
11755 (linux_done_accessing_memory): ... this.
11756 (linux_target_ops): Adjust.
11757 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
11758 * nto-low.c (nto_target_ops): Adjust comment.
11759 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
11760 * spu-low.c (spu_target_ops): Adjust comment.
11761 * target.h (target_ops): Rename unprepare_to_access_memory field
11762 to done_accessing_memory.
11763 (unprepare_to_access_memory): Rename to ...
11764 (done_accessing_memory): ... this.
11765
11766 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11767
11768 * linux-low.c (linux_prepare_to_access_memory): New.
11769 (linux_unprepare_to_access_memory): New.
11770 (linux_target_ops): Install them.
11771 * server.c (read_memory): Rename to ...
11772 (gdb_read_memory): ... this. Use
11773 prepare_to_access_memory/prepare_to_access_memory.
11774 (write_memory): Rename to ...
11775 (gdb_write_memory): ... this. Use
11776 prepare_to_access_memory/prepare_to_access_memory.
11777 (handle_search_memory_1): Adjust.
11778 (process_serial_event): Adjust.
11779 * target.h (struct target_ops): New fields
11780 prepare_to_access_memory and unprepare_to_access_memory.
11781 (prepare_to_access_memory, unprepare_to_access_memory): New.
11782 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
11783 prepare_to_access_memory/prepare_to_access_memory.
11784 * nto-low.c (nto_target_ops): Adjust.
11785 * spu-low.c (spu_target_ops): Adjust.
11786 * win32-low.c (win32_target_ops): Adjust.
11787
11788 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11789
11790 * Makefile.in (WARN_CFLAGS): Get it from configure.
11791 (WERROR_CFLAGS): New.
11792 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
11793 * configure.ac: Introduce --enable-werror, which adds -Werror to
11794 the compiler command line. Enabled by default. Disable with
11795 --disable-werror. Add -Wdeclaration-after-statement
11796 Wpointer-arith and -Wformat-nonliteral to warning flags.
11797 * configure: Regenerate.
11798
11799 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11800
11801 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
11802
11803 2010-08-26 Pedro Alves <pedro@codesourcery.com>
11804
11805 * gdbreplay.c (remote_error): New.
11806 (gdbchar): New.
11807 (expect): Use gdbchar. Check for error reading from GDB.
11808 Clarify sync error output.
11809 (play): Check for errors writing to GDB.
11810 * linux-low.c (sigchld_handler): Really ignore `write' errors.
11811 * remote-utils.c (getpkt): Check for errors writing to the remote
11812 descriptor.
11813
11814 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11815
11816 * linux-low.c (linux_wait_1): Move non-debugging code out of
11817 `debug_threads' control.
11818
11819 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11820
11821 * linux-low.c (linux_wait_1): Don't set last_status here.
11822 * server.c (push_event, queue_stop_reply_callback): Assert we're
11823 not pushing a TARGET_WAITKIND_IGNORE event.
11824 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
11825 (myresume, handle_target_event): Set the thread's last_resume_kind
11826 and last_status from the target returned status.
11827
11828 2010-08-25 Pedro Alves <pedro@codesourcery.com>
11829
11830 PR threads/10729
11831
11832 * linux-x86-low.c (update_debug_registers_callback): New.
11833 (i386_dr_low_set_addr): Use it.
11834 (i386_dr_low_get_addr): New.
11835 (i386_dr_low_set_control): Use update_debug_registers_callback.
11836 (i386_dr_low_get_control): New.
11837 (i386_dr_low_get_status): Adjust.
11838 * linux-low.c (linux_stop_lwp): New.
11839 * linux-low.h (linux_stop_lwp): Declare.
11840
11841 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
11842 argument instead of a i386_debug_reg_state.
11843 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
11844 a i386_debug_reg_state.
11845 (i386_insert_aligned_watchpoint): Adjust.
11846 (i386_remove_aligned_watchpoint): Adjust.
11847 (i386_low_stopped_data_address): Read the debug registers from the
11848 inferior instead of from the mirrors.
11849 * i386-low.h (struct i386_debug_reg_state): Extend comment.
11850 (i386_dr_low_get_addr): Declare.
11851 (i386_dr_low_get_control): Declare.
11852 (i386_dr_low_get_status): Change prototype.
11853
11854 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
11855 (i386_dr_low_get_addr): New.
11856 (i386_dr_low_get_control): New.
11857 (i386_dr_low_get_status): Adjust prototype. Return
11858 dr_status_mirror.
11859 (i386_initial_stuff): Clear dr_status_mirror and
11860 dr_control_mirror.
11861 (i386_get_thread_context): Adjust.
11862 (i386_set_thread_context): Adjust.
11863 (i386_thread_added): Adjust.
11864
11865 2010-08-24 Pedro Alves <pedro@codesourcery.com>
11866
11867 * linux-low.h (linux_thread_area): Delete declaration.
11868
11869 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
11870
11871 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
11872 after its termination.
11873
11874 2010-08-09 Pedro Alves <pedro@codesourcery.com>
11875
11876 * linux-low.c (gdb_wants_lwp_stopped): Delete.
11877 (gdb_wants_all_stopped): Delete.
11878 (linux_wait_1): Don't call them.
11879 * server.c (handle_v_cont): Tag all threads as want-stopped.
11880 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
11881 stopped as "client-wants-stopped".
11882
11883 2010-07-31 Pedro Alves <pedro@codesourcery.com>
11884
11885 * Makefile.in (signals_h): New.
11886 (server_h): Depend on it.
11887 (server.o): Don't depend on $(signals_def).
11888 (signals.o): Depend on $(signals_def).
11889
11890 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
11891
11892 * Makefile.in (signals_def): New.
11893 (server_h): Append include/gdb/signals.h and signals_def.
11894 (server.o): Append signals_def.
11895
11896 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
11897
11898 * server.c (handle_target_event): Use target_signal_to_host for
11899 resume_info.sig initialization.
11900 * target.h (struct thread_resume) <sig>: New comment.
11901
11902 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
11903
11904 * server.c (handle_query): strcpy() the returned string from paddress()
11905 instead of sprintf().
11906 * utils.c (paddress): Return phex_nz().
11907
11908 2010-07-07 Joel Brobecker <brobecker@adacore.com>
11909
11910 * server.c (handle_v_cont): Call mourn_inferior if process
11911 just exited.
11912 (myresume): Likewise.
11913
11914 2010-07-01 Pedro Alves <pedro@codesourcery.com>
11915
11916 Static tracepoints, and integration with UST.
11917
11918 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
11919 * mem-break.c (uninsert_all_breakpoints)
11920 (reinsert_all_breakpoints): New.
11921 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
11922 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
11923 (gdb_agent_ust_loaded, helper_thread_id)
11924 (gdb_agent_helper_thread_id): New macros.
11925 (struct ipa_sym_addresses): Add addr_ust_loaded,
11926 addr_helper_thread_id, addr_cmd_buf.
11927 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
11928 (in_process_agent_loaded_ust): New.
11929 (write_e_ust_not_loaded): New.
11930 (maybe_write_ipa_ust_not_loaded): New.
11931 (struct collect_static_trace_data_action): New.
11932 (enum tracepoint_type) <static_tracepoint>: New.
11933 (struct tracepoint) <handle>: Mention static tracepoints.
11934 (struct static_tracepoint_ctx): New.
11935 (CMD_BUF_SIZE): New.
11936 (add_tracepoint_action): Handle static tracepoint actions.
11937 (unprobe_marker_at): New.
11938 (clear_installed_tracepoints): Handle static tracepoints.
11939 (cmd_qtdp): Handle static tracepoints.
11940 (probe_marker_at): New.
11941 (cmd_qtstart): Handle static tracepoints.
11942 (response_tracepoint): Handle static tracepoints.
11943 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
11944 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
11945 (get_context_regcache): Handle static tracepoints.
11946 (do_action_at_tracepoint): Handle static tracepoint actions.
11947 (traceframe_find_block_type): Handle static trace data blocks.
11948 (traceframe_read_sdata): New.
11949 (download_tracepoints): Download static tracepoint actions.
11950 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
11951 (GDB_PROBE_NAME): New.
11952 (ust_ops): New.
11953 (GET_UST_SYM): New.
11954 (USTF): New.
11955 (dlsym_ust): New.
11956 (ust_marker_to_static_tracepoint): New.
11957 (gdb_probe): New.
11958 (collect_ust_data_at_tracepoint): New.
11959 (gdb_ust_probe): New.
11960 (UNIX_PATH_MAX, SOCK_DIR): New.
11961 (gdb_ust_connect_sync_socket): New.
11962 (resume_thread, stop_thread): New.
11963 (run_inferior_command): New.
11964 (init_named_socket): New.
11965 (gdb_ust_socket_init): New.
11966 (cstr_to_hexstr): New.
11967 (next_st): New.
11968 (first_marker, next_marker): New.
11969 (response_ust_marker): New.
11970 (cmd_qtfstm, cmd_qtsstm): New.
11971 (unprobe_marker_at, probe_marker_at): New.
11972 (cmd_qtstmat, gdb_ust_thread): New.
11973 (gdb_ust_init): New.
11974 (initialize_tracepoint_ftlib): Call gdb_ust_init.
11975 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
11976 (ST_REGENTRY): New.
11977 (x86_64_st_collect_regmap): New.
11978 (X86_64_NUM_ST_COLLECT_GREGS): New.
11979 (AMD64_RIP_REGNUM): New.
11980 (supply_static_tracepoint_registers): New.
11981 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
11982 (ST_REGENTRY): New.
11983 (i386_st_collect_regmap): New.
11984 (i386_NUM_ST_COLLECT_GREGS): New.
11985 (supply_static_tracepoint_registers): New.
11986 * server.c (handle_query): Handle qXfer:statictrace:read.
11987 <qSupported>: Report support for StaticTracepoints, and
11988 qXfer:statictrace:read features.
11989 * server.h (traceframe_read_sdata)
11990 (supply_static_tracepoint_registers): Declare.
11991 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
11992 (unpack_varlen_hex): Include in IPA build.
11993 * Makefile.in (ustlibs, ustinc): New.
11994 (IPA_OBJS): Add remote-utils-ipa.o.
11995 ($(IPA_LIB)): Link -ldl and -lpthread.
11996 (UST_CFLAGS): New.
11997 (IPAGENT_CFLAGS): Add UST_CFLAGS.
11998 * config.in, configure: Regenerate.
11999
12000 2010-06-20 Ian Lance Taylor <iant@google.com>
12001 Pedro Alves <pedro@codesourcery.com>
12002
12003 * linux-x86-low.c (always_true): Delete.
12004 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
12005 trying to fool the compiler with always_true.
12006
12007 2010-06-20 Pedro Alves <pedro@codesourcery.com>
12008
12009 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
12010 conditions in gdbserver.
12011
12012 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
12013
12014 * spu-low.c (spu_read_memory): Wrap around local store limit.
12015 (spu_write_memory): Likewise.
12016
12017 2010-06-15 Pedro Alves <pedro@codesourcery.com>
12018
12019 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
12020 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
12021 LONGEST uses.
12022 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
12023 uses.
12024 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
12025 uses with LONGEST uses.
12026
12027 2010-06-14 Stan Shebs <stan@codesourcery.com>
12028 Pedro Alves <pedro@codesourcery.com>
12029
12030 Bytecode compiler.
12031
12032 * linux-x86-low.c: Include limits.h.
12033 (add_insns): New.
12034 (always_true): New.
12035 (EMIT_ASM): New.
12036 (EMIT_ASM32): New.
12037 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
12038 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
12039 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
12040 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
12041 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
12042 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
12043 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
12044 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
12045 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
12046 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
12047 (amd64_emit_void_call_2): New.
12048 (amd64_emit_ops): New.
12049 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
12050 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
12051 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
12052 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
12053 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
12054 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
12055 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
12056 (i386_emit_call, i386_emit_reg, i386_emit_pop)
12057 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
12058 (i386_emit_stack_adjust, i386_emit_int_call_1)
12059 (i386_emit_void_call_2): New.
12060 (i386_emit_ops): New.
12061 (x86_emit_ops): New.
12062 (the_low_target): Install x86_emit_ops.
12063 * server.h (struct emit_ops): New.
12064 (get_raw_reg_func_addr): Declare.
12065 (current_insn_ptr, emit_error): Declare.
12066 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
12067 (set_trace_state_variable_value): New defines.
12068 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
12069 addr_get_trace_state_variable_value and
12070 addr_set_trace_state_variable_value.
12071 (symbol_list): New fields for get_raw_reg,
12072 get_trace_state_variable_value and set_trace_state_variable_value.
12073 (condfn): New typedef.
12074 (struct tracepoint): New field `compiled_cond'.
12075 (do_action_at_tracepoint): Clear compiled_cond.
12076 (get_trace_state_variable_value, set_trace_state_variable_value):
12077 Export in the IPA.
12078 (condition_true_at_tracepoint): If there's a compiled condition,
12079 run that.
12080 (current_insn_ptr, emit_error): New globals.
12081 (struct bytecode_address): New.
12082 (get_raw_reg_func_addr): New.
12083 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
12084 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
12085 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
12086 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
12087 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
12088 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
12089 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
12090 (compile_tracepoint_condition, compile_bytecodes): New.
12091 * target.h (emit_ops): Forward declare.
12092 (struct target_ops): New field emit_ops.
12093 (target_emit_ops): New.
12094 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
12095 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
12096 * linux-low.c (linux_emit_ops): New.
12097 (linux_target_ops): Install it.
12098 * linux-low.h (struct linux_target_ops): New field emit_ops.
12099
12100 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
12101
12102 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
12103 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
12104
12105 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12106 Stan Shebs <stan@codesourcery.com>
12107
12108 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
12109 (all): Depend on $(extra_libraries).
12110 (install-only): Install the IPA.
12111 (IPA_OBJS, IPA_LIB): New.
12112 (clean): Remove the IPA lib.
12113 (IPAGENT_CFLAGS): New.
12114 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
12115 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
12116 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
12117 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
12118 * configure.ac: Check for atomic builtins support in the compiler.
12119 (IPA_DEPFILES, extra_libraries): Define.
12120 * configure.srv (ipa_obj): Add description.
12121 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
12122 (i[34567]86-*-linux*): Set ipa_obj.
12123 (x86_64-*-linux*): Set ipa_obj.
12124 * linux-low.c (stabilizing_threads): New.
12125 (supports_fast_tracepoints): New.
12126 (linux_detach): Stabilize threads before detaching.
12127 (handle_tracepoints): Handle internal tracing breakpoints. Assert
12128 the lwp is either not stabilizing, or is moving out of a jump pad.
12129 (linux_fast_tracepoint_collecting): New.
12130 (maybe_move_out_of_jump_pad): New.
12131 (enqueue_one_deferred_signal): New.
12132 (dequeue_one_deferred_signal): New.
12133 (linux_wait_for_event_1): If moving out of a jump pad, defer
12134 pending signals to later.
12135 (linux_stabilize_threads): New.
12136 (linux_wait_1): Check if threads need moving out of jump pads, and
12137 do it if so.
12138 (stuck_in_jump_pad_callback): New.
12139 (move_out_of_jump_pad_callback): New.
12140 (lwp_running): New.
12141 (linux_resume_one_lwp): Handle moving out of jump pads.
12142 (linux_set_resume_request): Dequeue deferred signals.
12143 (need_step_over_p): Also step over fast tracepoint jumps.
12144 (start_step_over): Also uninsert fast tracepoint jumps.
12145 (finish_step_over): Also reinsert fast tracepoint jumps.
12146 (linux_install_fast_tracepoint_jump): New.
12147 (linux_target_ops): Install linux_stabilize_threads and
12148 linux_install_fast_tracepoint_jump_pad.
12149 * linux-low.h (linux_target_ops) <get_thread_area,
12150 install_fast_tracepoint_jump_pad>: New fields.
12151 (struct lwp_info) <collecting_fast_tracepoint,
12152 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
12153 (linux_get_thread_area): Declare.
12154 * linux-x86-low.c (jump_insn): New.
12155 (x86_get_thread_area): New.
12156 (append_insns): New.
12157 (push_opcode): New.
12158 (amd64_install_fast_tracepoint_jump_pad): New.
12159 (i386_install_fast_tracepoint_jump_pad): New.
12160 (x86_install_fast_tracepoint_jump_pad): New.
12161 (the_low_target): Install x86_get_thread_area and
12162 x86_install_fast_tracepoint_jump_pad.
12163 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
12164 (struct fast_tracepoint_jump): New.
12165 (fast_tracepoint_jump_insn): New.
12166 (fast_tracepoint_jump_shadow): New.
12167 (find_fast_tracepoint_jump_at): New.
12168 (fast_tracepoint_jump_here): New.
12169 (delete_fast_tracepoint_jump): New.
12170 (set_fast_tracepoint_jump): New.
12171 (uninsert_fast_tracepoint_jumps_at): New.
12172 (reinsert_fast_tracepoint_jumps_at): New.
12173 (set_breakpoint_at): Use write_inferior_memory.
12174 (uninsert_raw_breakpoint): Use write_inferior_memory.
12175 (check_mem_read): Mask out fast tracepoint jumps.
12176 (check_mem_write): Mask out fast tracepoint jumps.
12177 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
12178 (set_fast_tracepoint_jump): Declare.
12179 (delete_fast_tracepoint_jump)
12180 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
12181 (reinsert_fast_tracepoint_jumps_at): Declare.
12182 * regcache.c: Don't compile many functions when building the
12183 in-process agent library.
12184 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
12185 the register buffer in the heap.
12186 (free_register_cache): If the register buffer isn't owned by the
12187 regcache, don't free it.
12188 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
12189 pre-existing register caches.
12190 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
12191 type.
12192 (convert_ascii_to_int): : Constify `from' parameter type.
12193 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
12194 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
12195 the needed buffer in-place.
12196 (relocate_instruction): New.
12197 * server.c (handle_query) <qSymbols>: If the target supports
12198 tracepoints, give it a chance of looking up symbols. Report
12199 support for fast tracepoints.
12200 (handle_status): Stabilize threads.
12201 (process_serial_event): Adjust.
12202 * server.h (struct fast_tracepoint_jump): Forward declare.
12203 (struct process_info) <fast_tracepoint_jumps>: New field.
12204 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
12205 (decode_X_packet, decode_M_packet): Adjust.
12206 (relocate_instruction): Declare.
12207 (in_process_agent_loaded): Declare.
12208 (tracepoint_look_up_symbols): Declare.
12209 (struct fast_tpoint_collect_status): Declare.
12210 (fast_tracepoint_collecting): Declare.
12211 (force_unlock_trace_buffer): Declare.
12212 (handle_tracepoint_bkpts): Declare.
12213 (initialize_low_tracepoint)
12214 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
12215 * target.h (struct target_ops) <stabilize_threads,
12216 install_fast_tracepoint_jump_pad>: New fields.
12217 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
12218 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
12219 [HAVE_STDINT_H]: Include stdint.h.
12220 (trace_debug_1): Rename to ...
12221 (trace_vdebug): ... this.
12222 (trace_debug): Rename to ...
12223 (trace_debug_1): ... this. Add `level' parameter.
12224 (trace_debug): New.
12225 (ATTR_USED, ATTR_NOINLINE): New.
12226 (IP_AGENT_EXPORT): New.
12227 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
12228 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
12229 (about_to_request_buffer_space, trace_buffer_is_full)
12230 (stopping_tracepoint, expr_eval_result, error_tracepoint)
12231 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
12232 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
12233 (traceframe_write_count, traceframes_created)
12234 (trace_state_variables)
12235 New renaming defines.
12236 (struct ipa_sym_addresses): New.
12237 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
12238 (symbol_list): New.
12239 (ipa_sym_addrs): New.
12240 (all_tracepoint_symbols_looked_up): New.
12241 (in_process_agent_loaded): New.
12242 (write_e_ipa_not_loaded): New.
12243 (maybe_write_ipa_not_loaded): New.
12244 (tracepoint_look_up_symbols): New.
12245 (debug_threads) [IN_PROCESS_AGENT]: New.
12246 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
12247 (UNKNOWN_SIDE_EFFECTS): New.
12248 (stop_tracing): New.
12249 (flush_trace_buffer): New.
12250 (stop_tracing_bkpt): New.
12251 (flush_trace_buffer_bkpt): New.
12252 (read_inferior_integer): New.
12253 (read_inferior_uinteger): New.
12254 (read_inferior_data_pointer): New.
12255 (write_inferior_data_pointer): New.
12256 (write_inferior_integer): New.
12257 (write_inferior_uinteger): New.
12258 (struct collect_static_trace_data_action): Delete.
12259 (enum tracepoint_type): New.
12260 (struct tracepoint) <type>: New field `type'.
12261 <actions_str, step_actions, step_actions_str>: Only include in
12262 GDBserver.
12263 <orig_size, obj_addr_on_target, adjusted_insn_addr>
12264 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
12265 (tracepoints): Use IP_AGENT_EXPORT.
12266 (last_tracepoint): Don't include in the IPA.
12267 (stopping_tracepoint): Use IP_AGENT_EXPORT.
12268 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
12269 (alloced_trace_state_variables): New.
12270 (trace_state_variables): Use IP_AGENT_EXPORT.
12271 (traceframe_t): Delete unused variable.
12272 (circular_trace_buffer): Don't include in the IPA.
12273 (trace_buffer_start): Delete.
12274 (struct trace_buffer_control): New.
12275 (trace_buffer_free): Delete.
12276 (struct ipa_trace_buffer_control): New.
12277 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
12278 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
12279 New.
12280 (trace_buffer_ctrl): New.
12281 (TRACE_BUFFER_CTRL_CURR): New.
12282 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
12283 Reimplement as macros.
12284 (trace_buffer_wrap): Delete.
12285 (traceframe_write_count, traceframe_read_count)
12286 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
12287 (struct tracepoint_hit_ctx) <type>: New field.
12288 (struct fast_tracepoint_ctx): New.
12289 (memory_barrier): New.
12290 (cmpxchg): New.
12291 (record_tracepoint_error): Update atomically in the IPA.
12292 (clear_inferior_trace_buffer): New.
12293 (about_to_request_buffer_space): New.
12294 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
12295 updating the same buffer.
12296 (add_tracepoint): Default the tracepoint's type to trap
12297 tracepoint, and orig_size to -1.
12298 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
12299 internal variables.
12300 (create_trace_state_variable): New parameter `gdb'. Handle it.
12301 (clear_installed_tracepoints): Clear fast tracepoint jumps.
12302 (cmd_qtdp): Handle fast tracepoints.
12303 (cmd_qtdv): Adjust.
12304 (max_jump_pad_size): New.
12305 (gdb_jump_pad_head): New.
12306 (get_jump_space_head): New.
12307 (claim_jump_space): New.
12308 (sort_tracepoints): New.
12309 (MAX_JUMP_SIZE): New.
12310 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
12311 IPA.
12312 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
12313 support. Upload fast traceframes, and delete internal IPA
12314 breakpoints.
12315 (stop_tracing_handler): New.
12316 (flush_trace_buffer_handler): New.
12317 (cmd_qtstop): Upload fast tracepoints.
12318 (response_tracepoint): Handle fast tracepoints.
12319 (tracepoint_finished_step): Upload fast traceframes. Set the
12320 tracepoint hit context's tracepoint type.
12321 (handle_tracepoint_bkpts): New.
12322 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
12323 type. Add comment about fast tracepoints.
12324 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
12325 non-existing action_str field.
12326 (get_context_regcache): Handle fast tracepoints.
12327 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
12328 to the regcache.
12329 (fast_tracepoint_from_jump_pad_address): New.
12330 (fast_tracepoint_from_ipa_tpoint_address): New.
12331 (collecting_t): New.
12332 (force_unlock_trace_buffer): New.
12333 (fast_tracepoint_collecting): New.
12334 (collecting): New.
12335 (gdb_collect): New.
12336 (write_inferior_data_ptr): New.
12337 (target_tp_heap): New.
12338 (target_malloc): New.
12339 (download_agent_expr): New.
12340 (UALIGN): New.
12341 (download_tracepoints): New.
12342 (download_trace_state_variables): New.
12343 (upload_fast_traceframes): New.
12344 (IPA_FIRST_TRACEFRAME): New.
12345 (IPA_NEXT_TRACEFRAME_1): New.
12346 (IPA_NEXT_TRACEFRAME): New.
12347 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
12348 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
12349 (gdb_jump_pad_buffer_end): New.
12350 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
12351 (initialize_tracepoint): Adjust.
12352 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
12353 buffer. Initialize the low module.
12354 * utils.c (PREFIX, TOOLNAME): New.
12355 (malloc_failure): Use PREFIX.
12356 (error): In the IPA, an error causes an exit.
12357 (fatal, warning): Use PREFIX.
12358 (internal_error): Use TOOLNAME.
12359 (NUMCELLS): Increase to 10.
12360 * configure, config.in: Regenerate.
12361
12362 2010-06-01 Pedro Alves <pedro@codesourcery.com>
12363
12364 * server.c (handle_query) <qSupported>: Do two passes over the
12365 qSupported string to avoid nesting strtok.
12366
12367 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12368
12369 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
12370 (CDEPS): New.
12371 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
12372 -Wl,--dynamic-list.
12373 * configure: Regenerate.
12374 * proc-service.list: New.
12375
12376 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
12377
12378 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
12379 New comment.
12380
12381 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
12382
12383 * gdbreplay.c (remote_open): Check error return from socket() call by
12384 its equality to -1 not by it being negative.
12385 * remote-utils.c (remote_open): Likewise.
12386
12387 2010-05-23 Pedro Alves <pedro@codesourcery.com>
12388
12389 * config.h: Regenerate.
12390
12391 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12392
12393 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
12394 doesn't provide PTRACE_GET_THREAD_AREA.
12395
12396 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
12397
12398 * linux-m68k-low.c: Include <asm/ptrace.h>
12399 (ps_get_thread_area): Implement.
12400
12401 2010-05-03 Doug Evans <dje@google.com>
12402
12403 * event-loop.c (struct callback_event): New struct.
12404 (callback_list): New global.
12405 (append_callback_event, delete_callback_event): New functions.
12406 (process_callback): New function.
12407 (start_event_loop): Call it.
12408 * remote-utils.c (NOT_SCHEDULED): Define.
12409 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
12410 moved out of readchar.
12411 (readchar): Rewrite. Call reschedule before returning.
12412 (reset_readchar): New function.
12413 (remote_close): Call it.
12414 (process_remaining, reschedule): New functions.
12415 * server.h (callback_handler_func): New typedef.
12416 (append_callback_event, delete_callback_event): Declare.
12417
12418 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12419
12420 * proc-service.c (ps_pglobal_lookup): Use
12421 thread_db_look_up_one_symbol.
12422 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
12423 parameter. Use it instead of all_symbols_looked_up.
12424 * server.h (struct process_info) <all_symbols_looked_up>: Delete
12425 field.
12426 (all_symbols_looked_up): Don't declare.
12427 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
12428 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
12429 field.
12430 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
12431 Set all_symbols_looked_up here.
12432 (thread_db_look_up_one_symbol): New.
12433 (thread_db_get_tls_address): Adjust.
12434 (thread_db_load_search, try_thread_db_load_1): Always allocate the
12435 thread_db object on the heap, and tentatively set it in the
12436 process structure.
12437 (thread_db_init): Don't set all_symbols_looked_up here.
12438 * linux-low.h (thread_db_look_up_one_symbol): Declare.
12439
12440 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12441
12442 * linux-low.c (linux_kill, linux_detach): Adjust.
12443 (status_pending_p_callback): Remove redundant statement. Check
12444 for !TARGET_WAITIKIND_IGNORE, instead of
12445 TARGET_WAITKIND_STOPPED.
12446 (handle_tracepoints): Make sure LWP is locked. Adjust.
12447 (linux_wait_for_event_1): Adjust.
12448 (linux_cancel_breakpoints): New.
12449 (unsuspend_one_lwp): New.
12450 (unsuspend_all_lwps): New.
12451 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
12452 (send_sigstop_callback): Change return type to int, add new
12453 `except' parameter and handle it.
12454 (suspend_and_send_sigstop_callback): New.
12455 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
12456 pass them down. If SUSPEND, also increment the lwp's suspend
12457 count.
12458 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
12459 (need_step_over_p): Don't consider suspended LWPs.
12460 (start_step_over): Adjust.
12461 (proceed_one_lwp): Change return type to int, add new `except'
12462 parameter and handle it.
12463 (unsuspend_and_proceed_one_lwp): New.
12464 (proceed_all_lwps): Use find_inferior instead of
12465 for_each_inferior.
12466 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
12467 also decrement the suspend count of LWPs. Pass `except' down,
12468 instead of hacking its suspend count.
12469 (linux_pause_all): Add `freeze' parameter. Adjust.
12470 (linux_unpause_all): New.
12471 (linux_target_ops): Install linux_unpause_all.
12472 * server.c (handle_status): Adjust.
12473 * target.h (struct target_ops): New fields `unpause_all' and
12474 `cancel_breakpoints'. Add new parameter to `pause_all'.
12475 (pause_all): Add new `freeze' parameter.
12476 (unpause_all): New.
12477 (cancel_breakpoints): New.
12478 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
12479 cancel breakpoints.
12480 (cmd_qtstart): Pause threads.
12481 (stop_tracing): Pause threads, and cancel breakpoints.
12482 * win32-low.c (win32_target_ops): Adjust.
12483
12484 2010-05-03 Pedro Alves <pedro@codesourcery.com>
12485
12486 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
12487 the inferior right away from here...
12488 (linux_wait_1): ... to here, and adjust to check the thread's
12489 last_resume_kind instead of the lwp's step or stop_expected flags.
12490
12491 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12492
12493 * README: Use consistent `GDB' and `GDBserver' spellings.
12494
12495 2010-05-02 Pedro Alves <pedro@codesourcery.com>
12496
12497 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
12498 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
12499 (linux_detach_one_lwp): Assume the lwp is stopped.
12500 (any_thread_of): Delete.
12501 (linux_detach): Stop all lwps here. Don't blindly delete all
12502 breakpoints.
12503 (delete_lwp_callback): New.
12504 (linux_mourn): Delete all lwps of the process that is gone.
12505 (linux_wait_1): Don't delete the last lwp of the process here.
12506 * mem-break.h (mark_breakpoints_out): Declare.
12507 * mem-break.c (mark_breakpoints_out): New.
12508 (free_all_breakpoints): Use it.
12509 * server.c (handle_target_event): If the process is gone, mark
12510 breakpoints out.
12511 * thread-db.c (struct thread_db) <create_bp>: New field.
12512 (thread_db_enable_reporting): Fix prototype. Store a thread event
12513 breakpoint reference in the thread_db struct.
12514 (thread_db_load_search): Clear the thread_db object.
12515 (try_thread_db_load_1): Ditto.
12516 (switch_to_process): New.
12517 (disable_thread_event_reporting): Use it.
12518 (remove_thread_event_breakpoints): New.
12519 (thread_db_detach, thread_db_mourn): Use it.
12520
12521 2010-05-01 Pedro Alves <pedro@codesourcery.com>
12522
12523 * linux-low.c (linux_enable_event_reporting): New.
12524 (linux_wait_for_event_1, handle_extended_wait): Use it.
12525
12526 2010-04-30 Pedro Alves <pedro@codesourcery.com>
12527
12528 * linux-low.c (linux_kill_one_lwp, linux_kill)
12529 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
12530 (send_sigstop): Take an lwp_info as parameter instead. Queue a
12531 SIGSTOP even if the LWP is stopped.
12532 (send_sigstop_callback): New.
12533 (stop_all_lwps): Use send_sigstop_callback instead.
12534 (linux_resume_one_thread): Adjust.
12535 (proceed_one_lwp): Still proceed an LWP that the client has
12536 requested to stop, if we haven't reported it as stopped yet. Make
12537 sure that LWPs the client want stopped, have a pending SIGSTOP.
12538
12539 2010-04-26 Doug Evans <dje@google.com>
12540
12541 * server.c (handle_general_set): Make static.
12542
12543 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
12544 Print received char after testing for error/eof instead of before.
12545 (input_interrupt): Tweak comment.
12546
12547 2010-04-23 Doug Evans <dje@google.com>
12548
12549 * server.c (start_inferior): Print inferior argv if --debug.
12550
12551 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
12552
12553 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
12554 * nto-x86-low.c: Include server.h
12555
12556 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
12557
12558 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
12559 be consistent with other sources of this directory.
12560 (init_registers_amd64): Correct name of source file of this function
12561 in the comment.
12562
12563 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12564
12565 * configure.srv (x86_64-*-mingw*): New configuration for Windows
12566 64-bit executables.
12567
12568 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12569
12570 * win32-i386-low.c: Add 64-bit support.
12571 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
12572 (init_registers_amd64): Declare.
12573 (mappings): Add 64-bit version of array.
12574 (init_windows_x86): New function.
12575 (the_low_target): Change init_arch field to init_windows_x86.
12576
12577 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12578
12579 * win32-low.c: Adapt to support also 64-bit architecture.
12580 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
12581 (get_image_name): Use SIZE_T type for local variable `done'.
12582 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
12583 (toolhelp_get_dll_name): Idem.
12584 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
12585 Use uintptr_t typecast to avoid warning.
12586 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
12587 (handle_exception): Use phex_nz to avoid warning.
12588 (win32_wait): Remove unused local variable `process'.
12589
12590 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
12591
12592 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
12593 `amd64-avx.o'.
12594
12595 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
12596
12597 * configure.ac: Use `ws2_32' library for srv_mingw.
12598 * configure: Regenerate.
12599 * gdbreplay.c: Include winsock2.h instead of winsock.h.
12600 * remote-utils.c: Likewise.
12601
12602 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
12603
12604 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
12605 if __x86_64__ is defined.
12606
12607 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12608
12609 * configure: Regenerate.
12610
12611 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
12612
12613 * server.c (handle_query): Handle 'qGetTIBAddr' query.
12614 * target.h (target_ops): New get_tib_address field.
12615 * win32-low.h (win32_thread_info): Add thread_local_base field.
12616 * win32-low.c (child_add_thread): Add tlb argument.
12617 Set thread_local_base field to TLB.
12618 (get_child_debug_event): Adapt to child_add_thread change.
12619 (win32_get_tib_address): New function.
12620 (win32_target_ops): Set get_tib_address field to
12621 win32_get_tib_address.
12622 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
12623
12624 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12625
12626 * linux-low.c (linux_mourn): Also remove the process.
12627 * server.c (handle_target_event): Don't remove the process here.
12628 * nto-low.c (nto_mourn): New.
12629 (nto_target_ops): Install it.
12630 * spu-low.c (spu_mourn): New.
12631 (spu_target_ops): Install it.
12632 * win32-low.c (win32_mourn): New.
12633 (win32_target_ops): Install it.
12634
12635 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12636
12637 * server.h (buffer_xml_printf): Remove redundant `;'.
12638
12639 2010-04-12 Pedro Alves <pedro@codesourcery.com>
12640
12641 * regcache.c (set_register_cache): Invalidate regcaches before
12642 changing the register cache layout.
12643 (regcache_invalidate_one): Allow a NULL regcache.
12644 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
12645 regcaches before changing the register cache layout or the target
12646 regsets.
12647
12648 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
12649
12650 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
12651 variable warning on Linux/x86-64.
12652
12653 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12654
12655 GDBserver disconnected tracing support.
12656
12657 * linux-low.c (linux_remove_process): Delete.
12658 (add_lwp): Don't set last_resume_kind here.
12659 (linux_kill): Use `mourn'.
12660 (linux_detach): Use `thread_db_detach', and `mourn'.
12661 (linux_mourn): New.
12662 (linux_attach_lwp_1): Adjust comment.
12663 (linux_attach): last_resume_kind moved the thread_info; adjust.
12664 (status_pending_p_callback): Adjust.
12665 (linux_wait_for_event_1): Adjust.
12666 (count_events_callback, select_singlestep_lwp_callback)
12667 (select_event_lwp_callback, cancel_breakpoints_callback)
12668 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
12669 (proceed_one_lwp): Adjust.
12670 (linux_async): Add debug output.
12671 (linux_thread_stopped): New.
12672 (linux_pause_all): New.
12673 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
12674 linux_pause_all.
12675 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
12676 (thread_db_free): Delete declaration.
12677 (thread_db_detach, thread_db_mourn): Declare.
12678 * thread-db.c (thread_db_init): Use thread_db_mourn.
12679 (thread_db_free): Delete, split in two.
12680 (disable_thread_event_reporting): New.
12681 (thread_db_detach): New.
12682 (thread_db_mourn): New.
12683
12684 * server.h (struct thread_info) <last_resume_kind>: New field.
12685 <attached>: Add comment.
12686 <gdb_detached>: New field.
12687 (handler_func): Change return type to int.
12688 (handle_serial_event, handle_target_event): Ditto.
12689 (gdb_connected): Declare.
12690 (tracing): Delete.
12691 (disconnected_tracing): Declare.
12692 (stop_tracing): Declare.
12693
12694 * server.c (handle_query) <qSupported>: Report support for
12695 disconnected tracing.
12696 (queue_stop_reply_callback): Account for running threads.
12697 (gdb_wants_thread_stopped): New.
12698 (gdb_wants_all_threads_stopped): New.
12699 (gdb_reattached_process): New.
12700 (handle_status): Clear the `gdb_detached' flag of all processes.
12701 In all-stop, stop all threads.
12702 (main): Be sure to leave tfind mode. Handle disconnected tracing.
12703 (process_serial_event): If the remote connection breaks, or if an
12704 exit was forced with "monitor exit", force an event loop exit.
12705 Handle disconnected tracing on detach.
12706 (handle_serial_event): Adjust.
12707 (handle_target_event): If GDB isn't connected, forward events back
12708 to the inferior, unless the last process exited, in which case,
12709 exit gdbserver. Adjust interface.
12710
12711 * remote-utils.c (remote_open): Don't block in accept. Instead
12712 register an event loop source on the listen socket file
12713 descriptor. Refactor bits into ...
12714 (listen_desc): ... this new global.
12715 (gdb_connected): ... this new function.
12716 (enable_async_notification): ... this new function.
12717 (handle_accept_event): ... this new function.
12718 (remote_close): Clear remote_desc.
12719
12720 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
12721
12722 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
12723 New fields.
12724 (mourn_inferior): Define.
12725 (target_process_qsupported): Avoid the dangling else problem.
12726 (thread_stopped): Define.
12727 (pause_all): Define.
12728 (target_waitstatus_to_string): Declare.
12729 * target.c (target_waitstatus_to_string): New.
12730
12731 * tracepoint.c (tracing): Make extern.
12732 (disconnected_tracing): New.
12733 (stop_tracing): Make extern. Handle tracing stops due to GDB
12734 disconnecting.
12735 (cmd_qtdisconnected): New.
12736 (cmd_qtstatus): Report disconnected tracing status in trace reply.
12737 (handle_tracepoint_general_set): Handle QTDisconnected.
12738
12739 * event-loop.c (event_handler_func): Change return type to int.
12740 (process_event): Bail out if the event handler wants the event
12741 loop to stop.
12742 (handle_file_event): Ditto.
12743 (start_event_loop): Bail out if the event handler wants the event
12744 loop to stop.
12745
12746 * nto-low.c (nto_target_ops): Adjust.
12747 * spu-low.c (spu_wait): Don't remove the process here.
12748 (spu_target_ops): Adjust.
12749 * win32-low.c (win32_wait): Don't remove the process here.
12750 (win32_target_ops): Adjust.
12751
12752 2010-04-11 Pedro Alves <pedro@codesourcery.com>
12753
12754 * regcache.c (realloc_register_cache): Invalidate inferior's
12755 regcache before recreating it.
12756
12757 2010-04-09 Pedro Alves <pedro@codesourcery.com>
12758
12759 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
12760
12761 2010-04-09 Stan Shebs <stan@codesourcery.com>
12762 Pedro Alves <pedro@codesourcery.com>
12763
12764 * server.h (LONGEST): New.
12765 (struct thread_info) <while_stepping>: New field.
12766 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
12767 Declare.
12768 (initialize_tracepoint, handle_tracepoint_general_set)
12769 (handle_tracepoint_query, tracepoint_finished_step)
12770 (tracepoint_was_hit, release_while_stepping_state_list):
12771 (current_traceframe): Declare.
12772 * server.c (handle_general_set): Handle tracepoint packets.
12773 (read_memory): New.
12774 (write_memory): New.
12775 (handle_search_memory_1): Use read_memory.
12776 (handle_query): Report support for conditional tracepoints, trace
12777 state variables, and tracepoint sources. Handle tracepoint
12778 queries.
12779 (main): Initialize the tracepoints module.
12780 (process_serial_event): Handle traceframe reads/writes.
12781
12782 * linux-low.c (handle_tracepoints): New.
12783 (linux_wait_1): Call it.
12784 (linux_resume_one_lwp): Handle while-stepping.
12785 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
12786 (linux_target_ops): Install them.
12787 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
12788 New field.
12789 * linux-x86-low.c (x86_supports_tracepoints): New.
12790 (the_low_target). Install it.
12791
12792 * mem-break.h (delete_breakpoint): Declare.
12793 * mem-break.c (delete_breakpoint): Make external.
12794
12795 * target.h (struct target_ops): Add `supports_tracepoints',
12796 `read_pc', and `write_pc' fields.
12797 (target_supports_tracepoints): Define.
12798 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
12799 (phex_nz): New.
12800
12801 * regcache.h (struct regcache) <registers_owned>: New field.
12802 (init_register_cache, regcache_cpy): Declare.
12803 (regcache_read_pc, regcache_write_pc): Declare.
12804 (register_cache_size): Declare.
12805 (supply_regblock): Declare.
12806 * regcache.c (init_register_cache): New.
12807 (new_register_cache): Use it.
12808 (regcache_cpy): New.
12809 (register_cache_size): New.
12810 (supply_regblock): New.
12811 (regcache_read_pc, regcache_write_pc): New.
12812
12813 * tracepoint.c: New.
12814
12815 * Makefile.in (OBS): Add tracepoint.o.
12816 (tracepoint.o): New rule.
12817
12818 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
12819
12820 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
12821 (i386-mmx.o): New.
12822 (i386-mmx.c): Likewise.
12823 (i386-mmx-linux.o): Likewise.
12824 (i386-mmx-linux.c): Likewise.
12825
12826 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
12827 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
12828 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
12829 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
12830
12831 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
12832 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
12833 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
12834
12835 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
12836
12837 * Makefile.in (clean): Updated.
12838 (i386-avx.o): New.
12839 (i386-avx.c): Likewise.
12840 (i386-avx-linux.o): Likewise.
12841 (i386-avx-linux.c): Likewise.
12842 (amd64-avx.o): Likewise.
12843 (amd64-avx.c): Likewise.
12844 (amd64-avx-linux.o): Likewise.
12845 (amd64-avx-linux.c): Likewise.
12846
12847 * configure.srv (srv_i386_regobj): Add i386-avx.o.
12848 (srv_i386_linux_regobj): Add i386-avx-linux.o.
12849 (srv_amd64_regobj): Add amd64-avx.o.
12850 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
12851 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
12852 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
12853 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
12854 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
12855 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
12856 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
12857
12858 * i387-fp.c: Include "i386-xstate.h".
12859 (i387_xsave): New.
12860 (i387_cache_to_xsave): Likewise.
12861 (i387_xsave_to_cache): Likewise.
12862 (x86_xcr0): Likewise.
12863
12864 * i387-fp.h (i387_cache_to_xsave): Likewise.
12865 (i387_xsave_to_cache): Likewise.
12866 (x86_xcr0): Likewise.
12867
12868 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
12869 * linux-crisv32-low.c (target_regsets): Likewise.
12870 * linux-m68k-low.c (target_regsets): Likewise.
12871 * linux-mips-low.c (target_regsets): Likewise.
12872 * linux-ppc-low.c (target_regsets): Likewise.
12873 * linux-s390-low.c (target_regsets): Likewise.
12874 * linux-sh-low.c (target_regsets): Likewise.
12875 * linux-sparc-low.c (target_regsets): Likewise.
12876 * linux-xtensa-low.c (target_regsets): Likewise.
12877
12878 * linux-low.c: Include <sys/uio.h>.
12879 (regsets_fetch_inferior_registers): Support nt_type.
12880 (regsets_store_inferior_registers): Likewise.
12881 (linux_process_qsupported): New.
12882 (linux_target_ops): Add linux_process_qsupported.
12883
12884 * linux-low.h (regset_info): Add nt_type.
12885 (linux_target_ops): Add process_qsupported.
12886
12887 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
12888 and <sys/uio.h>.
12889 (init_registers_i386_avx_linux): New.
12890 (init_registers_amd64_avx_linux): Likewise.
12891 (xmltarget_i386_linux_no_xml): Likewise.
12892 (xmltarget_amd64_linux_no_xml): Likewise.
12893 (PTRACE_GETREGSET): Likewise.
12894 (PTRACE_SETREGSET): Likewise.
12895 (x86_fill_xstateregset): Likewise.
12896 (x86_store_xstateregset): Likewise.
12897 (use_xml): Likewise.
12898 (x86_linux_update_xmltarget): Likewise.
12899 (x86_linux_process_qsupported): Likewise.
12900 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
12901 (x86_arch_setup): Don't call init_registers_amd64_linux nor
12902 init_registers_i386_linux here. Call
12903 x86_linux_update_xmltarget.
12904 (the_low_target): Add x86_linux_process_qsupported.
12905
12906 * server.c (handle_query): Call target_process_qsupported.
12907
12908 * target.h (target_ops): Add process_qsupported.
12909 (target_process_qsupported): New.
12910
12911 2010-04-03 Pedro Alves <pedro@codesourcery.com>
12912
12913 * inferiors.c (add_thread): Set last_status kind to
12914 TARGET_WAITKIND_IGNORE.
12915 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
12916 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
12917 (linux_wait_1): Move `thread' local definition to block that uses
12918 it. Don't NULL initialize `event_child'.
12919 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
12920 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
12921 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
12922
12923 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12924
12925 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
12926 an extended waitstatus, or by a watchpoint.
12927 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
12928 thread was stepping or has been stopped by a watchpoint.
12929
12930 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12931
12932 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
12933 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
12934 of another, then delete the previous, and validate all
12935 breakpoints.
12936 (validate_inserted_breakpoint): New.
12937 (delete_disabled_breakpoints): New.
12938 (validate_breakpoints): New.
12939 (check_mem_read): Validate breakpoints before trusting their
12940 shadow. Delete disabled breakpoints.
12941 (check_mem_write): Validate breakpoints before trusting they
12942 should be inserted. Delete disabled breakpoints.
12943 * mem-break.h (validate_breakpoints):
12944 * server.c (handle_query): Validate breakpoints when we see a
12945 qSymbol query.
12946
12947 2010-04-01 Pedro Alves <pedro@codesourcery.com>
12948
12949 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
12950 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
12951 if we could tell there's a GDB breakpoint at stop_pc.
12952 (need_step_over_p): Don't do a step over if we find a GDB
12953 breakpoint at the resume PC.
12954
12955 * mem-break.c (struct raw_breakpoint): New.
12956 (enum bkpt_type): New type `gdb_breakpoint'.
12957 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
12958 fields. New field `raw'.
12959 (find_raw_breakpoint_at): New.
12960 (set_raw_breakpoint_at): Handle refcounting. Create a raw
12961 breakpoint instead.
12962 (set_breakpoint_at): Adjust.
12963 (delete_raw_breakpoint): New.
12964 (release_breakpoint): New.
12965 (delete_breakpoint): Rename to...
12966 (delete_breakpoint_1): ... this. Add proc parameter. Use
12967 release_breakpoint. Return ENOENT.
12968 (delete_breakpoint): Reimplement.
12969 (find_breakpoint_at): Delete.
12970 (find_gdb_breakpoint_at): New.
12971 (delete_breakpoint_at): Delete.
12972 (set_gdb_breakpoint_at): New.
12973 (delete_gdb_breakpoint_at): New.
12974 (gdb_breakpoint_here): New.
12975 (set_reinsert_breakpoint): Use release_breakpoint.
12976 (uninsert_breakpoint): Rename to ...
12977 (uninsert_raw_breakpoint): ... this.
12978 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
12979 (reinsert_raw_breakpoint): Change parameter type to
12980 raw_breakpoint.
12981 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
12982 instead.
12983 (check_breakpoints): Adjust. Use release_breakpoint.
12984 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
12985 (breakpoint_inserted_here): Ditto.
12986 (check_mem_read): Adjust to iterate over raw breakpoints instead.
12987 Don't trust the breakpoint's shadow if it is not inserted.
12988 (check_mem_write): Adjust to iterate over raw breakpoints instead.
12989 (delete_all_breakpoints): Adjust.
12990 (free_all_breakpoints): Mark all breakpoints as uninserted, and
12991 use delete_breakpoint_1.
12992
12993 * mem-break.h (breakpoints_supported): Delete declaration.
12994 (set_gdb_breakpoint_at): Declare.
12995 (gdb_breakpoint_here): Declare.
12996 (delete_breakpoint_at): Delete.
12997 (delete_gdb_breakpoint_at): Declare.
12998
12999 * server.h (struct raw_breakpoint): Forward declare.
13000 (struct process_info): New field `raw_breakpoints'.
13001
13002 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
13003 breakpoints.
13004
13005 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13006
13007 * linux-low.c (status_pending_p_callback): Fix comment.
13008 (linux_wait_for_event_1): Move most of the internal breakpoint
13009 handling from here...
13010 (linux_wait_1): ... to here.
13011 (count_events_callback): New.
13012 (select_singlestep_lwp_callback): New.
13013 (select_event_lwp_callback): New.
13014 (cancel_breakpoints_callback): New.
13015 (select_event_lwp): New.
13016 (linux_wait_1): Simplify internal breakpoint handling. Give equal
13017 priority to all LWPs that have had events that should be reported
13018 to the client. Cancel breakpoints when about to reporting the
13019 event to the client, not while stopping lwps. No longer cancel
13020 finished single-steps here.
13021 (cancel_finished_single_step): Delete.
13022 (cancel_finished_single_steps): Delete.
13023
13024 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13025
13026 * mem-break.c (enum bkpt_type): New.
13027 (struct breakpoint): New field `type'.
13028 (set_breakpoint_at): Change return type to struct breakpoint
13029 pointer. Set type to `other_breakpoint' by default.
13030 (delete_breakpoint): Rewrite, supporting more than one breakpoint
13031 in the breakpoint list.
13032 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
13033 (reinsert_breakpoint): Rename to ...
13034 (reinsert_raw_breakpoint): ... this.
13035 (reinsert_breakpoints_at): Adjust.
13036 * mem-break.h (struct breakpoint): Declare.
13037 (set_breakpoint_at): Change return type to struct breakpoint
13038 pointer.
13039
13040 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13041
13042 * server.c (handle_query): Assign, not compare.
13043
13044 2010-03-24 Pedro Alves <pedro@codesourcery.com>
13045
13046 Teach linux gdbserver to step-over-breakpoints.
13047
13048 * linux-low.c (can_hardware_single_step): New.
13049 (supports_breakpoints): New.
13050 (handle_extended_wait): If stopping threads, read the stop pc of
13051 the new cloned LWP.
13052 (get_pc): New.
13053 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
13054 low target doesn't support retrieving the PC.
13055 (add_lwp): Set last_resume_kind to resume_continue.
13056 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
13057 (linux_attach): Don't clear stop_expected. Set the lwp's
13058 last_resume_kind to resume_stop.
13059 (linux_detach_one_lwp): Don't check for removed breakpoints.
13060 (check_removed_breakpoint): Delete.
13061 (status_pending_p): Rename to ...
13062 (status_pending_p_callback): ... this. Don't check for removed
13063 breakpoints. Don't consider threads that are stopped from GDB's
13064 perspective.
13065 (linux_wait_for_lwp): Always read the stop_pc here.
13066 (cancel_breakpoint): New.
13067 (step_over_bkpt): New global.
13068 (linux_wait_for_event_1): Implement stepping over breakpoints.
13069 (gdb_wants_lwp_stopped): New.
13070 (gdb_wants_all_stopped): New.
13071 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
13072 single-step traps here. Store the thread's last reported target
13073 wait status.
13074 (send_sigstop): Don't clear stop_expected. Always set it,
13075 instead.
13076 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
13077 (cancel_finished_single_step): New.
13078 (cancel_finished_single_steps): New.
13079 (wait_for_sigstop): Don't cancel finished single-step traps here.
13080 (linux_resume_one_lwp): Don't check for removed breakpoints.
13081 Don't set `step' on non-hardware step archs.
13082 (linux_set_resume_request): Ignore resume_stop requests if already
13083 stopping or stopped. Set the lwp's last_resume_kind.
13084 (resume_status_pending_p): Don't check for removed breakpoints.
13085 (need_step_over_p): New.
13086 (start_step_over): New.
13087 (finish_step_over): New.
13088 (linux_resume_one_thread): Always queue a sigstop for resume_stop
13089 requests. Clear the thread's last reported target waitstatus.
13090 Don't use the `suspended' flag. Don't consider pending breakpoints.
13091 (linux_resume): Start a step-over if necessary.
13092 (proceed_one_lwp): New.
13093 (proceed_all_lwps): New.
13094 (unstop_all_lwps): New.
13095 * linux-low.h (struct lwp_info): Rewrite comment for the
13096 `suspended' flag. Add the `stop_pc' field. Delete the
13097 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
13098 Add `'last_resume_kind' and `need_step_over' fields.
13099 * inferiors.c (struct thread_info): Delete, moved elsewhere.
13100 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
13101 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
13102 (set_raw_breakpoint_at): New.
13103 (set_breakpoint_at): Rewrite to use it.
13104 (reinsert_breakpoint_handler): Delete.
13105 (set_reinsert_breakpoint): New.
13106 (reinsert_breakpoint_by_bp): Delete.
13107 (delete_reinsert_breakpoints): New.
13108 (uninsert_breakpoint): Rewrite.
13109 (uninsert_breakpoints_at): New.
13110 (reinsert_breakpoint): Rewrite.
13111 (reinsert_breakpoints_at): New.
13112 (check_breakpoints): Rewrite.
13113 (breakpoint_here): New.
13114 (breakpoint_inserted_here): New.
13115 (check_mem_read): Adjust.
13116 * mem-break.h (breakpoints_supported, breakpoint_here)
13117 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
13118 (reinsert_breakpoint_by_bp): Delete declaration.
13119 (delete_reinsert_breakpoints): Declare.
13120 (reinsert_breakpoint): Delete declaration.
13121 (reinsert_breakpoints_at): Declare.
13122 (uninsert_breakpoint): Delete declaration.
13123 (uninsert_breakpoints_at): Declare.
13124 (check_breakpoints): Adjust prototype.
13125 * server.h: Adjust include order.
13126 (struct thread_info): Declare here. Add a `last_status' field.
13127
13128 2010-03-23 Michael Snyder <msnyder@vmware.com>
13129
13130 * server.c (crc32): New function.
13131 (handle_query): Add handling for 'qCRC:' request.
13132
13133 2010-03-23 Pedro Alves <pedro@codesourcery.com>
13134
13135 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
13136 lwp had been stopped by a watchpoint.
13137
13138 2010-03-16 Pedro Alves <pedro@codesourcery.com>
13139
13140 * server.h (internal_error): Declare.
13141 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
13142 * utils.c (internal_error): New function.
13143
13144 2010-03-15 Andreas Schwab <schwab@redhat.com>
13145
13146 * configure.srv: Fix typo setting srv_regobj.
13147
13148 2010-03-15 Pedro Alves <pedro@codesourcery.com>
13149
13150 * linux-low.c (fetch_register): Avoid passing a non string literal
13151 format to `error'.
13152 (usr_store_inferior_registers): Ditto.
13153
13154 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13155
13156 * linux-low.c (linux_write_memory): Bail out early if peeking
13157 memory failed.
13158
13159 2010-03-14 Pedro Alves <pedro@codesourcery.com>
13160
13161 * linux-low.h (struct lwp_info): New fields
13162 `stopped_by_watchpoint' and `stopped_data_address'.
13163 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
13164 here, and cache them in the lwp object.
13165 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
13166 directly.
13167 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
13168 field.
13169 (linux_stopped_by_watchpoint): Rewrite.
13170 (linux_stopped_data_address): Rewrite.
13171
13172 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
13173
13174 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
13175 switching the current inferior, not before.
13176
13177 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
13178
13179 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
13180 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
13181 i386-linux.c and amd64-linux.c.
13182 (reg-i386.o): Removed.
13183 (reg-i386.c): Likewise.
13184 (reg-i386-linux.o): Likewise.
13185 (reg-i386-linux.c): Likewise.
13186 (reg-x86-64.o): Likewise.
13187 (reg-x86-64.c): Likewise.
13188 (reg-x86-64-linux.o): Likewise.
13189 (reg-x86-64-linux.c): Likewise.
13190 (i386.o): New.
13191 (i386.c): Likewise.
13192 (i386-linux.o): Likewise.
13193 (i386-linux.c): Likewise.
13194 (amd64.o): Likewise.
13195 (amd64.c): Likewise.
13196 (amd64-linux.o): Likewise.
13197 (amd64-linux.c): Likewise.
13198
13199 * configure.srv (srv_i386_regobj): New.
13200 (srv_i386_linux_regobj): Likewise.
13201 (srv_amd64_regobj): Likewise.
13202 (srv_amd64_linux_regobj): Likewise.
13203 (srv_i386_32bit_xmlfiles): Likewise.
13204 (srv_i386_64bit_xmlfiles): Likewise.
13205 (srv_i386_xmlfiles): Likewise.
13206 (srv_amd64_xmlfiles): Likewise.
13207 (srv_i386_linux_xmlfiles): Likewise.
13208 (srv_amd64_linux_xmlfiles): Likewise.
13209 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
13210 srv_xmlfiles to $srv_i386_xmlfiles.
13211 (i[34567]86-*-mingw32ce*): Likewise.
13212 (i[34567]86-*-mingw*): Likewise.
13213 (i[34567]86-*-nto*): Likewise.
13214 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
13215 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
13216 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
13217 (x86_64-*-linux*): Likewise.
13218
13219 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
13220 (init_registers_amd64_linux): New.
13221 (x86_arch_setup): Replace init_registers_x86_64_linux with
13222 init_registers_amd64_linux.
13223
13224 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
13225
13226 * configure.ac: Check for libdl. If it is not available link against
13227 static libthread_db.
13228 * configure: Regenerate.
13229
13230 2010-02-22 Pedro Alves <pedro@codesourcery.com>
13231
13232 PR9605
13233
13234 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
13235 handing a read watchpoint.
13236 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
13237
13238 2010-02-12 Doug Evans <dje@google.com>
13239
13240 * linux-low.c (linux_supports_tracefork_flag): Document.
13241 (linux_look_up_symbols): Add comment.
13242
13243 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
13244
13245 * regcache.c (supply_register): Clear regcache if buf is NULL.
13246
13247 2010-02-02 Nicolas Roche <roche@sourceware.org>
13248 Joel Brobecker <brobecker@adacore.com>
13249
13250 * inferiors.c (find_inferior): Add function documentation.
13251 (unloaded_dll): Handle the case where the unloaded dll has not
13252 been previously registered in the dll list.
13253
13254 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13255
13256 * linux-arm-low.c (thumb_breakpoint_len): Delete.
13257 (thumb2_breakpoint): New.
13258 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
13259
13260 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
13261
13262 * linux-low.c (get_stop_pc): Check for SIGTRAP.
13263 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
13264 breakpoints.
13265
13266 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13267
13268 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
13269
13270 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13271
13272 * linux-s390-low.c (s390_collect_ptrace_register)
13273 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
13274
13275 2010-01-21 Doug Evans <dje@google.com>
13276
13277 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
13278 (PTRACE_ARG4_TYPE): New macro.
13279 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
13280 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
13281 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
13282 (usr_store_inferior_registers): Ditto.
13283 (linux_read_memory, linux_write_memory): Ditto.
13284 (linux_test_for_tracefork): Ditto.
13285
13286 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
13287 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
13288
13289 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13290
13291 * proc-service.c (ps_lgetregs): Don't refetch registers from the
13292 target.
13293
13294 2010-01-21 Pedro Alves <pedro@codesourcery.com>
13295
13296 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
13297 prototype to take a regcache. Adjust.
13298
13299 2010-01-20 Pedro Alves <pedro@codesourcery.com>
13300
13301 * regcache.h (struct thread_info): Forward declare.
13302 (struct regcache): New.
13303 (new_register_cache): Adjust prototype.
13304 (get_thread_regcache): Declare.
13305 (free_register_cache): Adjust prototype.
13306 (registers_to_string, registers_from_string): Ditto.
13307 (supply_register, supply_register_by_name, collect_register)
13308 (collect_register_as_string, collect_register_by_name): Ditto.
13309 * regcache.c (struct inferior_regcache_data): Delete.
13310 (get_regcache): Rename to ...
13311 (get_thread_regcache): ... this. Adjust. Switch inferior before
13312 fetching registers.
13313 (regcache_invalidate_one): Adjust.
13314 (regcache_invalidate): Fix prototype.
13315 (new_register_cache): Return the new register cache.
13316 (free_register_cache): Change prototype.
13317 (realloc_register_cache): Adjust.
13318 (registers_to_string): Change prototype to take a regcache. Adjust.
13319 (registers_from_string): Ditto.
13320 (register_data): Ditto.
13321 (supply_register): Ditto.
13322 (supply_register_by_name): Ditto.
13323 (collect_register): Ditto.
13324 (collect_register_as_string): Ditto.
13325 (collect_register_by_name): Ditto.
13326 * server.c (process_serial_event): Adjust.
13327 * linux-low.h (regset_fill_func, regset_store_func): Change
13328 prototype.
13329 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
13330 Change prototype.
13331 * linux-low.c (get_stop_pc): Adjust.
13332 (check_removed_breakpoint): Adjust.
13333 (linux_wait_for_event): Adjust.
13334 (linux_resume_one_lwp): Adjust.
13335 (fetch_register): Add regcache parameter. Adjust.
13336 (usr_store_inferior_registers): Ditto.
13337 (regsets_fetch_inferior_registers): Ditto.
13338 (regsets_store_inferior_registers): Ditto.
13339 (linux_fetch_registers, linux_store_registers): Ditto.
13340 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
13341 regcache. Adjust.
13342 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
13343 Ditto.
13344 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
13345 prototype to take a regcache.
13346 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
13347 * remote-utils.c (convert_ascii_to_int, outreg)
13348 (prepare_resume_reply): Change prototype to take a regcache.
13349 Adjust.
13350 * target.h (struct target_ops) <fetch_registers, store_registers>:
13351 Change prototype to take a regcache.
13352 (fetch_inferior_registers, store_inferior_registers): Change
13353 prototype to take a regcache. Adjust.
13354 * proc-service.c (ps_lgetregs): Adjust.
13355 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
13356 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
13357 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
13358 take a regcache. Adjust.
13359 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
13360 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
13361 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
13362 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
13363 * linux-cris-low.c (cris_get_pc, cris_set_pc)
13364 (cris_cannot_fetch_register):
13365 (cris_breakpoint_at): Change prototype to take a regcache.
13366 Adjust.
13367 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
13368 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
13369 to take a regcache. Adjust.
13370 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
13371 Adjust.
13372 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
13373 take a regcache. Adjust.
13374 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
13375 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
13376 (m68k_set_pc): Change prototype to take a regcache. Adjust.
13377 * linux-mips-low.c (mips_get_pc):
13378 (mips_set_pc): Change prototype to take a regcache. Adjust.
13379 (mips_reinsert_addr): Adjust.
13380 (mips_collect_register): Change prototype to take a regcache.
13381 Adjust.
13382 (mips_supply_register):
13383 (mips_collect_register_32bit, mips_supply_register_32bit)
13384 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
13385 (mips_store_fpregset): Ditto.
13386 * linux-ppc-low.c (ppc_supply_ptrace_register)
13387 (ppc_supply_ptrace_register): Ditto.
13388 (parse_spufs_run): Adjust.
13389 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
13390 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
13391 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
13392 take a regcache. Adjust.
13393 * linux-s390-low.c (s390_collect_ptrace_register)
13394 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
13395 (s390_set_pc): Change prototype to take a regcache. Adjust.
13396 (s390_arch_setup): Adjust.
13397 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
13398 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
13399 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
13400 (sparc_fill_gregset, sparc_store_gregset_from_stack)
13401 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
13402 regcache. Adjust.
13403 (sparc_breakpoint_at): Adjust.
13404 * linux-xtensa-low.c (xtensa_fill_gregset):
13405 (xtensa_store_gregset):
13406 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
13407 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
13408 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
13409 prototype to take a regcache. Adjust.
13410 * win32-arm-low.c (arm_fetch_inferior_register)
13411 (arm_store_inferior_register): Change prototype to take a
13412 regcache. Adjust.
13413 * win32-i386-low.c (i386_fetch_inferior_register)
13414 (i386_store_inferior_register): Change prototype to take a
13415 regcache. Adjust.
13416 * win32-low.c (child_fetch_inferior_registers)
13417 (child_store_inferior_registers): Change prototype to take a
13418 regcache. Adjust.
13419 (win32_wait): Adjust.
13420 (win32_fetch_inferior_registers): Change prototype to take a
13421 regcache. Adjust.
13422 (win32_store_inferior_registers): Adjust.
13423 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
13424 store_inferior_register>: Change prototype to take a regcache.
13425
13426 2010-01-20 Doug Evans <dje@google.com>
13427
13428 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
13429 #ifdef.
13430 (linux_wait_for_event1, linux_init_signals): Ditto.
13431 (W_STOPCODE): Provide definition if missing.
13432
13433 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
13434
13435 * linux-low.c (linux_core_of_thread): New.
13436 (compare_ints, show_process, list_threads): New.
13437 (linux_qxfer_osdata): Report threads and cores.
13438 (linux_target_op): Register linux_core_of_thread.
13439 * remote-utils.c (prepare_resume_reply): Report the core.
13440 (buffer_xml_printf): Support %d specifier.
13441 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
13442 New.
13443 (handle_query): Handle qXfer:threads. Announce availability
13444 thereof.
13445 * target.h (struct target_ops): New field core_of_thread.
13446
13447 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
13448
13449 * Makefile.in (clean): Remove new generated files.
13450 (reg-s390.o, reg-s390.c): Remove rules.
13451 (reg-s390x.o, reg-s390x.c): Likewise.
13452 (s390-linux32.o, s390-linux32.c): Add rules.
13453 (s390-linux64.o, s390-linux64.c): Likewise.
13454 (s390x-linux64.o, s390x-linux64.c): Likewise.
13455 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
13456 * linux-s390-low.c: Include <elf.h>.
13457 (HWCAP_S390_HIGH_GPRS): Define if undefined.
13458 (init_registers_s390): Remove prototype.
13459 (init_registers_s390x): Likewise.
13460 (init_registers_s390_linux32): Add prototype.
13461 (init_registers_s390_linux64): Likewise.
13462 (init_registers_s390x_linux64): Likewise.
13463 (s390_num_regs_3264): New define.
13464 (s390_regmap_3264): New global variable.
13465 (s390_cannot_fetch_register): Remove obsolete check.
13466 (s390_cannot_store_register): Likewise.
13467 (s390_collect_ptrace_register): Handle upper/lower register halves.
13468 (s390_supply_ptrace_register): Likewise.
13469 (s390_fill_gregset): Update to register number changes.
13470 (s390_get_hwcap): New routine.
13471 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
13472 Install appropriate regmap and register set.
13473
13474 2010-01-01 Joel Brobecker <brobecker@adacore.com>
13475
13476 * server.c (gdbserver_version): Update copyright year to 2010.
13477 * gdbreplay.c (gdbreplay_version): Likewise.
13478
13479 2009-12-28 Doug Evans <dje@google.com>
13480
13481 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
13482 elf/external.h. Include <elf.h> instead but only if necessary.
13483
13484 2009-12-28 Pedro Alves <pedro@codesourcery.com>
13485
13486 * linux-low.c (linux_remove_process): Remove `detaching'
13487 parameter. Don't release/detach from thread_db here.
13488 (linux_kill): Release/detach from thread_db here, ...
13489 (linux_detach): ... and here, before actually detaching.
13490 (linux_wait_1): ... and here, when a process exits.
13491 * thread-db.c (any_thread_of): New.
13492 (thread_db_free): Switch the current inferior to a thread of the
13493 passed in process.
13494
13495 2009-12-21 Doug Evans <dje@google.com>
13496
13497 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
13498
13499 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
13500 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
13501 warning ifndef __NR_tkill. Move setting of errno there too.
13502 Delete unnecessary resetting of errno after syscall.
13503 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
13504
13505 * configure.ac: Check for dladdr.
13506 * config.in: Regenerate.
13507 * configure: Regenerate.
13508 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
13509 (try_thread_db_load): Update.
13510
13511 * linux-low.c (my_waitpid): Delete unnecessary prototype.
13512
13513 2009-12-18 Doug Evans <dje@google.com>
13514
13515 * event-loop.c: Include unistd.h if it exists.
13516
13517 * linux-low.c (my_waitpid): Move definition away from being in
13518 between linux_tracefork_child/linux_test_for_tracefork.
13519
13520 * gdb_proc_service.h (psaddr_t): Fix type.
13521 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
13522 signature to match glibc.
13523
13524 2009-12-16 Doug Evans <dje@google.com>
13525
13526 * linux-low.c (linux_read_memory): Fix argument to read.
13527
13528 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13529
13530 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
13531 events, don't leave current_inferior pointing at null.
13532
13533 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13534
13535 * win32-low.c (LOG): Delete.
13536 (OUTMSG): Output to stderr.
13537 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
13538 on compile time LOG macro.
13539 (win32_wait): Fix debug output.
13540
13541 2009-11-26 Pedro Alves <pedro@codesourcery.com>
13542
13543 * win32-low.c (win32_add_one_solib): If the dll name is
13544 "ntdll.dll", prepend the system directory to the dll path.
13545
13546 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
13547
13548 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
13549
13550 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
13551 Vladimir Prus <vladimir@codesourcery.com>
13552
13553 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
13554 * configure.ac: Check for __mcoldfire__ and set
13555 gdb_cv_m68k_is_coldfire.
13556 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
13557 reg-cf.o and reg-m68k.o.
13558 * configure: Regenerated.
13559
13560 2009-11-16 Pedro Alves <pedro@codesourcery.com>
13561
13562 * linux-low.c (linux_remove_process): Add `detaching' parameter.
13563 Pass it to thread_db_free.
13564 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
13565 proper `detaching' argument to linux_remove_process.
13566 * linux-low.h (thread_db_free): Add `detaching' parameter.
13567 * thread-db.c (thread_db_init): Pass false as `detaching' argument
13568 to thread_db_free.
13569 (thread_db_free): Add `detaching' parameter. Only
13570 call td_ta_clear_event if detaching from process.
13571
13572 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
13573
13574 * thread-db.c (thread_db_free): Fix typo.
13575
13576 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
13577
13578 PR gdb/10838
13579 * thread-db.c (thread_db_free): Call td_ta_clear_event.
13580
13581 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
13582
13583 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
13584 with an i686 compiler.
13585 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
13586 needed.
13587 * configure: Rebuilt.
13588
13589 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
13590
13591 PR gdb/10783
13592
13593 * server.c (handle_search_memory_1): Correct read_addr initialization
13594 in loop for searching subsequent chunks.
13595
13596 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
13597
13598 * configure.ac: New --with-libthread-db option.
13599 * thread-db.c: Allow direct dependence on libthread_db.
13600 (thread_db_free): Adjust.
13601 * config.in: Regenerate.
13602 * configure: Likewise.
13603
13604 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
13605
13606 PR gdb/10757
13607 * thread-db.c (attach_thread): New function.
13608 (maybe_attach_thread): Return success/failure.
13609 (find_new_threads_callback): Adjust.
13610 (thread_db_find_new_threads): Loop until no new threads.
13611
13612 2009-10-13 Pedro Alves <pedro@codesourcery.com>
13613
13614 * proc-service.c (ps_lgetregs): Formatting.
13615
13616 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
13617
13618 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
13619 * configure.ac: Adjust.
13620 * linux-low.h (struct process_info_private): Move members to struct
13621 thread_db.
13622 (thread_db_free, thread_db_handle_monitor_command): New prototype.
13623 * linux-low.c (linux_remove_process): Adjust.
13624 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
13625 * server.c (handle_query): Move code ...
13626 (handle_monitor_command): ... here. New function.
13627 * target.h (struct target_ops): New member.
13628 * thread-db.c (struct thread_db): New.
13629 (libthread_db_search_path): New variable.
13630 (thread_db_create_event, thread_db_enable_reporting)
13631 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
13632 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
13633 (try_thread_db_load_1, dladdr_to_soname): New functions.
13634 (try_thread_db_load, thread_db_load_search): New functions.
13635 (thread_db_init): Search for libthread_db.
13636 (thread_db_free): New function.
13637 (thread_db_handle_monitor_command): Likewise.
13638 * config.in: Regenerate.
13639 * configure: Regenerate.
13640
13641 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
13642
13643 * spu-low.c (spu_kill): Wait for inferior to terminate.
13644 Call clear_inferiors.
13645 (spu_detach): Call clear_inferiors.
13646
13647 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13648
13649 * aclocal.m4: Regenerate.
13650 * config.in: Likewise.
13651 * configure: Likewise.
13652
13653 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13654
13655 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
13656 (parse_spufs_run): New function.
13657 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
13658 (ppc_breakpoint_at): Handle SPU breakpoints.
13659
13660 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13661
13662 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
13663 (SPUFS_MAGIC): Define.
13664 (spu_enumerate_spu_ids): New function.
13665 (linux_qxfer_spu): New function.
13666 (linux_target_ops): Install linux_qxfer_spu.
13667
13668 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
13669
13670 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
13671 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
13672 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
13673 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
13674 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
13675 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
13676 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
13677 (init_registers_powerpc_cell32l): Add prototype.
13678 (init_registers_powerpc_cell64l): Likewise.
13679 (ppc_arch_setup): Detect Cell/B.E. architecture.
13680
13681 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
13682
13683 * Makefile.in (datarootdir): New variable.
13684
13685 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13686
13687 * linux-low.c (linux_write_memory): Update debugging output.
13688 * Makefile.in (clean): Add new descriptions.
13689 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
13690 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
13691 * configure.srv: Add new files for arm*-*-linux*.
13692 * linux-arm-low.c: Add new declarations.
13693 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
13694 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
13695 (HWCAP_VFPv3D16): New.
13696 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
13697 instead of __IWMMXT__.
13698 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
13699 (arm_arch_setup): New.
13700 (target_regsets): Remove #ifdef. Add VFP regset.
13701 (the_low_target): Use arm_arch_setup.
13702
13703 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
13704
13705 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
13706 the main thread again.
13707
13708 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
13709
13710 Adding Neutrino gdbserver.
13711 * configure: Regenerated.
13712 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
13713 * configure.srv (i[34567]86-*-nto*): New target.
13714 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
13715 * remote-utils.c [__QNX__]: Include sys/iomgr.h
13716 (nto_comctrl) [__QNX__]: New function.
13717 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
13718
13719 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
13720
13721 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
13722 srv_tgtobj.
13723
13724 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
13725 Pedro Alves <pedro@codesourcery.com>
13726
13727 * win32-i386-low.c (i386_get_thread_context): Handle systems that
13728 don't support CONTEXT_EXTENDED_REGISTERS.
13729 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
13730 (the_low_target): Install them.
13731 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
13732 failing with ERROR_PIPE_NOT_CONNECTED.
13733
13734 2009-06-30 Doug Evans <dje@google.com>
13735 Pierre Muller <muller@ics.u-strasbg.fr>
13736
13737 Add h/w watchpoint support to x86-linux, win32-i386.
13738 * Makefile.in (SFILES): Add i386-low.c
13739 (i386_low_h): Define.
13740 (i386-low.o): Add dependencies.
13741 (linux-x86-low.o): Add i386-low.h dependency.
13742 (win32-i386-low.o): Ditto.
13743 * i386-low.c: New file.
13744 * i386-low.h: New file.
13745 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
13746 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
13747 * linux-low.c (linux_add_process): Initialize arch_private.
13748 (linux_remove_process): Free arch_private.
13749 (add_lwp): Initialize arch_private.
13750 (delete_lwp): Free arch_private.
13751 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
13752 provided.
13753 * linux-low.h (process_info_private): New member arch_private.
13754 (lwp_info): New member arch_private.
13755 (linux_target_ops): New members new_process, new_thread,
13756 prepare_to_resume.
13757 (ptid_of): New macro.
13758 * linux-x86-low.c: Include stddef.h, i386-low.h.
13759 (arch_process_info): New struct.
13760 (arch_lwp_info): New struct.
13761 (x86_linux_dr_get, x86_linux_dr_set): New functions.
13762 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13763 (i386_dr_low_get_status): New function.
13764 (x86_insert_point, x86_remove_point): New functions.
13765 (x86_stopped_by_watchpoint): New function.
13766 (x86_stopped_data_address): New function.
13767 (x86_linux_new_process, x86_linux_new_thread): New functions.
13768 (x86_linux_prepare_to_resume): New function.
13769 (the_low_target): Add entries for insert_point, remove_point,
13770 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
13771 prepare_to_resume.
13772 * server.c (debug_hw_points): New global.
13773 (monitor_show_help): Document set debug-hw-points.
13774 (handle_query): Process "set debug-hw-points".
13775 * server.h (debug_hw_points): Declare.
13776 (paddress): Declare.
13777 * utils.c (NUMCELLS, CELLSIZE): New macros.
13778 (get_sell, xsnprintf, paddress): New functions.
13779 * win32-arm-low.c (the_low_target): Add entries for insert_point,
13780 remove_point, stopped_by_watchpoint, stopped_data_address.
13781 * win32-i386-low.c: Include i386-low.h.
13782 (debug_reg_state): Replaces dr.
13783 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
13784 (i386_dr_low_get_status): New function.
13785 (i386_insert_point, i386_remove_point): New functions.
13786 (i386_stopped_by_watchpoint): New function.
13787 (i386_stopped_data_address): New function.
13788 (i386_initial_stuff): Update.
13789 (get_thread_context,set_thread_context,i386_thread_added): Update.
13790 (the_low_target): Add entries for insert_point,
13791 remove_point, stopped_by_watchpoint, stopped_data_address.
13792 * win32-low.c (win32_insert_watchpoint): New function.
13793 (win32_remove_watchpoint): New function.
13794 (win32_stopped_by_watchpoint): New function.
13795 (win32_stopped_data_address): New function.
13796 (win32_target_ops): Add entries for insert_watchpoint,
13797 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
13798 * win32-low.h (win32_target_ops): New members insert_point,
13799 remove_point, stopped_by_watchpoint, stopped_data_address.
13800
13801 2009-06-25 Pedro Alves <pedro@codesourcery.com>
13802
13803 * server.c (process_serial_event): Re-return unsupported, not
13804 error, if the type isn't recognized. Re-allow supporting only
13805 insert or remove packets. Also call require_running for
13806 breakpoints. Add missing break statement to default case. Tidy.
13807 * target.h (struct target_ops): Rename insert_watchpoint to
13808 insert_point, and remove_watchpoint to remove_point.
13809
13810 * linux-low.h (struct linux_target_ops): Likewise.
13811 * linux-low.c (linux_insert_watchpoint): Rename to ...
13812 (linux_insert_point): ... this. Adjust.
13813 (linux_remove_watchpoint): Rename to ...
13814 (linux_remove_point): ... this. Adjust.
13815 (linux_target_ops): Adjust.
13816 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
13817 (cris_insert_point): ... this.
13818 (cris_remove_watchpoint): Rename to ...
13819 (cris_remove_point): ... this.
13820 (the_low_target): Adjust.
13821
13822 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
13823
13824 * server.c (handle_v_kill): Pass signal_pid to
13825 kill_inferior if multi_process is zero.
13826
13827 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
13828
13829 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
13830 * target.h (target_ops): Comment for *_watchpoint to make it clear
13831 the functions can get types '0' and '1'.
13832
13833 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
13834
13835 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
13836 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
13837 * regcache.c (get_regcache): Likewise.
13838 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
13839 * win32-low.c (child_fetch_inferior_registers): Remove check for
13840 regno 0.
13841
13842 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
13843 Pedro Alves <pedro@codesourcery.com>
13844
13845 * target.h (struct target_ops) <supports_multi_process>: New
13846 callback.
13847 (target_supports_multi_process): New.
13848 * server.c (handle_query): Even if GDB reports support, only
13849 enable multi-process if the target also supports it. Report
13850 multi-process support only if the target backend supports it.
13851 * linux-low.c (linux_supports_multi_process): New function.
13852 (linux_target_ops): Install it as target_supports_multi_process
13853 callback.
13854
13855 2009-05-24 Doug Evans <dje@google.com>
13856
13857 Global renaming of find_thread_pid to find_thread_ptid.
13858 * server.h (find_thread_ptid): Renamed from find_thread_pid.
13859 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
13860 All callers updated.
13861
13862 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
13863 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
13864 directly.
13865
13866 * linux-low.c (get_stop_pc): Print pc if debug_threads.
13867 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
13868 (linux_resume_one_lwp): Ditto.
13869
13870 2009-05-23 Doug Evans <dje@google.com>
13871
13872 * linux-low.c (linux_resume_one_lwp): Change type of first arg
13873 from struct inferior_list_entry * to struct lwp_info *.
13874 All callers updated.
13875
13876 2009-05-13 Doug Evans <dje@google.com>
13877
13878 * linux-x86-low.c: Don't include assert.h.
13879 (x86_siginfo_fixup): Use fatal, not assert.
13880 (x86_arch_setup): Fix comment.
13881
13882 2009-05-12 Doug Evans <dje@google.com>
13883
13884 Biarch support for i386/amd64 gdbserver.
13885 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
13886 Add linux-x86-low.c.
13887 (linux-i386-low.o, linux-x86-64-low.o): Delete.
13888 (linux-x86-low.o): Add.
13889 * linux-x86-64-low.c: Delete.
13890 * linux-i386-low.c: Delete.
13891 * linux-x86-low.c: New file.
13892 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
13893 linux-x86-low.o.
13894 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
13895 linux-x86-low.o.
13896 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
13897 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
13898 (linux_child_pid_to_exec_file): New function.
13899 (elf_64_header_p, elf_64_file_p): New functions.
13900 (siginfo_fixup): New function.
13901 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
13902 give target a chance to convert layout.
13903 * linux-low.h (linux_target_ops): New member siginfo_fixup.
13904 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
13905
13906 2009-05-07 Doug Evans <dje@google.com>
13907
13908 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
13909 (regsets_store_inferior_registers): Ditto.
13910
13911 2009-05-06 Pedro Alves <pedro@codesourcery.com>
13912
13913 PR server/10048
13914
13915 * linux-low.c (must_set_ptrace_flags): Delete.
13916 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
13917 of the global.
13918 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
13919 `lwp->must_set_ptrace_flags' instead.
13920 (linux_wait_for_event_1): Set ptrace options here.
13921 (linux_wait_1): ... not here.
13922
13923 2009-04-30 Doug Evans <dje@google.com>
13924
13925 * inferiors.c (started_inferior_callback): New function.
13926 (attached_inferior_callback): New function.
13927 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
13928 * server.c (print_started_pid, print_attached_pid): New functions.
13929 (detach_or_kill_for_exit): New function.
13930 (main): Call it instead of for_each_inferior (kill_inferior_callback).
13931 * server.h (have_started_inferiors_p): Declare.
13932 (have_attached_inferiors_p): Declare.
13933
13934 * inferiors.c (remove_process): Fix memory leak, free process.
13935 * linux-low.c (linux_remove_process): New function.
13936 (linux_kill): Call it instead of remove_process.
13937 (linux_detach, linux_wait_1): Ditto.
13938
13939 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
13940
13941 * configure.srv: Add x86 Windows CE target.
13942
13943 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13944
13945 * inferiors.c (get_thread_process): Make global.
13946 * server.h (get_thread_process): Add prototype.
13947 * thread-db.c (find_one_thread): Use get_thread_process
13948 instead of current_process.
13949 (thread_db_get_tls_address): Do not crash if called when
13950 thread layer is not yet initialized.
13951
13952 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
13953
13954 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
13955 * spu-low.c (current_tid): Rename to ...
13956 (current_ptid): ... this.
13957 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
13958 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
13959 ptid_get_lwp (current_ptid) instead of current_tid.
13960 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
13961 instead of current_tid. Use find_process_pid to verify pid
13962 argument is valid. Pass proper argument to remove_process.
13963 (spu_thread_alive): Compare current_ptid instead of current_tid.
13964 (spu_resume): Likewise.
13965
13966 2009-04-02 Pedro Alves <pedro@codesourcery.com>
13967
13968 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
13969 variable.
13970
13971 2009-04-01 Pedro Alves <pedro@codesourcery.com>
13972
13973 Implement the multiprocess extensions, and add linux multiprocess
13974 support.
13975
13976 * server.h (ULONGEST): Declare.
13977 (struct ptid, ptid_t): New.
13978 (minus_one_ptid, null_ptid): Declare.
13979 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
13980 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
13981 (struct inferior_list_entry): Change `id' type from unsigned from
13982 to ptid_t.
13983 (struct sym_cache, struct breakpoint, struct
13984 process_info_private): Forward declare.
13985 (struct process_info): Declare.
13986 (current_process): Declare.
13987 (all_processes): Declare.
13988 (initialize_inferiors): Declare.
13989 (add_thread): Adjust to use ptid_t.
13990 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
13991 (add_process, remove_process, find_thread_pid): Declare.
13992 (find_inferior_id): Adjust to use ptid_t.
13993 (cont_thread, general_thread, step_thread): Change type to ptid_t.
13994 (multi_process): Declare.
13995 (push_event): Adjust to use ptid_t.
13996 (read_ptid, write_ptid): Declare.
13997 (prepare_resume_reply): Adjust to use ptid_t.
13998 (clear_symbol_cache): Declare.
13999 * inferiors.c (all_processes): New.
14000 (null_ptid, minus_one_ptid): New.
14001 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
14002 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
14003 (add_thread): Change unsigned long to ptid. Remove gdb_id
14004 parameter. Adjust.
14005 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
14006 (gdb_id_to_thread): Rename to ...
14007 (find_thread_pid): ... this. Change unsigned long to ptid.
14008 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
14009 (loaded_dll, pull_pid_from_list): Adjust.
14010 (add_process, remove_process, find_process_pid)
14011 (get_thread_process, current_process, initialize_inferiors): New.
14012 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
14013 (struct target_waitstatus) <related_pid>: Ditto.
14014 (struct target_ops) <kill, detach>: Add `pid' argument. Change
14015 return type to int.
14016 (struct target_ops) <join>: Add `pid' argument.
14017 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
14018 (struct target_ops) <wait>: Add `ptid' field. Change return type
14019 to ptid.
14020 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
14021 (mywait): Add `ptid' argument. Change return type to ptid_t.
14022 (target_pid_to_str): Declare.
14023 * target.c (set_desired_inferior): Adjust to use ptids.
14024 (mywait): Add new `ptid' argument. Adjust.
14025 (target_pid_to_str): New.
14026 * mem-break.h (free_all_breakpoints): Declare.
14027 * mem-break.c (breakpoints): Delelete.
14028 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
14029 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
14030 to use per-process breakpoint list.
14031 (free_all_breakpoints): New.
14032 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
14033 (symbol_cache, all_symbols_looked_up): Delete.
14034 (hexchars): New.
14035 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
14036 read_ptid): New.
14037 (prepare_resume_reply): Change ptid argument's type from unsigned
14038 long to ptid_t. Adjust. Implement W;process and X;process.
14039 (free_sym_cache, clear_symbol_cache): New.
14040 (look_up_one_symbol): Adjust to per-process symbol cache. *
14041 * server.c (cont_thread, general_thread, step_thread): Change type
14042 to ptid_t.
14043 (attached): Delete.
14044 (multi_process): New.
14045 (last_ptid): Change type to ptid_t.
14046 (struct vstop_notif) <ptid>: Change type to ptid_t.
14047 (queue_stop_reply, push_event): Change `ptid' argument's type to
14048 ptid_t.
14049 (discard_queued_stop_replies): Add `pid' argument.
14050 (start_inferior): Adjust to use ptids. Adjust to mywait interface
14051 changes. Don't reference the `attached' global.
14052 (attach_inferior): Adjust to mywait interface changes.
14053 (handle_query): Adjust to use ptids. Parse GDB's qSupported
14054 features. Handle and report "multiprocess+". Handle
14055 "qAttached:PID".
14056 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
14057 changes.
14058 (handle_v_kill): New.
14059 (handle_v_stopped): Adjust to use target_pid_to_str.
14060 (handle_v_requests): Allow multiple attaches and runs when
14061 multiprocess extensions are in effect. Handle "vKill".
14062 (myresume): Adjust to use ptids.
14063 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
14064 (handle_status): Adjust to discard_queued_stop_replies interface
14065 change.
14066 (first_thread_of, kill_inferior_callback)
14067 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
14068 (main): Call initialize_inferiors. Adjust to use ptids, killing
14069 and detaching from all inferiors. Handle multiprocess packet
14070 variants.
14071 * linux-low.h: Include gdb_proc_service.h.
14072 (struct process_info_private): New.
14073 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
14074 <lwpid_of>: Use ptid_get_lwp.
14075 (get_lwp_thread): Adjust.
14076 (struct lwp_info): Add `dead' member.
14077 (find_lwp_pid): Declare.
14078 * linux-low.c (thread_db_active): Delete.
14079 (new_inferior): Adjust comment.
14080 (inferior_pid): Delete.
14081 (linux_add_process): New.
14082 (handle_extended_wait): Adjust.
14083 (add_lwp): Change unsigned long to ptid.
14084 (linux_create_inferior): Add process to processes table. Adjust
14085 to use ptids. Don't set new_inferior here.
14086 (linux_attach_lwp): Rename to ...
14087 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
14088 it. Adjust to use ptids.
14089 (linux_attach_lwp): New.
14090 (linux_attach): Add process to processes table. Don't set
14091 new_inferior here.
14092 (struct counter): New.
14093 (second_thread_of_pid_p, last_thread_of_process_p): New.
14094 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
14095 multiple processes.
14096 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
14097 processes. Remove process from process table.
14098 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
14099 to multiple processes.
14100 (any_thread_of): New.
14101 (linux_detach): Add `pid' argument, and handle it. Remove process
14102 from processes table.
14103 (linux_join): Add `pid' argument. Handle it.
14104 (linux_thread_alive): Change unsighed long argument to ptid_t.
14105 Consider dead lwps as not being alive.
14106 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
14107 threads we're not interested in.
14108 (same_lwp, find_lwp_pid): New.
14109 (linux_wait_for_lwp): Change `pid' argument's type from int to
14110 ptid_t. Adjust.
14111 (linux_wait_for_event): Rename to ...
14112 (linux_wait_for_event_1): ... this. Change `pid' argument's type
14113 from int to ptid_t. Adjust.
14114 (linux_wait_for_event): New.
14115 (linux_wait_1): Add `ptid' argument. Change return type to
14116 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
14117 that exit from the process table.
14118 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
14119 Adjust.
14120 (mark_lwp_dead): New.
14121 (wait_for_sigstop): Adjust to use ptids. If a process exits while
14122 stopping all threads, mark its main lwp as dead.
14123 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
14124 ptids.
14125 (fetch_register, usr_store_inferior_registers)
14126 (regsets_fetch_inferior_registers)
14127 (regsets_store_inferior_registers, linux_read_memory)
14128 (linux_write_memory): Inline `inferior_pid'.
14129 (linux_look_up_symbols): Adjust to use per-process
14130 `thread_db_active'.
14131 (linux_request_interrupt): Adjust to use ptids.
14132 (linux_read_auxv): Inline `inferior_pid'.
14133 (initialize_low): Don't reference thread_db_active.
14134 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
14135 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
14136 (ps_getpid): Return the pid of the current inferior.
14137 * thread-db.c (proc_handle, thread_agent): Delete.
14138 (thread_db_create_event, thread_db_enable_reporting): Adjust to
14139 per-process data.
14140 (find_one_thread): Change argument type to ptid_t. Adjust to
14141 per-process data.
14142 (maybe_attach_thread): Adjust to per-process data and ptids.
14143 (thread_db_find_new_threads): Ditto.
14144 (thread_db_init): Ditto.
14145 * spu-low.c (spu_create_inferior, spu_attach): Add process to
14146 processes table. Adjust to use ptids.
14147 (spu_kill, spu_detach): Adjust interface. Remove process from
14148 processes table.
14149 (spu_join, spu_thread_alive): Adjust interface.
14150 (spu_wait): Adjust interface. Remove process from processes
14151 table. Adjust to use ptids.
14152 * win32-low.c (current_inferior_tid): Delete.
14153 (current_inferior_ptid): New.
14154 (debug_event_ptid): New.
14155 (thread_rec): Take a ptid. Adjust.
14156 (child_add_thread): Add `pid' argument. Adjust to use ptids.
14157 (child_delete_thread): Ditto.
14158 (do_initial_child_stuff): Add `attached' argument. Add process to
14159 processes table.
14160 (child_fetch_inferior_registers, child_store_inferior_registers):
14161 Adjust.
14162 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
14163 (win32_attach): Pass 1 to do_initial_child_stuff.
14164 (win32_kill): Adjust interface. Remove process from processes
14165 table.
14166 (win32_detach): Ditto.
14167 (win32_join): Adjust interface.
14168 (win32_thread_alive): Take a ptid.
14169 (win32_resume): Adjust to use ptids.
14170 (get_child_debug_event): Ditto.
14171 (win32_wait): Adjust interface. Remove exiting process from
14172 processes table.
14173
14174 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14175
14176 Non-stop mode support.
14177
14178 * server.h (non_stop): Declare.
14179 (gdb_client_data, handler_func): Declare.
14180 (delete_file_handler, add_file_handler, start_event_loop):
14181 Declare.
14182 (handle_serial_event, handle_target_event, push_event)
14183 (putpkt_notif): Declare.
14184 * target.h (enum resume_kind): New.
14185 (struct thread_resume): Replace `step' field by `kind' field.
14186 (TARGET_WNOHANG): Define.
14187 (struct target_ops) <wait>: Add `options' argument.
14188 <supports_non_stop, async, start_non_stop>: New fields.
14189 (target_supports_non_stop, target_async): New.
14190 (start_non_stop): Declare.
14191 (mywait): Add `options' argument.
14192 * target.c (mywait): Add `options' argument. Print child exit
14193 notifications here.
14194 (start_non_stop): New.
14195 * server.c (non_stop, own_buf, mem_buf): New globals.
14196 (struct vstop_notif): New.
14197 (notif_queue): New global.
14198 (queue_stop_reply, push_event, discard_queued_stop_replies)
14199 (send_next_stop_reply): New.
14200 (start_inferior): Adjust to use resume_kind. Adjust to mywait
14201 interface changes.
14202 (attach_inferior): In non-stop mode, don't wait for the target
14203 here.
14204 (handle_general_set): Handle QNonStop.
14205 (handle_query): When handling qC, return the current general
14206 thread, instead of the first thread of the list.
14207 (handle_query): If the backend supports non-stop mode, include
14208 QNonStop+ in the qSupported query response.
14209 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
14210 and non-stop mode.
14211 (handle_v_attach, handle_v_run): Handle non-stop mode.
14212 (handle_v_stopped): New.
14213 (handle_v_requests): Report support for vCont;t. Handle vStopped.
14214 (myresume): Adjust to use resume_kind. Handle non-stop.
14215 (queue_stop_reply_callback): New.
14216 (handle_status): Handle non-stop mode.
14217 (main): Clear non_stop flag on reconnection. Use the event-loop.
14218 Refactor serial protocol handling from here ...
14219 (process_serial_event): ... to this new function. When GDB
14220 selects any thread, select one here. In non-stop mode, wait until
14221 GDB acks all pending events before exiting.
14222 (handle_serial_event, handle_target_event): New.
14223 * remote-utils.c (remote_open): Install remote_desc in the event
14224 loop.
14225 (remote_close): Remove remote_desc from the event loop.
14226 (putpkt_binary): Rename to...
14227 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
14228 (putpkt_binary): New as wrapper around putpkt_binary_1.
14229 (putpkt_notif): New.
14230 (prepare_resume_reply): In non-stop mode, don't change the
14231 general_thread.
14232 * event-loop.c: New.
14233 * Makefile.in (OBJ): Add event-loop.o.
14234 (event-loop.o): New rule.
14235
14236 * linux-low.h (pid_of): Moved here.
14237 (lwpid_of): New.
14238 (get_lwp_thread): Use lwpid_of.
14239 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
14240 * linux-low.c (pid_of): Delete.
14241 (inferior_pid): Use lwpid_of.
14242 (linux_event_pipe): New.
14243 (target_is_async_p): New.
14244 (delete_lwp): New.
14245 (handle_extended_wait): Use lwpid_of.
14246 (add_lwp): Don't set lwpid field.
14247 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
14248 (linux_kill_one_lwp): If killing a running lwp, stop it first.
14249 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
14250 (linux_detach_one_lwp): If detaching from a running lwp, stop it
14251 first. Adjust to linux_wait_for_event interface changes. Use
14252 lwpid_of.
14253 (linux_detach): Don't delete the main lwp here.
14254 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
14255 (status_pending_p): Don't consider explicitly suspended lwps.
14256 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
14257 pointer. Add OPTIONS argument. Change return type to int. Use
14258 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
14259 (linux_wait_for_event): Take an integer pid instead of a lwp_info
14260 pointer. Add status pointer argument. Return a pid instead of a
14261 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
14262 changes. In non-stop mode, don't switch to a random thread.
14263 (linux_wait): Rename to...
14264 (linux_wait_1): ... this. Add target_options argument, and handle
14265 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
14266 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
14267 clean exit and signal exit code. Don't stop all threads in
14268 non-stop mode. In all-stop mode, only stop all threads when
14269 reporting a stop to GDB. Handle explicit thread stop requests.
14270 (async_file_flush, async_file_mark): New.
14271 (linux_wait): New.
14272 (send_sigstop): Use lwpid_of.
14273 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
14274 interface changes. In non-stop mode, don't switch to a random
14275 thread.
14276 (linux_resume_one_lwp): Use lwpid_of.
14277 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
14278 (linux_resume_one_thread): ... this. Handle resume_stop. In
14279 non-stop mode, don't look for pending flag in all threads.
14280 (resume_status_pending_p): Don't consider explicitly suspended
14281 threads.
14282 (my_waitpid): Reimplement. Emulate __WALL.
14283 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14284 Use lwpid_of.
14285 (sigchld_handler, linux_supports_non_stop, linux_async)
14286 (linux_start_non_stop): New.
14287 (linux_target_ops): Register linux_supports_non_stop, linux_async
14288 and linux_start_non_stop.
14289 (initialize_low): Install SIGCHLD handler.
14290 * thread-db.c (thread_db_create_event, find_one_thread)
14291 (thread_db_get_tls_address): Use lwpid_of.
14292 * win32-low.c (win32_detach): Adjust to use resume_kind.
14293 (win32_wait): Add `options' argument.
14294 * spu-low.c (spu_resume): Adjust to use resume_kind.
14295 (spu_wait): Add `options' argument.
14296
14297 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14298
14299 Decouple target code from remote protocol.
14300
14301 * target.h (enum target_waitkind): New.
14302 (struct target_waitstatus): New.
14303 (struct target_ops) <wait>: Return an unsigned long. Take a
14304 target_waitstatus pointer instead of a char pointer.
14305 (mywait): Likewise.
14306 * target.c (mywait): Change prototype to return an unsigned long.
14307 Take a target_waitstatus pointer instead of a char pointer. Adjust.
14308 * server.h (thread_from_wait, old_thread_from_wait): Delete
14309 declarations.
14310 (prepare_resume_reply): Change prototype to take a
14311 target_waitstatus.
14312 * server.c (thread_from_wait, old_thread_from_wait): Delete.
14313 (last_status, last_ptid): New.
14314 (start_inferior): Remove "statusptr" argument. Adjust. Return a
14315 pid instead of a signal.
14316 (attach_inferior): Remove "status" and "signal" parameters.
14317 Adjust.
14318 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
14319 not as an address.
14320 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
14321 (handle_v_requests, myresume): Remove "status" and "signal"
14322 parameters. Adjust.
14323 (handle_status): New.
14324 (main): Delete local `status'. Adjust.
14325 * remote-utils.c: Include target.h.
14326 (prepare_resume_reply): Change prototype to take a
14327 target_waitstatus. Adjust.
14328
14329 * linux-low.c (linux_wait): Adjust to new target_ops->wait
14330 interface.
14331 * spu-low.c (spu_wait): Adjust.
14332 * win32-low.c (enum target_waitkind, struct target_waitstatus):
14333 Delete.
14334 (win32_wait): Adjust.
14335
14336 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14337
14338 * target.h (struct thread_resume): Delete leave_stopped member.
14339 (struct target_ops): Add a `n' argument to the `resume' callback.
14340 * server.c (start_inferior): Adjust.
14341 (handle_v_cont, myresume): Adjust.
14342 * linux-low.c (check_removed_breakpoint): Adjust to resume
14343 interface change, and to removed leave_stopped field.
14344 (resume_ptr): Delete.
14345 (struct thread_resume_array): New.
14346 (linux_set_resume_request): Add new `arg' parameter. Adjust to
14347 resume interface change.
14348 (linux_continue_one_thread, linux_queue_one_thread)
14349 (resume_status_pending_p): Check if the resume field is NULL
14350 instead of checking the leave_stopped member.
14351 (linux_resume): Adjust to the target resume interface change.
14352 * spu-low.c (spu_resume): Adjust to the target resume interface
14353 change.
14354 * win32-low.c (win32_detach, win32_resume): Ditto.
14355
14356 2009-04-01 Pedro Alves <pedro@codesourcery.com>
14357
14358 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
14359 flag.
14360 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
14361 pending.
14362 (linux_continue_one_thread): Only preserve the stepping flag if
14363 there's a pending breakpoint.
14364
14365 2009-03-31 Pedro Alves <pedro@codesourcery.com>
14366
14367 * server.c (main): After the inferior having exited, call
14368 remote_close before exiting gdbserver.
14369
14370 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
14371
14372 Fix size of FPSCR in Power 7 processors.
14373 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
14374 (PPC_FEATURE_HAS_DFP): New #define.
14375 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
14376 size of the FPSCR.
14377
14378 2009-03-23 Pedro Alves <pedro@codesourcery.com>
14379
14380 * server.c (handle_query) Whitespace and formatting.
14381
14382 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14383
14384 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
14385 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
14386 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
14387 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
14388 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
14389 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
14390 Makefile.in, configure.ac: Fix whitespace throughout.
14391 * configure: Regenerate.
14392
14393 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14394
14395 * inferiors.c (find_inferior): Make it safe for the callback
14396 function to delete the currently iterated inferior.
14397
14398 2009-03-22 Pedro Alves <pedro@codesourcery.com>
14399
14400 * Makefile.in (linuw_low_h): Move higher.
14401 (thread-db.o): Depend on $(linux_low_h).
14402
14403 2009-03-17 Pedro Alves <pedro@codesourcery.com>
14404
14405 Rename "process" to "lwp" throughout.
14406
14407 * linux-low.c (all_processes): Rename to...
14408 (all_lwps): ... this.
14409 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
14410 (add_process): Rename to ...
14411 (add_lwp): ... this. Adjust.
14412 (linux_create_inferior): Adjust.
14413 (linux_attach_lwp): Adjust.
14414 (linux_attach): Adjust.
14415 (linux_kill_one_process): Rename to ...
14416 (linux_kill_one_lwp): ... this. Adjust.
14417 (linux_kill): Adjust.
14418 (linux_detach_one_process): Rename to ...
14419 (linux_detach_one_lwp): ... this. Adjust.
14420 (linux_detach): Adjust.
14421 (check_removed_breakpoint): Adjust.
14422 (status_pending_p): Adjust.
14423 (linux_wait_for_process): Rename to ...
14424 (linux_wait_for_lwp): ... this. Adjust.
14425 (linux_wait_for_event): Adjust.
14426 (send_sigstop): Adjust.
14427 (wait_for_sigstop): Adjust.
14428 (stop_all_processes): Rename to ...
14429 (stop_all_lwps): ... this.
14430 (linux_resume_one_process): Rename to ...
14431 (linux_resume_one_lwp): ... this. Adjust.
14432 (linux_set_resume_request, linux_continue_one_thread)
14433 (linux_queue_one_thread, resume_status_pending_p)
14434 (usr_store_inferior_registers, regsets_store_inferior_registers)
14435 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
14436 Adjust.
14437 * linux-low.h (get_process): Rename to ...
14438 (get_lwp): ... this. Adjust.
14439 (get_thread_process): Rename to ...
14440 (get_thread_lwp): ... this. Adjust.
14441 (get_process_thread): Rename to ...
14442 (get_lwp_thread): ... this. Adjust.
14443 (struct process_info): Rename to ...
14444 (struct lwp_info): ... this.
14445 (all_processes): Rename to ...
14446 (all_lwps): ... this.
14447 * proc-service.c (ps_lgetregs): Adjust.
14448 * thread-db.c (thread_db_create_event, find_one_thread)
14449 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
14450
14451 2009-03-14 Pedro Alves <pedro@codesourcery.com>
14452
14453 * server.c (handle_query): Handle "qAttached".
14454
14455 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
14456
14457 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
14458 GPLv3, update license URL.
14459
14460 2009-03-01 Doug Evans <dje@google.com>
14461
14462 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
14463 (server_h): Add gdb_signals.h.
14464 (signals.o): Update.
14465 * server.h (target_signal_from_host,target_signal_to_host_p)
14466 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
14467
14468 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
14469
14470 * remote-utils.c (getpkt): Also generate remote-debug
14471 information if noack_mode is set.
14472
14473 2009-02-06 Pedro Alves <pedro@codesourcery.com>
14474
14475 * server.c (handle_query): Report qXfer:siginfo:read and
14476 qXfer:siginfo:write as supported and handle them.
14477 * target.h (struct target_ops) <qxfer_siginfo>: New field.
14478 * linux-low.c (linux_xfer_siginfo): New.
14479 (linux_target_ops): Set it.
14480
14481 2009-01-26 Pedro Alves <pedro@codesourcery.com>
14482
14483 * server.c (gdbserver_usage): Mention --remote-debug.
14484 (main): Accept '--remote-debug' switch.
14485
14486 2009-01-18 Doug Evans <dje@google.com>
14487
14488 * regcache.c (new_register_cache): No need to check result of xcalloc.
14489 * server.c (handle_search_memory): Back out calls to xmalloc,
14490 result is checked and error is returned to user upon failure.
14491 (handle_query): Ditto. Add more checks for result of malloc.
14492 (handle_v_cont): Check result of malloc, report error back to
14493 user upon failure.
14494 (handle_v_run): Ditto. Call freeargv.
14495 * server.h (freeargv): Declare.
14496 * utils.c (freeargv): New fn.
14497
14498 2009-01-15 Doug Evans <dje@google.com>
14499
14500 * gdbreplay.c (perror_with_name): Make arg const char *.
14501 * server.h (target_signal_to_name): Make return type const char *.
14502 * thread-db.c (thread_db_err_str): Make return type const char *.
14503 * utils.c (perror_with_name): Make arg const char *.
14504
14505 2009-01-14 Pedro Alves <pedro@codesourcery.com>
14506
14507 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
14508 when handling a EXIT_PROCESS_DEBUG_EVENT.
14509
14510 2009-01-06 Joel Brobecker <brobecker@adacore.com>
14511
14512 * gdbreplay.c (gdbreplay_version): Update copyright year.
14513 * server.c (gdbserver_version): Likewise.
14514
14515 2009-01-05 Doug Evans <dje@google.com>
14516
14517 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
14518 (handle_extended_wait): Improve comment.
14519
14520 2008-12-13 Doug Evans <dje@google.com>
14521
14522 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
14523 * server.h (ATTR_MALLOC): New macro.
14524 (xmalloc,xcalloc,xstrdup): Declare.
14525 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
14526 * inferiors.c: Ditto.
14527 * linux-low.c: Ditto.
14528 * mem-break.c: Ditto.
14529 * regcache.c: Ditto.
14530 * remote-utils.c: Ditto.
14531 * server.c: Ditto.
14532 * target.c: Ditto.
14533 * win32-low.c: Ditto.
14534
14535 2008-12-12 Doug Evans <dje@google.com>
14536
14537 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
14538 in debugging printf.
14539
14540 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
14541
14542 2008-12-09 Doug Evans <dje@google.com>
14543
14544 * linux-low.h (struct process_info): Delete member tid, unused.
14545 * thread-db.c (find_one_thread): Update.
14546 (maybe_attach_thread): Update.
14547
14548 2008-12-02 Pedro Alves <pedro@codesourcery.com>
14549
14550 * target.h (struct target_ops): Add qxfer_osdata member.
14551 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
14552 and dirent.h.
14553 (linux_qxfer_osdata): New functions.
14554 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
14555 callback.
14556 * server.c (handle_query): Handle "qXfer:osdata:read:".
14557 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
14558 (buffer_xml_printf): New functions.
14559 * server.h (struct buffer): New.
14560 (buffer_grow_str, buffer_grow_str0): New macros.
14561 (buffer_grow, buffer_free, buffer_init, buffer_finish)
14562 (buffer_xml_printf): Declare.
14563
14564 2008-11-24 Doug Evans <dje@google.com>
14565
14566 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
14567
14568 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
14569
14570 * server.c (handle_v_run): Always use the supplied argument list.
14571
14572 2008-11-19 Bob Wilson <bob.wilson@acm.org>
14573
14574 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
14575 (xtensa_regmap_table): Add entry for scompare1.
14576
14577 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
14578
14579 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
14580 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
14581 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
14582 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
14583 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
14584 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
14585 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
14586 XML target descriptions.
14587 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
14588 when inferior is running on an ISA 2.05 or later processor. Add
14589 special case to return offset for full 64-bit slot of FPSCR when
14590 in 32-bits.
14591
14592 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
14593
14594 * Makefile.in (SFILES, clean): Added sparc64 files.
14595 (reg-sparc64.o, reg-sparc64.c): New.
14596 * configure.srv (sparc*-*-linux*): New configuration.
14597 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
14598 syscall arguments for SPARC.
14599 (regsets_store_inferior_registers): Likewise.
14600 * linux-sparc-low.c: New file.
14601
14602 2008-10-21 Doug Evans <dje@google.com>
14603
14604 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
14605 (READLINE_DIR,READLINE_DEP): Delete.
14606 (INTERNAL_CFLAGS): Update.
14607 (LINTFLAGS): Update.
14608
14609 2008-10-10 Pedro Alves <pedro@codesourcery.com>
14610
14611 * server.c (handle_v_run): If GDB didn't specify an argv, use the
14612 whole argv from the last run, not just argv[0].
14613
14614 2008-09-08 Pedro Alves <pedro@codesourcery.com>
14615
14616 * regcache.c (new_register_cache): Return NULL if the register
14617 cache size isn't known yet.
14618 (free_register_cache): Avoid dereferencing a NULL regcache.
14619
14620 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
14621
14622 * configure.srv: Merge MIPS and MIPS64.
14623
14624 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
14625
14626 * Makefile.in (uninstall): Apply $(EXEEXT) too.
14627
14628 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
14629
14630 * Makefile.in: Add required vsx dependencies.
14631
14632 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
14633 Declare init_registers_powerpc_vsx32l.
14634 Declare init_registers_powerpc_vsx64l.
14635 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
14636 (ppc_arch_setup): Check for VSX in hwcap.
14637 (ppc_fill_vsxregset): New function.
14638 (ppc_store_vsxregset): New function.
14639 Add new VSX entry in regset_info target_regsets.
14640
14641 * configure.srv: Add new VSX dependencies.
14642
14643 2008-08-12 Pedro Alves <pedro@codesourcery.com>
14644
14645 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
14646 (remote_open): Set or clear transport_is_reliable.
14647 (putpkt_binary): Don't expect acks in noack mode.
14648 (getpkt): Don't send ack/nac in noack mode.
14649 * server.c (handle_general_set): Handle QStartNoAckMode.
14650 (handle_query): If connected by tcp pass QStartNoAckMode+ in
14651 qSupported.
14652 (main): Reset noack_mode on every connection.
14653 * server.h (noack_mode): Declare.
14654
14655 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
14656
14657 * Makefile.in (GDBREPLAY_OBS): New variable.
14658 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
14659
14660 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
14661 Daniel Jacobowitz <dan@codesourcery.com>
14662
14663 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
14664 (usr_store_inferior_registers): Likewise.
14665 (regsets_store_inferior_registers): Likewise.
14666
14667 2008-07-31 Rolf Jansen <rj@surtec.com>
14668 Pedro Alves <pedro@codesourcery.com>
14669
14670 * configure.ac: Check for memmem declaration.
14671 * server.c [HAVE_MALLOC_H]: Include malloc.h.
14672 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
14673 (disable_packet_qfThreadInfo): Unconditionally compile.
14674 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
14675 * configure, config.in: Regenerate.
14676
14677 2008-07-28 Doug Kwan <dougkwan@google.com>
14678
14679 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
14680 (linux_write_memory): Remove declaration of errno.
14681
14682 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
14683
14684 * linux-low.c (handle_extended_wait): Do not use "status"
14685 variable uninitialized.
14686
14687 2008-07-07 Pedro Alves <pedro@codesourcery.com>
14688
14689 * server.c (handle_v_attach): Inhibit reporting dll changes.
14690
14691 2008-06-27 Pedro Alves <pedro@codesourcery.com>
14692
14693 * remote-utils.c (prepare_resume_reply): If requested, don't
14694 output "thread:TID" in the T stop reply.
14695
14696 * server.c (disable_packet_vCont, disable_packet_Tthread)
14697 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
14698 (handle_query): If requested, disable support for qC, qfThreadInfo
14699 and qsThreadInfo.
14700 (handle_v_requests): If requested, disable support for vCont.
14701 (gdbserver_show_disableable): New.
14702 (main): Handle --disable-packet and --disable-packet=LIST.
14703
14704 * server.h (disable_packet_vCont, disable_packet_Tthread)
14705 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
14706
14707 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
14708
14709 * server.c (gdbserver_usage): Mention --version.
14710
14711 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
14712
14713 * Makefile.in (gdbreplay.o): New rule.
14714
14715 2008-06-06 Joseph Myers <joseph@codesourcery.com>
14716
14717 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
14718 message, not gdbserver.
14719
14720 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
14721 Nathan Sidwell <nathan@codesourcery.com>
14722 Joseph Myers <joseph@codesourcery.com>
14723
14724 * acinclude.m4: Include ../../config/acx.m4.
14725 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
14726 * configure, config.in: Regenerate.
14727 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
14728 * server.c (gdbserver_version): Print PKGVERSION.
14729 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
14730 (main): Adjust gdbserver_usage calls.
14731 * gdbreplay.c (version, host_name): Add declarations.
14732 (gdbreplay_version, gdbreplay_usage): New.
14733 (main): Accept --version and --help options.
14734
14735 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
14736
14737 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
14738 (arm_breakpoint_at): Handle Thumb.
14739 (the_low_target): Add comment.
14740
14741 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
14742
14743 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
14744
14745 2008-05-09 Doug Evans <dje@google.com>
14746
14747 * server.h (decode_search_memory_packet): Declare.
14748 * remote-utils.c (decode_search_memory_packet): New fn.
14749 * server.c (handle_search_memory_1): New fn.
14750 (handle_search_memory): New fn.
14751 (handle_query): Process qSearch:memory packets.
14752
14753 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
14754
14755 * regcache.c (registers_length): Remove.
14756 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
14757 full register packet.
14758 * regcache.h (registers_length): Remove prototype.
14759 * server.h (PBUFSIZ): Define to 16384.
14760
14761 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
14762
14763 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
14764 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
14765 powerpc-64l.o, and powerpc-altivec64l.o.
14766 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
14767 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
14768 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
14769 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
14770 rs6000/power-linux.xml, and rs6000/power64-linux.xml
14771 to srv_xmlfiles.
14772
14773 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
14774 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
14775 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
14776 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
14777 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
14778 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
14779 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
14780 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
14781 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
14782 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
14783 (clean): Update.
14784
14785 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
14786 (init_registers_powerpc_32l): ... this new prototype.
14787 (init_registers_powerpc_32): Remove, replace by ...
14788 (init_registers_powerpc_altivec32l): ... this new prototype.
14789 (init_registers_powerpc_e500): Remove, replace by ...
14790 (init_registers_powerpc_e500l): ... this new prototype.
14791 (init_registers_ppc64): Remove, replace by ...
14792 (init_registers_powerpc_64l): ... this new prototype.
14793 (init_registers_powerpc_64): Remove, replace by ...
14794 (init_registers_powerpc_altivec64l): ... this new prototype.
14795 (ppc_num_regs): Set to 73.
14796 (PT_ORIG_R3, PT_TRAP): Define if necessary.
14797 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
14798 (ppc_cannot_store_register): Handle orig_r3 and trap.
14799 (ppc_arch_setup): Update init_registers_... calls.
14800 (ppc_fill_gregset): Handle orig_r3 and trap.
14801
14802 * inferiors.c (clear_inferiors): Reset current_inferior.
14803
14804 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
14805
14806 * acinclude.m4: Add override.m4.
14807 * configure: Regenerate.
14808
14809 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14810
14811 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
14812 initial call to init_register_ppc64.
14813
14814 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
14815
14816 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
14817 single powerpc*-*-linux* case.
14818 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
14819
14820 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
14821
14822 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
14823 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
14824 from reg_xmlfiles.
14825 * linux-ppc-low.c: Include <elf.h>.
14826 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
14827 (ppc_hwcap): New global variable.
14828 (ppc_regmap): Remove __SPE__ #ifdef sections.
14829 (ppc_regmap_e500): New global variable.
14830 (ppc_cannot_store_register): Update __SPE__ special case.
14831 (ppc_get_hwcap): New function.
14832 (ppc_arch_setup): Use it to determine whether inferior supports
14833 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
14834 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
14835 Do not access registers if target does not support AltiVec.
14836 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
14837 Do not access registers if target does not support SPE.
14838 (target_regsets): Unconditionally include AltiVec and SPE regsets.
14839
14840 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
14841
14842 * linux-low.c (disabled_regsets, num_regsets): New.
14843 (use_regsets_p): Delete.
14844 (linux_wait_for_process): Clear disabled_regsets.
14845 (regsets_fetch_inferior_registers): Check and set it.
14846 (regsets_store_inferior_registers): Likewise.
14847 (linux_fetch_registers, linux_store_registers): Do not use
14848 use_regsets_p.
14849 (initialize_low): Allocate disabled_regsets.
14850
14851 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
14852
14853 * Makefile.in (LIBOBJS): New.
14854 (OBS): Use LIBOBJS.
14855 (memmem.o): New rule.
14856 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
14857 * configure: Regenerated.
14858
14859 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
14860
14861 * server.c (handle_query): Never return "unsupported" for
14862 qXfer:features:read queries.
14863
14864 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
14865
14866 * server.c (get_features_xml): Fix inverted condition.
14867 (handle_query): Always support qXfer:feature:read.
14868
14869 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
14870
14871 * server.c (wrapper_argv): New.
14872 (start_inferior): Handle wrapper_argv. If set, expect an extra
14873 trap.
14874 (gdbserver_usage): Document --wrapper.
14875 (main): Parse --wrapper.
14876
14877 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14878
14879 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
14880 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
14881 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
14882 (ppc_set_pc): Likewise.
14883 (ppc_arch_setup): New function.
14884 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
14885 of collect_register.
14886 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
14887
14888 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14889
14890 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
14891 instead of linux-ppc64-low.o.
14892 * linux-ppc64-low.c: Remove file.
14893 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
14894 (linux-ppc64-low.o): Remove rule.
14895
14896 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
14897 (init_registers_powerpc_64): Likewise.
14898 (ppc_regmap): Conditionally define depending on __powerpc64__.
14899 (ppc_cannot_store_register): Do not special-case "fpscr" when
14900 compiled on __powerpc64__.
14901 (ppc_collect_ptrace_register): New function.
14902 (ppc_supply_ptrace_register): New function.
14903 (ppc_breakpoint): Change type to "unsigned int".
14904 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
14905 (the_low_target): Conditionally provide initializers for the
14906 arch_setup member depending on __powerpc64__. Install
14907 collect_ptrace_register and supply_ptrace_register members.
14908
14909 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
14910
14911 * regcache.h (gdbserver_xmltarget): Add extern declaration.
14912 * server.c (gdbserver_xmltarget): Define.
14913 (get_features_xml): Use it to replace "target.xml" and arch_string.
14914
14915 * configure.srv: Remove srv_xmltarget. Add XML files that were
14916 mentioned there to srv_xmlfiles instead. Remove conditional tests
14917 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
14918 srv_xmlfiles and srv_regobj to include all possible choices.
14919 * configure.ac (srv_xmltarget): Remove.
14920 (srv_xmlfiles): Do not add "target.xml".
14921 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
14922 checks for supplementary target information.
14923 * configure: Regenerate.
14924 * Makefile.in (XML_TARGET): Remove.
14925 (target.xml): Remove rule.
14926 (clean): Do not clean up target.xml.
14927 (.PRECIOUS): Do not mention target.xml.
14928
14929 * target.h (struct target_ops): Remove arch_string member.
14930 * linux-low.c (linux_arch_string): Remove.
14931 (linux_target_ops): Remove arch_string initializer.
14932 * linux-low.h (struct linux_target_ops): Remove arch_string member.
14933 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
14934 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
14935 * spu-low.c (spu_arch_string): Remove.
14936 (spu_target_ops): Remove arch_string initializer.
14937 * win32-low.c (win32_arch_string): Remove.
14938 (win32_target_ops): Remove arch_string initializer.
14939 * win32-low.h (struct win32_target_ops): Remove arch_string member.
14940 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
14941 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
14942
14943 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14944
14945 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
14946 by collect_ptrace_register and supply_ptrace_register hooks.
14947 * linux-low.c (fetch_register): Use supply_ptrace_register callback
14948 instead of checking for the_low_target.left_pad_xfer.
14949 (usr_store_inferior_registers): Use collect_ptrace_register callback
14950 instead of checking for the_low_target.left_pad_xfer.
14951
14952 * linux-s390-low.c (s390_collect_ptrace_register): New function.
14953 (s390_supply_ptrace_register): Likewise.
14954 (s390_fill_gregset): Call s390_collect_ptrace_register.
14955 (the_low_target): Update.
14956
14957 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
14958 (ppc_supply_ptrace_register): Likewise.
14959 (the_low_target): Update.
14960
14961 * linux-i386-low.c (the_low_target): Update.
14962 * linux-x86-64-low.c (the_low_target): Update.
14963
14964 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14965
14966 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
14967 reg-s390.o and reg-s390x.o.
14968
14969 * linux-low.c (new_inferior): New global variable.
14970 (linux_create_inferior, linux_attach): Set it.
14971 (linux_wait_for_process): Call the_low_target.arch_setup after the
14972 target has stopped for the first time.
14973 (initialize_low): Do not call the_low_target.arch_setup.
14974
14975 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
14976 (s390_set_pc): Likewise.
14977 (s390_arch_setup): New function.
14978 (the_low_target): Use s390_arch_setup as arch_setup routine.
14979
14980 * regcache.c (realloc_register_cache): New function.
14981 (set_register_cache): Call it for each existing regcache.
14982
14983 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
14984
14985 * server.h (init_registers): Remove prototype.
14986
14987 * linux-low.h (struct linux_target_ops): Add arch_setup field.
14988 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
14989 instead of init_registers ().
14990 * linux-arm-low.c (init_registers_arm): Add prototype.
14991 (init_registers_arm_with_iwmmxt): Likewise.
14992 (the_low_target): Add initializer for arch_setup field.
14993 * linux-cris-low.c (init_registers_cris): Add prototype.
14994 (the_low_target): Add initializer for arch_setup field.
14995 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
14996 (the_low_target): Add initializer for arch_setup field.
14997 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
14998 (the_low_target): Add initializer for arch_setup field.
14999 * linux-ia64-low.c (init_registers_ia64): Add prototype.
15000 (the_low_target): Add initializer for arch_setup field.
15001 * linux-m32r-low.c (init_registers_m32r): Add prototype.
15002 (the_low_target): Add initializer for arch_setup field.
15003 * linux-m68k-low.c (init_registers_m68k): Add prototype.
15004 (the_low_target): Add initializer for arch_setup field.
15005 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
15006 (init_registers_mips64_linux): Likewise.
15007 (the_low_target): Add initializer for arch_setup field.
15008 * linux-ppc-low.c (init_registers_ppc): Add prototype.
15009 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
15010 (the_low_target): Add initializer for arch_setup field.
15011 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
15012 (init_registers_powerpc_64): Likewise.
15013 (the_low_target): Add initializer for arch_setup field.
15014 * linux-s390-low.c (init_registers_s390): Add prototype.
15015 (init_registers_s390x): Likewise.
15016 (the_low_target): Add initializer for arch_setup field.
15017 * linux-sh-low.c (init_registers_sh): Add prototype.
15018 (the_low_target): Add initializer for arch_setup field.
15019 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
15020 (the_low_target): Add initializer for arch_setup field.
15021 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
15022 (the_low_target): Add initializer for arch_setup field.
15023
15024 * win32-low.h (struct win32_target_ops): Add arch_setup field.
15025 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
15026 instead of init_registers ().
15027 * win32-arm-low.c (init_registers_arm): Add prototype.
15028 (the_low_target): Add initializer for arch_setup field.
15029 * win32-i386-low.c (init_registers_i386): Add prototype.
15030 (the_low_target): Add initializer for arch_setup field.
15031
15032 * spu-low.c (init_registers_spu): Add prototype.
15033 (initialize_low): Call initialie_registers_spu () instead of
15034 initialize_registers ().
15035
15036 2008-02-19 Pedro Alves <pedro@codesourcery.com>
15037
15038 * server.c (handle_v_requests): When handling the vRun and vAttach
15039 packets, if already debugging a process, don't kill it. Return an
15040 error instead.
15041
15042 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
15043
15044 * server.c (handle_query): Correct length check.
15045
15046 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
15047
15048 * win32-low.c (do_initial_child_stuff): Add process handle
15049 parameter. Set current_process_handle and current_process_id from the
15050 parameters. Clear globals.
15051 (win32_create_inferior): Don't set current_process_handle and
15052 current_process_id here. Instead pass them on the call to
15053 do_initial_child_stuff.
15054 (win32_attach): Likewise.
15055 (win32_clear_inferiors): New.
15056 (win32_kill): Don't close the current process handle or the
15057 current thread handle here. Instead call win32_clear_inferiors.
15058 (win32_detach): Don't open a new handle to the process. Call
15059 win32_clear_inferiors.
15060 (win32_join): Don't rely on current_process_handle; open a new
15061 handle using the process id.
15062 (win32_wait): Call win32_clear_inferiors when the inferior process
15063 has exited.
15064
15065 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
15066
15067 * server.c (monitor_show_help): Add "exit".
15068
15069 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
15070
15071 * Makefile.in (SFILES): Add linux-xtensa-low.c.
15072 (clean): Add reg-xtensa.c.
15073 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
15074 * configure.srv (xtensa*-*-linux*) New target.
15075 * linux-xtensa-low.c: New.
15076 * xtensa-xtregs.c: New.
15077
15078 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
15079
15080 * hostio.c: Don't include errno.h.
15081 (errno_to_fileio_errno): Move to hostio-errno.
15082 * hostio.c: (hostio_error): Remove the error parameter. Defer the
15083 error number outputting to the target->hostio_last_error callback.
15084 (hostio_packet_error): Use FILEIO_EINVAL directly.
15085 (handle_open, handle_pread, hostio_error, handle_unlink): Update
15086 calls to hostio_error.
15087 * hostio-errno.c: New.
15088 * server.h (hostio_last_error_from_errno): Declare.
15089 * target.h (target_ops): Add hostio_last_error member.
15090 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
15091 as hostio_last_error handler.
15092 * spu-low.c (spu_target_ops): Likewise.
15093 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
15094 (wince_hostio_last_error): New functions.
15095 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
15096 as hostio_last_error handler.
15097 (win32_target_ops) [!_WIN32_WCE]: Register
15098 hostio_last_error_from_errno as hostio_last_error handler.
15099 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
15100 (hostio-errno.o): New rule.
15101 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
15102 * configure.srv (srv_hostio_err_objs): New variable. Default to
15103 hostio-errno.o.
15104 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
15105 * configure: Regenerate.
15106
15107 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15108
15109 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
15110 (linux_kill, linux_detach): Clean up the process list.
15111 * remote-utils.c (remote_open): Improve port number parsing.
15112 (putpkt_binary, input_interrupt): Only send interrupts if the target
15113 is running.
15114 * server.c (extended_protocol): Make static.
15115 (attached): Define earlier.
15116 (exit_requested, response_needed, program_argv): New variables.
15117 (target_running): New.
15118 (start_inferior): Clear attached here.
15119 (attach_inferior): Set attached here.
15120 (require_running): Define.
15121 (handle_query): Use require_running and target_running. Implement
15122 "monitor exit".
15123 (handle_v_attach, handle_v_run): New.
15124 (handle_v_requests): Use require_running. Handle vAttach and vRun.
15125 (gdbserver_usage): Update.
15126 (main): Redo argument parsing. Handle --debug and --multi. Handle
15127 --attach along with other options or after the port. Save
15128 program_argv. Support no initial program. Resynchronize
15129 communication with GDB after an error. Handle "monitor exit".
15130 Use require_running and target_running. Always allow the extended
15131 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
15132 restart in extended mode.
15133 * README: Refer to the GDB manual. Update --attach usage.
15134
15135 2007-12-20 Andreas Schwab <schwab@suse.de>
15136
15137 * linux-low.c (STACK_SIZE): Define.
15138 (linux_tracefork_child): Use it. Use __clone2 on ia64.
15139 (linux_test_for_tracefork): Likewise.
15140
15141 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
15142
15143 * linux-low.c (linux_wait_for_event): Update messages. Do not
15144 reinsert auto-delete breakpoints.
15145 * mem-break.c (struct breakpoint): Change return type of handler to
15146 int.
15147 (set_breakpoint_at): Update handler type.
15148 (reinsert_breakpoint_handler): Return 1 instead of calling
15149 delete_breakpoint.
15150 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
15151 setting a new one.
15152 (check_breakpoints): Delete auto-delete breakpoints and return 2.
15153 * mem-break.h (set_breakpoint_at): Update handler type.
15154 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
15155 * win32-low.c (auto_delete_breakpoint): New.
15156 (get_child_debug_event): Use it.
15157
15158 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
15159
15160 * configure.ac: Check for pread and pwrite.
15161 * hostio.c (handle_pread): Fall back to lseek and read.
15162 (handle_pwrite): Fall back to lseek and write.
15163 * config.in, configure: Regenerated.
15164
15165 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
15166
15167 * server.c (myresume): Add own_buf argument.
15168 (main): Update calls.
15169
15170 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
15171
15172 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
15173 * remote-utils.c (remote_open): Do not call disable_async_io.
15174 (block_async_io): Delete.
15175 (unblock_async_io): Make static.
15176 (initialize_async_io): New.
15177 * server.c (handle_v_cont): Handle async I/O here.
15178 (myresume): Likewise. Move other common resume tasks here...
15179 (main): ... from here. Call initialize_async_io. Disable async
15180 I/O before the main loop.
15181 * server.h (initialize_async_io): Declare.
15182 (block_async_io, unblock_async_io): Delete prototypes.
15183 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
15184
15185 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
15186
15187 * remote-utils.c (readchar): Allow binary data in received messages.
15188
15189 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15190
15191 * win32-low.c (attaching): New global.
15192 (win32_create_inferior): Clear the `attaching' global.
15193 (win32_attach): Set the `attaching' global.
15194 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
15195 attaching. Only set a breakpoint at the entry point if not
15196 attaching.
15197
15198 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15199
15200 * server.c (main): Don't report dll events on the initial
15201 connection on attaches.
15202
15203 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15204
15205 * server.c (main): Relax numerical bases supported for the pid of
15206 the --attach command line argument.
15207
15208 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15209
15210 * win32-low.c (win32_attach): Call OpenProcess before
15211 DebugActiveProcess, not after. Add last error output to error
15212 call.
15213
15214 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
15215
15216 * win32-low.c (win32_get_thread_context)
15217 (win32_set_thread_context): New functions.
15218 (thread_rec): Use win32_get_thread_context.
15219 (continue_one_thread, win32_resume): Use win32_set_thread_context.
15220 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
15221 field.
15222
15223 2007-12-03 Leo Zayas
15224 Pedro Alves <pedro_alves@portugalmail.pt>
15225
15226 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
15227 global variables.
15228 (child_add_thread): Minor cleanup.
15229 (child_continue): Resume artificially suspended threads before
15230 calling ContinueDebugEvent.
15231 (suspend_one_thread): New.
15232 (fake_breakpoint_event): New.
15233 (get_child_debug_event): Change return type to int. Check here if
15234 gdb sent an interrupt request. If a soft interrupt was requested,
15235 fake a breakpoint event. Return 0 if there is no event to handle,
15236 and 1 otherwise.
15237 (win32_wait): Don't check here if gdb sent an interrupt request.
15238 Ensure there is a valid event to handle.
15239 (win32_request_interrupt): Add soft interruption method as last
15240 resort.
15241
15242 2007-12-03 Leo Zayas
15243 Pedro Alves <pedro_alves@portugalmail.pt>
15244
15245 * win32-low.h (win32_thread_info): Add descriptions to the
15246 structure members. Replace `suspend_count' counter by a
15247 `suspended' flag.
15248 * win32-low.c (thread_rec): Update condition of when to get the
15249 context from the inferior. Rely on ContextFlags being set if it
15250 has already been retrieved. Only suspend the inferior thread if
15251 we haven't already. Warn if that fails.
15252 (continue_one_thread): s/suspend_count/suspended/. Only call
15253 ResumeThread once. Warn if that fails.
15254
15255 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15256
15257 * win32-low.c (win32_wait): Don't read from the inferior when it
15258 has already exited.
15259
15260 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
15261
15262 * Makefile.in (win32_low_h): New variable.
15263 (win32-low.o): Add dependency on $(win32_low_h).
15264 (win32-arm-low.o, win32-i386-low.o): New rules.
15265
15266 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15267
15268 * hostio.c: Correct copyright year.
15269
15270 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
15271
15272 * Makefile.in (OBS): Add hostio.o.
15273 (hostio.o): New rule.
15274 * server.h (handle_vFile): Declare.
15275 * hostio.c: New file.
15276 * server.c (handle_v_requests): Take packet_len and new_packet_len
15277 for binary packets. Call handle_vFile.
15278 (main): Update call to handle_v_requests.
15279
15280 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
15281
15282 * linux-low.c: Include <sched.h>.
15283
15284 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
15285
15286 * linux-low.c (linux_tracefork_grandchild): New.
15287 (linux_tracefork_child): Use clone.
15288 (linux_test_for_tracefork): Use clone; allocate and free a stack.
15289
15290 2007-10-31 Joel Brobecker <brobecker@adacore.com>
15291
15292 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
15293
15294 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
15295
15296 * linux-low.c (handle_extended_wait): Handle unexpected signals.
15297
15298 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
15299
15300 * inferiors.c (change_inferior_id): Delete.
15301 (add_pid_to_list, pull_pid_from_list): New.
15302 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
15303 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
15304 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
15305 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
15306 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
15307 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
15308 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
15309 (using_threads): Always set to 1.
15310 (handle_extended_wait): New.
15311 (add_process): Do not set TID.
15312 (linux_create_inferior): Set must_set_ptrace_flags.
15313 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
15314 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
15315 (linux_thread_alive): Rename TID argument to LWPID.
15316 (linux_wait_for_process): Handle unknown processes. Do not use TID.
15317 (linux_wait_for_event): Do not use TID or check using_threads. Update
15318 call to dead_thread_notify. Call handle_extended_wait.
15319 (linux_create_inferior): Use PTRACE_SETOPTIONS.
15320 (send_sigstop): Delete sigstop_sent.
15321 (wait_for_sigstop): Avoid TID.
15322 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
15323 (linux_test_for_tracefork): New.
15324 (linux_lookup_signals): Use thread_db_active and
15325 linux_supports_tracefork_flag.
15326 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
15327 * linux-low.h (get_process_thread): Avoid TID.
15328 (struct process_ifo): Move thread_known and tid to the end. Remove
15329 sigstop_sent.
15330 (linux_attach_lwp, thread_db_init): Update prototypes.
15331 * server.h (change_inferior_id): Delete prototype.
15332 (add_pid_to_list, pull_pid_from_list): New prototypes.
15333 * thread-db.c (thread_db_use_events): New.
15334 (find_first_thread): Rename to...
15335 (find_one_thread): ...this. Update callers and messages. Do not
15336 call fatal. Check thread_db_use_events. Do not call
15337 change_inferior_id or new_thread_notify.
15338 (maybe_attach_thread): Update. Do not call new_thread_notify.
15339 (thread_db_init): Set thread_db_use_events. Check use_events.
15340 * utils.c (fatal, warning): Correct message prefix.
15341
15342 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
15343
15344 * Makefile.in (clean): Remove new files.
15345 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
15346 (powerpc-64.o, powerpc-64.c): New rules.
15347 * configure.srv: Use alternate register sets for powerpc64-*-linux*
15348 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
15349 with SPE.
15350 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
15351 SPE targets.
15352 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
15353 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
15354 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
15355 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
15356 (target_regsets): Add AltiVec and SPE register sets.
15357 * configure.ac: Check for AltiVec and SPE.
15358 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
15359 (ppc_fill_vrregset, ppc_store_vrregset): New.
15360 (target_regsets): Add AltiVec register set.
15361 * configure: Regenerated.
15362
15363 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
15364
15365 * linux-low.c (O_LARGEFILE): Define.
15366 (linux_read_memory): Use /proc/PID/mem.
15367 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
15368 * configure, config.in: Regenerated.
15369
15370 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
15371
15372 * linux-low.c (linux_wait_for_event): Do not pass signals while
15373 single-stepping.
15374
15375 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15376
15377 * win32-low.c (create_process): New.
15378 (win32_create_inferior): Use create_process instead of
15379 CreateProcess. If create_process failed retry appending an ".exe"
15380 suffix. Store the GetLastError result immediatelly after
15381 create_process calls and use it on the call to error.
15382
15383 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
15384
15385 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
15386
15387 2007-08-23 Joel Brobecker <brobecker@adacore.com>
15388
15389 * configure.ac: Switch license to GPLv3.
15390
15391 2007-08-01 Michael Snyder <msnyder@access-company.com>
15392
15393 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
15394
15395 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
15396
15397 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
15398 typedef.
15399 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
15400 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
15401 CloseToolhelp32Snapshot.
15402 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
15403 CloseToolhelp32Snapshot.
15404
15405 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
15406
15407 * server.c (main): Check for inferior exit before main loop.
15408
15409 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
15410
15411 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
15412 instead of on tmp_desc.
15413
15414 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
15415 Daniel Jacobowitz <dan@codesourcery.com>
15416
15417 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
15418 (add_thread): Minor cleanups.
15419 (clear_inferiors): Move lower in the file. Clear the DLL
15420 list.
15421 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
15422 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
15423 (xml_escape_text): New.
15424 * server.c (handle_query): Handle qXfer:libraries:read. Report it
15425 for qSupported.
15426 (handle_v_cont): Report errors.
15427 (gdbserver_version): Update.
15428 (main): Correct size of own_buf. Do not report initial DLL events.
15429 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
15430 (unloaded_dll, xml_escape_text): New.
15431 * win32-low.c (enum target_waitkind): Update comments.
15432 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
15433 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
15434 (win32_EnumProcessModules, win32_GetModuleInformation)
15435 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
15436 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
15437 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
15438 (win32_Module32First, win32_Module32Next, load_toolhelp)
15439 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
15440 (get_child_debug_event): Handle DLL events.
15441 (win32_wait): Likewise.
15442
15443 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
15444
15445 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
15446 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
15447
15448 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15449
15450 * win32-low.c (handle_output_debug_string): Ignore event if not
15451 waiting.
15452
15453 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
15454
15455 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
15456
15457 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
15458
15459 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
15460
15461 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
15462
15463 * inferiors.c (change_inferior_id): Add comment.
15464 * linux-low.c (check_removed_breakpoint): Add an early
15465 prototype. Improve debug output.
15466 (linux_attach): Doc update.
15467 (linux_detach_one_process, linux_detach): Clean up before releasing
15468 each process.
15469 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
15470 * linux-low.h (struct process_info): Doc improvement.
15471 * mem-break.c (delete_all_breakpoints): New.
15472 * mem-break.h (delete_all_breakpoints): New prototype.
15473 * thread-db.c (find_first_thread): New.
15474 (thread_db_create_event): Call it instead of
15475 thread_db_find_new_threads. Clean up unused variables.
15476 (maybe_attach_thread): Remove first thread handling.
15477 (thread_db_find_new_threads): Use find_first_thread.
15478 (thread_db_get_tls_address): Likewise.
15479
15480 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
15481
15482 * thread-db.c (thread_db_find_new_threads): Add prototype.
15483 (thread_db_create_event): Check for the main thread before adding
15484 a new thread.
15485 (maybe_attach_thread): Only enable event reporting if TID == 0.
15486 (thread_db_get_tls_address): Check for new threads.
15487
15488 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
15489
15490 * linux-low.c (linux_create_inferior): Try execv before execvp.
15491 * spu-low.c (spu_create_inferior): Likewise.
15492
15493 2007-06-13 Mike Frysinger <vapier@gentoo.org>
15494
15495 * linux-low.c (linux_create_inferior): Change execv to execvp.
15496 * spu-low.c (spu_create_inferior): Likewies.
15497
15498 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
15499
15500 * Makefile.in (clean): Clean new files instead of deleted ones.
15501 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
15502 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
15503 rules.
15504 * configure.srv: Specify XML files and new regformats for MIPS and
15505 MIPS64 GNU/Linux.
15506 * linux-mips-low.c (mips_num_regs): Set to only used registers.
15507 (mips_regmap): Do not fetch $0. Remove unused registers. Add
15508 an entry for the restart register.
15509 (mips_cannot_fetch_register, mips_cannot_store_register)
15510 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
15511 register names to match the XML descriptions.
15512 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
15513 restart register instead of $0.
15514
15515 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15516 Markus Deuling <deuling@de.ibm.com>
15517
15518 * remote-utils.c (decode_xfer_write): New function.
15519 * server.h (decode_xfer_write): Add prototype.
15520 * server.c (handle_query): Add PACKET_LEN argument. Support
15521 qXfer:spu:read and qXfer:spu:write packets.
15522 (main): Pass packet_len to handle_query.
15523 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
15524 * target.h (target_ops): Add qxfer_spu.
15525
15526 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
15527
15528 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
15529 accessing non-seekable spufs files.
15530
15531 2007-05-16 Markus Deuling <deuling@de.ibm.com>
15532
15533 * server.c (handle_query): Add reply for qC packet.
15534
15535 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15536 Leo Zayas <lerele@champenstudios@com>
15537
15538 * server.h (check_remote_input_interrupt_request): New function.
15539 * remote_utils.c (INVALID_DESCRIPTOR): New define.
15540 (remote_desc): Initialize with INVALID_DESCRIPTOR.
15541 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
15542 (check_remote_input_interrupt_request): New function.
15543 * server.h (check_remote_input_interrupt_request): Declare.
15544 * win32-low.c (winapi_DebugBreakProcess,
15545 winapi_GenerateConsoleCtrlEvent): New typedefs.
15546 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
15547 to 250 ms.
15548 (win32_wait): Check for remote interrupt request
15549 with check_remote_input_interrupt_request.
15550 (win32_request_interrupt): New function.
15551 (win32_target_op): Set request_interrupt to win32_request_interrupt.
15552
15553 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15554
15555 * win32-low.c (debug_registers_changed,
15556 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
15557 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
15558 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
15559 (thread_rec): Get context using the low target.
15560 (child_add_thread): Call thread_added on the low target,
15561 which does the same thing.
15562 (regptr): Delete.
15563 (do_initial_child_stuff): Remove debug registers references.
15564 Set context using the low target. Resume threads after
15565 setting the contexts.
15566 (child_continue): Remove dead variable. Remove debug
15567 registers references.
15568 (child_fetch_inferior_registers): Go through the low target.
15569 (do_child_store_inferior_registers): Remove.
15570 (child_store_inferior_registers): Go through the low target.
15571 (win32_resume): Remove debug registers references.
15572 Set context using the low target.
15573 (handle_exception): Change return type to void. Don't record
15574 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
15575 first chance exception.
15576 (get_child_debug_event): Change return type to void. Remove
15577 goto loop. Always return after waiting for debug event.
15578 (win32_wait): Convert to switch statement. Handle spurious
15579 events.
15580
15581 * win32-i386-low.c (debug_registers_changed,
15582 debug_registers_used): New.
15583 (initial_stuff): Rename to ...
15584 (i386_initial_stuff): ... this. Clear debug registers
15585 state variables.
15586 (store_debug_registers): Delete.
15587 (i386_get_thread_context): New.
15588 (load_debug_registers): Delete.
15589 (i386_set_thread_context): New.
15590 (i386_thread_added): New.
15591 (single_step): Rename to ...
15592 (i386_single_step): ... this.
15593 (do_fetch_inferior_registers): Rename to ...
15594 (i386_fetch_inferior_register): ... this.
15595 (i386_store_inferior_register): New.
15596 (the_low_target): Adapt to new interface.
15597
15598 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
15599 (arm_get_thread_context): New.
15600 (arm_set_thread_context): New.
15601 (regptr): New.
15602 (do_fetch_inferior_registers): Rename to ...
15603 (arm_fetch_inferior_register): ... this.
15604 (arm_store_inferior_register): New.
15605 (arm_wince_breakpoint): Reimplement as unsigned long.
15606 (arm_wince_breakpoint_len): Define.
15607 (the_low_target): Adapt to new interface.
15608
15609 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
15610 load_debug_registers. Add get_thread_context, set_thread_context,
15611 thread_added and store_inferior_register. Rename
15612 fetch_inferior_registers to fetch_inferior_register.
15613 (regptr): Remove declaration.
15614
15615 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15616
15617 * linux-low.c (linux_detach): Change return type to int. Return 0.
15618 * spu-low.c (spu_detach): Likewise.
15619
15620 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15621
15622 * target.h (target_ops): Change return type of detach to int.
15623 Add join.
15624 (join_inferior): New.
15625 * server.c (main): Don't skip detach support on mingw32.
15626 If the inferior doesn't support detaching return error.
15627 Call join_inferior instead of using waitpid.
15628 * linux-low.c (linux_join): New.
15629 (linux_target_op): Add linux_join.
15630 * spu-low.c (spu_join): New.
15631 (spu_target_ops): Add spu_join.
15632 * win32-low.c (win32_detach): Adapt to new interface.
15633 Reopen current_process_handle before detaching. Issue a child
15634 resume before detaching.
15635 (win32_join): New.
15636 (win32_target_op): Add win32_join.
15637
15638 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15639
15640 * win32-low.c (win32-attach): Fix return value.
15641 * target.h (target_ops): Describe ATTACH return values.
15642
15643 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15644
15645 * win32-low.c (GETPROCADDRESS): Define.
15646 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
15647 (winapi_DebugSetProcessKillOnExit): Likewise.
15648 (win32_create_inferior): Force usage of ansi CreateProcessA.
15649 (win32_attach): Use GETPROCADDRESS.
15650 (win32_detach): Likewise.
15651
15652 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
15653
15654 * win32-low.c (win32_wait): Don't use WSTOPSIG.
15655
15656 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
15657
15658 * win32-low.c: Commit leftover changes from 2007-03-29.
15659
15660 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15661
15662 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
15663 fields short instead of int. Add explicit padding.
15664 (i387_cache_to_fsave): Remove unnecessary casts.
15665 (i387_fsave_to_cache): Doc fix.
15666 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
15667
15668 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
15669
15670 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
15671 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
15672
15673 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15674
15675 * configure.srv (arm*-*-mingw32ce*): Move near the other
15676 arm targets.
15677
15678 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
15679
15680 * configure.ac: Add errno checking.
15681 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
15682 sys/file.h and malloc.h.
15683 (AC_CHECK_DECLS): Add perror.
15684 (srv_mingwce): Handle.
15685 * configure.srv (i[34567]86-*-cygwin*): Add
15686 win32-i386-low.o to srv_tgtobj.
15687 (i[34567]86-*-mingw*): Likewise.
15688 (arm*-*-mingw32ce*): Add case.
15689 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15690 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
15691 [__MINGW32CE__] (strerror): New function.
15692 [__MINGW32CE__] (errno): Define to GetLastError.
15693 [__MINGW32CE__] (COUNTOF): New macro.
15694 (remote_open): Remove extra close call.
15695 * mem-break.c (delete_breakpoint_at): New function.
15696 * mem-break.h (delete_breakpoint_at): Declare.
15697 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
15698 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
15699 [USE_WIN32API] (read, write): Add char* casts.
15700 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
15701 * server.h: Include wincecompat.h on Windows CE.
15702 [HAVE_ERRNO_H]: Check.
15703 (perror): Declare if not declared.
15704 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
15705 (perror_with_name): Remove errno declaration.
15706 * wincecompat.h: New.
15707 * wincecompat.c: New.
15708 * win32-low.h: New.
15709 * win32-arm-low.c: New.
15710 * win32-i386-low.c: New.
15711 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
15712 (OUTMSG2): Make it safe.
15713 (_T): New macro.
15714 (COUNTOF): New macro.
15715 (NUM_REGS): Get it from the low target.
15716 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
15717 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
15718 (thread_rec): Let low target handle debug registers.
15719 (child_add_thread): Likewise.
15720 (child_init_thread_list): Likewise.
15721 (continue_one_thread): Likewise.
15722 (regptr): New.
15723 (do_child_fetch_inferior_registers): Move to ...
15724 * win32-i386-low.c: ... here, and rename to ...
15725 (do_fetch_inferior_registers): ... this.
15726 * win32-low.c (child_fetch_inferior_registers):
15727 Go through the low target.
15728 (do_child_store_inferior_registers): Use regptr.
15729 (strwinerror): New function.
15730 (win32_create_inferior): Handle Windows CE.
15731 Use strwinerror instead of strerror on Windows error
15732 codes. Add program to the error output.
15733 Don't close the main thread handle on Windows CE.
15734 (win32_attach): Use coredll.dll on Windows CE.
15735 (win32_kill): Close current process and current
15736 thread handles.
15737 (win32_detach): Use coredll.dll on Windows CE.
15738 (win32_resume): Let low target handle debug registers, and
15739 step request.
15740 (handle_exception): Add/Remove initial breakpoint. Avoid
15741 non-existant WSTOPSIG on Windows CE.
15742 (win32_read_inferior_memory): Cast to remove warning.
15743 (win32_arch_string): Go through the low target.
15744 (initialize_low): Call set_breakpoint_data with the low
15745 target's breakpoint.
15746 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
15747 FOP_REGNUM, mappings): Move to ...
15748 * win32-i386-low.c: ... here.
15749 * win32-low.c (win32_thread_info): Move to ...
15750 * win32-low.h: ... here.
15751 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
15752 win32-arm-low.c and wincecompat.c.
15753 (all:): Add $EXEEXT.
15754 (install-only:): Likewise.
15755 (gdbserver:): Likewise.
15756 (gdbreplay:): Likewise.
15757 * config.in: Regenerate.
15758 * configure: Regenerate.
15759
15760 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15761
15762 * win32-low.c: Rename typedef thread_info to
15763 win32_thread_info throughout.
15764
15765 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
15766
15767 * win32-i386-low.c: Rename to ...
15768 * win32-low.c: ... this.
15769 * configure.srv: Replace win32-i386-low.o with win32-low.o.
15770 * Makefile.in: Likewise.
15771
15772 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
15773
15774 * remote-utils.c (monitor_output): Constify msg parameter.
15775 * server.h (monitor_output): Likewise.
15776 * win32-i386-low.c (handle_output_debug_string): New.
15777 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
15778 handle_output_debug_string.
15779 (get_child_debug_event): Likewise.
15780
15781 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
15782
15783 * server.c (main): Correct strtoul check.
15784
15785 2007-03-27 Jon Ringle <jon@ringle.org>
15786
15787 * linux-low.c: Check __ARCH_HAS_MMU__ also.
15788
15789 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
15790
15791 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
15792
15793 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
15794
15795 * terminal.h: Check HAVE_SGTTY_H.
15796
15797 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
15798
15799 * remote-utils.c (remote_open): Print out the assigned port number.
15800
15801 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
15802
15803 * remote-utils.c (monitor_output): New function.
15804 * server.c (debug_threads): Define here.
15805 (monitor_show_help): New function.
15806 (handle_query): Handle qRcmd.
15807 (main): Do not handle 'd' packet.
15808 * server.h (debug_threads, remote_debug, monitor_output): Declare.
15809 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
15810 of debug_threads.
15811
15812 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15813
15814 * Makefile.in (EXEEXT): New.
15815 (clean): Use $(EXEEXT).
15816
15817 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15818
15819 * target.h (target_ops): Rename send_signal to request_interrupt,
15820 and remove enum target_signal parameter.
15821 * linux-low.c (linux_request_interrupt): Rename from
15822 linux_send_signal, and always send SIGINT.
15823 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
15824 and always send SIGINT.
15825 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
15826 of send_signal.
15827 (input_interrupt): Likewise.
15828
15829 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
15830
15831 * server.c (get_features_xml): Check if target implemented
15832 arch_string.
15833 * win32-i386-low.c (win32_arch_string): New.
15834 (win32_target_ops): Add win32_arch_string as arch_string member.
15835
15836 2007-02-22 Markus Deuling <deuling@de.ibm.com>
15837
15838 * spu-low.c (spu_arch_string): New.
15839 (spu_target_ops): Add spu_arch_string.
15840
15841 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
15842
15843 * remote-utils.c: Remove HAVE_TERMINAL_H check.
15844 * configure.ac: Do not check for terminal.h.
15845 * configure, config.in: Regenerated.
15846
15847 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
15848
15849 * Makefile.in (OBS): Add $(XML_BUILTIN).
15850 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
15851 (clean): Update.
15852 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
15853 (arm-with-iwmmxt.c): New.
15854 * config.in, configure: Regenerate.
15855 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
15856 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
15857 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
15858 (arm*-*-linux*): Add iWMMXt and regset support.
15859 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
15860 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
15861 (arm_store_wmmxregset, target_regsets): New.
15862 * server.c (get_features_xml): Take annex argument. Check builtin
15863 XML documents.
15864 (handle_query): Handle multiple annexes.
15865
15866 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
15867
15868 * remote-utils.c [USE_WIN32API] (read, write): Define.
15869 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
15870 write.
15871
15872 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
15873
15874 * linux-i386-low.c (the_low_target): Set arch_string.
15875 * linux-x86-64-low.c (the_low_target): Likewise.
15876 * linux-low.c (linux_arch_string): New.
15877 (linux_target_ops): Add it.
15878 * linux-low.h (struct linux_target_ops): Add arch_string.
15879 * server.c (write_qxfer_response): Use const void * for DATA.
15880 (get_features_xml): New.
15881 (handle_query): Handle qXfer:features:read. Report it for qSupported.
15882 * target.h (struct target_ops): Add arch_string method.
15883
15884 2007-01-03 Denis Pilat <denis.pilat@st.com>
15885 Daniel Jacobowitz <dan@codesourcery.com>
15886
15887 * linux-low.c (linux_kill): Handle being called with no threads.
15888 * win32-i386-low.c (win32_kill): Likewise.
15889 (get_child_debug_event): Clear current_process_handle.
15890
15891 2006-12-30 Denis PILAT <denis.pilat@st.com>
15892 Daniel Jacobowitz <dan@codesourcery.com>
15893
15894 * remote-utils.c (remote_open): Check the type of specified
15895 serial port devices before opening them.
15896 * server.c (main): Kill the inferior if an error occurs during
15897 the first remote_open.
15898
15899 2006-12-05 Markus Deuling <deuling@de.ibm.com>
15900
15901 * README: Update supported targets.
15902
15903 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
15904
15905 * Makefile.in (clean): Remove reg-mips64.c.
15906 (reg-mips64.c, reg-mips64.o): New rules.
15907 * configure.srv: Handle mips64. Include regset support for mips.
15908 * linux-mips-low.c (union mips_register): New.
15909 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
15910 (mips_breakpoint, mips_breakpoint_at): Use int.
15911 (mips_collect_register, mips_supply_register)
15912 (mips_collect_register_32bit, mips_supply_register_32bit)
15913 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
15914 (mips_store_fpregset, target_regsets): New.
15915 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
15916
15917 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
15918
15919 * configure.srv: Add target "spu*-*-*".
15920 * Makefile.in (clean): Remove reg-spu.c.
15921 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
15922 * spu-low.c: New file.
15923
15924 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15925
15926 * configure.ac: Correct td_thr_tls_get_addr test.
15927 * configure: Regenerated.
15928
15929 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
15930
15931 * linux-low.c (linux_wait_for_event): Reformat. Use the
15932 pass_signals array.
15933 * remote-utils.c (decode_address_to_semicolon): New.
15934 * server.c (pass_signals, handle_general_set): New.
15935 (handle_query): Mention QPassSignals for qSupported.
15936 (main): Call handle_general_set.
15937 * server.h (pass_signals, decode_address_to_semicolon): New.
15938
15939 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
15940
15941 * server.c (handle_query): Correct error handling for read_auxv.
15942
15943 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
15944
15945 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
15946 and srv_linux_thread_db to yes.
15947 * linux-s390-low.c (s390_fill_gregset): New function.
15948 (target_regsets): Define data structure.
15949
15950 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
15951
15952 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
15953 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
15954 * config.in, configure: Regenerated.
15955 * inferiors.c (gdb_id_to_thread): New function.
15956 (gdb_id_to_thread_id): Use it.
15957 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
15958 * linux-low.h (struct process_info): Add th member.
15959 (thread_db_get_tls_address): New prototype.
15960 * remote-utils.c (decode_address): Make non-static.
15961 * server.c (handle_query): Handle qGetTLSAddr.
15962 * server.h (gdb_id_to_thread, decode_address): New prototypes.
15963 * target.h (struct target_ops): Add get_tls_address.
15964 * thread-db.c (maybe_attach_thread): Save the thread handle.
15965 (thread_db_get_tls_address): New.
15966
15967 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
15968
15969 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
15970 (linux_resume_one_process): Take a siginfo_t *. Update all
15971 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
15972 (struct pending_signals): Add a siginfo_t.
15973 (linux_wait_for_process): Always set last_status.
15974 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
15975 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
15976 * linux-low.h (struct process_info): Add last_status.
15977
15978 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
15979
15980 * remote-utils.c (try_rle): New function.
15981 (putpkt_binary): Use it.
15982
15983 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
15984
15985 * Makefile.in (clean): Clean reg-x86-64-linux.c.
15986 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
15987 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
15988 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
15989 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
15990 point registers.
15991
15992 2006-08-08 Richard Sandiford <richard@codesourcery.com>
15993
15994 * server.c (terminal_fd): New variable.
15995 (old_foreground_pgrp): Likewise.
15996 (restore_old_foreground_pgrp): New function.
15997 (start_inferior): Record the terminal file descriptor in terminal_fd
15998 and its original foreground group in old_foreground_pgrp. Register
15999 restore_old_foreground_pgrp with atexit().
16000
16001 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
16002
16003 * server.c (handle_query): Correct qPart to qXfer.
16004
16005 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
16006
16007 * configure.ac: Check for more headers which are missing on
16008 Windows. Automatically supply -lwsock32 and USE_WIN32API.
16009 * configure.srv: Add Cygwin and mingw32.
16010 * remote-utils.c: Don't include headers unconditionally which
16011 are missing on mingw32. Include <winsock.h> for mingw32.
16012 (remote_open): Adjust for mingw32 support. Flush
16013 standard error after writing to it.
16014 (remote_close, putpkt_binary, input_interrupt, block_async_io)
16015 (unblock_async_io, enable_async_io, disable_async_io)
16016 (readchar, getpkt): Update for Winsock support.
16017 (prepare_resume_reply): Expect a protocol signal number.
16018 * server.c: Disable <sys/wait.h> on mingw32.
16019 (start_inferior): Adjust for mingw32 support. Flush
16020 standard error after writing to it.
16021 (attach_inferior): Likewise. Use protocol signal
16022 numbers.
16023 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
16024 and names.
16025 * win32-i386-low.c: New file.
16026 * Makefile.in (XM_CLIBS): Set.
16027 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
16028 (win32-i386-low.o): New dependency rule.
16029 * linux-low.c (linux_wait): Use target signal numbers.
16030 * target.h (struct target_ops): Doc fix.
16031 * server.h (target_signal_to_name): New prototype.
16032 * gdbreplay.c: Don't include headers unconditionally which
16033 are missing on mingw32. Include <winsock.h> for mingw32.
16034 (remote_close, remote_open): Adjust for Winsock support.
16035 * configure, config.in: Regenerated.
16036
16037 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
16038
16039 * server.c (decode_xfer_read, write_qxfer_response): New.
16040 (handle_query): Take a packet length argument. Handle
16041 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
16042 the qSupported response.
16043 (main): Update call to handle_query.
16044
16045 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
16046
16047 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
16048 (putpkt_binary): Renamed from putpkt and adjusted for binary
16049 data.
16050 (putpkt): New wrapper for putpkt_binary.
16051 (readchar): Don't mask off the high bit.
16052 (decode_X_packet): New function.
16053 * server.c (main): Call putpkt_binary if a handler sets the packet
16054 length. Save the length of the incoming packet. Handle 'X'.
16055 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
16056
16057 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
16058
16059 * server.c (handle_query): Handle qSupported.
16060
16061 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16062
16063 * remote-utils.c (all_symbols_looked_up): New variable.
16064 (look_up_one_symbol): Check it.
16065 * server.h (look_up_one_symbol): New declaration.
16066 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
16067
16068 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
16069
16070 * Makefile.in (linux-arm-low.o): Update dependencies.
16071 * linux-arm-low.c: Include "gdb_proc_service.h".
16072 (PTRACE_GET_THREAD_AREA): Define.
16073 (ps_get_thread_area): New function.
16074
16075 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
16076
16077 * configure.srv (m68k*-*-uclinux*): New target.
16078 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
16079 (linux_resume_one_process): Remove extraneous cast.
16080 (linux_read_offsets): New.
16081 (linux_target_op): Add linux_read_offsets on mmuless systems.
16082 * server.c (handle_query): Add qOffsets logic.
16083 * target.h (struct target_ops): Add read_offsets.
16084
16085 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16086
16087 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
16088 (PTRACE_GET_THREAD_AREA): Define.
16089 (ps_get_thread_area): New function.
16090 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
16091 (linux-x86-64-low.o): Update.
16092
16093 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
16094
16095 * configure.ac: Remove checks for prfpregset_t.
16096 * gdb_proc_service.h: New file.
16097 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
16098 new "gdb_proc_service.h".
16099 * proc-service.c: Likewise.
16100 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
16101 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
16102 * Makefile.in (gdb_proc_service_h): Updated.
16103 * configure, config.in: Regenerated.
16104
16105 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16106
16107 * remote-utils.c (prepare_resume_reply): Move declaration
16108 of gdb_id_from_wait to the top of the block.
16109
16110 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
16111
16112 * linux-low.c (regsets_store_inferior_registers): Read the regset
16113 from the target before filling it.
16114
16115 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
16116
16117 * server.c (attach_inferior): Return SIGTRAP for a successful
16118 attach.
16119
16120 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
16121
16122 * Makefile.in (OBS): Add version.o.
16123 (STAGESTUFF): Delete.
16124 (version.o): Add dependencies.
16125 (version.c): Replace rule.
16126 (clean): Remove version.c.
16127 * server.c (gdbserver_version): New.
16128 (gdbserver_usage): Use printf.
16129 (main): Handle --version and --help.
16130 * server.h (version, host_name): Add declarations.
16131
16132 2005-12-23 Eli Zaretskii <eliz@gnu.org>
16133
16134 * linux-arm-low.c:
16135 * linux-arm-low.c:
16136 * inferiors.c:
16137 * i387-fp.h:
16138 * i387-fp.c:
16139 * gdbreplay.c:
16140 * regcache.c:
16141 * proc-service.c:
16142 * mem-break.h:
16143 * mem-break.c:
16144 * linux-x86-64-low.c:
16145 * linux-sh-low.c:
16146 * linux-s390-low.c:
16147 * linux-ppc64-low.c:
16148 * linux-ppc-low.c:
16149 * linux-mips-low.c:
16150 * linux-m68k-low.c:
16151 * linux-m32r-low.c:
16152 * linux-low.h:
16153 * linux-low.c:
16154 * linux-ia64-low.c:
16155 * linux-i386-low.c:
16156 * linux-crisv32-low.c:
16157 * thread-db.c:
16158 * terminal.h:
16159 * target.h:
16160 * target.c:
16161 * server.h:
16162 * server.c:
16163 * remote-utils.c:
16164 * regcache.h:
16165 * utils.c:
16166 * Makefile.in:
16167 * configure.ac:
16168 * gdbserver.1: Add (C) after Copyright. Update the FSF
16169 address.
16170
16171 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
16172
16173 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
16174 (arm_breakpoint_at): Recognize both breakpoints.
16175 (the_low_target): Use the correct breakpoint instruction.
16176
16177 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
16178
16179 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
16180 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
16181 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
16182 (the_low_target): Update.
16183
16184 2005-10-25 Andreas Schwab <schwab@suse.de>
16185
16186 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
16187
16188 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
16189 (ia64_num_regs): Reduce to 462.
16190
16191 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
16192
16193 * acinclude.m4: Correct quoting.
16194 * aclocal.m4: Regenerated.
16195
16196 Suggested by SZOKOVACS Robert <szo@ies.hu>:
16197 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
16198 (thread_db_init): Call thread_db_err_str.
16199 * configure.ac: Check for TD_VERSION.
16200 * config.in, configure: Regenerated.
16201
16202 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
16203
16204 * server.h (error, fatal, warning): Add ATTR_FORMAT.
16205
16206 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16207
16208 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
16209 is not available. Define HAVE_PTRACE_GETREGS if it is.
16210 * config.in, configure: Regenerated.
16211 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
16212 * linux-i386-low.c, linux-m68k-low.c: Update to use
16213 HAVE_PTRACE_GETREGS.
16214 * linux-low.c (regsets_fetch_inferior_registers)
16215 (regsets_store_inferior_registers): Only return 0 if we processed
16216 GENERAL_REGS.
16217 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
16218 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
16219
16220 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16221
16222 * inferiors.c (struct thread_info): Add gdb_id.
16223 (add_thread): Add gdb_id argument.
16224 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
16225 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
16226 calls to add_thread.
16227 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
16228 * server.c (handle_query): Use thread_to_gdb_id.
16229 (handle_v_cont, main): Use gdb_id_to_thread_id.
16230 * server.h (add_thread): Update prototype.
16231 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
16232 prototypes.
16233
16234 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
16235
16236 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
16237 left-padded registers.
16238 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
16239 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
16240
16241 2005-07-01 Steve Ellcey <sje@cup.hp.com>
16242
16243 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
16244 * configure: Regenerate.
16245 * config.in: Regenerate.
16246 * server.h (NEED_DECLARATION_STRERROR):
16247 Replace with !HAVE_DECL_STRERROR.
16248
16249 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
16250
16251 * linux-low.c (linux_wait, linux_send_signal): Don't test
16252 an unsigned long variable for > 0 if it could be MAX_ULONG.
16253 * server.c (myresume): Likewise.
16254 * target.c (set_desired_inferior): Likewise.
16255
16256 2005-06-13 Mark Kettenis <kettenis@gnu.org>
16257
16258 * configure.ac: Simplify and improve check for socklen_t.
16259 * configure, config.in: Regenerate.
16260
16261 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
16262
16263 * acconfig.h: Remove.
16264 * configure.ac: Add a test for socklen_t. Use three-argument
16265 AC_DEFINE throughout.
16266 * config.in: Regenerated using autoheader 2.59.
16267 * configure: Regenerated.
16268
16269 * gdbreplay.c (socklen_t): Provide a default.
16270 (remote_open): Use socklen_t.
16271 * remote-utils.c (socklen_t): Provide a default.
16272 (remote_open): Use socklen_t.
16273 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
16274 unsigned char.
16275
16276 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
16277 char for buffers.
16278 * linux-low.c (linux_read_memory, linux_write_memory)
16279 (linux_read_auxv): Likewise.
16280 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
16281 (check_mem_write): Likewise.
16282 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
16283 Likewise.
16284 * regcache.c (struct inferior_rgcache_data, registers_to_string)
16285 (registers_from_string, register_data): Likewise.
16286 * server.c (handle_query, main): Likewise.
16287 * server.h (convert_ascii_to_int, convert_int_to_ascii)
16288 (decode_M_packet): Likewise.
16289 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
16290 * target.h (struct target_ops): Update read_memory, write_memory,
16291 and read_auxv.
16292 (read_inferior_memory, write_inferior_memory): Update.
16293 * linux-low.h (struct linux_target_ops): Change type of breakpoint
16294 to unsigned char *.
16295 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
16296 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
16297 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
16298 linux-s390-low.c, linux-sh-low.c: Update for changes in
16299 read_inferior_memory and the_low_target->breakpoint.
16300
16301 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
16302
16303 * Makefile.in (SFILES): Add linux-ppc64-low.c.
16304 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
16305 * configure.srv: Add powerpc64-*-linux*.
16306 * linux-ppc64-low.c: New file.
16307
16308 2005-05-23 Orjan Friberg <orjanf@axis.com>
16309
16310 * linux-cris-low.c: New file with support for CRIS.
16311 * linux-crisv32-low.c: Ditto for CRISv32.
16312 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
16313 (clean): Add reg-cris.c and reg-crisv32.c.
16314 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
16315 reg-crisv32.o, and reg-crisv32.c to make rules.
16316 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
16317 recognized targets.
16318
16319 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
16320
16321 * linux-low.c (fetch_register): Ensure buffer size is a multiple
16322 of sizeof (PTRACE_XFER_TYPE).
16323 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
16324
16325 2005-05-12 Orjan Friberg <orjanf@axis.com>
16326
16327 * target.h (struct target_ops): Add insert_watchpoint,
16328 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
16329 pointers for hardware watchpoint support.
16330 * linux-low.h (struct linux_target_ops): Ditto.
16331 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
16332 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
16333 to linux_target_ops.
16334 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
16335 reply packet.
16336 * server.c (main): Recognize 'Z' and 'z' packets.
16337
16338 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
16339
16340 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
16341 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
16342 (the_low_target): Add new members.
16343
16344 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16345
16346 * proc-service.c (ps_lgetregs): Search all_processes instead of
16347 all_threads.
16348
16349 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
16350
16351 * server.c (start_inferior): Change return type to int.
16352 (attach_inferior): Change sigptr to int *.
16353 (handle_v_cont, handle_v_requests): Change signal to int *.
16354 (main): Change signal to int.
16355
16356 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
16357
16358 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
16359 * configure.srv: Add m32r*-*-linux*.
16360 * linux-m32r-low.c: New file.
16361
16362 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
16363
16364 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
16365
16366 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
16367
16368 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
16369 Take unsigned long arguments for PIDs.
16370 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
16371 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
16372 (wait_for_sigstop, linux_resume_one_process)
16373 (regsets_fetch_inferior_registers, linux_send_signal)
16374 (linux_read_auxv): Likewise. Update the types of variables holding
16375 PIDs. Update format string specifiers.
16376 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
16377 * remote-utils.c (prepare_resume_reply): Likewise.
16378 * server.c (cont_thread, general_thread, step_thread)
16379 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
16380 unsigned long.
16381 (handle_query): Update format specifiers.
16382 (handle_v_cont, main): Use strtoul for thread IDs.
16383 * server.h (struct inferior_list_entry): Use unsigned long for ID.
16384 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
16385 (general_thread, step_thread, thread_from_wait)
16386 (old_thread_from_wait): Update.
16387 * target.h (struct thread_resume): Use unsigned long for THREAD.
16388 (struct target_ops): Use unsigned long for arguments to attach and
16389 thread_alive.
16390
16391 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
16392
16393 * acinclude.m4: Include bfd/bfd.m4 directly.
16394 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
16395 <agriffis@toolchain.org>.
16396 * aclocal.m4, configure: Regenerated.
16397
16398 2005-01-07 Andrew Cagney <cagney@gnu.org>
16399
16400 * configure.ac: Rename configure.in, require autoconf 2.59.
16401 * configure: Re-generate.
16402
16403 2004-12-08 Daniel Jacobowitz <dan@debian.org>
16404
16405 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
16406 LIBS when finished.
16407 * aclocal.m4: Regenerated.
16408 * configure: Regenerated.
16409
16410 2004-11-21 Andreas Schwab <schwab@suse.de>
16411
16412 * linux-m68k-low.c (m68k_num_gregs): Define.
16413 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
16414 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
16415 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
16416 (m68k_breakpoint_at): New. Add to the_low_target.
16417
16418 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
16419 srv_linux_thread_db to yes.
16420
16421 2004-10-20 Joel Brobecker <brobecker@gnat.com>
16422
16423 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
16424 (ARCH_SET_FS): Likewise.
16425 (ARCH_GET_FS): Likewise.
16426 (ARCH_GET_GS): Likewise.
16427
16428 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16429
16430 * linux-i386-low.c (ps_get_thread_area): New.
16431 * linux-x86-64-low.c (ps_get_thread_area): New.
16432 * linux-low.c: Include <sys/syscall.h>.
16433 (linux_kill_one_process): Don't kill the first thread here.
16434 (linux_kill): Kill the first thread here.
16435 (kill_lwp): New function.
16436 (send_sigstop, linux_send_signal): Use it.
16437 * proc-service.c: Clean up #ifdefs.
16438 (fpregset_info): Delete.
16439 (ps_lgetregs): Update and enable implementation.
16440 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
16441 implementations.
16442 * remote-utils.c (struct sym_cache, symbol_cache): New.
16443 (input_interrupt): Print a clearer message.
16444 (async_io_enabled): New variable.
16445 (enable_async_io, disable_async_io): Use it. Update comments.
16446 (look_up_one_symbol): Use the symbol cache.
16447 * thread-db.c (thread_db_look_up_symbols): New function.
16448 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
16449
16450 2004-10-16 Daniel Jacobowitz <dan@debian.org>
16451
16452 * configure.in: Test for -rdynamic.
16453 * configure: Regenerated.
16454 * Makefile (INTERNAL_LDFLAGS): New.
16455 (gdbserver, gdbreplay): Use it.
16456
16457 2004-09-02 Andrew Cagney <cagney@gnu.org>
16458
16459 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
16460
16461 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
16462
16463 * linux-low.c (linux_wait): Clear all_processes list also.
16464
16465 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16466
16467 * linux-low.c: Include <errno.h>. Remove extern declaration of
16468 errno.
16469
16470 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
16471
16472 * gdbreplay.c, server.h, utils.c: Update copyright years.
16473
16474 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16475
16476 * server.c (main): Print child status or termination signal from
16477 variable 'signal', not 'sig'.
16478
16479 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
16480
16481 * linux-low.c (linux_read_memory): Change return type to
16482 int. Check for and return error from ptrace().
16483 * target.c (read_inferior_memory): Change return type to int. Pass
16484 back return status from the_target->read_memory().
16485 * target.h (struct target_ops): Adapt *read_memory() prototype.
16486 Update comment.
16487 (read_inferior_memory): Adapt prototype.
16488 * server.c (main): Return an error packet if
16489 read_inferior_memory() returns an error.
16490
16491 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
16492
16493 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
16494 Unify with other clean targets.
16495
16496 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16497
16498 * server.c (handle_v_cont): Call set_desired_inferior.
16499
16500 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16501
16502 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
16503
16504 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16505
16506 * linux-low.c (linux_wait): Unblock async I/O.
16507 (linux_resume): Block and enable async I/O.
16508 * remote-utils.c (block_async_io, unblock_async_io): New functions.
16509 * server.h (block_async_io, unblock_async_io): Add prototypes.
16510
16511 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16512
16513 * remote-utils.c (remote_open): Print a status notice after
16514 opening a TCP port.
16515 * server.c (attach_inferior): Print a status notice after
16516 attaching.
16517
16518 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
16519
16520 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
16521
16522 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
16523
16524 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
16525 error packet.
16526 * server.c, target.h: Update copyright years.
16527
16528 2004-02-25 Roland McGrath <roland@redhat.com>
16529
16530 * target.h (struct target_ops): New member `read_auxv'.
16531 * server.c (handle_query): Handle qPart:auxv:read: query using that.
16532 * linux-low.c (linux_read_auxv): New function.
16533 (linux_target_ops): Initialize `read_auxv' member to that.
16534
16535 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
16536
16537 Committed by Jim Blandy <jimb@redhat.com>.
16538
16539 * linux-s390-low.c (s390_num_regs): Update.
16540 (s390_regmap): Remove control registers. Use __s390x__ predefine
16541 instead of GPR_SIZE to distiguish s390 and s390x targets.
16542
16543 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
16544
16545 * linux-low.c: Update copyright year.
16546 (check_removed_breakpoint): Clear pending_is_breakpoint.
16547 (linux_set_resume_request, linux_queue_one_thread)
16548 (resume_status_pending_p): New functions.
16549 (linux_continue_one_thread): Use process->resume.
16550 (linux_resume): Only resume threads if there are no pending events.
16551 * linux-low.h (struct process_info): Add resume request
16552 pointer.
16553
16554 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
16555
16556 * regcache.c (new_register_cache): Clear the allocated register
16557 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
16558
16559 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
16560
16561 * linux-low.c (linux_resume): Take a struct thread_resume *
16562 argument.
16563 (linux_wait): Update call.
16564 (resume_ptr): New static variable.
16565 (linux_continue_one_thread): Renamed from
16566 linux_continue_one_process. Use resume_ptr.
16567 (linux_resume): Use linux_continue_one_thread.
16568 * server.c (handle_v_cont, handle_v_requests): New functions.
16569 (myresume): New function.
16570 (main): Handle 'v' case.
16571 * target.h (struct thread_resume): New type.
16572 (struct target_ops): Change argument of "resume" to struct
16573 thread_resume *.
16574 (myresume): Delete macro.
16575
16576 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
16577
16578 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
16579 (uninstall): Support DESTDIR.
16580
16581 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
16582
16583 * configure.srv: Add xscale*linux copy of arm*linux entry.
16584
16585 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
16586
16587 * linux-arm-low.c (arm_reinsert_addr): New function.
16588 (the_low_target): Add arm_reinsert_addr.
16589
16590 2003-07-08 Mark Kettenis <kettenis@gnu.org>
16591
16592 * mem-break.c: Remove whitespace at end of file.
16593
16594 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16595
16596 * configure.in: Check whether we need to prototype strerror.
16597 * server.h: Optionally prototype strerror.
16598 * gdbreplay.c (perror_with_name): Use strerror.
16599 * linux-low.c (linux_attach_lwp): Use strerror.
16600 * utils.c (perror_with_name): Use strerror.
16601 * config.in, configure: Regenerated.
16602
16603 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
16604
16605 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
16606 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
16607
16608 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
16609
16610 * Makefile.in (SFILES): Update.
16611 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
16612 low-sun3.c: Remove files.
16613
16614 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
16615
16616 * linux-low.c: Move comment to linux_thread_alive where it belonged.
16617 (linux_detach_one_process, linux_detach): New functions.
16618 (linux_target_ops): Add linux_detach.
16619 * server.c (main): Handle 'D' packet.
16620 * target.h (struct target_ops): Add "detach" member.
16621 (detach_inferior): Define.
16622
16623 2003-06-13 Mark Kettenis <kettenis@gnu.org>
16624
16625 From Kelley Cook <kelleycook@wideopenwest.com>:
16626 * configure.srv: Accept i[34567]86 variants.
16627
16628 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
16629
16630 * linux-low.c (linux_wait_for_event): Correct comment typos.
16631 (linux_resume_one_process): Call check_removed_breakpoint.
16632 (linux_send_signal): New function.
16633 (linux_target_ops): Add linux_send_signal.
16634 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
16635 of kill.
16636 * target.h (struct target_ops): Add send_signal.
16637
16638 2003-05-29 Jim Blandy <jimb@redhat.com>
16639
16640 * linux-low.c (usr_store_inferior_registers): Transfer buf in
16641 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
16642 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
16643 away part of the register's value.
16644
16645 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
16646
16647 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
16648 (linux_wait_for_event, linux_init_signals): Likewise.
16649
16650 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
16651
16652 * configure.in: Check for stdlib.h.
16653 * configure: Regenerated.
16654 * config.in: Regenerated.
16655
16656 2003-01-04 Andreas Schwab <schwab@suse.de>
16657
16658 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
16659
16660 2003-01-02 Andrew Cagney <ac131313@redhat.com>
16661
16662 * Makefile.in: Remove obsolete code.
16663
16664 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
16665
16666 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
16667 defined(PT_FPR0_HI).
16668
16669 2002-11-17 Stuart Hughes <seh@zee2.com>
16670
16671 * linux-arm-low.c (arm_num_regs): Increase.
16672 (arm_regmap): Include status register.
16673
16674 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
16675
16676 * linux-low.c (register_addr): Remove incorrect -1 check.
16677
16678 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
16679
16680 * linux-low.c (linux_create_inferior): Call setpgid. Return
16681 the new PID.
16682 (unstopped_p, linux_signal_pid): Remove.
16683 (linux_target_ops): Remove linux_signal_pid.
16684 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
16685 global instead of target method.
16686 * target.h (struct target_ops): Remove signal_pid. Update comment
16687 for create_inferior.
16688 * server.c (signal_pid): New variable.
16689 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
16690 gdbserver. Set the child to be the foreground process group.
16691 (attach_inferior): Set signal_pid.
16692
16693 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
16694
16695 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
16696
16697 2002-08-20 Jim Blandy <jimb@redhat.com>
16698
16699 * Makefile.in (LDFLAGS): Allow the configure script to establish a
16700 default for this.
16701
16702 2002-08-01 Andrew Cagney <cagney@redhat.com>
16703
16704 * Makefile.in: Make chill references obsolete.
16705
16706 2002-07-24 Kevin Buettner <kevinb@redhat.com>
16707
16708 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
16709 * configure: Regenerate.
16710 * config.in: Regenerate.
16711
16712 2002-07-09 David O'Brien <obrien@FreeBSD.org>
16713
16714 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
16715 (perror_with_name, remote_close, remote_open, expect, play): Static.
16716
16717 2002-07-04 Michal Ludvig <mludvig@suse.cz>
16718
16719 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
16720 byte offsets instead of an array of indexes.
16721 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
16722
16723 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
16724
16725 * regcache.c: Add comment.
16726
16727 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
16728
16729 * thread-db.c: New file.
16730 * proc-service.c: New file.
16731 * acinclude.m4: New file.
16732 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
16733 proc-service.o, and thread-db.o.
16734 (linux-low.o): Add USE_THREAD_DB.
16735 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
16736 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
16737 * aclocal.m4: Regenerated.
16738 * config.in: Regenerated.
16739 * configure: Regenerated.
16740 * configure.in: Check for proc_service.h, sys/procfs.h,
16741 thread_db.h, and linux/elf.h headrs.
16742 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
16743 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
16744 Check for -lthread_db and thread support.
16745 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
16746 PowerPC, and SuperH.
16747 * i387-fp.c: Constify arguments.
16748 * i387-fp.h: Likewise.
16749 * inferiors.c: (struct thread_info): Renamed from
16750 `struct inferior_info'. Remove PID member. Use generic inferior
16751 list header. All uses updated.
16752 (inferiors, signal_pid): Removed.
16753 (all_threads): New variable.
16754 (get_thread): Define.
16755 (add_inferior_to_list): New function.
16756 (for_each_inferior): New function.
16757 (change_inferior_id): New function.
16758 (add_inferior): Removed.
16759 (remove_inferior): New function.
16760 (add_thread): New function.
16761 (free_one_thread): New function.
16762 (remove_thread): New function.
16763 (clear_inferiors): Use for_each_inferior and free_one_thread.
16764 (find_inferior): New function.
16765 (find_inferior_id): New function.
16766 (inferior_target_data): Update argument type.
16767 (set_inferior_target_data): Likewise.
16768 (inferior_regcache_data): Likewise.
16769 (set_inferior_regcache_data): Likewise.
16770 * linux-low.c (linux_bp_reinsert): Remove.
16771 (all_processes, stopping_threads, using_thrads)
16772 (struct pending_signals, debug_threads, pid_of): New.
16773 (inferior_pid): Replace with macro.
16774 (struct inferior_linux_data): Remove.
16775 (get_stop_pc, add_process): New functions.
16776 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
16777 Use add_process and add_thread.
16778 (linux_attach_lwp): New function, based on old linux_attach. Use
16779 add_process and add_thread. Set stop_expected for new threads.
16780 (linux_attach): New function.
16781 (linux_kill_one_process): New function.
16782 (linux_kill): Kill all LWPs.
16783 (linux_thread_alive): Use find_inferior_id.
16784 (check_removed_breakpoints, status_pending_p): New functions.
16785 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
16786 Update. Use WNOHANG. Wait for cloned processes also. Update process
16787 struct for the found process.
16788 (linux_wait_for_event): New function.
16789 (linux_wait): Use it. Support LWPs.
16790 (send_sigstop, wait_for_sigstop, stop_all_processes)
16791 (linux_resume_one_process, linux_continue_one_process): New functions.
16792 (linux_resume): Support LWPs.
16793 (REGISTER_RAW_SIZE): Remove.
16794 (fetch_register): Use register_size instead. Call supply_register.
16795 (usr_store_inferior_registers): Likewise. Call collect_register.
16796 Fix recursive case.
16797 (regsets_fetch_inferior_registers): Improve error message.
16798 (regsets_store_inferior_registers): Add debugging.
16799 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
16800 (unstopped_p, linux_signal_pid): New functions.
16801 (linux_target_ops): Add linux_signal_pid.
16802 (linux_init_signals): New function.
16803 (initialize_low): Call it. Initialize using_threads.
16804 * regcache.c (inferior_regcache_data): Add valid
16805 flag.
16806 (get_regcache): Fetch registers lazily. Add fetch argument
16807 and update all callers.
16808 (regcache_invalidate_one, regcache_invalidate): New
16809 functions.
16810 (new_register_cache): Renamed from create_register_cache.
16811 Return the new regcache.
16812 (free_register_cache): Change argument to a void *.
16813 (registers_to_string, registers_from_string): Call get_regcache
16814 with fetch flag set.
16815 (register_data): Make static. Pass fetch flag to get_regcache.
16816 (supply_register): Call get_regcache with fetch flag clear.
16817 (collect_register): Call get_regcache with fetch flag set.
16818 (collect_register_as_string): New function.
16819 * regcache.h: Update.
16820 * remote-utils.c (putpkt): Flush after debug output and use
16821 stderr.
16822 Handle input interrupts while waiting for an ACK.
16823 (input_interrupt): Use signal_pid method.
16824 (getpkt): Flush after debug output and use stderr.
16825 (outreg): Use collect_register_as_string.
16826 (new_thread_notify, dead_thread_notify): New functions.
16827 (prepare_resume_reply): Check using_threads. Set thread_from_wait
16828 and general_thread.
16829 (look_up_one_symbol): Flush after debug output.
16830 * server.c (step_thread, server_waiting): New variables.
16831 (start_inferior): Don't use signal_pid. Update call to mywait.
16832 (attach_inferior): Update call to mywait.
16833 (handle_query): Handle qfThreadInfo and qsThreadInfo.
16834 (main): Don't fetch/store registers explicitly. Use
16835 set_desired_inferior. Support proposed ``Hs'' packet. Update
16836 calls to mywait.
16837 * server.h: Update.
16838 (struct inferior_list, struct_inferior_list_entry): New.
16839 * target.c (set_desired_inferior): New.
16840 (write_inferior_memory): Constify.
16841 (mywait): New function.
16842 * target.h: Update.
16843 (struct target_ops): New signal_pid method.
16844 (mywait): Removed macro, added prototype.
16845
16846 * linux-low.h (regset_func): Removed.
16847 (regset_fill_func, regset_store_func): New.
16848 (enum regset_type): New.
16849 (struct regset_info): Add type field. Use new operation types.
16850 (struct linux_target_ops): stop_pc renamed to get_pc.
16851 Add decr_pc_after_break and breakpoint_at.
16852 (get_process, get_thread_proess, get_process_thread)
16853 (strut process_info, all_processes, linux_attach_lwp)
16854 (thread_db_init): New.
16855
16856 * linux-arm-low.c (arm_get_pc, arm_set_pc,
16857 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
16858 (the_low_target): Add new members.
16859 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
16860 (i386_store_fpxregset): Constify.
16861 (target_regsets): Add new kind identifier.
16862 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
16863 (i386_set_pc): Add debugging.
16864 (i386_breakpoint_at): New function.
16865 (the_low_target): Add new members.
16866 * linux-mips-low.c (mips_get_pc, mips_set_pc)
16867 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
16868 (mips_breakpoint_at): New.
16869 (the_low_target): Add new members.
16870 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
16871 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
16872 (the_low_target): Add new members.
16873 * linux-sh-low.c (sh_get_pc, sh_set_pc)
16874 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
16875 (the_low_target): Add new members.
16876 * linux-x86-64-low.c (target_regsets): Add new kind
16877 identifier.
16878
16879 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
16880
16881 From Martin Pool <mbp@samba.org>:
16882 * server.c (gdbserver_usage): New function.
16883 (main): Call it.
16884
16885 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
16886
16887 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
16888 stop_at -> stop_pc.
16889
16890 2002-05-04 Andrew Cagney <ac131313@redhat.com>
16891
16892 * Makefile.in: Remove obsolete code.
16893
16894 2002-04-24 Michal Ludvig <mludvig@suse.cz>
16895
16896 * linux-low.c (regsets_fetch_inferior_registers),
16897 (regsets_store_inferior_registers): Removed cast to int from
16898 ptrace() calls.
16899 * regcache.h: Added declaration of struct inferior_info.
16900
16901 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16902
16903 * inferiors.c (struct inferior_info): Add regcache_data.
16904 (add_inferior): Call create_register_cache.
16905 (clear_inferiors): Call free_register_cache.
16906 (inferior_regcache_data, set_inferior_regcache_data): New functions.
16907 * regcache.c (struct inferior_regcache_data): New.
16908 (registers): Remove.
16909 (get_regcache): New function.
16910 (create_register_cache, free_register_cache): New functions.
16911 (set_register_cache): Don't initialize the register cache here.
16912 (registers_to_string, registers_from_string, register_data): Call
16913 get_regcache.
16914 * regcache.h: Add prototypes.
16915 * server.h: Likewise.
16916
16917 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
16918
16919 * mem-break.c: New file.
16920 * mem-break.h: New file.
16921 * Makefile.in: Add mem-break.o rule; update server.h
16922 dependencies.
16923 * inferiors.c (struct inferior_info): Add target_data
16924 member.
16925 (clear_inferiors): Free target_data member if set.
16926 (inferior_target_data, set_inferior_target_data): New functions.
16927 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
16928 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
16929 * linux-low.c (linux_bp_reinsert): New variable.
16930 (struct inferior_linux_data): New.
16931 (linux_create_inferior): Use set_inferior_target_data.
16932 (linux_attach): Likewise. Call add_inferior.
16933 (linux_wait_for_one_inferior): New function.
16934 (linux_wait): Call it.
16935 (linux_write_memory): Add const.
16936 (initialize_low): Call set_breakpoint_data.
16937 * linux-low.h (struct linux_target_ops): Add breakpoint
16938 handling members.
16939 * server.c (attach_inferior): Remove extra add_inferior
16940 call.
16941 * server.h: Include mem-break.h. Update inferior.c
16942 prototypes.
16943 * target.c (read_inferior_memory)
16944 (write_inferior_memory): New functions.
16945 * target.h (read_inferior_memory)
16946 (write_inferior_memory): Change macros to prototypes.
16947 (struct target_ops): Update comments. Add const to write_memory
16948 definition.
16949
16950 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
16951
16952 * linux-low.c (usr_store_inferior_registers): Support
16953 registers which are allowed to fail to store.
16954 * linux-low.h (linux_target_ops): Likewise.
16955 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
16956 (ppc_cannot_store_register): FPSCR may not be storable.
16957
16958 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16959
16960 * server.h: Include <string.h> if HAVE_STRING_H.
16961 * ChangeLog: Correct paths in last ChangeLog entry.
16962
16963 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
16964
16965 * linux-low.h: Remove obsolete prototypes.
16966 (struct linux_target_ops): New.
16967 (extern the_low_target): New.
16968 * linux-low.c (num_regs, regmap): Remove declarations.
16969 (register_addr): Use the_low_target explicitly.
16970 (fetch_register): Likewise.
16971 (usr_fetch_inferior_registers): Likewise.
16972 (usr_store_inferior_registers): Likewise.
16973 * linux-arm-low.c (num_regs): Remove.
16974 (arm_num_regs): Define.
16975 (arm_regmap): Renamed from regmap, made static.
16976 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
16977 made static.
16978 (arm_cannot_store_register): Renamed from cannot_store_register,
16979 made static.
16980 (the_low_target): New.
16981 * linux-i386-low.c (num_regs): Remove.
16982 (i386_num_regs): Define.
16983 (i386_regmap): Renamed from regmap, made static.
16984 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
16985 made static.
16986 (i386_cannot_store_register): Renamed from cannot_store_register,
16987 made static.
16988 (the_low_target): New.
16989 * linux-ia64-low.c (num_regs): Remove.
16990 (ia64_num_regs): Define.
16991 (ia64_regmap): Renamed from regmap, made static.
16992 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
16993 made static.
16994 (ia64_cannot_store_register): Renamed from cannot_store_register,
16995 made static.
16996 (the_low_target): New.
16997 * linux-m68k-low.c (num_regs): Remove.
16998 (m68k_num_regs): Define.
16999 (m68k_regmap): Renamed from regmap, made static.
17000 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
17001 made static.
17002 (m68k_cannot_store_register): Renamed from cannot_store_register,
17003 made static.
17004 (the_low_target): New.
17005 * linux-mips-low.c (num_regs): Remove.
17006 (mips_num_regs): Define.
17007 (mips_regmap): Renamed from regmap, made static.
17008 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
17009 made static.
17010 (mips_cannot_store_register): Renamed from cannot_store_register,
17011 made static.
17012 (the_low_target): New.
17013 * linux-ppc-low.c (num_regs): Remove.
17014 (ppc_num_regs): Define.
17015 (ppc_regmap): Renamed from regmap, made static.
17016 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
17017 made static.
17018 (ppc_cannot_store_register): Renamed from cannot_store_register,
17019 made static.
17020 (the_low_target): New.
17021 * linux-s390-low.c (num_regs): Remove.
17022 (s390_num_regs): Define.
17023 (s390_regmap): Renamed from regmap, made static.
17024 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
17025 made static.
17026 (s390_cannot_store_register): Renamed from cannot_store_register,
17027 made static.
17028 (the_low_target): New.
17029 * linux-sh-low.c (num_regs): Remove.
17030 (sh_num_regs): Define.
17031 (sh_regmap): Renamed from regmap, made static.
17032 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
17033 made static.
17034 (sh_cannot_store_register): Renamed from cannot_store_register,
17035 made static.
17036 (the_low_target): New.
17037 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
17038 (the_low_target): New.
17039
17040 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17041
17042 * Makefile.in: Add stamp-h target.
17043 * configure.in: Create stamp-h.
17044 * configure: Regenerated.
17045
17046 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17047
17048 * inferiors.c: New file.
17049 * target.c: New file.
17050 * target.h: New file.
17051 * Makefile.in: Add target.o and inferiors.o. Update
17052 dependencies.
17053 * linux-low.c (inferior_pid): New static variable,
17054 moved from server.c.
17055 (linux_create_inferior): Renamed from create_inferior.
17056 Call add_inferior. Return 0 on success instead of a PID.
17057 (linux_attach): Renamed from myattach.
17058 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
17059 (linux_thread_alive): Renamed from mythread_alive.
17060 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
17061 child dies.
17062 (linux_resume): Renamed from myresume. Add missing ``return 0''.
17063 (regsets_store_inferior_registers): Correct error message.
17064 Add missing ``return 0''.
17065 (linux_fetch_registers): Renamed from fetch_inferior_registers.
17066 (linux_store_registers): Renamed from store_inferior_registers.
17067 (linux_read_memory): Renamed from read_inferior_memory.
17068 (linux_write_memory): Renamed from write_inferior_memory.
17069 (linux_target_ops): New structure.
17070 (initialize_low): Call set_target_ops ().
17071 * remote-utils.c (unhexify): New function.
17072 (hexify): New function.
17073 (input_interrupt): Send signals to ``signal_pid''.
17074 * server.c (inferior_pid): Remove.
17075 (start_inferior): Update create_inferior call.
17076 (attach_inferior): Call add_inferior.
17077 (handle_query): New function.
17078 (main): Call handle_query for `q' packets.
17079 * server.h: Include "target.h". Remove obsolete prototypes.
17080 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
17081
17082 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
17083
17084 * Makefile.in: Add WARN_CFLAGS. Update configury
17085 dependencies.
17086 * configure.in: Check for <string.h>
17087 * configure: Regenerate.
17088 * config.in: Regenerate.
17089 * gdbreplay.c: Include needed system headers.
17090 (remote_open): Remove strchr prototype.
17091 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
17092 * regcache.c (supply_register): Change buf argument to const void *.
17093 (supply_register_by_name): Likewise.
17094 (collect_register): Change buf argument to void *.
17095 (collect_register_by_name): Likewise.
17096 * regcache.h: Add missing prototypes.
17097 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
17098 * server.c (handle_query): New function.
17099 (attached): New static variable, moved out of main.
17100 (main): Quiet longjmp clobber warnings.
17101 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
17102 * utils.c (error): Remove NORETURN.
17103 (fatal): Likewise.
This page took 0.426272 seconds and 5 git commands to generate.